UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

64 lines (53 loc) • 1.76 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../../core/resource'; import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; import { path } from '../../internal/utils/path'; export class BaseRecommendations extends APIResource { static override readonly _key: readonly ['ssl', 'recommendations'] = Object.freeze([ 'ssl', 'recommendations', ] as const); /** * Retrieve the SSL/TLS Recommender's recommendation for a zone. * * @deprecated SSL/TLS Recommender has been decommissioned in favor of Automatic SSL/TLS */ get(params: RecommendationGetParams, options?: RequestOptions): APIPromise<RecommendationGetResponse> { const { zone_id } = params; return ( this._client.get(path`/zones/${zone_id}/ssl/recommendation`, options) as APIPromise<{ result: RecommendationGetResponse; }> )._thenUnwrap((obj) => obj.result); } } export class Recommendations extends BaseRecommendations {} export interface RecommendationGetResponse { id: string; /** * Whether this setting can be updated or not. */ editable: boolean; /** * Last time this setting was modified. */ modified_on: string; /** * Current setting of the automatic SSL/TLS. */ value: 'auto' | 'custom'; /** * Next time this zone will be scanned by the Automatic SSL/TLS. */ next_scheduled_scan?: string | null; } export interface RecommendationGetParams { zone_id: string; } export declare namespace Recommendations { export { type RecommendationGetResponse as RecommendationGetResponse, type RecommendationGetParams as RecommendationGetParams, }; }