UNPKG

@causalfoundry/react-native-cf-loyalty

Version:

causalfoundry.ai SDK for tracking logs for Loyalty content block.

313 lines (289 loc) 5.57 kB
// ENUMS export enum MilestoneAction { Achieved = "achieved" } export enum PromoAction { View = "view", Apply = "apply" } export enum PromoType { AddToCart = "add_to_cart", Coupon = "coupon" } export enum PromoItemType { Blood = "blood", Oxygen = "oxygen", Drug = "drug", Facility = "facility", Electronics = "electronics", Clothing = "clothing", Book = "book", Misc = "misc" } export enum SurveyType { OpenEnded = "open_ended", ClosedEnded = "closed_ended", Nominal = "nominal", LikertScale = "likert_scale", RatingScale = "rating_scale", YesNo = "yes_no", Interview = "interview", Other = "other" } export enum SurveyAction { View = "view", Impression = "impression", Start = "start", Submit = "submit" } export enum RewardAction { View = "view", Add = "add", Redeem = "redeem" } export enum RedeemType { Cash = "cash", Airtime = "airtime", Other = "other" } //ITEM PROPERTIES export interface PromoItemDetail { id: string, type: PromoItemType, facility_id?: string, } // EVENT PROPERTIES export interface LevelProperties { previous_level: number, new_level: number, module_id: string } export interface MilestoneProperties { id: string, //milestone_id action: MilestoneAction } export interface PromoProperties { id: string, action: PromoAction, title: string, type: PromoType, items: Array<PromoItemDetail> } export interface SurveyObject { id: string, type: SurveyType, is_completed: Boolean, reward_id?: string } export interface SurveyResponseItem { id: string, type: SurveyType, question: string, response?: string, } export interface SurveyEventProperties { action: SurveyAction, survey: SurveyObject, response?: Array<SurveyResponseItem>, } export interface RedeemObject { type: RedeemType, points_withdrawn: string, converted_value: number, currency: CurrencyCode, is_successful: boolean, } export interface RewardEventProperties { id: string, action: RewardAction, acc_points?: number, total_points: number, redeem: RedeemObject } // CATALOG OBJECTS export interface SurveyProperties { name: string, description?: string, duration?: number, type: string, reward_id?: string questions_list: Array<string>, creation_date?: number, expiry_date?: number, organization_id?: string, organization_name?: string } export interface RewardProperties { name: string, description?: string, type: string, required_points: number creation_date?: number, expiry_date?: number, organization_id?: string, organization_name?: string } export enum CurrencyCode { AED = "AED", AFN = "AFN", ALL = "ALL", AMD = "AMD", ANG = "ANG", AOA = "AOA", ARS = "ARS", AUD = "AUD", AWG = "AWG", AZN = "AZN", BAM = "BAM", BBD = "BBD", BDT = "BDT", BGN = "BGN", BHD = "BHD", BIF = "BIF", BMD = "BMD", BND = "BND", BOB = "BOB", BRL = "BRL", BSD = "BSD", BTN = "BTN", BWP = "BWP", BYR = "BYR", BZD = "BZD", CAD = "CAD", CDF = "CDF", CHF = "CHF", CLP = "CLP", CNY = "CNY", COP = "COP", CRC = "CRC", CUC = "CUC", CUP = "CUP", CVE = "CVE", CZK = "CZK", DJF = "DJF", DKK = "DKK", DOP = "DOP", DZD = "DZD", EGP = "EGP", ERN = "ERN", ETB = "ETB", EUR = "EUR", FJD = "FJD", FKP = "FKP", GBP = "GBP", GEL = "GEL", GGP = "GGP", GHS = "GHS", GIP = "GIP", GMD = "GMD", GNF = "GNF", GTQ = "GTQ", GYD = "GYD", HKD = "HKD", HNL = "HNL", HRK = "HRK", HTG = "HTG", HUF = "HUF", IDR = "IDR", ILS = "ILS", IMP = "IMP", INR = "INR", IQD = "IQD", IRR = "IRR", ISK = "ISK", JEP = "JEP", JMD = "JMD", JOD = "JOD", JPY = "JPY", KES = "KES", KGS = "KGS", KHR = "KHR", KMF = "KMF", KPW = "KPW", KRW = "KRW", KWD = "KWD", KYD = "KYD", KZT = "KZT", LAK = "LAK", LBP = "LBP", LKR = "LKR", LRD = "LRD", LSL = "LSL", LYD = "LYD", MAD = "MAD", MDL = "MDL", MGA = "MGA", MKD = "MKD", MMK = "MMK", MNT = "MNT", MOP = "MOP", MRO = "MRO", MUR = "MUR", MVR = "MVR", MWK = "MWK", MXN = "MXN", MYR = "MYR", MZN = "MZN", NAD = "NAD", NGN = "NGN", NIO = "NIO", NOK = "NOK", NPR = "NPR", NZD = "NZD", OMR = "OMR", PAB = "PAB", PEN = "PEN", PGK = "PGK", PHP = "PHP", PKR = "PKR", PLN = "PLN", PYG = "PYG", QAR = "QAR", RON = "RON", RSD = "RSD", RUB = "RUB", RWF = "RWF", SAR = "SAR", SBD = "SBD", SCR = "SCR", SDG = "SDG", SEK = "SEK", SGD = "SGD", SHP = "SHP", SLL = "SLL", SOS = "SOS", SPL = "SPL", SRD = "SRD", STD = "STD", SVC = "SVC", SYP = "SYP", SZL = "SZL", THB = "THB", TJS = "TJS", TMT = "TMT", TND = "TND", TOP = "TOP", TRY = "TRY", TTD = "TTD", TVD = "TVD", TWD = "TWD", TZS = "TZS", UAH = "UAH", UGX = "UGX", USD = "USD", UYU = "UYU", UZS = "UZS", VEF = "VEF", VND = "VND", VUV = "VUV", WST = "WST", XAF = "XAF", XCD = "XCD", XDR = "XDR", XOF = "XOF", XPF = "XPF", YER = "YER", ZAR = "ZAR", ZMW = "ZMW", ZWD = "ZWD" }