cloudflare
Version:
The official TypeScript library for the Cloudflare API
53 lines • 2.05 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../core/resource.mjs";
import { path } from "../../internal/utils/path.mjs";
export var BaseVerificationResource = /* @__PURE__ */ (() => {
class BaseVerificationResource extends APIResource {
/**
* Edit SSL validation method for a certificate pack. A PATCH request will request
* an immediate validation check on any certificate, and return the updated status.
* If a validation method is provided, the validation will be immediately attempted
* using that method.
*
* @example
* ```ts
* const response = await client.ssl.verification.edit(
* 'a77f8bd7-3b47-46b4-a6f1-75cf98109948',
* {
* zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
* validation_method: 'txt',
* },
* );
* ```
*/
edit(certificatePackID, params, options) {
const { zone_id, ...body } = params;
return this._client.patch(path `/zones/${zone_id}/ssl/verification/${certificatePackID}`, {
body,
...options,
})._thenUnwrap((obj) => obj.result);
}
/**
* Get SSL Verification Info for a Zone.
*
* @example
* ```ts
* const verifications = await client.ssl.verification.get({
* zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
* });
* ```
*/
get(params, options) {
const { zone_id, ...query } = params;
return this._client.get(path `/zones/${zone_id}/ssl/verification`, { query, ...options })._thenUnwrap((obj) => obj.result);
}
}
BaseVerificationResource._key = Object.freeze([
'ssl',
'verification',
]);
return BaseVerificationResource;
})();
export class VerificationResource extends BaseVerificationResource {
}
//# sourceMappingURL=verification.mjs.map