Skip to content

Commit

Permalink
feat(zone_settings): update origin_max_http_version model (#2280)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and meorphis committed Jan 13, 2025
1 parent 5aae807 commit f781ef8
Show file tree
Hide file tree
Showing 31 changed files with 164 additions and 974 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: 1490
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ed8629c4fef78e6fd8669578fc4d3904f20620a1ea39a40d5d2b4adbc4ecad6d.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8e6b8b43d1ad4a62c082c07be4cdb37ded52a2974b972ea6fb8872be689c65d5.yml
21 changes: 6 additions & 15 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1532,12 +1532,11 @@ Methods:

Types:

- <code><a href="./src/resources/firewall/waf/packages/packages.ts">PackageListResponse</a></code>
- <code><a href="./src/resources/firewall/waf/packages/packages.ts">PackageGetResponse</a></code>

Methods:

- <code title="get /zones/{zone_id}/firewall/waf/packages">client.firewall.waf.packages.<a href="./src/resources/firewall/waf/packages/packages.ts">list</a>({ ...params }) -> PackageListResponsesV4PagePaginationArray</code>
- <code title="get /zones/{zone_id}/firewall/waf/packages">client.firewall.waf.packages.<a href="./src/resources/firewall/waf/packages/packages.ts">list</a>({ ...params }) -> OriginMaxHTTPVersionsV4PagePaginationArray</code>
- <code title="get /zones/{zone_id}/firewall/waf/packages/{package_id}">client.firewall.waf.packages.<a href="./src/resources/firewall/waf/packages/packages.ts">get</a>(packageId, { ...params }) -> PackageGetResponse</code>

#### Groups
Expand Down Expand Up @@ -7077,12 +7076,11 @@ Methods:

Types:

- <code><a href="./src/resources/iam/permission-groups.ts">PermissionGroupListResponse</a></code>
- <code><a href="./src/resources/iam/permission-groups.ts">PermissionGroupGetResponse</a></code>

Methods:

- <code title="get /accounts/{account_id}/iam/permission_groups">client.iam.permissionGroups.<a href="./src/resources/iam/permission-groups.ts">list</a>({ ...params }) -> PermissionGroupListResponsesV4PagePaginationArray</code>
- <code title="get /accounts/{account_id}/iam/permission_groups">client.iam.permissionGroups.<a href="./src/resources/iam/permission-groups.ts">list</a>({ ...params }) -> OriginMaxHTTPVersionsV4PagePaginationArray</code>
- <code title="get /accounts/{account_id}/iam/permission_groups/{permission_group_id}">client.iam.permissionGroups.<a href="./src/resources/iam/permission-groups.ts">get</a>(permissionGroupId, { ...params }) -> PermissionGroupGetResponse</code>

## ResourceGroups
Expand All @@ -7091,15 +7089,14 @@ Types:

- <code><a href="./src/resources/iam/resource-groups.ts">ResourceGroupCreateResponse</a></code>
- <code><a href="./src/resources/iam/resource-groups.ts">ResourceGroupUpdateResponse</a></code>
- <code><a href="./src/resources/iam/resource-groups.ts">ResourceGroupListResponse</a></code>
- <code><a href="./src/resources/iam/resource-groups.ts">ResourceGroupDeleteResponse</a></code>
- <code><a href="./src/resources/iam/resource-groups.ts">ResourceGroupGetResponse</a></code>

Methods:

- <code title="post /accounts/{account_id}/iam/resource_groups">client.iam.resourceGroups.<a href="./src/resources/iam/resource-groups.ts">create</a>({ ...params }) -> ResourceGroupCreateResponse</code>
- <code title="put /accounts/{account_id}/iam/resource_groups/{resource_group_id}">client.iam.resourceGroups.<a href="./src/resources/iam/resource-groups.ts">update</a>(resourceGroupId, { ...params }) -> ResourceGroupUpdateResponse</code>
- <code title="get /accounts/{account_id}/iam/resource_groups">client.iam.resourceGroups.<a href="./src/resources/iam/resource-groups.ts">list</a>({ ...params }) -> ResourceGroupListResponsesV4PagePaginationArray</code>
- <code title="get /accounts/{account_id}/iam/resource_groups">client.iam.resourceGroups.<a href="./src/resources/iam/resource-groups.ts">list</a>({ ...params }) -> OriginMaxHTTPVersionsV4PagePaginationArray</code>
- <code title="delete /accounts/{account_id}/iam/resource_groups/{resource_group_id}">client.iam.resourceGroups.<a href="./src/resources/iam/resource-groups.ts">delete</a>(resourceGroupId, { ...params }) -> ResourceGroupDeleteResponse | null</code>
- <code title="get /accounts/{account_id}/iam/resource_groups/{resource_group_id}">client.iam.resourceGroups.<a href="./src/resources/iam/resource-groups.ts">get</a>(resourceGroupId, { ...params }) -> ResourceGroupGetResponse</code>

Expand Down Expand Up @@ -7280,26 +7277,20 @@ Types:
- <code><a href="./src/resources/leaked-credential-checks/detections.ts">DetectionCreateResponse</a></code>
- <code><a href="./src/resources/leaked-credential-checks/detections.ts">DetectionUpdateResponse</a></code>
- <code><a href="./src/resources/leaked-credential-checks/detections.ts">DetectionListResponse</a></code>
- <code><a href="./src/resources/leaked-credential-checks/detections.ts">DetectionDeleteResponse</a></code>

Methods:

- <code title="post /zones/{zone_id}/leaked-credential-checks/detections">client.leakedCredentialChecks.detections.<a href="./src/resources/leaked-credential-checks/detections.ts">create</a>({ ...params }) -> DetectionCreateResponse</code>
- <code title="put /zones/{zone_id}/leaked-credential-checks/detections/{detection_id}">client.leakedCredentialChecks.detections.<a href="./src/resources/leaked-credential-checks/detections.ts">update</a>(detectionId, { ...params }) -> DetectionUpdateResponse</code>
- <code title="get /zones/{zone_id}/leaked-credential-checks/detections">client.leakedCredentialChecks.detections.<a href="./src/resources/leaked-credential-checks/detections.ts">list</a>({ ...params }) -> DetectionListResponsesSinglePage</code>
- <code title="delete /zones/{zone_id}/leaked-credential-checks/detections/{detection_id}">client.leakedCredentialChecks.detections.<a href="./src/resources/leaked-credential-checks/detections.ts">delete</a>(detectionId, { ...params }) -> DetectionDeleteResponse</code>
- <code title="delete /zones/{zone_id}/leaked-credential-checks/detections/{detection_id}">client.leakedCredentialChecks.detections.<a href="./src/resources/leaked-credential-checks/detections.ts">delete</a>(detectionId, { ...params }) -> OriginMaxHTTPVersion</code>

# ContentScanning

Types:

- <code><a href="./src/resources/content-scanning/content-scanning.ts">ContentScanningDisableResponse</a></code>
- <code><a href="./src/resources/content-scanning/content-scanning.ts">ContentScanningEnableResponse</a></code>

Methods:

- <code title="post /zones/{zone_id}/content-upload-scan/disable">client.contentScanning.<a href="./src/resources/content-scanning/content-scanning.ts">disable</a>({ ...params }) -> ContentScanningDisableResponse</code>
- <code title="post /zones/{zone_id}/content-upload-scan/enable">client.contentScanning.<a href="./src/resources/content-scanning/content-scanning.ts">enable</a>({ ...params }) -> ContentScanningEnableResponse</code>
- <code title="post /zones/{zone_id}/content-upload-scan/disable">client.contentScanning.<a href="./src/resources/content-scanning/content-scanning.ts">disable</a>({ ...params }) -> OriginMaxHTTPVersion</code>
- <code title="post /zones/{zone_id}/content-upload-scan/enable">client.contentScanning.<a href="./src/resources/content-scanning/content-scanning.ts">enable</a>({ ...params }) -> OriginMaxHTTPVersion</code>

## Payloads

Expand Down
3 changes: 2 additions & 1 deletion src/resources/alerting/available-alerts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import { APIResource } from '../../resource';
import * as Core from '../../core';
import * as SettingsAPI from '../zones/settings';

export class AvailableAlerts extends APIResource {
/**
Expand Down Expand Up @@ -38,7 +39,7 @@ export namespace AvailableAlertListResponse {
* Format of additional configuration options (filters) for the alert type. Data
* type of filters during policy creation: Array of strings.
*/
filter_options?: Array<unknown>;
filter_options?: Array<SettingsAPI.OriginMaxHTTPVersion>;

/**
* Use this value when creating and updating a notification policy.
Expand Down
13 changes: 5 additions & 8 deletions src/resources/content-scanning/content-scanning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
} from './payloads';
import * as SettingsAPI from './settings';
import { SettingGetParams, SettingGetResponse, Settings } from './settings';
import * as ZonesSettingsAPI from '../zones/settings';

export class ContentScanning extends APIResource {
payloads: PayloadsAPI.Payloads = new PayloadsAPI.Payloads(this._client);
Expand All @@ -26,11 +27,11 @@ export class ContentScanning extends APIResource {
disable(
params: ContentScanningDisableParams,
options?: Core.RequestOptions,
): Core.APIPromise<ContentScanningDisableResponse> {
): Core.APIPromise<ZonesSettingsAPI.OriginMaxHTTPVersion> {
const { zone_id } = params;
return (
this._client.post(`/zones/${zone_id}/content-upload-scan/disable`, options) as Core.APIPromise<{
result: ContentScanningDisableResponse;
result: ZonesSettingsAPI.OriginMaxHTTPVersion;
}>
)._thenUnwrap((obj) => obj.result);
}
Expand All @@ -41,20 +42,16 @@ export class ContentScanning extends APIResource {
enable(
params: ContentScanningEnableParams,
options?: Core.RequestOptions,
): Core.APIPromise<ContentScanningEnableResponse> {
): Core.APIPromise<ZonesSettingsAPI.OriginMaxHTTPVersion> {
const { zone_id } = params;
return (
this._client.post(`/zones/${zone_id}/content-upload-scan/enable`, options) as Core.APIPromise<{
result: ContentScanningEnableResponse;
result: ZonesSettingsAPI.OriginMaxHTTPVersion;
}>
)._thenUnwrap((obj) => obj.result);
}
}

export type ContentScanningDisableResponse = unknown;

export type ContentScanningEnableResponse = unknown;

export interface ContentScanningDisableParams {
/**
* Identifier
Expand Down
7 changes: 4 additions & 3 deletions src/resources/dns/dns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,10 @@ import {
TXTRecord,
URIRecord,
} from './records';
import * as SettingsAPI from '../zones/settings';
import * as AnalyticsAPI from './analytics/analytics';
import { Analytics } from './analytics/analytics';
import * as SettingsAPI from './settings/settings';
import * as SettingsSettingsAPI from './settings/settings';
import {
DNSSetting,
SettingEditParams,
Expand All @@ -75,15 +76,15 @@ import { ZoneTransfers } from './zone-transfers/zone-transfers';
export class DNS extends APIResource {
dnssec: DNSSECAPI.DNSSECResource = new DNSSECAPI.DNSSECResource(this._client);
records: RecordsAPI.Records = new RecordsAPI.Records(this._client);
settings: SettingsAPI.Settings = new SettingsAPI.Settings(this._client);
settings: SettingsSettingsAPI.Settings = new SettingsSettingsAPI.Settings(this._client);
analytics: AnalyticsAPI.Analytics = new AnalyticsAPI.Analytics(this._client);
zoneTransfers: ZoneTransfersAPI.ZoneTransfers = new ZoneTransfersAPI.ZoneTransfers(this._client);
}

/**
* Nominal metric values, broken down by time interval.
*/
export type DNSAnalyticsNominalMetric = Array<unknown>;
export type DNSAnalyticsNominalMetric = Array<SettingsAPI.OriginMaxHTTPVersion>;

export interface DNSAnalyticsQuery {
/**
Expand Down
5 changes: 3 additions & 2 deletions src/resources/email-security/investigate/investigate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import { APIResource } from '../../../resource';
import * as Core from '../../../core';
import * as SettingsAPI from '../../zones/settings';
import * as DetectionsAPI from './detections';
import { DetectionGetParams, DetectionGetResponse, Detections } from './detections';
import * as MoveAPI from './move';
Expand Down Expand Up @@ -71,7 +72,7 @@ export class InvestigateListResponsesV4PagePaginationArray extends V4PagePaginat
export interface InvestigateListResponse {
id: string;

action_log: unknown;
action_log: SettingsAPI.OriginMaxHTTPVersion;

client_recipients: Array<string>;

Expand Down Expand Up @@ -153,7 +154,7 @@ export namespace InvestigateListResponse {
export interface InvestigateGetResponse {
id: string;

action_log: unknown;
action_log: SettingsAPI.OriginMaxHTTPVersion;

client_recipients: Array<string>;

Expand Down
2 changes: 0 additions & 2 deletions src/resources/firewall/waf/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ export {
type OverrideGetParams,
} from './overrides';
export {
PackageListResponsesV4PagePaginationArray,
Packages,
type PackageListResponse,
type PackageGetResponse,
type PackageListParams,
type PackageGetParams,
Expand Down
9 changes: 1 addition & 8 deletions src/resources/firewall/waf/packages/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,7 @@ export {
type GroupEditParams,
type GroupGetParams,
} from './groups';
export {
PackageListResponsesV4PagePaginationArray,
Packages,
type PackageListResponse,
type PackageGetResponse,
type PackageListParams,
type PackageGetParams,
} from './packages';
export { Packages, type PackageGetResponse, type PackageListParams, type PackageGetParams } from './packages';
export {
RuleListResponsesV4PagePaginationArray,
Rules,
Expand Down
17 changes: 7 additions & 10 deletions src/resources/firewall/waf/packages/packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import { APIResource } from '../../../../resource';
import * as Core from '../../../../core';
import * as Shared from '../../../shared';
import * as SettingsAPI from '../../../zones/settings';
import { OriginMaxHTTPVersionsV4PagePaginationArray } from '../../../zones/settings';
import * as GroupsAPI from './groups';
import {
Group,
Expand All @@ -27,7 +29,7 @@ import {
Rules,
WAFRuleGroup,
} from './rules';
import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../../pagination';
import { type V4PagePaginationArrayParams } from '../../../../pagination';

export class Packages extends APIResource {
groups: GroupsAPI.Groups = new GroupsAPI.Groups(this._client);
Expand All @@ -42,11 +44,11 @@ export class Packages extends APIResource {
list(
params: PackageListParams,
options?: Core.RequestOptions,
): Core.PagePromise<PackageListResponsesV4PagePaginationArray, PackageListResponse> {
): Core.PagePromise<OriginMaxHTTPVersionsV4PagePaginationArray, SettingsAPI.OriginMaxHTTPVersion> {
const { zone_id, ...query } = params;
return this._client.getAPIList(
`/zones/${zone_id}/firewall/waf/packages`,
PackageListResponsesV4PagePaginationArray,
OriginMaxHTTPVersionsV4PagePaginationArray,
{ query, ...options },
);
}
Expand All @@ -67,10 +69,6 @@ export class Packages extends APIResource {
}
}

export class PackageListResponsesV4PagePaginationArray extends V4PagePaginationArray<PackageListResponse> {}

export type PackageListResponse = unknown;

export type PackageGetResponse = PackageGetResponse.FirewallAPIResponseSingle | PackageGetResponse.Result;

export namespace PackageGetResponse {
Expand Down Expand Up @@ -127,17 +125,14 @@ export interface PackageGetParams {
zone_id: string;
}

Packages.PackageListResponsesV4PagePaginationArray = PackageListResponsesV4PagePaginationArray;
Packages.Groups = Groups;
Packages.GroupsV4PagePaginationArray = GroupsV4PagePaginationArray;
Packages.Rules = Rules;
Packages.RuleListResponsesV4PagePaginationArray = RuleListResponsesV4PagePaginationArray;

export declare namespace Packages {
export {
type PackageListResponse as PackageListResponse,
type PackageGetResponse as PackageGetResponse,
PackageListResponsesV4PagePaginationArray as PackageListResponsesV4PagePaginationArray,
type PackageListParams as PackageListParams,
type PackageGetParams as PackageGetParams,
};
Expand Down Expand Up @@ -166,3 +161,5 @@ export declare namespace Packages {
type RuleGetParams as RuleGetParams,
};
}

export { OriginMaxHTTPVersionsV4PagePaginationArray };
12 changes: 1 addition & 11 deletions src/resources/firewall/waf/waf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,7 @@ import {
WAFRule,
} from './overrides';
import * as PackagesAPI from './packages/packages';
import {
PackageGetParams,
PackageGetResponse,
PackageListParams,
PackageListResponse,
PackageListResponsesV4PagePaginationArray,
Packages,
} from './packages/packages';
import { PackageGetParams, PackageGetResponse, PackageListParams, Packages } from './packages/packages';

export class WAF extends APIResource {
overrides: OverridesAPI.Overrides = new OverridesAPI.Overrides(this._client);
Expand All @@ -34,7 +27,6 @@ export class WAF extends APIResource {
WAF.Overrides = Overrides;
WAF.OverridesV4PagePaginationArray = OverridesV4PagePaginationArray;
WAF.Packages = Packages;
WAF.PackageListResponsesV4PagePaginationArray = PackageListResponsesV4PagePaginationArray;

export declare namespace WAF {
export {
Expand All @@ -54,9 +46,7 @@ export declare namespace WAF {

export {
Packages as Packages,
type PackageListResponse as PackageListResponse,
type PackageGetResponse as PackageGetResponse,
PackageListResponsesV4PagePaginationArray as PackageListResponsesV4PagePaginationArray,
type PackageListParams as PackageListParams,
type PackageGetParams as PackageGetParams,
};
Expand Down
10 changes: 0 additions & 10 deletions src/resources/iam/iam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import {
PermissionGroupGetParams,
PermissionGroupGetResponse,
PermissionGroupListParams,
PermissionGroupListResponse,
PermissionGroupListResponsesV4PagePaginationArray,
PermissionGroups,
} from './permission-groups';
import * as ResourceGroupsAPI from './resource-groups';
Expand All @@ -19,8 +17,6 @@ import {
ResourceGroupGetParams,
ResourceGroupGetResponse,
ResourceGroupListParams,
ResourceGroupListResponse,
ResourceGroupListResponsesV4PagePaginationArray,
ResourceGroupUpdateParams,
ResourceGroupUpdateResponse,
ResourceGroups,
Expand All @@ -34,16 +30,12 @@ export class IAM extends APIResource {
}

IAM.PermissionGroups = PermissionGroups;
IAM.PermissionGroupListResponsesV4PagePaginationArray = PermissionGroupListResponsesV4PagePaginationArray;
IAM.ResourceGroups = ResourceGroups;
IAM.ResourceGroupListResponsesV4PagePaginationArray = ResourceGroupListResponsesV4PagePaginationArray;

export declare namespace IAM {
export {
PermissionGroups as PermissionGroups,
type PermissionGroupListResponse as PermissionGroupListResponse,
type PermissionGroupGetResponse as PermissionGroupGetResponse,
PermissionGroupListResponsesV4PagePaginationArray as PermissionGroupListResponsesV4PagePaginationArray,
type PermissionGroupListParams as PermissionGroupListParams,
type PermissionGroupGetParams as PermissionGroupGetParams,
};
Expand All @@ -52,10 +44,8 @@ export declare namespace IAM {
ResourceGroups as ResourceGroups,
type ResourceGroupCreateResponse as ResourceGroupCreateResponse,
type ResourceGroupUpdateResponse as ResourceGroupUpdateResponse,
type ResourceGroupListResponse as ResourceGroupListResponse,
type ResourceGroupDeleteResponse as ResourceGroupDeleteResponse,
type ResourceGroupGetResponse as ResourceGroupGetResponse,
ResourceGroupListResponsesV4PagePaginationArray as ResourceGroupListResponsesV4PagePaginationArray,
type ResourceGroupCreateParams as ResourceGroupCreateParams,
type ResourceGroupUpdateParams as ResourceGroupUpdateParams,
type ResourceGroupListParams as ResourceGroupListParams,
Expand Down
4 changes: 0 additions & 4 deletions src/resources/iam/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,15 @@

export { IAM } from './iam';
export {
PermissionGroupListResponsesV4PagePaginationArray,
PermissionGroups,
type PermissionGroupListResponse,
type PermissionGroupGetResponse,
type PermissionGroupListParams,
type PermissionGroupGetParams,
} from './permission-groups';
export {
ResourceGroupListResponsesV4PagePaginationArray,
ResourceGroups,
type ResourceGroupCreateResponse,
type ResourceGroupUpdateResponse,
type ResourceGroupListResponse,
type ResourceGroupDeleteResponse,
type ResourceGroupGetResponse,
type ResourceGroupCreateParams,
Expand Down
Loading

0 comments on commit f781ef8

Please sign in to comment.