Mobile Locker JavaScript SDK
    Preparing search index...

    Variable defaultConst

    default: {
        analytics: {
            logEvent(
                category: string,
                action: string,
                uri: string,
                data?: unknown,
                method?: string,
            ): void;
        };
        congresses: {
            get(eventID: number): Promise<Event>;
            getAttendees(eventID: number): Promise<Attendee[]>;
            getBusinessCards(): Promise<BusinessCard[]>;
            list(): Promise<Event[]>;
        };
        contacts: {
            getAll(): Promise<UserContact[]>;
            getChunked(minID: number, limit: number): Promise<UserContact[]>;
        };
        crm: {
            addCurrentCustomer(customerID: string): Promise<void>;
            clearCurrentCustomers(): Promise<void>;
            getAccounts(): Promise<unknown>;
            getAddresses(): Promise<unknown>;
            getContacts(): Promise<unknown>;
            getCurrentCustomers(): Promise<Customer[]>;
            getRecentCustomers(): Promise<Customer[]>;
            getUsers(): Promise<unknown>;
            isCurrentCustomer(objectID: string): Promise<boolean>;
            openCustomerPicker(): Promise<
                { customers?: Customer[]; status: PickerStatus },
            >;
            query(
                soql: string,
                parameters?: Record<string, unknown>,
            ): Promise<CRMQueryResult>;
            refresh(
                options?: { mode?: CRMRefreshMode },
            ): Promise<{ status: CRMRefreshStatus }>;
            removeCurrentCustomer(customerID: string): Promise<void>;
            setCurrentCustomers(customerIDs: string[]): Promise<void>;
        };
        data: {
            submitForm(formName: string, formInput: Record<string, unknown>): void;
        };
        database: {
            describe(
                database: string,
                table: string,
            ): Promise<DatabaseTableDescription>;
            list(): Promise<string[]>;
            query(
                path: string,
                sql: string,
                parameters?: Record<string, unknown> | unknown[],
            ): Promise<DatabaseQueryResult>;
        };
        device: {
            get(): Promise<DeviceInfo | null>;
            isAtLeastVersion(version: string): Promise<boolean>;
        };
        http: {
            request: (
                url: string,
                options?: HTTPRequestOptions,
            ) => Promise<HTTPResponse>;
            delete(url: string, options?: HTTPOptions): Promise<HTTPResponse>;
            get(url: string, options?: HTTPOptions): Promise<HTTPResponse>;
            patch(
                url: string,
                body?: unknown,
                options?: HTTPOptions,
            ): Promise<HTTPResponse>;
            post(
                url: string,
                body?: unknown,
                options?: HTTPOptions,
            ): Promise<HTTPResponse>;
            put(
                url: string,
                body?: unknown,
                options?: HTTPOptions,
            ): Promise<HTTPResponse>;
        };
        isApp: () => boolean;
        isCDN: () => boolean;
        isElectron: () => boolean;
        isIOS: () => boolean;
        isMobileLocker: () => boolean;
        log: {
            clearSdkLogs(): Promise<void>;
            debug(message: string, metadata?: Record<string, unknown>): void;
            deleteSdkLog(id: number): Promise<void>;
            error(message: string, metadata?: Record<string, unknown>): void;
            getSdkLogs(filter?: SDKLogFilter): Promise<SDKLogEntry[]>;
            info(message: string, metadata?: Record<string, unknown>): void;
            isEnabled(): boolean;
            liveMode(uri?: string): void;
            practiceMode(uri?: string): void;
            searchSdkLogs(text: string, filter?: SDKLogFilter): Promise<SDKLogEntry[]>;
            setMode(enabled: boolean): void;
            warn(message: string, metadata?: Record<string, unknown>): void;
        };
        MobileLockerError: typeof MobileLockerError;
        network: { getStatus(): Promise<NetworkStatus> };
        notificationLevels: {
            NOTIFY_EVERY: number;
            NOTIFY_FIRST: number;
            NOTIFY_MONTHLY: number;
            NOTIFY_NONE: number;
            NOTIFY_WEEKLY: number;
        };
        presentation: {
            close(): void;
            download(id: number): Promise<{ status: DownloadStatus }>;
            get(): Promise<Presentation>;
            getAll(): Promise<Presentation[]>;
            getByID(id: number): Promise<Presentation>;
            getByName(name: string): Promise<Presentation>;
            getDeviceEvents(): Promise<unknown[]>;
            getEvents(): Promise<unknown[]>;
            openByExternalID(externalID: string): void;
            openByID(id: number): void;
            openByName(name: string): void;
            openPicker(): void;
            refresh(): Promise<Presentation[]>;
            reload(): void;
        };
        scanner: {
            scanBadge(eventID: number): Promise<ScanResult>;
            scanBusinessCard(eventID?: number): Promise<ScanResult>;
        };
        search: {
            query(text: string, options?: SearchOptions): Promise<SearchResults>;
        };
        session: { getDeviceEvents(): Promise<unknown[]> };
        share: {
            email(
                to: string | { email: string; name?: string },
                subject: string,
                body?: string | null,
                attachment?: string | null,
                template?: string | null,
                formData?: unknown,
            ): void;
            presentation(
                recipients: ShareRecipient[],
                notificationLevel?: number,
                sendReminders?: boolean,
            ): void;
        };
        storage: {
            delete(name: string): Promise<void>;
            get(name: string): Promise<StorageEntry | null>;
            getAll(): Promise<StorageEntry[]>;
            getAllForPresentation(): Promise<StorageEntry[]>;
            getForPresentation(presentationID: number): Promise<StorageEntry[]>;
            query(filter?: StorageFilter): Promise<StorageEntry[]>;
            save(name: string, data: unknown): Promise<StorageEntry>;
            search(text: string, filter?: StorageFilter): Promise<StorageEntry[]>;
        };
        ui: {
            openPDF(
                pdfPath: string,
                title: string,
                customOptions?: Record<string, unknown>,
            ): void;
            openVideo(path: string, options?: VideoOptions): Promise<VideoResult>;
            showToolbar(): void;
        };
        user: { get(): Promise<User> };
    } = ...

    Type Declaration

    • analytics: {
          logEvent(
              category: string,
              action: string,
              uri: string,
              data?: unknown,
              method?: string,
          ): void;
      }
      • logEvent: function
        • Track a custom analytics event.

          Parameters

          • category: string

            Event category (e.g. 'data-capture', 'share').

          • action: string

            Event action (e.g. 'submit', 'open').

          • uri: string

            The URI or name that identifies the subject of the event.

          • Optionaldata: unknown

            Optional payload attached to the event.

          • method: string = DEFAULT_METHOD

            Internal tracking method; defaults to 'trackevent'.

          Returns void

          mobilelocker.analytics.logEvent('product', 'view', '/slides/overview', { productId: 42 })
          
    • congresses: {
          get(eventID: number): Promise<Event>;
          getAttendees(eventID: number): Promise<Attendee[]>;
          getBusinessCards(): Promise<BusinessCard[]>;
          list(): Promise<Event[]>;
      }
    • contacts: {
          getAll(): Promise<UserContact[]>;
          getChunked(minID: number, limit: number): Promise<UserContact[]>;
      }
      • getAll: function
      • getChunked: function
        • Get a paginated chunk of contacts starting after a given ID.

          Useful for incrementally syncing large contact lists without loading everything into memory at once.

          Parameters

          • minID: number

            Return only contacts with an ID greater than this value.

          • limit: number

            Maximum number of contacts to return.

          Returns Promise<UserContact[]>

          Array of UserContact objects.

          MobileLockerError on network failure or server error.

    • crm: {
          addCurrentCustomer(customerID: string): Promise<void>;
          clearCurrentCustomers(): Promise<void>;
          getAccounts(): Promise<unknown>;
          getAddresses(): Promise<unknown>;
          getContacts(): Promise<unknown>;
          getCurrentCustomers(): Promise<Customer[]>;
          getRecentCustomers(): Promise<Customer[]>;
          getUsers(): Promise<unknown>;
          isCurrentCustomer(objectID: string): Promise<boolean>;
          openCustomerPicker(): Promise<
              { customers?: Customer[]; status: PickerStatus },
          >;
          query(
              soql: string,
              parameters?: Record<string, unknown>,
          ): Promise<CRMQueryResult>;
          refresh(
              options?: { mode?: CRMRefreshMode },
          ): Promise<{ status: CRMRefreshStatus }>;
          removeCurrentCustomer(customerID: string): Promise<void>;
          setCurrentCustomers(customerIDs: string[]): Promise<void>;
      }
      • addCurrentCustomer: function
        • Add a single customer to the current session without replacing existing ones.

          Parameters

          • customerID: string

            The CRM object ID of the customer to add.

          Returns Promise<void>

          MobileLockerCRMError on network failure or server error.

      • clearCurrentCustomers: function
      • getAccounts: function
        • Get all CRM accounts synced for the current user.

          Returns Promise<unknown>

          Raw account records from the connected CRM.

          MobileLockerCRMError on network failure, auth expiry, or server error.

      • getAddresses: function
        • Get all CRM addresses synced for the current user.

          Returns Promise<unknown>

          Raw address records from the connected CRM.

          MobileLockerCRMError on network failure, auth expiry, or server error.

      • getContacts: function
        • Get all CRM contacts synced for the current user.

          Returns Promise<unknown>

          Raw contact records from the connected CRM.

          MobileLockerCRMError on network failure, auth expiry, or server error.

      • getCurrentCustomers: function
      • getRecentCustomers: function
      • getUsers: function
        • Get all CRM users synced for the current team.

          Returns Promise<unknown>

          Raw user records from the connected CRM.

          MobileLockerCRMError on network failure, auth expiry, or server error.

      • isCurrentCustomer: function
        • Check whether a CRM object is currently associated with the active session.

          Parameters

          • objectID: string

            The CRM object ID to check (e.g. a Salesforce Account ID).

          Returns Promise<boolean>

          true if the customer is current, false otherwise.

          MobileLockerCRMError on network failure or server error.

      • openCustomerPicker: function
        • Open the native customer picker UI and let the user select one or more customers.

          Returns Promise<{ customers?: Customer[]; status: PickerStatus }>

          An object with status ('selected' or 'cancelled') and an optional customers array.

          iOS app only. Throws in all other environments.

          MobileLockerError if called outside the iOS app.

          MobileLockerCRMError on network failure or server error.

          const { status, customers } = await mobilelocker.crm.openCustomerPicker()
          if (status === 'selected') console.log(customers)
      • query: function
        • Execute a SOQL query against the connected CRM.

          Parameters

          • soql: string

            A valid SOQL SELECT statement.

          • Optionalparameters: Record<string, unknown>

            Optional named bind parameters referenced in the SOQL string.

          Returns Promise<CRMQueryResult>

          A CRMQueryResult containing rows, totalSize, and done.

          MobileLockerCRMError with code SOQLInvalid on a syntax error, or on network/auth failure.

          const result = await mobilelocker.crm.query('SELECT Id, Name FROM Account WHERE Name = :name', { name: 'Acme' })
          
      • refresh: function
        • Trigger a CRM data refresh for the current user.

          Parameters

          • Optionaloptions: { mode?: CRMRefreshMode }
            • Optionalmode?: CRMRefreshMode

              'incremental' (default) syncs only new/changed records; 'full' re-syncs everything.

          Returns Promise<{ status: CRMRefreshStatus }>

          An object with status: 'started' if the refresh was queued, 'not_connected' if the CRM is unreachable.

          MobileLockerCRMError on auth expiry or server error.

          const { status } = await mobilelocker.crm.refresh({ mode: 'full' })
          
      • removeCurrentCustomer: function
        • Remove a single customer from the current session.

          Parameters

          • customerID: string

            The CRM object ID of the customer to remove.

          Returns Promise<void>

          MobileLockerCRMError on network failure or server error.

      • setCurrentCustomers: function
        • Replace the current customers for the active session.

          Parameters

          • customerIDs: string[]

            Array of CRM object IDs to set as current.

          Returns Promise<void>

          MobileLockerCRMError on network failure or server error.

    • data: { submitForm(formName: string, formInput: Record<string, unknown>): void }
      • submitForm: function
        • 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

          • 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 void

          mobilelocker.data.submitForm('lead-form', { firstName: 'Jane', email: 'jane@example.com' })
          
    • database: {
          describe(
              database: string,
              table: string,
          ): Promise<DatabaseTableDescription>;
          list(): Promise<string[]>;
          query(
              path: string,
              sql: string,
              parameters?: Record<string, unknown> | unknown[],
          ): Promise<DatabaseQueryResult>;
      }
      • describe: function
        • Describe the schema of a table in a SQLite database.

          In local development, falls back to sql.js and reads the schema directly from the database file via PRAGMA table_info.

          Parameters

          • database: string

            Path to the .sqlite file (relative to the presentation root).

          • table: string

            Name of the table to inspect.

          Returns Promise<DatabaseTableDescription>

          A DatabaseTableDescription with name, sql, and columns.

          MobileLockerDatabaseError with code InvalidPath if the table does not exist.

          const schema = await mobilelocker.database.describe('data/products.sqlite', 'products')
          console.log(schema.columns.map(c => c.name))
      • list: function
        • List the SQLite database files available to the current presentation.

          Returns Promise<string[]>

          Array of database file path strings.

          Returns an empty array outside the Mobile Locker app.

          MobileLockerDatabaseError on network failure or server error.

      • query: function
        • Execute a SQL SELECT query against a SQLite database embedded in the presentation.

          In local development, falls back to sql.js and fetches the database file directly. Only SELECT statements are permitted — write operations throw WriteNotPermitted.

          Parameters

          • path: string

            Path to the .sqlite file (relative to the presentation root).

          • sql: string

            A SQL SELECT statement, optionally with ? or :name placeholders.

          • parameters: Record<string, unknown> | unknown[] = []

            Positional array or named object of bind parameters.

          Returns Promise<DatabaseQueryResult>

          A DatabaseQueryResult with rows, rows_affected, and last_insert_row_id.

          MobileLockerDatabaseError with codes InvalidPath, WriteNotPermitted, NotReady, QueryFailed, or NotConnected.

          const result = await mobilelocker.database.query(
          'data/products.sqlite',
          'SELECT * FROM products WHERE category = ?',
          ['widgets']
          )
          result.rows.forEach(row => console.log(row.name))
    • device: {
          get(): Promise<DeviceInfo | null>;
          isAtLeastVersion(version: string): Promise<boolean>;
      }
      • get: function
        • Get hardware and app metadata for the current device.

          Returns Promise<DeviceInfo | null>

          A DeviceInfo object, or null outside the iOS app.

          iOS app only. Returns null in all other environments.

          const info = await mobilelocker.device.get()
          if (info) console.log(info.app.version, info.hardware.model)
      • isAtLeastVersion: function
        • Check whether the Mobile Locker app version meets a minimum requirement.

          Parameters

          • version: string

            Minimum required version string in major.minor.patch format (e.g. '5.2.0').

          Returns Promise<boolean>

          true if the current app version is equal to or greater than version.

          iOS app only. Returns false in all other environments.

          if (await mobilelocker.device.isAtLeastVersion('5.2.0')) {
          // use a feature introduced in 5.2.0
          }
    • http: {
          request: (
              url: string,
              options?: HTTPRequestOptions,
          ) => Promise<HTTPResponse>;
          delete(url: string, options?: HTTPOptions): Promise<HTTPResponse>;
          get(url: string, options?: HTTPOptions): Promise<HTTPResponse>;
          patch(
              url: string,
              body?: unknown,
              options?: HTTPOptions,
          ): Promise<HTTPResponse>;
          post(
              url: string,
              body?: unknown,
              options?: HTTPOptions,
          ): Promise<HTTPResponse>;
          put(
              url: string,
              body?: unknown,
              options?: HTTPOptions,
          ): Promise<HTTPResponse>;
      }
    • isApp: () => boolean
    • isCDN: () => boolean
    • isElectron: () => boolean
    • isIOS: () => boolean
    • isMobileLocker: () => boolean
    • log: {
          clearSdkLogs(): Promise<void>;
          debug(message: string, metadata?: Record<string, unknown>): void;
          deleteSdkLog(id: number): Promise<void>;
          error(message: string, metadata?: Record<string, unknown>): void;
          getSdkLogs(filter?: SDKLogFilter): Promise<SDKLogEntry[]>;
          info(message: string, metadata?: Record<string, unknown>): void;
          isEnabled(): boolean;
          liveMode(uri?: string): void;
          practiceMode(uri?: string): void;
          searchSdkLogs(text: string, filter?: SDKLogFilter): Promise<SDKLogEntry[]>;
          setMode(enabled: boolean): void;
          warn(message: string, metadata?: Record<string, unknown>): void;
      }
      • clearSdkLogs: function
        • Delete all SDK log entries for the current presentation and user.

          Returns Promise<void>

          MobileLockerError on network failure or server error.

      • debug: function
        • Write a debug-level log entry into the SDK log store.

          Parameters

          • message: string

            Human-readable description of the event.

          • Optionalmetadata: Record<string, unknown>

            Optional key/value data to attach to the entry.

          Returns void

      • deleteSdkLog: function
        • Delete a single SDK log entry by ID.

          Parameters

          • id: number

            The numeric ID of the entry to delete.

          Returns Promise<void>

          MobileLockerError on network failure or server error.

      • error: function
        • Write an error-level log entry into the SDK log store.

          Parameters

          • message: string

            Human-readable description of the event.

          • Optionalmetadata: Record<string, unknown>

            Optional key/value data to attach to the entry.

          Returns void

      • getSdkLogs: function
        • Retrieve structured SDK log entries with optional filtering.

          In the iOS app, fetches from the server-side GRDB table scoped to the current team, user, presentation, and device session. Outside the app, reads from IndexedDB via localforage (same entry shape, up to 1,000 entries).

          Parameters

          • Optionalfilter: SDKLogFilter

            Optional filter by level, domain, function, date range, retries, and limit.

          Returns Promise<SDKLogEntry[]>

          Array of SDKLogEntry objects, newest first.

          MobileLockerError on network failure or server error.

          const errors = await mobilelocker.log.getSdkLogs({ level: 'error', domain: 'crm' })
          
      • info: function
        • Write an info-level log entry into the SDK log store.

          Parameters

          • message: string

            Human-readable description of the event.

          • Optionalmetadata: Record<string, unknown>

            Optional key/value data to attach to the entry.

          Returns void

          mobilelocker.log.info('User selected product', { productId: 42, slide: 'overview' })
          
      • isEnabled: function
        • Check whether debug mode is currently enabled.

          Returns boolean

          true if debug mode is on.

      • liveMode: function
        • Mark the current session as a live (non-practice) presentation.

          Parameters

          • uri: string = ''

            Optional URI or identifier to associate with the event.

          Returns void

      • practiceMode: function
        • Mark the current session as a practice presentation.

          Parameters

          • uri: string = ''

            Optional URI or identifier to associate with the event.

          Returns void

      • searchSdkLogs: function
        • Full-text search across SDK log entries.

          Searches the message field and stringified metadata. Accepts the same filter options as getSdkLogs to narrow the scope before searching.

          Parameters

          • text: string

            The search string.

          • Optionalfilter: SDKLogFilter

            Optional pre-filter applied before the text search.

          Returns Promise<SDKLogEntry[]>

          Array of matching SDKLogEntry objects.

          MobileLockerError on network failure or server error.

      • setMode: function
        • Enable or disable debug mode.

          Parameters

          • enabled: boolean

            Pass true to enable, false to disable.

          Returns void

      • warn: function
        • Write a warn-level log entry into the SDK log store.

          Parameters

          • message: string

            Human-readable description of the event.

          • Optionalmetadata: Record<string, unknown>

            Optional key/value data to attach to the entry.

          Returns void

    • MobileLockerError: typeof MobileLockerError
    • network: { getStatus(): Promise<NetworkStatus> }
      • getStatus: function
        • Get the current network connectivity status.

          In the iOS app, returns accurate connection type from the native layer. In the browser, falls back to navigator.onLine — note that this may return true on captive portals even without real internet access.

          Returns Promise<NetworkStatus>

          A NetworkStatus object with connected and type.

          const { connected, type } = await mobilelocker.network.getStatus()
          if (!connected) showOfflineBanner()
    • notificationLevels: {
          NOTIFY_EVERY: number;
          NOTIFY_FIRST: number;
          NOTIFY_MONTHLY: number;
          NOTIFY_NONE: number;
          NOTIFY_WEEKLY: number;
      }
    • presentation: {
          close(): void;
          download(id: number): Promise<{ status: DownloadStatus }>;
          get(): Promise<Presentation>;
          getAll(): Promise<Presentation[]>;
          getByID(id: number): Promise<Presentation>;
          getByName(name: string): Promise<Presentation>;
          getDeviceEvents(): Promise<unknown[]>;
          getEvents(): Promise<unknown[]>;
          openByExternalID(externalID: string): void;
          openByID(id: number): void;
          openByName(name: string): void;
          openPicker(): void;
          refresh(): Promise<Presentation[]>;
          reload(): void;
      }
    • scanner: {
          scanBadge(eventID: number): Promise<ScanResult>;
          scanBusinessCard(eventID?: number): Promise<ScanResult>;
      }
      • scanBadge: function
        • Open the native badge scanner and capture an event attendee.

          Parameters

          • eventID: number

            The lead retrieval event ID to associate the scan with.

          Returns Promise<ScanResult>

          A ScanResult — check status before accessing attendee.

          iOS app only. Throws in all other environments.

          MobileLockerError if called outside the iOS app.

          const result = await mobilelocker.scanner.scanBadge(eventID)
          if (result.status === 'success') console.log(result.attendee)
      • scanBusinessCard: function
        • Open the native business card scanner and capture a contact.

          Parameters

          • OptionaleventID: number

            Optional lead retrieval event ID to associate the scan with.

          Returns Promise<ScanResult>

          A ScanResult — check status before accessing businessCard.

          iOS app only. Throws in all other environments.

          MobileLockerError if called outside the iOS app.

          const result = await mobilelocker.scanner.scanBusinessCard()
          if (result.status === 'success') console.log(result.businessCard)
      • query: function
        • Search across multiple entity types simultaneously.

          Returns results grouped by type. Use options.types to restrict the search to specific entities and options.limit to control result set size per type.

          Parameters

          • text: string

            The search string.

          • options: SearchOptions = {}

            Optional filter for entity types and result limit.

          Returns Promise<SearchResults>

          A SearchResults object with a result set for each entity type.

          MobileLockerError on network failure or server error.

          const results = await mobilelocker.search.query('Acme', { types: ['customers'], limit: 10 })
          results.customers.results.forEach(c => console.log(c.name))
    • session: { getDeviceEvents(): Promise<unknown[]> }
      • getDeviceEvents: function
        • Get all analytics events recorded during the current device session.

          In the iOS app, fetches events from the server scoped to the current session. Outside the app (local development), returns events buffered in IndexedDB via localforage.

          Returns Promise<unknown[]>

          Array of raw event objects.

    • share: {
          email(
              to: string | { email: string; name?: string },
              subject: string,
              body?: string | null,
              attachment?: string | null,
              template?: string | null,
              formData?: unknown,
          ): void;
          presentation(
              recipients: ShareRecipient[],
              notificationLevel?: number,
              sendReminders?: boolean,
          ): void;
      }
      • email: function
        • Send an email through the Mobile Locker platform.

          Parameters

          • to: string | { email: string; name?: string }

            Recipient email string, or an object with email and optional name.

          • subject: string

            Email subject line.

          • body: string | null = null

            Optional email body text.

          • attachment: string | null = null

            Optional path to a file to attach.

          • template: string | null = null

            Optional email template identifier.

          • formData: unknown = null

            Optional additional form data to include with the email record.

          Returns void

          mobilelocker.share.email(
          { name: 'Jane', email: 'jane@example.com' },
          'Thanks for stopping by',
          'It was great meeting you at the conference.',
          )
      • presentation: function
        • Share the current presentation with one or more recipients.

          Sends the presentation link via the Mobile Locker platform. No-op outside the Mobile Locker environment (e.g. local development).

          Parameters

          • recipients: ShareRecipient[]

            One or more recipients, each requiring at least an email.

          • notificationLevel: number = 2

            Controls when recipients receive email notifications. Use the mobilelocker.notificationLevels constants. Defaults to NOTIFY_EVERY (2).

          • sendReminders: boolean = true

            Whether to send follow-up reminder emails. Defaults to true.

          Returns void

          MobileLockerError if recipients is empty or any recipient is missing an email.

          mobilelocker.share.presentation(
          [{ email: 'jane@example.com', name: 'Jane' }],
          mobilelocker.notificationLevels.NOTIFY_FIRST,
          )
    • storage: {
          delete(name: string): Promise<void>;
          get(name: string): Promise<StorageEntry | null>;
          getAll(): Promise<StorageEntry[]>;
          getAllForPresentation(): Promise<StorageEntry[]>;
          getForPresentation(presentationID: number): Promise<StorageEntry[]>;
          query(filter?: StorageFilter): Promise<StorageEntry[]>;
          save(name: string, data: unknown): Promise<StorageEntry>;
          search(text: string, filter?: StorageFilter): Promise<StorageEntry[]>;
      }
      • delete: function
        • Delete the storage entry with the given name.

          Parameters

          • name: string

            The key name of the entry to delete.

          Returns Promise<void>

          MobileLockerError on network failure or server error.

      • get: function
      • getAll: function
      • getAllForPresentation: function
      • getForPresentation: function
      • query: function
        • Query storage entries with optional filtering.

          Outside the Mobile Locker app, filters are applied locally against IndexedDB.

          Parameters

          • Optionalfilter: StorageFilter

            Optional filter by name, presentation, date range, and limit.

          Returns Promise<StorageEntry[]>

          Array of matching StorageEntry objects.

          MobileLockerError on network failure or server error.

          const entries = await mobilelocker.storage.query({ name: 'scan-results', limit: 10 })
          
      • save: function
        • Save a value to storage under the given name.

          Creates a new entry if one does not exist, or updates the existing entry. Outside the Mobile Locker app, persists to IndexedDB via localforage.

          Parameters

          • name: string

            The key name for the entry.

          • data: unknown

            Any JSON-serializable value to store.

          Returns Promise<StorageEntry>

          The saved StorageEntry.

          MobileLockerError on network failure or server error.

          await mobilelocker.storage.save('scan-results', { leads: [...] })
          
      • search: function
    • ui: {
          openPDF(
              pdfPath: string,
              title: string,
              customOptions?: Record<string, unknown>,
          ): void;
          openVideo(path: string, options?: VideoOptions): Promise<VideoResult>;
          showToolbar(): void;
      }
      • openPDF: function
        • Open a PDF file in the platform viewer.

          In the iOS app, opens the native PDF viewer with annotation support. In the browser, opens the file in a new tab.

          Parameters

          • pdfPath: string

            Path to the PDF file, relative to the presentation root.

          • title: string

            Display title for the viewer.

          • OptionalcustomOptions: Record<string, unknown>

            Optional extra properties passed through to the analytics event.

          Returns void

          mobilelocker.ui.openPDF('/files/brochure.pdf', 'Product Brochure')
          
      • openVideo: function
        • Open a video file in the platform player.

          In the iOS app, uses the native AVPlayer with full option support. In the browser, renders a full-viewport <video> overlay. Click outside the video to dismiss it.

          Parameters

          • path: string

            Path to the video file, relative to the presentation root.

          • options: VideoOptions = {}

            Playback options (autoplay, loop, controls, speed, etc.).

          Returns Promise<VideoResult>

          A VideoResult with status and final playback position in seconds.

          const result = await mobilelocker.ui.openVideo('/files/demo.mp4', { autoplay: true, showControls: true })
          if (result.status === 'completed') console.log(`Watched to ${result.position}s`)
      • showToolbar: function
        • Show the app navigation toolbar.

          Returns void

          iOS app only. Throws in all other environments.

          MobileLockerError if called outside the iOS app.

    • user: { get(): Promise<User> }
      • get: function
        • Get the currently authenticated user.

          Returns Promise<User>

          The authenticated User.

          MobileLockerError on network failure or server error.

          const u = await mobilelocker.user.get()
          console.log(`Hello, ${u.name}`)