Skip to content

Commit b042994

Browse files
chore(api): update composite API spec
1 parent 97441e7 commit b042994

14 files changed

Lines changed: 176 additions & 71 deletions

File tree

‎.stats.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 2010
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e25c97241a99ea759903d1055a6139aa4e21e831791766ad9f48a99884aed3c3.yml
3-
openapi_spec_hash: 35c67027f1c5166182c387656c478fc0
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e036ff650375d60e26e5510f3b7ff270ab033fcf868cb9ea34857ce96b55291f.yml
3+
openapi_spec_hash: 76d6fa3691de43349195e987dd3cf44b
44
config_hash: 82cfe5a4a27ca8b4eb41cee4987d6c77

‎api.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4901,7 +4901,7 @@ Methods:
49014901

49024902
- <code title="post /accounts/{account_id}/dex/devices/dex_tests">client.zeroTrust.devices.dexTests.<a href="./src/resources/zero-trust/devices/dex-tests.ts">create</a>({ ...params }) -> DEXTestCreateResponse</code>
49034903
- <code title="put /accounts/{account_id}/dex/devices/dex_tests/{dex_test_id}">client.zeroTrust.devices.dexTests.<a href="./src/resources/zero-trust/devices/dex-tests.ts">update</a>(dexTestId, { ...params }) -> DEXTestUpdateResponse</code>
4904-
- <code title="get /accounts/{account_id}/dex/devices/dex_tests">client.zeroTrust.devices.dexTests.<a href="./src/resources/zero-trust/devices/dex-tests.ts">list</a>({ ...params }) -> DEXTestListResponsesSinglePage</code>
4904+
- <code title="get /accounts/{account_id}/dex/devices/dex_tests">client.zeroTrust.devices.dexTests.<a href="./src/resources/zero-trust/devices/dex-tests.ts">list</a>({ ...params }) -> DEXTestListResponsesV4PagePaginationArray</code>
49054905
- <code title="delete /accounts/{account_id}/dex/devices/dex_tests/{dex_test_id}">client.zeroTrust.devices.dexTests.<a href="./src/resources/zero-trust/devices/dex-tests.ts">delete</a>(dexTestId, { ...params }) -> DEXTestDeleteResponse</code>
49064906
- <code title="get /accounts/{account_id}/dex/devices/dex_tests/{dex_test_id}">client.zeroTrust.devices.dexTests.<a href="./src/resources/zero-trust/devices/dex-tests.ts">get</a>(dexTestId, { ...params }) -> DEXTestGetResponse</code>
49074907

@@ -5679,11 +5679,12 @@ Types:
56795679

56805680
- <code><a href="./src/resources/zero-trust/dex/fleet-status/fleet-status.ts">LiveStat</a></code>
56815681
- <code><a href="./src/resources/zero-trust/dex/fleet-status/fleet-status.ts">FleetStatusLiveResponse</a></code>
5682+
- <code><a href="./src/resources/zero-trust/dex/fleet-status/fleet-status.ts">FleetStatusOverTimeResponse</a></code>
56825683

56835684
Methods:
56845685

56855686
- <code title="get /accounts/{account_id}/dex/fleet-status/live">client.zeroTrust.dex.fleetStatus.<a href="./src/resources/zero-trust/dex/fleet-status/fleet-status.ts">live</a>({ ...params }) -> FleetStatusLiveResponse</code>
5686-
- <code title="get /accounts/{account_id}/dex/fleet-status/over-time">client.zeroTrust.dex.fleetStatus.<a href="./src/resources/zero-trust/dex/fleet-status/fleet-status.ts">overTime</a>({ ...params }) -> void</code>
5687+
- <code title="get /accounts/{account_id}/dex/fleet-status/over-time">client.zeroTrust.dex.fleetStatus.<a href="./src/resources/zero-trust/dex/fleet-status/fleet-status.ts">overTime</a>({ ...params }) -> FleetStatusOverTimeResponse</code>
56875688

56885689
#### Devices
56895690

