| All Verbs | /qry/super-win/accumulations |
|---|
"use strict";
/** @typedef {number} */
export var SuperWinPoolState;
(function (SuperWinPoolState) {
SuperWinPoolState[SuperWinPoolState["Idle"] = 0] = "Idle"
SuperWinPoolState[SuperWinPoolState["Accumulating"] = 1] = "Accumulating"
SuperWinPoolState[SuperWinPoolState["Awarding"] = 2] = "Awarding"
})(SuperWinPoolState || (SuperWinPoolState = {}));
export class BettingApp {
/** @param {{name?:string,version?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
name;
/** @type {string} */
version;
}
export class Ref {
/** @param {{id?:string,val?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
id;
/** @type {string} */
val;
}
export class RefEx extends Ref {
/** @param {{data?:RecordDictionary<string, string>,id?:string,val?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {RecordDictionary<string, string>} */
data;
}
export class Origin {
/** @param {{application?:BettingApp,ip?:string,organization?:RefEx,region?:Ref,locationGroup?:Ref,location?:RefEx,device?:RefEx,clerk?:Ref}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {BettingApp} */
application;
/** @type {string} */
ip;
/** @type {RefEx} */
organization;
/** @type {Ref} */
region;
/** @type {Ref} */
locationGroup;
/** @type {RefEx} */
location;
/** @type {RefEx} */
device;
/** @type {Ref} */
clerk;
}
export class SuperWinWinner {
/** @param {{isDrawn?:boolean,drawnAtUtc?:string,roundId?:string,betId?:string,slipId?:string,origin?:Origin,bettor?:Ref,code?:string,amount?:number,locationAddressOrBettorInfo?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {boolean} */
isDrawn;
/** @type {string} */
drawnAtUtc;
/** @type {string} */
roundId;
/** @type {string} */
betId;
/** @type {string} */
slipId;
/** @type {Origin} */
origin;
/** @type {Ref} */
bettor;
/** @type {string} */
code;
/** @type {number} */
amount;
/** @type {string} */
locationAddressOrBettorInfo;
}
export class SuperWinPrize {
/** @param {{id?:number,amount?:number,scheduledAt?:string,winner?:SuperWinWinner}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
/** @type {number} */
amount;
/** @type {string} */
scheduledAt;
/** @type {SuperWinWinner} */
winner;
}
export class SuperWinPool {
/** @param {{id?:number,state?:SuperWinPoolState,amount?:number,schedule?:RecordList<SuperWinPrize>}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
/** @type {SuperWinPoolState} */
state;
/** @type {number} */
amount;
/** @type {RecordList<SuperWinPrize>} */
schedule;
}
export class SuperWinState {
/** @param {{currentDate?:string,availableAmount?:number,pools?:RecordDictionary<number, SuperWinPool>}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
currentDate;
/** @type {number} */
availableAmount;
/** @type {RecordDictionary<number, SuperWinPool>} */
pools;
}
export class SuperWinStateDoc {
/** @param {{id?:string,state?:SuperWinState}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
id;
/** @type {SuperWinState} */
state;
}
export class GetSuperWinAccumulations {
constructor(init) { Object.assign(this, init) }
}
class Dictionary {}
/** @typedef TKey {any} */
/** @typedef TVal {any} */
export class RecordDictionary extends Dictionary {
constructor(init) { super(init); Object.assign(this, init) }
}
/** @typedef T {any} */
export class RecordList extends Array {
constructor(init) { super(init); Object.assign(this, init) }
}
JavaScript GetSuperWinAccumulations DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /qry/super-win/accumulations HTTP/1.1
Host: s4w2.api.bettor.cc
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
id: String,
state:
{
currentDate: String,
availableAmount: 0,
pools:
{
0:
{
id: 0,
state: 0,
amount: 0,
schedule:
[
{
id: 0,
amount: 0,
scheduledAt: 0001-01-01,
winner:
{
isDrawn: False,
drawnAtUtc: 0001-01-01,
roundId: String,
betId: String,
slipId: String,
origin:
{
application:
{
name: String,
version: String
},
ip: String,
organization:
{
data:
{
String: String
},
id: String,
val: String
},
region:
{
id: String,
val: String
},
locationGroup:
{
id: String,
val: String
},
location:
{
data:
{
String: String
},
id: String,
val: String
},
device:
{
data:
{
String: String
},
id: String,
val: String
},
clerk:
{
id: String,
val: String
}
},
bettor:
{
id: String,
val: String
},
code: String,
amount: 0,
locationAddressOrBettorInfo: String
}
}
]
}
}
}
}