6.3.0 • Published 7 months ago

capacitor-meili v6.3.0

Weekly downloads
-
License
MIT
Repository
bitbucket
Last release
7 months ago

capacitor-meili

Capacitor plugin that uses the Meili Mobile App SDKs to present a Meili car rental flow within a native modal.

Install

npm install capacitor-meili
npx cap sync

API

openModal(...)

openModal(params: MeiliParams) => any

Open a Meili flow in a modal

ParamType
paramsMeiliParams

Returns: any


addListener(EventName, ...)

addListener(eventName: EventName, listenerFunc: (data: any) => void) => any

iOS only: Listen for specific events within the Meili flow

ParamType
eventNameEventName
listenerFunc(data: any) => void

Returns: any


addListener('all_events', ...)

addListener(eventName: 'all_events', listenerFunc: (event: { eventName: EventName; data: any; }) => void) => any

iOS only: Listen for all events within the Meili flow

ParamType
eventName'all_events'
listenerFunc(event: { eventName: EventName; data: any; }) => void

Returns: any


addListener('android_web_events', ...)

addListener(eventName: 'android_web_events', listenerFunc: (event: { type: WebEventName; data: any; }) => void) => any

Android only: Listen for all events within the Meili flow

ParamType
eventName'android_web_events'
listenerFunc(event: { type: WebEventName; data: any; }) => void

Returns: any


Interfaces

PluginListenerHandle

PropType
remove() => any

Type Aliases

MeiliParams

{ / @example "100.9" */ ptid: string; / The flow to use Possible values are: - 'direct' (MeiliFlow.Direct) - 'connect' (MeiliFlow.Connect) - 'bookingManager' (MeiliFlow.BookingManager) / flow: MeiliFlow; /** The API environment to use * Possible values are: - 'prod' (MeiliEnvironment.Prod) - 'preProd' (MeiliEnvironment.PreProd) - 'uat' (MeiliEnvironment.Uat) - 'dev' (MeiliEnvironment.Dev) / env: MeiliEnvironment; / The locale to use e.g. "en-GB". The user's device locale is used by default. */ locale?: string; availParams?: AvailParams; additionalParams?: AdditionalParams; / Android only: Background hex color of the toolbar. / toolbarColor?: string; / Android only: The title for the toolbar / toolbarTitle?: string; / Android only: Color of the title that shows in the toolbar / toolbarTitleColor?: string; / Android only: Elevation value of the toolbar / toolbarElevation?: number; / Android only: Color of the close button in the toolbar / toolbarCloseIconColor?: string; }

AvailParams

{ / The location where the pickup occurs e.g. "BCN" * Required for the connect flow */ pickupLocation?: string; / The location where the dropoff occurs e.g. "BCN" Required for the connect flow / dropoffLocation?: string; / The date for the pickup in yyyy-MM-dd format e.g. "2024-10-28" * Required for the connect flow * */ pickupDate?: string; / The time for the pickup in HH:mm format e.g. "14:30" Required for the connect flow / pickupTime?: string; / The date for the dropoff in yyyy-MM-dd format e.g. "2024-10-28" * Required for the connect flow */ dropoffDate?: string; / The time for the dropoff in HH:mm format e.g. "14:30" Required for the connect flow / dropoffTime?: string; / The age of the driver e.g. 30 * Required for the connect flow */ driverAge?: number; / The currency code to use e.g. 'GBP' / currencyCode?: string; /** The residency of the driver e.g. "GB" / residency?: string; }

AdditionalParams

{ prefillOnly?: boolean; confirmationId?: string; lastName?: string; firstName?: string; /** Android only. / givenName?: string; partnerLoyaltyAccount?: string; partnerLoyaltyAccountTier?: string; numberOfPassengers?: number; customerPartnerCode?: string; flightNumber?: string; passengerNameRecord?: string; superPassengerNameRecord?: string; infant?: number; child?: number; teenager?: number; supplierLoyaltyAccounts?: string[]; fareTypeAndFlex?: string; departureAirport?: string; arrivalAirport?: string; ancillaryActivity?: string; airlineFareAmount?: number; airlineFareCurrency?: string; partnerCustomerID?: string; email?: string; phoneNumbers?: number[]; companyName?: string; corporateCode?: string; addressLine1?: string; postCode?: string; city?: string; state?: string; }

EventName

'screen_viewed' | 'search_button_pressed' | 'view_deal_pressed' | 'criteria_searched' | 'show_more_benefits_button_pressed' | 'important_info_button_pressed' | 'sort_options_selected' | 'filter_option_updated' | 'items_scrolled' | 'protection_selected' | 'extra_added' | 'show_more_extra_button_pressed' | 'protection_details_popup_shown' | 'scrolled_to_end' | 'checkout_summary_displayed' | 'checkout_succeeded' | 'checkout_time_taken' | 'flow_started' | 'booking_succeeded' | 'sdk_config_loaded' | (string & {})

WebEventName

'MEILI_EVENT_SELECTION_ADD' | 'MEILI_EVENT_SELECTION_REMOVE' | 'MEILI_EVENT_BOOKING_SUCCESS' | 'MEILI_POST_MESSAGE'

Enums

MeiliFlow

MembersValue
Direct'direct'
Connect'connect'
BookingManager'bookingManager'

MeiliEnvironment

MembersValue
Prod'prod'
PreProd'preProd'
Uat'uat'
Dev'dev'
6.3.0

7 months ago

6.2.0

9 months ago

6.1.0

10 months ago

6.1.0-alpha.2

10 months ago

6.1.0-alpha.1

11 months ago

5.0.0

12 months ago

6.0.1

12 months ago

6.0.0

12 months ago

6.0.0-alpha.1

12 months ago

0.0.8

12 months ago

0.0.7-alpha.1

1 year ago

0.0.6-alpha.3

1 year ago

0.0.6-alpha.4

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.6-alpha.1

1 year ago

0.0.6-alpha.2

1 year ago

0.0.5

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.4

1 year ago

0.0.1

1 year ago