/**
 * Cloudflare BRAND-PROTECTION API
 *
 * Generated from Cloudflare TypeScript SDK.
 * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service brand-protection
 */
import * as Schema from "effect/Schema";
import * as API from "../client/api.js";
import * as T from "../traits.js";
import {} from "../errors.js";
import { UploadableSchema } from "../schemas.js";
export const SubmitBrandProtectionRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "POST",
    path: "/accounts/{account_id}/brand-protection/submit",
}));
export const SubmitBrandProtectionResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    skippedUrls: Schema.optional(Schema.Union([
        Schema.Array(Schema.Record(Schema.String, Schema.Unknown)),
        Schema.Null,
    ])),
    submittedUrls: Schema.optional(Schema.Union([
        Schema.Array(Schema.Record(Schema.String, Schema.Unknown)),
        Schema.Null,
    ])),
}).pipe(Schema.encodeKeys({
    skippedUrls: "skipped_urls",
    submittedUrls: "submitted_urls",
}));
export const submitBrandProtection = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: SubmitBrandProtectionRequest,
    output: SubmitBrandProtectionResponse,
    errors: [],
}));
export const UrlInfoBrandProtectionRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/brand-protection/url-info",
}));
export const UrlInfoBrandProtectionResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Record(Schema.String, Schema.Unknown)),
});
export const urlInfoBrandProtection = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: UrlInfoBrandProtectionRequest,
    output: UrlInfoBrandProtectionResponse,
    errors: [],
    pagination: {
        mode: "single",
        items: "result",
    },
}));
export const CreateLogoRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    matchType: Schema.optional(Schema.String).pipe(T.HttpQuery("match_type")),
    tag: Schema.optional(Schema.String).pipe(T.HttpQuery("tag")),
    threshold: Schema.optional(Schema.Number).pipe(T.HttpQuery("threshold")),
    image: Schema.optional(UploadableSchema.pipe(T.HttpFormDataFile())),
}).pipe(T.Http({
    method: "POST",
    path: "/accounts/{account_id}/brand-protection/logos",
    contentType: "multipart",
}));
export const CreateLogoResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    tag: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    uploadPath: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
}).pipe(Schema.encodeKeys({ id: "id", tag: "tag", uploadPath: "upload_path" }));
export const createLogo = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateLogoRequest,
    output: CreateLogoResponse,
    errors: [],
}));
export const DeleteLogoRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    logoId: Schema.String.pipe(T.HttpPath("logoId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/accounts/{account_id}/brand-protection/logos/{logoId}",
}));
export const DeleteLogoResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Unknown;
export const deleteLogo = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteLogoRequest,
    output: DeleteLogoResponse,
    errors: [],
}));
export const GetLogoMatchRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    limit: Schema.optional(Schema.String).pipe(T.HttpQuery("limit")),
    logoId: Schema.optional(Schema.Array(Schema.String)).pipe(T.HttpQuery("logo_id")),
    offset: Schema.optional(Schema.String).pipe(T.HttpQuery("offset")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/brand-protection/logo-matches",
}));
export const GetLogoMatchResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    matches: Schema.optional(Schema.Union([
        Schema.Array(Schema.Record(Schema.String, Schema.Unknown)),
        Schema.Null,
    ])),
    total: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
});
export const getLogoMatch = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetLogoMatchRequest,
    output: GetLogoMatchResponse,
    errors: [],
}));
export const DownloadLogoMatchRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    limit: Schema.optional(Schema.String).pipe(T.HttpQuery("limit")),
    logoId: Schema.optional(Schema.Array(Schema.String)).pipe(T.HttpQuery("logo_id")),
    offset: Schema.optional(Schema.String).pipe(T.HttpQuery("offset")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/brand-protection/logo-matches/download",
}));
export const DownloadLogoMatchResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    matches: Schema.optional(Schema.Union([
        Schema.Array(Schema.Record(Schema.String, Schema.Unknown)),
        Schema.Null,
    ])),
    total: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
});
export const downloadLogoMatch = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DownloadLogoMatchRequest,
    output: DownloadLogoMatchResponse,
    errors: [],
}));
export const GetMatchRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    id: Schema.optional(Schema.String).pipe(T.HttpQuery("id")),
    includeDomainId: Schema.optional(Schema.Boolean).pipe(T.HttpQuery("include_domain_id")),
    limit: Schema.optional(Schema.Number).pipe(T.HttpQuery("limit")),
    offset: Schema.optional(Schema.Number).pipe(T.HttpQuery("offset")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/brand-protection/matches",
}));
export const GetMatchResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    matches: Schema.optional(Schema.Union([
        Schema.Array(Schema.Record(Schema.String, Schema.Unknown)),
        Schema.Null,
    ])),
    total: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
});
export const getMatch = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetMatchRequest,
    output: GetMatchResponse,
    errors: [],
}));
export const DownloadMatchRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    id: Schema.optional(Schema.String).pipe(T.HttpQuery("id")),
    includeDomainId: Schema.optional(Schema.Boolean).pipe(T.HttpQuery("include_domain_id")),
    limit: Schema.optional(Schema.Number).pipe(T.HttpQuery("limit")),
    offset: Schema.optional(Schema.Number).pipe(T.HttpQuery("offset")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/brand-protection/matches/download",
}));
export const DownloadMatchResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    matches: Schema.optional(Schema.Union([
        Schema.Array(Schema.Record(Schema.String, Schema.Unknown)),
        Schema.Null,
    ])),
    total: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
});
export const downloadMatch = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DownloadMatchRequest,
    output: DownloadMatchResponse,
    errors: [],
}));
export const CreateQueryRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    id: Schema.optional(Schema.String).pipe(T.HttpQuery("id")),
    queryScan: Schema.optional(Schema.Boolean).pipe(T.HttpQuery("query_scan")),
    queryTag: Schema.optional(Schema.String).pipe(T.HttpQuery("query_tag")),
    maxTime: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    minTime: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    bodyScan: Schema.optional(Schema.Boolean),
    stringMatches: Schema.optional(Schema.Unknown),
    bodyTag: Schema.optional(Schema.String),
}).pipe(Schema.encodeKeys({
    maxTime: "max_time",
    minTime: "min_time",
    bodyScan: "body_scan",
    stringMatches: "string_matches",
    bodyTag: "body_tag",
}), T.Http({
    method: "POST",
    path: "/accounts/{account_id}/brand-protection/queries",
}));
export const CreateQueryResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Unknown;
export const createQuery = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateQueryRequest,
    output: CreateQueryResponse,
    errors: [],
}));
export const DeleteQueryRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    id: Schema.optional(Schema.String).pipe(T.HttpQuery("id")),
    scan: Schema.optional(Schema.Boolean).pipe(T.HttpQuery("scan")),
    tag: Schema.optional(Schema.String).pipe(T.HttpQuery("tag")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/accounts/{account_id}/brand-protection/queries",
}));
export const DeleteQueryResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Unknown;
export const deleteQuery = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteQueryRequest,
    output: DeleteQueryResponse,
    errors: [],
}));
export const BulkQueryRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    queries: Schema.optional(Schema.Array(Schema.Record(Schema.String, Schema.Unknown))),
}).pipe(T.Http({
    method: "POST",
    path: "/accounts/{account_id}/brand-protection/queries/bulk",
}));
export const BulkQueryResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Unknown;
export const bulkQuery = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: BulkQueryRequest,
    output: BulkQueryResponse,
    errors: [],
}));
//# sourceMappingURL=brand-protection.js.map