/**
 * Cloudflare CALLS API
 *
 * Generated from Cloudflare TypeScript SDK.
 * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service calls
 */
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 GetSfuRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    appId: Schema.String.pipe(T.HttpPath("appId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/calls/apps/{appId}" }));
export const GetSfuResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    modified: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const getSfu = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetSfuRequest,
    output: GetSfuResponse,
    errors: [],
}));
export const CreateSfuRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    name: Schema.optional(Schema.String),
}).pipe(T.Http({ method: "POST", path: "/accounts/{account_id}/calls/apps" }));
export const CreateSfuResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    modified: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    secret: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const createSfu = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateSfuRequest,
    output: CreateSfuResponse,
    errors: [],
}));
export const UpdateSfuRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    appId: Schema.String.pipe(T.HttpPath("appId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    name: Schema.optional(Schema.String),
}).pipe(T.Http({ method: "PUT", path: "/accounts/{account_id}/calls/apps/{appId}" }));
export const UpdateSfuResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    modified: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const updateSfu = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateSfuRequest,
    output: UpdateSfuResponse,
    errors: [],
}));
export const DeleteSfuRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    appId: Schema.String.pipe(T.HttpPath("appId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/accounts/{account_id}/calls/apps/{appId}",
}));
export const DeleteSfuResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    modified: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const deleteSfu = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteSfuRequest,
    output: DeleteSfuResponse,
    errors: [],
}));
export const ListSfusRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/calls/apps" }));
export const ListSfusResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Struct({
        created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        modified: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    })),
});
export const listSfus = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListSfusRequest,
    output: ListSfusResponse,
    errors: [],
    pagination: {
        mode: "single",
        items: "result",
    },
}));
export const GetTurnRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    keyId: Schema.String.pipe(T.HttpPath("keyId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/calls/turn_keys/{keyId}",
}));
export const GetTurnResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    modified: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const getTurn = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetTurnRequest,
    output: GetTurnResponse,
    errors: [],
}));
export const ListTurnsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/calls/turn_keys" }));
export const ListTurnsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Struct({
        created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        modified: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    })),
});
export const listTurns = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListTurnsRequest,
    output: ListTurnsResponse,
    errors: [],
    pagination: {
        mode: "single",
        items: "result",
    },
}));
export const CreateTurnRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    name: Schema.optional(Schema.String),
}).pipe(T.Http({ method: "POST", path: "/accounts/{account_id}/calls/turn_keys" }));
export const CreateTurnResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    key: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    modified: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const createTurn = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateTurnRequest,
    output: CreateTurnResponse,
    errors: [],
}));
export const UpdateTurnRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    keyId: Schema.String.pipe(T.HttpPath("keyId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    name: Schema.optional(Schema.String),
}).pipe(T.Http({
    method: "PUT",
    path: "/accounts/{account_id}/calls/turn_keys/{keyId}",
}));
export const UpdateTurnResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    modified: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const updateTurn = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateTurnRequest,
    output: UpdateTurnResponse,
    errors: [],
}));
export const DeleteTurnRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    keyId: Schema.String.pipe(T.HttpPath("keyId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/accounts/{account_id}/calls/turn_keys/{keyId}",
}));
export const DeleteTurnResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    modified: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const deleteTurn = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteTurnRequest,
    output: DeleteTurnResponse,
    errors: [],
}));
//# sourceMappingURL=calls.js.map