Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#483)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed May 7, 2024
1 parent 5c55bee commit b27aa06
Show file tree
Hide file tree
Showing 15 changed files with 62 additions and 54 deletions.
6 changes: 5 additions & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Types:

- <code><a href="./src/resources/shared.ts">ASN</a></code>
- <code><a href="./src/resources/shared.ts">AuditLog</a></code>
- <code><a href="./src/resources/shared.ts">CertificatePackRequestType</a></code>
- <code><a href="./src/resources/shared.ts">CloudflareTunnel</a></code>
- <code><a href="./src/resources/shared.ts">ErrorData</a></code>
- <code><a href="./src/resources/shared.ts">Identifier</a></code>
Expand Down Expand Up @@ -1096,7 +1097,6 @@ Types:

- <code><a href="./src/resources/ssl/certificate-packs/certificate-packs.ts">CertificateAuthority</a></code>
- <code><a href="./src/resources/ssl/certificate-packs/certificate-packs.ts">Host</a></code>
- <code><a href="./src/resources/ssl/certificate-packs/certificate-packs.ts">RequestType</a></code>
- <code><a href="./src/resources/ssl/certificate-packs/certificate-packs.ts">RequestValidity</a></code>
- <code><a href="./src/resources/ssl/certificate-packs/certificate-packs.ts">Status</a></code>
- <code><a href="./src/resources/ssl/certificate-packs/certificate-packs.ts">ValidationMethod</a></code>
Expand Down Expand Up @@ -1455,6 +1455,10 @@ Methods:

### Analytics

Types:

- <code><a href="./src/resources/dns/firewall/analytics/analytics.ts">Delta</a></code>

#### Reports

