import {z} from 'zod' export type DeweyDecimal = string; export type DescriptionInCampaignComponentVariableUpdateRequestAsAdminIcon = string | null | string | string; export type ValuesInCampaignComponentVariableRequestAsAdminIcon = Record | string | string | string | string; export type ComponentSettingVariableValuesAsAdminIcon = {[key: string]: ValuesInCampaignComponentVariableRequestAsAdminIcon}; export type DescriptionInCampaignComponentVariableUpdateRequestAsAudienceId = string | null | string | string; export type ValuesInCampaignComponentVariableRequestAsAudienceId = Record | string | string | string | string; export type ComponentSettingVariableValuesAsAudienceId = {[key: string]: ValuesInCampaignComponentVariableRequestAsAudienceId}; export type DescriptionInCampaignComponentVariableUpdateRequestAsAudienceIdList = string | null | string | string; export type ValuesInCampaignComponentVariableRequestAsAudienceIdList = Record | string | string | string | string; export type ComponentSettingVariableValuesAsAudienceIdList = {[key: string]: ValuesInCampaignComponentVariableRequestAsAudienceIdList}; export type DescriptionInCampaignComponentVariableUpdateRequestAsBoolean = string | null | string | string; export type ValuesInCampaignComponentVariableRequestAsBoolean = Record | string | string | string | string; export type ComponentSettingVariableValuesAsBoolean = {[key: string]: ValuesInCampaignComponentVariableRequestAsBoolean}; export type DescriptionInCampaignComponentVariableUpdateRequestAsBrowserSideJavascript = string | null | string | string; export type ValuesInCampaignComponentVariableRequestAsBrowserSideJavascript = Record | string | string | string | string; export type ComponentSettingVariableValuesAsBrowserSideJavascript = {[key: string]: ValuesInCampaignComponentVariableRequestAsBrowserSideJavascript}; export type DescriptionInCampaignComponentVariableUpdateRequestAsClientDomainIdList = string | null | string | string; export type ValuesInCampaignComponentVariableRequestAsClientDomainIdList = Record | string | string | string | string; export type ComponentSettingVariableValuesAsClientDomainIdList = {[key: string]: ValuesInCampaignComponentVariableRequestAsClientDomainIdList}; export type DescriptionInCampaignComponentVariableUpdateRequestAsClientKey = string | null | string | string; export type ValuesInCampaignComponentVariableRequestAsClientKey = Record | string | string | string | string; export type ComponentSettingVariableValuesAsClientKey = {[key: string]: ValuesInCampaignComponentVariableRequestAsClientKey}; export type DescriptionInCampaignComponentClientKeyFlowVariableUpdateRequest = string | null | string | string; export type DefaultInComponentSettingVariableValues = Record | string | string | string | string; export type EnInComponentSettingVariableValues = Record | string | string | string | string; export type ComponentSettingVariableValues = {default?: DefaultInComponentSettingVariableValues | undefined, en?: EnInComponentSettingVariableValues | undefined} | {[key: string]: unknown}; export type DescriptionInCampaignComponentVariableUpdateRequestAsColor = string | null | string | string; export type ValuesInCampaignComponentVariableRequestAsColor = Record | string | string | string | string; export type ComponentSettingVariableValuesAsColor = {[key: string]: ValuesInCampaignComponentVariableRequestAsColor}; export type DescriptionInCampaignComponentComponentIdVariableUpdateRequest = string | null | string | string; export type ComponentIdFilterUpdateRequest = {component_types?: Array | undefined}; export type CapturedSettingValuesDescriptionInCampaignComponentComponentSettingLookupVariableUpdateRequest = string | string; export type DescriptionInCampaignComponentComponentSettingLookupVariableUpdateRequest = string | null | string | string; export type ComponentTypeSettingFilterUpdateRequest = {type: 'COMPONENT_TYPE', component_type?: string | undefined}; export type ExpressionInExpressionSettingFilterUpdateRequest = boolean | string | string; export type ExpressionSettingFilterUpdateRequest = {type: 'EXPRESSION', expression: ExpressionInExpressionSettingFilterUpdateRequest}; export type ComponentFacetSettingFilterUpdateRequest = {type: 'FACET', name?: string | undefined, value?: string | undefined}; export type SettingFilterUpdateRequest = ComponentTypeSettingFilterUpdateRequest | ExpressionSettingFilterUpdateRequest | ComponentFacetSettingFilterUpdateRequest; export type DescriptionInCampaignComponentVariableUpdateRequestAsCss = string | null | string | string; export type ValuesInCampaignComponentVariableRequestAsCss = Record | string | string | string | string; export type ComponentSettingVariableValuesAsCss = {[key: string]: ValuesInCampaignComponentVariableRequestAsCss}; export type DescriptionInCampaignComponentVariableUpdateRequestAsDelay = string | null | string | string; export type ValuesInCampaignComponentVariableRequestAsDelay = Record | string | string | string | string; export type ComponentSettingVariableValuesAsDelay = {[key: string]: ValuesInCampaignComponentVariableRequestAsDelay}; export type DescriptionInCampaignComponentVariableUpdateRequestAsDelayList = string | null | string | string; export type ValuesInCampaignComponentVariableRequestAsDelayList = Record | string | string | string | string; export type ComponentSettingVariableValuesAsDelayList = {[key: string]: ValuesInCampaignComponentVariableRequestAsDelayList}; export type DescriptionInCampaignComponentEnumVariableUpdateRequest = string | null | string | string; export type DescriptionInCampaignComponentEnumListVariableUpdateRequest = string | null | string | string; export type DescriptionInCampaignComponentVariableUpdateRequestAsExtoleClientKey = string | null | string | string; export type ValuesInCampaignComponentVariableRequestAsExtoleClientKey = Record | string | string | string | string; export type ComponentSettingVariableValuesAsExtoleClientKey = {[key: string]: ValuesInCampaignComponentVariableRequestAsExtoleClientKey}; export type DescriptionInCampaignComponentVariableUpdateRequestAsFont = string | null | string | string; export type ValuesInCampaignComponentVariableRequestAsFont = Record | string | string | string | string; export type ComponentSettingVariableValuesAsFont = {[key: string]: ValuesInCampaignComponentVariableRequestAsFont}; export type DescriptionInCampaignComponentVariableUpdateRequestAsGlobComponentPath = string | null | string | string; export type ValuesInCampaignComponentVariableRequestAsGlobComponentPath = Record | string | string | string | string; export type ComponentSettingVariableValuesAsGlobComponentPath = {[key: string]: ValuesInCampaignComponentVariableRequestAsGlobComponentPath}; export type DescriptionInCampaignComponentVariableUpdateRequestAsHtml = string | null | string | string; export type ValuesInCampaignComponentVariableRequestAsHtml = Record | string | string | string | string; export type ComponentSettingVariableValuesAsHtml = {[key: string]: ValuesInCampaignComponentVariableRequestAsHtml}; export type DescriptionInCampaignComponentVariableUpdateRequestAsImage = string | null | string | string; export type ValuesInCampaignComponentVariableRequestAsImage = Record | string | string | string | string; export type ComponentSettingVariableValuesAsImage = {[key: string]: ValuesInCampaignComponentVariableRequestAsImage}; export type DescriptionInCampaignComponentVariableUpdateRequestAsInteger = string | null | string | string; export type ValuesInCampaignComponentVariableRequestAsInteger = Record | string | string | string | string; export type ComponentSettingVariableValuesAsInteger = {[key: string]: ValuesInCampaignComponentVariableRequestAsInteger}; export type DescriptionInCampaignComponentVariableUpdateRequestAsIntegerList = string | null | string | string; export type ValuesInCampaignComponentVariableRequestAsIntegerList = Record | string | string | string | string; export type ComponentSettingVariableValuesAsIntegerList = {[key: string]: ValuesInCampaignComponentVariableRequestAsIntegerList}; export type DescriptionInCampaignComponentVariableUpdateRequestAsJson = string | null | string | string; export type ValuesInCampaignComponentVariableRequestAsJson = Record | string | string | string | string; export type ComponentSettingVariableValuesAsJson = {[key: string]: ValuesInCampaignComponentVariableRequestAsJson}; export type DescriptionInCampaignComponentSocketUpdateRequestAsMultiSocket = string | null | string | string; export type DescriptionInCampaignComponentVariableRequest = string | null | string | string; export type CampaignComponentVariableRequest = {description?: DescriptionInCampaignComponentVariableRequest | undefined, display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, tags?: Array | undefined, type?: ('ADMIN_ICON' | 'AUDIENCE_ID' | 'AUDIENCE_ID_LIST' | 'BOOLEAN' | 'BROWSER_SIDE_JAVASCRIPT' | 'CLIENT_DOMAIN_ID_LIST' | 'CLIENT_KEY' | 'CLIENT_KEY_FLOW' | 'COLOR' | 'COMPONENT_ID' | 'COMPONENT_SETTING_LOOKUP' | 'CSS' | 'DELAY' | 'DELAY_LIST' | 'ENUM' | 'ENUM_LIST' | 'EXTOLE_CLIENT_KEY' | 'FONT' | 'GLOB_COMPONENT_PATH' | 'HTML' | 'IMAGE' | 'INTEGER' | 'INTEGER_LIST' | 'JSON' | 'MULTI_SOCKET' | 'PARTNER_ENUM' | 'PARTNER_ENUM_LIST' | 'PERSON_KEY_NAME' | 'REWARD_SUPPLIER_ID' | 'REWARD_SUPPLIER_ID_LIST' | 'SOCKET' | 'STRING' | 'STRING_LIST' | 'STRING_MAP' | 'URL' | 'WEBHOOK_ID') | undefined, values?: ComponentSettingVariableValues | undefined}; export type DescriptionInCampaignComponentPartnerEnumVariableUpdateRequest = string | null | string | string; export type WebhookIdInCampaignComponentPartnerEnumVariableUpdateRequest = Record | null | string | string; export type PartnerEnumListVariableOptionCreateRequest = {id?: string | undefined, name?: string | undefined}; export type DescriptionInCampaignComponentPartnerEnumListVariableUpdateRequest = string | null | string | string; export type WebhookIdInCampaignComponentPartnerEnumListVariableUpdateRequest = Record | null | string | string; export type DescriptionInCampaignComponentVariableUpdateRequestAsPersonKeyName = string | null | string | string; export type ValuesInCampaignComponentVariableRequestAsPersonKeyName = Record | string | string | string | string; export type ComponentSettingVariableValuesAsPersonKeyName = {[key: string]: ValuesInCampaignComponentVariableRequestAsPersonKeyName}; export type DescriptionInCampaignComponentVariableUpdateRequestAsRewardSupplierId = string | null | string | string; export type ValuesInCampaignComponentVariableRequestAsRewardSupplierId = Record | string | string | string | string; export type ComponentSettingVariableValuesAsRewardSupplierId = {[key: string]: ValuesInCampaignComponentVariableRequestAsRewardSupplierId}; export type AllowedRewardSupplierIdsInCampaignComponentRewardSupplierIdListVariableUpdateRequest = Array | string | string; export type DescriptionInCampaignComponentRewardSupplierIdListVariableUpdateRequest = string | null | string | string; export type DescriptionInCampaignComponentSocketUpdateRequestAsSocket = string | null | string | string; export type DescriptionInCampaignComponentVariableUpdateRequestAsString = string | null | string | string; export type ValuesInCampaignComponentVariableRequestAsString = Record | string | string | string | string; export type ComponentSettingVariableValuesAsString = {[key: string]: ValuesInCampaignComponentVariableRequestAsString}; export type DescriptionInCampaignComponentVariableUpdateRequestAsStringList = string | null | string | string; export type ValuesInCampaignComponentVariableRequestAsStringList = Record | string | string | string | string; export type ComponentSettingVariableValuesAsStringList = {[key: string]: ValuesInCampaignComponentVariableRequestAsStringList}; export type DescriptionInCampaignComponentStringMapVariableUpdateRequest = string | null | string | string; export type DescriptionInCampaignComponentVariableUpdateRequestAsUrl = string | null | string | string; export type ValuesInCampaignComponentVariableRequestAsUrl = Record | string | string | string | string; export type ComponentSettingVariableValuesAsUrl = {[key: string]: ValuesInCampaignComponentVariableRequestAsUrl}; export type DescriptionInCampaignComponentVariableUpdateRequestAsWebhookId = string | null | string | string; export type ValuesInCampaignComponentVariableRequestAsWebhookId = Record | string | string | string | string; export type ComponentSettingVariableValuesAsWebhookId = {[key: string]: ValuesInCampaignComponentVariableRequestAsWebhookId}; export type CampaignComponentSettingUpdateRequest = {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'ADMIN_ICON', description?: DescriptionInCampaignComponentVariableUpdateRequestAsAdminIcon | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValuesAsAdminIcon | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'AUDIENCE_ID', description?: DescriptionInCampaignComponentVariableUpdateRequestAsAudienceId | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValuesAsAudienceId | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'AUDIENCE_ID_LIST', description?: DescriptionInCampaignComponentVariableUpdateRequestAsAudienceIdList | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValuesAsAudienceIdList | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'BOOLEAN', description?: DescriptionInCampaignComponentVariableUpdateRequestAsBoolean | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValuesAsBoolean | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'BROWSER_SIDE_JAVASCRIPT', description?: DescriptionInCampaignComponentVariableUpdateRequestAsBrowserSideJavascript | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValuesAsBrowserSideJavascript | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'CLIENT_DOMAIN_ID_LIST', description?: DescriptionInCampaignComponentVariableUpdateRequestAsClientDomainIdList | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValuesAsClientDomainIdList | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'CLIENT_KEY', description?: DescriptionInCampaignComponentVariableUpdateRequestAsClientKey | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValuesAsClientKey | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'CLIENT_KEY_FLOW', authorization_url?: string | undefined, client_secret_key_id?: string | undefined, description?: DescriptionInCampaignComponentClientKeyFlowVariableUpdateRequest | undefined, redirect_url?: string | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValues | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'COLOR', description?: DescriptionInCampaignComponentVariableUpdateRequestAsColor | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValuesAsColor | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'COMPONENT_ID', description?: DescriptionInCampaignComponentComponentIdVariableUpdateRequest | undefined, filter?: ComponentIdFilterUpdateRequest | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValues | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'COMPONENT_SETTING_LOOKUP', capture_settings?: Array | undefined, captured_setting_values_description?: CapturedSettingValuesDescriptionInCampaignComponentComponentSettingLookupVariableUpdateRequest | undefined, description?: DescriptionInCampaignComponentComponentSettingLookupVariableUpdateRequest | undefined, filters?: Array | undefined, matching_filters?: Array | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValues | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'CSS', description?: DescriptionInCampaignComponentVariableUpdateRequestAsCss | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValuesAsCss | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'DELAY', description?: DescriptionInCampaignComponentVariableUpdateRequestAsDelay | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValuesAsDelay | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'DELAY_LIST', description?: DescriptionInCampaignComponentVariableUpdateRequestAsDelayList | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValuesAsDelayList | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'ENUM', allowed_values?: Array | undefined, description?: DescriptionInCampaignComponentEnumVariableUpdateRequest | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValues | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'ENUM_LIST', allowed_values?: Array | undefined, description?: DescriptionInCampaignComponentEnumListVariableUpdateRequest | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValues | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'EXTOLE_CLIENT_KEY', description?: DescriptionInCampaignComponentVariableUpdateRequestAsExtoleClientKey | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValuesAsExtoleClientKey | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'FONT', description?: DescriptionInCampaignComponentVariableUpdateRequestAsFont | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValuesAsFont | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'GLOB_COMPONENT_PATH', description?: DescriptionInCampaignComponentVariableUpdateRequestAsGlobComponentPath | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValuesAsGlobComponentPath | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'HTML', description?: DescriptionInCampaignComponentVariableUpdateRequestAsHtml | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValuesAsHtml | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'IMAGE', description?: DescriptionInCampaignComponentVariableUpdateRequestAsImage | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValuesAsImage | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'INTEGER', description?: DescriptionInCampaignComponentVariableUpdateRequestAsInteger | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValuesAsInteger | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'INTEGER_LIST', description?: DescriptionInCampaignComponentVariableUpdateRequestAsIntegerList | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValuesAsIntegerList | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'JSON', description?: DescriptionInCampaignComponentVariableUpdateRequestAsJson | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValuesAsJson | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'MULTI_SOCKET', description?: DescriptionInCampaignComponentSocketUpdateRequestAsMultiSocket | undefined, filters?: Array | undefined, parameters?: Array | undefined, socketed_component_ids?: Array | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'PARTNER_ENUM', description?: DescriptionInCampaignComponentPartnerEnumVariableUpdateRequest | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValues | undefined, webhook_id?: WebhookIdInCampaignComponentPartnerEnumVariableUpdateRequest | undefined, options?: Array | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'PARTNER_ENUM_LIST', description?: DescriptionInCampaignComponentPartnerEnumListVariableUpdateRequest | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValues | undefined, webhook_id?: WebhookIdInCampaignComponentPartnerEnumListVariableUpdateRequest | undefined, options?: Array | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'PERSON_KEY_NAME', description?: DescriptionInCampaignComponentVariableUpdateRequestAsPersonKeyName | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValuesAsPersonKeyName | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'REWARD_SUPPLIER_ID', description?: DescriptionInCampaignComponentVariableUpdateRequestAsRewardSupplierId | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValuesAsRewardSupplierId | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'REWARD_SUPPLIER_ID_LIST', allowed_reward_supplier_ids?: AllowedRewardSupplierIdsInCampaignComponentRewardSupplierIdListVariableUpdateRequest | undefined, description?: DescriptionInCampaignComponentRewardSupplierIdListVariableUpdateRequest | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValues | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'SOCKET', description?: DescriptionInCampaignComponentSocketUpdateRequestAsSocket | undefined, filters?: Array | undefined, parameters?: Array | undefined, socketed_component_ids?: Array | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'STRING', description?: DescriptionInCampaignComponentVariableUpdateRequestAsString | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValuesAsString | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'STRING_LIST', description?: DescriptionInCampaignComponentVariableUpdateRequestAsStringList | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValuesAsStringList | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'STRING_MAP', allowed_keys?: Array | undefined, description?: DescriptionInCampaignComponentStringMapVariableUpdateRequest | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValues | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'URL', description?: DescriptionInCampaignComponentVariableUpdateRequestAsUrl | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValuesAsUrl | undefined} | {display_name?: (string | null) | undefined, name?: string | undefined, priority?: DeweyDecimal | undefined, tags?: Array | undefined, type: 'WEBHOOK_ID', description?: DescriptionInCampaignComponentVariableUpdateRequestAsWebhookId | undefined, source?: ('INHERITED' | 'LOCAL' | 'PARAMETER') | undefined, values?: ComponentSettingVariableValuesAsWebhookId | undefined}; export type UpdateApiV1ComponentsComponentIdSettingsSettingNameArgs = {component_id: string, setting_name: string, body: CampaignComponentSettingUpdateRequest}; export type UpdateApiV1ComponentsComponentIdSettingsSettingNameOptions = {baseUrl?: string | undefined, HEADER?: string | undefined, fetch?: typeof fetch | undefined}; export const descriptionInCampaignComponentSettingResponseBase = z.union([z.string(), z.string(), z.string()]); export const deweyDecimal = z.string(); export const defaultInComponentSettingVariableValuesOpenApiDocumentation = z.union([z.object({}), z.string(), z.string(), z.string(), z.string()]); export const enInComponentSettingVariableValuesOpenApiDocumentation = z.union([z.object({}), z.string(), z.string(), z.string(), z.string()]); export const componentIdFilterResponse = z.object({component_types: z.array(z.string()).optional()}); export const capturedSettingValuesDescriptionInCampaignComponentComponentSettingLookupVariableResponse = z.union([z.string(), z.string()]); export const componentTypeSettingFilterResponse = z.object({type: z.literal("COMPONENT_TYPE"), component_type: z.string()}); export const expressionInExpressionSettingFilterResponse = z.union([z.boolean(), z.string(), z.string()]); export const expressionSettingFilterResponse = z.object({type: z.literal("EXPRESSION"), expression: expressionInExpressionSettingFilterResponse}); export const componentFacetSettingFilterResponse = z.object({type: z.literal("FACET"), name: z.string(), value: z.string()}); export const settingFilterResponse = z.discriminatedUnion("type", [componentTypeSettingFilterResponse, expressionSettingFilterResponse, componentFacetSettingFilterResponse]); export const descriptionInCampaignComponentVariableResponse = z.union([z.string(), z.string(), z.string()]); export const defaultInComponentSettingVariableValues = z.union([z.object({}), z.string(), z.string(), z.string(), z.string()]); export const enInComponentSettingVariableValues = z.union([z.object({}), z.string(), z.string(), z.string(), z.string()]); export const componentSettingVariableValues = z.object({default: defaultInComponentSettingVariableValues.optional(), en: enInComponentSettingVariableValues.optional()}).and(z.record(z.string(), z.unknown())); export const campaignComponentVariableResponse = z.object({description: descriptionInCampaignComponentVariableResponse.optional(), display_name: z.string().optional(), name: z.string().optional(), priority: deweyDecimal.optional(), source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]).optional(), tags: z.array(z.string()).optional(), type: z.enum(["ADMIN_ICON", "AUDIENCE_ID", "AUDIENCE_ID_LIST", "BOOLEAN", "BROWSER_SIDE_JAVASCRIPT", "CLIENT_DOMAIN_ID_LIST", "CLIENT_KEY", "CLIENT_KEY_FLOW", "COLOR", "COMPONENT_ID", "COMPONENT_SETTING_LOOKUP", "CSS", "DELAY", "DELAY_LIST", "ENUM", "ENUM_LIST", "EXTOLE_CLIENT_KEY", "FONT", "GLOB_COMPONENT_PATH", "HTML", "IMAGE", "INTEGER", "INTEGER_LIST", "JSON", "MULTI_SOCKET", "PARTNER_ENUM", "PARTNER_ENUM_LIST", "PERSON_KEY_NAME", "REWARD_SUPPLIER_ID", "REWARD_SUPPLIER_ID_LIST", "SOCKET", "STRING", "STRING_LIST", "STRING_MAP", "URL", "WEBHOOK_ID"]).optional(), values: componentSettingVariableValues.optional()}); export const webhookIdInCampaignComponentPartnerEnumVariableResponse = z.union([z.string(), z.string(), z.string()]); export const partnerEnumListVariableOptionResponse = z.object({id: z.string().optional(), name: z.string().optional()}); export const webhookIdInCampaignComponentPartnerEnumListVariableResponse = z.union([z.string(), z.string(), z.string()]); export const allowedRewardSupplierIdsInCampaignComponentRewardSupplierIdListVariableResponse = z.union([z.array(z.string()), z.string(), z.string()]); export const campaignComponentSettingResponse = z.discriminatedUnion("type", [z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("ADMIN_ICON"), source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]).optional(), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown())).optional()}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("AUDIENCE_ID"), source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]).optional(), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown())).optional()}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("AUDIENCE_ID_LIST"), source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]).optional(), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown())).optional()}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("BOOLEAN"), source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]).optional(), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown())).optional()}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("BROWSER_SIDE_JAVASCRIPT"), source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]).optional(), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown())).optional()}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("CLIENT_DOMAIN_ID_LIST"), source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]).optional(), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown())).optional()}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("CLIENT_KEY"), source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]).optional(), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown())).optional()}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("CLIENT_KEY_FLOW"), authorization_url: z.string(), client_secret_key_id: z.string(), redirect_url: z.string(), source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown()))}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("COLOR"), source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]).optional(), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown())).optional()}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("COMPONENT_ID"), filter: componentIdFilterResponse, source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown()))}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("COMPONENT_SETTING_LOOKUP"), capture_settings: z.array(z.string()), captured_setting_values_description: capturedSettingValuesDescriptionInCampaignComponentComponentSettingLookupVariableResponse, filters: z.array(settingFilterResponse), matching_filters: z.array(settingFilterResponse), source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown()))}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("CSS"), source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]).optional(), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown())).optional()}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("DELAY"), source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]).optional(), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown())).optional()}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("DELAY_LIST"), source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]).optional(), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown())).optional()}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("ENUM"), allowed_values: z.array(z.string()), source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown()))}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("ENUM_LIST"), allowed_values: z.array(z.string()), source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown()))}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("EXTOLE_CLIENT_KEY"), source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]).optional(), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown())).optional()}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("FONT"), source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]).optional(), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown())).optional()}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("GLOB_COMPONENT_PATH"), source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]).optional(), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown())).optional()}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("HTML"), source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]).optional(), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown())).optional()}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("IMAGE"), source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]).optional(), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown())).optional()}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("INTEGER"), source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]).optional(), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown())).optional()}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("INTEGER_LIST"), source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]).optional(), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown())).optional()}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("JSON"), source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]).optional(), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown())).optional()}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("MULTI_SOCKET"), filters: z.array(settingFilterResponse), parameters: z.array(campaignComponentVariableResponse), socketed_component_ids: z.array(z.string())}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("PARTNER_ENUM"), source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown())), webhook_id: webhookIdInCampaignComponentPartnerEnumVariableResponse, options: z.array(partnerEnumListVariableOptionResponse)}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("PARTNER_ENUM_LIST"), source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown())), webhook_id: webhookIdInCampaignComponentPartnerEnumListVariableResponse, options: z.array(partnerEnumListVariableOptionResponse)}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("PERSON_KEY_NAME"), source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]).optional(), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown())).optional()}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("REWARD_SUPPLIER_ID"), source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]).optional(), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown())).optional()}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("REWARD_SUPPLIER_ID_LIST"), allowed_reward_supplier_ids: allowedRewardSupplierIdsInCampaignComponentRewardSupplierIdListVariableResponse, source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown()))}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("SOCKET"), filters: z.array(settingFilterResponse), parameters: z.array(campaignComponentVariableResponse), socketed_component_ids: z.array(z.string())}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("STRING"), source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]).optional(), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown())).optional()}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("STRING_LIST"), source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]).optional(), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown())).optional()}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("STRING_MAP"), allowed_keys: z.array(z.string()), source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown()))}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("URL"), source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]).optional(), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown())).optional()}), z.object({description: descriptionInCampaignComponentSettingResponseBase, display_name: z.string(), name: z.string(), priority: deweyDecimal, tags: z.array(z.string()), type: z.literal("WEBHOOK_ID"), source: z.enum(["INHERITED", "LOCAL", "PARAMETER"]).optional(), values: z.object({default: defaultInComponentSettingVariableValuesOpenApiDocumentation.optional(), en: enInComponentSettingVariableValuesOpenApiDocumentation.optional()}).and(z.record(z.string(), z.unknown())).optional()})]); export const validateResponse = async ( schema: { readonly '~standard': { readonly validate: (value: unknown) => ({ readonly value: Output; readonly issues?: undefined } | { readonly issues: ReadonlyArray<{ readonly message: string; readonly path?: ReadonlyArray | undefined }> }) | Promise<{ readonly value: Output; readonly issues?: undefined } | { readonly issues: ReadonlyArray<{ readonly message: string; readonly path?: ReadonlyArray | undefined }> }> } }, value: unknown ): Promise => { const result = await schema['~standard'].validate(value) if (result.issues !== undefined) { const detail = result.issues .map(({ message, path }) => path?.length ? `${path.map((segment) => String(typeof segment === 'object' ? segment.key : segment)).join('.')}: ${message}` : message ) .join('; ') throw new Error(`Response does not match the schema: ${detail}`, { cause: { issues: result.issues } }) } return result.value }; /** * Update a component setting * * PUT /v1/components/{component_id}/settings/{setting_name} * * Also accepts auth: QUERY, COOKIE */ export const updateApiV1ComponentsComponentIdSettingsSettingName = async (args: UpdateApiV1ComponentsComponentIdSettingsSettingNameArgs, options?: UpdateApiV1ComponentsComponentIdSettingsSettingNameOptions) => { const {baseUrl = "https://api.extole.io", fetch: fetchFn = fetch, HEADER} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") headers.set('accept', "application/json") if (HEADER !== undefined) headers.set("Authorization", HEADER) const url = `${baseUrl.replace(/\/+$/, '')}/v1/components/${encodeURIComponent(String(args.component_id))}/settings/${encodeURIComponent(String(args.setting_name))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return validateResponse(campaignComponentSettingResponse, await res.json()) };