70 lines
1.5 KiB
TypeScript
70 lines
1.5 KiB
TypeScript
import { ImageName } from "../constants";
|
|
|
|
export type CtaData = {
|
|
url: string;
|
|
type?: string;
|
|
parameters?: Array<LineItem>;
|
|
additionalParameters?: Array<LineItem>;
|
|
data?: any;
|
|
finish?: boolean;
|
|
screenKey?: string;
|
|
title?: string;
|
|
analyticsEventProperties?: AnalyticsEvent;
|
|
};
|
|
|
|
export type AnalyticsEvent = {
|
|
name: string;
|
|
properties?: Record<string, string>;
|
|
};
|
|
|
|
type LineItem = {
|
|
key?: string;
|
|
value?: string | null;
|
|
data?: any | null;
|
|
};
|
|
|
|
export interface BaseNavigator {
|
|
navigate(navigationRef: any, ctaData: CtaData): any;
|
|
goBack(navigationRef: any): any;
|
|
push(navigationRef: any, ctaData: CtaData): any;
|
|
}
|
|
|
|
export enum NavigationType {
|
|
NAVIGATE = "navigate",
|
|
GO_BACK = "goBack",
|
|
PUSH = "push",
|
|
}
|
|
|
|
export interface CtaParameter {
|
|
key: string;
|
|
value: string | undefined | null;
|
|
}
|
|
|
|
export interface StaticHeaderProperties {
|
|
leftIcon?: keyof typeof ImageName;
|
|
rightIcon?: keyof typeof ImageName;
|
|
leftIconCta?: CtaData | null;
|
|
rightIconCta?: CtaData | null;
|
|
}
|
|
|
|
export enum ParameterType {
|
|
PRE_QUOTE_ID = "preQuoteId",
|
|
QUOTE_ID = "quoteId",
|
|
NAVIGATOR_TYPE = "RnNavigatorType",
|
|
PLAN_ID = "planId",
|
|
BENEFIT_TYPE = "benefitType",
|
|
SOURCE_SCREEN = "sourceScreen",
|
|
APPLICATION_ID = "applicationId",
|
|
SOURCE = "source",
|
|
}
|
|
|
|
export enum CtaType {
|
|
DEEP_LINK = "DEEP_LINK",
|
|
DISMISS_MODAL = "DISMISS_MODAL",
|
|
USE_ROOT_DEEPLINK_NAVIGATOR = "USE_ROOT_DEEPLINK_NAVIGATOR",
|
|
RN_NAVIGATOR = "RN_NAVIGATOR",
|
|
RN_PUSH = "RN_PUSH",
|
|
RN_NAVIGATE = "RN_NAVIGATE",
|
|
GO_BACK = "GO_BACK",
|
|
}
|