data
const data: { submitForm: void; getProducts: Promise<Product[]>; getProduct: Promise<Product>; getLabels: Promise<Label[]>; getLabel: Promise<Label>; getFolders: Promise<Folder[]>; getFolder: Promise<Folder>; getCustomers: Promise<Customer[]>; getCustomer: Promise<Customer>;};Defined in: domains/data.ts:10
Type Declaration
Section titled “Type Declaration”submitForm()
Section titled “submitForm()”submitForm(formName, formInput): void;Submit a data capture form event.
Records the form submission in the Mobile Locker analytics pipeline under
the 'data-capture' category. Use this to track lead forms, survey responses,
or any structured input the user submits during a presentation.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
formName |
string |
Identifier for the form (e.g. 'lead-form', 'product-interest'). |
formInput |
Record<string, unknown> |
Key/value pairs representing the form fields and their values. |
Returns
Section titled “Returns”void
Example
Section titled “Example”mobilelocker.data.submitForm('lead-form', { firstName: 'Jane', email: 'jane@example.com' })getProducts()
Section titled “getProducts()”getProducts(): Promise<Product[]>;Get all products available to the current team.
Returns
Section titled “Returns”Promise<Product[]>
Array of Product objects.
Throws
Section titled “Throws”MobileLockerError on network failure or server error.
getProduct()
Section titled “getProduct()”getProduct(id): Promise<Product>;Get a specific product by ID.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
id |
number |
The numeric product ID. |
Returns
Section titled “Returns”Promise<Product>
The matching Product.
Throws
Section titled “Throws”MobileLockerError on network failure or if not found.
getLabels()
Section titled “getLabels()”getLabels(): Promise<Label[]>;Get all labels available to the current team.
Returns
Section titled “Returns”Promise<Label[]>
Array of Label objects.
Throws
Section titled “Throws”MobileLockerError on network failure or server error.
getLabel()
Section titled “getLabel()”getLabel(id): Promise<Label>;Get a specific label by ID.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
id |
number |
The numeric label ID. |
Returns
Section titled “Returns”Promise<Label>
The matching Label.
Throws
Section titled “Throws”MobileLockerError on network failure or if not found.
getFolders()
Section titled “getFolders()”getFolders(): Promise<Folder[]>;Get all folders in the current user’s library.
Returns
Section titled “Returns”Promise<Folder[]>
Array of Folder objects.
Throws
Section titled “Throws”MobileLockerError on network failure or server error.
getFolder()
Section titled “getFolder()”getFolder(id): Promise<Folder>;Get a specific folder by ID.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
id |
number |
The numeric folder ID. |
Returns
Section titled “Returns”Promise<Folder>
The matching Folder.
Throws
Section titled “Throws”MobileLockerError on network failure or if not found.
getCustomers()
Section titled “getCustomers()”getCustomers(): Promise<Customer[]>;Get all customers synced for the current user.
Returns
Section titled “Returns”Promise<Customer[]>
Array of Customer objects.
Throws
Section titled “Throws”MobileLockerError on network failure or server error.
getCustomer()
Section titled “getCustomer()”getCustomer(id): Promise<Customer>;Get a specific customer by their CRM object ID.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
id |
string |
The CRM object ID (e.g. a Salesforce 18-char ID). |
Returns
Section titled “Returns”Promise<Customer>
The matching Customer.
Throws
Section titled “Throws”MobileLockerError on network failure or if not found.