UNPKG

@causalfoundry/js-sdk

Version:

Causal Foundry WEB SDK (JS/TS)

1,763 lines (1,762 loc) 79.5 kB
declare module "modules/ECommerce/blood.typings" { export interface BloodMeta { cross_matching: boolean; temperature_strips: boolean; extra_tests: boolean; reason: string; } export enum BloodComponent { Platelets = "Platelets", Cryoprecipitate = "Cryoprecipitate", WholeBlood = "Whole blood", FreshFrozenPlasma = "Fresh frozen plasma", PackedRedBloodCells = "Packed red blood cells", Other = "Other" } export enum BloodGroup { A_plus = "A+", A_minus = "A-", B_plus = "B+", B_minus = "B-", AB_plus = "AB+", AB_minus = "AB-", O_plus = "O+", O_minus = "O-", Unsure = "Unsure" } export interface BloodProperties { market_id: string; blood_component: BloodComponent | string; blood_group: BloodGroup | string; packaging: string; packaging_size: number; packaging_units: string; supplier_id?: string; supplier_name?: string; } /** * @internal */ export interface InternalBloodProperties extends BloodProperties { id: string; } } declare module "core/commonTypes" { export interface SearchFilter { [key: string]: any; } export interface AddressObject { site_id?: string; name?: string; country?: string; region_state?: string; district?: string; sub_district?: string; city_town?: string; street_address?: string; landmark?: string; coordinates?: CoordinatesObject; } export interface CoordinatesObject { lat?: number; lon?: number; } export interface DiagnosisQuestionItem { type: QuestionType; question: string; reply: string; score?: number; full_score?: number; remarks?: string; section?: string; } export enum QuestionType { OpenEnded = "open_ended", ClosedEnded = "closed_ended", Nominal = "nominal", LikertScale = "likert_scale", RatingScale = "rating_scale", YesNo = "yes_no", Interview = "interview", Other = "other" } 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" } export enum Country { Ascension_Island = "Ascension Island", Andorra = "Andorra", United_Arab_Emirates = "United Arab Emirates", Afghanistan = "Afghanistan", Antigua_and_Barbuda = "Antigua and Barbuda", Anguilla = "Anguilla", Albania = "Albania", Armenia = "Armenia", Netherlands_Antilles = "Netherlands Antilles", Angola = "Angola", Antarctica = "Antarctica", Argentina = "Argentina", American_Samoa = "American Samoa", Austria = "Austria", Australia = "Australia", Aruba = "Aruba", Aland_Islands = "Aland Islands", Azerbaijan = "Azerbaijan", Bosnia_and_Herzegovina = "Bosnia and Herzegovina", Barbados = "Barbados", Bangladesh = "Bangladesh", Belgium = "Belgium", Burkina_Faso = "Burkina Faso", Bulgaria = "Bulgaria", Bahrain = "Bahrain", Burundi = "Burundi", Benin = "Benin", Saint_Barthelemy = "Saint Barthelemy", Bermuda = "Bermuda", Brunei_Darussalam = "Brunei Darussalam", Bolivia = "Bolivia", Caribbean_Netherlands = "Caribbean Netherlands", Brazil = "Brazil", Bahamas = "Bahamas", Bhutan = "Bhutan", Burma = "Burma", Bouvet_Island = "Bouvet Island", Botswana = "Botswana", Belarus = "Belarus", Belize = "Belize", Canada = "Canada", Cocos_Islands = "Cocos Islands", Democratic_Republic_Congo = "Democratic Republic Congo", Central_African_Republic = "Central African Republic", Congo = "Congo", Switzerland = "Switzerland", Ivory_Coast = "Ivory Coast", Cook_Islands = "Cook Islands", Chile = "Chile", Cameroon = "Cameroon", China = "China", Colombia = "Colombia", Clipperton_Island = "Clipperton Island", Costa_Rica = "Costa Rica", Serbia_and_Montenegro = "Serbia and Montenegro", Cuba = "Cuba", Cape_Verde = "Cape Verde", Curacao = "Curacao", Christmas_Island = "Christmas Island", Cyprus = "Cyprus", Czech_Republic = "Czech Republic", Germany = "Germany", Diego_Garcia = "Diego Garcia", Djibouti = "Djibouti", Denmark = "Denmark", Dominica = "Dominica", Dominican_Republic = "Dominican Republic", Algeria = "Algeria", Ceuta_Melilla = "Ceuta Melilla", Ecuador = "Ecuador", Estonia = "Estonia", Egypt = "Egypt", Western_Sahara = "Western Sahara", Eritrea = "Eritrea", Spain = "Spain", Ethiopia = "Ethiopia", European_Union = "European Union", Eurozone = "Eurozone", Finland = "Finland", Fiji = "Fiji", Malvinas = "Malvinas", Micronesia = "Micronesia", Faroe_Islands = "Faroe Islands", France = "France", France_Metropolitan = "France Metropolitan", Gabon = "Gabon", United_Kingdom = "United Kingdom", Grenada = "Grenada", Georgia = "Georgia", French_Guiana = "French Guiana", Guernsey = "Guernsey", Ghana = "Ghana", Gibraltar = "Gibraltar", Greenland = "Greenland", Gambia = "Gambia", Guinea = "Guinea", Guadeloupe = "Guadeloupe", Equatorial_Guinea = "Equatorial Guinea", Greece = "Greece", South_Georgia_and_South_Sandwich_Islands = "South Georgia and South Sandwich Islands", Guatemala = "Guatemala", Guam = "Guam", Guinea_Bissau = "Guinea Bissau", Guyana = "Guyana", Hong_Kong = "Hong Kong", Heard_Island_and_McDonald_Islands = "Heard Island and McDonald Islands", Honduras = "Honduras", Croatia = "Croatia", Haiti = "Haiti", Hungary = "Hungary", Canary_Islands = "Canary Islands", Indonesia = "Indonesia", Ireland = "Ireland", Israel = "Israel", Isle_of_Man = "Isle of Man", India = "India", British_Indian_Ocean_Territory = "British Indian Ocean Territory", Iraq = "Iraq", Iran = "Iran", Iceland = "Iceland", Italy = "Italy", Jersey = "Jersey", Jamaica = "Jamaica", Jordan = "Jordan", Japan = "Japan", Kenya = "Kenya", Kyrgyzstan = "Kyrgyzstan", Cambodia = "Cambodia", Kiribati = "Kiribati", Comoros = "Comoros", Saint_Kitts_and_Nevis = "Saint Kitts and Nevis", North_Korea = "North Korea", South_Korea = "South Korea", Kuwait = "Kuwait", Cayman_Islands = "Cayman Islands", Kazakhstan = "Kazakhstan", Lao = "Lao", Lebanon = "Lebanon", Saint_Lucia = "Saint Lucia", Liechtenstein = "Liechtenstein", Sri_Lanka = "Sri Lanka", Liberia = "Liberia", Lesotho = "Lesotho", Lithuania = "Lithuania", Luxembourg = "Luxembourg", Latvia = "Latvia", Libya = "Libya", Morocco = "Morocco", Monaco = "Monaco", Moldova = "Moldova", Montenegro = "Montenegro", Saint_Martin = "Saint Martin", Madagascar = "Madagascar", Marshall_Islands = "Marshall Islands", North_Macedonia = "North Macedonia", Mali = "Mali", Myanmar = "Myanmar", Mongolia = "Mongolia", Macao = "Macao", Northern_Mariana_Islands = "Northern Mariana Islands", Martinique = "Martinique", Mauritania = "Mauritania", Montserrat = "Montserrat", Malta = "Malta", Mauritius = "Mauritius", Maldives = "Maldives", Malawi = "Malawi", Mexico = "Mexico", Malaysia = "Malaysia", Mozambique = "Mozambique", Namibia = "Namibia", New_Caledonia = "New Caledonia", Niger = "Niger", Norfolk_Island = "Norfolk Island", Nigeria = "Nigeria", Nicaragua = "Nicaragua", Netherlands = "Netherlands", Norway = "Norway", Nepal = "Nepal", Nauru = "Nauru", Neutral_Zone = "Neutral Zone", Niue = "Niue", New_Zealand = "New Zealand", Oman = "Oman", Panama = "Panama", Peru = "Peru", French_Polynesia = "French Polynesia", Papua_New_Guinea = "Papua New Guinea", Philippines = "Philippines", Pakistan = "Pakistan", Poland = "Poland", Saint_Pierre_and_Miquelon = "Saint Pierre and Miquelon", Pitcairn = "Pitcairn", Puerto_Rico = "Puerto Rico", Palestine = "Palestine", Portugal = "Portugal", Palau = "Palau", Paraguay = "Paraguay", Qatar = "Qatar", Reunion = "Reunion", Romania = "Romania", Serbia = "Serbia", Russia = "Russia", Rwanda = "Rwanda", Saudi_Arabia = "Saudi Arabia", Solomon_Islands = "Solomon Islands", Seychelles = "Seychelles", Sudan = "Sudan", Sweden = "Sweden", Singapore = "Singapore", Saint_Helena = "Saint Helena", Slovenia = "Slovenia", Svalbard = "Svalbard", Slovakia = "Slovakia", Sierra_Leone = "Sierra Leone", San_Marino = "San Marino", Senegal = "Senegal", Somalia = "Somalia", Suriname = "Suriname", South_Sudan = "South Sudan", Sao_Tome_and_Principe = "Sao Tome and Principe", USSR = "USSR", El_Salvador = "El Salvador", Sint_Maarten = "Sint Maarten", Syria = "Syria", Eswatini = "Eswatini", Turks_and_Caicos_Islands = "Turks and Caicos Islands", French_Southern_Territories = "French Southern Territories", Togo = "Togo", Thailand = "Thailand", Tajikistan = "Tajikistan", Tokelau = "Tokelau", Timor_Leste = "Timor Leste", Turkmenistan = "Turkmenistan", Tunisia = "Tunisia", Tonga = "Tonga", East_Timor = "East Timor", Turkey = "Turkey", Trinidad_and_Tobago = "Trinidad and Tobago", Tuvalu = "Tuvalu", Taiwan = "Taiwan", Tanzania = "Tanzania", Ukraine = "Ukraine", Uganda = "Uganda", United_States_Minor_Outlying_Islands = "United States Minor Outlying Islands", United_States = "United States", Uruguay = "Uruguay", Uzbekistan = "Uzbekistan", Vatican = "Vatican", Saint_Vincent_and_Grenadines = "Saint Vincent and Grenadines", Venezuela = "Venezuela", British_Virgin_Islands = "British Virgin Islands", US_Virgin_Islands = "US Virgin Islands", Vietnam = "Vietnam", Vanuatu = "Vanuatu", Wallis_and_Futuna = "Wallis and Futuna", Samoa = "Samoa", Northern_Ireland = "Northern Ireland", Kosovo = "Kosovo", Yemen = "Yemen", Mayotte = "Mayotte", Yugoslavia = "Yugoslavia", South_Africa = "South Africa", Zambia = "Zambia", Zaire = "Zaire", Zimbabwe = "Zimbabwe" } export enum Language { Afar = "Afar", Abkhaz = "Abkhaz", Avestan = "Avestan", Afrikaans = "Afrikaans", Akan = "Akan", Amharic = "Amharic", Aragonese = "Aragonese", Arabic = "Arabic", Avaric = "Avaric", Aymara = "Aymara", Azerbaijani = "Azerbaijani", Bashkir = "Bashkir", Belarusian = "Belarusian", Bulgarian = "Bulgarian", Bihari = "Bihari", Bislama = "Bislama", Bambara = "Bambara", Bengali = "Bengali", Tibetan = "Tibetan", Breton = "Breton", Bosnian = "Bosnian", Catalan = "Catalan", Chechen = "Chechen", Chamorro = "Chamorro", Corsican = "Corsican", Cree = "Cree", Czech = "Czech", Slavonic = "Slavonic", Chuvash = "Chuvash", Welsh = "Welsh", Danish = "Danish", German = "German", Maldivian = "Maldivian", Dzongkha = "Dzongkha", Ewe = "Ewe", Greek = "Greek", English = "English", Esperanto = "Esperanto", Spanish = "Spanish", Estonian = "Estonian", Basque = "Basque", Persian = "Persian", Fulah = "Fulah", Finnish = "Finnish", Fijian = "Fijian", Faroese = "Faroese", French = "French", Western_Frisian = "Western_Frisian", Irish = "Irish", Gaelic = "Gaelic", Galician = "Galician", Guarani = "Guarani", Gujarati = "Gujarati", Manx = "Manx", Hausa = "Hausa", Hebrew = "Hebrew", Hindi = "Hindi", Hiri_Motu = "Hiri_Motu", Croatian = "Croatian", Haitian = "Haitian", Hungarian = "Hungarian", Armenian = "Armenian", Herero = "Herero", Interlingua = "Interlingua", Indonesian = "Indonesian", Occidental = "Occidental", Igbo = "Igbo", Nuosu = "Nuosu", Inupiaq = "Inupiaq", Ido = "Ido", Icelandic = "Icelandic", Italian = "Italian", Inuktitut = "Inuktitut", Japanese = "Japanese", Javanese = "Javanese", Georgian = "Georgian", Kongo = "Kongo", Kikuyu = "Kikuyu", Kuanyama = "Kuanyama", Kazakh = "Kazakh", Greenlandic = "Greenlandic", Central_Khmer = "Central_Khmer", Kannada = "Kannada", Korean = "Korean", Kanuri = "Kanuri", Kashmiri = "Kashmiri", Kurdish = "Kurdish", Komi = "Komi", Cornish = "Cornish", Kirghiz = "Kirghiz", Latin = "Latin", Luxembourgish = "Luxembourgish", Ganda = "Ganda", Limburgish = "Limburgish", Lingala = "Lingala", Lao = "Lao", Lithuanian = "Lithuanian", Luba_katanga = "Luba_katanga", Latvian = "Latvian", Malagasy = "Malagasy", Marshallese = "Marshallese", Maori = "Maori", Macedonian = "Macedonian", Malayalam = "Malayalam", Mongolian = "Mongolian", Moldavian = "Moldavian", Marathi = "Marathi", Malay = "Malay", Maltese = "Maltese", Burmese = "Burmese", Nauruan = "Nauruan", Norwegian_Bokmal = "Norwegian_Bokmal", North_Ndebele = "North_Ndebele", Nepali = "Nepali", Ndonga = "Ndonga", Dutch = "Dutch", Norwegian_Nynorsk = "Norwegian_Nynorsk", Norwegian = "Norwegian", South_Ndebele = "South_Ndebele", Navajo = "Navajo", Nyanja = "Nyanja", Occitan = "Occitan", Ojibwa = "Ojibwa", Oromo = "Oromo", Oriya = "Oriya", Ossetian = "Ossetian", Punjabi = "Punjabi", Pali = "Pali", Polish = "Polish", Pushto = "Pushto", Portuguese = "Portuguese", Quechua = "Quechua", Reunionese = "Reunionese", Romansh = "Romansh", Rundi = "Rundi", Romanian = "Romanian", Russian = "Russian", Kinyarwanda = "Kinyarwanda", Sanskrit = "Sanskrit", Sardinian = "Sardinian", Sindhi = "Sindhi", Northern_Sami = "Northern Sami", Sango = "Sango", Slavic = "Slavic_Languages", Sinhalese = "Sinhalese", Slovak = "Slovak", Slovenian = "Slovenian", Samoan = "Samoan", Shona = "Shona", Somali = "Somali", Albanian = "Albanian", Serbian = "Serbian", Swati = "Swati", Southern_Sotho = "Southern Sotho", Sundanese = "Sundanese", Swedish = "Swedish", Swahili = "Swahili", Tamil = "Tamil", Telugu = "Telugu", Tajik = "Tajik", Thai = "Thai", Tigrinya = "Tigrinya", Turkmen = "Turkmen", Tagalog = "Tagalog", Tswana = "Tswana", Tongan = "Tongan", Turkish = "Turkish", Tsonga = "Tsonga", Tatar = "Tatar", Twi = "Twi", Tahitian = "Tahitian", Uighur = "Uighur", Ukrainian = "Ukrainian", Urdu = "Urdu", Uzbek = "Uzbek", Venda = "Venda", Vietnamese = "Vietnamese", Volapuk = "Volapuk", Walloon = "Walloon", Wolof = "Wolof", Xhosa = "Xhosa", Yiddish = "Yiddish", Yoruba = "Yoruba", Zhuang = "Zhuang", Chinese = "Chinese", Zulu = "Zulu" } export enum CfLogEvents { NudgeAction = "nudge-action" } export enum CfLogEventType { Redirect = "redirect", AddToCart = "add_to_cart" } export enum NudgeScreenType { None = "", Home = "home", Search = "search", Product = "product", Cart = "cart", Checkout = "checkout", Reminder = "reminder", Favorite = "favorite", Other = "other" } } declare module "modules/ECommerce/oxygen.typings" { export interface OxygenMeta { order_type: string; reason: string; } export interface OxygenProperties { market_id: string; packaging: string; packaging_size: number; packaging_units: string; supplier_id?: string; supplier_name?: string; } /** * @internal */ export interface InternalOxygenProperties extends OxygenProperties { id: string; } } declare module "modules/ECommerce/typings" { import { BloodMeta } from "modules/ECommerce/blood.typings"; import { CoordinatesObject, CurrencyCode } from "core/commonTypes"; import { OxygenMeta } from "modules/ECommerce/oxygen.typings"; export enum ECommerceTypes { CancelCheckout = "cancel_checkout", Cart = "cart", Checkout = "checkout", Delivery = "delivery", Item = "item", ItemReport = "item_report", ItemRequest = "item_request", ItemVerification = "item_verification" } export enum ItemAction { View = "view", Detail = "detail", Impression = "impression", TopUp = "top_up", Cancel = "cancel", Update = "update", Remove = "remove", Add = "add", Select = "select", AddFavorite = "add_favorite", RemoveFavorite = "remove_favorite", AddReminder = "add_reminder", RemoveReminder = "remove_reminder", RemoveReminderAuto = "remove_reminder_auto", Other = "other" } export enum ItemType { Blood = "blood", Book = "book", Clothing = "clothing", Drug = "drug", Grocery = "grocery", Subscription = "subscription", Facility = "facility", Electronics = "electronics", MedicalEquipment = "medical_equipment", Misc = "misc", Oxygen = "oxygen", ItemVerification = "item_verification", ItemReport = "item_report", Reward = "reward", Survey = "survey", Other = "other" } export enum StockStatus { InStock = "in_stock", LowStock = "low_stock", OutOfStock = "out_of_stock" } export enum SubscriptionStatus { Active = "active", Inactive = "inactive", Paused = "paused", Other = "other" } export enum SubscriptionType { PayAsYouSell = "pay_as_you_sell", PayAsYouGo = "pay_as_you_go", Other = "other" } export interface ItemMinObject { id: string; type: ItemType; } export interface ItemInfoObject { "id": string; "type": ItemType; "batch_id"?: string; "reward_id"?: string; "survey_id"?: string; "is_featured"?: boolean; "expiry_date"?: number; "production_date"?: number; } export type BaseItemDetail = { id: string; quantity: number; price: number; currency: CurrencyCode; stock_status?: StockStatus; promo_id?: string; facility_id?: string; discount?: number; }; export type SubscriptionItemDetail = { status: SubscriptionStatus; type: SubscriptionType; subscription_items: Array<ItemMinObject>; }; export type MetaBloodItemDetail = BaseItemDetail & { type: ItemType.Blood; meta: BloodMeta; }; export type MetaOxygenItemDetail = BaseItemDetail & { type: ItemType.Oxygen; meta: OxygenMeta; }; export type DrugItemDetail = BaseItemDetail & { type: ItemType.Drug; }; export type GroceryItemDetail = BaseItemDetail & { type: ItemType.Grocery; }; export type BloodItemDetail = BaseItemDetail & { type: ItemType.Blood; }; export type OxygenItemDetail = BaseItemDetail & { type: ItemType.Oxygen; }; export type MedicalEquipmentDetail = BaseItemDetail & { type: ItemType.MedicalEquipment; }; export type SubscriptionDetail = BaseItemDetail & { type: ItemType.Subscription; subscription: SubscriptionItemDetail; }; export type MetaItemObject = MetaBloodItemDetail | MetaOxygenItemDetail | DrugItemDetail | MedicalEquipmentDetail | GroceryItemDetail | SubscriptionDetail; export type ItemObject = BloodItemDetail | OxygenItemDetail | DrugItemDetail | MedicalEquipmentDetail | GroceryItemDetail | SubscriptionDetail; export interface ItemProperties { action: ItemAction; item: ItemObject; search_id?: string; meta?: any; } export interface ReportObject { id: string; remarks: string; short_desc?: string; } export interface StoreObject { id: string; lat?: number; lon?: number; } export enum CartAction { AddItem = "add_item", RemoveItem = "remove_item" } export interface CartProperties { id: string; action: CartAction; item: ItemObject; cart_price: number; currency: CurrencyCode; meta?: any; } export enum ScanChannel { App = "app", Ussd = "ussd" } export enum ScanType { Pin = "pin", QrCode = "qr_code" } export enum ListAction { Add = "add_item", Discard = "discard", Edit = "edit_item", Remove = "remove_item", View = "view", Expired = "expired" } export enum ListType { Cart = "cart", Favourite = "favourite", Order = "order", Reminder = "reminder" } export enum ShopMode { Delivery = "delivery", Pickup = "pickup" } export interface CheckoutProperties { id: string; is_successful: boolean; cart_price: number; currency: CurrencyCode; items: Array<MetaItemObject>; cart_id: string; shop_mode?: ShopMode; meta?: any; } export enum DeliveryAction { Schedule = "schedule", Update = "update", Dispatch = "dispatch", Delivered = "delivered" } export interface DeliveryProperties { id: string; order_id: string; is_urgent: boolean; action: DeliveryAction; est_delivery_ts?: Date | string; delivery_coordinates?: CoordinatesObject; dispatch_coordinates?: CoordinatesObject; meta?: any; } export interface DrugProperties { market_id: string; name: string; description?: string; supplier_id: string; supplier_name: string; producer?: string; packaging?: string; active_ingredients: Array<string>; drug_form?: string; drug_strength?: string; atc_anatomical_group?: string; otc_or_ethical?: string; } /** * @internal */ export interface InternalDrugProperties extends DrugProperties { id: string; } export interface GroceryProperties { name: string; description?: string; category?: string; active_ingredients?: Array<string>; market_id?: string; packaging?: string; packaging_size?: number; packaging_units?: string; producer?: string; supplier_id?: string; supplier_name?: string; } /** * @internal */ export interface InternalGroceryProperties extends GroceryProperties { id: string; } export interface FacilityProperties { name: string; type?: string; country?: string; region_state?: string; city?: string; is_active?: boolean; has_delivery?: boolean; is_sponsored?: boolean; } /** * @internal */ export interface InternalFacilityProperties extends FacilityProperties { id: string; } export enum CancelType { Cart = "cart", Order = "order" } export interface CancelCheckoutProperties { id: string; type: CancelType; items: ItemMinObject[]; reason: string; meta?: any; } export interface ItemReportProperties { item: ItemMinObject; report_info: ReportObject; store_info: StoreObject; } export interface ItemRequestProperties { id: string; item_name: string; manufacturer: string; } export interface ItemVerificationProperties { scan_channel: ScanChannel; scan_type: ScanType; is_successful: boolean; item_info: ItemInfoObject; } } declare module "modules/Loyalty/typings" { import { CurrencyCode } from "core/commonTypes"; export enum LoyaltyTypes { Survey = "survey", Reward = "reward", Level = "level", Milestone = "milestone", Promo = "promo" } export enum PromoAction { Apply = "apply", View = "view", Other = "other" } export enum PromoType { AddToCart = "add_to_cart", Coupon = "coupon", Other = "other" } export enum PromoItemType { Blood = "blood", Book = "book", Clothing = "clothing", Drug = "drug", Grocery = "grocery", Electronics = "electronics", Misc = "misc", Oxygen = "oxygen", Subscription = "subscription", Facility = "facility", Other = "other" } 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", Other = "other" } export enum RewardAction { View = "view", Add = "add", Redeem = "redeem", Other = "other" } export enum RedeemType { Cash = "cash", Airtime = "airtime", Other = "other" } export interface PromoItem { id: string; type: PromoItemType; } export interface SurveyObject { id: string; type: SurveyType; is_completed: boolean; reward_id?: string; } export interface ResponseObject { id: string; type: SurveyType; question: string; response?: string; } export interface RedeemObject { type: RedeemType; is_successful: boolean; points_withdrawn: number; converted_value: number; currency?: CurrencyCode; } export interface PromoProperties { id: string; action: PromoAction; items: PromoItem[]; title: string; type: PromoType; meta?: any; } export interface LevelProperties { prev_level: number; new_level: number; module_id?: string; meta?: any; } export enum MilestoneAction { Achieved = "achieved", Other = "other" } export interface MilestoneProperties { id: string; action: MilestoneAction; meta?: any; } export interface SurveyProperties { action: SurveyAction; survey: SurveyObject; response: Array<ResponseObject>; meta?: any; } export interface RewardProperties { id: string; action: RewardAction; acc_points?: number; total_points: number; redeem?: RedeemObject; meta?: any; } export interface SurveyCatalog { name: string; description?: string; type: string; duration?: number; organization_id?: string; organization_name?: string; questions_list: Array<string>; reward_id: string; creation_date?: string; expiry_date?: string; } /** * @internal */ export interface InternalSurveyCatalog extends SurveyCatalog { id: string; } export interface RewardCatalog { name: string; description?: string; type: string; required_points: number; creation_date?: string; expiry_date?: string; organization_id?: string; organization_name?: string; } /** * @internal */ export interface InternalRewardCatalog extends RewardCatalog { id: string; } } declare module "modules/ELearning/typings" { export enum ELearningTypes { Module = "module", Question = "question", Exam = "exam" } export enum ExamAction { Start = "start", Submit = "submit", Result = "result", Other = "other" } export type ExamProperties = { id: string; action: "submit"; duration: number; meta?: any; } | { id: string; action: "result"; score: number; is_passed: boolean; meta?: any; } | { id: string; action: "start"; meta?: any; }; export enum ModuleAction { View = "view", Other = "other" } export interface ModuleProperties { id: string; progress: number; action: ModuleAction; meta?: any; } export enum QuestionAction { Answer = "answer", Skip = "skip", Other = "other" } export interface QuestionProperties { id: string; exam_id: string; action: QuestionAction; answer_id: string; meta?: any; } } declare module "modules/CallCenter/typings" { export enum CallCenterEventType { Break = "break", Contact = "contact", OpsScorecard = "ops_scorecard" } export enum CallCenterAction { View = "view", Add = "add", Update = "update", Remove = "remove", Start = "start", End = "end", Pause = "pause", Resume = "resume", Attend = "attend", Decline = "decline", Terminate = "terminate", Transfer = "transfer", Skip = "skip", Other = "other" } export enum BreakType { BioBreak = "bio_break", Feedback = "feedback", Meeting = "meeting", Meal = "meal", Tea = "tea", Other = "other" } export enum ContactChannel { Call = "call", WhatsApp = "whatsapp", SMS = "sms", Email = "email", Other = "other" } export enum ContactType { Emergency = "emergency", Grievance = "grievance", NonEmergency = "non_emergency", Transfer = "transfer", FollowUp = "follow_up", ServiceOffering = "service_offering", CustomerSupport = "customer_support", Other = "other" } export interface BreakProperties { type: BreakType; sub_type?: string; action: CallCenterAction; total_time: number; consumed_time: number; meta?: any; } export interface ContactProperties { action: CallCenterAction; details: ContactDetailObject; transfer?: TransferObject; meta?: any; } export interface ContactDetailObject { id: string; channel: ContactChannel; type: ContactType; start_time?: string; sub_type?: string; is_valid?: boolean; is_transfer?: boolean; incident_id?: string; customer_id?: string; customer_type?: string; phone_id?: string; extension?: string; duration?: number; resolution?: string; summary?: string; remarks?: string; is_priority?: boolean; } export interface TransferObject { id: string; destination?: string; summary?: string; remarks?: string; } export interface OpsScorecardProperties { quality_traits: QualityTraitsObject; meta?: any; } export interface QualityTraitsObject { audit_count: number; quality_score?: number; fatal_calls?: number; fatal_score?: number; performance_group: string; remarks?: string; } } declare module "modules/EmergencyMgmt/typings" { import { Language, AddressObject, DiagnosisQuestionItem } from "core/commonTypes"; export enum EmergencyMgmtEventType { Incident = "incident", Ambulance = "ambulance" } export enum EmergencyMgmtCatalogType { ERO = "user_ero", Ambulance = "ambulance" } export enum EmergencyMgmtItemAction { View = "view", Add = "add", Update = "update", Remove = "remove", Start = "start", End = "end", Pause = "pause", Resume = "resume", Attend = "attend", Decline = "decline", Terminate = "terminate", Transfer = "transfer", Skip = "skip", Dispatch = "dispatch", Denial = "denial", Other = "other" } export enum IncidentType { Emergency = "emergency", Grievance = "grievance", NonEmergency = "non_emergency", Transfer = "transfer", FollowUp = "follow_up", ServiceOffering = "service_offering", CustomerSupport = "customer_support", Other = "other" } export enum AmbulanceStatus { Available = "available", Busy = "busy", Maintenance = "maintenance", Other = "other" } export interface IncidentDetailItem { id: string; contact_id?: string; type: IncidentType; sub_type?: string; category?: string[]; language?: Language; is_duplicate_incident?: boolean; is_sms_set_location?: boolean; severity?: string; chief_complaints_list?: ChiefComplaintItem[]; } export interface ChiefComplaintItem { complaint: string; questions_list?: DiagnosisQuestionItem[]; } export interface EmergencyPatientItem { id: string; age?: number; blood_group?: string; gender?: string; } export interface AmbulanceItem { id: string; driver_id: string; emso_id?: string; type: string; distance_from_incident?: number; status: AmbulanceStatus; eta?: number; gps_datetime?: string; location?: AddressObject; } export interface IncidentProperties { action: EmergencyMgmtItemAction; details: IncidentDetailItem; patient_list?: EmergencyPatientItem[]; address?: AddressObject; facility_id?: string; ambulance_list?: AmbulanceItem[]; schedule_time?: number; status?: string; resolution?: string; summary?: string; remarks?: string; meta?: any; } export interface AmbulanceProperties { incident_id?: string; contact_id?: string; action: EmergencyMgmtItemAction; ambulance: AmbulanceItem; pickup_address?: AddressObject; destination_address?: AddressObject; denial_details?: DenialDetailItem; meta?: any; } export interface DenialDetailItem { author?: string; reason: string; remarks?: string; } export interface EROCatalog { id: string; joining_date?: string; status: string; employee_type?: string; zone?: string; site_id_list?: string[]; supervisor_id_list?: string[]; } export interface AmbulanceCatalog { id: string; type: string; base_site_id?: string; base_site_name?: string; base_site_district?: string; } } declare module "modules/Navigation/typings" { import { Country, Language, SearchFilter } from "core/commonTypes"; import { ItemType } from "modules/ECommerce/typings"; export enum NavigationTypes { App = "app", Identify = "identify", Media = "media", NudgeResponse = "nudge_response", Page = "page", Rate = "rate", Search = "search", ModuleSelection = "module_selection" } export enum CoreCatalogType { User = "user", Site = "site", Media = "media", Other = "other" } export enum ContentBlock { Core = "core", ELearning = "e-learning", ECommerce = "e-commerce", Payment = "payment", Loyalty = "loyalty", PatientMgmt = "patient_mgmt", CallCenter = "call_center", EmergencyMgmt = "emergency_mgmt" } export enum ModuleType { Core = "core", ECommerce = "e_commerce", ELearning = "e_learning", Screening = "screening", Assessment = "assessment", Enrolment = "enrolment", MedicalReview = "medical_review", MyPatients = "my_patients", Appointments = "appointments", Prescription = "prescription", LifestyleMgmt = "lifestyle_mgmt", PsychologicalMgmt = "psychological_mgmt", CounselingMgmt = "counseling_mgmt", Investigation = "investigation", TreatmentPlan = "treatment_plan", Transfers = "transfers", HCWMgmt = "hcw_mgmt", Break = "break", CallerHistory = "caller_history", AttendCall = "attend_call", Single = "single", Dashboard = "dashboard", Map = "map", Other = "other" } export type SearchModuleType = ModuleType; export enum AppAction { Background = "background", Close = "close", Open = "open", Resume = "resume" } export enum IdentityAction { Login = "login", Logout = "logout", Register = "register", Blocked = "blocked", UnBlocked = "unblocked" } export enum MediaAction { View = "view", Impression = "impression", Play = "play", Pause = "pause", Seek = "seek", Finish = "finish" } export enum MembersCount { None = "none", One = "1", Two = "2", Three = "3", Four = "4", FiveOrMore = "5_or_more", Undisclosed = "undisclosed" } export enum UserGender { Male = "male", Female = "female", Other = "other", UnDisclosed = "undisclosed" } export enum SearchItemType { PatientRecord = "patient_record", LifestylePlanItem = "lifestyle_plan_item", TreatmentPlanItem = "treatment_plan_item", PsychologicalPlanItem = "psychological_plan_item", CounselingPlanItem = "counseling_plan_item", InvestigationTestItem = "investigation_test_item", Blood = "blood", Oxygen = "oxygen", Drug = "drug", Grocery = "grocery", Facility = "facility", MedicalEquipment = "medical_equipment", Subscription = "subscription", Electronics = "electronics", Clothing = "clothing", Book = "book", ItemVerification = "item_verification", ItemReport = "item_report", Reward = "reward", Survey = "survey", Incident = "incident", Address = "address", Ambulance = "ambulance", OtherVehicle = "other_vehicle", Contact = "contact", Call = "call", Email = "email", SMS = "sms", Other = "other" } export enum MaritalStatus { Single = "single", Married = "married", Widowed = "widowed", Divorced = "divorced", Separated = "separated", Other = "other", UnDisclosed = "undisclosed" } export interface AppProperties { action: AppAction; start_time: number; } export interface IdentifyProperties { action: IdentityAction; referral_code?: string; blocked?: IdentifyBlockObject; } export interface IdentifyBlockObject { reason: string; remarks?: string; } export interface UserInfo extends IdentifyProperties { user_props: UserCatalog; } export type ImageProperties = { /** * The block or module where the media is embedded. For example, * 'e-learning' if the media is included as an activity * of the course * */ contentBlock?: ContentBlock; type: MediaType; id: string; action: MediaAction; time: number; meta?: any; }; export enum MediaType { Audio = "audio", Video = "video", Image = "image" } export type AudioVideoProperties = { /** * The block or module where the media is embedded. For example, * 'e-learning' if the video or audio is included as an activity * of the course * */ contentBlock?: ContentBlock; type: MediaType; id: string; action: MediaAction; time: number; meta?: any; }; export type MediaProperties = ImageProperties | AudioVideoProperties; export type MediaCatalog = { id: string; type: MediaType; name?: string; length: string; description?: string; resolution?: string; language?: Language; }; export interface PageProperties { path: string; title?: string; duration?: number; render_time: number; meta?: any; } export enum NudgeAction { Shown = "shown", Error = "error", Block = "block", Discard = "discard", Open = "open", Expired = "expired" } export enum NudgeResponseType { Push = "push_notification", InApp = "in_app_message" } export interface NudgeResponseProperties { "ref": string; "response": string; "time": string; "details"?: string; } export enum SiteCatalogType { Pharmacy = "pharmacy", Clinic = "clinic", Community = "community" } /** * This interface represents the information related to * a search */ export interface SearchProperties { /** * Free text introduced by the user to search */ query: string; module: ModuleType; /** * Current list of items IDs obtained for this search and page. * If the user have pressed in a new page number, of scroll down * and the web automatically retrieved new item, include here only * the new ones */ results_list: Array<ItemMinObject>; /** * If the search engine allow to select specific value to search * in a selectable list, include here an object whose keys are the * attributes to search, and the values the actual values that must * match */ filter?: SearchFilter; /** * If the search results are shown paginated, or with infinite scroll, * this field represent the number of page/subset the current result_ids * belongs to */ page: number; /** * Any other additional information to be available in the logs */ meta?: any; } export interface ItemMinObject { id: string; type: SearchItemType | ItemType; } export enum EducationalLevel { Primary = "primary", LowerSecondary = "lower_secondary", UpperSecondary = "upper_secondary", NonTertiary = "non_tertiary", Tertiary = "tertiary", Bachelors = "bachelors", Masters = "masters", Doctorate = "doctorate" } export enum UserAccountType { Basic = "basic", Classic = "classic", Advanced = "advanced", Other = "other" } export interface UserCatalog { id: string; name?: string; organization_id?: string; organization_name?: string; experience?: string; region_state?: string; city?: string; workplace?: string; profession?: string; zipcode?: string; /** * ISO 8601 string (ie.: +0200) * Generated automatically by the SDK */ timezone?: string; /** * country which the user is, represented as * two characters in ISO 3166 */ country?: Country; /** * iSO 639-1 */ language?: Language; education_level?: EducationalLevel; account_type?: UserAccountType; birth_year?: number; gender?: UserGender; marital_status?: MaritalStatus; family_members?: MembersCount;