// AUTO-GENERATED by scripts/generate.ts from .generated-specs. Do not edit. import * as S from "@distilled.cloud/core/schema"; import * as API from "@distilled.cloud/core/api"; import * as T from "../traits.ts"; import { CloudflareProtocol, CloudflarePaginatedProtocol, type CloudflareOpError, type CloudflareOpContext, } from "../protocol.ts"; import { cloudflarePaginate, ResultInfo } from "../pagination.ts"; import { CloudflareError, CloudflareRateLimited } from "../errors.ts"; import * as Retry from "../retry.ts"; export type { CloudflareOpError, CloudflareOpContext }; /** Fallback camelCase→wire mapping for opaque content (mined from the distilled SDK). */ const KEY_DICTIONARY: Record> = { acceptAll: "accept_all", confirmMyChoices: "confirm_my_choices", rejectAll: "reject_all", }; export class Forbidden extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("Forbidden", { code: S.Number, message: S.String, }), [{ status: 403 }], ) {} export class NotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("NotFound", { code: S.Number, message: S.String, }), [{ status: 404 }], ) {} export interface CreatePublishRequest { /** Identifier. */ zoneId: string; /** Zaraz configuration description. */ body?: string; } export const CreatePublishRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), body: S.optional(S.String.pipe(T.HttpBody())), }) .pipe( T.Http({ method: "POST", uri: "/zones/{zone_id}/settings/zaraz/publish", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreatePublishRequest", }) as any as S.Schema; export type CreatePublishResponse = string; export const CreatePublishResponse = /*@__PURE__*/ S.suspend(() => S.String.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreatePublishResponse", }) as any as S.Schema; export interface GetConfigRequest { /** Identifier. */ zoneId: string; } export const GetConfigRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/settings/zaraz/config", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetConfigRequest", }) as any as S.Schema; export interface ConfigGetResponseSettingsContextEnricher { escapedWorkerName: string; workerTag: string; } export const ConfigGetResponseSettingsContextEnricher = /*@__PURE__*/ S.suspend( () => S.Struct({ escapedWorkerName: S.String, workerTag: S.String, }), ).annotate({ identifier: "ConfigGetResponseSettingsContextEnricher", }) as any as S.Schema; export interface ConfigGetResponseSettings { /** Automatic injection of Zaraz scripts enabled. */ autoInjectScript: boolean; /** Details of the worker that receives and edits Zaraz Context object. */ contextEnricher?: ConfigGetResponseSettingsContextEnricher | null; /** The domain Zaraz will use for writing and reading its cookies. */ cookieDomain?: string | null; /** Ecommerce API enabled. */ ecommerce?: boolean | null; /** Custom endpoint for server-side track events. */ eventsApiPath?: string | null; /** Hiding external referrer URL enabled. */ hideExternalReferer?: boolean | null; /** Trimming IP address enabled. */ hideIPAddress?: boolean | null; /** Removing URL query params enabled. */ hideQueryParams?: boolean | null; /** Removing sensitive data from User Agent string enabled. */ hideUserAgent?: boolean | null; /** Custom endpoint for Zaraz init script. */ initPath?: string | null; /** Injection of Zaraz scripts into iframes enabled. */ injectIframes?: boolean | null; /** Custom path for Managed Components server functionalities. */ mcRootPath?: string | null; /** Custom endpoint for Zaraz main script. */ scriptPath?: string | null; /** Custom endpoint for Zaraz tracking requests. */ trackPath?: string | null; } export const ConfigGetResponseSettings = /*@__PURE__*/ S.suspend(() => S.Struct({ autoInjectScript: S.Boolean, contextEnricher: S.optional( S.NullOr(ConfigGetResponseSettingsContextEnricher), ), cookieDomain: S.optional(S.NullOr(S.String)), ecommerce: S.optional(S.NullOr(S.Boolean)), eventsApiPath: S.optional(S.NullOr(S.String)), hideExternalReferer: S.optional(S.NullOr(S.Boolean)), hideIPAddress: S.optional(S.NullOr(S.Boolean)), hideQueryParams: S.optional(S.NullOr(S.Boolean)), hideUserAgent: S.optional(S.NullOr(S.Boolean)), initPath: S.optional(S.NullOr(S.String)), injectIframes: S.optional(S.NullOr(S.Boolean)), mcRootPath: S.optional(S.NullOr(S.String)), scriptPath: S.optional(S.NullOr(S.String)), trackPath: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "ConfigGetResponseSettings", }) as any as S.Schema; export type UntypedConfigMap = { [key: string]: unknown | undefined }; export const UntypedConfigMap = /*@__PURE__*/ S.Record( S.String, S.Unknown, ) as any as S.Schema; export interface ConfigGetResponseAnalytics { /** Consent purpose assigned to Monitoring. */ defaultPurpose?: string | null; /** Whether Advanced Monitoring reports are enabled. */ enabled?: boolean | null; /** Session expiration time (seconds). */ sessionExpTime?: number | null; } export const ConfigGetResponseAnalytics = /*@__PURE__*/ S.suspend(() => S.Struct({ defaultPurpose: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), sessionExpTime: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "ConfigGetResponseAnalytics", }) as any as S.Schema; export type ConfigGetResponseConsentButtonTextTranslationsAcceptAllMap = { [key: string]: string | undefined; }; export const ConfigGetResponseConsentButtonTextTranslationsAcceptAllMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export type ConfigGetResponseConsentButtonTextTranslationsConfirmMyChoicesMap = { [key: string]: string | undefined }; export const ConfigGetResponseConsentButtonTextTranslationsConfirmMyChoicesMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export type ConfigGetResponseConsentButtonTextTranslationsRejectAllMap = { [key: string]: string | undefined; }; export const ConfigGetResponseConsentButtonTextTranslationsRejectAllMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export interface ConfigGetResponseConsentButtonTextTranslations { /** Object where keys are language codes. */ acceptAll: ConfigGetResponseConsentButtonTextTranslationsAcceptAllMap; /** Object where keys are language codes. */ confirmMyChoices: ConfigGetResponseConsentButtonTextTranslationsConfirmMyChoicesMap; /** Object where keys are language codes. */ rejectAll: ConfigGetResponseConsentButtonTextTranslationsRejectAllMap; } export const ConfigGetResponseConsentButtonTextTranslations = /*@__PURE__*/ S.suspend(() => S.Struct({ acceptAll: ConfigGetResponseConsentButtonTextTranslationsAcceptAllMap.pipe( T.Body("accept_all"), ), confirmMyChoices: ConfigGetResponseConsentButtonTextTranslationsConfirmMyChoicesMap.pipe( T.Body("confirm_my_choices"), ), rejectAll: ConfigGetResponseConsentButtonTextTranslationsRejectAllMap.pipe( T.Body("reject_all"), ), }), ).annotate({ identifier: "ConfigGetResponseConsentButtonTextTranslations", }) as any as S.Schema; export type ConfigGetResponseConsentConsentModalIntroHTMLWithTranslationsMap = { [key: string]: string | undefined; }; export const ConfigGetResponseConsentConsentModalIntroHTMLWithTranslationsMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export interface ConfigGetResponseConsentPurposesValue { description: string; name: string; } export const ConfigGetResponseConsentPurposesValue = /*@__PURE__*/ S.suspend( () => S.Struct({ description: S.String, name: S.String, }), ).annotate({ identifier: "ConfigGetResponseConsentPurposesValue", }) as any as S.Schema; export type ConfigGetResponseConsentPurposesMap = { [key: string]: ConfigGetResponseConsentPurposesValue | undefined; }; export const ConfigGetResponseConsentPurposesMap = /*@__PURE__*/ S.Record( S.String, ConfigGetResponseConsentPurposesValue, ) as any as S.Schema; export type ConfigGetResponseConsentPurposesWithTranslationsValueDescriptionMap = { [key: string]: string | undefined }; export const ConfigGetResponseConsentPurposesWithTranslationsValueDescriptionMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export type ConfigGetResponseConsentPurposesWithTranslationsValueNameMap = { [key: string]: string | undefined; }; export const ConfigGetResponseConsentPurposesWithTranslationsValueNameMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export interface ConfigGetResponseConsentPurposesWithTranslationsValue { /** Object where keys are language codes. */ description: ConfigGetResponseConsentPurposesWithTranslationsValueDescriptionMap; /** Object where keys are language codes. */ name: ConfigGetResponseConsentPurposesWithTranslationsValueNameMap; order: number; } export const ConfigGetResponseConsentPurposesWithTranslationsValue = /*@__PURE__*/ S.suspend(() => S.Struct({ description: ConfigGetResponseConsentPurposesWithTranslationsValueDescriptionMap, name: ConfigGetResponseConsentPurposesWithTranslationsValueNameMap, order: S.Number, }), ).annotate({ identifier: "ConfigGetResponseConsentPurposesWithTranslationsValue", }) as any as S.Schema; export type ConfigGetResponseConsentPurposesWithTranslationsMap = { [key: string]: | ConfigGetResponseConsentPurposesWithTranslationsValue | undefined; }; export const ConfigGetResponseConsentPurposesWithTranslationsMap = /*@__PURE__*/ S.Record( S.String, ConfigGetResponseConsentPurposesWithTranslationsValue, ) as any as S.Schema; export interface ConfigGetResponseConsent { enabled: boolean; buttonTextTranslations?: ConfigGetResponseConsentButtonTextTranslations | null; companyEmail?: string | null; companyName?: string | null; companyStreetAddress?: string | null; consentModalIntroHTML?: string | null; /** Object where keys are language codes. */ consentModalIntroHTMLWithTranslations?: ConfigGetResponseConsentConsentModalIntroHTMLWithTranslationsMap | null; cookieName?: string | null; customCSS?: string | null; customIntroDisclaimerDismissed?: boolean | null; defaultLanguage?: string | null; hideModal?: boolean | null; /** Object where keys are purpose alpha-numeric IDs. */ purposes?: ConfigGetResponseConsentPurposesMap | null; /** Object where keys are purpose alpha-numeric IDs. */ purposesWithTranslations?: ConfigGetResponseConsentPurposesWithTranslationsMap | null; tcfCompliant?: boolean | null; } export const ConfigGetResponseConsent = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.Boolean, buttonTextTranslations: S.optional( S.NullOr(ConfigGetResponseConsentButtonTextTranslations), ), companyEmail: S.optional(S.NullOr(S.String)), companyName: S.optional(S.NullOr(S.String)), companyStreetAddress: S.optional(S.NullOr(S.String)), consentModalIntroHTML: S.optional(S.NullOr(S.String)), consentModalIntroHTMLWithTranslations: S.optional( S.NullOr( ConfigGetResponseConsentConsentModalIntroHTMLWithTranslationsMap, ), ), cookieName: S.optional(S.NullOr(S.String)), customCSS: S.optional(S.NullOr(S.String)), customIntroDisclaimerDismissed: S.optional(S.NullOr(S.Boolean)), defaultLanguage: S.optional(S.NullOr(S.String)), hideModal: S.optional(S.NullOr(S.Boolean)), purposes: S.optional(S.NullOr(ConfigGetResponseConsentPurposesMap)), purposesWithTranslations: S.optional( S.NullOr(ConfigGetResponseConsentPurposesWithTranslationsMap), ), tcfCompliant: S.optional(S.NullOr(S.Boolean)), }), ).annotate({ identifier: "ConfigGetResponseConsent", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetConfigResponse { /** Data layer compatibility mode enabled. */ dataLayer: boolean; /** The key for Zaraz debug mode. */ debugKey: string; /** General Zaraz settings. */ settings: ConfigGetResponseSettings; /** Tools set up under Zaraz configuration, where key is the alpha-numeric tool ID and value is the tool configuration object. */ tools: UntypedConfigMap; /** Triggers set up under Zaraz configuration, where key is the trigger alpha-numeric ID and value is the trigger configuration. */ triggers: UntypedConfigMap; /** Variables set up under Zaraz configuration, where key is the variable alpha-numeric ID and value is the variable configuration. Values of variables of type secret are not included. */ variables: UntypedConfigMap; /** Zaraz internal version of the config. */ zarazVersion: number; /** Cloudflare Monitoring settings. */ analytics?: ConfigGetResponseAnalytics | null; /** Consent management configuration. */ consent?: ConfigGetResponseConsent | null; /** Single Page Application support enabled. */ historyChange?: boolean | null; } export const GetConfigResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ dataLayer: S.Boolean, debugKey: S.String, settings: ConfigGetResponseSettings, tools: UntypedConfigMap, triggers: UntypedConfigMap, variables: UntypedConfigMap, zarazVersion: S.Number, analytics: S.optional(S.NullOr(ConfigGetResponseAnalytics)), consent: S.optional(S.NullOr(ConfigGetResponseConsent)), historyChange: S.optional(S.NullOr(S.Boolean)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetConfigResponse", }) as any as S.Schema; export interface GetDefaultRequest { /** Identifier. */ zoneId: string; } export const GetDefaultRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/settings/zaraz/default", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetDefaultRequest", }) as any as S.Schema; export type DefaultGetResponseSettingsContextEnricher = ConfigGetResponseSettingsContextEnricher; export const DefaultGetResponseSettingsContextEnricher = ConfigGetResponseSettingsContextEnricher; export type DefaultGetResponseSettings = ConfigGetResponseSettings; export const DefaultGetResponseSettings = ConfigGetResponseSettings; export type DefaultGetResponseAnalytics = ConfigGetResponseAnalytics; export const DefaultGetResponseAnalytics = ConfigGetResponseAnalytics; export type DefaultGetResponseConsentButtonTextTranslationsAcceptAllMap = { [key: string]: string | undefined; }; export const DefaultGetResponseConsentButtonTextTranslationsAcceptAllMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export type DefaultGetResponseConsentButtonTextTranslationsConfirmMyChoicesMap = { [key: string]: string | undefined }; export const DefaultGetResponseConsentButtonTextTranslationsConfirmMyChoicesMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export type DefaultGetResponseConsentButtonTextTranslationsRejectAllMap = { [key: string]: string | undefined; }; export const DefaultGetResponseConsentButtonTextTranslationsRejectAllMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export interface DefaultGetResponseConsentButtonTextTranslations { /** Object where keys are language codes. */ acceptAll: DefaultGetResponseConsentButtonTextTranslationsAcceptAllMap; /** Object where keys are language codes. */ confirmMyChoices: DefaultGetResponseConsentButtonTextTranslationsConfirmMyChoicesMap; /** Object where keys are language codes. */ rejectAll: DefaultGetResponseConsentButtonTextTranslationsRejectAllMap; } export const DefaultGetResponseConsentButtonTextTranslations = /*@__PURE__*/ S.suspend(() => S.Struct({ acceptAll: DefaultGetResponseConsentButtonTextTranslationsAcceptAllMap.pipe( T.Body("accept_all"), ), confirmMyChoices: DefaultGetResponseConsentButtonTextTranslationsConfirmMyChoicesMap.pipe( T.Body("confirm_my_choices"), ), rejectAll: DefaultGetResponseConsentButtonTextTranslationsRejectAllMap.pipe( T.Body("reject_all"), ), }), ).annotate({ identifier: "DefaultGetResponseConsentButtonTextTranslations", }) as any as S.Schema; export type DefaultGetResponseConsentConsentModalIntroHTMLWithTranslationsMap = { [key: string]: string | undefined }; export const DefaultGetResponseConsentConsentModalIntroHTMLWithTranslationsMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export type DefaultGetResponseConsentPurposesValue = ConfigGetResponseConsentPurposesValue; export const DefaultGetResponseConsentPurposesValue = ConfigGetResponseConsentPurposesValue; export type DefaultGetResponseConsentPurposesMap = { [key: string]: ConfigGetResponseConsentPurposesValue | undefined; }; export const DefaultGetResponseConsentPurposesMap = /*@__PURE__*/ S.Record( S.String, ConfigGetResponseConsentPurposesValue, ) as any as S.Schema; export type DefaultGetResponseConsentPurposesWithTranslationsValueDescriptionMap = { [key: string]: string | undefined }; export const DefaultGetResponseConsentPurposesWithTranslationsValueDescriptionMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export type DefaultGetResponseConsentPurposesWithTranslationsValueNameMap = { [key: string]: string | undefined; }; export const DefaultGetResponseConsentPurposesWithTranslationsValueNameMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export interface DefaultGetResponseConsentPurposesWithTranslationsValue { /** Object where keys are language codes. */ description: DefaultGetResponseConsentPurposesWithTranslationsValueDescriptionMap; /** Object where keys are language codes. */ name: DefaultGetResponseConsentPurposesWithTranslationsValueNameMap; order: number; } export const DefaultGetResponseConsentPurposesWithTranslationsValue = /*@__PURE__*/ S.suspend(() => S.Struct({ description: DefaultGetResponseConsentPurposesWithTranslationsValueDescriptionMap, name: DefaultGetResponseConsentPurposesWithTranslationsValueNameMap, order: S.Number, }), ).annotate({ identifier: "DefaultGetResponseConsentPurposesWithTranslationsValue", }) as any as S.Schema; export type DefaultGetResponseConsentPurposesWithTranslationsMap = { [key: string]: | DefaultGetResponseConsentPurposesWithTranslationsValue | undefined; }; export const DefaultGetResponseConsentPurposesWithTranslationsMap = /*@__PURE__*/ S.Record( S.String, DefaultGetResponseConsentPurposesWithTranslationsValue, ) as any as S.Schema; export interface DefaultGetResponseConsent { enabled: boolean; buttonTextTranslations?: DefaultGetResponseConsentButtonTextTranslations | null; companyEmail?: string | null; companyName?: string | null; companyStreetAddress?: string | null; consentModalIntroHTML?: string | null; /** Object where keys are language codes. */ consentModalIntroHTMLWithTranslations?: DefaultGetResponseConsentConsentModalIntroHTMLWithTranslationsMap | null; cookieName?: string | null; customCSS?: string | null; customIntroDisclaimerDismissed?: boolean | null; defaultLanguage?: string | null; hideModal?: boolean | null; /** Object where keys are purpose alpha-numeric IDs. */ purposes?: DefaultGetResponseConsentPurposesMap | null; /** Object where keys are purpose alpha-numeric IDs. */ purposesWithTranslations?: DefaultGetResponseConsentPurposesWithTranslationsMap | null; tcfCompliant?: boolean | null; } export const DefaultGetResponseConsent = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.Boolean, buttonTextTranslations: S.optional( S.NullOr(DefaultGetResponseConsentButtonTextTranslations), ), companyEmail: S.optional(S.NullOr(S.String)), companyName: S.optional(S.NullOr(S.String)), companyStreetAddress: S.optional(S.NullOr(S.String)), consentModalIntroHTML: S.optional(S.NullOr(S.String)), consentModalIntroHTMLWithTranslations: S.optional( S.NullOr( DefaultGetResponseConsentConsentModalIntroHTMLWithTranslationsMap, ), ), cookieName: S.optional(S.NullOr(S.String)), customCSS: S.optional(S.NullOr(S.String)), customIntroDisclaimerDismissed: S.optional(S.NullOr(S.Boolean)), defaultLanguage: S.optional(S.NullOr(S.String)), hideModal: S.optional(S.NullOr(S.Boolean)), purposes: S.optional(S.NullOr(DefaultGetResponseConsentPurposesMap)), purposesWithTranslations: S.optional( S.NullOr(DefaultGetResponseConsentPurposesWithTranslationsMap), ), tcfCompliant: S.optional(S.NullOr(S.Boolean)), }), ).annotate({ identifier: "DefaultGetResponseConsent", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetDefaultResponse { /** Data layer compatibility mode enabled. */ dataLayer: boolean; /** The key for Zaraz debug mode. */ debugKey: string; /** General Zaraz settings. */ settings: ConfigGetResponseSettings; /** Tools set up under Zaraz configuration, where key is the alpha-numeric tool ID and value is the tool configuration object. */ tools: UntypedConfigMap; /** Triggers set up under Zaraz configuration, where key is the trigger alpha-numeric ID and value is the trigger configuration. */ triggers: UntypedConfigMap; /** Variables set up under Zaraz configuration, where key is the variable alpha-numeric ID and value is the variable configuration. Values of variables of type secret are not included. */ variables: UntypedConfigMap; /** Zaraz internal version of the config. */ zarazVersion: number; /** Cloudflare Monitoring settings. */ analytics?: ConfigGetResponseAnalytics | null; /** Consent management configuration. */ consent?: DefaultGetResponseConsent | null; /** Single Page Application support enabled. */ historyChange?: boolean | null; } export const GetDefaultResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ dataLayer: S.Boolean, debugKey: S.String, settings: ConfigGetResponseSettings, tools: UntypedConfigMap, triggers: UntypedConfigMap, variables: UntypedConfigMap, zarazVersion: S.Number, analytics: S.optional(S.NullOr(ConfigGetResponseAnalytics)), consent: S.optional(S.NullOr(DefaultGetResponseConsent)), historyChange: S.optional(S.NullOr(S.Boolean)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetDefaultResponse", }) as any as S.Schema; export interface GetExportRequest { /** Identifier. */ zoneId: string; } export const GetExportRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/settings/zaraz/export", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetExportRequest", }) as any as S.Schema; /** Raw response payload (operation does not use the standard v4 result envelope). */ export interface GetExportResponse {} export const GetExportResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetExportResponse", }) as any as S.Schema; export type HistoryConfigsGetRequestIdsList = Array; export const HistoryConfigsGetRequestIdsList = /*@__PURE__*/ S.Array( S.Number, ) as any as S.Schema; export interface GetHistoryConfigRequest { /** Identifier. */ zoneId: string; /** Comma separated list of Zaraz configuration IDs. */ ids: HistoryConfigsGetRequestIdsList; } export const GetHistoryConfigRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), ids: HistoryConfigsGetRequestIdsList.pipe(T.Query()), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/settings/zaraz/history/configs", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetHistoryConfigRequest", }) as any as S.Schema; export type HistoryConfigsGetResultValueConfigSettingsContextEnricher = ConfigGetResponseSettingsContextEnricher; export const HistoryConfigsGetResultValueConfigSettingsContextEnricher = ConfigGetResponseSettingsContextEnricher; export type HistoryConfigsGetResultValueConfigSettings = ConfigGetResponseSettings; export const HistoryConfigsGetResultValueConfigSettings = ConfigGetResponseSettings; export type HistoryConfigsGetResultValueConfigAnalytics = ConfigGetResponseAnalytics; export const HistoryConfigsGetResultValueConfigAnalytics = ConfigGetResponseAnalytics; export type HistoryConfigsGetResultValueConfigConsentButtonTextTranslationsAcceptAllMap = { [key: string]: string | undefined }; export const HistoryConfigsGetResultValueConfigConsentButtonTextTranslationsAcceptAllMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export type HistoryConfigsGetResultValueConfigConsentButtonTextTranslationsConfirmMyChoicesMap = { [key: string]: string | undefined }; export const HistoryConfigsGetResultValueConfigConsentButtonTextTranslationsConfirmMyChoicesMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export type HistoryConfigsGetResultValueConfigConsentButtonTextTranslationsRejectAllMap = { [key: string]: string | undefined }; export const HistoryConfigsGetResultValueConfigConsentButtonTextTranslationsRejectAllMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export interface HistoryConfigsGetResultValueConfigConsentButtonTextTranslations { /** Object where keys are language codes. */ acceptAll: HistoryConfigsGetResultValueConfigConsentButtonTextTranslationsAcceptAllMap; /** Object where keys are language codes. */ confirmMyChoices: HistoryConfigsGetResultValueConfigConsentButtonTextTranslationsConfirmMyChoicesMap; /** Object where keys are language codes. */ rejectAll: HistoryConfigsGetResultValueConfigConsentButtonTextTranslationsRejectAllMap; } export const HistoryConfigsGetResultValueConfigConsentButtonTextTranslations = /*@__PURE__*/ S.suspend(() => S.Struct({ acceptAll: HistoryConfigsGetResultValueConfigConsentButtonTextTranslationsAcceptAllMap.pipe( T.Body("accept_all"), ), confirmMyChoices: HistoryConfigsGetResultValueConfigConsentButtonTextTranslationsConfirmMyChoicesMap.pipe( T.Body("confirm_my_choices"), ), rejectAll: HistoryConfigsGetResultValueConfigConsentButtonTextTranslationsRejectAllMap.pipe( T.Body("reject_all"), ), }), ).annotate({ identifier: "HistoryConfigsGetResultValueConfigConsentButtonTextTranslations", }) as any as S.Schema; export type HistoryConfigsGetResultValueConfigConsentConsentModalIntroHTMLWithTranslationsMap = { [key: string]: string | undefined }; export const HistoryConfigsGetResultValueConfigConsentConsentModalIntroHTMLWithTranslationsMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export type HistoryConfigsGetResultValueConfigConsentPurposesValue = ConfigGetResponseConsentPurposesValue; export const HistoryConfigsGetResultValueConfigConsentPurposesValue = ConfigGetResponseConsentPurposesValue; export type HistoryConfigsGetResultValueConfigConsentPurposesMap = { [key: string]: ConfigGetResponseConsentPurposesValue | undefined; }; export const HistoryConfigsGetResultValueConfigConsentPurposesMap = /*@__PURE__*/ S.Record( S.String, ConfigGetResponseConsentPurposesValue, ) as any as S.Schema; export type HistoryConfigsGetResultValueConfigConsentPurposesWithTranslationsValueDescriptionMap = { [key: string]: string | undefined }; export const HistoryConfigsGetResultValueConfigConsentPurposesWithTranslationsValueDescriptionMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export type HistoryConfigsGetResultValueConfigConsentPurposesWithTranslationsValueNameMap = { [key: string]: string | undefined }; export const HistoryConfigsGetResultValueConfigConsentPurposesWithTranslationsValueNameMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export interface HistoryConfigsGetResultValueConfigConsentPurposesWithTranslationsValue { /** Object where keys are language codes. */ description: HistoryConfigsGetResultValueConfigConsentPurposesWithTranslationsValueDescriptionMap; /** Object where keys are language codes. */ name: HistoryConfigsGetResultValueConfigConsentPurposesWithTranslationsValueNameMap; order: number; } export const HistoryConfigsGetResultValueConfigConsentPurposesWithTranslationsValue = /*@__PURE__*/ S.suspend(() => S.Struct({ description: HistoryConfigsGetResultValueConfigConsentPurposesWithTranslationsValueDescriptionMap, name: HistoryConfigsGetResultValueConfigConsentPurposesWithTranslationsValueNameMap, order: S.Number, }), ).annotate({ identifier: "HistoryConfigsGetResultValueConfigConsentPurposesWithTranslationsValue", }) as any as S.Schema; export type HistoryConfigsGetResultValueConfigConsentPurposesWithTranslationsMap = { [key: string]: | HistoryConfigsGetResultValueConfigConsentPurposesWithTranslationsValue | undefined; }; export const HistoryConfigsGetResultValueConfigConsentPurposesWithTranslationsMap = /*@__PURE__*/ S.Record( S.String, HistoryConfigsGetResultValueConfigConsentPurposesWithTranslationsValue, ) as any as S.Schema; export interface HistoryConfigsGetResultValueConfigConsent { enabled: boolean; buttonTextTranslations?: HistoryConfigsGetResultValueConfigConsentButtonTextTranslations | null; companyEmail?: string | null; companyName?: string | null; companyStreetAddress?: string | null; consentModalIntroHTML?: string | null; /** Object where keys are language codes. */ consentModalIntroHTMLWithTranslations?: HistoryConfigsGetResultValueConfigConsentConsentModalIntroHTMLWithTranslationsMap | null; cookieName?: string | null; customCSS?: string | null; customIntroDisclaimerDismissed?: boolean | null; defaultLanguage?: string | null; hideModal?: boolean | null; /** Object where keys are purpose alpha-numeric IDs. */ purposes?: HistoryConfigsGetResultValueConfigConsentPurposesMap | null; /** Object where keys are purpose alpha-numeric IDs. */ purposesWithTranslations?: HistoryConfigsGetResultValueConfigConsentPurposesWithTranslationsMap | null; tcfCompliant?: boolean | null; } export const HistoryConfigsGetResultValueConfigConsent = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.Boolean, buttonTextTranslations: S.optional( S.NullOr( HistoryConfigsGetResultValueConfigConsentButtonTextTranslations, ), ), companyEmail: S.optional(S.NullOr(S.String)), companyName: S.optional(S.NullOr(S.String)), companyStreetAddress: S.optional(S.NullOr(S.String)), consentModalIntroHTML: S.optional(S.NullOr(S.String)), consentModalIntroHTMLWithTranslations: S.optional( S.NullOr( HistoryConfigsGetResultValueConfigConsentConsentModalIntroHTMLWithTranslationsMap, ), ), cookieName: S.optional(S.NullOr(S.String)), customCSS: S.optional(S.NullOr(S.String)), customIntroDisclaimerDismissed: S.optional(S.NullOr(S.Boolean)), defaultLanguage: S.optional(S.NullOr(S.String)), hideModal: S.optional(S.NullOr(S.Boolean)), purposes: S.optional( S.NullOr(HistoryConfigsGetResultValueConfigConsentPurposesMap), ), purposesWithTranslations: S.optional( S.NullOr( HistoryConfigsGetResultValueConfigConsentPurposesWithTranslationsMap, ), ), tcfCompliant: S.optional(S.NullOr(S.Boolean)), }), ).annotate({ identifier: "HistoryConfigsGetResultValueConfigConsent", }) as any as S.Schema; export interface HistoryConfigsGetResultValueConfig { /** Data layer compatibility mode enabled. */ dataLayer: boolean; /** The key for Zaraz debug mode. */ debugKey: string; /** General Zaraz settings. */ settings: ConfigGetResponseSettings; /** Tools set up under Zaraz configuration, where key is the alpha-numeric tool ID and value is the tool configuration object. */ tools: UntypedConfigMap; /** Triggers set up under Zaraz configuration, where key is the trigger alpha-numeric ID and value is the trigger configuration. */ triggers: UntypedConfigMap; /** Variables set up under Zaraz configuration, where key is the variable alpha-numeric ID and value is the variable configuration. Values of variables of type secret are not included. */ variables: UntypedConfigMap; /** Zaraz internal version of the config. */ zarazVersion: number; /** Cloudflare Monitoring settings. */ analytics?: ConfigGetResponseAnalytics | null; /** Consent management configuration. */ consent?: HistoryConfigsGetResultValueConfigConsent | null; /** Single Page Application support enabled. */ historyChange?: boolean | null; } export const HistoryConfigsGetResultValueConfig = /*@__PURE__*/ S.suspend(() => S.Struct({ dataLayer: S.Boolean, debugKey: S.String, settings: ConfigGetResponseSettings, tools: UntypedConfigMap, triggers: UntypedConfigMap, variables: UntypedConfigMap, zarazVersion: S.Number, analytics: S.optional(S.NullOr(ConfigGetResponseAnalytics)), consent: S.optional(S.NullOr(HistoryConfigsGetResultValueConfigConsent)), historyChange: S.optional(S.NullOr(S.Boolean)), }), ).annotate({ identifier: "HistoryConfigsGetResultValueConfig", }) as any as S.Schema; export interface HistoryConfigsGetResultValue { /** ID of the configuration. */ id: number; /** Zaraz configuration. */ config: HistoryConfigsGetResultValueConfig; /** Date and time the configuration was created. */ createdAt: string; /** Date and time the configuration was last updated. */ updatedAt: string; /** Alpha-numeric ID of the account user who published the configuration. */ userId: string; } export const HistoryConfigsGetResultValue = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.Number, config: HistoryConfigsGetResultValueConfig, createdAt: S.String, updatedAt: S.String, userId: S.String, }), ).annotate({ identifier: "HistoryConfigsGetResultValue", }) as any as S.Schema; export type HistoryConfigsGetResultMap = { [key: string]: HistoryConfigsGetResultValue | undefined; }; export const HistoryConfigsGetResultMap = /*@__PURE__*/ S.Record( S.String, HistoryConfigsGetResultValue, ) as any as S.Schema; export type GetHistoryConfigResponse = HistoryConfigsGetResultMap; export const GetHistoryConfigResponse = /*@__PURE__*/ S.suspend(() => HistoryConfigsGetResultMap.pipe( T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY), ), ).annotate({ identifier: "GetHistoryConfigResponse", }) as any as S.Schema; export interface GetWorkflowRequest { /** Identifier. */ zoneId: string; } export const GetWorkflowRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/settings/zaraz/workflow", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetWorkflowRequest", }) as any as S.Schema; export type WorkflowGetResult = "realtime" | "preview"; export const WorkflowGetResult = /*@__PURE__*/ S.String; export type GetWorkflowResponse = WorkflowGetResult; export const GetWorkflowResponse = /*@__PURE__*/ S.suspend(() => WorkflowGetResult.pipe( T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY), ), ).annotate({ identifier: "GetWorkflowResponse", }) as any as S.Schema; export type HistoryListRequestSortField = | "id" | "user_id" | "description" | "created_at" | "updated_at"; export const HistoryListRequestSortField = /*@__PURE__*/ S.String; export type HistoryListRequestSortOrder = "DESC" | "ASC"; export const HistoryListRequestSortOrder = /*@__PURE__*/ S.String; export interface ListHistoriesRequest { /** Identifier. */ zoneId: string; /** Maximum amount of results to list. Default value is 10. */ limit?: number; /** Ordinal number to start listing the results with. Default value is 0. */ offset?: number; /** The field to sort by. Default is updated_at. */ sortField?: HistoryListRequestSortField | (string & {}); /** Sorting order. Default is DESC. */ sortOrder?: HistoryListRequestSortOrder | (string & {}); } export const ListHistoriesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), limit: S.optional(S.Number.pipe(T.Query())), offset: S.optional(S.Number.pipe(T.Query())), sortField: S.optional(HistoryListRequestSortField.pipe(T.Query())), sortOrder: S.optional(HistoryListRequestSortOrder.pipe(T.Query())), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/settings/zaraz/history", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListHistoriesRequest", }) as any as S.Schema; export interface HistoryListResultItem { /** ID of the configuration. */ id: number; /** Date and time the configuration was created. */ createdAt: string; /** Configuration description provided by the user who published this configuration. */ description: string; /** Date and time the configuration was last updated. */ updatedAt: string; /** Alpha-numeric ID of the account user who published the configuration. */ userId: string; } export const HistoryListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.Number, createdAt: S.String, description: S.String, updatedAt: S.String, userId: S.String, }), ).annotate({ identifier: "HistoryListResultItem", }) as any as S.Schema; export type HistoryListResultList = Array; export const HistoryListResultList = /*@__PURE__*/ S.Array( HistoryListResultItem, ) as any as S.Schema; export interface ListHistoriesResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: HistoryListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListHistoriesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: HistoryListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListHistoriesResponse", }) as any as S.Schema; export type ConfigUpdateRequestSettingsContextEnricher = ConfigGetResponseSettingsContextEnricher; export const ConfigUpdateRequestSettingsContextEnricher = ConfigGetResponseSettingsContextEnricher; export interface ConfigUpdateRequestSettings { /** Automatic injection of Zaraz scripts enabled. */ autoInjectScript: boolean; /** Details of the worker that receives and edits Zaraz Context object. */ contextEnricher?: ConfigGetResponseSettingsContextEnricher; /** The domain Zaraz will use for writing and reading its cookies. */ cookieDomain?: string; /** Ecommerce API enabled. */ ecommerce?: boolean; /** Custom endpoint for server-side track events. */ eventsApiPath?: string; /** Hiding external referrer URL enabled. */ hideExternalReferer?: boolean; /** Trimming IP address enabled. */ hideIPAddress?: boolean; /** Removing URL query params enabled. */ hideQueryParams?: boolean; /** Removing sensitive data from User Agent string enabled. */ hideUserAgent?: boolean; /** Custom endpoint for Zaraz init script. */ initPath?: string; /** Injection of Zaraz scripts into iframes enabled. */ injectIframes?: boolean; /** Custom path for Managed Components server functionalities. */ mcRootPath?: string; /** Custom endpoint for Zaraz main script. */ scriptPath?: string; /** Custom endpoint for Zaraz tracking requests. */ trackPath?: string; } export const ConfigUpdateRequestSettings = /*@__PURE__*/ S.suspend(() => S.Struct({ autoInjectScript: S.Boolean, contextEnricher: S.optional(ConfigGetResponseSettingsContextEnricher), cookieDomain: S.optional(S.String), ecommerce: S.optional(S.Boolean), eventsApiPath: S.optional(S.String), hideExternalReferer: S.optional(S.Boolean), hideIPAddress: S.optional(S.Boolean), hideQueryParams: S.optional(S.Boolean), hideUserAgent: S.optional(S.Boolean), initPath: S.optional(S.String), injectIframes: S.optional(S.Boolean), mcRootPath: S.optional(S.String), scriptPath: S.optional(S.String), trackPath: S.optional(S.String), }), ).annotate({ identifier: "ConfigUpdateRequestSettings", }) as any as S.Schema; export interface ConfigUpdateRequestAnalytics { /** Consent purpose assigned to Monitoring. */ defaultPurpose?: string; /** Whether Advanced Monitoring reports are enabled. */ enabled?: boolean; /** Session expiration time (seconds). */ sessionExpTime?: number; } export const ConfigUpdateRequestAnalytics = /*@__PURE__*/ S.suspend(() => S.Struct({ defaultPurpose: S.optional(S.String), enabled: S.optional(S.Boolean), sessionExpTime: S.optional(S.Number), }), ).annotate({ identifier: "ConfigUpdateRequestAnalytics", }) as any as S.Schema; export type ConfigUpdateRequestConsentButtonTextTranslationsAcceptAllMap = { [key: string]: string | undefined; }; export const ConfigUpdateRequestConsentButtonTextTranslationsAcceptAllMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export type ConfigUpdateRequestConsentButtonTextTranslationsConfirmMyChoicesMap = { [key: string]: string | undefined }; export const ConfigUpdateRequestConsentButtonTextTranslationsConfirmMyChoicesMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export type ConfigUpdateRequestConsentButtonTextTranslationsRejectAllMap = { [key: string]: string | undefined; }; export const ConfigUpdateRequestConsentButtonTextTranslationsRejectAllMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export interface ConfigUpdateRequestConsentButtonTextTranslations { /** Object where keys are language codes. */ acceptAll: ConfigUpdateRequestConsentButtonTextTranslationsAcceptAllMap; /** Object where keys are language codes. */ confirmMyChoices: ConfigUpdateRequestConsentButtonTextTranslationsConfirmMyChoicesMap; /** Object where keys are language codes. */ rejectAll: ConfigUpdateRequestConsentButtonTextTranslationsRejectAllMap; } export const ConfigUpdateRequestConsentButtonTextTranslations = /*@__PURE__*/ S.suspend(() => S.Struct({ acceptAll: ConfigUpdateRequestConsentButtonTextTranslationsAcceptAllMap.pipe( T.Body("accept_all"), ), confirmMyChoices: ConfigUpdateRequestConsentButtonTextTranslationsConfirmMyChoicesMap.pipe( T.Body("confirm_my_choices"), ), rejectAll: ConfigUpdateRequestConsentButtonTextTranslationsRejectAllMap.pipe( T.Body("reject_all"), ), }), ).annotate({ identifier: "ConfigUpdateRequestConsentButtonTextTranslations", }) as any as S.Schema; export type ConfigUpdateRequestConsentConsentModalIntroHTMLWithTranslationsMap = { [key: string]: string | undefined }; export const ConfigUpdateRequestConsentConsentModalIntroHTMLWithTranslationsMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export type ConfigUpdateRequestConsentPurposesValue = ConfigGetResponseConsentPurposesValue; export const ConfigUpdateRequestConsentPurposesValue = ConfigGetResponseConsentPurposesValue; export type ConfigUpdateRequestConsentPurposesMap = { [key: string]: ConfigGetResponseConsentPurposesValue | undefined; }; export const ConfigUpdateRequestConsentPurposesMap = /*@__PURE__*/ S.Record( S.String, ConfigGetResponseConsentPurposesValue, ) as any as S.Schema; export type ConfigUpdateRequestConsentPurposesWithTranslationsValueDescriptionMap = { [key: string]: string | undefined }; export const ConfigUpdateRequestConsentPurposesWithTranslationsValueDescriptionMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export type ConfigUpdateRequestConsentPurposesWithTranslationsValueNameMap = { [key: string]: string | undefined; }; export const ConfigUpdateRequestConsentPurposesWithTranslationsValueNameMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export interface ConfigUpdateRequestConsentPurposesWithTranslationsValue { /** Object where keys are language codes. */ description: ConfigUpdateRequestConsentPurposesWithTranslationsValueDescriptionMap; /** Object where keys are language codes. */ name: ConfigUpdateRequestConsentPurposesWithTranslationsValueNameMap; order: number; } export const ConfigUpdateRequestConsentPurposesWithTranslationsValue = /*@__PURE__*/ S.suspend(() => S.Struct({ description: ConfigUpdateRequestConsentPurposesWithTranslationsValueDescriptionMap, name: ConfigUpdateRequestConsentPurposesWithTranslationsValueNameMap, order: S.Number, }), ).annotate({ identifier: "ConfigUpdateRequestConsentPurposesWithTranslationsValue", }) as any as S.Schema; export type ConfigUpdateRequestConsentPurposesWithTranslationsMap = { [key: string]: | ConfigUpdateRequestConsentPurposesWithTranslationsValue | undefined; }; export const ConfigUpdateRequestConsentPurposesWithTranslationsMap = /*@__PURE__*/ S.Record( S.String, ConfigUpdateRequestConsentPurposesWithTranslationsValue, ) as any as S.Schema; export interface ConfigUpdateRequestConsent { enabled: boolean; buttonTextTranslations?: ConfigUpdateRequestConsentButtonTextTranslations; companyEmail?: string; companyName?: string; companyStreetAddress?: string; consentModalIntroHTML?: string; /** Object where keys are language codes. */ consentModalIntroHTMLWithTranslations?: ConfigUpdateRequestConsentConsentModalIntroHTMLWithTranslationsMap; cookieName?: string; customCSS?: string; customIntroDisclaimerDismissed?: boolean; defaultLanguage?: string; hideModal?: boolean; /** Object where keys are purpose alpha-numeric IDs. */ purposes?: ConfigUpdateRequestConsentPurposesMap; /** Object where keys are purpose alpha-numeric IDs. */ purposesWithTranslations?: ConfigUpdateRequestConsentPurposesWithTranslationsMap; tcfCompliant?: boolean; } export const ConfigUpdateRequestConsent = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.Boolean, buttonTextTranslations: S.optional( ConfigUpdateRequestConsentButtonTextTranslations, ), companyEmail: S.optional(S.String), companyName: S.optional(S.String), companyStreetAddress: S.optional(S.String), consentModalIntroHTML: S.optional(S.String), consentModalIntroHTMLWithTranslations: S.optional( ConfigUpdateRequestConsentConsentModalIntroHTMLWithTranslationsMap, ), cookieName: S.optional(S.String), customCSS: S.optional(S.String), customIntroDisclaimerDismissed: S.optional(S.Boolean), defaultLanguage: S.optional(S.String), hideModal: S.optional(S.Boolean), purposes: S.optional(ConfigUpdateRequestConsentPurposesMap), purposesWithTranslations: S.optional( ConfigUpdateRequestConsentPurposesWithTranslationsMap, ), tcfCompliant: S.optional(S.Boolean), }), ).annotate({ identifier: "ConfigUpdateRequestConsent", }) as any as S.Schema; export interface PutConfigRequest { /** Identifier. */ zoneId: string; /** Data layer compatibility mode enabled. */ dataLayer: boolean; /** The key for Zaraz debug mode. */ debugKey: string; /** General Zaraz settings. */ settings: ConfigUpdateRequestSettings; /** Tools set up under Zaraz configuration, where key is the alpha-numeric tool ID and value is the tool configuration object. */ tools: UntypedConfigMap; /** Triggers set up under Zaraz configuration, where key is the trigger alpha-numeric ID and value is the trigger configuration. */ triggers: UntypedConfigMap; /** Variables set up under Zaraz configuration, where key is the variable alpha-numeric ID and value is the variable configuration. Values of variables of type secret are not included. */ variables: UntypedConfigMap; /** Zaraz internal version of the config. */ zarazVersion: number; /** Cloudflare Monitoring settings. */ analytics?: ConfigUpdateRequestAnalytics; /** Consent management configuration. */ consent?: ConfigUpdateRequestConsent; /** Single Page Application support enabled. */ historyChange?: boolean; } export const PutConfigRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), dataLayer: S.Boolean, debugKey: S.String, settings: ConfigUpdateRequestSettings, tools: UntypedConfigMap, triggers: UntypedConfigMap, variables: UntypedConfigMap, zarazVersion: S.Number, analytics: S.optional(ConfigUpdateRequestAnalytics), consent: S.optional(ConfigUpdateRequestConsent), historyChange: S.optional(S.Boolean), }) .pipe( T.Http({ method: "PUT", uri: "/zones/{zone_id}/settings/zaraz/config", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutConfigRequest", }) as any as S.Schema; export type ConfigUpdateResponseSettingsContextEnricher = ConfigGetResponseSettingsContextEnricher; export const ConfigUpdateResponseSettingsContextEnricher = ConfigGetResponseSettingsContextEnricher; export type ConfigUpdateResponseSettings = ConfigGetResponseSettings; export const ConfigUpdateResponseSettings = ConfigGetResponseSettings; export type ConfigUpdateResponseAnalytics = ConfigGetResponseAnalytics; export const ConfigUpdateResponseAnalytics = ConfigGetResponseAnalytics; export type ConfigUpdateResponseConsentButtonTextTranslationsAcceptAllMap = { [key: string]: string | undefined; }; export const ConfigUpdateResponseConsentButtonTextTranslationsAcceptAllMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export type ConfigUpdateResponseConsentButtonTextTranslationsConfirmMyChoicesMap = { [key: string]: string | undefined }; export const ConfigUpdateResponseConsentButtonTextTranslationsConfirmMyChoicesMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export type ConfigUpdateResponseConsentButtonTextTranslationsRejectAllMap = { [key: string]: string | undefined; }; export const ConfigUpdateResponseConsentButtonTextTranslationsRejectAllMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export interface ConfigUpdateResponseConsentButtonTextTranslations { /** Object where keys are language codes. */ acceptAll: ConfigUpdateResponseConsentButtonTextTranslationsAcceptAllMap; /** Object where keys are language codes. */ confirmMyChoices: ConfigUpdateResponseConsentButtonTextTranslationsConfirmMyChoicesMap; /** Object where keys are language codes. */ rejectAll: ConfigUpdateResponseConsentButtonTextTranslationsRejectAllMap; } export const ConfigUpdateResponseConsentButtonTextTranslations = /*@__PURE__*/ S.suspend(() => S.Struct({ acceptAll: ConfigUpdateResponseConsentButtonTextTranslationsAcceptAllMap.pipe( T.Body("accept_all"), ), confirmMyChoices: ConfigUpdateResponseConsentButtonTextTranslationsConfirmMyChoicesMap.pipe( T.Body("confirm_my_choices"), ), rejectAll: ConfigUpdateResponseConsentButtonTextTranslationsRejectAllMap.pipe( T.Body("reject_all"), ), }), ).annotate({ identifier: "ConfigUpdateResponseConsentButtonTextTranslations", }) as any as S.Schema; export type ConfigUpdateResponseConsentConsentModalIntroHTMLWithTranslationsMap = { [key: string]: string | undefined }; export const ConfigUpdateResponseConsentConsentModalIntroHTMLWithTranslationsMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export type ConfigUpdateResponseConsentPurposesValue = ConfigGetResponseConsentPurposesValue; export const ConfigUpdateResponseConsentPurposesValue = ConfigGetResponseConsentPurposesValue; export type ConfigUpdateResponseConsentPurposesMap = { [key: string]: ConfigGetResponseConsentPurposesValue | undefined; }; export const ConfigUpdateResponseConsentPurposesMap = /*@__PURE__*/ S.Record( S.String, ConfigGetResponseConsentPurposesValue, ) as any as S.Schema; export type ConfigUpdateResponseConsentPurposesWithTranslationsValueDescriptionMap = { [key: string]: string | undefined }; export const ConfigUpdateResponseConsentPurposesWithTranslationsValueDescriptionMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export type ConfigUpdateResponseConsentPurposesWithTranslationsValueNameMap = { [key: string]: string | undefined; }; export const ConfigUpdateResponseConsentPurposesWithTranslationsValueNameMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export interface ConfigUpdateResponseConsentPurposesWithTranslationsValue { /** Object where keys are language codes. */ description: ConfigUpdateResponseConsentPurposesWithTranslationsValueDescriptionMap; /** Object where keys are language codes. */ name: ConfigUpdateResponseConsentPurposesWithTranslationsValueNameMap; order: number; } export const ConfigUpdateResponseConsentPurposesWithTranslationsValue = /*@__PURE__*/ S.suspend(() => S.Struct({ description: ConfigUpdateResponseConsentPurposesWithTranslationsValueDescriptionMap, name: ConfigUpdateResponseConsentPurposesWithTranslationsValueNameMap, order: S.Number, }), ).annotate({ identifier: "ConfigUpdateResponseConsentPurposesWithTranslationsValue", }) as any as S.Schema; export type ConfigUpdateResponseConsentPurposesWithTranslationsMap = { [key: string]: | ConfigUpdateResponseConsentPurposesWithTranslationsValue | undefined; }; export const ConfigUpdateResponseConsentPurposesWithTranslationsMap = /*@__PURE__*/ S.Record( S.String, ConfigUpdateResponseConsentPurposesWithTranslationsValue, ) as any as S.Schema; export interface ConfigUpdateResponseConsent { enabled: boolean; buttonTextTranslations?: ConfigUpdateResponseConsentButtonTextTranslations | null; companyEmail?: string | null; companyName?: string | null; companyStreetAddress?: string | null; consentModalIntroHTML?: string | null; /** Object where keys are language codes. */ consentModalIntroHTMLWithTranslations?: ConfigUpdateResponseConsentConsentModalIntroHTMLWithTranslationsMap | null; cookieName?: string | null; customCSS?: string | null; customIntroDisclaimerDismissed?: boolean | null; defaultLanguage?: string | null; hideModal?: boolean | null; /** Object where keys are purpose alpha-numeric IDs. */ purposes?: ConfigUpdateResponseConsentPurposesMap | null; /** Object where keys are purpose alpha-numeric IDs. */ purposesWithTranslations?: ConfigUpdateResponseConsentPurposesWithTranslationsMap | null; tcfCompliant?: boolean | null; } export const ConfigUpdateResponseConsent = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.Boolean, buttonTextTranslations: S.optional( S.NullOr(ConfigUpdateResponseConsentButtonTextTranslations), ), companyEmail: S.optional(S.NullOr(S.String)), companyName: S.optional(S.NullOr(S.String)), companyStreetAddress: S.optional(S.NullOr(S.String)), consentModalIntroHTML: S.optional(S.NullOr(S.String)), consentModalIntroHTMLWithTranslations: S.optional( S.NullOr( ConfigUpdateResponseConsentConsentModalIntroHTMLWithTranslationsMap, ), ), cookieName: S.optional(S.NullOr(S.String)), customCSS: S.optional(S.NullOr(S.String)), customIntroDisclaimerDismissed: S.optional(S.NullOr(S.Boolean)), defaultLanguage: S.optional(S.NullOr(S.String)), hideModal: S.optional(S.NullOr(S.Boolean)), purposes: S.optional(S.NullOr(ConfigUpdateResponseConsentPurposesMap)), purposesWithTranslations: S.optional( S.NullOr(ConfigUpdateResponseConsentPurposesWithTranslationsMap), ), tcfCompliant: S.optional(S.NullOr(S.Boolean)), }), ).annotate({ identifier: "ConfigUpdateResponseConsent", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PutConfigResponse { /** Data layer compatibility mode enabled. */ dataLayer: boolean; /** The key for Zaraz debug mode. */ debugKey: string; /** General Zaraz settings. */ settings: ConfigGetResponseSettings; /** Tools set up under Zaraz configuration, where key is the alpha-numeric tool ID and value is the tool configuration object. */ tools: UntypedConfigMap; /** Triggers set up under Zaraz configuration, where key is the trigger alpha-numeric ID and value is the trigger configuration. */ triggers: UntypedConfigMap; /** Variables set up under Zaraz configuration, where key is the variable alpha-numeric ID and value is the variable configuration. Values of variables of type secret are not included. */ variables: UntypedConfigMap; /** Zaraz internal version of the config. */ zarazVersion: number; /** Cloudflare Monitoring settings. */ analytics?: ConfigGetResponseAnalytics | null; /** Consent management configuration. */ consent?: ConfigUpdateResponseConsent | null; /** Single Page Application support enabled. */ historyChange?: boolean | null; } export const PutConfigResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ dataLayer: S.Boolean, debugKey: S.String, settings: ConfigGetResponseSettings, tools: UntypedConfigMap, triggers: UntypedConfigMap, variables: UntypedConfigMap, zarazVersion: S.Number, analytics: S.optional(S.NullOr(ConfigGetResponseAnalytics)), consent: S.optional(S.NullOr(ConfigUpdateResponseConsent)), historyChange: S.optional(S.NullOr(S.Boolean)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutConfigResponse", }) as any as S.Schema; export interface PutHistoryRequest { /** Identifier. */ zoneId: string; /** ID of the Zaraz configuration to restore. */ body: number; } export const PutHistoryRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), body: S.Number.pipe(T.HttpBody()), }) .pipe( T.Http({ method: "PUT", uri: "/zones/{zone_id}/settings/zaraz/history", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutHistoryRequest", }) as any as S.Schema; export type HistoryUpdateResponseSettingsContextEnricher = ConfigGetResponseSettingsContextEnricher; export const HistoryUpdateResponseSettingsContextEnricher = ConfigGetResponseSettingsContextEnricher; export type HistoryUpdateResponseSettings = ConfigGetResponseSettings; export const HistoryUpdateResponseSettings = ConfigGetResponseSettings; export type HistoryUpdateResponseAnalytics = ConfigGetResponseAnalytics; export const HistoryUpdateResponseAnalytics = ConfigGetResponseAnalytics; export type HistoryUpdateResponseConsentButtonTextTranslationsAcceptAllMap = { [key: string]: string | undefined; }; export const HistoryUpdateResponseConsentButtonTextTranslationsAcceptAllMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export type HistoryUpdateResponseConsentButtonTextTranslationsConfirmMyChoicesMap = { [key: string]: string | undefined }; export const HistoryUpdateResponseConsentButtonTextTranslationsConfirmMyChoicesMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export type HistoryUpdateResponseConsentButtonTextTranslationsRejectAllMap = { [key: string]: string | undefined; }; export const HistoryUpdateResponseConsentButtonTextTranslationsRejectAllMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export interface HistoryUpdateResponseConsentButtonTextTranslations { /** Object where keys are language codes. */ acceptAll: HistoryUpdateResponseConsentButtonTextTranslationsAcceptAllMap; /** Object where keys are language codes. */ confirmMyChoices: HistoryUpdateResponseConsentButtonTextTranslationsConfirmMyChoicesMap; /** Object where keys are language codes. */ rejectAll: HistoryUpdateResponseConsentButtonTextTranslationsRejectAllMap; } export const HistoryUpdateResponseConsentButtonTextTranslations = /*@__PURE__*/ S.suspend(() => S.Struct({ acceptAll: HistoryUpdateResponseConsentButtonTextTranslationsAcceptAllMap.pipe( T.Body("accept_all"), ), confirmMyChoices: HistoryUpdateResponseConsentButtonTextTranslationsConfirmMyChoicesMap.pipe( T.Body("confirm_my_choices"), ), rejectAll: HistoryUpdateResponseConsentButtonTextTranslationsRejectAllMap.pipe( T.Body("reject_all"), ), }), ).annotate({ identifier: "HistoryUpdateResponseConsentButtonTextTranslations", }) as any as S.Schema; export type HistoryUpdateResponseConsentConsentModalIntroHTMLWithTranslationsMap = { [key: string]: string | undefined }; export const HistoryUpdateResponseConsentConsentModalIntroHTMLWithTranslationsMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export type HistoryUpdateResponseConsentPurposesValue = ConfigGetResponseConsentPurposesValue; export const HistoryUpdateResponseConsentPurposesValue = ConfigGetResponseConsentPurposesValue; export type HistoryUpdateResponseConsentPurposesMap = { [key: string]: ConfigGetResponseConsentPurposesValue | undefined; }; export const HistoryUpdateResponseConsentPurposesMap = /*@__PURE__*/ S.Record( S.String, ConfigGetResponseConsentPurposesValue, ) as any as S.Schema; export type HistoryUpdateResponseConsentPurposesWithTranslationsValueDescriptionMap = { [key: string]: string | undefined }; export const HistoryUpdateResponseConsentPurposesWithTranslationsValueDescriptionMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export type HistoryUpdateResponseConsentPurposesWithTranslationsValueNameMap = { [key: string]: string | undefined; }; export const HistoryUpdateResponseConsentPurposesWithTranslationsValueNameMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export interface HistoryUpdateResponseConsentPurposesWithTranslationsValue { /** Object where keys are language codes. */ description: HistoryUpdateResponseConsentPurposesWithTranslationsValueDescriptionMap; /** Object where keys are language codes. */ name: HistoryUpdateResponseConsentPurposesWithTranslationsValueNameMap; order: number; } export const HistoryUpdateResponseConsentPurposesWithTranslationsValue = /*@__PURE__*/ S.suspend(() => S.Struct({ description: HistoryUpdateResponseConsentPurposesWithTranslationsValueDescriptionMap, name: HistoryUpdateResponseConsentPurposesWithTranslationsValueNameMap, order: S.Number, }), ).annotate({ identifier: "HistoryUpdateResponseConsentPurposesWithTranslationsValue", }) as any as S.Schema; export type HistoryUpdateResponseConsentPurposesWithTranslationsMap = { [key: string]: | HistoryUpdateResponseConsentPurposesWithTranslationsValue | undefined; }; export const HistoryUpdateResponseConsentPurposesWithTranslationsMap = /*@__PURE__*/ S.Record( S.String, HistoryUpdateResponseConsentPurposesWithTranslationsValue, ) as any as S.Schema; export interface HistoryUpdateResponseConsent { enabled: boolean; buttonTextTranslations?: HistoryUpdateResponseConsentButtonTextTranslations | null; companyEmail?: string | null; companyName?: string | null; companyStreetAddress?: string | null; consentModalIntroHTML?: string | null; /** Object where keys are language codes. */ consentModalIntroHTMLWithTranslations?: HistoryUpdateResponseConsentConsentModalIntroHTMLWithTranslationsMap | null; cookieName?: string | null; customCSS?: string | null; customIntroDisclaimerDismissed?: boolean | null; defaultLanguage?: string | null; hideModal?: boolean | null; /** Object where keys are purpose alpha-numeric IDs. */ purposes?: HistoryUpdateResponseConsentPurposesMap | null; /** Object where keys are purpose alpha-numeric IDs. */ purposesWithTranslations?: HistoryUpdateResponseConsentPurposesWithTranslationsMap | null; tcfCompliant?: boolean | null; } export const HistoryUpdateResponseConsent = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.Boolean, buttonTextTranslations: S.optional( S.NullOr(HistoryUpdateResponseConsentButtonTextTranslations), ), companyEmail: S.optional(S.NullOr(S.String)), companyName: S.optional(S.NullOr(S.String)), companyStreetAddress: S.optional(S.NullOr(S.String)), consentModalIntroHTML: S.optional(S.NullOr(S.String)), consentModalIntroHTMLWithTranslations: S.optional( S.NullOr( HistoryUpdateResponseConsentConsentModalIntroHTMLWithTranslationsMap, ), ), cookieName: S.optional(S.NullOr(S.String)), customCSS: S.optional(S.NullOr(S.String)), customIntroDisclaimerDismissed: S.optional(S.NullOr(S.Boolean)), defaultLanguage: S.optional(S.NullOr(S.String)), hideModal: S.optional(S.NullOr(S.Boolean)), purposes: S.optional(S.NullOr(HistoryUpdateResponseConsentPurposesMap)), purposesWithTranslations: S.optional( S.NullOr(HistoryUpdateResponseConsentPurposesWithTranslationsMap), ), tcfCompliant: S.optional(S.NullOr(S.Boolean)), }), ).annotate({ identifier: "HistoryUpdateResponseConsent", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PutHistoryResponse { /** Data layer compatibility mode enabled. */ dataLayer: boolean; /** The key for Zaraz debug mode. */ debugKey: string; /** General Zaraz settings. */ settings: ConfigGetResponseSettings; /** Tools set up under Zaraz configuration, where key is the alpha-numeric tool ID and value is the tool configuration object. */ tools: UntypedConfigMap; /** Triggers set up under Zaraz configuration, where key is the trigger alpha-numeric ID and value is the trigger configuration. */ triggers: UntypedConfigMap; /** Variables set up under Zaraz configuration, where key is the variable alpha-numeric ID and value is the variable configuration. Values of variables of type secret are not included. */ variables: UntypedConfigMap; /** Zaraz internal version of the config. */ zarazVersion: number; /** Cloudflare Monitoring settings. */ analytics?: ConfigGetResponseAnalytics | null; /** Consent management configuration. */ consent?: HistoryUpdateResponseConsent | null; /** Single Page Application support enabled. */ historyChange?: boolean | null; } export const PutHistoryResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ dataLayer: S.Boolean, debugKey: S.String, settings: ConfigGetResponseSettings, tools: UntypedConfigMap, triggers: UntypedConfigMap, variables: UntypedConfigMap, zarazVersion: S.Number, analytics: S.optional(S.NullOr(ConfigGetResponseAnalytics)), consent: S.optional(S.NullOr(HistoryUpdateResponseConsent)), historyChange: S.optional(S.NullOr(S.Boolean)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutHistoryResponse", }) as any as S.Schema; export type UpdateRequestWorkflow = "realtime" | "preview"; export const UpdateRequestWorkflow = /*@__PURE__*/ S.String; export interface PutZarazRequest { /** Identifier. */ zoneId: string; /** Zaraz workflow. */ workflow: UpdateRequestWorkflow | (string & {}); } export const PutZarazRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), workflow: UpdateRequestWorkflow, }) .pipe( T.Http({ method: "PUT", uri: "/zones/{zone_id}/settings/zaraz/workflow", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutZarazRequest", }) as any as S.Schema; export type UpdateResult = "realtime" | "preview"; export const UpdateResult = /*@__PURE__*/ S.String; export type PutZarazResponse = UpdateResult; export const PutZarazResponse = /*@__PURE__*/ S.suspend(() => UpdateResult.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutZarazResponse", }) as any as S.Schema; export type CreatePublishError = CloudflareOpError; /** Publish current Zaraz preview configuration for a zone. */ export const createPublish: API.OperationMethod< CreatePublishRequest, CreatePublishResponse, CreatePublishError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreatePublishRequest, output: CreatePublishResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetConfigError = Forbidden | NotFound | CloudflareOpError; /** Gets latest Zaraz configuration for a zone. It can be preview or published configuration, whichever was the last updated. Secret variables values will not be included. */ export const getConfig: API.OperationMethod< GetConfigRequest, GetConfigResponse, GetConfigError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetConfigRequest, output: GetConfigResponse, errors: [Forbidden, NotFound, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetDefaultError = CloudflareOpError; /** Gets default Zaraz configuration for a zone. */ export const getDefault: API.OperationMethod< GetDefaultRequest, GetDefaultResponse, GetDefaultError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetDefaultRequest, output: GetDefaultResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetExportError = CloudflareOpError; /** Exports full current published Zaraz configuration for a zone, secret variables included. */ export const getExport: API.OperationMethod< GetExportRequest, GetExportResponse, GetExportError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetExportRequest, output: GetExportResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetHistoryConfigError = CloudflareOpError; /** Gets a history of published Zaraz configurations by ID(s) for a zone. */ export const getHistoryConfig: API.OperationMethod< GetHistoryConfigRequest, GetHistoryConfigResponse, GetHistoryConfigError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetHistoryConfigRequest, output: GetHistoryConfigResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetWorkflowError = Forbidden | NotFound | CloudflareOpError; /** Gets Zaraz workflow for a zone. */ export const getWorkflow: API.OperationMethod< GetWorkflowRequest, GetWorkflowResponse, GetWorkflowError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetWorkflowRequest, output: GetWorkflowResponse, errors: [Forbidden, NotFound, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListHistoriesError = CloudflareOpError; /** Lists a history of published Zaraz configuration records for a zone. */ export const listHistories: API.PaginatedOperationMethod< ListHistoriesRequest, ListHistoriesResponse, ListHistoriesError, CloudflareOpContext, HistoryListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListHistoriesRequest, output: ListHistoriesResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type PutConfigError = CloudflareOpError; /** Updates Zaraz configuration for a zone. */ export const putConfig: API.OperationMethod< PutConfigRequest, PutConfigResponse, PutConfigError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PutConfigRequest, output: PutConfigResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PutHistoryError = CloudflareOpError; /** Restores a historical published Zaraz configuration by ID for a zone. */ export const putHistory: API.OperationMethod< PutHistoryRequest, PutHistoryResponse, PutHistoryError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PutHistoryRequest, output: PutHistoryResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PutZarazError = CloudflareOpError; /** Updates Zaraz workflow for a zone. */ export const putZaraz: API.OperationMethod< PutZarazRequest, PutZarazResponse, PutZarazError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PutZarazRequest, output: PutZarazResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, }));