‎src/resources/zero-trust/devices/devices.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {
2222
DEXTestGetResponse,
2323
DEXTestListParams,
2424
DEXTestListResponse,
25-
DEXTestListResponsesSinglePage,
25+
DEXTestListResponsesV4PagePaginationArray,
2626
DEXTestUpdateParams,
2727
DEXTestUpdateResponse,
2828
DEXTests,
@@ -441,7 +441,7 @@ Devices.Resilience = Resilience;
441441
Devices.Registrations = Registrations;
442442
Devices.RegistrationListResponsesCursorPagination = RegistrationListResponsesCursorPagination;
443443
Devices.DEXTests = DEXTests;
444-
Devices.DEXTestListResponsesSinglePage = DEXTestListResponsesSinglePage;
444+
Devices.DEXTestListResponsesV4PagePaginationArray = DEXTestListResponsesV4PagePaginationArray;
445445
Devices.Networks = Networks;
446446
Devices.DeviceNetworksSinglePage = DeviceNetworksSinglePage;
447447
Devices.FleetStatus = FleetStatus;
@@ -501,7 +501,7 @@ export declare namespace Devices {
501501
type DEXTestListResponse as DEXTestListResponse,
502502
type DEXTestDeleteResponse as DEXTestDeleteResponse,
503503
type DEXTestGetResponse as DEXTestGetResponse,
504-
DEXTestListResponsesSinglePage as DEXTestListResponsesSinglePage,
504+
DEXTestListResponsesV4PagePaginationArray as DEXTestListResponsesV4PagePaginationArray,
505505
type DEXTestCreateParams as DEXTestCreateParams,
506506
type DEXTestUpdateParams as DEXTestUpdateParams,
507507
type DEXTestListParams as DEXTestListParams,

‎src/resources/zero-trust/devices/dex-tests.ts‎

Lines changed: 65 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { APIResource } from '../../../resource';
44
import * as Core from '../../../core';
5-
import { SinglePage } from '../../../pagination';
5+
import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination';
66

77
export class DEXTests extends APIResource {
88
/**
@@ -13,7 +13,10 @@ export class DEXTests extends APIResource {
1313
* const dexTest =
1414
* await client.zeroTrust.devices.dexTests.create({
1515
* account_id: '01a7362d577a6c3019a474fd6f485823',
16-
* data: {},
16+
* data: {
17+
* host: 'https://dash.cloudflare.com',
18+
* kind: 'http',
19+
* },
1720
* enabled: true,
1821
* interval: '30m',
1922
* name: 'HTTP dash health check',
@@ -40,7 +43,10 @@ export class DEXTests extends APIResource {
4043
* 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415',
4144
* {
4245
* account_id: '01a7362d577a6c3019a474fd6f485823',
43-
* data: {},
46+
* data: {
47+
* host: 'https://dash.cloudflare.com',
48+
* kind: 'http',
49+
* },
4450
* enabled: true,
4551
* interval: '30m',
4652
* name: 'HTTP dash health check',
@@ -78,12 +84,12 @@ export class DEXTests extends APIResource {
7884
list(
7985
params: DEXTestListParams,
8086
options?: Core.RequestOptions,
81-
): Core.PagePromise<DEXTestListResponsesSinglePage, DEXTestListResponse> {
82-
const { account_id } = params;
87+
): Core.PagePromise<DEXTestListResponsesV4PagePaginationArray, DEXTestListResponse> {
88+
const { account_id, ...query } = params;
8389
return this._client.getAPIList(
8490
`/accounts/${account_id}/dex/devices/dex_tests`,
85-
DEXTestListResponsesSinglePage,
86-
options,
91+
DEXTestListResponsesV4PagePaginationArray,
92+
{ query, ...options },
8793
);
8894
}
8995

@@ -140,7 +146,7 @@ export class DEXTests extends APIResource {
140146
}
141147
}
142148

143-
export class DEXTestListResponsesSinglePage extends SinglePage<DEXTestListResponse> {}
149+
export class DEXTestListResponsesV4PagePaginationArray extends V4PagePaginationArray<DEXTestListResponse> {}
144150

145151
/**
146152
* The configuration object which contains the details for the WARP client to
@@ -271,24 +277,24 @@ export namespace DEXTestCreateResponse {
271277
/**
272278
* The desired endpoint to test.
273279
*/
274-
host?: string;
280+
host: string;
275281

276282
/**
277283
* The type of test.
278284
*/
279-
kind?: string;
285+
kind: 'http' | 'traceroute';
280286

281287
/**
282288
* The HTTP request method type.
283289
*/
284-
method?: string;
290+
method?: 'GET';
285291
}
286292

287293
export interface TargetPolicy {
288294
/**
289-
* The id of the DEX rule
295+
* API Resource UUID tag.
290296
*/
291-
id?: string;
297+
id: string;
292298

293299
/**
294300
* Whether the DEX rule is the account default
@@ -351,24 +357,24 @@ export namespace DEXTestUpdateResponse {
351357
/**
352358
* The desired endpoint to test.
353359
*/
354-
host?: string;
360+
host: string;
355361

356362
/**
357363
* The type of test.
358364
*/
359-
kind?: string;
365+
kind: 'http' | 'traceroute';
360366

361367
/**
362368
* The HTTP request method type.
363369
*/
364-
method?: string;
370+
method?: 'GET';
365371
}
366372

367373
export interface TargetPolicy {
368374
/**
369-
* The id of the DEX rule
375+
* API Resource UUID tag.
370376
*/
371-
id?: string;
377+
id: string;
372378

373379
/**
374380
* Whether the DEX rule is the account default
@@ -431,24 +437,24 @@ export namespace DEXTestListResponse {
431437
/**
432438
* The desired endpoint to test.
433439
*/
434-
host?: string;
440+
host: string;
435441

436442
/**
437443
* The type of test.
438444
*/
439-
kind?: string;
445+
kind: 'http' | 'traceroute';
440446

441447
/**
442448
* The HTTP request method type.
443449
*/
444-
method?: string;
450+
method?: 'GET';
445451
}
446452

447453
export interface TargetPolicy {
448454
/**
449-
* The id of the DEX rule
455+
* API Resource UUID tag.
450456
*/
451-
id?: string;
457+
id: string;
452458

453459
/**
454460
* Whether the DEX rule is the account default
@@ -516,24 +522,24 @@ export namespace DEXTestDeleteResponse {
516522
/**
517523
* The desired endpoint to test.
518524
*/
519-
host?: string;
525+
host: string;
520526

521527
/**
522528
* The type of test.
523529
*/
524-
kind?: string;
530+
kind: 'http' | 'traceroute';
525531

526532
/**
527533
* The HTTP request method type.
528534
*/
529-
method?: string;
535+
method?: 'GET';
530536
}
531537

532538
export interface TargetPolicy {
533539
/**
534-
* The id of the DEX rule
540+
* API Resource UUID tag.
535541
*/
536-
id?: string;
542+
id: string;
537543

538544
/**
539545
* Whether the DEX rule is the account default
@@ -597,24 +603,24 @@ export namespace DEXTestGetResponse {
597603
/**
598604
* The desired endpoint to test.
599605
*/
600-
host?: string;
606+
host: string;
601607

602608
/**
603609
* The type of test.
604610
*/
605-
kind?: string;
611+
kind: 'http' | 'traceroute';
606612

607613
/**
608614
* The HTTP request method type.
609615
*/
610-
method?: string;
616+
method?: 'GET';
611617
}
612618

613619
export interface TargetPolicy {
614620
/**
615-
* The id of the DEX rule
621+
* API Resource UUID tag.
616622
*/
617-
id?: string;
623+
id: string;
618624

619625
/**
620626
* Whether the DEX rule is the account default
@@ -680,24 +686,24 @@ export namespace DEXTestCreateParams {
680686
/**
681687
* The desired endpoint to test.
682688
*/
683-
host?: string;
689+
host: string;
684690

685691
/**
686692
* The type of test.
687693
*/
688-
kind?: string;
694+
kind: 'http' | 'traceroute';
689695

690696
/**
691697
* The HTTP request method type.
692698
*/
693-
method?: string;
699+
method?: 'GET';
694700
}
695701

696702
export interface TargetPolicy {
697703
/**
698-
* The id of the DEX rule
704+
* API Resource UUID tag.
699705
*/
700-
id?: string;
706+
id: string;
701707

702708
/**
703709
* Whether the DEX rule is the account default
@@ -763,24 +769,24 @@ export namespace DEXTestUpdateParams {
763769
/**
764770
* The desired endpoint to test.
765771
*/
766-
host?: string;
772+
host: string;
767773

768774
/**
769775
* The type of test.
770776
*/
771-
kind?: string;
777+
kind: 'http' | 'traceroute';
772778

773779
/**
774780
* The HTTP request method type.
775781
*/
776-
method?: string;
782+
method?: 'GET';
777783
}
778784

779785
export interface TargetPolicy {
780786
/**
781-
* The id of the DEX rule
787+
* API Resource UUID tag.
782788
*/
783-
id?: string;
789+
id: string;
784790

785791
/**
786792
* Whether the DEX rule is the account default
@@ -794,8 +800,21 @@ export namespace DEXTestUpdateParams {
794800
}
795801
}
796802

797-
export interface DEXTestListParams {
803+
export interface DEXTestListParams extends V4PagePaginationArrayParams {
804+
/**
805+
* Path param
806+
*/
798807
account_id: string;
808+
809+
/**
810+
* Query param: Filter by test type
811+
*/
812+
kind?: 'http' | 'traceroute';
813+
814+
/**
815+
* Query param: Filter by test name
816+
*/
817+
testName?: string;
799818
}
800819

801820
export interface DEXTestDeleteParams {
@@ -806,7 +825,7 @@ export interface DEXTestGetParams {
806825
account_id: string;
807826
}
808827

809-
DEXTests.DEXTestListResponsesSinglePage = DEXTestListResponsesSinglePage;
828+
DEXTests.DEXTestListResponsesV4PagePaginationArray = DEXTestListResponsesV4PagePaginationArray;
810829

811830
export declare namespace DEXTests {
812831
export {
@@ -817,7 +836,7 @@ export declare namespace DEXTests {
817836
type DEXTestListResponse as DEXTestListResponse,
818837
type DEXTestDeleteResponse as DEXTestDeleteResponse,
819838
type DEXTestGetResponse as DEXTestGetResponse,
820-
DEXTestListResponsesSinglePage as DEXTestListResponsesSinglePage,
839+
DEXTestListResponsesV4PagePaginationArray as DEXTestListResponsesV4PagePaginationArray,
821840
type DEXTestCreateParams as DEXTestCreateParams,
822841
type DEXTestUpdateParams as DEXTestUpdateParams,
823842
type DEXTestListParams as DEXTestListParams,

‎src/resources/zero-trust/devices/index.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
export {
4-
DEXTestListResponsesSinglePage,
4+
DEXTestListResponsesV4PagePaginationArray,
55
DEXTests,
66
type SchemaData,
77
type SchemaHTTP,

‎src/resources/zero-trust/dex/colos.ts‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,22 @@ export class Colos extends APIResource {
3838

3939
export class ColoListResponsesSinglePage extends SinglePage<ColoListResponse> {}
4040

41-
export type ColoListResponse = unknown;
41+
export interface ColoListResponse {
42+
/**
43+
* Airport code
44+
*/
45+
airportCode: string;
46+
47+
/**
48+
* City
49+
*/
50+
city: string;
51+
52+
/**
53+
* Country code
54+
*/
55+
countryCode: string;
56+
}
4257

4358
export interface ColoListParams {
4459
/**

0 commit comments

Comments
 (0)