@bondsports/types 2.4.38 → 2.4.39

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.
@@ -34,3 +34,11 @@ export interface IGetFolderContentsParams {
34
34
  export interface IGetPaginatedFolderContentsParams extends IGetFolderContentsParams {
35
35
  pagination?: PaginationQuery;
36
36
  }
37
+ /**
38
+ * Metadata structure for team folder content (ContentType.USER in team folders).
39
+ * Used to track the specific purchase associated with a user's team membership.
40
+ */
41
+ export interface ITeamFolderMetadata {
42
+ teamRole?: string;
43
+ productUserId?: number;
44
+ }
@@ -31,8 +31,8 @@ export declare class UpdateGameDto {
31
31
  export declare class GameShowDto {
32
32
  id: number;
33
33
  stageId: number;
34
- homeTeamId: number;
35
- awayTeamId: number;
34
+ homeTeamId?: number;
35
+ awayTeamId?: number;
36
36
  eventId?: number;
37
37
  homeScore?: number;
38
38
  awayScore?: number;
@@ -6,10 +6,10 @@ export declare class Game extends BondBaseEntity {
6
6
  stageId: number;
7
7
  stage: Stage;
8
8
  eventId?: number;
9
- homeTeamId: number;
10
- homeTeam: CompetitionTeam;
11
- awayTeamId: number;
12
- awayTeam: CompetitionTeam;
9
+ homeTeamId?: number;
10
+ homeTeam?: CompetitionTeam;
11
+ awayTeamId?: number;
12
+ awayTeam?: CompetitionTeam;
13
13
  homeScore?: number;
14
14
  awayScore?: number;
15
15
  status: GameStatusEnum;
@@ -1,6 +1,7 @@
1
- import { IScheduleConfig, IGameSchedule, ITeamSchedule, IDivisionSchedule, IScheduleConflict, IConflictingEvent, IConflictingResource, IGeneratedSchedule, ByeWeekPolicyEnum, ScheduleConflictTypeEnum, ValidationSeverityEnum } from '../types/interfaces';
1
+ import { IScheduleConfig, IGameSchedule, ITeamSchedule, IDivisionSchedule, IScheduleConflict, IConflictingEvent, IConflictingResource, IGeneratedSchedule, ByeWeekPolicyEnum, ScheduleConflictTypeEnum, ValidationSeverityEnum, InternalConflictTypeEnum } from '../types/interfaces';
2
2
  import { MaintenanceEventDto } from './maintenance-event.dto';
3
- export { ByeWeekPolicyEnum, ScheduleConflictTypeEnum, ValidationSeverityEnum } from '../types/interfaces';
3
+ import { ScheduleQualityScoreDto } from './quality-metrics.dto';
4
+ export { ByeWeekPolicyEnum, ScheduleConflictTypeEnum, ValidationSeverityEnum, InternalConflictTypeEnum, } from '../types/interfaces';
4
5
  export { MaintenanceEventDto } from './maintenance-event.dto';
5
6
  /**
6
7
  * Query parameters for deleting a draft schedule
@@ -257,10 +258,49 @@ export declare class UpdateDraftScheduleResponseDto {
257
258
  schedule: GeneratedScheduleDto;
258
259
  status?: string;
259
260
  publishedAt?: string;
260
- qualityMetrics?: any;
261
+ qualityMetrics?: ScheduleQualityScoreDto;
261
262
  metadata: {
262
263
  updatedAt: string;
263
264
  totalGames: number;
264
265
  previousVersion?: number;
265
266
  };
266
267
  }
268
+ /**
269
+ * Request DTO for checking schedule conflicts
270
+ * Accepts a schedule and checks for both internal conflicts (within the schedule)
271
+ * and external conflicts (against other existing events)
272
+ */
273
+ export declare class CheckConflictsRequestDto {
274
+ seasonFolderId: number;
275
+ schedule: GeneratedScheduleDto;
276
+ }
277
+ /**
278
+ * Internal conflict DTO for conflicts within the schedule itself
279
+ */
280
+ export declare class InternalConflictDto {
281
+ type: InternalConflictTypeEnum;
282
+ gameId1: string;
283
+ gameId2: string;
284
+ resourceId?: number;
285
+ teamId?: number;
286
+ date: string;
287
+ description: string;
288
+ }
289
+ /**
290
+ * Metadata DTO for conflict check results
291
+ */
292
+ export declare class ConflictCheckMetadataDto {
293
+ checkedAt: string;
294
+ totalGamesChecked: number;
295
+ internalConflictCount: number;
296
+ externalConflictCount: number;
297
+ }
298
+ /**
299
+ * Response DTO for check conflicts endpoint
300
+ */
301
+ export declare class CheckConflictsResponseDto {
302
+ internalConflicts: InternalConflictDto[];
303
+ externalConflicts: ScheduleConflictDto[];
304
+ totalConflicts: number;
305
+ metadata: ConflictCheckMetadataDto;
306
+ }
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UpdateDraftScheduleResponseDto = exports.UpdateDraftScheduleRequestDto = exports.GetScheduleResponseDto = exports.ScheduleConfigResponseDto = exports.ScheduleConfigRequestDto = exports.PublishScheduleResponseDto = exports.PublishMetadataDto = exports.PublishedSlotDetailsDto = exports.PublishedEventDetailsDto = exports.PublishScheduleRequestDto = exports.GenerateScheduleResponseDto = exports.GenerateScheduleRequestDto = exports.GeneratedScheduleDto = exports.ScheduleConflictDto = exports.ConflictingResourceDto = exports.ConflictingEventDto = exports.DivisionScheduleDto = exports.TeamScheduleDto = exports.GameScheduleDto = exports.ScheduleConfigDto = exports.TimeWindowDto = exports.DeleteDraftScheduleResponseDto = exports.DeleteDraftScheduleQueryDto = exports.MaintenanceEventDto = exports.ValidationSeverityEnum = exports.ScheduleConflictTypeEnum = exports.ByeWeekPolicyEnum = void 0;
3
+ exports.CheckConflictsResponseDto = exports.ConflictCheckMetadataDto = exports.InternalConflictDto = exports.CheckConflictsRequestDto = exports.UpdateDraftScheduleResponseDto = exports.UpdateDraftScheduleRequestDto = exports.GetScheduleResponseDto = exports.ScheduleConfigResponseDto = exports.ScheduleConfigRequestDto = exports.PublishScheduleResponseDto = exports.PublishMetadataDto = exports.PublishedSlotDetailsDto = exports.PublishedEventDetailsDto = exports.PublishScheduleRequestDto = exports.GenerateScheduleResponseDto = exports.GenerateScheduleRequestDto = exports.GeneratedScheduleDto = exports.ScheduleConflictDto = exports.ConflictingResourceDto = exports.ConflictingEventDto = exports.DivisionScheduleDto = exports.TeamScheduleDto = exports.GameScheduleDto = exports.ScheduleConfigDto = exports.TimeWindowDto = exports.DeleteDraftScheduleResponseDto = exports.DeleteDraftScheduleQueryDto = exports.MaintenanceEventDto = exports.InternalConflictTypeEnum = exports.ValidationSeverityEnum = exports.ScheduleConflictTypeEnum = exports.ByeWeekPolicyEnum = void 0;
4
4
  // Re-export enums for backward compatibility
5
5
  var interfaces_1 = require("../types/interfaces");
6
6
  Object.defineProperty(exports, "ByeWeekPolicyEnum", { enumerable: true, get: function () { return interfaces_1.ByeWeekPolicyEnum; } });
7
7
  Object.defineProperty(exports, "ScheduleConflictTypeEnum", { enumerable: true, get: function () { return interfaces_1.ScheduleConflictTypeEnum; } });
8
8
  Object.defineProperty(exports, "ValidationSeverityEnum", { enumerable: true, get: function () { return interfaces_1.ValidationSeverityEnum; } });
9
+ Object.defineProperty(exports, "InternalConflictTypeEnum", { enumerable: true, get: function () { return interfaces_1.InternalConflictTypeEnum; } });
9
10
  // Re-export MaintenanceEventDto for backward compatibility
10
11
  var maintenance_event_dto_1 = require("./maintenance-event.dto");
11
12
  Object.defineProperty(exports, "MaintenanceEventDto", { enumerable: true, get: function () { return maintenance_event_dto_1.MaintenanceEventDto; } });
@@ -148,4 +149,30 @@ exports.UpdateDraftScheduleRequestDto = UpdateDraftScheduleRequestDto;
148
149
  class UpdateDraftScheduleResponseDto {
149
150
  }
150
151
  exports.UpdateDraftScheduleResponseDto = UpdateDraftScheduleResponseDto;
152
+ /**
153
+ * Request DTO for checking schedule conflicts
154
+ * Accepts a schedule and checks for both internal conflicts (within the schedule)
155
+ * and external conflicts (against other existing events)
156
+ */
157
+ class CheckConflictsRequestDto {
158
+ }
159
+ exports.CheckConflictsRequestDto = CheckConflictsRequestDto;
160
+ /**
161
+ * Internal conflict DTO for conflicts within the schedule itself
162
+ */
163
+ class InternalConflictDto {
164
+ }
165
+ exports.InternalConflictDto = InternalConflictDto;
166
+ /**
167
+ * Metadata DTO for conflict check results
168
+ */
169
+ class ConflictCheckMetadataDto {
170
+ }
171
+ exports.ConflictCheckMetadataDto = ConflictCheckMetadataDto;
172
+ /**
173
+ * Response DTO for check conflicts endpoint
174
+ */
175
+ class CheckConflictsResponseDto {
176
+ }
177
+ exports.CheckConflictsResponseDto = CheckConflictsResponseDto;
151
178
  //# sourceMappingURL=leagues-scheduler.dto.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"leagues-scheduler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G;AACH,MAAa,kBAAkB;CAQ9B;AARD,gDAQC;AAED,MAAa,0BAA0B;CAoBtC;AApBD,gEAoBC;AAED,MAAa,wBAAwB;CAIpC;AAJD,4DAIC;AAED,MAAa,yBAAyB;CAUrC;AAVD,8DAUC;AAED,MAAa,sBAAsB;CAclC;AAdD,wDAcC;AAED;;;GAGG;AACH,MAAa,6BAA6B;CAMzC;AAND,sEAMC;AAED;;;GAGG;AACH,MAAa,8BAA8B;CAkB1C;AAlBD,wEAkBC"}
1
+ {"version":3,"file":"leagues-scheduler.dto.js","sourceRoot":"","sources":["../../../../src/types/leagues-scheduler/dto/leagues-scheduler.dto.ts"],"names":[],"mappings":";;;AAmBA,6CAA6C;AAC7C,kDAK6B;AAJ5B,+GAAA,iBAAiB,OAAA;AACjB,sHAAA,wBAAwB,OAAA;AACxB,oHAAA,sBAAsB,OAAA;AACtB,sHAAA,wBAAwB,OAAA;AAGzB,2DAA2D;AAC3D,iEAA8D;AAArD,4HAAA,mBAAmB,OAAA;AAE5B,+EAA+E;AAC/E,wBAAwB;AACxB,+EAA+E;AAE/E;;GAEG;AACH,MAAa,2BAA2B;CAEvC;AAFD,kEAEC;AAED;;GAEG;AACH,MAAa,8BAA8B;CAM1C;AAND,wEAMC;AAED,+EAA+E;AAC/E,yBAAyB;AACzB,+EAA+E;AAE/E;;;GAGG;AACH,MAAa,aAAa;CAUzB;AAVD,sCAUC;AAED;;;GAGG;AACH,MAAa,iBAAiB;CAkC7B;AAlCD,8CAkCC;AAED,+EAA+E;AAC/E,yBAAyB;AACzB,+EAA+E;AAE/E;;;GAGG;AACH,MAAa,eAAe;CAsC3B;AAtCD,0CAsCC;AAED;;;GAGG;AACH,MAAa,eAAe;CAY3B;AAZD,0CAYC;AAED;;;GAGG;AACH,MAAa,mBAAmB;CAQ/B;AARD,kDAQC;AAED;;GAEG;AACH,MAAa,mBAAmB;CAI/B;AAJD,kDAIC;AAED;;GAEG;AACH,MAAa,sBAAsB;CAIlC;AAJD,wDAIC;AAED;;;GAGG;AACH,MAAa,mBAAmB;CAgB/B;AAhBD,kDAgBC;AAED;;;GAGG;AACH,MAAa,oBAAoB;CAgBhC;AAhBD,oDAgBC;AAED,wBAAwB;AACxB,MAAa,0BAA0B;CAUtC;AAVD,gEAUC;AAED,MAAa,2BAA2B;CAwBvC;AAxBD,kEAwBC;AAED,MAAa,yBAAyB;CAMrC;AAND,8DAMC;AAED;;;GAGG;AACH,MAAa,wBAAwB;CAUpC;AAVD,4DAUC;AAED;;;GAGG;AACH,MAAa,uBAAuB;CAUnC;AAVD,0DAUC;AAED;;;GAGG;AACH,MAAa,kBAAkB;CAQ9B;AARD,gDAQC;AAED,MAAa,0BAA0B;CAoBtC;AApBD,gEAoBC;AAED,MAAa,wBAAwB;CAIpC;AAJD,4DAIC;AAED,MAAa,yBAAyB;CAUrC;AAVD,8DAUC;AAED,MAAa,sBAAsB;CAclC;AAdD,wDAcC;AAED;;;GAGG;AACH,MAAa,6BAA6B;CAMzC;AAND,sEAMC;AAED;;;GAGG;AACH,MAAa,8BAA8B;CAkB1C;AAlBD,wEAkBC;AAED;;;;GAIG;AACH,MAAa,wBAAwB;CAIpC;AAJD,4DAIC;AAED;;GAEG;AACH,MAAa,mBAAmB;CAc/B;AAdD,kDAcC;AAED;;GAEG;AACH,MAAa,wBAAwB;CAQpC;AARD,4DAQC;AAED;;GAEG;AACH,MAAa,yBAAyB;CAQrC;AARD,8DAQC"}
@@ -98,9 +98,9 @@ export interface IConflictingResource {
98
98
  name: string;
99
99
  }
100
100
  export interface IScheduleConflict {
101
+ gameId: string;
101
102
  type: ScheduleConflictTypeEnum;
102
103
  severity: ValidationSeverityEnum;
103
- gameId: string;
104
104
  conflictingEvent?: IConflictingEvent;
105
105
  resource?: IConflictingResource;
106
106
  startDate?: string;
@@ -294,3 +294,56 @@ export interface IRoundRobinStats {
294
294
  export interface IScheduleCacheInvalidator {
295
295
  invalidateOne: (id: number) => Promise<void>;
296
296
  }
297
+ export declare enum InternalConflictTypeEnum {
298
+ RESOURCE_OVERLAP = "resource_overlap",
299
+ TEAM_DOUBLE_BOOKING = "team_double_booking"
300
+ }
301
+ export interface IInternalConflict {
302
+ gameId1: string;
303
+ gameId2: string;
304
+ resourceId?: number;
305
+ teamId?: number;
306
+ type: InternalConflictTypeEnum;
307
+ date: string;
308
+ description: string;
309
+ }
310
+ export interface IResourceConflictSlot {
311
+ event?: {
312
+ id: number;
313
+ title?: string;
314
+ };
315
+ space?: {
316
+ id: number;
317
+ name?: string;
318
+ };
319
+ startTime?: string;
320
+ endTime?: string;
321
+ }
322
+ export interface IMapResourceConflictsParams {
323
+ gameId: string;
324
+ slots: IResourceConflictSlot[];
325
+ date: string;
326
+ startTime: string;
327
+ endTime: string;
328
+ }
329
+ export interface IFindTeamOverlapsParams {
330
+ teamId: number;
331
+ teamGames: IGameSchedule[];
332
+ date: string;
333
+ reportedConflicts: Set<string>;
334
+ }
335
+ export interface IValidateWindowTimesParams {
336
+ window: ITimeWindow;
337
+ windowIndex: number;
338
+ timeRegex: RegExp;
339
+ }
340
+ export interface IWeeklyCapacityInfo {
341
+ maxCapacityPerWeek: number;
342
+ slotsPerDay: number;
343
+ preferredDays: number[];
344
+ numResources: number;
345
+ }
346
+ export interface ICheckConflictsResult {
347
+ internalConflicts: IInternalConflict[];
348
+ externalConflicts: IScheduleConflict[];
349
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EVENT_SUBTYPE_GAME = exports.GameTypeEnum = exports.ValidationSeverityEnum = exports.ScheduleConflictTypeEnum = exports.ByeWeekPolicyEnum = exports.ScheduleStatusEnum = void 0;
3
+ exports.InternalConflictTypeEnum = exports.EVENT_SUBTYPE_GAME = exports.GameTypeEnum = exports.ValidationSeverityEnum = exports.ScheduleConflictTypeEnum = exports.ByeWeekPolicyEnum = exports.ScheduleStatusEnum = void 0;
4
4
  const enums_1 = require("./enums");
5
5
  Object.defineProperty(exports, "ScheduleStatusEnum", { enumerable: true, get: function () { return enums_1.ScheduleStatusEnum; } });
6
6
  Object.defineProperty(exports, "ByeWeekPolicyEnum", { enumerable: true, get: function () { return enums_1.ByeWeekPolicyEnum; } });
@@ -9,4 +9,9 @@ Object.defineProperty(exports, "ValidationSeverityEnum", { enumerable: true, get
9
9
  Object.defineProperty(exports, "GameTypeEnum", { enumerable: true, get: function () { return enums_1.GameTypeEnum; } });
10
10
  // Event subtype constants for leagues scheduler
11
11
  exports.EVENT_SUBTYPE_GAME = 'game';
12
+ var InternalConflictTypeEnum;
13
+ (function (InternalConflictTypeEnum) {
14
+ InternalConflictTypeEnum["RESOURCE_OVERLAP"] = "resource_overlap";
15
+ InternalConflictTypeEnum["TEAM_DOUBLE_BOOKING"] = "team_double_booking";
16
+ })(InternalConflictTypeEnum = exports.InternalConflictTypeEnum || (exports.InternalConflictTypeEnum = {}));
12
17
  //# sourceMappingURL=interfaces.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../src/types/leagues-scheduler/types/interfaces.ts"],"names":[],"mappings":";;;AAIA,mCAMiB;AAER,mGAPR,0BAAkB,OAOQ;AAAE,kGAN5B,yBAAiB,OAM4B;AAAE,yGAL/C,gCAAwB,OAK+C;AAAE,uGAJzE,8BAAsB,OAIyE;AAAE,6FAHjG,oBAAY,OAGiG;AAE9G,gDAAgD;AACnC,QAAA,kBAAkB,GAAG,MAAM,CAAC"}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../src/types/leagues-scheduler/types/interfaces.ts"],"names":[],"mappings":";;;AAIA,mCAMiB;AAER,mGAPR,0BAAkB,OAOQ;AAAE,kGAN5B,yBAAiB,OAM4B;AAAE,yGAL/C,gCAAwB,OAK+C;AAAE,uGAJzE,8BAAsB,OAIyE;AAAE,6FAHjG,oBAAY,OAGiG;AAE9G,gDAAgD;AACnC,QAAA,kBAAkB,GAAG,MAAM,CAAC;AA2UzC,IAAY,wBAGX;AAHD,WAAY,wBAAwB;IACnC,iEAAqC,CAAA;IACrC,uEAA2C,CAAA;AAC5C,CAAC,EAHW,wBAAwB,GAAxB,gCAAwB,KAAxB,gCAAwB,QAGnC"}
@@ -266,6 +266,21 @@ export interface IRawEventInSchedule extends IEventInSchedule {
266
266
  maxParticipants: number;
267
267
  parentSessionName: string;
268
268
  }
269
+ export interface ISegmentEventCount {
270
+ parentId: number;
271
+ eventsCount: number;
272
+ }
273
+ export interface IEventAttendeeNotificationData {
274
+ firstName: string;
275
+ lastName: string;
276
+ email: string;
277
+ userId: number;
278
+ sessionName: string;
279
+ parentSessionName: string | null;
280
+ organizationName: string;
281
+ programName: string;
282
+ eventId: number;
283
+ }
269
284
  export interface IBasicSpaceAndSlotCreator {
270
285
  id: number;
271
286
  bookingCreatorId: number;
@@ -1,6 +1,7 @@
1
1
  import { Event } from '../../entity/Events';
2
2
  import { ProductsUsers } from '../../entity/ProductsUsers';
3
3
  import { Folder } from '../../folders/entities/folder.entity';
4
+ import { ITeamFolderMetadata } from '../../folders/types/interfaces/folder-content.interfaces';
4
5
  import { MetaTypeEnum } from '../../folders/types/folders.enums';
5
6
  import { PaymentStatusEnum } from '../../payment/types/enums/payment.enums';
6
7
  import { ProgramTypesEnum } from '../../programs/types/enums/program.enums';
@@ -115,7 +116,6 @@ export interface IHandleTeamChangeParams {
115
116
  * Represents a team member with their role (product subtype).
116
117
  * Used when fetching team rosters to match users to their correct ProductsUsers.
117
118
  */
118
- export interface ITeamMemberWithRole {
119
+ export interface ITeamMemberWithRole extends ITeamFolderMetadata {
119
120
  userId: number;
120
- teamRole?: string;
121
121
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bondsports/types",
3
- "version": "2.4.38",
3
+ "version": "2.4.39",
4
4
  "description": "backend types module for Bond-Sports",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {