Models Reference

Descriptive reference of the main models used across SDK modules.


Table of Contents

  1. Push
  2. Device
  3. Customer
  4. InboxNotification
  5. InApp
  6. Topic

Push

Module: push · Package: push/src · File: service-worker.js

Represents a push notification received from the Indigitall platform. Contains all the data needed to display and handle the notification in the browser via the Service Worker.

PropertyTypeRequiredDescription
idNumberNoInternal push notification identifier
appKeyStringYesApplication key used to identify the app in the Indigitall platform
deviceIdStringNoIdentifier of the device that received the push
titleStringNoTitle of the push notification displayed to the user
bodyStringNoMain text body of the push notification
iconStringNoURL of the icon image to display in the notification
imageStringNoURL of the large image to display in the expanded notification
imageSquareStringNoURL of a square fallback image when the browser does not support image in notifications
monochromeStringNoURL of the monochrome badge icon (badge field in Notification API)
sendingIdStringNoIdentifier of the sending campaign instance
campaignIdStringNoIdentifier of the campaign this push belongs to
journeyStateIdNumberNoIdentifier of the journey state associated with this push
requireInteractionBooleanNoIf true, the notification stays visible until the user interacts with it
extraFieldsObjectNoMap of extra field names to merge into the notification options object
actionPushActionNoAction to execute when the user taps the notification
buttonsArray<PushButton>NoList of action buttons displayed in the expanded notification

Related models

PushAction — Defines the action executed when a push notification is tapped.

PropertyTypeDescription
urlStringURL to open when the notification is clicked
topicsArray<String>Topic codes to subscribe/unsubscribe when action fires

PushButton — Represents an action button shown in the expanded notification.

PropertyTypeDescription
labelStringText label displayed on the button
actionObjectAction object with url and/or topics to execute on button tap

Device

Module: core / push · Package: core/src/models · File: Device.js · Extended by: PushDevice

Represents the browser/device registered in the Indigitall platform. PushDevice extends Device with push-specific fields (deviceId, pushToken).

PropertyTypeRequiredDescription
deviceIdStringNoUnique identifier assigned to this device by the Indigitall platform
pushTokenStringNoWeb Push subscription token (vapid endpoint) — only in PushDevice
browserPublicKeyStringNoVAPID public key stored for the browser subscription
browserPrivateKeyStringNoVAPID private key stored for the browser subscription
platformStringNoPlatform identifier (e.g. webpush)
versionStringNoSDK version string
productNameStringNoAlias for platform; sent in registration requests
productVersionStringNoAlias for version; sent in registration requests
browserNameStringNoName of the browser (e.g. Chrome)
browserVersionStringNoVersion of the browser
osNameStringNoOperating system name (e.g. Windows, macOS)
osVersionStringNoOperating system version string
deviceTypeStringNoForm-factor of the device (e.g. desktop, mobile)
localeStringNoBrowser language locale (from navigator.language)
timeZoneStringNoIANA time zone name (from Intl.DateTimeFormat)
timeOffsetNumberNoUTC offset in minutes (negative of Date.getTimezoneOffset())
enabledBooleanNoWhether push notifications are enabled for this device
externalCodeStringNoCustom external identifier provided by the integrating application
registeredByCookieBooleanNoWhether the device was registered via cookie rather than an explicit call

Customer

Module: customer · Package: customer/src/models · File: Customer.js

Represents a customer (end-user identity) linked to a device in the Indigitall platform.

PropertyTypeRequiredDescription
idNumberNoInternal Indigitall identifier for the customer record
customerIdStringNoExternal identifier provided by the integrating application
applicationIdNumberNoIndigitall application identifier this customer belongs to
createdAtStringNoISO 8601 timestamp of when the customer record was created
updatedAtStringNoISO 8601 timestamp of the last update to the customer record

Related models

CustomerField — A key/value pair used to set custom attributes on a customer.

PropertyTypeDescription
customerFieldKeyStringThe attribute key name
customerFieldValueStringThe attribute value

InboxNotification

Module: inbox · Package: inbox/src/models · File: InboxNotification.js

Represents a single notification stored in the user's Inbox.

PropertyTypeRequiredDescription
idNumberNoInternal notification identifier
externalIdStringNoExternal identifier supplied by the integrating application
sentAtStringNoISO 8601 timestamp of when the notification was sent
statusStringNoDelivery status of the notification. See InboxStatus
sendingIdStringNoIdentifier of the sending campaign instance
messageObjectNoNotification content payload (title, body, image, etc.)
campaignIdStringNoIdentifier of the campaign this notification belongs to
readBooleanComputed — true if sentAt is earlier than the last inbox access time. Default: false

Related models

InboxStatus — Enum of possible notification statuses.

ValueDescription
sentNotification was sent but not interacted with
clickNotification was clicked by the user
deletedNotification was deleted

InboxAuthMode — Enum that controls how inbox authentication is performed.

ValueDescription
noneNo authentication required
defaultDefault Indigitall authentication
webhookAuthentication delegated to an external webhook

Inbox — Container model returned by the inbox list API.

PropertyTypeDescription
lastAccessStringTimestamp of the last time the inbox was opened
pageNumberCurrent page number (0-based)
pageSizeNumberNumber of notifications per page
countNumberTotal number of notifications
totalPagesNumberTotal number of pages (Math.trunc(count / pageSize))
notificationsArray<InboxNotification>List of notifications for the current page
dateFromStringOptional date filter (from)
dateToStringOptional date filter (to)
statusListArray<String>Optional status filter list
isRequestingPageBooleanWhether a page request is currently in flight

InApp

Module: inapp · Package: inapp/src/models · File: InApp.js

Represents an in-app message fetched from the Indigitall platform and stored in local cache.

PropertyTypeRequiredDescription
inAppIdNumberNoUnique identifier of the in-app message
nameStringNoDisplay name of the in-app campaign
versionNumberNoVersion number of the in-app message definition
profileStringNoProfile tag used to target specific user segments
showOnceBooleanNoIf true, the in-app is shown only once per device
cacheTtlNumberNoTime-to-live for the cache entry in seconds
creationDateStringNoISO 8601 creation date; defaults to the current date if not provided
expiredDateStringNoISO 8601 expiry date; computed from cacheTtl if not provided
customDataObjectNoArbitrary custom payload attached to the in-app message
filtersObjectNoAudience and display filters applied to this in-app
schemaInAppSchemaNoLayout schema (dimensions and code) of the in-app
propertiesInAppPropertiesNoDisplay and behaviour properties of the in-app
inAppShowInAppShowTracking counters for display and click events. Always initialised (defaults to zero counts)

Related models

InAppSchema — Describes the size and code of the in-app layout.

PropertyTypeDescription
codeStringLayout code identifier
widthNumberWidth of the in-app container (px)
heightNumberHeight of the in-app container (px)

InAppProperties — Controls how and when the in-app is displayed.

PropertyTypeDescription
contentUrlStringURL of the HTML content to render inside the in-app
showTimeNumberDuration in seconds to display the in-app before auto-dismissing
numberOfShowsNumberMaximum number of times the in-app may be displayed
numberOfClicksNumberMaximum number of times the in-app may be clicked
dismissForeverBooleanIf true, the in-app is never shown again after being dismissed
layoutInAppLayoutLayout styling options
actionInAppActionAction executed when the in-app is tapped

InAppAction — Defines the action executed when the in-app (or a button) is tapped.

PropertyTypeDescription
actionIdStringUnique identifier of the action
typeStringAction type. Values: url, app, no_action
urlStringURL to open when type is url
appStringDeep-link or path to open when type is app
no_actionBooleanIf true, no navigation is performed
destroyBooleanIf true, the in-app is destroyed/dismissed after the action fires
topicsArray<String>Topic codes to subscribe/unsubscribe when the action fires

InAppLayout — Styling options for the in-app container.

PropertyTypeDescription
borderRadiusNumberBorder radius in pixels for the in-app card

InAppShow — Tracks how many times an in-app has been shown or clicked in the current session.

PropertyTypeDefaultDescription
timesShowedNumber0Number of times this in-app has been shown
timesClickedNumber0Number of times this in-app has been clicked
wasDismissedBooleanfalseWhether the in-app was dismissed by the user

InAppShowOnce — Persistent record stored in session storage to enforce show-once/show-limit logic.

PropertyTypeDescription
inAppIdNumberIdentifier of the in-app message
schemeStringPage scheme/URL where the in-app was last shown
creationDateStringDate the record was first created
expiredDateStringDate after which the record is considered expired
timesShowedNumberAccumulated number of times shown
timesClickedNumberAccumulated number of times clicked
lastVersionIdNumberVersion of the in-app definition when last shown

InAppForm — Represents a form embedded inside an in-app message.

PropertyTypeDescription
inAppIdNumberIdentifier of the parent in-app message
formIdStringUnique form identifier
inappVersionNumberVersion of the in-app this form belongs to
inputsArray<InAppFormInput>List of input fields in the form

InAppFormInput — A single input field inside an InAppForm.

PropertyTypeDescription
idStringUnique field identifier
nameStringField name / label
typeStringInput type. Values: text, number, radio, checkbox, select
requiredBooleanWhether the field must be filled before submitting
sendToCustomerBooleanIf true, the field value is forwarded to the Customer API on form submission

Topic

Module: push · Package: push/src/models · File: INTopic.js

Represents a notification topic that a device can subscribe or unsubscribe to.

PropertyTypeRequiredDescription
codeStringNoUnique code identifying the topic
nameStringNoHuman-readable name of the topic
visibleBooleanNoWhether the topic is visible in topic-management UIs
parentCodeStringNoCode of the parent topic (for hierarchical topic trees)
subscribedBooleanWhether the current device is subscribed to this topic. Default: false

Note: LiveActivity is not part of this JavaScript Web Push SDK. It is an iOS-native feature available in the iOS SDK only.