import * as _walkeros_core_dev from '@walkeros/core/dev'; import { z } from '@walkeros/core/dev'; import { Mapping as Mapping$1, Flow } from '@walkeros/core'; import { DestinationServer } from '@walkeros/server-core'; declare const SettingsSchema: z.ZodObject<{ siteId: z.ZodString; apiKey: z.ZodString; appApiKey: z.ZodOptional; region: z.ZodOptional>; timeout: z.ZodOptional; customerId: z.ZodOptional; anonymousId: z.ZodOptional; identify: z.ZodOptional; }, z.core.$strip>; type Settings$1 = z.infer; declare const MappingSchema: z.ZodObject<{ identify: z.ZodOptional; page: z.ZodOptional; destroy: z.ZodOptional; suppress: z.ZodOptional; unsuppress: z.ZodOptional; addDevice: z.ZodOptional; deleteDevice: z.ZodOptional; merge: z.ZodOptional; sendEmail: z.ZodOptional; sendPush: z.ZodOptional; }, z.core.$strip>; type Mapping = z.infer; declare const settings: _walkeros_core_dev.JSONSchema; declare const mapping: _walkeros_core_dev.JSONSchema; type index$1_Mapping = Mapping; declare const index$1_MappingSchema: typeof MappingSchema; declare const index$1_SettingsSchema: typeof SettingsSchema; declare const index$1_mapping: typeof mapping; declare const index$1_settings: typeof settings; declare namespace index$1 { export { type index$1_Mapping as Mapping, index$1_MappingSchema as MappingSchema, type Settings$1 as Settings, index$1_SettingsSchema as SettingsSchema, index$1_mapping as mapping, index$1_settings as settings }; } /** * Mock-friendly interface for the TrackClient methods the * destination actually calls. Tests provide this via env.trackClient * instead of the real SDK. */ interface CustomerIoTrackClientMock { identify: (customerId: string | number, attributes: Record) => Promise; track: (customerId: string | number, eventData: { name: string; data?: Record; timestamp?: number; }) => Promise; trackAnonymous: (anonymousId: string, eventData: { name: string; data?: Record; timestamp?: number; }) => Promise; trackPageView: (customerId: string | number, url: string, data?: Record) => Promise; destroy: (customerId: string | number) => Promise; suppress: (customerId: string | number) => Promise; unsuppress: (customerId: string | number) => Promise; addDevice: (customerId: string | number, deviceId: string, platform: string, data?: Record) => Promise; deleteDevice: (customerId: string | number, deviceId: string, platform: string) => Promise; mergeCustomers: (primaryType: string, primaryId: string, secondaryType: string, secondaryId: string) => Promise; } /** * Mock-friendly interface for the APIClient methods the * destination actually calls. Tests provide this via env.apiClient * instead of the real SDK. */ interface CustomerIoApiClientMock { sendEmail: (request: unknown) => Promise; sendPush: (request: unknown) => Promise; } interface Settings { /** Customer.io Site ID (required for Track API). */ siteId: string; /** Customer.io API Key (required for Track API). */ apiKey: string; /** App API Key for transactional messaging (optional). */ appApiKey?: string; /** Region: 'us' or 'eu'. Default: 'us'. */ region?: 'us' | 'eu'; /** HTTP request timeout in ms. Default: 10000. */ timeout?: number; /** walkerOS mapping value path to resolve customerId from each event. */ customerId?: string; /** walkerOS mapping value path to resolve anonymousId from each event. */ anonymousId?: string; /** Destination-level identify mapping (fires identify() on first push / change). */ identify?: Mapping$1.Value; /** Runtime state -- not user-facing. */ _trackClient?: CustomerIoTrackClientMock; _apiClient?: CustomerIoApiClientMock; _state?: RuntimeState; } interface RuntimeState { lastIdentity?: { customerId?: string; attributesHash?: string; }; } /** * Env -- optional SDK override. Production leaves this undefined and the * destination creates real TrackClient/APIClient instances. Tests provide * mocks via env.trackClient and env.apiClient. */ interface Env extends DestinationServer.Env { trackClient?: CustomerIoTrackClientMock; apiClient?: CustomerIoApiClientMock; } declare const push: Env; declare const simulation: string[]; declare const env_push: typeof push; declare const env_simulation: typeof simulation; declare namespace env { export { env_push as push, env_simulation as simulation }; } /** * Extended step example that may carry destination-level settings overrides. */ type CustomerIoStepExample = Flow.StepExample & { settings?: Partial; }; /** * Default event forwarding -- trackClient.track() with event name and data. * customerId resolved from default settings.customerId = 'user.id'. */ declare const defaultTrack: CustomerIoStepExample; /** * Mapped event name -- mapping.name renames the event for Customer.io. */ declare const mappedEventName: CustomerIoStepExample; /** * Track with mapped data properties. */ declare const mappedData: CustomerIoStepExample; /** * Anonymous event -- no customerId resolved, falls back to trackAnonymous(). */ declare const anonymousTrack: CustomerIoStepExample; /** * Destination-level identify -- fires trackClient.identify() on first push * when settings.identify mapping resolves. Then fires trackClient.track(). */ declare const destinationIdentify: CustomerIoStepExample; /** * Per-event identify with silent -- user login fires identify() only. */ declare const userLoginIdentify: CustomerIoStepExample; /** * Page view -- fires trackClient.trackPageView() with url. * silent: true suppresses track(); settings.page fires trackPageView(). */ declare const pageView: CustomerIoStepExample; /** * Destroy -- permanently deletes a person from Customer.io. */ declare const destroyPerson: CustomerIoStepExample; /** * Suppress -- stops messaging without deleting data. */ declare const suppressPerson: CustomerIoStepExample; /** * Unsuppress -- resumes messaging for a suppressed person. */ declare const unsuppressPerson: CustomerIoStepExample; /** * Wildcard ignore -- the event matches a mapping rule with ignore: true. * The destination fires zero SDK calls. */ declare const wildcardIgnored: CustomerIoStepExample; type step_CustomerIoStepExample = CustomerIoStepExample; declare const step_anonymousTrack: typeof anonymousTrack; declare const step_defaultTrack: typeof defaultTrack; declare const step_destinationIdentify: typeof destinationIdentify; declare const step_destroyPerson: typeof destroyPerson; declare const step_mappedData: typeof mappedData; declare const step_mappedEventName: typeof mappedEventName; declare const step_pageView: typeof pageView; declare const step_suppressPerson: typeof suppressPerson; declare const step_unsuppressPerson: typeof unsuppressPerson; declare const step_userLoginIdentify: typeof userLoginIdentify; declare const step_wildcardIgnored: typeof wildcardIgnored; declare namespace step { export { type step_CustomerIoStepExample as CustomerIoStepExample, step_anonymousTrack as anonymousTrack, step_defaultTrack as defaultTrack, step_destinationIdentify as destinationIdentify, step_destroyPerson as destroyPerson, step_mappedData as mappedData, step_mappedEventName as mappedEventName, step_pageView as pageView, step_suppressPerson as suppressPerson, step_unsuppressPerson as unsuppressPerson, step_userLoginIdentify as userLoginIdentify, step_wildcardIgnored as wildcardIgnored }; } declare const index_env: typeof env; declare const index_step: typeof step; declare namespace index { export { index_env as env, index_step as step }; } export { index as examples, index$1 as schemas };