xpt-shared-types 1.7.0 → 1.8.0
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/generated/inputs.d.ts +4 -0
- package/dist/generated/models.d.ts +4 -0
- package/dist/manual/index.d.ts +1 -0
- package/dist/manual/index.js +1 -0
- package/dist/manual/lobby.d.ts +39 -0
- package/dist/manual/lobby.js +11 -0
- package/package.json +1 -1
- package/src/generated/inputs.ts +4 -0
- package/src/generated/models.ts +4 -0
- package/src/manual/index.ts +1 -0
- package/src/manual/lobby.ts +52 -0
|
@@ -23,12 +23,14 @@ export interface FaqInput {
|
|
|
23
23
|
export interface FeaturedGameInput {
|
|
24
24
|
featuredHeading?: string;
|
|
25
25
|
featuredSubheading?: string;
|
|
26
|
+
isActive?: boolean;
|
|
26
27
|
game?: RelationInput;
|
|
27
28
|
}
|
|
28
29
|
/** Write payload for `featured-tournament`. */
|
|
29
30
|
export interface FeaturedTournamentInput {
|
|
30
31
|
featuredHeading?: string;
|
|
31
32
|
featuredSubheading?: string;
|
|
33
|
+
isActive?: boolean;
|
|
32
34
|
tournament?: RelationInput;
|
|
33
35
|
}
|
|
34
36
|
/** Write payload for `friendship`. */
|
|
@@ -136,6 +138,8 @@ export interface MatchInput {
|
|
|
136
138
|
endedAt?: string;
|
|
137
139
|
resultType?: MatchResultType;
|
|
138
140
|
resultNote?: string;
|
|
141
|
+
homeReportedAt?: string;
|
|
142
|
+
awayReportedAt?: string;
|
|
139
143
|
disputeReason?: MatchDisputeReason;
|
|
140
144
|
disputeNote?: string;
|
|
141
145
|
disputedBy?: RelationInput;
|
|
@@ -23,12 +23,14 @@ export interface Faq extends StrapiDocument {
|
|
|
23
23
|
export interface FeaturedGame extends StrapiDocument {
|
|
24
24
|
featuredHeading?: string | null;
|
|
25
25
|
featuredSubheading?: string | null;
|
|
26
|
+
isActive?: boolean | null;
|
|
26
27
|
game?: Game | null;
|
|
27
28
|
}
|
|
28
29
|
/** `featured-tournament` */
|
|
29
30
|
export interface FeaturedTournament extends StrapiDocument {
|
|
30
31
|
featuredHeading?: string | null;
|
|
31
32
|
featuredSubheading?: string | null;
|
|
33
|
+
isActive?: boolean | null;
|
|
32
34
|
tournament?: Tournament | null;
|
|
33
35
|
}
|
|
34
36
|
/** `friendship` */
|
|
@@ -136,6 +138,8 @@ export interface Match extends StrapiDocument {
|
|
|
136
138
|
endedAt?: string | null;
|
|
137
139
|
resultType?: MatchResultType | null;
|
|
138
140
|
resultNote?: string | null;
|
|
141
|
+
homeReportedAt?: string | null;
|
|
142
|
+
awayReportedAt?: string | null;
|
|
139
143
|
disputeReason?: MatchDisputeReason | null;
|
|
140
144
|
disputeNote?: string | null;
|
|
141
145
|
disputedBy?: User | null;
|
package/dist/manual/index.d.ts
CHANGED
package/dist/manual/index.js
CHANGED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The match lobby as the client renders it.
|
|
3
|
+
*
|
|
4
|
+
* None of these are Strapi content types. The lobby is a view over a match
|
|
5
|
+
* row plus what `GET /matches/:id/lobby` derives for the viewer, and these
|
|
6
|
+
* name the parts of that view both apps have to agree on.
|
|
7
|
+
*/
|
|
8
|
+
import type { MatchDisputeReason, MatchRound } from '../generated/enums';
|
|
9
|
+
/**
|
|
10
|
+
* Where a lobby is in its life, from the viewer's side. Derived on the client
|
|
11
|
+
* from `lobbyStatus`, `startedAt`/`endedAt` and whether the viewer's own side
|
|
12
|
+
* has reported; `disputed` and `completed` come straight from `lobbyStatus`.
|
|
13
|
+
*/
|
|
14
|
+
export type LobbyPhase = 'waiting' | 'live' | 'reported' | 'disputed' | 'completed';
|
|
15
|
+
/**
|
|
16
|
+
* What the viewer may do in the lobby. A captain (or a solo player) acts for
|
|
17
|
+
* a side; a roster member only talks; the host and staff watch and rule from
|
|
18
|
+
* the manage page.
|
|
19
|
+
*/
|
|
20
|
+
export type LobbyViewerRole = 'captain' | 'teamMember' | 'hostOrSpectator';
|
|
21
|
+
/** The match the winner goes on to — enough to say "Round 2 — Match #2". */
|
|
22
|
+
export interface LobbyNextMatch {
|
|
23
|
+
documentId: string;
|
|
24
|
+
round: MatchRound | null;
|
|
25
|
+
matchNumber: number | null;
|
|
26
|
+
}
|
|
27
|
+
/** The reasons a player may send; a score mismatch is found by the server. */
|
|
28
|
+
export type PlayerDisputeReason = Exclude<MatchDisputeReason, 'scoreMismatch'>;
|
|
29
|
+
/** Body of `POST /matches/:id/dispute`, inside `data`. */
|
|
30
|
+
export interface MatchDisputeInput {
|
|
31
|
+
reason: PlayerDisputeReason;
|
|
32
|
+
/** Optional, trimmed, at most `DISPUTE_NOTE_MAX_LENGTH` characters. */
|
|
33
|
+
note?: string;
|
|
34
|
+
}
|
|
35
|
+
export declare const DISPUTE_NOTE_MAX_LENGTH = 500;
|
|
36
|
+
/** Body of `POST /matches/:id/ready`, inside `data`. Omitted means ready. */
|
|
37
|
+
export interface MatchReadyInput {
|
|
38
|
+
ready?: boolean;
|
|
39
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* The match lobby as the client renders it.
|
|
4
|
+
*
|
|
5
|
+
* None of these are Strapi content types. The lobby is a view over a match
|
|
6
|
+
* row plus what `GET /matches/:id/lobby` derives for the viewer, and these
|
|
7
|
+
* name the parts of that view both apps have to agree on.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.DISPUTE_NOTE_MAX_LENGTH = void 0;
|
|
11
|
+
exports.DISPUTE_NOTE_MAX_LENGTH = 500;
|
package/package.json
CHANGED
package/src/generated/inputs.ts
CHANGED
|
@@ -62,6 +62,7 @@ export interface FaqInput {
|
|
|
62
62
|
export interface FeaturedGameInput {
|
|
63
63
|
featuredHeading?: string;
|
|
64
64
|
featuredSubheading?: string;
|
|
65
|
+
isActive?: boolean;
|
|
65
66
|
game?: RelationInput;
|
|
66
67
|
}
|
|
67
68
|
|
|
@@ -69,6 +70,7 @@ export interface FeaturedGameInput {
|
|
|
69
70
|
export interface FeaturedTournamentInput {
|
|
70
71
|
featuredHeading?: string;
|
|
71
72
|
featuredSubheading?: string;
|
|
73
|
+
isActive?: boolean;
|
|
72
74
|
tournament?: RelationInput;
|
|
73
75
|
}
|
|
74
76
|
|
|
@@ -184,6 +186,8 @@ export interface MatchInput {
|
|
|
184
186
|
endedAt?: string;
|
|
185
187
|
resultType?: MatchResultType;
|
|
186
188
|
resultNote?: string;
|
|
189
|
+
homeReportedAt?: string;
|
|
190
|
+
awayReportedAt?: string;
|
|
187
191
|
disputeReason?: MatchDisputeReason;
|
|
188
192
|
disputeNote?: string;
|
|
189
193
|
disputedBy?: RelationInput;
|
package/src/generated/models.ts
CHANGED
|
@@ -63,6 +63,7 @@ export interface Faq extends StrapiDocument {
|
|
|
63
63
|
export interface FeaturedGame extends StrapiDocument {
|
|
64
64
|
featuredHeading?: string | null;
|
|
65
65
|
featuredSubheading?: string | null;
|
|
66
|
+
isActive?: boolean | null;
|
|
66
67
|
game?: Game | null;
|
|
67
68
|
}
|
|
68
69
|
|
|
@@ -70,6 +71,7 @@ export interface FeaturedGame extends StrapiDocument {
|
|
|
70
71
|
export interface FeaturedTournament extends StrapiDocument {
|
|
71
72
|
featuredHeading?: string | null;
|
|
72
73
|
featuredSubheading?: string | null;
|
|
74
|
+
isActive?: boolean | null;
|
|
73
75
|
tournament?: Tournament | null;
|
|
74
76
|
}
|
|
75
77
|
|
|
@@ -185,6 +187,8 @@ export interface Match extends StrapiDocument {
|
|
|
185
187
|
endedAt?: string | null;
|
|
186
188
|
resultType?: MatchResultType | null;
|
|
187
189
|
resultNote?: string | null;
|
|
190
|
+
homeReportedAt?: string | null;
|
|
191
|
+
awayReportedAt?: string | null;
|
|
188
192
|
disputeReason?: MatchDisputeReason | null;
|
|
189
193
|
disputeNote?: string | null;
|
|
190
194
|
disputedBy?: User | null;
|
package/src/manual/index.ts
CHANGED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The match lobby as the client renders it.
|
|
3
|
+
*
|
|
4
|
+
* None of these are Strapi content types. The lobby is a view over a match
|
|
5
|
+
* row plus what `GET /matches/:id/lobby` derives for the viewer, and these
|
|
6
|
+
* name the parts of that view both apps have to agree on.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import type { MatchDisputeReason, MatchRound } from '../generated/enums';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Where a lobby is in its life, from the viewer's side. Derived on the client
|
|
13
|
+
* from `lobbyStatus`, `startedAt`/`endedAt` and whether the viewer's own side
|
|
14
|
+
* has reported; `disputed` and `completed` come straight from `lobbyStatus`.
|
|
15
|
+
*/
|
|
16
|
+
export type LobbyPhase =
|
|
17
|
+
| 'waiting'
|
|
18
|
+
| 'live'
|
|
19
|
+
| 'reported'
|
|
20
|
+
| 'disputed'
|
|
21
|
+
| 'completed';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* What the viewer may do in the lobby. A captain (or a solo player) acts for
|
|
25
|
+
* a side; a roster member only talks; the host and staff watch and rule from
|
|
26
|
+
* the manage page.
|
|
27
|
+
*/
|
|
28
|
+
export type LobbyViewerRole = 'captain' | 'teamMember' | 'hostOrSpectator';
|
|
29
|
+
|
|
30
|
+
/** The match the winner goes on to — enough to say "Round 2 — Match #2". */
|
|
31
|
+
export interface LobbyNextMatch {
|
|
32
|
+
documentId: string;
|
|
33
|
+
round: MatchRound | null;
|
|
34
|
+
matchNumber: number | null;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** The reasons a player may send; a score mismatch is found by the server. */
|
|
38
|
+
export type PlayerDisputeReason = Exclude<MatchDisputeReason, 'scoreMismatch'>;
|
|
39
|
+
|
|
40
|
+
/** Body of `POST /matches/:id/dispute`, inside `data`. */
|
|
41
|
+
export interface MatchDisputeInput {
|
|
42
|
+
reason: PlayerDisputeReason;
|
|
43
|
+
/** Optional, trimmed, at most `DISPUTE_NOTE_MAX_LENGTH` characters. */
|
|
44
|
+
note?: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export const DISPUTE_NOTE_MAX_LENGTH = 500;
|
|
48
|
+
|
|
49
|
+
/** Body of `POST /matches/:id/ready`, inside `data`. Omitted means ready. */
|
|
50
|
+
export interface MatchReadyInput {
|
|
51
|
+
ready?: boolean;
|
|
52
|
+
}
|