Skip to content

Commit 2208ea4

Browse files
stainless-app[bot]meorphis
authored andcommitted
fix(api): better support union schemas with common properties (#2314)
1 parent ac6814a commit 2208ea4

File tree

25 files changed

+4374
-627
lines changed

25 files changed

+4374
-627
lines changed

api.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1760,13 +1760,17 @@ Methods:
17601760
Types:
17611761

17621762
- <code><a href="./src/resources/origin-tls-client-auth/origin-tls-client-auth.ts">ZoneAuthenticatedOriginPull</a></code>
1763+
- <code><a href="./src/resources/origin-tls-client-auth/origin-tls-client-auth.ts">OriginTLSClientAuthCreateResponse</a></code>
1764+
- <code><a href="./src/resources/origin-tls-client-auth/origin-tls-client-auth.ts">OriginTLSClientAuthListResponse</a></code>
1765+
- <code><a href="./src/resources/origin-tls-client-auth/origin-tls-client-auth.ts">OriginTLSClientAuthDeleteResponse</a></code>
1766+
- <code><a href="./src/resources/origin-tls-client-auth/origin-tls-client-auth.ts">OriginTLSClientAuthGetResponse</a></code>
17631767

17641768
Methods:
17651769

1766-
- <code title="post /zones/{zone_id}/origin_tls_client_auth">client.originTLSClientAuth.<a href="./src/resources/origin-tls-client-auth/origin-tls-client-auth.ts">create</a>({ ...params }) -> ZoneAuthenticatedOriginPull</code>
1767-
- <code title="get /zones/{zone_id}/origin_tls_client_auth">client.originTLSClientAuth.<a href="./src/resources/origin-tls-client-auth/origin-tls-client-auth.ts">list</a>({ ...params }) -> ZoneAuthenticatedOriginPullsSinglePage</code>
1768-
- <code title="delete /zones/{zone_id}/origin_tls_client_auth/{certificate_id}">client.originTLSClientAuth.<a href="./src/resources/origin-tls-client-auth/origin-tls-client-auth.ts">delete</a>(certificateId, { ...params }) -> ZoneAuthenticatedOriginPull</code>
1769-
- <code title="get /zones/{zone_id}/origin_tls_client_auth/{certificate_id}">client.originTLSClientAuth.<a href="./src/resources/origin-tls-client-auth/origin-tls-client-auth.ts">get</a>(certificateId, { ...params }) -> ZoneAuthenticatedOriginPull</code>
1770+
- <code title="post /zones/{zone_id}/origin_tls_client_auth">client.originTLSClientAuth.<a href="./src/resources/origin-tls-client-auth/origin-tls-client-auth.ts">create</a>({ ...params }) -> OriginTLSClientAuthCreateResponse</code>
1771+
- <code title="get /zones/{zone_id}/origin_tls_client_auth">client.originTLSClientAuth.<a href="./src/resources/origin-tls-client-auth/origin-tls-client-auth.ts">list</a>({ ...params }) -> OriginTLSClientAuthListResponsesSinglePage</code>
1772+
- <code title="delete /zones/{zone_id}/origin_tls_client_auth/{certificate_id}">client.originTLSClientAuth.<a href="./src/resources/origin-tls-client-auth/origin-tls-client-auth.ts">delete</a>(certificateId, { ...params }) -> OriginTLSClientAuthDeleteResponse</code>
1773+
- <code title="get /zones/{zone_id}/origin_tls_client_auth/{certificate_id}">client.originTLSClientAuth.<a href="./src/resources/origin-tls-client-auth/origin-tls-client-auth.ts">get</a>(certificateId, { ...params }) -> OriginTLSClientAuthGetResponse</code>
17701774

17711775
## Hostnames
17721776

@@ -1786,13 +1790,14 @@ Types:
17861790

17871791
- <code><a href="./src/resources/origin-tls-client-auth/hostnames/certificates.ts">Certificate</a></code>
17881792
- <code><a href="./src/resources/origin-tls-client-auth/hostnames/certificates.ts">CertificateCreateResponse</a></code>
1793+
- <code><a href="./src/resources/origin-tls-client-auth/hostnames/certificates.ts">CertificateListResponse</a></code>
17891794
- <code><a href="./src/resources/origin-tls-client-auth/hostnames/certificates.ts">CertificateDeleteResponse</a></code>
17901795
- <code><a href="./src/resources/origin-tls-client-auth/hostnames/certificates.ts">CertificateGetResponse</a></code>
17911796

17921797
Methods:
17931798

17941799
- <code title="post /zones/{zone_id}/origin_tls_client_auth/hostnames/certificates">client.originTLSClientAuth.hostnames.certificates.<a href="./src/resources/origin-tls-client-auth/hostnames/certificates.ts">create</a>({ ...params }) -> CertificateCreateResponse</code>
1795-
- <code title="get /zones/{zone_id}/origin_tls_client_auth/hostnames/certificates">client.originTLSClientAuth.hostnames.certificates.<a href="./src/resources/origin-tls-client-auth/hostnames/certificates.ts">list</a>({ ...params }) -> AuthenticatedOriginPullsSinglePage</code>
1800+
- <code title="get /zones/{zone_id}/origin_tls_client_auth/hostnames/certificates">client.originTLSClientAuth.hostnames.certificates.<a href="./src/resources/origin-tls-client-auth/hostnames/certificates.ts">list</a>({ ...params }) -> CertificateListResponsesSinglePage</code>
17961801
- <code title="delete /zones/{zone_id}/origin_tls_client_auth/hostnames/certificates/{certificate_id}">client.originTLSClientAuth.hostnames.certificates.<a href="./src/resources/origin-tls-client-auth/hostnames/certificates.ts">delete</a>(certificateId, { ...params }) -> CertificateDeleteResponse</code>
17971802
- <code title="get /zones/{zone_id}/origin_tls_client_auth/hostnames/certificates/{certificate_id}">client.originTLSClientAuth.hostnames.certificates.<a href="./src/resources/origin-tls-client-auth/hostnames/certificates.ts">get</a>(certificateId, { ...params }) -> CertificateGetResponse</code>
17981803

@@ -4647,15 +4652,19 @@ Methods:
46474652

46484653
Types:
46494654

4655+
- <code><a href="./src/resources/zero-trust/access/applications/policies.ts">PolicyCreateResponse</a></code>
4656+
- <code><a href="./src/resources/zero-trust/access/applications/policies.ts">PolicyUpdateResponse</a></code>
4657+
- <code><a href="./src/resources/zero-trust/access/applications/policies.ts">PolicyListResponse</a></code>
46504658
- <code><a href="./src/resources/zero-trust/access/applications/policies.ts">PolicyDeleteResponse</a></code>
4659+
- <code><a href="./src/resources/zero-trust/access/applications/policies.ts">PolicyGetResponse</a></code>
46514660

46524661
Methods:
46534662

4654-
- <code title="post /{account_or_zone}/{account_or_zone_id}/access/apps/{app_id}/policies">client.zeroTrust.access.applications.policies.<a href="./src/resources/zero-trust/access/applications/policies.ts">create</a>(appId, { ...params }) -> ApplicationPolicy</code>
4655-
- <code title="put /{account_or_zone}/{account_or_zone_id}/access/apps/{app_id}/policies/{policy_id}">client.zeroTrust.access.applications.policies.<a href="./src/resources/zero-trust/access/applications/policies.ts">update</a>(appId, policyId, { ...params }) -> ApplicationPolicy</code>
4656-
- <code title="get /{account_or_zone}/{account_or_zone_id}/access/apps/{app_id}/policies">client.zeroTrust.access.applications.policies.<a href="./src/resources/zero-trust/access/applications/policies.ts">list</a>(appId, { ...params }) -> ApplicationPoliciesSinglePage</code>
4663+
- <code title="post /{account_or_zone}/{account_or_zone_id}/access/apps/{app_id}/policies">client.zeroTrust.access.applications.policies.<a href="./src/resources/zero-trust/access/applications/policies.ts">create</a>(appId, { ...params }) -> PolicyCreateResponse</code>
4664+
- <code title="put /{account_or_zone}/{account_or_zone_id}/access/apps/{app_id}/policies/{policy_id}">client.zeroTrust.access.applications.policies.<a href="./src/resources/zero-trust/access/applications/policies.ts">update</a>(appId, policyId, { ...params }) -> PolicyUpdateResponse</code>
4665+
- <code title="get /{account_or_zone}/{account_or_zone_id}/access/apps/{app_id}/policies">client.zeroTrust.access.applications.policies.<a href="./src/resources/zero-trust/access/applications/policies.ts">list</a>(appId, { ...params }) -> PolicyListResponsesSinglePage</code>
46574666
- <code title="delete /{account_or_zone}/{account_or_zone_id}/access/apps/{app_id}/policies/{policy_id}">client.zeroTrust.access.applications.policies.<a href="./src/resources/zero-trust/access/applications/policies.ts">delete</a>(appId, policyId, { ...params }) -> PolicyDeleteResponse</code>
4658-
- <code title="get /{account_or_zone}/{account_or_zone_id}/access/apps/{app_id}/policies/{policy_id}">client.zeroTrust.access.applications.policies.<a href="./src/resources/zero-trust/access/applications/policies.ts">get</a>(appId, policyId, { ...params }) -> ApplicationPolicy</code>
4667+
- <code title="get /{account_or_zone}/{account_or_zone_id}/access/apps/{app_id}/policies/{policy_id}">client.zeroTrust.access.applications.policies.<a href="./src/resources/zero-trust/access/applications/policies.ts">get</a>(appId, policyId, { ...params }) -> PolicyGetResponse</code>
46594668

46604669
#### PolicyTests
46614670

src/resources/custom-hostnames/custom-hostnames.ts

Lines changed: 0 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,6 @@ export interface CustomHostname {
133133
*/
134134
hostname: string;
135135

136-
/**
137-
* SSL properties for the custom hostname.
138-
*/
139136
ssl: CustomHostname.SSL;
140137

141138
/**
@@ -203,9 +200,6 @@ export interface CustomHostname {
203200
}
204201

205202
export namespace CustomHostname {
206-
/**
207-
* SSL properties for the custom hostname.
208-
*/
209203
export interface SSL {
210204
/**
211205
* Custom hostname SSL identifier tag.
@@ -265,9 +259,6 @@ export namespace CustomHostname {
265259
*/
266260
serial_number?: string;
267261

268-
/**
269-
* SSL specific settings.
270-
*/
271262
settings?: SSL.Settings;
272263

273264
/**
@@ -327,9 +318,6 @@ export namespace CustomHostname {
327318
}
328319

329320
export namespace SSL {
330-
/**
331-
* SSL specific settings.
332-
*/
333321
export interface Settings {
334322
/**
335323
* An allowlist of ciphers for TLS termination. These ciphers must be in the
@@ -365,9 +353,6 @@ export namespace CustomHostname {
365353
message?: string;
366354
}
367355

368-
/**
369-
* Certificate's required validation record.
370-
*/
371356
export interface ValidationRecord {
372357
/**
373358
* The set of email addresses that the certificate authority (CA) will use to
@@ -471,9 +456,6 @@ export interface CustomHostnameCreateResponse {
471456
*/
472457
hostname: string;
473458

474-
/**
475-
* SSL properties for the custom hostname.
476-
*/
477459
ssl: CustomHostnameCreateResponse.SSL;
478460

479461
/**
@@ -541,9 +523,6 @@ export interface CustomHostnameCreateResponse {
541523
}
542524

543525
export namespace CustomHostnameCreateResponse {
544-
/**
545-
* SSL properties for the custom hostname.
546-
*/
547526
export interface SSL {
548527
/**
549528
* Custom hostname SSL identifier tag.
@@ -603,9 +582,6 @@ export namespace CustomHostnameCreateResponse {
603582
*/
604583
serial_number?: string;
605584

606-
/**
607-
* SSL specific settings.
608-
*/
609585
settings?: SSL.Settings;
610586

611587
/**
@@ -665,9 +641,6 @@ export namespace CustomHostnameCreateResponse {
665641
}
666642

667643
export namespace SSL {
668-
/**
669-
* SSL specific settings.
670-
*/
671644
export interface Settings {
672645
/**
673646
* An allowlist of ciphers for TLS termination. These ciphers must be in the
@@ -703,9 +676,6 @@ export namespace CustomHostnameCreateResponse {
703676
message?: string;
704677
}
705678

706-
/**
707-
* Certificate's required validation record.
708-
*/
709679
export interface ValidationRecord {
710680
/**
711681
* The set of email addresses that the certificate authority (CA) will use to
@@ -787,9 +757,6 @@ export interface CustomHostnameListResponse {
787757
*/
788758
hostname: string;
789759

790-
/**
791-
* SSL properties for the custom hostname.
792-
*/
793760
ssl: CustomHostnameListResponse.SSL;
794761

795762
/**
@@ -857,9 +824,6 @@ export interface CustomHostnameListResponse {
857824
}
858825

859826
export namespace CustomHostnameListResponse {
860-
/**
861-
* SSL properties for the custom hostname.
862-
*/
863827
export interface SSL {
864828
/**
865829
* Custom hostname SSL identifier tag.
@@ -919,9 +883,6 @@ export namespace CustomHostnameListResponse {
919883
*/
920884
serial_number?: string;
921885

922-
/**
923-
* SSL specific settings.
924-
*/
925886
settings?: SSL.Settings;
926887

927888
/**
@@ -981,9 +942,6 @@ export namespace CustomHostnameListResponse {
981942
}
982943

983944
export namespace SSL {
984-
/**
985-
* SSL specific settings.
986-
*/
987945
export interface Settings {
988946
/**
989947
* An allowlist of ciphers for TLS termination. These ciphers must be in the
@@ -1019,9 +977,6 @@ export namespace CustomHostnameListResponse {
1019977
message?: string;
1020978
}
1021979

1022-
/**
1023-
* Certificate's required validation record.
1024-
*/
1025980
export interface ValidationRecord {
1026981
/**
1027982
* The set of email addresses that the certificate authority (CA) will use to
@@ -1110,9 +1065,6 @@ export interface CustomHostnameEditResponse {
11101065
*/
11111066
hostname: string;
11121067

1113-
/**
1114-
* SSL properties for the custom hostname.
1115-
*/
11161068
ssl: CustomHostnameEditResponse.SSL;
11171069

11181070
/**
@@ -1180,9 +1132,6 @@ export interface CustomHostnameEditResponse {
11801132
}
11811133

11821134
export namespace CustomHostnameEditResponse {
1183-
/**
1184-
* SSL properties for the custom hostname.
1185-
*/
11861135
export interface SSL {
11871136
/**
11881137
* Custom hostname SSL identifier tag.
@@ -1242,9 +1191,6 @@ export namespace CustomHostnameEditResponse {
12421191
*/
12431192
serial_number?: string;
12441193

1245-
/**
1246-
* SSL specific settings.
1247-
*/
12481194
settings?: SSL.Settings;
12491195

12501196
/**
@@ -1304,9 +1250,6 @@ export namespace CustomHostnameEditResponse {
13041250
}
13051251

13061252
export namespace SSL {
1307-
/**
1308-
* SSL specific settings.
1309-
*/
13101253
export interface Settings {
13111254
/**
13121255
* An allowlist of ciphers for TLS termination. These ciphers must be in the
@@ -1342,9 +1285,6 @@ export namespace CustomHostnameEditResponse {
13421285
message?: string;
13431286
}
13441287

1345-
/**
1346-
* Certificate's required validation record.
1347-
*/
13481288
export interface ValidationRecord {
13491289
/**
13501290
* The set of email addresses that the certificate authority (CA) will use to
@@ -1426,9 +1366,6 @@ export interface CustomHostnameGetResponse {
14261366
*/
14271367
hostname: string;
14281368

1429-
/**
1430-
* SSL properties for the custom hostname.
1431-
*/
14321369
ssl: CustomHostnameGetResponse.SSL;
14331370

14341371
/**
@@ -1496,9 +1433,6 @@ export interface CustomHostnameGetResponse {
14961433
}
14971434

14981435
export namespace CustomHostnameGetResponse {
1499-
/**
1500-
* SSL properties for the custom hostname.
1501-
*/
15021436
export interface SSL {
15031437
/**
15041438
* Custom hostname SSL identifier tag.
@@ -1558,9 +1492,6 @@ export namespace CustomHostnameGetResponse {
15581492
*/
15591493
serial_number?: string;
15601494

1561-
/**
1562-
* SSL specific settings.
1563-
*/
15641495
settings?: SSL.Settings;
15651496

15661497
/**
@@ -1620,9 +1551,6 @@ export namespace CustomHostnameGetResponse {
16201551
}
16211552

16221553
export namespace SSL {
1623-
/**
1624-
* SSL specific settings.
1625-
*/
16261554
export interface Settings {
16271555
/**
16281556
* An allowlist of ciphers for TLS termination. These ciphers must be in the
@@ -1658,9 +1586,6 @@ export namespace CustomHostnameGetResponse {
16581586
message?: string;
16591587
}
16601588

1661-
/**
1662-
* Certificate's required validation record.
1663-
*/
16641589
export interface ValidationRecord {
16651590
/**
16661591
* The set of email addresses that the certificate authority (CA) will use to

0 commit comments

Comments
 (0)