/**
 * Cloudflare CUSTOM-NAMESERVERS API
 *
 * Generated from Cloudflare TypeScript SDK.
 * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service custom-nameservers
 */
import * as Schema from "effect/Schema";
import * as API from "../client/api.js";
import * as T from "../traits.js";
import {} from "../errors.js";
export const GetCustomNameserverRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/custom_ns" }));
export const GetCustomNameserverResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Struct({
        dnsRecords: Schema.Array(Schema.Struct({
            type: Schema.optional(Schema.Union([Schema.Literals(["A", "AAAA"]), Schema.Null])),
            value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        })),
        nsName: Schema.String,
        status: Schema.Literals(["moved", "pending", "verified"]),
        zoneTag: Schema.String,
        nsSet: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    }).pipe(Schema.encodeKeys({
        dnsRecords: "dns_records",
        nsName: "ns_name",
        status: "status",
        zoneTag: "zone_tag",
        nsSet: "ns_set",
    }))),
});
export const getCustomNameserver = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: GetCustomNameserverRequest,
    output: GetCustomNameserverResponse,
    errors: [],
    pagination: {
        mode: "single",
        items: "result",
    },
}));
export const CreateCustomNameserverRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    nsName: Schema.String,
    nsSet: Schema.optional(Schema.Number),
}).pipe(Schema.encodeKeys({ nsName: "ns_name", nsSet: "ns_set" }), T.Http({ method: "POST", path: "/accounts/{account_id}/custom_ns" }));
export const CreateCustomNameserverResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    dnsRecords: Schema.Array(Schema.Struct({
        type: Schema.optional(Schema.Union([Schema.Literals(["A", "AAAA"]), Schema.Null])),
        value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    })),
    nsName: Schema.String,
    status: Schema.Literals(["moved", "pending", "verified"]),
    zoneTag: Schema.String,
    nsSet: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    dnsRecords: "dns_records",
    nsName: "ns_name",
    status: "status",
    zoneTag: "zone_tag",
    nsSet: "ns_set",
}))
    .pipe(T.ResponsePath("result"));
export const createCustomNameserver = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateCustomNameserverRequest,
    output: CreateCustomNameserverResponse,
    errors: [],
}));
export const DeleteCustomNameserverRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    customNSId: Schema.String.pipe(T.HttpPath("customNSId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/accounts/{account_id}/custom_ns/{customNSId}",
}));
export const DeleteCustomNameserverResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.String),
});
export const deleteCustomNameserver = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: DeleteCustomNameserverRequest,
    output: DeleteCustomNameserverResponse,
    errors: [],
    pagination: {
        mode: "single",
        items: "result",
    },
}));
//# sourceMappingURL=custom-nameservers.js.map