Skip to main content

Promotion Data Models

This document provides comprehensive documentation for all GraphQL types and models used in the Main App Promotion API.

Core Types​

Promotion​

The main promotion entity containing all promotional content and metadata.

type Promotion {
id: ID!
name: String!
description: String!
slug: String!
category: PromotionCategory!
type: PromotionType!
status: PromotionStatus!
imageUrl: String
altText: String
backgroundColor: String
startDate: String
endDate: String

# Button Configuration
primaryButton: PromotionPrimaryButton!
secondaryButton: PromotionSecondaryButton
iconButtons: PromotionExtendedSlide

# Content Components
slider: PromotionSlider
popup: PromotionPopup
videoSlider: PromotionVideoSlider

# Metadata
badge: PromotionBadge
howItWorks: PromotionHowItWorks!
seo: SEOSingleLanguage!

# User Interaction
isClaimed: Boolean!
isClicked: Boolean!
usersClaimed: UsersClaimedPromotionResponse!
remainedSecondsToOptIn: Int
latestStakes: [PromotionLatestStake]
randomUsersClicks: [UserPromotion]
}

PromotionSlider​

Slider-specific content for carousel displays.

type PromotionSlider {
name: String!
title: String!
description: String
imageUrl: String!
btnText: String
link: String
actionType: SliderAction!
initialClickCount: Int!
startDate: String
endDate: String
}

PromotionPopup​

Popup-specific content for modal displays.

type PromotionPopup {
name: String!
title: String!
description: String
imageUrl: String!
btnText: String
link: String
actionType: SliderAction!
layout: PromotionPopupLayout!
initialClickCount: Int!
startDate: String
endDate: String
}

PromotionVideoSlider​

Video slider-specific content for multimedia displays.

type PromotionVideoSlider {
name: String!
title: String!
description: String
videoUrl: String!
btnText: String
link: String
actionType: SliderAction!
initialClickCount: Int!
startDate: String
endDate: String
}

Button Models​

PromotionPrimaryButton​

Primary action button with user state-aware text and actions.

type PromotionPrimaryButton {
text: String!
label: String! # Deprecated - use text instead
action: ActionButton!
}

PromotionSecondaryButton​

Optional secondary action button.

type PromotionSecondaryButton {
action: ActionButton!
}

PromotionExtendedSlide​

Extended slide configuration with icon buttons and positioning.

type PromotionExtendedSlide {
text: String!
textPosition: PromotionExtendedSliderTextPosition!
firstGroup: [PromotionIconButton!]!
secondGroup: [PromotionIconButton!]
}

PromotionIconButton​

Individual icon button configuration.

type PromotionIconButton {
icon: String!
action: ActionButton!
}

ActionButton​

Action configuration for buttons with multiple action types.

type ActionButton {
modal: ActionsButton
externalUrl: String
internalUrl: String
}

Metadata Models​

PromotionBadge​

Badge configuration for promotional highlights.

type PromotionBadge {
icon: String!
text: String!
}

PromotionHowItWorks​

Step-by-step instructions and terms for promotions.

type PromotionHowItWorks {
title: String!
steps: [String!]!
longDescription: String!
terms: String!
}

SEOSingleLanguage​

SEO metadata for promotion pages.

type SEOSingleLanguage {
title: String
description: String
socialImage: String
}

User Interaction Models​

UsersClaimedPromotionResponse​

Information about users who have claimed the promotion.

type UsersClaimedPromotionResponse {
count: Int!
sampleUsers: [UserPromotion!]!
}

UserPromotion​

Sample user information for social proof.

type UserPromotion {
id: String!
avatarUrl: String!
}

PromotionLatestStake​

Recent stake information for gambling promotions.

type PromotionLatestStake {
amount: Float!
currency: String!
user: UserPromotion!
timestamp: String!
}

Response Models​

PromotionPaginationResponse​

Paginated response for promotion queries.

type PromotionPaginationResponse {
count: Int!
data: [Promotion!]!
limit: Int!
offset: Int!
}

Enums​

PromotionCategory​

Categories for organizing promotions.

enum PromotionCategory {
CASINO
SPORTS
GENERAL
}

PromotionType​

Size/complexity classification for promotions.

enum PromotionType {
SMALL
BIG
}

PromotionStatus​

Lifecycle status of promotions.

