> ## Documentation Index
> Fetch the complete documentation index at: https://moengage-sdk-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Cards Data Payload

# SyncCompleteData

<CodeGroup>
  ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  /**
   * Data on API sync complete.
   */
  class SyncCompleteData {

      /**
       * Indicating if there were any updates in the cards post sync. true if there are any new
       * updates present else false. This value is true even if card(s) are deleted.
       */
      hasUpdates: boolean;

      /**
       * Condition under which sync was triggered. Refer to {@link SyncType}
       */
      syncType: SyncType;
  }
  ```
</CodeGroup>

# CardInfo

<CodeGroup>
  ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  /**
   * All data for cards.
   */
   class CardInfo {

      /**
       * True if showing ALL tabs is enabled else false.
       */
      shouldShowAllTab: boolean;

      /**
       * All configured categories for cards.
       */
      categories: Array<string>;

      /**
       * All cards which are eligible for display currently.
       */
      cards: Array<Card>;

      /**
       * Accessibility data for static images used in cards.
       * 
       * @since 6.0.0
       */ 
      staticImageAccessibilityData:  { [key in StaticImageType]: MoEAccessibilityData } | null;
  }
  ```
</CodeGroup>

# Card

<CodeGroup>
  ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  /**
   * Card data
   */
  class Card {

      /**
       * Internal SDK identifier.
       */
      id: number;

      /**
       * Unique identifier for the campaign
       */
      cardId: string;

      /**
       * Category to which the campaign belongs.
       */
      category: string;

      /**
       * Template payload for the campaign.
       */
      template: Template;

      /**
       * Meta data related to the campaign like status, delivery control etc.
       */
      metaData: MetaData;
  }
  ```
</CodeGroup>

# Template

<CodeGroup>
  ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  /**
   * Card Template data
   */
   class Template {

      /**
       * Type of Template.
       */
      templateType: TemplateType;

      /**
       * Containers in the template.
       */
      containers: Array<Container>;

      /**
       * Additional data associated to the template
       */
      kvPairs: { [k: string]: any };
  }
  ```
</CodeGroup>

# TemplateType

<CodeGroup>
  ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  /**
   * Supported template types.
   */
   enum TemplateType {

      /**
       * Basic Template
       */
      BASIC,

      /**
       * Illustration Template
       */
      ILLUSTRATION
  }
  ```
</CodeGroup>

# Container

<CodeGroup>
  ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  /**
   * Container to hold UI widget
   */
   class Container {

      /**
       * Unique identifier for a template
       */
      id: number;

      /**
       * Type of container.
       */
      templateType: TemplateType;

      /**
       * Style associated to the Container
       */
      style: ContainerStyle | undefined;

      /**
       * Widget list associated to the Container
       */
      widgets: Array<Widget>;

      /**
       * Actions to be performed on widget click
       */
      actionList: Array<Action>;
  }
  ```
</CodeGroup>

# Widget

<CodeGroup>
  ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  /**
   * UI element in a card.
   */
   class Widget {

      /**
       * Identifier for the widget.
       */
      id: number;

      /**
       * Type of widget
       */
      widgetType: WidgetType;

      /**
       * Content to be loaded in the widget.
       */
      content: string;

      /**
       * Style associated with the widget
       */
      style: WidgetStyle | undefined;

      /**
       * Actions to be performed on widget click
       */
      actionList: Array<Action>;

      /**
       * Accessibility data for the widget
       * @since 6.0.0
       */
      accessibilityData: MoEAccessibilityData | null;

  }
  ```
</CodeGroup>

# WidgetType

<CodeGroup>
  ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  /**
   * Types of UI widgets supported.
   */
  enum WidgetType {

      /**
       * Widget that loads an image or gif
       */
      IMAGE,

      /**
       * Widget that loads text content.
       */
      TEXT,

      /**
       * Widget that loads button content.
       */
      BUTTON
  }
  ```
</CodeGroup>

# MetaData

<CodeGroup>
  ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  /**
   * Meta data related to a campaign.
   */
  class MetaData {

      /**
       * True if the campaign should be pinned to the top else false.
       */
      isPinned: boolean;

      /**
       * True if the campaign hasn't been delivered to the inbox, else false.
       */
      isNewCard: boolean;

      /**
       * Current state of the campaign.
       */
      campaignState: CampaignState;

      /**
       * Time at which the campaign would be deleted from local store    
       */
      deletionTime: number;

      /**
       * Delivery Controls defined during campaign creation.
       */
      displayControl: DisplayControl;

      /**
       * Additional meta data regarding campaign used for tracking purposes.
       */
      metaData: { [k: string]: any };

      /**
       * Creation time for the campaign.
       * Notes: Available in iOS, default value is -1
       */
      createdAt: number;

      /**
       * Last time the campaign was updated.
       */
      updatedTime: number;

      /**
       * Complete Campaign payload.
       */
      campaignPayload: { [k: string]: any };
  }
  ```
</CodeGroup>

# CardsData

<CodeGroup>
  ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  /**
   * Data for cards
   */
  class CardsData {

      /**
       * Category for the cards
       */
      category: string;

      /**
       * [List] of [Card]
       */
      cards: Array<Card>;

      /**
       * Accessibility data for static images used in cards.
       * 
       * @since 6.0.0
       */
      staticImageAccessibilityData:  { [key in StaticImageType]: MoEAccessibilityData } | null;
  }
  ```
</CodeGroup>

# SyncType

<CodeGroup>
  ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  /**
   * Condition/Situation when sync
   */
  enum SyncType {

      /**
       * Sync when application comes to foreground
       */
      APP_OPEN,

      /**
       * Sync when inbox screen opened.
       */
      INBOX_OPEN,

      /**
       * Sync when SwipeToRefresh widget is pulled.
       */
      PULL_TO_REFRESH
        
      /**
       * Sync when user logs in 
       * @since 5.0.0
       */
      IMMEDIATE
    
  }
  ```
</CodeGroup>

# StaticImageType

<CodeGroup>
  ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  /**
   * Enum representing different types of static images used in the cards.
   * 
   * @since 6.0.0
   */
  enum StaticImageType {
      /**
       * Image for No cards/Empty State
       */
      EMPTY_STATE
      
      /**
       * Pin Card image
       */
      PIN_CARD
     
      /**
       * Place Holder image for card loading
       */
      LOADING_PLACE_HOLDER
  }
  ```
</CodeGroup>

# AccessibilityData

<CodeGroup>
  ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  /// @since 12.0.0 of react-native-moengage package
  class MoEAccessibilityData {
    /// The accessibility text
    text: string | null;
    
    /// The accessibility hint
    hint: string | null;
  }
  ```
</CodeGroup>
