Session
v1.0.0

Event represents when player have been successfully authenticated

Details

This event is triggered when a player have been successfully authenticated by an Operator integration

Consumer / Producer Diagram

Session Schema (json)
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the message",
      "const": "session"
    },
    "actionId": {
      "type": "string",
      "description": "The ID of the specific action"
    },
    "environment": {
      "type": "string",
      "description": "The environment used",
      "enum": ["development", "staging", "production"]
    },
    "operatorId": {
      "type": "string",
      "description": "The ID of the Operator",
      "format": "uuid"
    },
    "gameMode": {
      "type": "string",
      "description": "The game mode being played",
      "enum": ["money", "coins"]
    },
    "gameId": {
      "type": "string",
      "description": "The ID of the game",
      "format": "uuid"
    },
    "currency": {
      "type": "string",
      "description": "The ISO currency code"
    },
    "replayId": {
      "type": "string",
      "description": "The replayId used for history/replay feature"
    },
    "connectionId": {
      "type": "string",
      "description": "The websocket connectionId of the player"
    },
    "operatorPlayerSession": {
      "type": "string",
      "description": "The ID of the Operator session"
    },
    "operatorPlayerId": {
      "type": "string",
      "description": "The ID of the Operator player"
    },
    "balance": {
      "type": "number",
      "description": "The balance of the player"
    },
    "playerId": {
      "type": "string",
      "description": "The ID of the player",
      "format": "uuid"
    },
    "extra": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "A map/dictionary of string pairs containing custom information between launch, integrations etc"
    },
    "freeBetCampaigns": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The ID of the freebet campaign",
            "format": "uuid"
          },
          "numberOfBets": {
            "type": "integer",
            "description": "The number of bets remaining"
          },
          "betAmount": {
            "type": "number",
            "description": "The bet amount in cents"
          },
          "settings": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "A map/dictionary of string pairs containing the custom settings for the campaign"
          }
        }
      },
      "description": "The details of free bet campaigns if any"
    }
  },
  "required": ["name", "actionId", "environment", "operatorId", "gameMode", "gameId", "currency", "connectionId", "playerId", "operatorPlayerSession", "operatorPlayerId", "balance"]
}

Model

1public class Session
2{
3    public string Name { get; set; } = "session";
4    public Dictionary<string, string> Extra { get; set; }
5    public string GameMode { get; set; }
6    public string Environment { get; set; }
7    public Guid OperatorId { get; set; }
8    public string ActionId { get; set; }
9    public Guid GameId { get; set; }
10    public string Currency { get; set; }
11    public string? ReplayId { get; set; }
12    public string OperatorPlayerSession { get; set; }
13    public string OperatorPlayerId { get; set; }
14    public long Balance { get; set; }
15    public string ConnectionId { get; set; }
16    public Guid PlayerId { get; set; }
17    public List<FreeBetCampaign>? FreeBetCampaigns { get; set; }
18}
19
20public class FreeBetCampaign
21{
22    public Guid Id { get; set; }
23    public int NumberOfBets { get; set; }
24    public long BetAmount { get; set; }
25    public Dictionary<string, string>? Settings { get; set; }
26}
Last updated on 2023/11/14