/**
 * Cloudflare ZARAZ API
 *
 * Generated from Cloudflare TypeScript SDK.
 * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service zaraz
 */
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 GetConfigRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/settings/zaraz/config" }));
export const GetConfigResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    dataLayer: Schema.Boolean,
    debugKey: Schema.String,
    settings: Schema.Struct({
        autoInjectScript: Schema.Boolean,
        contextEnricher: Schema.optional(Schema.Union([
            Schema.Struct({
                escapedWorkerName: Schema.String,
                workerTag: Schema.String,
            }),
            Schema.Null,
        ])),
        cookieDomain: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        ecommerce: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        eventsApiPath: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        hideExternalReferer: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        hideIPAddress: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        hideQueryParams: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        hideUserAgent: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        initPath: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        injectIframes: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        mcRootPath: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        scriptPath: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        trackPath: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    }),
    tools: Schema.Record(Schema.String, Schema.Unknown),
    triggers: Schema.Record(Schema.String, Schema.Unknown),
    variables: Schema.Record(Schema.String, Schema.Unknown),
    zarazVersion: Schema.Number,
    analytics: Schema.optional(Schema.Union([
        Schema.Struct({
            defaultPurpose: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            sessionExpTime: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        }),
        Schema.Null,
    ])),
    consent: Schema.optional(Schema.Union([
        Schema.Struct({
            enabled: Schema.Boolean,
            buttonTextTranslations: Schema.optional(Schema.Union([
                Schema.Struct({
                    acceptAll: Schema.Record(Schema.String, Schema.Unknown),
                    confirmMyChoices: Schema.Record(Schema.String, Schema.Unknown),
                    rejectAll: Schema.Record(Schema.String, Schema.Unknown),
                }).pipe(Schema.encodeKeys({
                    acceptAll: "accept_all",
                    confirmMyChoices: "confirm_my_choices",
                    rejectAll: "reject_all",
                })),
                Schema.Null,
            ])),
            companyEmail: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            companyName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            companyStreetAddress: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            consentModalIntroHTML: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            consentModalIntroHTMLWithTranslations: Schema.optional(Schema.Union([
                Schema.Record(Schema.String, Schema.Unknown),
                Schema.Null,
            ])),
            cookieName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            customCSS: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            customIntroDisclaimerDismissed: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            defaultLanguage: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            hideModal: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            purposes: Schema.optional(Schema.Union([
                Schema.Record(Schema.String, Schema.Unknown),
                Schema.Null,
            ])),
            purposesWithTranslations: Schema.optional(Schema.Union([
                Schema.Record(Schema.String, Schema.Unknown),
                Schema.Null,
            ])),
            tcfCompliant: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        }),
        Schema.Null,
    ])),
    historyChange: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const getConfig = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetConfigRequest,
    output: GetConfigResponse,
    errors: [],
}));
export const PutConfigRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    dataLayer: Schema.Boolean,
    debugKey: Schema.String,
    settings: Schema.Struct({
        autoInjectScript: Schema.Boolean,
        contextEnricher: Schema.optional(Schema.Struct({
            escapedWorkerName: Schema.String,
            workerTag: Schema.String,
        })),
        cookieDomain: Schema.optional(Schema.String),
        ecommerce: Schema.optional(Schema.Boolean),
        eventsApiPath: Schema.optional(Schema.String),
        hideExternalReferer: Schema.optional(Schema.Boolean),
        hideIPAddress: Schema.optional(Schema.Boolean),
        hideQueryParams: Schema.optional(Schema.Boolean),
        hideUserAgent: Schema.optional(Schema.Boolean),
        initPath: Schema.optional(Schema.String),
        injectIframes: Schema.optional(Schema.Boolean),
        mcRootPath: Schema.optional(Schema.String),
        scriptPath: Schema.optional(Schema.String),
        trackPath: Schema.optional(Schema.String),
    }),
    tools: Schema.Record(Schema.String, Schema.Unknown),
    triggers: Schema.Record(Schema.String, Schema.Unknown),
    variables: Schema.Record(Schema.String, Schema.Unknown),
    zarazVersion: Schema.Number,
    analytics: Schema.optional(Schema.Struct({
        defaultPurpose: Schema.optional(Schema.String),
        enabled: Schema.optional(Schema.Boolean),
        sessionExpTime: Schema.optional(Schema.Number),
    })),
    consent: Schema.optional(Schema.Struct({
        enabled: Schema.Boolean,
        buttonTextTranslations: Schema.optional(Schema.Struct({
            acceptAll: Schema.Record(Schema.String, Schema.Unknown),
            confirmMyChoices: Schema.Record(Schema.String, Schema.Unknown),
            rejectAll: Schema.Record(Schema.String, Schema.Unknown),
        }).pipe(Schema.encodeKeys({
            acceptAll: "accept_all",
            confirmMyChoices: "confirm_my_choices",
            rejectAll: "reject_all",
        }))),
        companyEmail: Schema.optional(Schema.String),
        companyName: Schema.optional(Schema.String),
        companyStreetAddress: Schema.optional(Schema.String),
        consentModalIntroHTML: Schema.optional(Schema.String),
        consentModalIntroHTMLWithTranslations: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
        cookieName: Schema.optional(Schema.String),
        customCSS: Schema.optional(Schema.String),
        customIntroDisclaimerDismissed: Schema.optional(Schema.Boolean),
        defaultLanguage: Schema.optional(Schema.String),
        hideModal: Schema.optional(Schema.Boolean),
        purposes: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
        purposesWithTranslations: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
        tcfCompliant: Schema.optional(Schema.Boolean),
    })),
    historyChange: Schema.optional(Schema.Boolean),
}).pipe(T.Http({ method: "PUT", path: "/zones/{zone_id}/settings/zaraz/config" }));
export const PutConfigResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    dataLayer: Schema.Boolean,
    debugKey: Schema.String,
    settings: Schema.Struct({
        autoInjectScript: Schema.Boolean,
        contextEnricher: Schema.optional(Schema.Union([
            Schema.Struct({
                escapedWorkerName: Schema.String,
                workerTag: Schema.String,
            }),
            Schema.Null,
        ])),
        cookieDomain: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        ecommerce: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        eventsApiPath: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        hideExternalReferer: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        hideIPAddress: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        hideQueryParams: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        hideUserAgent: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        initPath: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        injectIframes: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        mcRootPath: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        scriptPath: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        trackPath: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    }),
    tools: Schema.Record(Schema.String, Schema.Unknown),
    triggers: Schema.Record(Schema.String, Schema.Unknown),
    variables: Schema.Record(Schema.String, Schema.Unknown),
    zarazVersion: Schema.Number,
    analytics: Schema.optional(Schema.Union([
        Schema.Struct({
            defaultPurpose: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            sessionExpTime: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        }),
        Schema.Null,
    ])),
    consent: Schema.optional(Schema.Union([
        Schema.Struct({
            enabled: Schema.Boolean,
            buttonTextTranslations: Schema.optional(Schema.Union([
                Schema.Struct({
                    acceptAll: Schema.Record(Schema.String, Schema.Unknown),
                    confirmMyChoices: Schema.Record(Schema.String, Schema.Unknown),
                    rejectAll: Schema.Record(Schema.String, Schema.Unknown),
                }).pipe(Schema.encodeKeys({
                    acceptAll: "accept_all",
                    confirmMyChoices: "confirm_my_choices",
                    rejectAll: "reject_all",
                })),
                Schema.Null,
            ])),
            companyEmail: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            companyName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            companyStreetAddress: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            consentModalIntroHTML: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            consentModalIntroHTMLWithTranslations: Schema.optional(Schema.Union([
                Schema.Record(Schema.String, Schema.Unknown),
                Schema.Null,
            ])),
            cookieName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            customCSS: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            customIntroDisclaimerDismissed: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            defaultLanguage: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            hideModal: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            purposes: Schema.optional(Schema.Union([
                Schema.Record(Schema.String, Schema.Unknown),
                Schema.Null,
            ])),
            purposesWithTranslations: Schema.optional(Schema.Union([
                Schema.Record(Schema.String, Schema.Unknown),
                Schema.Null,
            ])),
            tcfCompliant: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        }),
        Schema.Null,
    ])),
    historyChange: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const putConfig = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PutConfigRequest,
    output: PutConfigResponse,
    errors: [],
}));
export const GetDefaultRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/settings/zaraz/default" }));
export const GetDefaultResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    dataLayer: Schema.Boolean,
    debugKey: Schema.String,
    settings: Schema.Struct({
        autoInjectScript: Schema.Boolean,
        contextEnricher: Schema.optional(Schema.Union([
            Schema.Struct({
                escapedWorkerName: Schema.String,
                workerTag: Schema.String,
            }),
            Schema.Null,
        ])),
        cookieDomain: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        ecommerce: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        eventsApiPath: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        hideExternalReferer: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        hideIPAddress: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        hideQueryParams: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        hideUserAgent: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        initPath: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        injectIframes: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        mcRootPath: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        scriptPath: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        trackPath: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    }),
    tools: Schema.Record(Schema.String, Schema.Unknown),
    triggers: Schema.Record(Schema.String, Schema.Unknown),
    variables: Schema.Record(Schema.String, Schema.Unknown),
    zarazVersion: Schema.Number,
    analytics: Schema.optional(Schema.Union([
        Schema.Struct({
            defaultPurpose: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            sessionExpTime: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        }),
        Schema.Null,
    ])),
    consent: Schema.optional(Schema.Union([
        Schema.Struct({
            enabled: Schema.Boolean,
            buttonTextTranslations: Schema.optional(Schema.Union([
                Schema.Struct({
                    acceptAll: Schema.Record(Schema.String, Schema.Unknown),
                    confirmMyChoices: Schema.Record(Schema.String, Schema.Unknown),
                    rejectAll: Schema.Record(Schema.String, Schema.Unknown),
                }).pipe(Schema.encodeKeys({
                    acceptAll: "accept_all",
                    confirmMyChoices: "confirm_my_choices",
                    rejectAll: "reject_all",
                })),
                Schema.Null,
            ])),
            companyEmail: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            companyName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            companyStreetAddress: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            consentModalIntroHTML: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            consentModalIntroHTMLWithTranslations: Schema.optional(Schema.Union([
                Schema.Record(Schema.String, Schema.Unknown),
                Schema.Null,
            ])),
            cookieName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            customCSS: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            customIntroDisclaimerDismissed: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            defaultLanguage: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            hideModal: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            purposes: Schema.optional(Schema.Union([
                Schema.Record(Schema.String, Schema.Unknown),
                Schema.Null,
            ])),
            purposesWithTranslations: Schema.optional(Schema.Union([
                Schema.Record(Schema.String, Schema.Unknown),
                Schema.Null,
            ])),
            tcfCompliant: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        }),
        Schema.Null,
    ])),
    historyChange: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const getDefault = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetDefaultRequest,
    output: GetDefaultResponse,
    errors: [],
}));
export const GetExportRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/settings/zaraz/export" }));
export const GetExportResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    dataLayer: Schema.Boolean,
    debugKey: Schema.String,
    settings: Schema.Struct({
        autoInjectScript: Schema.Boolean,
        contextEnricher: Schema.optional(Schema.Union([
            Schema.Struct({
                escapedWorkerName: Schema.String,
                workerTag: Schema.String,
            }),
            Schema.Null,
        ])),
        cookieDomain: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        ecommerce: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        eventsApiPath: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        hideExternalReferer: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        hideIPAddress: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        hideQueryParams: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        hideUserAgent: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        initPath: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        injectIframes: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        mcRootPath: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        scriptPath: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        trackPath: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    }),
    tools: Schema.Record(Schema.String, Schema.Unknown),
    triggers: Schema.Record(Schema.String, Schema.Unknown),
    variables: Schema.Record(Schema.String, Schema.Unknown),
    zarazVersion: Schema.Number,
    analytics: Schema.optional(Schema.Union([
        Schema.Struct({
            defaultPurpose: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            sessionExpTime: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        }),
        Schema.Null,
    ])),
    consent: Schema.optional(Schema.Union([
        Schema.Struct({
            enabled: Schema.Boolean,
            buttonTextTranslations: Schema.optional(Schema.Union([
                Schema.Struct({
                    acceptAll: Schema.Record(Schema.String, Schema.Unknown),
                    confirmMyChoices: Schema.Record(Schema.String, Schema.Unknown),
                    rejectAll: Schema.Record(Schema.String, Schema.Unknown),
                }).pipe(Schema.encodeKeys({
                    acceptAll: "accept_all",
                    confirmMyChoices: "confirm_my_choices",
                    rejectAll: "reject_all",
                })),
                Schema.Null,
            ])),
            companyEmail: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            companyName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            companyStreetAddress: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            consentModalIntroHTML: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            consentModalIntroHTMLWithTranslations: Schema.optional(Schema.Union([
                Schema.Record(Schema.String, Schema.Unknown),
                Schema.Null,
            ])),
            cookieName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            customCSS: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            customIntroDisclaimerDismissed: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            defaultLanguage: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            hideModal: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            purposes: Schema.optional(Schema.Union([
                Schema.Record(Schema.String, Schema.Unknown),
                Schema.Null,
            ])),
            purposesWithTranslations: Schema.optional(Schema.Union([
                Schema.Record(Schema.String, Schema.Unknown),
                Schema.Null,
            ])),
            tcfCompliant: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        }),
        Schema.Null,
    ])),
    historyChange: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
});
export const getExport = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetExportRequest,
    output: GetExportResponse,
    errors: [],
}));
export const ListHistoriesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    limit: Schema.optional(Schema.Number).pipe(T.HttpQuery("limit")),
    offset: Schema.optional(Schema.Number).pipe(T.HttpQuery("offset")),
    sortField: Schema.optional(Schema.Literals([
        "id",
        "user_id",
        "description",
        "created_at",
        "updated_at",
    ])).pipe(T.HttpQuery("sortField")),
    sortOrder: Schema.optional(Schema.Literals(["DESC", "ASC"])).pipe(T.HttpQuery("sortOrder")),
}).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/settings/zaraz/history" }));
export const ListHistoriesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Struct({
        id: Schema.Number,
        createdAt: Schema.String,
        description: Schema.String,
        updatedAt: Schema.String,
        userId: Schema.String,
    })),
});
export const listHistories = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListHistoriesRequest,
    output: ListHistoriesResponse,
    errors: [],
    pagination: {
        mode: "single",
        items: "result",
    },
}));
export const PutHistoryRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    body: Schema.Number.pipe(T.HttpBody()),
}).pipe(T.Http({ method: "PUT", path: "/zones/{zone_id}/settings/zaraz/history" }));
export const PutHistoryResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    dataLayer: Schema.Boolean,
    debugKey: Schema.String,
    settings: Schema.Struct({
        autoInjectScript: Schema.Boolean,
        contextEnricher: Schema.optional(Schema.Union([
            Schema.Struct({
                escapedWorkerName: Schema.String,
                workerTag: Schema.String,
            }),
            Schema.Null,
        ])),
        cookieDomain: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        ecommerce: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        eventsApiPath: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        hideExternalReferer: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        hideIPAddress: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        hideQueryParams: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        hideUserAgent: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        initPath: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        injectIframes: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        mcRootPath: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        scriptPath: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        trackPath: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    }),
    tools: Schema.Record(Schema.String, Schema.Unknown),
    triggers: Schema.Record(Schema.String, Schema.Unknown),
    variables: Schema.Record(Schema.String, Schema.Unknown),
    zarazVersion: Schema.Number,
    analytics: Schema.optional(Schema.Union([
        Schema.Struct({
            defaultPurpose: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            sessionExpTime: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        }),
        Schema.Null,
    ])),
    consent: Schema.optional(Schema.Union([
        Schema.Struct({
            enabled: Schema.Boolean,
            buttonTextTranslations: Schema.optional(Schema.Union([
                Schema.Struct({
                    acceptAll: Schema.Record(Schema.String, Schema.Unknown),
                    confirmMyChoices: Schema.Record(Schema.String, Schema.Unknown),
                    rejectAll: Schema.Record(Schema.String, Schema.Unknown),
                }).pipe(Schema.encodeKeys({
                    acceptAll: "accept_all",
                    confirmMyChoices: "confirm_my_choices",
                    rejectAll: "reject_all",
                })),
                Schema.Null,
            ])),
            companyEmail: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            companyName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            companyStreetAddress: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            consentModalIntroHTML: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            consentModalIntroHTMLWithTranslations: Schema.optional(Schema.Union([
                Schema.Record(Schema.String, Schema.Unknown),
                Schema.Null,
            ])),
            cookieName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            customCSS: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            customIntroDisclaimerDismissed: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            defaultLanguage: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            hideModal: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            purposes: Schema.optional(Schema.Union([
                Schema.Record(Schema.String, Schema.Unknown),
                Schema.Null,
            ])),
            purposesWithTranslations: Schema.optional(Schema.Union([
                Schema.Record(Schema.String, Schema.Unknown),
                Schema.Null,
            ])),
            tcfCompliant: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        }),
        Schema.Null,
    ])),
    historyChange: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const putHistory = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PutHistoryRequest,
    output: PutHistoryResponse,
    errors: [],
}));
export const GetHistoryConfigRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    ids: Schema.Array(Schema.Number).pipe(T.HttpQuery("ids")),
}).pipe(T.Http({
    method: "GET",
    path: "/zones/{zone_id}/settings/zaraz/history/configs",
}));
export const GetHistoryConfigResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Record(Schema.String, Schema.Unknown).pipe(T.ResponsePath("result"));
export const getHistoryConfig = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetHistoryConfigRequest,
    output: GetHistoryConfigResponse,
    errors: [],
}));
export const CreatePublishRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    body: Schema.optional(Schema.String).pipe(T.HttpBody()),
}).pipe(T.Http({ method: "POST", path: "/zones/{zone_id}/settings/zaraz/publish" }));
export const CreatePublishResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.String.pipe(T.ResponsePath("result"));
export const createPublish = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreatePublishRequest,
    output: CreatePublishResponse,
    errors: [],
}));
export const GetWorkflowRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/settings/zaraz/workflow" }));
export const GetWorkflowResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Literals([
    "realtime",
    "preview",
]).pipe(T.ResponsePath("result"));
export const getWorkflow = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetWorkflowRequest,
    output: GetWorkflowResponse,
    errors: [],
}));
export const PutZarazRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    workflow: Schema.Literals(["realtime", "preview"]).pipe(T.HttpBody()),
}).pipe(T.Http({
    method: "PUT",
    path: "/zones/{zone_id}/settings/zaraz/workflow",
    contentType: "binary",
}));
export const PutZarazResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Literals([
    "realtime",
    "preview",
]).pipe(T.ResponsePath("result"));
export const putZaraz = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PutZarazRequest,
    output: PutZarazResponse,
    errors: [],
}));
//# sourceMappingURL=zaraz.js.map