enum PromotionStatus {
DRAFT
STAGING_ACTIVE
ACTIVE
INACTIVE
ARCHIVED
}

SliderAction​

Action types for interactive elements.

enum SliderAction {
AUTH # Authentication required
LINK # External/internal link
BUTTON # Custom button action
}

PromotionPopupLayout​

Layout options for popup displays.

enum PromotionPopupLayout {
IMAGE
TEXT_AND_BUTTON
FULL_SCREEN
}

SliderCategory​

Categories for slider content organization.

enum SliderCategory {
HOME_PAGE
CASINO_LOBBY
SPORTS_LOBBY
PROFILE_PAGE
}

PopupCategory​

Categories for popup content organization.

enum PopupCategory {
POPUP
NOTIFICATION
BANNER
MODAL
}

VideoSliderCategory​

Categories for video slider content organization.

enum VideoSliderCategory {
CASINO_EXPLORE
SPORTS_HIGHLIGHT
TUTORIAL
PROMOTIONAL
}

ActionsButton​

Predefined action types for buttons.

enum ActionsButton {
WALLET
SIGN_IN
SIGN_UP
DEPOSIT
WITHDRAW
NOTIFICATION
PROFILE
SETTINGS
SUPPORT
GAMES
SPORTS
CASINO
}

PromotionExtendedSliderTextPosition​

Text positioning options for extended sliders.

enum PromotionExtendedSliderTextPosition {
TOP
BOTTOM
LEFT
RIGHT
CENTER
}

PromotionOrderBy​

Sorting options for promotion queries.

enum PromotionOrderBy {
CREATED_AT
UPDATED_AT
NAME
START_DATE
END_DATE
}

SortOrder​

Sort direction options.

enum SortOrder {
ASC
DESC
}

Input Types​

PromotionArgs​

Arguments for single promotion queries.

input PromotionArgs {
slug: String!
ip: String
userAgent: String
}

PromotionsArgs​

Arguments for promotion list queries.

input PromotionsArgs {
category: PromotionCategory
type: PromotionType
limit: Int
offset: Int
order: SortOrder
orderBy: PromotionOrderBy
ip: String
userAgent: String
}

PromotionsSlidersArgs​

Arguments for slider content queries.

input PromotionsSlidersArgs {
category: PromotionCategory
sliderCategory: SliderCategory
limit: Int
offset: Int
order: SortOrder
ip: String
userAgent: String
}

PromotionsPopupsArgs​

Arguments for popup content queries.

input PromotionsPopupsArgs {
category: PromotionCategory
popupCategory: PopupCategory
limit: Int
offset: Int
order: SortOrder
ip: String
userAgent: String
}

PromotionsVideoSlidersArgs​

Arguments for video slider content queries.

input PromotionsVideoSlidersArgs {
category: PromotionCategory
videoSliderCategory: VideoSliderCategory
limit: Int
offset: Int
order: SortOrder
ip: String
userAgent: String
}

ClaimBonusArgs​

Arguments for bonus claiming.

input ClaimBonusArgs {
bonusId: String!
}

Field Resolution​

Multilingual Fields​

Fields that support multiple languages are automatically resolved based on the user's language preference:

  • name: Resolved from LanguageKeyVal object
  • description: Resolved from LanguageKeyVal object
  • imageUrl: Resolved from LanguageKeyVal object
  • altText: Resolved from LanguageKeyVal object

User-Specific Fields​

Fields that vary based on user authentication and state:

  • isClaimed: Boolean indicating if the user has claimed the associated bonus
  • isClicked: Boolean indicating if the user has interacted with the promotion
  • primaryButton.text: Dynamic text based on user state (logged in/out, claimed/unclaimed)
  • primaryButton.action: Dynamic action based on user state

Computed Fields​

Fields that are calculated at query time:

  • remainedSecondsToOptIn: Calculated from bonus end date
  • latestStakes: Fetched from recent user activity
  • usersClaimed: Aggregated from user interaction data

Caching Strategy​

Field-Level Caching​

  • Static content (descriptions, images) cached for 1 hour
  • User-specific content (isClaimed, isClicked) not cached
  • Metadata (SEO, badges) cached for 24 hours

Query-Level Caching​

  • Promotion lists cached for 15 minutes
  • Single promotion queries cached for 30 minutes
  • User interaction data refreshed on each request