Methods:
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,7 @@ export namespace Cloudflare {

export import ASN = API.ASN;
export import AuditLog = API.AuditLog;
export import CertificatePackRequestType = API.CertificatePackRequestType;
export import CloudflareTunnel = API.CloudflareTunnel;
export import ErrorData = API.ErrorData;
export import Identifier = API.Identifier;
Expand Down
13 changes: 2 additions & 11 deletions src/resources/dns/analytics/reports/bytimes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import * as BytimesAPI from 'cloudflare/resources/dns/analytics/reports/bytimes';
import * as DNSAPI from 'cloudflare/resources/dns/dns';
import * as AnalyticsAPI from 'cloudflare/resources/dns/firewall/analytics/analytics';

export class Bytimes extends APIResource {
/**
Expand Down Expand Up @@ -124,17 +125,7 @@ export interface BytimeGetParams {
/**
* Query param: Unit of time to group data by.
*/
time_delta?:
| 'all'
| 'auto'
| 'year'
| 'quarter'
| 'month'
| 'week'
| 'day'
| 'hour'
| 'dekaminute'
| 'minute';
time_delta?: AnalyticsAPI.DeltaParam;

/**
* Query param: End date and time of requesting data period in ISO 8601 format.
Expand Down
13 changes: 2 additions & 11 deletions src/resources/dns/dns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { APIResource } from 'cloudflare/resource';
import * as RecordsAPI from 'cloudflare/resources/dns/records';
import * as AnalyticsAPI from 'cloudflare/resources/dns/analytics/analytics';
import * as FirewallAPI from 'cloudflare/resources/dns/firewall/firewall';
import * as AnalyticsAnalyticsAPI from 'cloudflare/resources/dns/firewall/analytics/analytics';

export class DNS extends APIResource {
records: RecordsAPI.Records = new RecordsAPI.Records(this._client);
Expand Down Expand Up @@ -40,17 +41,7 @@ export interface DNSAnalyticsQuery {
/**
* Unit of time to group data by.
*/
time_delta:
| 'all'
| 'auto'
| 'year'
| 'quarter'
| 'month'
| 'week'
| 'day'
| 'hour'
| 'dekaminute'
| 'minute';
time_delta: AnalyticsAnalyticsAPI.Delta;

/**
* End date and time of requesting data period in ISO 8601 format.
Expand Down
32 changes: 32 additions & 0 deletions src/resources/dns/firewall/analytics/analytics.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,45 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import { APIResource } from 'cloudflare/resource';
import * as AnalyticsAPI from 'cloudflare/resources/dns/firewall/analytics/analytics';
import * as ReportsAPI from 'cloudflare/resources/dns/firewall/analytics/reports/reports';

export class Analytics extends APIResource {
reports: ReportsAPI.Reports = new ReportsAPI.Reports(this._client);
}

/**
* Unit of time to group data by.
*/
export type Delta =
| 'all'
| 'auto'
| 'year'
| 'quarter'
| 'month'
| 'week'
| 'day'
| 'hour'
| 'dekaminute'
| 'minute';

/**
* Unit of time to group data by.
*/
export type DeltaParam =
| 'all'
| 'auto'
| 'year'
| 'quarter'
| 'month'
| 'week'
| 'day'
| 'hour'
| 'dekaminute'
| 'minute';

export namespace Analytics {
export import Delta = AnalyticsAPI.Delta;
export import Reports = ReportsAPI.Reports;
export import ReportGetParams = ReportsAPI.ReportGetParams;
}
2 changes: 1 addition & 1 deletion src/resources/dns/firewall/analytics/index.ts
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 { Delta, Analytics } from './analytics';
export { ReportGetParams, Reports } from './reports/index';
13 changes: 2 additions & 11 deletions src/resources/dns/firewall/analytics/reports/bytimes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import * as ReportsBytimesAPI from 'cloudflare/resources/dns/firewall/analytics/reports/bytimes';
import * as BytimesAPI from 'cloudflare/resources/dns/analytics/reports/bytimes';
import * as AnalyticsAPI from 'cloudflare/resources/dns/firewall/analytics/analytics';

export class Bytimes extends APIResource {
/**
Expand Down Expand Up @@ -68,17 +69,7 @@ export interface BytimeGetParams {
/**
* Query param: Unit of time to group data by.
*/
time_delta?:
| 'all'
| 'auto'
| 'year'
| 'quarter'
| 'month'
| 'week'
| 'day'
| 'hour'
| 'dekaminute'
| 'minute';
time_delta?: AnalyticsAPI.DeltaParam;

/**
* Query param: End date and time of requesting data period in ISO 8601 format.
Expand Down
1 change: 1 addition & 0 deletions src/resources/dns/firewall/firewall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,4 +369,5 @@ export namespace FirewallResource {
export import FirewallEditParams = FirewallAPI.FirewallEditParams;
export import FirewallGetParams = FirewallAPI.FirewallGetParams;
export import Analytics = AnalyticsAPI.Analytics;
export import Delta = AnalyticsAPI.Delta;
}
2 changes: 1 addition & 1 deletion src/resources/dns/firewall/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

export { Analytics } from './analytics/index';
export {
AttackMitigation,
Firewall,
Expand All @@ -15,3 +14,4 @@ export {
FirewallsV4PagePaginationArray,
FirewallResource,
} from './firewall';
export { Delta, Analytics } from './analytics/index';
5 changes: 3 additions & 2 deletions src/resources/origin-ca-certificates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import { isRequestOptions } from 'cloudflare/core';
import * as Shared from 'cloudflare/resources/shared';
import * as CertificatePacksAPI from 'cloudflare/resources/ssl/certificate-packs/certificate-packs';
import { SinglePage } from 'cloudflare/pagination';

Expand Down Expand Up @@ -90,7 +91,7 @@ export interface OriginCACertificate {
* Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa),
* or "keyless-certificate" (for Keyless SSL servers).
*/
request_type: CertificatePacksAPI.RequestType;
request_type: Shared.CertificatePackRequestType;

/**
* The number of days for which the certificate should be valid.
Expand Down Expand Up @@ -140,7 +141,7 @@ export interface OriginCACertificateCreateParams {
* Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa),
* or "keyless-certificate" (for Keyless SSL servers).
*/
request_type?: CertificatePacksAPI.RequestTypeParam;
request_type?: Shared.CertificatePackRequestTypeParam;

/**
* The number of days for which the certificate should be valid.
Expand Down
12 changes: 12 additions & 0 deletions src/resources/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,18 @@ export namespace AuditLog {
}
}

/**
* Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa),
* or "keyless-certificate" (for Keyless SSL servers).
*/
export type CertificatePackRequestType = 'origin-rsa' | 'origin-ecc' | 'keyless-certificate';

/**
* Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa),
* or "keyless-certificate" (for Keyless SSL servers).
*/
export type CertificatePackRequestTypeParam = 'origin-rsa' | 'origin-ecc' | 'keyless-certificate';

/**
* A Cloudflare Tunnel that connects your origin to Cloudflare's edge.
*/
Expand Down
13 changes: 0 additions & 13 deletions src/resources/ssl/certificate-packs/certificate-packs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,6 @@ export type Host = string;

export type HostParam = string;

/**
* Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa),
* or "keyless-certificate" (for Keyless SSL servers).
*/
export type RequestType = 'origin-rsa' | 'origin-ecc' | 'keyless-certificate';

/**
* Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa),
* or "keyless-certificate" (for Keyless SSL servers).
*/
export type RequestTypeParam = 'origin-rsa' | 'origin-ecc' | 'keyless-certificate';

/**
* The number of days for which the certificate should be valid.
*/
Expand Down Expand Up @@ -247,7 +235,6 @@ export interface CertificatePackGetParams {
export namespace CertificatePacks {
export import CertificateAuthority = CertificatePacksAPI.CertificateAuthority;
export import Host = CertificatePacksAPI.Host;
export import RequestType = CertificatePacksAPI.RequestType;
export import RequestValidity = CertificatePacksAPI.RequestValidity;
export import Status = CertificatePacksAPI.Status;
export import ValidationMethod = CertificatePacksAPI.ValidationMethod;
Expand Down
1 change: 0 additions & 1 deletion src/resources/ssl/certificate-packs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
export {
CertificateAuthority,
Host,
RequestType,
RequestValidity,
Status,
ValidationMethod,
Expand Down
1 change: 0 additions & 1 deletion src/resources/ssl/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ export { AnalyzeCreateResponse, AnalyzeCreateParams, Analyze } from './analyze';
export {
CertificateAuthority,
Host,
RequestType,
RequestValidity,
Status,
ValidationMethod,
Expand Down
1 change: 0 additions & 1 deletion src/resources/ssl/ssl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export namespace SSL {
export import CertificatePacks = CertificatePacksAPI.CertificatePacks;
export import CertificateAuthority = CertificatePacksAPI.CertificateAuthority;
export import Host = CertificatePacksAPI.Host;
export import RequestType = CertificatePacksAPI.RequestType;
export import RequestValidity = CertificatePacksAPI.RequestValidity;
export import Status = CertificatePacksAPI.Status;
export import ValidationMethod = CertificatePacksAPI.ValidationMethod;
Expand Down

0 comments on commit b27aa06

Please sign in to comment.