@scoreboardmax/api-types
Version:
TypeScript definitions for ScoreboardMax API
301 lines (300 loc) • 12.4 kB
JavaScript
/**
* ScoreboardMax API Types
*
* This file contains type definitions for API consumers.
* These types are automatically generated from the ScoreboardMax API source code.
*
*/
export const isBaseballData = (data) => {
return data.type === ScoreboardType.Baseball;
};
export const isBasketballData = (data) => {
return data.type === ScoreboardType.Basketball;
};
export const isFootballData = (data) => {
return data.type === ScoreboardType.Football;
};
export const isSoccerData = (data) => {
return data.type === ScoreboardType.Soccer;
};
export const isVolleyballData = (data) => {
return data.type === ScoreboardType.Volleyball;
};
export const isWrestlingData = (data) => {
return data.type === ScoreboardType.Wrestling;
};
export var ApiAction;
(function (ApiAction) {
ApiAction["Create"] = "create";
ApiAction["Read"] = "read";
ApiAction["Update"] = "update";
ApiAction["Delete"] = "delete";
ApiAction["All"] = "*";
})(ApiAction || (ApiAction = {}));
export var ApiResource;
(function (ApiResource) {
ApiResource["All"] = "*";
ApiResource["Account"] = "account";
ApiResource["AccountList"] = "accountList";
ApiResource["App"] = "app";
ApiResource["AppList"] = "appList";
ApiResource["File"] = "file";
ApiResource["FileList"] = "fileList";
ApiResource["Auth"] = "auth";
ApiResource["AuthList"] = "authList";
ApiResource["Clock"] = "clock";
ApiResource["ClockList"] = "clockList";
ApiResource["Player"] = "player";
ApiResource["PlayerList"] = "playerList";
ApiResource["Roster"] = "roster";
ApiResource["RosterList"] = "rosterList";
ApiResource["Scoreboard"] = "scoreboard";
ApiResource["ScoreboardList"] = "scoreboardList";
ApiResource["Sponsor"] = "sponsor";
ApiResource["SponsorList"] = "sponsorList";
ApiResource["Team"] = "team";
ApiResource["TeamList"] = "teamList";
ApiResource["Upload"] = "upload";
ApiResource["UploadList"] = "uploadList";
ApiResource["User"] = "user";
ApiResource["UserList"] = "userList";
ApiResource["UserCredentials"] = "userCredentials";
ApiResource["UserCredentialsList"] = "userCredentialsList";
ApiResource["Overlay"] = "overlay";
ApiResource["OverlayList"] = "overlayList";
ApiResource["Preset"] = "preset";
ApiResource["PresetList"] = "presetList";
})(ApiResource || (ApiResource = {}));
export var AppType;
(function (AppType) {
AppType["Template"] = "template";
})(AppType || (AppType = {}));
export var AuthType;
(function (AuthType) {
AuthType["Session"] = "session";
AuthType["Api"] = "api";
AuthType["Guest"] = "guest";
AuthType["ScoreboardView"] = "scoreboardView";
})(AuthType || (AuthType = {}));
export var BaseballInningSegment;
(function (BaseballInningSegment) {
BaseballInningSegment["Top"] = "top";
BaseballInningSegment["Middle"] = "middle";
BaseballInningSegment["Bottom"] = "bottom";
BaseballInningSegment["End"] = "end";
})(BaseballInningSegment || (BaseballInningSegment = {}));
export var BasketballGamePeriods;
(function (BasketballGamePeriods) {
BasketballGamePeriods["Quarters"] = "quarters";
BasketballGamePeriods["Halves"] = "halves";
})(BasketballGamePeriods || (BasketballGamePeriods = {}));
export var BasketballPeriod;
(function (BasketballPeriod) {
BasketballPeriod["Pre"] = "pregame";
BasketballPeriod["First"] = "1";
BasketballPeriod["Second"] = "2";
BasketballPeriod["Half"] = "half";
BasketballPeriod["Third"] = "3";
BasketballPeriod["Fourth"] = "4";
BasketballPeriod["Overtime"] = "overtime";
})(BasketballPeriod || (BasketballPeriod = {}));
export var BasketballTimeoutAllocation;
(function (BasketballTimeoutAllocation) {
BasketballTimeoutAllocation["PerGame"] = "perGame";
BasketballTimeoutAllocation["PerHalf"] = "perHalf";
})(BasketballTimeoutAllocation || (BasketballTimeoutAllocation = {}));
export var ClockType;
(function (ClockType) {
ClockType["Game"] = "game";
ClockType["Play"] = "play";
ClockType["Shot"] = "shot";
ClockType["Pitch"] = "pitch";
ClockType["Period"] = "period";
})(ClockType || (ClockType = {}));
export var ContentType;
(function (ContentType) {
ContentType["Png"] = "image/png";
ContentType["Jpg"] = "image/jpeg";
ContentType["Gif"] = "image/gif";
ContentType["Webp"] = "image/webp";
ContentType["Avif"] = "image/avif";
ContentType["Csv"] = "text/csv";
ContentType["Xlsx"] = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
ContentType["Zip"] = "application/zip";
})(ContentType || (ContentType = {}));
export var DownAndDistanceDisplay;
(function (DownAndDistanceDisplay) {
DownAndDistanceDisplay["Both"] = "both";
DownAndDistanceDisplay["DownOnly"] = "downOnly";
DownAndDistanceDisplay["None"] = "none";
})(DownAndDistanceDisplay || (DownAndDistanceDisplay = {}));
export var ErrorCode;
(function (ErrorCode) {
ErrorCode["ForbiddenSelfPermissionsChange"] = "ForbiddenSelfPermissionsChange";
ErrorCode["InsufficientAdminPermissions"] = "InsufficientAdminPermissions";
ErrorCode["InsufficientItemPermissions"] = "InsufficientItemPermissions";
ErrorCode["InsufficientResourcePermissions"] = "InsufficientResourcePermissions";
ErrorCode["InsufficientResourceItemPermissions"] = "InsufficientResourceItemPermissions";
ErrorCode["InvalidAuthType"] = "InvalidAuthType";
ErrorCode["InvalidColorFormat"] = "InvalidColorFormat";
ErrorCode["InvalidDate"] = "InvalidDate";
ErrorCode["InvalidInput"] = "InvalidInput";
ErrorCode["InvalidRequest"] = "InvalidRequest";
ErrorCode["InvalidPermissionGrant"] = "InvalidPermissionGrant";
ErrorCode["InvalidSignIn"] = "InvalidSignIn";
ErrorCode["InvalidAccountSignIn"] = "InvalidAccountSignIn";
ErrorCode["InvalidToken"] = "InvalidToken";
ErrorCode["AccountLimitExceeded"] = "AccountLimitExceeded";
ErrorCode["AccountStorageExceeded"] = "AccountStorageExceeded";
ErrorCode["ActiveScoreboardsExceeded"] = "ActiveScoreboardsExceeded";
ErrorCode["AccountFeatureNotEnabled"] = "AccountFeatureNotEnabled";
ErrorCode["AppNotEnabled"] = "AppNotEnabled";
ErrorCode["ImageProcessingError"] = "ImageProcessingError";
ErrorCode["RemoteServerError"] = "RemoteServerError";
ErrorCode["RemoteServerTimeout"] = "RemoteServerTimeout";
ErrorCode["RequestLimitExceeded"] = "RequestLimitExceeded";
ErrorCode["ResourceNotFound"] = "ResourceNotFound";
ErrorCode["UserCredentialsInUse"] = "UserCredentialsInUse";
ErrorCode["AccountEmailInUse"] = "AccountEmailInUse";
ErrorCode["IncompatibleState"] = "IncompatibleState";
ErrorCode["VersionConflict"] = "VersionConflict";
ErrorCode["UnspecifiedError"] = "UnspecifiedError";
})(ErrorCode || (ErrorCode = {}));
export var EventAction;
(function (EventAction) {
EventAction["Created"] = "created";
EventAction["Updated"] = "updated";
EventAction["Deleted"] = "deleted";
EventAction["Read"] = "read";
})(EventAction || (EventAction = {}));
export var ExtraTimeLabel;
(function (ExtraTimeLabel) {
ExtraTimeLabel["ExtraTime"] = "ET";
ExtraTimeLabel["Overtime"] = "OT";
})(ExtraTimeLabel || (ExtraTimeLabel = {}));
export var FileType;
(function (FileType) {
FileType["TeamLogo"] = "teamLogo";
FileType["AccountLogo"] = "accountLogo";
FileType["PlayerPhoto"] = "playerPhoto";
FileType["SponsorLogo"] = "sponsorLogo";
FileType["Temporary"] = "temporary";
})(FileType || (FileType = {}));
export var FootballPeriod;
(function (FootballPeriod) {
FootballPeriod["Pre"] = "pregame";
FootballPeriod["First"] = "1";
FootballPeriod["Second"] = "2";
FootballPeriod["Half"] = "half";
FootballPeriod["Third"] = "3";
FootballPeriod["Fourth"] = "4";
FootballPeriod["Overtime"] = "overtime";
})(FootballPeriod || (FootballPeriod = {}));
export var MagicLinkType;
(function (MagicLinkType) {
MagicLinkType["SignIn"] = "signIn";
MagicLinkType["ScoreboardGuest"] = "scoreboardGuest";
MagicLinkType["UserInvite"] = "userInvite";
MagicLinkType["ScoreboardView"] = "scoreboardView";
})(MagicLinkType || (MagicLinkType = {}));
export var MetaMessageType;
(function (MetaMessageType) {
MetaMessageType["ScoreboardReset"] = "scoreboardReset";
MetaMessageType["ScoreboardRefresh"] = "scoreboardRefresh";
})(MetaMessageType || (MetaMessageType = {}));
export var OAuthProvider;
(function (OAuthProvider) {
OAuthProvider["Google"] = "google";
})(OAuthProvider || (OAuthProvider = {}));
export var PlanId;
(function (PlanId) {
PlanId["Basic"] = "basic";
PlanId["Plus"] = "plus";
PlanId["Pro"] = "pro";
})(PlanId || (PlanId = {}));
export var ScoreboardCode;
(function (ScoreboardCode) {
ScoreboardCode["Football"] = "fb";
ScoreboardCode["Basketball"] = "bb";
ScoreboardCode["Volleyball"] = "vb";
ScoreboardCode["Soccer"] = "sc";
ScoreboardCode["Baseball"] = "ba";
ScoreboardCode["Wrestling"] = "wr";
})(ScoreboardCode || (ScoreboardCode = {}));
export var ScoreboardType;
(function (ScoreboardType) {
ScoreboardType["Baseball"] = "baseball";
ScoreboardType["Basketball"] = "basketball";
ScoreboardType["Football"] = "football";
ScoreboardType["Soccer"] = "soccer";
ScoreboardType["Volleyball"] = "volleyball";
ScoreboardType["Wrestling"] = "wrestling";
})(ScoreboardType || (ScoreboardType = {}));
export var SoccerGamePeriods;
(function (SoccerGamePeriods) {
SoccerGamePeriods["Quarters"] = "quarters";
SoccerGamePeriods["Halves"] = "halves";
})(SoccerGamePeriods || (SoccerGamePeriods = {}));
export var SoccerPenaltyCardType;
(function (SoccerPenaltyCardType) {
SoccerPenaltyCardType["Yellow"] = "yellow";
SoccerPenaltyCardType["Red"] = "red";
})(SoccerPenaltyCardType || (SoccerPenaltyCardType = {}));
export var SoccerPeriod;
(function (SoccerPeriod) {
SoccerPeriod["Pre"] = "pregame";
SoccerPeriod["First"] = "1";
SoccerPeriod["Second"] = "2";
SoccerPeriod["Half"] = "half";
SoccerPeriod["Third"] = "3";
SoccerPeriod["Fourth"] = "4";
SoccerPeriod["ExtraTime1"] = "ET 1";
SoccerPeriod["ExtraTime2"] = "ET 2";
SoccerPeriod["Shootout"] = "shootout";
})(SoccerPeriod || (SoccerPeriod = {}));
export var TemplateUseCase;
(function (TemplateUseCase) {
TemplateUseCase["Embed"] = "embed";
TemplateUseCase["Display"] = "display";
TemplateUseCase["Direct"] = "direct";
})(TemplateUseCase || (TemplateUseCase = {}));
export var WebsocketMessageType;
(function (WebsocketMessageType) {
WebsocketMessageType["Event"] = "event";
WebsocketMessageType["Heartbeat"] = "heartbeat";
WebsocketMessageType["ConnectionConfirmation"] = "connectionConfirmation";
WebsocketMessageType["SubscriptionConfirmation"] = "subscriptionConfirmation";
WebsocketMessageType["Info"] = "info";
WebsocketMessageType["Meta"] = "meta";
})(WebsocketMessageType || (WebsocketMessageType = {}));
export var WebsocketOperation;
(function (WebsocketOperation) {
WebsocketOperation["SendHeartbeat"] = "sendHeartbeat";
WebsocketOperation["GetConnectionId"] = "getConnectionId";
WebsocketOperation["SubscribeScoreboard"] = "subscribeScoreboard";
WebsocketOperation["UnsubscribeScoreboard"] = "unsubscribeScoreboard";
})(WebsocketOperation || (WebsocketOperation = {}));
export var WrestlingMeetType;
(function (WrestlingMeetType) {
WrestlingMeetType["Dual"] = "dual";
WrestlingMeetType["Tournament"] = "tournament";
})(WrestlingMeetType || (WrestlingMeetType = {}));
export var WrestlingOvertimeType;
(function (WrestlingOvertimeType) {
WrestlingOvertimeType["SuddenVictory"] = "sv";
WrestlingOvertimeType["TieBreaker"] = "tb";
WrestlingOvertimeType["UltimateTieBreaker"] = "utb";
})(WrestlingOvertimeType || (WrestlingOvertimeType = {}));
export var WrestlingPeriod;
(function (WrestlingPeriod) {
WrestlingPeriod["First"] = "1";
WrestlingPeriod["Second"] = "2";
WrestlingPeriod["Third"] = "3";
WrestlingPeriod["Overtime"] = "overtime";
})(WrestlingPeriod || (WrestlingPeriod = {}));
export var WrestlingStyle;
(function (WrestlingStyle) {
WrestlingStyle["Freestyle"] = "freestyle";
WrestlingStyle["Greco"] = "greco";
WrestlingStyle["Folkstyle"] = "folkstyle";
})(WrestlingStyle || (WrestlingStyle = {}));