import * as API from "@distilled.cloud/core/api"; // AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-hetzner/specs/cloud.spec.json). Do not edit. import * as S from "@distilled.cloud/core/schema-lite"; import * as __L from "@distilled.cloud/core/schema-lite"; import { UnknownHetznerError } from "../errors.ts"; import { paginatePageNumber } from "../pagination.ts"; import { HetznerProtocol, type HetznerOpError, type HetznerOpContext } from "../protocol.ts"; import * as Retry from "../retry.ts"; import * as T from "../traits.ts"; // Schema table, filled on first reach (see __S at the end). const __s: any[] = []; export type { HetznerOpError, HetznerOpContext }; /** [Transaction signature (TSIG)](https://en.wikipedia.org/wiki/TSIG) algorithm used to generate the TSIG key. */ export type ChangeZonePrimaryNameserversRequestPrimaryNameserversItemTsigAlgorithm = | "hmac-md5" | "hmac-sha1" | "hmac-sha256"; /** Primary nameserver that returns [Zones](#tag/zones) via `AXFR`. Must allow queries from and may send `NOTIFY` queries to [Hetzner's secondary nameservers](https://docs.hetzner.com/dns-console/dns/general/authoritative-name-servers#secondary-dns-servers-old-name-servers-for-robot-customers). */ export interface ChangeZonePrimaryNameserversRequestPrimaryNameserversItem { /** Public IPv4 or IPv6 address of the primary nameserver. Must be unique across all primary nameservers of this zone. */ address: string; /** Port of the primary nameserver. */ port?: number; /** [Transaction signature (TSIG)](https://en.wikipedia.org/wiki/TSIG) key to use for the zone transfer. Must be base64 encoded. */ tsig_key?: string; /** [Transaction signature (TSIG)](https://en.wikipedia.org/wiki/TSIG) algorithm used to generate the TSIG key. */ tsig_algorithm?: | ChangeZonePrimaryNameserversRequestPrimaryNameserversItemTsigAlgorithm | (string & {}); } /** Primary nameservers of the [Zone](#tag/zones). */ export type ChangeZonePrimaryNameserversRequestPrimaryNameserversList = Array; export interface ChangeZonePrimaryNameserversRequest { /** ID or Name of the Zone. */ id_or_name: string; /** Primary nameservers of the [Zone](#tag/zones). */ primary_nameservers: ChangeZonePrimaryNameserversRequestPrimaryNameserversList; } /** Status of the Action. */ export type ChangeZonePrimaryNameserversResponseActionStatus = "running" | "success" | "error"; export interface ChangeZonePrimaryNameserversResponseActionResourcesItem { /** ID of the Resource. */ id: number; /** Type of the Resource. */ type: string; } /** Resources the Action relates to. */ export type ChangeZonePrimaryNameserversResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export interface ChangeZonePrimaryNameserversResponseActionError { /** Fixed error code for machines. */ code: string; /** Error message for humans. */ message: string; } export interface ChangeZonePrimaryNameserversResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: ChangeZonePrimaryNameserversResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: ChangeZonePrimaryNameserversResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: ChangeZonePrimaryNameserversResponseActionError | null; } export interface ChangeZonePrimaryNameserversResponse { action: ChangeZonePrimaryNameserversResponseAction; } export interface ChangeZoneProtectionRequest { /** ID or Name of the Zone. */ id_or_name: string; /** Prevents the [Zone](#tag/zones) from being deleted. */ delete?: boolean; } /** Status of the Action. */ export type ChangeZoneProtectionResponseActionStatus = "running" | "success" | "error"; export type ChangeZoneProtectionResponseActionResourcesItem = ChangeZonePrimaryNameserversResponseActionResourcesItem; /** Resources the Action relates to. */ export type ChangeZoneProtectionResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type ChangeZoneProtectionResponseActionError = ChangeZonePrimaryNameserversResponseActionError; export interface ChangeZoneProtectionResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: ChangeZoneProtectionResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: ChangeZoneProtectionResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: ChangeZonePrimaryNameserversResponseActionError | null; } export interface ChangeZoneProtectionResponse { action: ChangeZoneProtectionResponseAction; } export interface ChangeZoneTtlRequest { /** ID or Name of the Zone. */ id_or_name: string; /** Default Time To Live (TTL) of the [Zone](#tag/zones). Must be in between 60s and 2147483647s. This TTL is used for [RRSets](#tag/zone-rrsets) that do not explicitly define a TTL. */ ttl: number; } /** Status of the Action. */ export type ChangeZoneTtlResponseActionStatus = "running" | "success" | "error"; export type ChangeZoneTtlResponseActionResourcesItem = ChangeZonePrimaryNameserversResponseActionResourcesItem; /** Resources the Action relates to. */ export type ChangeZoneTtlResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type ChangeZoneTtlResponseActionError = ChangeZonePrimaryNameserversResponseActionError; export interface ChangeZoneTtlResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: ChangeZoneTtlResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: ChangeZoneTtlResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: ChangeZonePrimaryNameserversResponseActionError | null; } export interface ChangeZoneTtlResponse { action: ChangeZoneTtlResponseAction; } export interface GetZonesActionRequest { /** ID of the Action. */ id: number; } /** Status of the Action. */ export type GetZonesActionResponseActionStatus = "running" | "success" | "error"; export type GetZonesActionResponseActionResourcesItem = ChangeZonePrimaryNameserversResponseActionResourcesItem; /** Resources the Action relates to. */ export type GetZonesActionResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type GetZonesActionResponseActionError = ChangeZonePrimaryNameserversResponseActionError; export interface GetZonesActionResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: GetZonesActionResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: GetZonesActionResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: ChangeZonePrimaryNameserversResponseActionError | null; } export interface GetZonesActionResponse { action: GetZonesActionResponseAction; } export interface ImportZoneZonefileRequest { /** ID or Name of the Zone. */ id_or_name: string; /** Zone file to import. See [Zone file import](#tag/zones/zone-file-import) for more details. */ zonefile: string; } /** Status of the Action. */ export type ImportZoneZonefileResponseActionStatus = "running" | "success" | "error"; export type ImportZoneZonefileResponseActionResourcesItem = ChangeZonePrimaryNameserversResponseActionResourcesItem; /** Resources the Action relates to. */ export type ImportZoneZonefileResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type ImportZoneZonefileResponseActionError = ChangeZonePrimaryNameserversResponseActionError; export interface ImportZoneZonefileResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: ImportZoneZonefileResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: ImportZoneZonefileResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: ChangeZonePrimaryNameserversResponseActionError | null; } export interface ImportZoneZonefileResponse { action: ImportZoneZonefileResponseAction; } export type ListZoneActionsRequestSortItem = | "id" | "id:asc" | "id:desc" | "command" | "command:asc" | "command:desc" | "status" | "status:asc" | "status:desc" | "started" | "started:asc" | "started:desc" | "finished" | "finished:asc" | "finished:desc"; export type ListZoneActionsRequestSortList = Array; /** Status of the Action. */ export type ListZoneActionsRequestStatusItem = "running" | "success" | "error"; export type ListZoneActionsRequestStatusList = Array< ListZoneActionsRequestStatusItem | (string & {}) >; export interface ListZoneActionsRequest { /** ID or Name of the Zone. */ id_or_name: string; /** Sort actions by field and direction. May be used multiple times. For more information, see "[Sorting](#description/sorting)". */ sort?: ListZoneActionsRequestSortList; /** Filter the actions by status. May be used multiple times. The response will only contain actions matching the specified statuses. */ status?: ListZoneActionsRequestStatusList; /** Page number to return. For more information, see "[Pagination](#description/pagination)". */ page?: number; /** Maximum number of entries returned per page. For more information, see "[Pagination](#description/pagination)". */ per_page?: number; } /** Status of the Action. */ export type ListZoneActionsResponseActionsItemStatus = "running" | "success" | "error"; export type ListZoneActionsResponseActionsItemResourcesItem = ChangeZonePrimaryNameserversResponseActionResourcesItem; /** Resources the Action relates to. */ export type ListZoneActionsResponseActionsItemResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type ListZoneActionsResponseActionsItemError = ChangeZonePrimaryNameserversResponseActionError; export interface ListZoneActionsResponseActionsItem { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: ListZoneActionsResponseActionsItemStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: ListZoneActionsResponseActionsItemResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: ChangeZonePrimaryNameserversResponseActionError | null; } export type ListZoneActionsResponseActionsList = Array; /** See "[Pagination](#description/pagination)" for more information. */ export interface ListZoneActionsResponseMetaPagination { /** Current page number. */ page: number; /** Maximum number of entries returned per page. */ per_page: number; /** Page number of the previous page. Can be null if the current page is the first one. */ previous_page: number | null; /** Page number of the next page. Can be null if the current page is the last one. */ next_page: number | null; /** Page number of the last page available. Can be null if the current page is the last one. */ last_page: number | null; /** Total number of entries that exist for this query. Can be null if unknown. */ total_entries: number | null; } export interface ListZoneActionsResponseMeta { /** See "[Pagination](#description/pagination)" for more information. */ pagination: ListZoneActionsResponseMetaPagination; } export interface ListZoneActionsResponse { actions: ListZoneActionsResponseActionsList; meta: ListZoneActionsResponseMeta; } export type ListZonesActionsRequestIdList = Array; export type ListZonesActionsRequestSortItem = | "id" | "id:asc" | "id:desc" | "command" | "command:asc" | "command:desc" | "status" | "status:asc" | "status:desc" | "started" | "started:asc" | "started:desc" | "finished" | "finished:asc" | "finished:desc"; export type ListZonesActionsRequestSortList = Array< ListZonesActionsRequestSortItem | (string & {}) >; /** Status of the Action. */ export type ListZonesActionsRequestStatusItem = "running" | "success" | "error"; export type ListZonesActionsRequestStatusList = Array< ListZonesActionsRequestStatusItem | (string & {}) >; export interface ListZonesActionsRequest { /** Filter the actions by ID. May be used multiple times. The response will only contain actions matching the specified IDs. */ id?: ListZonesActionsRequestIdList; /** Sort actions by field and direction. May be used multiple times. For more information, see "[Sorting](#description/sorting)". */ sort?: ListZonesActionsRequestSortList; /** Filter the actions by status. May be used multiple times. The response will only contain actions matching the specified statuses. */ status?: ListZonesActionsRequestStatusList; /** Page number to return. For more information, see "[Pagination](#description/pagination)". */ page?: number; /** Maximum number of entries returned per page. For more information, see "[Pagination](#description/pagination)". */ per_page?: number; } /** Status of the Action. */ export type ListZonesActionsResponseActionsItemStatus = "running" | "success" | "error"; export type ListZonesActionsResponseActionsItemResourcesItem = ChangeZonePrimaryNameserversResponseActionResourcesItem; /** Resources the Action relates to. */ export type ListZonesActionsResponseActionsItemResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type ListZonesActionsResponseActionsItemError = ChangeZonePrimaryNameserversResponseActionError; export interface ListZonesActionsResponseActionsItem { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: ListZonesActionsResponseActionsItemStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: ListZonesActionsResponseActionsItemResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: ChangeZonePrimaryNameserversResponseActionError | null; } export type ListZonesActionsResponseActionsList = Array; /** See "[Pagination](#description/pagination)" for more information. */ export type ListZonesActionsResponseMetaPagination = ListZoneActionsResponseMetaPagination; export type ListZonesActionsResponseMeta = ListZoneActionsResponseMeta; export interface ListZonesActionsResponse { actions: ListZonesActionsResponseActionsList; meta: ListZoneActionsResponseMeta; } export type ChangeZonePrimaryNameserversError = HetznerOpError; /** Change a Zone's Primary Nameservers Overwrites the primary nameservers of a [Zone](#tag/zones). Only applicable for [Zones](#tag/zones) in secondary mode. #### Operation specific errors */ export const changeZonePrimaryNameservers: API.OperationMethod< ChangeZonePrimaryNameserversRequest, ChangeZonePrimaryNameserversResponse, ChangeZonePrimaryNameserversError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(2, __c0, 2) as any as S.Schema, output: __S(8, __c1, 0) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type ChangeZoneProtectionError = HetznerOpError; /** Change a Zone's Protection Changes the protection configuration of a [Zone](#tag/zones). */ export const changeZoneProtection: API.OperationMethod< ChangeZoneProtectionRequest, ChangeZoneProtectionResponse, ChangeZoneProtectionError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(24, __c3, 0) as any as S.Schema, output: __S(8, __c1, 0) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type ChangeZoneTtlError = HetznerOpError; /** Change a Zone's Default TTL Changes the default Time To Live (TTL) of a [Zone](#tag/zones). This TTL is used for [RRSets](#tag/zone-rrsets) that do not explicitly define a TTL. Only applicable for [Zones](#tag/zones) in primary mode. #### Operation specific errors */ export const changeZoneTtl: API.OperationMethod< ChangeZoneTtlRequest, ChangeZoneTtlResponse, ChangeZoneTtlError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(32, __c4, 0) as any as S.Schema, output: __S(8, __c1, 0) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type GetZonesActionError = HetznerOpError; /** Get an Action Returns a specific [Action](#tag/actions). */ export const getZonesAction: API.OperationMethod< GetZonesActionRequest, GetZonesActionResponse, GetZonesActionError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(40, __c5, 0) as any as S.Schema, output: __S(8, __c1, 0) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type ImportZoneZonefileError = HetznerOpError; /** Import a Zone file Imports a zone file, replacing all resource record sets ([RRSets](#tag/zone-rrsets)). The import will fail if existing [RRSet](#tag/zone-rrsets) are `change` protected. See [Zone file import](#tag/zones/zone-file-import) for more details. Only applicable for [Zones](#tag/zones) in primary mode. #### Operation specific errors */ export const importZoneZonefile: API.OperationMethod< ImportZoneZonefileRequest, ImportZoneZonefileResponse, ImportZoneZonefileError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(48, __c6, 0) as any as S.Schema, output: __S(8, __c1, 0) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type ListZoneActionsError = HetznerOpError; /** List Actions for a Zone Returns all [Actions](#tag/actions) for a [Zone](#tag/zones). Use the provided URI parameters to modify the result. */ export const listZoneActions: API.PaginatedOperationMethod< ListZoneActionsRequest, ListZoneActionsResponse, ListZoneActionsError, HetznerOpContext, ListZoneActionsResponseActionsItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: __S(56, __c7, 0) as any as S.Schema, output: __S(68, __c8, 4) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "meta.pagination.next_page", items: "actions", pageSize: "per_page", } as const, }), paginatePageNumber, ) as any; export type ListZonesActionsError = HetznerOpError; /** List Actions Returns all [Zone](#tag/zones) [Actions](#tag/actions). Use the provided URI parameters to modify the result. */ export const listZonesActions: API.PaginatedOperationMethod< ListZonesActionsRequest, ListZonesActionsResponse, ListZonesActionsError, HetznerOpContext, ListZonesActionsResponseActionsItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: __S(73, __c9, 1) as any as S.Schema, output: __S(68, __c8, 4) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "meta.pagination.next_page", items: "actions", pageSize: "per_page", } as const, }), paginatePageNumber, ) as any; // Schema builders: each runs one schema initializer, on that schema's first use. function __c0(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ address: S.String, port: S.optional(S.Number), tsig_key: S.optional(S.String), tsig_algorithm: S.optional(S.String), }), ).annotate({ identifier: "ChangeZonePrimaryNameserversRequestPrimaryNameserversItem" }); case 1: return S.Array(__S(0, __c0, 0)); case 2: return S.suspend(() => S.Struct({ id_or_name: S.String.pipe(T.Label()), primary_nameservers: __S(1, __c0, 1), }).pipe( T.Http({ method: "POST", uri: "/zones/{id_or_name}/actions/change_primary_nameservers", code: 200, }), ), ).annotate({ identifier: "ChangeZonePrimaryNameserversRequest" }); } } function __c1(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ action: __S(19, __c2, 3), }), ).annotate({ identifier: "ChangeZonePrimaryNameserversResponse" }); } } function __c2(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number, type: S.String, }), ).annotate({ identifier: "ChangeZonePrimaryNameserversResponseActionResourcesItem" }); case 1: return S.Array(__S(16, __c2, 0)); case 2: return S.suspend(() => S.Struct({ code: S.String, message: S.String, }), ).annotate({ identifier: "ChangeZonePrimaryNameserversResponseActionError" }); case 3: return S.suspend(() => S.Struct({ id: S.Number, command: S.String, status: S.String, started: S.String, finished: S.NullOr(S.String), progress: S.Number, resources: __S(17, __c2, 1), error: S.NullOr(__S(18, __c2, 2)), }), ).annotate({ identifier: "ChangeZonePrimaryNameserversResponseAction" }); } } function __c3(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id_or_name: S.String.pipe(T.Label()), delete: S.optional(S.Boolean), }).pipe( T.Http({ method: "POST", uri: "/zones/{id_or_name}/actions/change_protection", code: 200, }), ), ).annotate({ identifier: "ChangeZoneProtectionRequest" }); } } function __c4(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id_or_name: S.String.pipe(T.Label()), ttl: S.Number, }).pipe( T.Http({ method: "POST", uri: "/zones/{id_or_name}/actions/change_ttl", code: 200 }), ), ).annotate({ identifier: "ChangeZoneTtlRequest" }); } } function __c5(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), }).pipe(T.Http({ method: "GET", uri: "/zones/actions/{id}", code: 200 })), ).annotate({ identifier: "GetZonesActionRequest" }); } } function __c6(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id_or_name: S.String.pipe(T.Label()), zonefile: S.String, }).pipe( T.Http({ method: "POST", uri: "/zones/{id_or_name}/actions/import_zonefile", code: 200 }), ), ).annotate({ identifier: "ImportZoneZonefileRequest" }); } } function __c7(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id_or_name: S.String.pipe(T.Label()), sort: S.optional(__S(64, __c8, 0).pipe(T.Query())), status: S.optional(__S(64, __c8, 0).pipe(T.Query())), page: S.optional(S.Number.pipe(T.Query())), per_page: S.optional(S.Number.pipe(T.Query())), }).pipe(T.Http({ method: "GET", uri: "/zones/{id_or_name}/actions", code: 200 })), ).annotate({ identifier: "ListZoneActionsRequest" }); } } function __c8(j: number): any { switch (j) { case 0: return S.Array(S.String); case 1: return S.Array(__S(19, __c2, 3)); case 2: return S.suspend(() => S.Struct({ page: S.Number, per_page: S.Number, previous_page: S.NullOr(S.Number), next_page: S.NullOr(S.Number), last_page: S.NullOr(S.Number), total_entries: S.NullOr(S.Number), }), ).annotate({ identifier: "ListZoneActionsResponseMetaPagination" }); case 3: return S.suspend(() => S.Struct({ pagination: __S(66, __c8, 2), }), ).annotate({ identifier: "ListZoneActionsResponseMeta" }); case 4: return S.suspend(() => S.Struct({ actions: __S(65, __c8, 1), meta: __S(67, __c8, 3), }), ).annotate({ identifier: "ListZoneActionsResponse" }); } } function __c9(j: number): any { switch (j) { case 0: return S.Array(S.Number); case 1: return S.suspend(() => S.Struct({ id: S.optional(__S(72, __c9, 0).pipe(T.Query())), sort: S.optional(__S(64, __c8, 0).pipe(T.Query())), status: S.optional(__S(64, __c8, 0).pipe(T.Query())), page: S.optional(S.Number.pipe(T.Query())), per_page: S.optional(S.Number.pipe(T.Query())), }).pipe(T.Http({ method: "GET", uri: "/zones/actions", code: 200 })), ).annotate({ identifier: "ListZonesActionsRequest" }); } } // Schema table: entry i is schema j of builder f, made on first reach. function __S(i: number, f: (j: number) => unknown, j: number): any { return (__s[i] ??= __L.at(f, j)); }