-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(api): OpenAPI spec update via Stainless API (#172)
- Loading branch information
1 parent
740acc2
commit e9b9a00
Showing
16 changed files
with
9 additions
and
809 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
configured_endpoints: 1288 | ||
configured_endpoints: 1284 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
|
||
export { Analytics } from './analytics'; | ||
export { DNSDNSAnalyticsAPIReport, ReportGetParams, Reports } from './reports/index'; | ||
export { Reports } from './reports/index'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,208 +1,5 @@ | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
|
||
import * as Core from 'cloudflare/core'; | ||
import { APIResource } from 'cloudflare/resource'; | ||
import { isRequestOptions } from 'cloudflare/core'; | ||
import * as BytimesAPI from 'cloudflare/resources/dns/analytics/reports/bytimes'; | ||
|
||
export class Bytimes extends APIResource { | ||
/** | ||
* Retrieves a list of aggregate metrics grouped by time interval. | ||
* | ||
* See | ||
* [Analytics API properties](https://developers.cloudflare.com/dns/reference/analytics-api-properties/) | ||
* for detailed information about the available query parameters. | ||
*/ | ||
get( | ||
identifier: string, | ||
query?: BytimeGetParams, | ||
options?: Core.RequestOptions, | ||
): Core.APIPromise<DNSDNSAnalyticsAPIReportBytime>; | ||
get(identifier: string, options?: Core.RequestOptions): Core.APIPromise<DNSDNSAnalyticsAPIReportBytime>; | ||
get( | ||
identifier: string, | ||
query: BytimeGetParams | Core.RequestOptions = {}, | ||
options?: Core.RequestOptions, | ||
): Core.APIPromise<DNSDNSAnalyticsAPIReportBytime> { | ||
if (isRequestOptions(query)) { | ||
return this.get(identifier, {}, query); | ||
} | ||
return ( | ||
this._client.get(`/zones/${identifier}/dns_analytics/report/bytime`, { | ||
query, | ||
...options, | ||
}) as Core.APIPromise<{ result: DNSDNSAnalyticsAPIReportBytime }> | ||
)._thenUnwrap((obj) => obj.result); | ||
} | ||
} | ||
|
||
export interface DNSDNSAnalyticsAPIReportBytime { | ||
/** | ||
* Array with one row per combination of dimension values. | ||
*/ | ||
data: Array<DNSDNSAnalyticsAPIReportBytime.Data>; | ||
|
||
/** | ||
* Number of seconds between current time and last processed event, in another | ||
* words how many seconds of data could be missing. | ||
*/ | ||
data_lag: number; | ||
|
||
/** | ||
* Maximum results for each metric (object mapping metric names to values). | ||
* Currently always an empty object. | ||
*/ | ||
max: unknown; | ||
|
||
/** | ||
* Minimum results for each metric (object mapping metric names to values). | ||
* Currently always an empty object. | ||
*/ | ||
min: unknown; | ||
|
||
query: DNSDNSAnalyticsAPIReportBytime.Query; | ||
|
||
/** | ||
* Total number of rows in the result. | ||
*/ | ||
rows: number; | ||
|
||
/** | ||
* Array of time intervals in the response data. Each interval is represented as an | ||
* array containing two values: the start time, and the end time. | ||
*/ | ||
time_intervals: Array<Array<string>>; | ||
|
||
/** | ||
* Total results for metrics across all data (object mapping metric names to | ||
* values). | ||
*/ | ||
totals: unknown; | ||
} | ||
|
||
export namespace DNSDNSAnalyticsAPIReportBytime { | ||
export interface Data { | ||
/** | ||
* Array of dimension values, representing the combination of dimension values | ||
* corresponding to this row. | ||
*/ | ||
dimensions: Array<string>; | ||
|
||
/** | ||
* Array with one item per requested metric. Each item is an array of values, | ||
* broken down by time interval. | ||
*/ | ||
metrics: Array<Array<unknown>>; | ||
} | ||
|
||
export interface Query { | ||
/** | ||
* Array of dimension names. | ||
*/ | ||
dimensions: Array<string>; | ||
|
||
/** | ||
* Limit number of returned metrics. | ||
*/ | ||
limit: number; | ||
|
||
/** | ||
* Array of metric names. | ||
*/ | ||
metrics: Array<string>; | ||
|
||
/** | ||
* Start date and time of requesting data period in ISO 8601 format. | ||
*/ | ||
since: string; | ||
|
||
/** | ||
* Unit of time to group data by. | ||
*/ | ||
time_delta: | ||
| 'all' | ||
| 'auto' | ||
| 'year' | ||
| 'quarter' | ||
| 'month' | ||
| 'week' | ||
| 'day' | ||
| 'hour' | ||
| 'dekaminute' | ||
| 'minute'; | ||
|
||
/** | ||
* End date and time of requesting data period in ISO 8601 format. | ||
*/ | ||
until: string; | ||
|
||
/** | ||
* Segmentation filter in 'attribute operator value' format. | ||
*/ | ||
filters?: string; | ||
|
||
/** | ||
* Array of dimensions to sort by, where each dimension may be prefixed by - | ||
* (descending) or + (ascending). | ||
*/ | ||
sort?: Array<string>; | ||
} | ||
} | ||
|
||
export interface BytimeGetParams { | ||
/** | ||
* A comma-separated list of dimensions to group results by. | ||
*/ | ||
dimensions?: string; | ||
|
||
/** | ||
* Segmentation filter in 'attribute operator value' format. | ||
*/ | ||
filters?: string; | ||
|
||
/** | ||
* Limit number of returned metrics. | ||
*/ | ||
limit?: number; | ||
|
||
/** | ||
* A comma-separated list of metrics to query. | ||
*/ | ||
metrics?: string; | ||
|
||
/** | ||
* Start date and time of requesting data period in ISO 8601 format. | ||
*/ | ||
since?: string; | ||
|
||
/** | ||
* A comma-separated list of dimensions to sort by, where each dimension may be | ||
* prefixed by - (descending) or + (ascending). | ||
*/ | ||
sort?: string; | ||
|
||
/** | ||
* Unit of time to group data by. | ||
*/ | ||
time_delta?: | ||
| 'all' | ||
| 'auto' | ||
| 'year' | ||
| 'quarter' | ||
| 'month' | ||
| 'week' | ||
| 'day' | ||
| 'hour' | ||
| 'dekaminute' | ||
| 'minute'; | ||
|
||
/** | ||
* End date and time of requesting data period in ISO 8601 format. | ||
*/ | ||
until?: string; | ||
} | ||
|
||
export namespace Bytimes { | ||
export import DNSDNSAnalyticsAPIReportBytime = BytimesAPI.DNSDNSAnalyticsAPIReportBytime; | ||
export import BytimeGetParams = BytimesAPI.BytimeGetParams; | ||
} | ||
export class Bytimes extends APIResource {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
|
||
export { DNSDNSAnalyticsAPIReport, ReportGetParams, Reports } from './reports'; | ||
export { DNSDNSAnalyticsAPIReportBytime, BytimeGetParams, Bytimes } from './bytimes'; | ||
export { Bytimes } from './bytimes'; | ||
export { Reports } from './reports'; |
Oops, something went wrong.