/**
 * Cloudflare WEB3 API
 *
 * Generated from Cloudflare TypeScript SDK.
 * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service web3
 */
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 GetHostnameRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    identifier: Schema.String.pipe(T.HttpPath("identifier")),
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/zones/{zone_id}/web3/hostnames/{identifier}",
}));
export const GetHostnameResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    dnslink: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    status: Schema.optional(Schema.Union([
        Schema.Literals(["active", "pending", "deleting", "error"]),
        Schema.Null,
    ])),
    target: Schema.optional(Schema.Union([
        Schema.Literals(["ethereum", "ipfs", "ipfs_universal_path"]),
        Schema.Null,
    ])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    createdOn: "created_on",
    description: "description",
    dnslink: "dnslink",
    modifiedOn: "modified_on",
    name: "name",
    status: "status",
    target: "target",
}))
    .pipe(T.ResponsePath("result"));
export const getHostname = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetHostnameRequest,
    output: GetHostnameResponse,
    errors: [],
}));
export const ListHostnamesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/web3/hostnames" }));
export const ListHostnamesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Struct({
        id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        dnslink: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        status: Schema.optional(Schema.Union([
            Schema.Literals(["active", "pending", "deleting", "error"]),
            Schema.Null,
        ])),
        target: Schema.optional(Schema.Union([
            Schema.Literals(["ethereum", "ipfs", "ipfs_universal_path"]),
            Schema.Null,
        ])),
    }).pipe(Schema.encodeKeys({
        id: "id",
        createdOn: "created_on",
        description: "description",
        dnslink: "dnslink",
        modifiedOn: "modified_on",
        name: "name",
        status: "status",
        target: "target",
    }))),
});
export const listHostnames = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListHostnamesRequest,
    output: ListHostnamesResponse,
    errors: [],
    pagination: {
        mode: "single",
        items: "result",
    },
}));
export const CreateHostnameRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    name: Schema.String,
    target: Schema.Literals(["ethereum", "ipfs", "ipfs_universal_path"]),
    description: Schema.optional(Schema.String),
    dnslink: Schema.optional(Schema.String),
}).pipe(T.Http({ method: "POST", path: "/zones/{zone_id}/web3/hostnames" }));
export const CreateHostnameResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    dnslink: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    status: Schema.optional(Schema.Union([
        Schema.Literals(["active", "pending", "deleting", "error"]),
        Schema.Null,
    ])),
    target: Schema.optional(Schema.Union([
        Schema.Literals(["ethereum", "ipfs", "ipfs_universal_path"]),
        Schema.Null,
    ])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    createdOn: "created_on",
    description: "description",
    dnslink: "dnslink",
    modifiedOn: "modified_on",
    name: "name",
    status: "status",
    target: "target",
}))
    .pipe(T.ResponsePath("result"));
export const createHostname = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateHostnameRequest,
    output: CreateHostnameResponse,
    errors: [],
}));
export const PatchHostnameRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    identifier: Schema.String.pipe(T.HttpPath("identifier")),
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    description: Schema.optional(Schema.String),
    dnslink: Schema.optional(Schema.String),
}).pipe(T.Http({
    method: "PATCH",
    path: "/zones/{zone_id}/web3/hostnames/{identifier}",
}));
export const PatchHostnameResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    dnslink: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    status: Schema.optional(Schema.Union([
        Schema.Literals(["active", "pending", "deleting", "error"]),
        Schema.Null,
    ])),
    target: Schema.optional(Schema.Union([
        Schema.Literals(["ethereum", "ipfs", "ipfs_universal_path"]),
        Schema.Null,
    ])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    createdOn: "created_on",
    description: "description",
    dnslink: "dnslink",
    modifiedOn: "modified_on",
    name: "name",
    status: "status",
    target: "target",
}))
    .pipe(T.ResponsePath("result"));
export const patchHostname = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PatchHostnameRequest,
    output: PatchHostnameResponse,
    errors: [],
}));
export const DeleteHostnameRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    identifier: Schema.String.pipe(T.HttpPath("identifier")),
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/zones/{zone_id}/web3/hostnames/{identifier}",
}));
export const DeleteHostnameResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.String,
}).pipe(T.ResponsePath("result"));
export const deleteHostname = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteHostnameRequest,
    output: DeleteHostnameResponse,
    errors: [],
}));
export const GetHostnameIpfsUniversalPathContentListRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    identifier: Schema.String.pipe(T.HttpPath("identifier")),
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/zones/{zone_id}/web3/hostnames/{identifier}/ipfs_universal_path/content_list",
}));
export const GetHostnameIpfsUniversalPathContentListResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    action: Schema.optional(Schema.Union([Schema.Literal("block"), Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const getHostnameIpfsUniversalPathContentList = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetHostnameIpfsUniversalPathContentListRequest,
    output: GetHostnameIpfsUniversalPathContentListResponse,
    errors: [],
}));
export const PutHostnameIpfsUniversalPathContentListRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    identifier: Schema.String.pipe(T.HttpPath("identifier")),
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    action: Schema.Literal("block"),
    entries: Schema.Array(Schema.Struct({
        content: Schema.optional(Schema.String),
        description: Schema.optional(Schema.String),
        type: Schema.optional(Schema.Literals(["cid", "content_path"])),
    })),
}).pipe(T.Http({
    method: "PUT",
    path: "/zones/{zone_id}/web3/hostnames/{identifier}/ipfs_universal_path/content_list",
}));
export const PutHostnameIpfsUniversalPathContentListResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    action: Schema.optional(Schema.Union([Schema.Literal("block"), Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const putHostnameIpfsUniversalPathContentList = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PutHostnameIpfsUniversalPathContentListRequest,
    output: PutHostnameIpfsUniversalPathContentListResponse,
    errors: [],
}));
export const GetHostnameIpfsUniversalPathContentListEntryRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    identifier: Schema.String.pipe(T.HttpPath("identifier")),
    contentListEntryIdentifier: Schema.String.pipe(T.HttpPath("contentListEntryIdentifier")),
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/zones/{zone_id}/web3/hostnames/{identifier}/ipfs_universal_path/content_list/entries/{contentListEntryIdentifier}",
}));
export const GetHostnameIpfsUniversalPathContentListEntryResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    content: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    type: Schema.optional(Schema.Union([Schema.Literals(["cid", "content_path"]), Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    content: "content",
    createdOn: "created_on",
    description: "description",
    modifiedOn: "modified_on",
    type: "type",
}))
    .pipe(T.ResponsePath("result"));
