@scoreboardmax/api-types 1.0.14 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +26 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.mjs +19 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -7,7 +7,31 @@
|
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.WrestlingStyle = exports.WrestlingPeriod = exports.WrestlingOvertimeType = exports.WrestlingMeetType = exports.WebsocketOperation = exports.WebsocketMessageType = exports.SoccerPeriod = exports.SoccerPenaltyCardType = exports.SoccerGamePeriods = exports.ScoreboardType = exports.ScoreboardCode = exports.PlanId = exports.OAuthProvider = exports.MetaMessageType = exports.MagicLinkType = exports.FootballPeriod = exports.FileType = exports.ExtraTimeLabel = exports.ErrorCode = exports.DownAndDistanceDisplay = exports.ContentType = exports.ClockType = exports.BasketballTimeoutAllocation = exports.BasketballPeriod = exports.BasketballGamePeriods = exports.BaseballInningSegment = exports.AuthType = exports.ApiResource = exports.ApiAction = void 0;
|
|
10
|
+
exports.WrestlingStyle = exports.WrestlingPeriod = exports.WrestlingOvertimeType = exports.WrestlingMeetType = exports.WebsocketOperation = exports.WebsocketMessageType = exports.SoccerPeriod = exports.SoccerPenaltyCardType = exports.SoccerGamePeriods = exports.ScoreboardType = exports.ScoreboardCode = exports.PlanId = exports.OAuthProvider = exports.MetaMessageType = exports.MagicLinkType = exports.FootballPeriod = exports.FileType = exports.ExtraTimeLabel = exports.ErrorCode = exports.DownAndDistanceDisplay = exports.ContentType = exports.ClockType = exports.BasketballTimeoutAllocation = exports.BasketballPeriod = exports.BasketballGamePeriods = exports.BaseballInningSegment = exports.AuthType = exports.ApiResource = exports.ApiAction = exports.isWrestlingData = exports.isVolleyballData = exports.isSoccerData = exports.isFootballData = exports.isBasketballData = exports.isBaseballData = void 0;
|
|
11
|
+
const isBaseballData = (data) => {
|
|
12
|
+
return data.type === ScoreboardType.Baseball;
|
|
13
|
+
};
|
|
14
|
+
exports.isBaseballData = isBaseballData;
|
|
15
|
+
const isBasketballData = (data) => {
|
|
16
|
+
return data.type === ScoreboardType.Basketball;
|
|
17
|
+
};
|
|
18
|
+
exports.isBasketballData = isBasketballData;
|
|
19
|
+
const isFootballData = (data) => {
|
|
20
|
+
return data.type === ScoreboardType.Football;
|
|
21
|
+
};
|
|
22
|
+
exports.isFootballData = isFootballData;
|
|
23
|
+
const isSoccerData = (data) => {
|
|
24
|
+
return data.type === ScoreboardType.Soccer;
|
|
25
|
+
};
|
|
26
|
+
exports.isSoccerData = isSoccerData;
|
|
27
|
+
const isVolleyballData = (data) => {
|
|
28
|
+
return data.type === ScoreboardType.Volleyball;
|
|
29
|
+
};
|
|
30
|
+
exports.isVolleyballData = isVolleyballData;
|
|
31
|
+
const isWrestlingData = (data) => {
|
|
32
|
+
return data.type === ScoreboardType.Wrestling;
|
|
33
|
+
};
|
|
34
|
+
exports.isWrestlingData = isWrestlingData;
|
|
11
35
|
var ApiAction;
|
|
12
36
|
(function (ApiAction) {
|
|
13
37
|
ApiAction["Create"] = "create";
|
|
@@ -134,6 +158,7 @@ var ErrorCode;
|
|
|
134
158
|
ErrorCode["UserCredentialsInUse"] = "UserCredentialsInUse";
|
|
135
159
|
ErrorCode["AccountEmailInUse"] = "AccountEmailInUse";
|
|
136
160
|
ErrorCode["IncompatibleState"] = "IncompatibleState";
|
|
161
|
+
ErrorCode["VersionConflict"] = "VersionConflict";
|
|
137
162
|
ErrorCode["UnspecifiedError"] = "UnspecifiedError";
|
|
138
163
|
})(ErrorCode || (exports.ErrorCode = ErrorCode = {}));
|
|
139
164
|
var ExtraTimeLabel;
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,12 @@
|
|
|
5
5
|
* These types are automatically generated from the ScoreboardMax API source code.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
+
export declare const isBaseballData: (data: any) => data is BaseballDataResponse;
|
|
9
|
+
export declare const isBasketballData: (data: any) => data is BasketballDataResponse;
|
|
10
|
+
export declare const isFootballData: (data: any) => data is FootballDataResponse;
|
|
11
|
+
export declare const isSoccerData: (data: any) => data is SoccerDataResponse;
|
|
12
|
+
export declare const isVolleyballData: (data: any) => data is VolleyballDataResponse;
|
|
13
|
+
export declare const isWrestlingData: (data: any) => data is WrestlingDataResponse;
|
|
8
14
|
export declare enum ApiAction {
|
|
9
15
|
Create = "create",
|
|
10
16
|
Read = "read",
|
|
@@ -120,6 +126,7 @@ export declare enum ErrorCode {
|
|
|
120
126
|
UserCredentialsInUse = "UserCredentialsInUse",
|
|
121
127
|
AccountEmailInUse = "AccountEmailInUse",
|
|
122
128
|
IncompatibleState = "IncompatibleState",
|
|
129
|
+
VersionConflict = "VersionConflict",
|
|
123
130
|
UnspecifiedError = "UnspecifiedError"
|
|
124
131
|
}
|
|
125
132
|
export declare enum ExtraTimeLabel {
|
|
@@ -765,6 +772,7 @@ export interface ScoreboardListResponse {
|
|
|
765
772
|
export interface ScoreboardRequest {
|
|
766
773
|
name: string | null;
|
|
767
774
|
type: ScoreboardType;
|
|
775
|
+
version: number;
|
|
768
776
|
data: BasketballDataRequest | FootballDataRequest | VolleyballDataRequest | SoccerDataRequest | BaseballDataRequest | WrestlingDataRequest;
|
|
769
777
|
}
|
|
770
778
|
export interface ScoreboardResponse {
|
|
@@ -786,6 +794,7 @@ export interface ScoreboardResponse {
|
|
|
786
794
|
currentServerTimestamp: number;
|
|
787
795
|
clocks: ClockListResponse | string;
|
|
788
796
|
overlay: OverlayResponse | string;
|
|
797
|
+
version: number;
|
|
789
798
|
}
|
|
790
799
|
export interface ScoreboardSettingsBase {
|
|
791
800
|
clockAscending: boolean;
|
package/dist/index.mjs
CHANGED
|
@@ -5,6 +5,24 @@
|
|
|
5
5
|
* These types are automatically generated from the ScoreboardMax API source code.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
+
export const isBaseballData = (data) => {
|
|
9
|
+
return data.type === ScoreboardType.Baseball;
|
|
10
|
+
};
|
|
11
|
+
export const isBasketballData = (data) => {
|
|
12
|
+
return data.type === ScoreboardType.Basketball;
|
|
13
|
+
};
|
|
14
|
+
export const isFootballData = (data) => {
|
|
15
|
+
return data.type === ScoreboardType.Football;
|
|
16
|
+
};
|
|
17
|
+
export const isSoccerData = (data) => {
|
|
18
|
+
return data.type === ScoreboardType.Soccer;
|
|
19
|
+
};
|
|
20
|
+
export const isVolleyballData = (data) => {
|
|
21
|
+
return data.type === ScoreboardType.Volleyball;
|
|
22
|
+
};
|
|
23
|
+
export const isWrestlingData = (data) => {
|
|
24
|
+
return data.type === ScoreboardType.Wrestling;
|
|
25
|
+
};
|
|
8
26
|
export var ApiAction;
|
|
9
27
|
(function (ApiAction) {
|
|
10
28
|
ApiAction["Create"] = "create";
|
|
@@ -131,6 +149,7 @@ export var ErrorCode;
|
|
|
131
149
|
ErrorCode["UserCredentialsInUse"] = "UserCredentialsInUse";
|
|
132
150
|
ErrorCode["AccountEmailInUse"] = "AccountEmailInUse";
|
|
133
151
|
ErrorCode["IncompatibleState"] = "IncompatibleState";
|
|
152
|
+
ErrorCode["VersionConflict"] = "VersionConflict";
|
|
134
153
|
ErrorCode["UnspecifiedError"] = "UnspecifiedError";
|
|
135
154
|
})(ErrorCode || (ErrorCode = {}));
|
|
136
155
|
export var ExtraTimeLabel;
|