Betting.WebApi

<back to all web services

NotifyFrontend

The following routes are available for this service:
All Verbs/cmd/notify/frontend/
"use strict";
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;
}
/** @typedef {number} */
export var SlipSubmissionStatus;
(function (SlipSubmissionStatus) {
    SlipSubmissionStatus[SlipSubmissionStatus["Pending"] = 0] = "Pending"
    SlipSubmissionStatus[SlipSubmissionStatus["Accepted"] = 2] = "Accepted"
    SlipSubmissionStatus[SlipSubmissionStatus["Rejected"] = 3] = "Rejected"
    SlipSubmissionStatus[SlipSubmissionStatus["Failed"] = 4] = "Failed"
})(SlipSubmissionStatus || (SlipSubmissionStatus = {}));
export class AcceptedSlipInfo {
    /** @param {{id?:string,origin?:Origin,bettor?:Ref,slipSubmissionStatus?:SlipSubmissionStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    id;
    /** @type {Origin} */
    origin;
    /** @type {Ref} */
    bettor;
    /** @type {SlipSubmissionStatus} */
    slipSubmissionStatus;
}
export class ErrorInfo {
    /** @param {{origin?:Origin,errorCode?:string,errorDescription?:string,payload?:{ [index:string]: string; }}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {Origin} */
    origin;
    /** @type {string} */
    errorCode;
    /** @type {string} */
    errorDescription;
    /** @type {{ [index:string]: string; }} */
    payload;
}
export class ConfirmationInfo {
    /** @param {{bettor?:Ref,origin?:Origin,confirmationCode?:string,confirmationDescription?:string,payload?:{ [index:string]: string; }}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {Ref} */
    bettor;
    /** @type {Origin} */
    origin;
    /** @type {string} */
    confirmationCode;
    /** @type {string} */
    confirmationDescription;
    /** @type {{ [index:string]: string; }} */
    payload;
}
export class WalletTransactionInfo {
    /** @param {{reason?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    reason;
}
export class WalletUpdateInfo {
    /** @param {{bettor?:Ref,origin?:Origin,transactionInfo?:WalletTransactionInfo}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {Ref} */
    bettor;
    /** @type {Origin} */
    origin;
    /** @type {WalletTransactionInfo} */
    transactionInfo;
}
export class UserNotificationsUpdatedInfo {
    /** @param {{id?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    id;
}
export class ApplicationEventsUpdated {
    constructor(init) { Object.assign(this, init) }
}
export class SlipDeliveryIssueRefundRequestUpdated {
    constructor(init) { Object.assign(this, init) }
}
export class NotifyFrontend {
    /** @param {{acceptedSlipInfo?:AcceptedSlipInfo,errorInfo?:ErrorInfo,confirmationInfo?:ConfirmationInfo,slipCancellationId?:string,walletUpdatedInfo?:WalletUpdateInfo,userNotificationsUpdated?:UserNotificationsUpdatedInfo,applicationEventsUpdated?:ApplicationEventsUpdated,slipDeliveryIssueRefundRequestUpdated?:SlipDeliveryIssueRefundRequestUpdated}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {AcceptedSlipInfo} */
    acceptedSlipInfo;
    /** @type {ErrorInfo} */
    errorInfo;
    /** @type {ConfirmationInfo} */
    confirmationInfo;
    /** @type {string} */
    slipCancellationId;
    /** @type {WalletUpdateInfo} */
    walletUpdatedInfo;
    /** @type {UserNotificationsUpdatedInfo} */
    userNotificationsUpdated;
    /** @type {ApplicationEventsUpdated} */
    applicationEventsUpdated;
    /** @type {SlipDeliveryIssueRefundRequestUpdated} */
    slipDeliveryIssueRefundRequestUpdated;
}
class Dictionary {}
/** @typedef TKey {any} */
/** @typedef  TVal {any} */
export class RecordDictionary extends Dictionary {
    constructor(init) { super(init); Object.assign(this, init) }
}

JavaScript NotifyFrontend DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /cmd/notify/frontend/ HTTP/1.1 
Host: api.sbbet.ath.cx 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	acceptedSlipInfo: 
	{
		id: 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
		},
		slipSubmissionStatus: 0
	},
	errorInfo: 
	{
		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
			}
		},
		errorCode: String,
		errorDescription: String,
		payload: 
		{
			String: String
		}
	},
	confirmationInfo: 
	{
		bettor: 
		{
			id: String,
			val: 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
			}
		},
		confirmationCode: String,
		confirmationDescription: String,
		payload: 
		{
			String: String
		}
	},
	slipCancellationId: String,
	walletUpdatedInfo: 
	{
		bettor: 
		{
			id: String,
			val: 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
			}
		},
		transactionInfo: 
		{
			reason: String
		}
	},
	userNotificationsUpdated: 
	{
		id: String
	},
	applicationEventsUpdated: {},
	slipDeliveryIssueRefundRequestUpdated: {}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	errorCode: String,
	message: String,
	stackTrace: String,
	errors: 
	[
		{
			errorCode: String,
			fieldName: String,
			message: String,
			meta: 
			{
				String: String
			}
		}
	],
	meta: 
	{
		String: String
	}
}