Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#703)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed May 31, 2024
1 parent 4091c65 commit 2ff4dd3
Show file tree
Hide file tree
Showing 14 changed files with 72 additions and 78 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1321
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7080386fb1d04dafc80523803a44e41bab56e2907c13694ced938d02a3abb9d5.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a18a8d7f1f80a39beb83a6541eb29dea4a69df37444aeb85493c94256c11d3a6.yml
8 changes: 4 additions & 4 deletions src/resources/zero-trust/dex/colos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ export interface ColoListParams {
account_id: string;

/**
* Query param: Start time for connection period in RFC3339 (ISO 8601) format.
* Query param: End time for connection period in RFC3339 (ISO 8601) format.
*/
from: string;
timeEnd: string;

/**
* Query param: End time for connection period in RFC3339 (ISO 8601) format.
* Query param: Start time for connection period in RFC3339 (ISO 8601) format.
*/
to: string;
timeStart: string;

/**
* Query param: Type of usage that colos should be sorted by. If unspecified,
Expand Down
13 changes: 2 additions & 11 deletions src/resources/zero-trust/dex/fleet-status/devices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,21 +70,12 @@ export interface DeviceListParams extends V4PagePaginationArrayParams {
/**
* Query param: Timestamp in ISO format
*/
from: string;

/**
* Query param: Source:
*
* - `hourly` - device details aggregated hourly, up to 7 days prior
* - `last_seen` - device details, up to 24 hours prior
* - `raw` - device details, up to 7 days prior
*/
source: 'last_seen' | 'hourly' | 'raw';
time_end: string;

/**
* Query param: Timestamp in ISO format
*/
to: string;
time_start: string;

/**
* Query param: Cloudflare colo
Expand Down
4 changes: 2 additions & 2 deletions src/resources/zero-trust/dex/fleet-status/fleet-status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ export interface FleetStatusOverTimeParams {
/**
* Query param: Timestamp in ISO format
*/
from: string;
time_end: string;

/**
* Query param: Timestamp in ISO format
*/
to: string;
time_start: string;

/**
* Query param: Cloudflare colo
Expand Down
12 changes: 6 additions & 6 deletions src/resources/zero-trust/dex/http-tests/http-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,6 @@ export interface HTTPTestGetParams {
*/
account_id: string;

/**
* Query param: Start time for aggregate metrics in ISO ms
*/
from: string;

/**
* Query param: Time interval for aggregate time slots.
*/
Expand All @@ -199,7 +194,12 @@ export interface HTTPTestGetParams {
/**
* Query param: End time for aggregate metrics in ISO ms
*/
to: string;
timeEnd: string;

/**
* Query param: Start time for aggregate metrics in ISO ms
*/
timeStart: string;

/**
* Query param: Optionally filter result stats to a Cloudflare colo. Cannot be used
Expand Down
8 changes: 4 additions & 4 deletions src/resources/zero-trust/dex/http-tests/percentiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ export interface PercentileGetParams {
account_id: string;

/**
* Query param: Start time for aggregate metrics in ISO format
* Query param: End time for aggregate metrics in ISO format
*/
from: string;
timeEnd: string;

/**
* Query param: End time for aggregate metrics in ISO format
* Query param: Start time for aggregate metrics in ISO format
*/
to: string;
timeStart: string;

/**
* Query param: Optionally filter result stats to a Cloudflare colo. Cannot be used
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ export interface NetworkPathGetResponse {
*/
resultId: string;

/**
* date time of this traceroute test
*/
time_start: string;

/**
* name of the device associated with this network path response
*/
Expand Down
32 changes: 16 additions & 16 deletions src/resources/zero-trust/dex/traceroute-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,6 @@ export interface TracerouteTestGetParams {
*/
account_id: string;

/**
* Query param: Start time for aggregate metrics in ISO ms
*/
from: string;

/**
* Query param: Time interval for aggregate time slots.
*/
Expand All @@ -261,7 +256,12 @@ export interface TracerouteTestGetParams {
/**
* Query param: End time for aggregate metrics in ISO ms
*/
to: string;
timeEnd: string;

/**
* Query param: Start time for aggregate metrics in ISO ms
*/
timeStart: string;

/**
* Query param: Optionally filter result stats to a Cloudflare colo. Cannot be used
Expand All @@ -287,11 +287,6 @@ export interface TracerouteTestNetworkPathParams {
*/
deviceId: string;

/**
* Query param: Start time for aggregate metrics in ISO ms
*/
from: string;

/**
* Query param: Time interval for aggregate time slots.
*/
Expand All @@ -300,7 +295,12 @@ export interface TracerouteTestNetworkPathParams {
/**
* Query param: End time for aggregate metrics in ISO ms
*/
to: string;
timeEnd: string;

/**
* Query param: Start time for aggregate metrics in ISO ms
*/
timeStart: string;
}

export interface TracerouteTestPercentilesParams {
Expand All @@ -310,14 +310,14 @@ export interface TracerouteTestPercentilesParams {
account_id: string;

/**
* Query param: Start time for aggregate metrics in ISO format
* Query param: End time for aggregate metrics in ISO format
*/
from: string;
timeEnd: string;

/**
* Query param: End time for aggregate metrics in ISO format
* Query param: Start time for aggregate metrics in ISO format
*/
to: string;
timeStart: string;

/**
* Query param: Optionally filter result stats to a Cloudflare colo. Cannot be used
Expand Down
8 changes: 4 additions & 4 deletions tests/api-resources/zero-trust/dex/colos.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ describe('resource colos', () => {
test('list: only required params', async () => {
const responsePromise = cloudflare.zeroTrust.dex.colos.list({
account_id: '01a7362d577a6c3019a474fd6f485823',
from: '2023-08-20T20:45:00Z',
to: '2023-08-24T20:45:00Z',
timeEnd: '2023-08-24T20:45:00Z',
timeStart: '2023-08-20T20:45:00Z',
});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
Expand All @@ -28,8 +28,8 @@ describe('resource colos', () => {
test('list: required and optional params', async () => {
const response = await cloudflare.zeroTrust.dex.colos.list({
account_id: '01a7362d577a6c3019a474fd6f485823',
from: '2023-08-20T20:45:00Z',
to: '2023-08-24T20:45:00Z',
timeEnd: '2023-08-24T20:45:00Z',
timeStart: '2023-08-20T20:45:00Z',
sortBy: 'fleet-status-usage',
});
});
Expand Down
10 changes: 4 additions & 6 deletions tests/api-resources/zero-trust/dex/fleet-status/devices.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ describe('resource devices', () => {
test.skip('list: only required params', async () => {
const responsePromise = cloudflare.zeroTrust.dex.fleetStatus.devices.list({
account_id: '01a7362d577a6c3019a474fd6f485823',
from: '2023-10-11T00:00:00Z',
page: 1,
per_page: 10,
source: 'last_seen',
to: '2023-10-11T00:00:00Z',
time_end: '2023-10-11T00:00:00Z',
time_start: '2023-10-11T00:00:00Z',
});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
Expand All @@ -33,11 +32,10 @@ describe('resource devices', () => {
test.skip('list: required and optional params', async () => {
const response = await cloudflare.zeroTrust.dex.fleetStatus.devices.list({
account_id: '01a7362d577a6c3019a474fd6f485823',
from: '2023-10-11T00:00:00Z',
page: 1,
per_page: 10,
source: 'last_seen',
to: '2023-10-11T00:00:00Z',
time_end: '2023-10-11T00:00:00Z',
time_start: '2023-10-11T00:00:00Z',
colo: 'SJC',
device_id: 'cb49c27f-7f97-49c5-b6f3-f7c01ead0fd7',
mode: 'proxy',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ describe('resource fleetStatus', () => {
test('overTime: only required params', async () => {
const responsePromise = cloudflare.zeroTrust.dex.fleetStatus.overTime({
account_id: '01a7362d577a6c3019a474fd6f485823',
from: '2023-10-11T00:00:00Z',
to: '2023-10-11T00:00:00Z',
time_end: '2023-10-11T00:00:00Z',
time_start: '2023-10-11T00:00:00Z',
});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
Expand All @@ -49,8 +49,8 @@ describe('resource fleetStatus', () => {
test('overTime: required and optional params', async () => {
const response = await cloudflare.zeroTrust.dex.fleetStatus.overTime({
account_id: '01a7362d577a6c3019a474fd6f485823',
from: '2023-10-11T00:00:00Z',
to: '2023-10-11T00:00:00Z',
time_end: '2023-10-11T00:00:00Z',
time_start: '2023-10-11T00:00:00Z',
colo: 'SJC',
device_id: 'cb49c27f-7f97-49c5-b6f3-f7c01ead0fd7',
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ describe('resource httpTests', () => {
test('get: only required params', async () => {
const responsePromise = cloudflare.zeroTrust.dex.httpTests.get('f174e90a-fafe-4643-bbbc-4a0ed4fc8415', {
account_id: '01a7362d577a6c3019a474fd6f485823',
from: '1689520412000',
interval: 'minute',
to: '1689606812000',
timeEnd: '1689606812000',
timeStart: '1689520412000',
});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
Expand All @@ -29,9 +29,9 @@ describe('resource httpTests', () => {
test('get: required and optional params', async () => {
const response = await cloudflare.zeroTrust.dex.httpTests.get('f174e90a-fafe-4643-bbbc-4a0ed4fc8415', {
account_id: '01a7362d577a6c3019a474fd6f485823',
from: '1689520412000',
interval: 'minute',
to: '1689606812000',
timeEnd: '1689606812000',
timeStart: '1689520412000',
colo: 'string',
deviceId: ['string', 'string', 'string'],
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ describe('resource percentiles', () => {
'f174e90a-fafe-4643-bbbc-4a0ed4fc8415',
{
account_id: '01a7362d577a6c3019a474fd6f485823',
from: '2023-09-20T17:00:00Z',
to: '2023-09-20T17:00:00Z',
timeEnd: '2023-09-20T17:00:00Z',
timeStart: '2023-09-20T17:00:00Z',
},
);
const rawResponse = await responsePromise.asResponse();
Expand All @@ -33,8 +33,8 @@ describe('resource percentiles', () => {
'f174e90a-fafe-4643-bbbc-4a0ed4fc8415',
{
account_id: '01a7362d577a6c3019a474fd6f485823',
from: '2023-09-20T17:00:00Z',
to: '2023-09-20T17:00:00Z',
timeEnd: '2023-09-20T17:00:00Z',
timeStart: '2023-09-20T17:00:00Z',
colo: 'string',
deviceId: ['string', 'string', 'string'],
},
Expand Down
24 changes: 12 additions & 12 deletions tests/api-resources/zero-trust/dex/traceroute-tests.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ describe('resource tracerouteTests', () => {
'f174e90a-fafe-4643-bbbc-4a0ed4fc8415',
{
account_id: '01a7362d577a6c3019a474fd6f485823',
from: '1689520412000',
interval: 'minute',
to: '1689606812000',
timeEnd: '1689606812000',
timeStart: '1689520412000',
},
);
const rawResponse = await responsePromise.asResponse();
Expand All @@ -34,9 +34,9 @@ describe('resource tracerouteTests', () => {
'f174e90a-fafe-4643-bbbc-4a0ed4fc8415',
{
account_id: '01a7362d577a6c3019a474fd6f485823',
from: '1689520412000',
interval: 'minute',
to: '1689606812000',
timeEnd: '1689606812000',
timeStart: '1689520412000',
colo: 'string',
deviceId: ['string', 'string', 'string'],
},
Expand All @@ -49,9 +49,9 @@ describe('resource tracerouteTests', () => {
{
account_id: '01a7362d577a6c3019a474fd6f485823',
deviceId: 'string',
from: '1689520412000',
interval: 'minute',
to: '1689606812000',
timeEnd: '1689606812000',
timeStart: '1689520412000',
},
);
const rawResponse = await responsePromise.asResponse();
Expand All @@ -69,9 +69,9 @@ describe('resource tracerouteTests', () => {
{
account_id: '01a7362d577a6c3019a474fd6f485823',
deviceId: 'string',
from: '1689520412000',
interval: 'minute',
to: '1689606812000',
timeEnd: '1689606812000',
timeStart: '1689520412000',
},
);
});
Expand All @@ -81,8 +81,8 @@ describe('resource tracerouteTests', () => {
'f174e90a-fafe-4643-bbbc-4a0ed4fc8415',
{
account_id: '01a7362d577a6c3019a474fd6f485823',
from: '2023-09-20T17:00:00Z',
to: '2023-09-20T17:00:00Z',
timeEnd: '2023-09-20T17:00:00Z',
timeStart: '2023-09-20T17:00:00Z',
},
);
const rawResponse = await responsePromise.asResponse();
Expand All @@ -99,8 +99,8 @@ describe('resource tracerouteTests', () => {
'f174e90a-fafe-4643-bbbc-4a0ed4fc8415',
{
account_id: '01a7362d577a6c3019a474fd6f485823',
from: '2023-09-20T17:00:00Z',
to: '2023-09-20T17:00:00Z',
timeEnd: '2023-09-20T17:00:00Z',
timeStart: '2023-09-20T17:00:00Z',
colo: 'string',
deviceId: ['string', 'string', 'string'],
},
Expand Down

0 comments on commit 2ff4dd3

Please sign in to comment.