tods-competition-factory 2.0.0-beta.2 → 2.0.0-beta.4
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.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/tods-competition-factory.d.ts +112 -88
- package/dist/tods-competition-factory.development.cjs.js +6654 -7071
- package/dist/tods-competition-factory.development.cjs.js.map +1 -1
- package/dist/tods-competition-factory.production.cjs.min.js +1 -1
- package/dist/tods-competition-factory.production.cjs.min.js.map +1 -1
- package/package.json +5 -5
|
@@ -1301,65 +1301,19 @@ interface UnifiedVenueID {
|
|
|
1301
1301
|
venueId: string;
|
|
1302
1302
|
}
|
|
1303
1303
|
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
} & Participant;
|
|
1318
|
-
type HydratedSide = Side & {
|
|
1319
|
-
participant?: HydratedParticipant;
|
|
1320
|
-
};
|
|
1321
|
-
|
|
1322
|
-
type MatchUpFilters = {
|
|
1323
|
-
matchUpStatuses?: MatchUpStatusUnion[];
|
|
1324
|
-
excludeMatchUpStatuses?: string[];
|
|
1325
|
-
isCollectionMatchUp?: boolean;
|
|
1326
|
-
matchUpFormats?: string[];
|
|
1327
|
-
roundPositions?: number[];
|
|
1328
|
-
hasWinningSide?: boolean;
|
|
1329
|
-
collectionIds?: string[];
|
|
1330
|
-
roundNumbers?: number[];
|
|
1331
|
-
isMatchUpTie?: boolean;
|
|
1332
|
-
matchUpFormat?: string;
|
|
1333
|
-
matchUpIds?: string[];
|
|
1334
|
-
roundNames?: string[];
|
|
1335
|
-
processContext?: boolean;
|
|
1336
|
-
stageSequences?: string[];
|
|
1337
|
-
scheduledDates?: string[];
|
|
1338
|
-
participantIds?: string[];
|
|
1339
|
-
stages?: StageTypeUnion[];
|
|
1340
|
-
tournamentIds?: string[];
|
|
1341
|
-
matchUpTypes?: string[];
|
|
1342
|
-
structureIds?: string[];
|
|
1343
|
-
scheduledDate?: string;
|
|
1344
|
-
readyToScore?: boolean;
|
|
1345
|
-
courtIds?: string[];
|
|
1346
|
-
eventIds?: string[];
|
|
1347
|
-
venueIds?: string[];
|
|
1348
|
-
drawIds?: string[];
|
|
1349
|
-
filterMatchUpTypes?: boolean;
|
|
1350
|
-
filterMatchUpIds?: boolean;
|
|
1351
|
-
};
|
|
1352
|
-
|
|
1353
|
-
type MappedMatchUps = {
|
|
1354
|
-
[key: string]: {
|
|
1355
|
-
matchUps: HydratedMatchUp[] | MatchUp[] | undefined;
|
|
1356
|
-
itemStructureIds: string[];
|
|
1357
|
-
structureName?: string;
|
|
1358
|
-
};
|
|
1359
|
-
};
|
|
1360
|
-
type MatchUpsMap = {
|
|
1361
|
-
mappedMatchUps: MappedMatchUps;
|
|
1362
|
-
drawMatchUps: MatchUp[];
|
|
1304
|
+
declare const SINGLES_EVENT = "SINGLES";
|
|
1305
|
+
declare const DOUBLES_EVENT = "DOUBLES";
|
|
1306
|
+
declare const TEAM_EVENT = "TEAM";
|
|
1307
|
+
declare const eventConstants: {
|
|
1308
|
+
AGE: string;
|
|
1309
|
+
BOTH: string;
|
|
1310
|
+
DOUBLES: string;
|
|
1311
|
+
DOUBLES_EVENT: string;
|
|
1312
|
+
RATING: string;
|
|
1313
|
+
SINGLES: string;
|
|
1314
|
+
SINGLES_EVENT: string;
|
|
1315
|
+
TEAM_EVENT: string;
|
|
1316
|
+
TEAM: string;
|
|
1363
1317
|
};
|
|
1364
1318
|
|
|
1365
1319
|
type SignedInStatusUnion = typeof SIGNED_IN | typeof SIGNED_OUT;
|
|
@@ -1382,6 +1336,24 @@ declare const participantConstants: {
|
|
|
1382
1336
|
SIGNED_IN: string;
|
|
1383
1337
|
};
|
|
1384
1338
|
|
|
1339
|
+
type HydratedCourt = {
|
|
1340
|
+
[key: string]: any;
|
|
1341
|
+
} & Court;
|
|
1342
|
+
type HydratedVenue = {
|
|
1343
|
+
[key: string]: any;
|
|
1344
|
+
} & Venue;
|
|
1345
|
+
type HydratedMatchUp = MatchUp & {
|
|
1346
|
+
[key: string | number]: any;
|
|
1347
|
+
sides?: HydratedSide[];
|
|
1348
|
+
};
|
|
1349
|
+
type HydratedParticipant = {
|
|
1350
|
+
individualParticipants?: HydratedParticipant[];
|
|
1351
|
+
[key: string | number]: any;
|
|
1352
|
+
} & Participant;
|
|
1353
|
+
type HydratedSide = Side & {
|
|
1354
|
+
participant?: HydratedParticipant;
|
|
1355
|
+
};
|
|
1356
|
+
|
|
1385
1357
|
type ErrorType = {
|
|
1386
1358
|
message: string;
|
|
1387
1359
|
info?: string;
|
|
@@ -2116,19 +2088,16 @@ declare const policyConstants: {
|
|
|
2116
2088
|
readonly POLICY_TYPE_DRAWS: "draws";
|
|
2117
2089
|
};
|
|
2118
2090
|
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
SINGLES_EVENT: string;
|
|
2130
|
-
TEAM_EVENT: string;
|
|
2131
|
-
TEAM: string;
|
|
2091
|
+
type MappedMatchUps = {
|
|
2092
|
+
[key: string]: {
|
|
2093
|
+
matchUps: HydratedMatchUp[] | MatchUp[] | undefined;
|
|
2094
|
+
itemStructureIds: string[];
|
|
2095
|
+
structureName?: string;
|
|
2096
|
+
};
|
|
2097
|
+
};
|
|
2098
|
+
type MatchUpsMap = {
|
|
2099
|
+
mappedMatchUps: MappedMatchUps;
|
|
2100
|
+
drawMatchUps: MatchUp[];
|
|
2132
2101
|
};
|
|
2133
2102
|
|
|
2134
2103
|
type FactoryEngine = {
|
|
@@ -2473,6 +2442,36 @@ type AddScheduleAttributeArgs = {
|
|
|
2473
2442
|
matchUpId: string;
|
|
2474
2443
|
event?: Event$1;
|
|
2475
2444
|
};
|
|
2445
|
+
type MatchUpFilters = {
|
|
2446
|
+
matchUpStatuses?: MatchUpStatusUnion[];
|
|
2447
|
+
excludeMatchUpStatuses?: string[];
|
|
2448
|
+
isCollectionMatchUp?: boolean;
|
|
2449
|
+
matchUpFormats?: string[];
|
|
2450
|
+
roundPositions?: number[];
|
|
2451
|
+
hasWinningSide?: boolean;
|
|
2452
|
+
collectionIds?: string[];
|
|
2453
|
+
roundNumbers?: number[];
|
|
2454
|
+
isMatchUpTie?: boolean;
|
|
2455
|
+
matchUpFormat?: string;
|
|
2456
|
+
matchUpIds?: string[];
|
|
2457
|
+
roundNames?: string[];
|
|
2458
|
+
processContext?: boolean;
|
|
2459
|
+
stageSequences?: string[];
|
|
2460
|
+
scheduledDates?: string[];
|
|
2461
|
+
participantIds?: string[];
|
|
2462
|
+
stages?: StageTypeUnion[];
|
|
2463
|
+
tournamentIds?: string[];
|
|
2464
|
+
matchUpTypes?: string[];
|
|
2465
|
+
structureIds?: string[];
|
|
2466
|
+
scheduledDate?: string;
|
|
2467
|
+
readyToScore?: boolean;
|
|
2468
|
+
courtIds?: string[];
|
|
2469
|
+
eventIds?: string[];
|
|
2470
|
+
venueIds?: string[];
|
|
2471
|
+
drawIds?: string[];
|
|
2472
|
+
filterMatchUpTypes?: boolean;
|
|
2473
|
+
filterMatchUpIds?: boolean;
|
|
2474
|
+
};
|
|
2476
2475
|
|
|
2477
2476
|
type ModifyVenueArgs = {
|
|
2478
2477
|
tournamentRecords?: TournamentRecords;
|
|
@@ -2800,8 +2799,9 @@ declare function formatDate(date?: any, separator?: string, format?: string): st
|
|
|
2800
2799
|
declare function offsetDate(date: any): Date;
|
|
2801
2800
|
declare function offsetTime(date?: any): number;
|
|
2802
2801
|
declare function isDate(dateArg: any): boolean;
|
|
2803
|
-
declare function
|
|
2802
|
+
declare function generateDateRange(startDt?: any, endDt?: any): string[];
|
|
2804
2803
|
declare function isISODateString(dateString: any): boolean;
|
|
2804
|
+
declare function isTimeString(timeString: any): boolean;
|
|
2805
2805
|
declare function timeStringMinutes(timeString?: any): any;
|
|
2806
2806
|
declare function extractTime(dateString: any): any;
|
|
2807
2807
|
declare function extractDate(dateString: any): any;
|
|
@@ -4920,7 +4920,7 @@ type RoundMatchUpsResult = {
|
|
|
4920
4920
|
roundNumbers?: number[];
|
|
4921
4921
|
error?: ErrorType;
|
|
4922
4922
|
};
|
|
4923
|
-
declare function getRoundMatchUps({ matchUps, interpolate
|
|
4923
|
+
declare function getRoundMatchUps({ matchUps, interpolate }: GetRoundMatchUpsArgs): RoundMatchUpsResult;
|
|
4924
4924
|
|
|
4925
4925
|
type getPredictiveAccuracyArgs = {
|
|
4926
4926
|
exclusionRule?: {
|
|
@@ -5737,7 +5737,7 @@ type GetAssignedParticipantIdsArgs = {
|
|
|
5737
5737
|
drawDefinition: DrawDefinition;
|
|
5738
5738
|
stages?: StageTypeUnion[];
|
|
5739
5739
|
};
|
|
5740
|
-
declare function getAssignedParticipantIds({ drawDefinition, stages
|
|
5740
|
+
declare function getAssignedParticipantIds({ drawDefinition, stages }: GetAssignedParticipantIdsArgs): ResultType & {
|
|
5741
5741
|
assignedParticipantIds?: string[];
|
|
5742
5742
|
};
|
|
5743
5743
|
|
|
@@ -6558,7 +6558,7 @@ declare function modifyIndividualParticipantIds({ individualParticipantIds, grou
|
|
|
6558
6558
|
tournamentRecord: any;
|
|
6559
6559
|
}): ResultType;
|
|
6560
6560
|
|
|
6561
|
-
declare function mergeParticipants({ participants: incomingParticipants, tournamentRecord, arraysToMerge
|
|
6561
|
+
declare function mergeParticipants({ participants: incomingParticipants, tournamentRecord, arraysToMerge }: {
|
|
6562
6562
|
participants?: never[] | undefined;
|
|
6563
6563
|
tournamentRecord: any;
|
|
6564
6564
|
arraysToMerge: any;
|
|
@@ -7042,6 +7042,7 @@ type GenerateDrawMaticRoundArgs = {
|
|
|
7042
7042
|
structure?: Structure;
|
|
7043
7043
|
structureId?: string;
|
|
7044
7044
|
scaleName?: string;
|
|
7045
|
+
idPrefix?: string;
|
|
7045
7046
|
isMock?: boolean;
|
|
7046
7047
|
drawId?: string;
|
|
7047
7048
|
event: Event$1;
|
|
@@ -7055,15 +7056,15 @@ type DrawMaticRoundResult = {
|
|
|
7055
7056
|
maxDelta?: number;
|
|
7056
7057
|
maxDiff?: number;
|
|
7057
7058
|
};
|
|
7058
|
-
declare function generateDrawMaticRound({ encounterValue, sameTeamValue, maxIterations, generateMatchUps, tournamentParticipants, participantIds, drawDefinition, adHocRatings, structureId, salted, matchUpIds, eventType, structure, scaleName, isMock, event, }: GenerateDrawMaticRoundArgs): ResultType & DrawMaticRoundResult;
|
|
7059
|
+
declare function generateDrawMaticRound({ encounterValue, sameTeamValue, maxIterations, generateMatchUps, tournamentParticipants, participantIds, drawDefinition, adHocRatings, structureId, salted, matchUpIds, eventType, structure, scaleName, idPrefix, isMock, event, }: GenerateDrawMaticRoundArgs): ResultType & DrawMaticRoundResult;
|
|
7059
7060
|
|
|
7060
7061
|
type DrawMaticArgs = {
|
|
7061
7062
|
adHocRatings?: {
|
|
7062
7063
|
[key: string]: number;
|
|
7063
7064
|
};
|
|
7064
7065
|
restrictEntryStatus?: boolean;
|
|
7065
|
-
drawDefinition?: DrawDefinition;
|
|
7066
7066
|
tournamentRecord: Tournament;
|
|
7067
|
+
drawDefinition: DrawDefinition;
|
|
7067
7068
|
generateMatchUps?: boolean;
|
|
7068
7069
|
eventType?: EventTypeUnion;
|
|
7069
7070
|
salted?: number | boolean;
|
|
@@ -7074,13 +7075,13 @@ type DrawMaticArgs = {
|
|
|
7074
7075
|
structure?: Structure;
|
|
7075
7076
|
matchUpIds?: string[];
|
|
7076
7077
|
structureId?: string;
|
|
7078
|
+
idPrefix?: string;
|
|
7077
7079
|
isMock?: boolean;
|
|
7078
7080
|
event: Event$1;
|
|
7079
7081
|
scaleAccessor?: string;
|
|
7080
7082
|
scaleName?: string;
|
|
7081
7083
|
};
|
|
7082
|
-
declare function drawMatic(
|
|
7083
|
-
eventType, isMock, salted, event, }: DrawMaticArgs): ResultType & DrawMaticRoundResult;
|
|
7084
|
+
declare function drawMatic(params: DrawMaticArgs): ResultType & DrawMaticRoundResult;
|
|
7084
7085
|
|
|
7085
7086
|
type GenerateDrawDefinitionArgs = {
|
|
7086
7087
|
automated?: boolean | {
|
|
@@ -7135,6 +7136,22 @@ declare function generateDrawDefinition(params: GenerateDrawDefinitionArgs): Res
|
|
|
7135
7136
|
conflicts?: any[];
|
|
7136
7137
|
};
|
|
7137
7138
|
|
|
7139
|
+
type GenerateCourtsArgs = {
|
|
7140
|
+
tournamentRecord?: Tournament;
|
|
7141
|
+
courtNames?: string[];
|
|
7142
|
+
namePrefix?: string;
|
|
7143
|
+
startTime?: string;
|
|
7144
|
+
endTime?: string;
|
|
7145
|
+
idPrefix?: string;
|
|
7146
|
+
uuids?: string[];
|
|
7147
|
+
dates?: string[];
|
|
7148
|
+
count: number;
|
|
7149
|
+
};
|
|
7150
|
+
type GenerateCourtsResult = {
|
|
7151
|
+
courts?: Court[];
|
|
7152
|
+
};
|
|
7153
|
+
declare function generateCourts(params: GenerateCourtsArgs): ResultType & GenerateCourtsResult;
|
|
7154
|
+
|
|
7138
7155
|
type NamingEntry = {
|
|
7139
7156
|
[key: string]: {
|
|
7140
7157
|
name: string;
|
|
@@ -7174,16 +7191,18 @@ type GenerateAdHocMatchUpsArgs = {
|
|
|
7174
7191
|
participantIdPairings?: {
|
|
7175
7192
|
participantIds: [string | undefined, string | undefined];
|
|
7176
7193
|
}[];
|
|
7194
|
+
tournamentRecord?: Tournament;
|
|
7177
7195
|
drawDefinition: DrawDefinition;
|
|
7178
7196
|
matchUpsCount?: number;
|
|
7179
7197
|
matchUpIds?: string[];
|
|
7180
7198
|
roundNumber?: number;
|
|
7181
7199
|
structureId?: string;
|
|
7182
7200
|
newRound?: boolean;
|
|
7201
|
+
idPrefix?: string;
|
|
7183
7202
|
isMock?: boolean;
|
|
7184
7203
|
event: Event$1;
|
|
7185
7204
|
};
|
|
7186
|
-
declare function generateAdHocMatchUps(
|
|
7205
|
+
declare function generateAdHocMatchUps(params: GenerateAdHocMatchUpsArgs): {
|
|
7187
7206
|
matchUpsCount?: number;
|
|
7188
7207
|
matchUps?: MatchUp[];
|
|
7189
7208
|
error?: ErrorType;
|
|
@@ -7662,7 +7681,7 @@ type RemoveStructureArgs = {
|
|
|
7662
7681
|
force?: boolean;
|
|
7663
7682
|
event: Event$1;
|
|
7664
7683
|
};
|
|
7665
|
-
declare function removeStructure({ tournamentRecord, drawDefinition, structureId, event, force
|
|
7684
|
+
declare function removeStructure({ tournamentRecord, drawDefinition, structureId, event, force }: RemoveStructureArgs): {
|
|
7666
7685
|
error: {
|
|
7667
7686
|
message: string;
|
|
7668
7687
|
code: string;
|
|
@@ -8215,7 +8234,11 @@ declare function luckyLoserDrawPositionAssignment(params: any): ResultType | {
|
|
|
8215
8234
|
};
|
|
8216
8235
|
};
|
|
8217
8236
|
|
|
8218
|
-
|
|
8237
|
+
type GetAvailablePlayoffProfileArgs = {
|
|
8238
|
+
drawDefinition: DrawDefinition;
|
|
8239
|
+
structureId?: string;
|
|
8240
|
+
};
|
|
8241
|
+
declare function getAvailablePlayoffProfiles({ drawDefinition, structureId }: GetAvailablePlayoffProfileArgs): any;
|
|
8219
8242
|
|
|
8220
8243
|
declare function enableTieAutoCalc({ tournamentRecord, drawDefinition, matchUpId, event, }: {
|
|
8221
8244
|
tournamentRecord: any;
|
|
@@ -8729,7 +8752,7 @@ type AddEventArgs = {
|
|
|
8729
8752
|
internalUse?: boolean;
|
|
8730
8753
|
event: any;
|
|
8731
8754
|
};
|
|
8732
|
-
declare function addEvent({ suppressNotifications, tournamentRecord, internalUse, event
|
|
8755
|
+
declare function addEvent({ suppressNotifications, tournamentRecord, internalUse, event }: AddEventArgs): {
|
|
8733
8756
|
context?: {
|
|
8734
8757
|
[key: string]: any;
|
|
8735
8758
|
};
|
|
@@ -8972,6 +8995,7 @@ declare const governors: {
|
|
|
8972
8995
|
};
|
|
8973
8996
|
generateAdHocMatchUps: typeof generateAdHocMatchUps;
|
|
8974
8997
|
generateAndPopulatePlayoffStructures: typeof generateAndPopulatePlayoffStructures;
|
|
8998
|
+
generateCourts: typeof generateCourts;
|
|
8975
8999
|
generateDrawDefinition: typeof generateDrawDefinition;
|
|
8976
9000
|
generateDrawMaticRound: typeof generateDrawMaticRound;
|
|
8977
9001
|
generateDrawStructuresAndLinks: typeof generateDrawStructuresAndLinks;
|
|
@@ -9308,7 +9332,6 @@ declare const governors: {
|
|
|
9308
9332
|
constantToString: typeof constantToString;
|
|
9309
9333
|
countValues: typeof countValues;
|
|
9310
9334
|
createMap: typeof createMap;
|
|
9311
|
-
dateRange: typeof dateRange;
|
|
9312
9335
|
dateTime: {
|
|
9313
9336
|
addDays: typeof addDays;
|
|
9314
9337
|
addWeek: typeof addWeek;
|
|
@@ -9323,7 +9346,7 @@ declare const governors: {
|
|
|
9323
9346
|
getDateByWeek: typeof getDateByWeek;
|
|
9324
9347
|
isISODateString: typeof isISODateString;
|
|
9325
9348
|
isDate: typeof isDate;
|
|
9326
|
-
isTimeString:
|
|
9349
|
+
isTimeString: typeof isTimeString;
|
|
9327
9350
|
offsetDate: typeof offsetDate;
|
|
9328
9351
|
offsetTime: typeof offsetTime;
|
|
9329
9352
|
sameDay: typeof sameDay;
|
|
@@ -9338,6 +9361,7 @@ declare const governors: {
|
|
|
9338
9361
|
definedAttributes: typeof definedAttributes;
|
|
9339
9362
|
extractAttributes: (accessor: any) => (element: any) => any;
|
|
9340
9363
|
flattenJSON: typeof flattenJSON;
|
|
9364
|
+
generateDateRange: typeof generateDateRange;
|
|
9341
9365
|
generateHashCode: typeof generateHashCode;
|
|
9342
9366
|
generateRange: typeof generateRange;
|
|
9343
9367
|
generateTimeCode: typeof generateTimeCode;
|
|
@@ -9405,7 +9429,6 @@ declare const utilities: {
|
|
|
9405
9429
|
constantToString: typeof constantToString;
|
|
9406
9430
|
countValues: typeof countValues;
|
|
9407
9431
|
createMap: typeof createMap;
|
|
9408
|
-
dateRange: typeof dateRange;
|
|
9409
9432
|
dateTime: {
|
|
9410
9433
|
addDays: typeof addDays;
|
|
9411
9434
|
addWeek: typeof addWeek;
|
|
@@ -9420,7 +9443,7 @@ declare const utilities: {
|
|
|
9420
9443
|
getDateByWeek: typeof getDateByWeek;
|
|
9421
9444
|
isISODateString: typeof isISODateString;
|
|
9422
9445
|
isDate: typeof isDate;
|
|
9423
|
-
isTimeString:
|
|
9446
|
+
isTimeString: typeof isTimeString;
|
|
9424
9447
|
offsetDate: typeof offsetDate;
|
|
9425
9448
|
offsetTime: typeof offsetTime;
|
|
9426
9449
|
sameDay: typeof sameDay;
|
|
@@ -9435,6 +9458,7 @@ declare const utilities: {
|
|
|
9435
9458
|
definedAttributes: typeof definedAttributes;
|
|
9436
9459
|
extractAttributes: (accessor: any) => (element: any) => any;
|
|
9437
9460
|
flattenJSON: typeof flattenJSON;
|
|
9461
|
+
generateDateRange: typeof generateDateRange;
|
|
9438
9462
|
generateHashCode: typeof generateHashCode;
|
|
9439
9463
|
generateRange: typeof generateRange;
|
|
9440
9464
|
generateTimeCode: typeof generateTimeCode;
|