presentation
const presentation: { get: Promise<Presentation>; getEvents: Promise<unknown[]>; getDeviceEvents: Promise<unknown[]>; reload: void; close: void; getAll: Promise<Presentation[]>; getByID: Promise<Presentation>; getByName: Promise<Presentation>; refresh: Promise<Presentation[]>; download: Promise<DownloadResult>; openByID: void; openByExternalID: Promise<void>; openByName: Promise<void>; openPicker: void;};Defined in: domains/presentation.ts:14
Type Declaration
Section titled “Type Declaration”get(): Promise<Presentation>;Get the presentation that is currently open.
Returns
Section titled “Returns”Promise<Presentation>
The current Presentation.
Throws
Section titled “Throws”MobileLockerError on network failure or server error.
getEvents()
Section titled “getEvents()”getEvents(): Promise<unknown[]>;Get the analytics events recorded for the current presentation session.
Returns
Section titled “Returns”Promise<unknown[]>
Array of raw event objects.
Throws
Section titled “Throws”MobileLockerError on network failure or server error.
getDeviceEvents()
Section titled “getDeviceEvents()”getDeviceEvents(): Promise<unknown[]>;Alias for getEvents.
Returns
Section titled “Returns”Promise<unknown[]>
Array of raw event objects.
reload()
Section titled “reload()”reload(): void;Reload the current presentation’s web content.
Triggers a full page reload inside the presentation webview.
Returns
Section titled “Returns”void
close()
Section titled “close()”close(): void;Close the current presentation and return to the app home screen.
Prefers the dedicated host route POST /mobilelocker/api/close-presentation
(documented in the iOS web-server API). Falls back to the legacy
method=close-presentation analytics POST used by older app builds.
Returns
Section titled “Returns”void
getAll()
Section titled “getAll()”getAll(): Promise<Presentation[]>;Get all presentations available to the current user.
Returns
Section titled “Returns”Promise<Presentation[]>
Array of Presentation objects.
Throws
Section titled “Throws”MobileLockerError on network failure or server error.
getByID()
Section titled “getByID()”getByID(id): Promise<Presentation>;Get a presentation by its numeric ID.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
id |
number |
The presentation ID. |
Returns
Section titled “Returns”Promise<Presentation>
The matching Presentation.
Throws
Section titled “Throws”MobileLockerError on network failure, or if not found.
getByName()
Section titled “getByName()”getByName(name): Promise<Presentation>;Get a presentation by its name.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
name |
string |
The presentation name (case-sensitive). |
Returns
Section titled “Returns”Promise<Presentation>
The matching Presentation.
Throws
Section titled “Throws”MobileLockerError on network failure, or if not found.
refresh()
Section titled “refresh()”refresh(): Promise<Presentation[]>;Refresh the list of available presentations from the server.
Returns
Section titled “Returns”Promise<Presentation[]>
Updated array of Presentation objects.
Throws
Section titled “Throws”MobileLockerError on network failure or server error.
download()
Section titled “download()”download(id): Promise<DownloadResult>;Queue a presentation for download to the device.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
id |
number |
The numeric ID of the presentation to download. |
Returns
Section titled “Returns”Promise<DownloadResult>
An object with status: 'queued', 'already_installed', 'not_available', or 'not_permitted'.
Throws
Section titled “Throws”MobileLockerError on network failure or server error.
openByID()
Section titled “openByID()”openByID(id): void;Open a presentation by its numeric ID.
In the iOS app, triggers native presentation navigation via the app bridge. In a browser, opens the presentation in a new tab using the platform web URL.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
id |
number |
The numeric ID of the presentation to open. |
Returns
Section titled “Returns”void
Example
Section titled “Example”mobilelocker.presentation.openByID(42)openByExternalID()
Section titled “openByExternalID()”openByExternalID(externalID): Promise<void>;Open a presentation by its external CRM ID.
In the iOS app, triggers native presentation navigation via the app bridge. In a browser, fetches all presentations, finds the match by external ID, then opens it.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
externalID |
string |
The external identifier for the presentation (e.g. a Salesforce ID). |
Returns
Section titled “Returns”Promise<void>
Throws
Section titled “Throws”MobileLockerError if no presentation with the given external ID is found.
Example
Section titled “Example”await mobilelocker.presentation.openByExternalID('a0B1234567890')openByName()
Section titled “openByName()”openByName(name): Promise<void>;Open a presentation by its name.
In the iOS app, triggers native presentation navigation via the app bridge. In a browser, fetches all presentations, finds the match by name, then opens it.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
name |
string |
The presentation name (case-sensitive). |
Returns
Section titled “Returns”Promise<void>
Throws
Section titled “Throws”MobileLockerError if no presentation with the given name is found.
Example
Section titled “Example”await mobilelocker.presentation.openByName('Kazaamax Rebate Calculator Demo');openPicker()
Section titled “openPicker()”openPicker(): void;Open the native presentation picker so the user can choose a presentation to open.
Returns
Section titled “Returns”void
Remarks
Section titled “Remarks”iOS app only. Throws in all other environments.
Throws
Section titled “Throws”MobileLockerError if called outside the iOS app.