/** * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen} * * Generates Typescript types for analytics events from analytics.spec.yaml * * @codegen <> * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen link-datasource */ import { type AnalyticsEventAttributes, type EventKey } from './analytics.types'; type OptionalIfUndefined = undefined extends T ? [ param?: T ] : [ param: T ]; export type EventPayloadAttributes = OptionalIfUndefined; type EventTypes = 'ui' | 'track' | 'operational' | 'screen'; type ScreenEventPayload = { eventType: 'screen'; name: string; action: 'viewed'; attributes?: AnalyticsEventAttributes[K]; }; type EventPayload = { eventType: Omit; actionSubject: string; action: string; actionSubjectId?: string; attributes?: AnalyticsEventAttributes[K]; }; declare const createEventPayload: (eventKey: K, ...[attributes]: EventPayloadAttributes) => ScreenEventPayload | EventPayload; export default createEventPayload;