@vercel/sdk
Version:
<p align="center"> <a href="https://vercel.com"> <img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96"> <h3 align="center">Vercel</h3> </a> <p align="center">Develop. Preview. Ship.</p> </p>
161 lines • 5.83 kB
TypeScript
import * as z from "zod/v3";
import { ClosedEnum } from "../types/enums.js";
import { Result as SafeParseResult } from "../types/fp.js";
import { BadRequest } from "./badrequest.js";
import { DomainNotAvailable } from "./domainnotavailable.js";
import { DomainNotRegistered } from "./domainnotregistered.js";
import { DomainTooShort } from "./domaintooshort.js";
import { ExpectedPriceMismatch } from "./expectedpricemismatch.js";
import { Forbidden } from "./forbidden.js";
import { HttpApiDecodeError } from "./httpapidecodeerror.js";
import { NotAuthorizedForScope } from "./notauthorizedforscope.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
import { TldNotSupported } from "./tldnotsupported.js";
export type RenewDomainContactInformation = {
/**
* a non empty string
*/
firstName: string;
/**
* a non empty string
*/
lastName: string;
/**
* A valid RFC 5322 email address
*/
email: string;
/**
* A valid E.164 phone number
*/
phone: string;
/**
* a non empty string
*/
address1: string;
/**
* a non empty string
*/
address2?: string | undefined;
/**
* a non empty string
*/
city: string;
/**
* a non empty string
*/
state: string;
/**
* a non empty string
*/
zip: string;
/**
* A valid ISO 3166-1 alpha-2 country code
*/
country: string;
/**
* a non empty string
*/
companyName?: string | undefined;
/**
* A valid E.164 phone number
*/
fax?: string | undefined;
};
export type RenewDomainRequestBody = {
/**
* The number of years to renew the domain for.
*/
years: number;
expectedPrice: number;
contactInformation?: RenewDomainContactInformation | undefined;
};
export type RenewDomainRequest = {
domain: string;
teamId?: string | undefined;
requestBody: RenewDomainRequestBody;
};
/**
* NotAuthorizedForScope
*/
export type RenewDomainDomainsRegistrarResponseResponseBody = (NotAuthorizedForScope & {
code: "not_authorized_for_scope";
}) | Forbidden;
/**
* There was something wrong with the request
*/
export type RenewDomainDomainsRegistrarResponseBody = BadRequest | DomainTooShort | DomainNotRegistered | ExpectedPriceMismatch | DomainNotAvailable | TldNotSupported | HttpApiDecodeError;
export declare const RenewDomainMethod: {
readonly Get: "GET";
readonly Post: "POST";
readonly Put: "PUT";
readonly Delete: "DELETE";
readonly Patch: "PATCH";
};
export type RenewDomainMethod = ClosedEnum<typeof RenewDomainMethod>;
export type RenewDomainLinks = {
href: string;
method: RenewDomainMethod;
};
/**
* Success
*/
export type RenewDomainResponseBody = {
/**
* A valid order ID
*/
orderId: string;
links: {
[k: string]: RenewDomainLinks;
};
};
/** @internal */
export type RenewDomainContactInformation$Outbound = {
firstName: string;
lastName: string;
email: string;
phone: string;
address1: string;
address2?: string | undefined;
city: string;
state: string;
zip: string;
country: string;
companyName?: string | undefined;
fax?: string | undefined;
};
/** @internal */
export declare const RenewDomainContactInformation$outboundSchema: z.ZodType<RenewDomainContactInformation$Outbound, z.ZodTypeDef, RenewDomainContactInformation>;
export declare function renewDomainContactInformationToJSON(renewDomainContactInformation: RenewDomainContactInformation): string;
/** @internal */
export type RenewDomainRequestBody$Outbound = {
years: number;
expectedPrice: number;
contactInformation?: RenewDomainContactInformation$Outbound | undefined;
};
/** @internal */
export declare const RenewDomainRequestBody$outboundSchema: z.ZodType<RenewDomainRequestBody$Outbound, z.ZodTypeDef, RenewDomainRequestBody>;
export declare function renewDomainRequestBodyToJSON(renewDomainRequestBody: RenewDomainRequestBody): string;
/** @internal */
export type RenewDomainRequest$Outbound = {
domain: string;
teamId?: string | undefined;
RequestBody: RenewDomainRequestBody$Outbound;
};
/** @internal */
export declare const RenewDomainRequest$outboundSchema: z.ZodType<RenewDomainRequest$Outbound, z.ZodTypeDef, RenewDomainRequest>;
export declare function renewDomainRequestToJSON(renewDomainRequest: RenewDomainRequest): string;
/** @internal */
export declare const RenewDomainDomainsRegistrarResponseResponseBody$inboundSchema: z.ZodType<RenewDomainDomainsRegistrarResponseResponseBody, z.ZodTypeDef, unknown>;
export declare function renewDomainDomainsRegistrarResponseResponseBodyFromJSON(jsonString: string): SafeParseResult<RenewDomainDomainsRegistrarResponseResponseBody, SDKValidationError>;
/** @internal */
export declare const RenewDomainDomainsRegistrarResponseBody$inboundSchema: z.ZodType<RenewDomainDomainsRegistrarResponseBody, z.ZodTypeDef, unknown>;
export declare function renewDomainDomainsRegistrarResponseBodyFromJSON(jsonString: string): SafeParseResult<RenewDomainDomainsRegistrarResponseBody, SDKValidationError>;
/** @internal */
export declare const RenewDomainMethod$inboundSchema: z.ZodNativeEnum<typeof RenewDomainMethod>;
/** @internal */
export declare const RenewDomainLinks$inboundSchema: z.ZodType<RenewDomainLinks, z.ZodTypeDef, unknown>;
export declare function renewDomainLinksFromJSON(jsonString: string): SafeParseResult<RenewDomainLinks, SDKValidationError>;
/** @internal */
export declare const RenewDomainResponseBody$inboundSchema: z.ZodType<RenewDomainResponseBody, z.ZodTypeDef, unknown>;
export declare function renewDomainResponseBodyFromJSON(jsonString: string): SafeParseResult<RenewDomainResponseBody, SDKValidationError>;
//# sourceMappingURL=renewdomainop.d.ts.map