export const getHostnameIpfsUniversalPathContentListEntry = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetHostnameIpfsUniversalPathContentListEntryRequest,
    output: GetHostnameIpfsUniversalPathContentListEntryResponse,
    errors: [],
}));
export const ListHostnameIpfsUniversalPathContentListEntriesRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    identifier: Schema.String.pipe(T.HttpPath("identifier")),
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/zones/{zone_id}/web3/hostnames/{identifier}/ipfs_universal_path/content_list/entries",
}));
export const ListHostnameIpfsUniversalPathContentListEntriesResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    entries: Schema.optional(Schema.Union([
        Schema.Array(Schema.Struct({
            id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            content: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            type: Schema.optional(Schema.Union([
                Schema.Literals(["cid", "content_path"]),
                Schema.Null,
            ])),
        }).pipe(Schema.encodeKeys({
            id: "id",
            content: "content",
            createdOn: "created_on",
            description: "description",
            modifiedOn: "modified_on",
            type: "type",
        }))),
        Schema.Null,
    ])),
}).pipe(T.ResponsePath("result"));
export const listHostnameIpfsUniversalPathContentListEntries = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: ListHostnameIpfsUniversalPathContentListEntriesRequest,
    output: ListHostnameIpfsUniversalPathContentListEntriesResponse,
    errors: [],
}));
export const CreateHostnameIpfsUniversalPathContentListEntryRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    identifier: Schema.String.pipe(T.HttpPath("identifier")),
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    content: Schema.String,
    type: Schema.Literals(["cid", "content_path"]),
    description: Schema.optional(Schema.String),
}).pipe(T.Http({
    method: "POST",
    path: "/zones/{zone_id}/web3/hostnames/{identifier}/ipfs_universal_path/content_list/entries",
}));
export const CreateHostnameIpfsUniversalPathContentListEntryResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    content: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    type: Schema.optional(Schema.Union([Schema.Literals(["cid", "content_path"]), Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    content: "content",
    createdOn: "created_on",
    description: "description",
    modifiedOn: "modified_on",
    type: "type",
}))
    .pipe(T.ResponsePath("result"));
export const createHostnameIpfsUniversalPathContentListEntry = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateHostnameIpfsUniversalPathContentListEntryRequest,
    output: CreateHostnameIpfsUniversalPathContentListEntryResponse,
    errors: [],
}));
export const UpdateHostnameIpfsUniversalPathContentListEntryRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    identifier: Schema.String.pipe(T.HttpPath("identifier")),
    contentListEntryIdentifier: Schema.String.pipe(T.HttpPath("contentListEntryIdentifier")),
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    content: Schema.String,
    type: Schema.Literals(["cid", "content_path"]),
    description: Schema.optional(Schema.String),
}).pipe(T.Http({
    method: "PUT",
    path: "/zones/{zone_id}/web3/hostnames/{identifier}/ipfs_universal_path/content_list/entries/{contentListEntryIdentifier}",
}));
export const UpdateHostnameIpfsUniversalPathContentListEntryResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    content: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    type: Schema.optional(Schema.Union([Schema.Literals(["cid", "content_path"]), Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    content: "content",
    createdOn: "created_on",
    description: "description",
    modifiedOn: "modified_on",
    type: "type",
}))
    .pipe(T.ResponsePath("result"));
export const updateHostnameIpfsUniversalPathContentListEntry = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateHostnameIpfsUniversalPathContentListEntryRequest,
    output: UpdateHostnameIpfsUniversalPathContentListEntryResponse,
    errors: [],
}));
export const DeleteHostnameIpfsUniversalPathContentListEntryRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    identifier: Schema.String.pipe(T.HttpPath("identifier")),
    contentListEntryIdentifier: Schema.String.pipe(T.HttpPath("contentListEntryIdentifier")),
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/zones/{zone_id}/web3/hostnames/{identifier}/ipfs_universal_path/content_list/entries/{contentListEntryIdentifier}",
}));
export const DeleteHostnameIpfsUniversalPathContentListEntryResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.String,
}).pipe(T.ResponsePath("result"));
export const deleteHostnameIpfsUniversalPathContentListEntry = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteHostnameIpfsUniversalPathContentListEntryRequest,
    output: DeleteHostnameIpfsUniversalPathContentListEntryResponse,
    errors: [],
}));
//# sourceMappingURL=web3.js.map