@playcaller/sdk 0.3.1 → 0.3.2
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.d.mts +1121 -238
- package/dist/index.d.ts +1121 -238
- package/dist/index.js +1180 -163
- package/dist/index.mjs +1180 -163
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -8,12 +8,13 @@ var __export = (target, all) => {
|
|
|
8
8
|
var api_exports = {};
|
|
9
9
|
__export(api_exports, {
|
|
10
10
|
BadRequestError: () => BadRequestError,
|
|
11
|
+
BatchPlayerSignalsRequest: () => BatchPlayerSignalsRequest,
|
|
12
|
+
BatchPlayersRequest: () => BatchPlayersRequest,
|
|
11
13
|
BeatReporterSignal: () => BeatReporterSignal,
|
|
12
14
|
ComparePlayersRequestSport: () => ComparePlayersRequestSport,
|
|
13
15
|
ConflictError: () => ConflictError,
|
|
14
16
|
CreateWebhookRequest: () => CreateWebhookRequest,
|
|
15
17
|
EspnGame: () => EspnGame,
|
|
16
|
-
EvaluateTradeResponse: () => EvaluateTradeResponse,
|
|
17
18
|
ForbiddenError: () => ForbiddenError,
|
|
18
19
|
GetAnalyticsTrendsRequestSport: () => GetAnalyticsTrendsRequestSport,
|
|
19
20
|
GetDaaSKeyInfoResponse: () => GetDaaSKeyInfoResponse,
|
|
@@ -25,17 +26,24 @@ __export(api_exports, {
|
|
|
25
26
|
GetIntelligenceNewsRequestSeverity: () => GetIntelligenceNewsRequestSeverity,
|
|
26
27
|
GetIntelligenceNewsRequestSignalType: () => GetIntelligenceNewsRequestSignalType,
|
|
27
28
|
GetIntelligenceNewsRequestSport: () => GetIntelligenceNewsRequestSport,
|
|
28
|
-
|
|
29
|
+
GetIntelligenceSignalsRequestSeverity: () => GetIntelligenceSignalsRequestSeverity,
|
|
30
|
+
GetIntelligenceSignalsRequestSport: () => GetIntelligenceSignalsRequestSport,
|
|
31
|
+
GetIntelligenceSignalsResponse: () => GetIntelligenceSignalsResponse,
|
|
29
32
|
GetMlbScoringLeadersRequestPosition: () => GetMlbScoringLeadersRequestPosition,
|
|
30
33
|
GetMlbTeamRosterRequestPosition: () => GetMlbTeamRosterRequestPosition,
|
|
31
34
|
GetNbaConfidenceResponse: () => GetNbaConfidenceResponse,
|
|
32
35
|
GetNbaStandingsRequestConference: () => GetNbaStandingsRequestConference,
|
|
33
36
|
GetNbaTeamRosterRequestPosition: () => GetNbaTeamRosterRequestPosition,
|
|
37
|
+
GetNflCustomRankingsRequest: () => GetNflCustomRankingsRequest,
|
|
38
|
+
GetNflDepthChartChangesRequestChangeType: () => GetNflDepthChartChangesRequestChangeType,
|
|
39
|
+
GetNflDepthChartChangesRequestPosition: () => GetNflDepthChartChangesRequestPosition,
|
|
40
|
+
GetNflDepthChartChangesResponse: () => GetNflDepthChartChangesResponse,
|
|
34
41
|
GetNflRankingsRequestFormat: () => GetNflRankingsRequestFormat,
|
|
35
42
|
GetNflRankingsRequestPosition: () => GetNflRankingsRequestPosition,
|
|
36
43
|
GetNflRankingsResponse: () => GetNflRankingsResponse,
|
|
37
44
|
GetNflStandingsRequestConference: () => GetNflStandingsRequestConference,
|
|
38
45
|
GetNflTeamRosterRequestPosition: () => GetNflTeamRosterRequestPosition,
|
|
46
|
+
GetOddsHistoryRequestSport: () => GetOddsHistoryRequestSport,
|
|
39
47
|
GetPlayerAlphaMetricsRequestSport: () => GetPlayerAlphaMetricsRequestSport,
|
|
40
48
|
GetPlayerNewsRequestSport: () => GetPlayerNewsRequestSport,
|
|
41
49
|
GetPlayerNewsResponse: () => GetPlayerNewsResponse,
|
|
@@ -43,12 +51,15 @@ __export(api_exports, {
|
|
|
43
51
|
GetSoccerStandingsRequestLeague: () => GetSoccerStandingsRequestLeague,
|
|
44
52
|
GetTeamInjuriesRequestSport: () => GetTeamInjuriesRequestSport,
|
|
45
53
|
GetTeamInjuriesResponse: () => GetTeamInjuriesResponse,
|
|
54
|
+
GetTeamRosterPulseRequestSport: () => GetTeamRosterPulseRequestSport,
|
|
46
55
|
GetTeamScheduleRequestSport: () => GetTeamScheduleRequestSport,
|
|
47
56
|
GetTeamScheduleRequestStatus: () => GetTeamScheduleRequestStatus,
|
|
48
57
|
GetTennisMatchesRequestTour: () => GetTennisMatchesRequestTour,
|
|
49
58
|
GetTrendingRequestSport: () => GetTrendingRequestSport,
|
|
50
59
|
GetUfcEventsRequestState: () => GetUfcEventsRequestState,
|
|
51
60
|
GetWaiverArticlesRequestSport: () => GetWaiverArticlesRequestSport,
|
|
61
|
+
GetWaiverPriorityRequestSport: () => GetWaiverPriorityRequestSport,
|
|
62
|
+
GetWaiverPriorityResponse: () => GetWaiverPriorityResponse,
|
|
52
63
|
InternalServerError: () => InternalServerError,
|
|
53
64
|
InvokeMcpToolRequest: () => InvokeMcpToolRequest,
|
|
54
65
|
ListCfbGamesRequestState: () => ListCfbGamesRequestState,
|
|
@@ -66,6 +77,7 @@ __export(api_exports, {
|
|
|
66
77
|
MlbGame: () => MlbGame,
|
|
67
78
|
MlbPlayer: () => MlbPlayer,
|
|
68
79
|
NotFoundError: () => NotFoundError,
|
|
80
|
+
PaymentRequiredError: () => PaymentRequiredError,
|
|
69
81
|
PlayerIdentity: () => PlayerIdentity,
|
|
70
82
|
SearchPlayersRequestSport: () => SearchPlayersRequestSport,
|
|
71
83
|
StreamEventsRequestSport: () => StreamEventsRequestSport,
|
|
@@ -76,7 +88,6 @@ __export(api_exports, {
|
|
|
76
88
|
cfb: () => cfb_exports,
|
|
77
89
|
golf: () => golf_exports,
|
|
78
90
|
intelligence: () => intelligence_exports,
|
|
79
|
-
leagues: () => leagues_exports,
|
|
80
91
|
mcp: () => mcp_exports,
|
|
81
92
|
mlb: () => mlb_exports,
|
|
82
93
|
multi: () => multi_exports,
|
|
@@ -240,6 +251,23 @@ var NotFoundError = class extends PlaycallerApiError {
|
|
|
240
251
|
}
|
|
241
252
|
};
|
|
242
253
|
|
|
254
|
+
// api/errors/PaymentRequiredError.ts
|
|
255
|
+
var PaymentRequiredError = class extends PlaycallerApiError {
|
|
256
|
+
constructor(body, rawResponse) {
|
|
257
|
+
super({
|
|
258
|
+
message: "PaymentRequiredError",
|
|
259
|
+
statusCode: 402,
|
|
260
|
+
body,
|
|
261
|
+
rawResponse
|
|
262
|
+
});
|
|
263
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
264
|
+
if (Error.captureStackTrace) {
|
|
265
|
+
Error.captureStackTrace(this, this.constructor);
|
|
266
|
+
}
|
|
267
|
+
this.name = "PaymentRequiredError";
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
|
|
243
271
|
// api/errors/TooManyRequestsError.ts
|
|
244
272
|
var TooManyRequestsError = class extends PlaycallerApiError {
|
|
245
273
|
constructor(body, rawResponse) {
|
|
@@ -349,7 +377,12 @@ __export(intelligence_exports, {
|
|
|
349
377
|
GetIntelligenceInjuriesRequestSport: () => GetIntelligenceInjuriesRequestSport,
|
|
350
378
|
GetIntelligenceNewsRequestSeverity: () => GetIntelligenceNewsRequestSeverity,
|
|
351
379
|
GetIntelligenceNewsRequestSignalType: () => GetIntelligenceNewsRequestSignalType,
|
|
352
|
-
GetIntelligenceNewsRequestSport: () => GetIntelligenceNewsRequestSport
|
|
380
|
+
GetIntelligenceNewsRequestSport: () => GetIntelligenceNewsRequestSport,
|
|
381
|
+
GetIntelligenceSignalsRequestSeverity: () => GetIntelligenceSignalsRequestSeverity,
|
|
382
|
+
GetIntelligenceSignalsRequestSport: () => GetIntelligenceSignalsRequestSport,
|
|
383
|
+
GetIntelligenceSignalsResponse: () => GetIntelligenceSignalsResponse,
|
|
384
|
+
GetWaiverPriorityRequestSport: () => GetWaiverPriorityRequestSport,
|
|
385
|
+
GetWaiverPriorityResponse: () => GetWaiverPriorityResponse
|
|
353
386
|
});
|
|
354
387
|
|
|
355
388
|
// api/resources/intelligence/types/GetAnalyticsTrendsRequestSport.ts
|
|
@@ -398,37 +431,62 @@ var GetIntelligenceNewsRequestSport = {
|
|
|
398
431
|
All: "all"
|
|
399
432
|
};
|
|
400
433
|
|
|
401
|
-
// api/resources/
|
|
402
|
-
var
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
}
|
|
434
|
+
// api/resources/intelligence/types/GetIntelligenceSignalsRequestSeverity.ts
|
|
435
|
+
var GetIntelligenceSignalsRequestSeverity = {
|
|
436
|
+
High: "high",
|
|
437
|
+
Medium: "medium",
|
|
438
|
+
Low: "low"
|
|
439
|
+
};
|
|
407
440
|
|
|
408
|
-
// api/resources/
|
|
409
|
-
var
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
})(
|
|
441
|
+
// api/resources/intelligence/types/GetIntelligenceSignalsRequestSport.ts
|
|
442
|
+
var GetIntelligenceSignalsRequestSport = {
|
|
443
|
+
Nfl: "nfl",
|
|
444
|
+
Nba: "nba",
|
|
445
|
+
Mlb: "mlb",
|
|
446
|
+
Nhl: "nhl",
|
|
447
|
+
Golf: "golf",
|
|
448
|
+
Soccer: "soccer"
|
|
449
|
+
};
|
|
450
|
+
|
|
451
|
+
// api/resources/intelligence/types/GetIntelligenceSignalsResponse.ts
|
|
452
|
+
var GetIntelligenceSignalsResponse;
|
|
453
|
+
((GetIntelligenceSignalsResponse2) => {
|
|
454
|
+
let Data;
|
|
455
|
+
((Data2) => {
|
|
456
|
+
let Item;
|
|
457
|
+
((Item2) => {
|
|
458
|
+
Item2.Severity = {
|
|
459
|
+
High: "high",
|
|
460
|
+
Medium: "medium",
|
|
461
|
+
Low: "low"
|
|
462
|
+
};
|
|
463
|
+
})(Item = Data2.Item || (Data2.Item = {}));
|
|
464
|
+
})(Data = GetIntelligenceSignalsResponse2.Data || (GetIntelligenceSignalsResponse2.Data = {}));
|
|
465
|
+
})(GetIntelligenceSignalsResponse || (GetIntelligenceSignalsResponse = {}));
|
|
466
|
+
|
|
467
|
+
// api/resources/intelligence/types/GetWaiverPriorityRequestSport.ts
|
|
468
|
+
var GetWaiverPriorityRequestSport = {
|
|
469
|
+
Nfl: "nfl",
|
|
470
|
+
Nba: "nba",
|
|
471
|
+
Mlb: "mlb",
|
|
472
|
+
Nhl: "nhl"
|
|
473
|
+
};
|
|
474
|
+
|
|
475
|
+
// api/resources/intelligence/types/GetWaiverPriorityResponse.ts
|
|
476
|
+
var GetWaiverPriorityResponse;
|
|
477
|
+
((GetWaiverPriorityResponse2) => {
|
|
478
|
+
let WaiverCandidates;
|
|
479
|
+
((WaiverCandidates2) => {
|
|
480
|
+
let Item;
|
|
481
|
+
((Item2) => {
|
|
482
|
+
Item2.Severity = {
|
|
483
|
+
High: "high",
|
|
484
|
+
Medium: "medium",
|
|
485
|
+
Low: "low"
|
|
486
|
+
};
|
|
487
|
+
})(Item = WaiverCandidates2.Item || (WaiverCandidates2.Item = {}));
|
|
488
|
+
})(WaiverCandidates = GetWaiverPriorityResponse2.WaiverCandidates || (GetWaiverPriorityResponse2.WaiverCandidates = {}));
|
|
489
|
+
})(GetWaiverPriorityResponse || (GetWaiverPriorityResponse = {}));
|
|
432
490
|
|
|
433
491
|
// api/resources/mcp/client/requests/InvokeMcpToolRequest.ts
|
|
434
492
|
var InvokeMcpToolRequest;
|
|
@@ -516,17 +574,53 @@ var ListMlbPlayersRequestStatus = {
|
|
|
516
574
|
Inactive: "inactive"
|
|
517
575
|
};
|
|
518
576
|
|
|
577
|
+
// api/resources/multi/client/requests/BatchPlayerSignalsRequest.ts
|
|
578
|
+
var BatchPlayerSignalsRequest;
|
|
579
|
+
((BatchPlayerSignalsRequest2) => {
|
|
580
|
+
let Players;
|
|
581
|
+
((Players2) => {
|
|
582
|
+
let Item;
|
|
583
|
+
((Item2) => {
|
|
584
|
+
Item2.Sport = {
|
|
585
|
+
Nfl: "nfl",
|
|
586
|
+
Mlb: "mlb",
|
|
587
|
+
Nba: "nba",
|
|
588
|
+
Nhl: "nhl",
|
|
589
|
+
Golf: "golf",
|
|
590
|
+
Soccer: "soccer"
|
|
591
|
+
};
|
|
592
|
+
})(Item = Players2.Item || (Players2.Item = {}));
|
|
593
|
+
})(Players = BatchPlayerSignalsRequest2.Players || (BatchPlayerSignalsRequest2.Players = {}));
|
|
594
|
+
})(BatchPlayerSignalsRequest || (BatchPlayerSignalsRequest = {}));
|
|
595
|
+
|
|
596
|
+
// api/resources/multi/client/requests/BatchPlayersRequest.ts
|
|
597
|
+
var BatchPlayersRequest;
|
|
598
|
+
((BatchPlayersRequest2) => {
|
|
599
|
+
let Include;
|
|
600
|
+
((Include2) => {
|
|
601
|
+
Include2.Item = {
|
|
602
|
+
Stats: "stats",
|
|
603
|
+
Injuries: "injuries",
|
|
604
|
+
Anomalies: "anomalies"
|
|
605
|
+
};
|
|
606
|
+
})(Include = BatchPlayersRequest2.Include || (BatchPlayersRequest2.Include = {}));
|
|
607
|
+
})(BatchPlayersRequest || (BatchPlayersRequest = {}));
|
|
608
|
+
|
|
519
609
|
// api/resources/multi/index.ts
|
|
520
610
|
var multi_exports = {};
|
|
521
611
|
__export(multi_exports, {
|
|
612
|
+
BatchPlayerSignalsRequest: () => BatchPlayerSignalsRequest,
|
|
613
|
+
BatchPlayersRequest: () => BatchPlayersRequest,
|
|
522
614
|
ComparePlayersRequestSport: () => ComparePlayersRequestSport,
|
|
523
615
|
GetGamesHistoryRequestSport: () => GetGamesHistoryRequestSport,
|
|
616
|
+
GetOddsHistoryRequestSport: () => GetOddsHistoryRequestSport,
|
|
524
617
|
GetPlayerAlphaMetricsRequestSport: () => GetPlayerAlphaMetricsRequestSport,
|
|
525
618
|
GetPlayerNewsRequestSport: () => GetPlayerNewsRequestSport,
|
|
526
619
|
GetPlayerNewsResponse: () => GetPlayerNewsResponse,
|
|
527
620
|
GetSimilarPlayersRequestSport: () => GetSimilarPlayersRequestSport,
|
|
528
621
|
GetTeamInjuriesRequestSport: () => GetTeamInjuriesRequestSport,
|
|
529
622
|
GetTeamInjuriesResponse: () => GetTeamInjuriesResponse,
|
|
623
|
+
GetTeamRosterPulseRequestSport: () => GetTeamRosterPulseRequestSport,
|
|
530
624
|
GetTeamScheduleRequestSport: () => GetTeamScheduleRequestSport,
|
|
531
625
|
GetTeamScheduleRequestStatus: () => GetTeamScheduleRequestStatus,
|
|
532
626
|
GetTrendingRequestSport: () => GetTrendingRequestSport,
|
|
@@ -549,6 +643,14 @@ var GetGamesHistoryRequestSport = {
|
|
|
549
643
|
Mlb: "mlb"
|
|
550
644
|
};
|
|
551
645
|
|
|
646
|
+
// api/resources/multi/types/GetOddsHistoryRequestSport.ts
|
|
647
|
+
var GetOddsHistoryRequestSport = {
|
|
648
|
+
Nfl: "nfl",
|
|
649
|
+
Nba: "nba",
|
|
650
|
+
Mlb: "mlb",
|
|
651
|
+
Nhl: "nhl"
|
|
652
|
+
};
|
|
653
|
+
|
|
552
654
|
// api/resources/multi/types/GetPlayerAlphaMetricsRequestSport.ts
|
|
553
655
|
var GetPlayerAlphaMetricsRequestSport = {
|
|
554
656
|
Nfl: "nfl",
|
|
@@ -613,6 +715,14 @@ var GetTeamInjuriesResponse;
|
|
|
613
715
|
})(Data = GetTeamInjuriesResponse2.Data || (GetTeamInjuriesResponse2.Data = {}));
|
|
614
716
|
})(GetTeamInjuriesResponse || (GetTeamInjuriesResponse = {}));
|
|
615
717
|
|
|
718
|
+
// api/resources/multi/types/GetTeamRosterPulseRequestSport.ts
|
|
719
|
+
var GetTeamRosterPulseRequestSport = {
|
|
720
|
+
Nfl: "nfl",
|
|
721
|
+
Nba: "nba",
|
|
722
|
+
Mlb: "mlb",
|
|
723
|
+
Nhl: "nhl"
|
|
724
|
+
};
|
|
725
|
+
|
|
616
726
|
// api/resources/multi/types/GetTeamScheduleRequestSport.ts
|
|
617
727
|
var GetTeamScheduleRequestSport = {
|
|
618
728
|
Nfl: "nfl",
|
|
@@ -727,9 +837,25 @@ var ListNbaTeamsRequestConference = {
|
|
|
727
837
|
West: "West"
|
|
728
838
|
};
|
|
729
839
|
|
|
840
|
+
// api/resources/nfl/client/requests/GetNflCustomRankingsRequest.ts
|
|
841
|
+
var GetNflCustomRankingsRequest;
|
|
842
|
+
((GetNflCustomRankingsRequest2) => {
|
|
843
|
+
GetNflCustomRankingsRequest2.Position = {
|
|
844
|
+
Qb: "QB",
|
|
845
|
+
Rb: "RB",
|
|
846
|
+
Wr: "WR",
|
|
847
|
+
Te: "TE",
|
|
848
|
+
K: "K"
|
|
849
|
+
};
|
|
850
|
+
})(GetNflCustomRankingsRequest || (GetNflCustomRankingsRequest = {}));
|
|
851
|
+
|
|
730
852
|
// api/resources/nfl/index.ts
|
|
731
853
|
var nfl_exports = {};
|
|
732
854
|
__export(nfl_exports, {
|
|
855
|
+
GetNflCustomRankingsRequest: () => GetNflCustomRankingsRequest,
|
|
856
|
+
GetNflDepthChartChangesRequestChangeType: () => GetNflDepthChartChangesRequestChangeType,
|
|
857
|
+
GetNflDepthChartChangesRequestPosition: () => GetNflDepthChartChangesRequestPosition,
|
|
858
|
+
GetNflDepthChartChangesResponse: () => GetNflDepthChartChangesResponse,
|
|
733
859
|
GetNflRankingsRequestFormat: () => GetNflRankingsRequestFormat,
|
|
734
860
|
GetNflRankingsRequestPosition: () => GetNflRankingsRequestPosition,
|
|
735
861
|
GetNflRankingsResponse: () => GetNflRankingsResponse,
|
|
@@ -740,6 +866,39 @@ __export(nfl_exports, {
|
|
|
740
866
|
ListNflTeamsRequestConference: () => ListNflTeamsRequestConference
|
|
741
867
|
});
|
|
742
868
|
|
|
869
|
+
// api/resources/nfl/types/GetNflDepthChartChangesRequestChangeType.ts
|
|
870
|
+
var GetNflDepthChartChangesRequestChangeType = {
|
|
871
|
+
Promoted: "promoted",
|
|
872
|
+
Demoted: "demoted",
|
|
873
|
+
Added: "added",
|
|
874
|
+
Removed: "removed"
|
|
875
|
+
};
|
|
876
|
+
|
|
877
|
+
// api/resources/nfl/types/GetNflDepthChartChangesRequestPosition.ts
|
|
878
|
+
var GetNflDepthChartChangesRequestPosition = {
|
|
879
|
+
Qb: "QB",
|
|
880
|
+
Rb: "RB",
|
|
881
|
+
Wr: "WR",
|
|
882
|
+
Te: "TE"
|
|
883
|
+
};
|
|
884
|
+
|
|
885
|
+
// api/resources/nfl/types/GetNflDepthChartChangesResponse.ts
|
|
886
|
+
var GetNflDepthChartChangesResponse;
|
|
887
|
+
((GetNflDepthChartChangesResponse2) => {
|
|
888
|
+
let Data;
|
|
889
|
+
((Data2) => {
|
|
890
|
+
let Item;
|
|
891
|
+
((Item2) => {
|
|
892
|
+
Item2.ChangeType = {
|
|
893
|
+
Promoted: "promoted",
|
|
894
|
+
Demoted: "demoted",
|
|
895
|
+
Added: "added",
|
|
896
|
+
Removed: "removed"
|
|
897
|
+
};
|
|
898
|
+
})(Item = Data2.Item || (Data2.Item = {}));
|
|
899
|
+
})(Data = GetNflDepthChartChangesResponse2.Data || (GetNflDepthChartChangesResponse2.Data = {}));
|
|
900
|
+
})(GetNflDepthChartChangesResponse || (GetNflDepthChartChangesResponse = {}));
|
|
901
|
+
|
|
743
902
|
// api/resources/nfl/types/GetNflRankingsRequestFormat.ts
|
|
744
903
|
var GetNflRankingsRequestFormat = {
|
|
745
904
|
Ppr: "ppr",
|
|
@@ -4225,36 +4384,37 @@ var IntelligenceClient = class {
|
|
|
4225
4384
|
}
|
|
4226
4385
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/analytics/trends");
|
|
4227
4386
|
}
|
|
4228
|
-
};
|
|
4229
|
-
|
|
4230
|
-
// api/resources/leagues/client/Client.ts
|
|
4231
|
-
var LeaguesClient = class {
|
|
4232
|
-
constructor(options = {}) {
|
|
4233
|
-
this._options = normalizeClientOptionsWithAuth(options);
|
|
4234
|
-
}
|
|
4235
4387
|
/**
|
|
4236
|
-
*
|
|
4388
|
+
* Full beat reporter signal feed with sport, severity, and type filters. More flexible than `/intelligence/news` — supports date ranges up to 200 signals, all sports, and granular filtering. Signals are refreshed continuously from ESPN, Reddit, and AI-extracted injury intel.
|
|
4237
4389
|
*
|
|
4238
|
-
* **Tier access:**
|
|
4390
|
+
* **Tier access:** Pro Insights, Syndicate Alpha
|
|
4239
4391
|
*
|
|
4240
|
-
* @param {PlaycallerApi.
|
|
4241
|
-
* @param {
|
|
4392
|
+
* @param {PlaycallerApi.GetIntelligenceSignalsRequest} request
|
|
4393
|
+
* @param {IntelligenceClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
4242
4394
|
*
|
|
4243
4395
|
* @throws {@link PlaycallerApi.UnauthorizedError}
|
|
4244
|
-
* @throws {@link PlaycallerApi.
|
|
4396
|
+
* @throws {@link PlaycallerApi.PaymentRequiredError}
|
|
4245
4397
|
* @throws {@link PlaycallerApi.TooManyRequestsError}
|
|
4246
4398
|
* @throws {@link PlaycallerApi.InternalServerError}
|
|
4247
4399
|
*
|
|
4248
4400
|
* @example
|
|
4249
|
-
* await client.
|
|
4250
|
-
*
|
|
4401
|
+
* await client.intelligence.getIntelligenceSignals({
|
|
4402
|
+
* type: "injury",
|
|
4403
|
+
* since: "2026-07-10"
|
|
4251
4404
|
* })
|
|
4252
4405
|
*/
|
|
4253
|
-
|
|
4254
|
-
return HttpResponsePromise.fromPromise(this.
|
|
4406
|
+
getIntelligenceSignals(request = {}, requestOptions) {
|
|
4407
|
+
return HttpResponsePromise.fromPromise(this.__getIntelligenceSignals(request, requestOptions));
|
|
4255
4408
|
}
|
|
4256
|
-
async
|
|
4257
|
-
const {
|
|
4409
|
+
async __getIntelligenceSignals(request = {}, requestOptions) {
|
|
4410
|
+
const { sport, severity, type: type_, since, limit } = request;
|
|
4411
|
+
const _queryParams = {
|
|
4412
|
+
sport: sport != null ? sport : void 0,
|
|
4413
|
+
severity: severity != null ? severity : void 0,
|
|
4414
|
+
type: type_,
|
|
4415
|
+
since: since != null ? since : void 0,
|
|
4416
|
+
limit
|
|
4417
|
+
};
|
|
4258
4418
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
4259
4419
|
const _headers = mergeHeaders(
|
|
4260
4420
|
_authRequest.headers,
|
|
@@ -4264,11 +4424,11 @@ var LeaguesClient = class {
|
|
|
4264
4424
|
const _response = await fetcher({
|
|
4265
4425
|
url: url_exports.join(
|
|
4266
4426
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
|
|
4267
|
-
|
|
4427
|
+
"v1/intelligence/signals"
|
|
4268
4428
|
),
|
|
4269
4429
|
method: "GET",
|
|
4270
4430
|
headers: _headers,
|
|
4271
|
-
queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
4431
|
+
queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
|
|
4272
4432
|
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
4273
4433
|
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
4274
4434
|
abortSignal: requestOptions?.abortSignal,
|
|
@@ -4288,8 +4448,8 @@ var LeaguesClient = class {
|
|
|
4288
4448
|
_response.error.body,
|
|
4289
4449
|
_response.rawResponse
|
|
4290
4450
|
);
|
|
4291
|
-
case
|
|
4292
|
-
throw new
|
|
4451
|
+
case 402:
|
|
4452
|
+
throw new PaymentRequiredError(
|
|
4293
4453
|
_response.error.body,
|
|
4294
4454
|
_response.rawResponse
|
|
4295
4455
|
);
|
|
@@ -4311,32 +4471,36 @@ var LeaguesClient = class {
|
|
|
4311
4471
|
});
|
|
4312
4472
|
}
|
|
4313
4473
|
}
|
|
4314
|
-
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/
|
|
4474
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/intelligence/signals");
|
|
4315
4475
|
}
|
|
4316
4476
|
/**
|
|
4317
|
-
*
|
|
4477
|
+
* Returns per-week NFL confidence model predictions for a player, including resolved outcomes (actual fantasy points vs. positional median) and rolling hit rate. Useful for validating our model's accuracy on specific players and building ML training pipelines.
|
|
4318
4478
|
*
|
|
4319
|
-
* **Tier access:**
|
|
4479
|
+
* **Tier access:** Pro Insights, Syndicate Alpha
|
|
4320
4480
|
*
|
|
4321
|
-
* @param {PlaycallerApi.
|
|
4322
|
-
* @param {
|
|
4481
|
+
* @param {PlaycallerApi.GetModelPredictionsRequest} request
|
|
4482
|
+
* @param {IntelligenceClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
4323
4483
|
*
|
|
4324
4484
|
* @throws {@link PlaycallerApi.UnauthorizedError}
|
|
4325
|
-
* @throws {@link PlaycallerApi.
|
|
4326
|
-
* @throws {@link PlaycallerApi.NotFoundError}
|
|
4485
|
+
* @throws {@link PlaycallerApi.PaymentRequiredError}
|
|
4327
4486
|
* @throws {@link PlaycallerApi.TooManyRequestsError}
|
|
4328
4487
|
* @throws {@link PlaycallerApi.InternalServerError}
|
|
4329
4488
|
*
|
|
4330
4489
|
* @example
|
|
4331
|
-
* await client.
|
|
4332
|
-
*
|
|
4490
|
+
* await client.intelligence.getModelPredictions({
|
|
4491
|
+
* playerId: "playerId"
|
|
4333
4492
|
* })
|
|
4334
4493
|
*/
|
|
4335
|
-
|
|
4336
|
-
return HttpResponsePromise.fromPromise(this.
|
|
4494
|
+
getModelPredictions(request, requestOptions) {
|
|
4495
|
+
return HttpResponsePromise.fromPromise(this.__getModelPredictions(request, requestOptions));
|
|
4337
4496
|
}
|
|
4338
|
-
async
|
|
4339
|
-
const {
|
|
4497
|
+
async __getModelPredictions(request, requestOptions) {
|
|
4498
|
+
const { playerId, limit, season, model_type: modelType } = request;
|
|
4499
|
+
const _queryParams = {
|
|
4500
|
+
limit,
|
|
4501
|
+
season,
|
|
4502
|
+
model_type: modelType
|
|
4503
|
+
};
|
|
4340
4504
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
4341
4505
|
const _headers = mergeHeaders(
|
|
4342
4506
|
_authRequest.headers,
|
|
@@ -4346,11 +4510,11 @@ var LeaguesClient = class {
|
|
|
4346
4510
|
const _response = await fetcher({
|
|
4347
4511
|
url: url_exports.join(
|
|
4348
4512
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
|
|
4349
|
-
`v1/
|
|
4513
|
+
`v1/model/predictions/${url_exports.encodePathParam(playerId)}`
|
|
4350
4514
|
),
|
|
4351
4515
|
method: "GET",
|
|
4352
4516
|
headers: _headers,
|
|
4353
|
-
queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
4517
|
+
queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
|
|
4354
4518
|
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
4355
4519
|
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
4356
4520
|
abortSignal: requestOptions?.abortSignal,
|
|
@@ -4370,13 +4534,11 @@ var LeaguesClient = class {
|
|
|
4370
4534
|
_response.error.body,
|
|
4371
4535
|
_response.rawResponse
|
|
4372
4536
|
);
|
|
4373
|
-
case
|
|
4374
|
-
throw new
|
|
4537
|
+
case 402:
|
|
4538
|
+
throw new PaymentRequiredError(
|
|
4375
4539
|
_response.error.body,
|
|
4376
4540
|
_response.rawResponse
|
|
4377
4541
|
);
|
|
4378
|
-
case 404:
|
|
4379
|
-
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
4380
4542
|
case 429:
|
|
4381
4543
|
throw new TooManyRequestsError(
|
|
4382
4544
|
_response.error.body,
|
|
@@ -4399,35 +4561,37 @@ var LeaguesClient = class {
|
|
|
4399
4561
|
_response.error,
|
|
4400
4562
|
_response.rawResponse,
|
|
4401
4563
|
"GET",
|
|
4402
|
-
"/v1/
|
|
4564
|
+
"/v1/model/predictions/{playerId}"
|
|
4403
4565
|
);
|
|
4404
4566
|
}
|
|
4405
4567
|
/**
|
|
4406
|
-
*
|
|
4568
|
+
* Returns a ranked list of waiver-eligible players ordered by anomaly signal strength. Combines usage spikes, snap-share shifts, and target-rate anomalies into a single priority score — no client-side merging required. Optionally excludes injured players.
|
|
4407
4569
|
*
|
|
4408
|
-
* **Tier access:** Pro Insights, Syndicate Alpha
|
|
4570
|
+
* **Tier access:** Growth, Pro Insights, Syndicate Alpha
|
|
4409
4571
|
*
|
|
4410
|
-
* @param {PlaycallerApi.
|
|
4411
|
-
* @param {
|
|
4572
|
+
* @param {PlaycallerApi.GetWaiverPriorityRequest} request
|
|
4573
|
+
* @param {IntelligenceClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
4412
4574
|
*
|
|
4413
|
-
* @throws {@link PlaycallerApi.BadRequestError}
|
|
4414
4575
|
* @throws {@link PlaycallerApi.UnauthorizedError}
|
|
4415
|
-
* @throws {@link PlaycallerApi.
|
|
4576
|
+
* @throws {@link PlaycallerApi.PaymentRequiredError}
|
|
4416
4577
|
* @throws {@link PlaycallerApi.TooManyRequestsError}
|
|
4417
4578
|
* @throws {@link PlaycallerApi.InternalServerError}
|
|
4418
4579
|
*
|
|
4419
4580
|
* @example
|
|
4420
|
-
* await client.
|
|
4421
|
-
*
|
|
4422
|
-
* give: ["pc_nfl_2374"],
|
|
4423
|
-
* get: ["pc_nfl_4046"]
|
|
4581
|
+
* await client.intelligence.getWaiverPriority({
|
|
4582
|
+
* sport: "nfl"
|
|
4424
4583
|
* })
|
|
4425
4584
|
*/
|
|
4426
|
-
|
|
4427
|
-
return HttpResponsePromise.fromPromise(this.
|
|
4585
|
+
getWaiverPriority(request, requestOptions) {
|
|
4586
|
+
return HttpResponsePromise.fromPromise(this.__getWaiverPriority(request, requestOptions));
|
|
4428
4587
|
}
|
|
4429
|
-
async
|
|
4430
|
-
const {
|
|
4588
|
+
async __getWaiverPriority(request, requestOptions) {
|
|
4589
|
+
const { sport, limit, position, exclude_injured: excludeInjured } = request;
|
|
4590
|
+
const _queryParams = {
|
|
4591
|
+
limit,
|
|
4592
|
+
position,
|
|
4593
|
+
exclude_injured: excludeInjured
|
|
4594
|
+
};
|
|
4431
4595
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
4432
4596
|
const _headers = mergeHeaders(
|
|
4433
4597
|
_authRequest.headers,
|
|
@@ -4437,14 +4601,11 @@ var LeaguesClient = class {
|
|
|
4437
4601
|
const _response = await fetcher({
|
|
4438
4602
|
url: url_exports.join(
|
|
4439
4603
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
|
|
4440
|
-
`v1
|
|
4604
|
+
`v1/${url_exports.encodePathParam(sport)}/waiver-priority`
|
|
4441
4605
|
),
|
|
4442
|
-
method: "
|
|
4606
|
+
method: "GET",
|
|
4443
4607
|
headers: _headers,
|
|
4444
|
-
|
|
4445
|
-
queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
4446
|
-
requestType: "json",
|
|
4447
|
-
body: _body,
|
|
4608
|
+
queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
|
|
4448
4609
|
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
4449
4610
|
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
4450
4611
|
abortSignal: requestOptions?.abortSignal,
|
|
@@ -4452,19 +4613,20 @@ var LeaguesClient = class {
|
|
|
4452
4613
|
logging: this._options.logging
|
|
4453
4614
|
});
|
|
4454
4615
|
if (_response.ok) {
|
|
4455
|
-
return {
|
|
4616
|
+
return {
|
|
4617
|
+
data: _response.body,
|
|
4618
|
+
rawResponse: _response.rawResponse
|
|
4619
|
+
};
|
|
4456
4620
|
}
|
|
4457
4621
|
if (_response.error.reason === "status-code") {
|
|
4458
4622
|
switch (_response.error.statusCode) {
|
|
4459
|
-
case 400:
|
|
4460
|
-
throw new BadRequestError(_response.error.body, _response.rawResponse);
|
|
4461
4623
|
case 401:
|
|
4462
4624
|
throw new UnauthorizedError(
|
|
4463
4625
|
_response.error.body,
|
|
4464
4626
|
_response.rawResponse
|
|
4465
4627
|
);
|
|
4466
|
-
case
|
|
4467
|
-
throw new
|
|
4628
|
+
case 402:
|
|
4629
|
+
throw new PaymentRequiredError(
|
|
4468
4630
|
_response.error.body,
|
|
4469
4631
|
_response.rawResponse
|
|
4470
4632
|
);
|
|
@@ -4486,12 +4648,7 @@ var LeaguesClient = class {
|
|
|
4486
4648
|
});
|
|
4487
4649
|
}
|
|
4488
4650
|
}
|
|
4489
|
-
return handleNonStatusCodeError(
|
|
4490
|
-
_response.error,
|
|
4491
|
-
_response.rawResponse,
|
|
4492
|
-
"POST",
|
|
4493
|
-
"/v1/leagues/{leagueId}/trade/evaluate"
|
|
4494
|
-
);
|
|
4651
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/{sport}/waiver-priority");
|
|
4495
4652
|
}
|
|
4496
4653
|
};
|
|
4497
4654
|
|
|
@@ -5446,6 +5603,94 @@ var MlbClient = class {
|
|
|
5446
5603
|
}
|
|
5447
5604
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/mlb/scoring/categories");
|
|
5448
5605
|
}
|
|
5606
|
+
/**
|
|
5607
|
+
* Recent MLB roster transactions including IL placements/activations, DFA designations, trade acquisitions, and minor-league call-ups. Sourced from MLB Stats API (statsapi.mlb.com). Cached 1 hour.
|
|
5608
|
+
*
|
|
5609
|
+
* **Tier access:** Build, Growth, Pro Insights, Syndicate Alpha
|
|
5610
|
+
*
|
|
5611
|
+
* @param {PlaycallerApi.GetMlbTransactionsRequest} request
|
|
5612
|
+
* @param {MlbClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
5613
|
+
*
|
|
5614
|
+
* @throws {@link PlaycallerApi.UnauthorizedError}
|
|
5615
|
+
* @throws {@link PlaycallerApi.PaymentRequiredError}
|
|
5616
|
+
* @throws {@link PlaycallerApi.TooManyRequestsError}
|
|
5617
|
+
* @throws {@link PlaycallerApi.InternalServerError}
|
|
5618
|
+
*
|
|
5619
|
+
* @example
|
|
5620
|
+
* await client.mlb.getMlbTransactions({
|
|
5621
|
+
* startDate: "2026-07-10",
|
|
5622
|
+
* endDate: "2026-07-17",
|
|
5623
|
+
* type: "IL"
|
|
5624
|
+
* })
|
|
5625
|
+
*/
|
|
5626
|
+
getMlbTransactions(request = {}, requestOptions) {
|
|
5627
|
+
return HttpResponsePromise.fromPromise(this.__getMlbTransactions(request, requestOptions));
|
|
5628
|
+
}
|
|
5629
|
+
async __getMlbTransactions(request = {}, requestOptions) {
|
|
5630
|
+
const { startDate, endDate, type: type_ } = request;
|
|
5631
|
+
const _queryParams = {
|
|
5632
|
+
startDate: startDate != null ? startDate : void 0,
|
|
5633
|
+
endDate: endDate != null ? endDate : void 0,
|
|
5634
|
+
type: type_
|
|
5635
|
+
};
|
|
5636
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
5637
|
+
const _headers = mergeHeaders(
|
|
5638
|
+
_authRequest.headers,
|
|
5639
|
+
this._options?.headers,
|
|
5640
|
+
requestOptions?.headers
|
|
5641
|
+
);
|
|
5642
|
+
const _response = await fetcher({
|
|
5643
|
+
url: url_exports.join(
|
|
5644
|
+
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
|
|
5645
|
+
"v1/mlb/transactions"
|
|
5646
|
+
),
|
|
5647
|
+
method: "GET",
|
|
5648
|
+
headers: _headers,
|
|
5649
|
+
queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
|
|
5650
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
5651
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
5652
|
+
abortSignal: requestOptions?.abortSignal,
|
|
5653
|
+
fetchFn: this._options?.fetch,
|
|
5654
|
+
logging: this._options.logging
|
|
5655
|
+
});
|
|
5656
|
+
if (_response.ok) {
|
|
5657
|
+
return {
|
|
5658
|
+
data: _response.body,
|
|
5659
|
+
rawResponse: _response.rawResponse
|
|
5660
|
+
};
|
|
5661
|
+
}
|
|
5662
|
+
if (_response.error.reason === "status-code") {
|
|
5663
|
+
switch (_response.error.statusCode) {
|
|
5664
|
+
case 401:
|
|
5665
|
+
throw new UnauthorizedError(
|
|
5666
|
+
_response.error.body,
|
|
5667
|
+
_response.rawResponse
|
|
5668
|
+
);
|
|
5669
|
+
case 402:
|
|
5670
|
+
throw new PaymentRequiredError(
|
|
5671
|
+
_response.error.body,
|
|
5672
|
+
_response.rawResponse
|
|
5673
|
+
);
|
|
5674
|
+
case 429:
|
|
5675
|
+
throw new TooManyRequestsError(
|
|
5676
|
+
_response.error.body,
|
|
5677
|
+
_response.rawResponse
|
|
5678
|
+
);
|
|
5679
|
+
case 500:
|
|
5680
|
+
throw new InternalServerError(
|
|
5681
|
+
_response.error.body,
|
|
5682
|
+
_response.rawResponse
|
|
5683
|
+
);
|
|
5684
|
+
default:
|
|
5685
|
+
throw new PlaycallerApiError({
|
|
5686
|
+
statusCode: _response.error.statusCode,
|
|
5687
|
+
body: _response.error.body,
|
|
5688
|
+
rawResponse: _response.rawResponse
|
|
5689
|
+
});
|
|
5690
|
+
}
|
|
5691
|
+
}
|
|
5692
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/mlb/transactions");
|
|
5693
|
+
}
|
|
5449
5694
|
};
|
|
5450
5695
|
|
|
5451
5696
|
// api/resources/multi/client/Client.ts
|
|
@@ -5653,31 +5898,30 @@ var MultiClient = class {
|
|
|
5653
5898
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/players/similar/{id}");
|
|
5654
5899
|
}
|
|
5655
5900
|
/**
|
|
5656
|
-
* Returns
|
|
5901
|
+
* Returns a paginated, time-ordered audit trail of key management events (key rotation, IP allowlist changes) and administrative actions associated with your API key. Rolling 90-day retention.
|
|
5657
5902
|
*
|
|
5658
|
-
* **Tier access:**
|
|
5903
|
+
* **Tier access:** Build, Growth, Pro Insights, Syndicate Alpha
|
|
5659
5904
|
*
|
|
5660
|
-
* @param {PlaycallerApi.
|
|
5905
|
+
* @param {PlaycallerApi.GetAuditEventsRequest} request
|
|
5661
5906
|
* @param {MultiClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
5662
5907
|
*
|
|
5663
5908
|
* @throws {@link PlaycallerApi.UnauthorizedError}
|
|
5664
|
-
* @throws {@link PlaycallerApi.
|
|
5909
|
+
* @throws {@link PlaycallerApi.PaymentRequiredError}
|
|
5665
5910
|
* @throws {@link PlaycallerApi.TooManyRequestsError}
|
|
5666
5911
|
* @throws {@link PlaycallerApi.InternalServerError}
|
|
5667
5912
|
*
|
|
5668
5913
|
* @example
|
|
5669
|
-
* await client.multi.
|
|
5670
|
-
* sport: "nfl",
|
|
5671
|
-
* id: "pc_nfl_001234"
|
|
5672
|
-
* })
|
|
5914
|
+
* await client.multi.getAuditEvents()
|
|
5673
5915
|
*/
|
|
5674
|
-
|
|
5675
|
-
return HttpResponsePromise.fromPromise(this.
|
|
5916
|
+
getAuditEvents(request = {}, requestOptions) {
|
|
5917
|
+
return HttpResponsePromise.fromPromise(this.__getAuditEvents(request, requestOptions));
|
|
5676
5918
|
}
|
|
5677
|
-
async
|
|
5678
|
-
const {
|
|
5919
|
+
async __getAuditEvents(request = {}, requestOptions) {
|
|
5920
|
+
const { limit, before, action } = request;
|
|
5679
5921
|
const _queryParams = {
|
|
5680
|
-
limit
|
|
5922
|
+
limit,
|
|
5923
|
+
before: before != null ? before : void 0,
|
|
5924
|
+
action
|
|
5681
5925
|
};
|
|
5682
5926
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
5683
5927
|
const _headers = mergeHeaders(
|
|
@@ -5688,7 +5932,7 @@ var MultiClient = class {
|
|
|
5688
5932
|
const _response = await fetcher({
|
|
5689
5933
|
url: url_exports.join(
|
|
5690
5934
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
|
|
5691
|
-
|
|
5935
|
+
"v1/audit/events"
|
|
5692
5936
|
),
|
|
5693
5937
|
method: "GET",
|
|
5694
5938
|
headers: _headers,
|
|
@@ -5709,8 +5953,11 @@ var MultiClient = class {
|
|
|
5709
5953
|
_response.error.body,
|
|
5710
5954
|
_response.rawResponse
|
|
5711
5955
|
);
|
|
5712
|
-
case
|
|
5713
|
-
throw new
|
|
5956
|
+
case 402:
|
|
5957
|
+
throw new PaymentRequiredError(
|
|
5958
|
+
_response.error.body,
|
|
5959
|
+
_response.rawResponse
|
|
5960
|
+
);
|
|
5714
5961
|
case 429:
|
|
5715
5962
|
throw new TooManyRequestsError(
|
|
5716
5963
|
_response.error.body,
|
|
@@ -5729,34 +5976,35 @@ var MultiClient = class {
|
|
|
5729
5976
|
});
|
|
5730
5977
|
}
|
|
5731
5978
|
}
|
|
5732
|
-
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/
|
|
5979
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/audit/events");
|
|
5733
5980
|
}
|
|
5734
5981
|
/**
|
|
5735
|
-
*
|
|
5982
|
+
* Fetch ML signals for up to 25 players in a single request. Returns confidence score, confidence tier, alpha metrics, and ADP for each player. Each player in the batch counts as one call against your daily limit.
|
|
5736
5983
|
*
|
|
5737
|
-
*
|
|
5984
|
+
* Supported sports for confidence: NFL, MLB, NBA, NHL. Golf and Soccer return `confidence_score: null` (no validated model).
|
|
5738
5985
|
*
|
|
5739
|
-
*
|
|
5986
|
+
* **Tier access:** Pro Insights, Syndicate Alpha
|
|
5987
|
+
*
|
|
5988
|
+
* @param {PlaycallerApi.BatchPlayerSignalsRequest} request
|
|
5740
5989
|
* @param {MultiClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
5741
5990
|
*
|
|
5742
5991
|
* @throws {@link PlaycallerApi.UnauthorizedError}
|
|
5992
|
+
* @throws {@link PlaycallerApi.PaymentRequiredError}
|
|
5743
5993
|
* @throws {@link PlaycallerApi.TooManyRequestsError}
|
|
5744
5994
|
* @throws {@link PlaycallerApi.InternalServerError}
|
|
5745
5995
|
*
|
|
5746
5996
|
* @example
|
|
5747
|
-
* await client.multi.
|
|
5748
|
-
*
|
|
5749
|
-
*
|
|
5997
|
+
* await client.multi.batchPlayerSignals({
|
|
5998
|
+
* players: [{
|
|
5999
|
+
* player_id: "pc_nfl_001234",
|
|
6000
|
+
* sport: "nfl"
|
|
6001
|
+
* }]
|
|
5750
6002
|
* })
|
|
5751
6003
|
*/
|
|
5752
|
-
|
|
5753
|
-
return HttpResponsePromise.fromPromise(this.
|
|
6004
|
+
batchPlayerSignals(request, requestOptions) {
|
|
6005
|
+
return HttpResponsePromise.fromPromise(this.__batchPlayerSignals(request, requestOptions));
|
|
5754
6006
|
}
|
|
5755
|
-
async
|
|
5756
|
-
const { sport, team, limit } = request;
|
|
5757
|
-
const _queryParams = {
|
|
5758
|
-
limit
|
|
5759
|
-
};
|
|
6007
|
+
async __batchPlayerSignals(request, requestOptions) {
|
|
5760
6008
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
5761
6009
|
const _headers = mergeHeaders(
|
|
5762
6010
|
_authRequest.headers,
|
|
@@ -5766,9 +6014,432 @@ var MultiClient = class {
|
|
|
5766
6014
|
const _response = await fetcher({
|
|
5767
6015
|
url: url_exports.join(
|
|
5768
6016
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
|
|
5769
|
-
|
|
6017
|
+
"v1/batch/signals"
|
|
5770
6018
|
),
|
|
5771
|
-
method: "
|
|
6019
|
+
method: "POST",
|
|
6020
|
+
headers: _headers,
|
|
6021
|
+
contentType: "application/json",
|
|
6022
|
+
queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
6023
|
+
requestType: "json",
|
|
6024
|
+
body: request,
|
|
6025
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
6026
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
6027
|
+
abortSignal: requestOptions?.abortSignal,
|
|
6028
|
+
fetchFn: this._options?.fetch,
|
|
6029
|
+
logging: this._options.logging
|
|
6030
|
+
});
|
|
6031
|
+
if (_response.ok) {
|
|
6032
|
+
return {
|
|
6033
|
+
data: _response.body,
|
|
6034
|
+
rawResponse: _response.rawResponse
|
|
6035
|
+
};
|
|
6036
|
+
}
|
|
6037
|
+
if (_response.error.reason === "status-code") {
|
|
6038
|
+
switch (_response.error.statusCode) {
|
|
6039
|
+
case 401:
|
|
6040
|
+
throw new UnauthorizedError(
|
|
6041
|
+
_response.error.body,
|
|
6042
|
+
_response.rawResponse
|
|
6043
|
+
);
|
|
6044
|
+
case 402:
|
|
6045
|
+
throw new PaymentRequiredError(
|
|
6046
|
+
_response.error.body,
|
|
6047
|
+
_response.rawResponse
|
|
6048
|
+
);
|
|
6049
|
+
case 429:
|
|
6050
|
+
throw new TooManyRequestsError(
|
|
6051
|
+
_response.error.body,
|
|
6052
|
+
_response.rawResponse
|
|
6053
|
+
);
|
|
6054
|
+
case 500:
|
|
6055
|
+
throw new InternalServerError(
|
|
6056
|
+
_response.error.body,
|
|
6057
|
+
_response.rawResponse
|
|
6058
|
+
);
|
|
6059
|
+
default:
|
|
6060
|
+
throw new PlaycallerApiError({
|
|
6061
|
+
statusCode: _response.error.statusCode,
|
|
6062
|
+
body: _response.error.body,
|
|
6063
|
+
rawResponse: _response.rawResponse
|
|
6064
|
+
});
|
|
6065
|
+
}
|
|
6066
|
+
}
|
|
6067
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/batch/signals");
|
|
6068
|
+
}
|
|
6069
|
+
/**
|
|
6070
|
+
* Returns all captured odds snapshots for a specific game, ordered chronologically. Useful for detecting line movement, sharp action, and steam moves. History depth depends on how early the game was tracked.
|
|
6071
|
+
*
|
|
6072
|
+
* **Tier access:** Pro Insights, Syndicate Alpha
|
|
6073
|
+
*
|
|
6074
|
+
* @param {PlaycallerApi.GetOddsHistoryRequest} request
|
|
6075
|
+
* @param {MultiClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
6076
|
+
*
|
|
6077
|
+
* @throws {@link PlaycallerApi.UnauthorizedError}
|
|
6078
|
+
* @throws {@link PlaycallerApi.PaymentRequiredError}
|
|
6079
|
+
* @throws {@link PlaycallerApi.NotFoundError}
|
|
6080
|
+
* @throws {@link PlaycallerApi.TooManyRequestsError}
|
|
6081
|
+
* @throws {@link PlaycallerApi.InternalServerError}
|
|
6082
|
+
*
|
|
6083
|
+
* @example
|
|
6084
|
+
* await client.multi.getOddsHistory({
|
|
6085
|
+
* sport: "nfl",
|
|
6086
|
+
* gameId: "abc12345"
|
|
6087
|
+
* })
|
|
6088
|
+
*/
|
|
6089
|
+
getOddsHistory(request, requestOptions) {
|
|
6090
|
+
return HttpResponsePromise.fromPromise(this.__getOddsHistory(request, requestOptions));
|
|
6091
|
+
}
|
|
6092
|
+
async __getOddsHistory(request, requestOptions) {
|
|
6093
|
+
const { sport, gameId } = request;
|
|
6094
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
6095
|
+
const _headers = mergeHeaders(
|
|
6096
|
+
_authRequest.headers,
|
|
6097
|
+
this._options?.headers,
|
|
6098
|
+
requestOptions?.headers
|
|
6099
|
+
);
|
|
6100
|
+
const _response = await fetcher({
|
|
6101
|
+
url: url_exports.join(
|
|
6102
|
+
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
|
|
6103
|
+
`v1/${url_exports.encodePathParam(sport)}/odds/history/${url_exports.encodePathParam(gameId)}`
|
|
6104
|
+
),
|
|
6105
|
+
method: "GET",
|
|
6106
|
+
headers: _headers,
|
|
6107
|
+
queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
6108
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
6109
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
6110
|
+
abortSignal: requestOptions?.abortSignal,
|
|
6111
|
+
fetchFn: this._options?.fetch,
|
|
6112
|
+
logging: this._options.logging
|
|
6113
|
+
});
|
|
6114
|
+
if (_response.ok) {
|
|
6115
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
6116
|
+
}
|
|
6117
|
+
if (_response.error.reason === "status-code") {
|
|
6118
|
+
switch (_response.error.statusCode) {
|
|
6119
|
+
case 401:
|
|
6120
|
+
throw new UnauthorizedError(
|
|
6121
|
+
_response.error.body,
|
|
6122
|
+
_response.rawResponse
|
|
6123
|
+
);
|
|
6124
|
+
case 402:
|
|
6125
|
+
throw new PaymentRequiredError(
|
|
6126
|
+
_response.error.body,
|
|
6127
|
+
_response.rawResponse
|
|
6128
|
+
);
|
|
6129
|
+
case 404:
|
|
6130
|
+
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
6131
|
+
case 429:
|
|
6132
|
+
throw new TooManyRequestsError(
|
|
6133
|
+
_response.error.body,
|
|
6134
|
+
_response.rawResponse
|
|
6135
|
+
);
|
|
6136
|
+
case 500:
|
|
6137
|
+
throw new InternalServerError(
|
|
6138
|
+
_response.error.body,
|
|
6139
|
+
_response.rawResponse
|
|
6140
|
+
);
|
|
6141
|
+
default:
|
|
6142
|
+
throw new PlaycallerApiError({
|
|
6143
|
+
statusCode: _response.error.statusCode,
|
|
6144
|
+
body: _response.error.body,
|
|
6145
|
+
rawResponse: _response.rawResponse
|
|
6146
|
+
});
|
|
6147
|
+
}
|
|
6148
|
+
}
|
|
6149
|
+
return handleNonStatusCodeError(
|
|
6150
|
+
_response.error,
|
|
6151
|
+
_response.rawResponse,
|
|
6152
|
+
"GET",
|
|
6153
|
+
"/v1/{sport}/odds/history/{gameId}"
|
|
6154
|
+
);
|
|
6155
|
+
}
|
|
6156
|
+
/**
|
|
6157
|
+
* Single-call team lineup intelligence: returns the current roster, recent injury updates, depth chart changes (NFL only), and active anomaly signals for any player on the team. Aggregates 4 data sources in one request. Counts as 4 requests toward your rate limit (`X-PC-Request-Weight: 4` response header).
|
|
6158
|
+
*
|
|
6159
|
+
* **Tier access:** Growth, Pro Insights, Syndicate Alpha
|
|
6160
|
+
*
|
|
6161
|
+
* @param {PlaycallerApi.GetTeamRosterPulseRequest} request
|
|
6162
|
+
* @param {MultiClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
6163
|
+
*
|
|
6164
|
+
* @throws {@link PlaycallerApi.UnauthorizedError}
|
|
6165
|
+
* @throws {@link PlaycallerApi.PaymentRequiredError}
|
|
6166
|
+
* @throws {@link PlaycallerApi.TooManyRequestsError}
|
|
6167
|
+
* @throws {@link PlaycallerApi.InternalServerError}
|
|
6168
|
+
*
|
|
6169
|
+
* @example
|
|
6170
|
+
* await client.multi.getTeamRosterPulse({
|
|
6171
|
+
* sport: "nfl",
|
|
6172
|
+
* team: "KC"
|
|
6173
|
+
* })
|
|
6174
|
+
*/
|
|
6175
|
+
getTeamRosterPulse(request, requestOptions) {
|
|
6176
|
+
return HttpResponsePromise.fromPromise(this.__getTeamRosterPulse(request, requestOptions));
|
|
6177
|
+
}
|
|
6178
|
+
async __getTeamRosterPulse(request, requestOptions) {
|
|
6179
|
+
const { sport, team } = request;
|
|
6180
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
6181
|
+
const _headers = mergeHeaders(
|
|
6182
|
+
_authRequest.headers,
|
|
6183
|
+
this._options?.headers,
|
|
6184
|
+
requestOptions?.headers
|
|
6185
|
+
);
|
|
6186
|
+
const _response = await fetcher({
|
|
6187
|
+
url: url_exports.join(
|
|
6188
|
+
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
|
|
6189
|
+
`v1/${url_exports.encodePathParam(sport)}/teams/${url_exports.encodePathParam(team)}/roster-pulse`
|
|
6190
|
+
),
|
|
6191
|
+
method: "GET",
|
|
6192
|
+
headers: _headers,
|
|
6193
|
+
queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
6194
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
6195
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
6196
|
+
abortSignal: requestOptions?.abortSignal,
|
|
6197
|
+
fetchFn: this._options?.fetch,
|
|
6198
|
+
logging: this._options.logging
|
|
6199
|
+
});
|
|
6200
|
+
if (_response.ok) {
|
|
6201
|
+
return {
|
|
6202
|
+
data: _response.body,
|
|
6203
|
+
rawResponse: _response.rawResponse
|
|
6204
|
+
};
|
|
6205
|
+
}
|
|
6206
|
+
if (_response.error.reason === "status-code") {
|
|
6207
|
+
switch (_response.error.statusCode) {
|
|
6208
|
+
case 401:
|
|
6209
|
+
throw new UnauthorizedError(
|
|
6210
|
+
_response.error.body,
|
|
6211
|
+
_response.rawResponse
|
|
6212
|
+
);
|
|
6213
|
+
case 402:
|
|
6214
|
+
throw new PaymentRequiredError(
|
|
6215
|
+
_response.error.body,
|
|
6216
|
+
_response.rawResponse
|
|
6217
|
+
);
|
|
6218
|
+
case 429:
|
|
6219
|
+
throw new TooManyRequestsError(
|
|
6220
|
+
_response.error.body,
|
|
6221
|
+
_response.rawResponse
|
|
6222
|
+
);
|
|
6223
|
+
case 500:
|
|
6224
|
+
throw new InternalServerError(
|
|
6225
|
+
_response.error.body,
|
|
6226
|
+
_response.rawResponse
|
|
6227
|
+
);
|
|
6228
|
+
default:
|
|
6229
|
+
throw new PlaycallerApiError({
|
|
6230
|
+
statusCode: _response.error.statusCode,
|
|
6231
|
+
body: _response.error.body,
|
|
6232
|
+
rawResponse: _response.rawResponse
|
|
6233
|
+
});
|
|
6234
|
+
}
|
|
6235
|
+
}
|
|
6236
|
+
return handleNonStatusCodeError(
|
|
6237
|
+
_response.error,
|
|
6238
|
+
_response.rawResponse,
|
|
6239
|
+
"GET",
|
|
6240
|
+
"/v1/{sport}/teams/{team}/roster-pulse"
|
|
6241
|
+
);
|
|
6242
|
+
}
|
|
6243
|
+
/**
|
|
6244
|
+
* Fetch profile, stats, and optional injury/anomaly data for up to 50 players in a single API call. Reduces round-trips for clients that need to hydrate a lineup, compare a watchlist, or build a dashboard.
|
|
6245
|
+
*
|
|
6246
|
+
* **Tier access:** Growth, Pro Insights, Syndicate Alpha
|
|
6247
|
+
*
|
|
6248
|
+
* @param {PlaycallerApi.BatchPlayersRequest} request
|
|
6249
|
+
* @param {MultiClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
6250
|
+
*
|
|
6251
|
+
* @throws {@link PlaycallerApi.BadRequestError}
|
|
6252
|
+
* @throws {@link PlaycallerApi.UnauthorizedError}
|
|
6253
|
+
* @throws {@link PlaycallerApi.PaymentRequiredError}
|
|
6254
|
+
* @throws {@link PlaycallerApi.TooManyRequestsError}
|
|
6255
|
+
* @throws {@link PlaycallerApi.InternalServerError}
|
|
6256
|
+
*
|
|
6257
|
+
* @example
|
|
6258
|
+
* await client.multi.batchPlayers({
|
|
6259
|
+
* player_ids: ["nfl_001234", "nfl_005678"]
|
|
6260
|
+
* })
|
|
6261
|
+
*/
|
|
6262
|
+
batchPlayers(request, requestOptions) {
|
|
6263
|
+
return HttpResponsePromise.fromPromise(this.__batchPlayers(request, requestOptions));
|
|
6264
|
+
}
|
|
6265
|
+
async __batchPlayers(request, requestOptions) {
|
|
6266
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
6267
|
+
const _headers = mergeHeaders(
|
|
6268
|
+
_authRequest.headers,
|
|
6269
|
+
this._options?.headers,
|
|
6270
|
+
requestOptions?.headers
|
|
6271
|
+
);
|
|
6272
|
+
const _response = await fetcher({
|
|
6273
|
+
url: url_exports.join(
|
|
6274
|
+
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
|
|
6275
|
+
"v1/batch/players"
|
|
6276
|
+
),
|
|
6277
|
+
method: "POST",
|
|
6278
|
+
headers: _headers,
|
|
6279
|
+
contentType: "application/json",
|
|
6280
|
+
queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
6281
|
+
requestType: "json",
|
|
6282
|
+
body: request,
|
|
6283
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
6284
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
6285
|
+
abortSignal: requestOptions?.abortSignal,
|
|
6286
|
+
fetchFn: this._options?.fetch,
|
|
6287
|
+
logging: this._options.logging
|
|
6288
|
+
});
|
|
6289
|
+
if (_response.ok) {
|
|
6290
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
6291
|
+
}
|
|
6292
|
+
if (_response.error.reason === "status-code") {
|
|
6293
|
+
switch (_response.error.statusCode) {
|
|
6294
|
+
case 400:
|
|
6295
|
+
throw new BadRequestError(_response.error.body, _response.rawResponse);
|
|
6296
|
+
case 401:
|
|
6297
|
+
throw new UnauthorizedError(
|
|
6298
|
+
_response.error.body,
|
|
6299
|
+
_response.rawResponse
|
|
6300
|
+
);
|
|
6301
|
+
case 402:
|
|
6302
|
+
throw new PaymentRequiredError(
|
|
6303
|
+
_response.error.body,
|
|
6304
|
+
_response.rawResponse
|
|
6305
|
+
);
|
|
6306
|
+
case 429:
|
|
6307
|
+
throw new TooManyRequestsError(
|
|
6308
|
+
_response.error.body,
|
|
6309
|
+
_response.rawResponse
|
|
6310
|
+
);
|
|
6311
|
+
case 500:
|
|
6312
|
+
throw new InternalServerError(
|
|
6313
|
+
_response.error.body,
|
|
6314
|
+
_response.rawResponse
|
|
6315
|
+
);
|
|
6316
|
+
default:
|
|
6317
|
+
throw new PlaycallerApiError({
|
|
6318
|
+
statusCode: _response.error.statusCode,
|
|
6319
|
+
body: _response.error.body,
|
|
6320
|
+
rawResponse: _response.rawResponse
|
|
6321
|
+
});
|
|
6322
|
+
}
|
|
6323
|
+
}
|
|
6324
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/batch/players");
|
|
6325
|
+
}
|
|
6326
|
+
/**
|
|
6327
|
+
* Returns active beat reporter signals and injury reports for a specific player. Works across NFL, MLB, NBA, NHL, and all covered sports. Signals are refreshed every 2 hours.
|
|
6328
|
+
*
|
|
6329
|
+
* **Tier access:** Developer Sandbox, Build, Growth, Pro Insights, Syndicate Alpha
|
|
6330
|
+
*
|
|
6331
|
+
* @param {PlaycallerApi.GetPlayerNewsRequest} request
|
|
6332
|
+
* @param {MultiClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
6333
|
+
*
|
|
6334
|
+
* @throws {@link PlaycallerApi.UnauthorizedError}
|
|
6335
|
+
* @throws {@link PlaycallerApi.NotFoundError}
|
|
6336
|
+
* @throws {@link PlaycallerApi.TooManyRequestsError}
|
|
6337
|
+
* @throws {@link PlaycallerApi.InternalServerError}
|
|
6338
|
+
*
|
|
6339
|
+
* @example
|
|
6340
|
+
* await client.multi.getPlayerNews({
|
|
6341
|
+
* sport: "nfl",
|
|
6342
|
+
* id: "pc_nfl_001234"
|
|
6343
|
+
* })
|
|
6344
|
+
*/
|
|
6345
|
+
getPlayerNews(request, requestOptions) {
|
|
6346
|
+
return HttpResponsePromise.fromPromise(this.__getPlayerNews(request, requestOptions));
|
|
6347
|
+
}
|
|
6348
|
+
async __getPlayerNews(request, requestOptions) {
|
|
6349
|
+
const { sport, id, limit } = request;
|
|
6350
|
+
const _queryParams = {
|
|
6351
|
+
limit
|
|
6352
|
+
};
|
|
6353
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
6354
|
+
const _headers = mergeHeaders(
|
|
6355
|
+
_authRequest.headers,
|
|
6356
|
+
this._options?.headers,
|
|
6357
|
+
requestOptions?.headers
|
|
6358
|
+
);
|
|
6359
|
+
const _response = await fetcher({
|
|
6360
|
+
url: url_exports.join(
|
|
6361
|
+
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
|
|
6362
|
+
`v1/${url_exports.encodePathParam(sport)}/players/${url_exports.encodePathParam(id)}/news`
|
|
6363
|
+
),
|
|
6364
|
+
method: "GET",
|
|
6365
|
+
headers: _headers,
|
|
6366
|
+
queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
|
|
6367
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
6368
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
6369
|
+
abortSignal: requestOptions?.abortSignal,
|
|
6370
|
+
fetchFn: this._options?.fetch,
|
|
6371
|
+
logging: this._options.logging
|
|
6372
|
+
});
|
|
6373
|
+
if (_response.ok) {
|
|
6374
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
6375
|
+
}
|
|
6376
|
+
if (_response.error.reason === "status-code") {
|
|
6377
|
+
switch (_response.error.statusCode) {
|
|
6378
|
+
case 401:
|
|
6379
|
+
throw new UnauthorizedError(
|
|
6380
|
+
_response.error.body,
|
|
6381
|
+
_response.rawResponse
|
|
6382
|
+
);
|
|
6383
|
+
case 404:
|
|
6384
|
+
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
6385
|
+
case 429:
|
|
6386
|
+
throw new TooManyRequestsError(
|
|
6387
|
+
_response.error.body,
|
|
6388
|
+
_response.rawResponse
|
|
6389
|
+
);
|
|
6390
|
+
case 500:
|
|
6391
|
+
throw new InternalServerError(
|
|
6392
|
+
_response.error.body,
|
|
6393
|
+
_response.rawResponse
|
|
6394
|
+
);
|
|
6395
|
+
default:
|
|
6396
|
+
throw new PlaycallerApiError({
|
|
6397
|
+
statusCode: _response.error.statusCode,
|
|
6398
|
+
body: _response.error.body,
|
|
6399
|
+
rawResponse: _response.rawResponse
|
|
6400
|
+
});
|
|
6401
|
+
}
|
|
6402
|
+
}
|
|
6403
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/{sport}/players/{id}/news");
|
|
6404
|
+
}
|
|
6405
|
+
/**
|
|
6406
|
+
* Returns all active beat reporter injury signals for a given team — every player with a reported injury, sorted by severity. Useful for opponent analysis, weekly lineup decisions, and DFS game-day research.
|
|
6407
|
+
*
|
|
6408
|
+
* **Tier access:** Developer Sandbox, Build, Growth, Pro Insights, Syndicate Alpha
|
|
6409
|
+
*
|
|
6410
|
+
* @param {PlaycallerApi.GetTeamInjuriesRequest} request
|
|
6411
|
+
* @param {MultiClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
6412
|
+
*
|
|
6413
|
+
* @throws {@link PlaycallerApi.UnauthorizedError}
|
|
6414
|
+
* @throws {@link PlaycallerApi.TooManyRequestsError}
|
|
6415
|
+
* @throws {@link PlaycallerApi.InternalServerError}
|
|
6416
|
+
*
|
|
6417
|
+
* @example
|
|
6418
|
+
* await client.multi.getTeamInjuries({
|
|
6419
|
+
* sport: "nfl",
|
|
6420
|
+
* team: "KC"
|
|
6421
|
+
* })
|
|
6422
|
+
*/
|
|
6423
|
+
getTeamInjuries(request, requestOptions) {
|
|
6424
|
+
return HttpResponsePromise.fromPromise(this.__getTeamInjuries(request, requestOptions));
|
|
6425
|
+
}
|
|
6426
|
+
async __getTeamInjuries(request, requestOptions) {
|
|
6427
|
+
const { sport, team, limit } = request;
|
|
6428
|
+
const _queryParams = {
|
|
6429
|
+
limit
|
|
6430
|
+
};
|
|
6431
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
6432
|
+
const _headers = mergeHeaders(
|
|
6433
|
+
_authRequest.headers,
|
|
6434
|
+
this._options?.headers,
|
|
6435
|
+
requestOptions?.headers
|
|
6436
|
+
);
|
|
6437
|
+
const _response = await fetcher({
|
|
6438
|
+
url: url_exports.join(
|
|
6439
|
+
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
|
|
6440
|
+
`v1/${url_exports.encodePathParam(sport)}/teams/${url_exports.encodePathParam(team)}/injuries`
|
|
6441
|
+
),
|
|
6442
|
+
method: "GET",
|
|
5772
6443
|
headers: _headers,
|
|
5773
6444
|
queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
|
|
5774
6445
|
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
@@ -7075,10 +7746,92 @@ var NbaClient = class {
|
|
|
7075
7746
|
getNbaTeamRoster(request, requestOptions) {
|
|
7076
7747
|
return HttpResponsePromise.fromPromise(this.__getNbaTeamRoster(request, requestOptions));
|
|
7077
7748
|
}
|
|
7078
|
-
async __getNbaTeamRoster(request, requestOptions) {
|
|
7079
|
-
const { team, position } = request;
|
|
7749
|
+
async __getNbaTeamRoster(request, requestOptions) {
|
|
7750
|
+
const { team, position } = request;
|
|
7751
|
+
const _queryParams = {
|
|
7752
|
+
position: position != null ? position : void 0
|
|
7753
|
+
};
|
|
7754
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
7755
|
+
const _headers = mergeHeaders(
|
|
7756
|
+
_authRequest.headers,
|
|
7757
|
+
this._options?.headers,
|
|
7758
|
+
requestOptions?.headers
|
|
7759
|
+
);
|
|
7760
|
+
const _response = await fetcher({
|
|
7761
|
+
url: url_exports.join(
|
|
7762
|
+
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
|
|
7763
|
+
`v1/nba/teams/${url_exports.encodePathParam(team)}/roster`
|
|
7764
|
+
),
|
|
7765
|
+
method: "GET",
|
|
7766
|
+
headers: _headers,
|
|
7767
|
+
queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
|
|
7768
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
7769
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
7770
|
+
abortSignal: requestOptions?.abortSignal,
|
|
7771
|
+
fetchFn: this._options?.fetch,
|
|
7772
|
+
logging: this._options.logging
|
|
7773
|
+
});
|
|
7774
|
+
if (_response.ok) {
|
|
7775
|
+
return {
|
|
7776
|
+
data: _response.body,
|
|
7777
|
+
rawResponse: _response.rawResponse
|
|
7778
|
+
};
|
|
7779
|
+
}
|
|
7780
|
+
if (_response.error.reason === "status-code") {
|
|
7781
|
+
switch (_response.error.statusCode) {
|
|
7782
|
+
case 401:
|
|
7783
|
+
throw new UnauthorizedError(
|
|
7784
|
+
_response.error.body,
|
|
7785
|
+
_response.rawResponse
|
|
7786
|
+
);
|
|
7787
|
+
case 404:
|
|
7788
|
+
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
7789
|
+
case 429:
|
|
7790
|
+
throw new TooManyRequestsError(
|
|
7791
|
+
_response.error.body,
|
|
7792
|
+
_response.rawResponse
|
|
7793
|
+
);
|
|
7794
|
+
case 500:
|
|
7795
|
+
throw new InternalServerError(
|
|
7796
|
+
_response.error.body,
|
|
7797
|
+
_response.rawResponse
|
|
7798
|
+
);
|
|
7799
|
+
default:
|
|
7800
|
+
throw new PlaycallerApiError({
|
|
7801
|
+
statusCode: _response.error.statusCode,
|
|
7802
|
+
body: _response.error.body,
|
|
7803
|
+
rawResponse: _response.rawResponse
|
|
7804
|
+
});
|
|
7805
|
+
}
|
|
7806
|
+
}
|
|
7807
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/nba/teams/{team}/roster");
|
|
7808
|
+
}
|
|
7809
|
+
/**
|
|
7810
|
+
* Full detail behind PlayCaller's best-validated signal in the entire portfolio — AUC-ROC 0.855, 84.23x decile lift, promoted ACTIVE 2026-06-19. `/v1/feed` returns a capped display score for this same model; this endpoint exposes the raw (pre-cap) score, percentile, and the 5 underlying signal components including `usage_vacuum`.
|
|
7811
|
+
*
|
|
7812
|
+
* **Tier access:** Pro Insights, Syndicate Alpha
|
|
7813
|
+
*
|
|
7814
|
+
* @param {PlaycallerApi.GetNbaConfidenceRequest} request
|
|
7815
|
+
* @param {NbaClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
7816
|
+
*
|
|
7817
|
+
* @throws {@link PlaycallerApi.UnauthorizedError}
|
|
7818
|
+
* @throws {@link PlaycallerApi.ForbiddenError}
|
|
7819
|
+
* @throws {@link PlaycallerApi.NotFoundError}
|
|
7820
|
+
* @throws {@link PlaycallerApi.TooManyRequestsError}
|
|
7821
|
+
* @throws {@link PlaycallerApi.InternalServerError}
|
|
7822
|
+
*
|
|
7823
|
+
* @example
|
|
7824
|
+
* await client.nba.getNbaConfidence({
|
|
7825
|
+
* player: "Nikola Jokic"
|
|
7826
|
+
* })
|
|
7827
|
+
*/
|
|
7828
|
+
getNbaConfidence(request, requestOptions) {
|
|
7829
|
+
return HttpResponsePromise.fromPromise(this.__getNbaConfidence(request, requestOptions));
|
|
7830
|
+
}
|
|
7831
|
+
async __getNbaConfidence(request, requestOptions) {
|
|
7832
|
+
const { player } = request;
|
|
7080
7833
|
const _queryParams = {
|
|
7081
|
-
|
|
7834
|
+
player
|
|
7082
7835
|
};
|
|
7083
7836
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
7084
7837
|
const _headers = mergeHeaders(
|
|
@@ -7089,7 +7842,7 @@ var NbaClient = class {
|
|
|
7089
7842
|
const _response = await fetcher({
|
|
7090
7843
|
url: url_exports.join(
|
|
7091
7844
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
|
|
7092
|
-
|
|
7845
|
+
"v1/nba/confidence"
|
|
7093
7846
|
),
|
|
7094
7847
|
method: "GET",
|
|
7095
7848
|
headers: _headers,
|
|
@@ -7113,6 +7866,11 @@ var NbaClient = class {
|
|
|
7113
7866
|
_response.error.body,
|
|
7114
7867
|
_response.rawResponse
|
|
7115
7868
|
);
|
|
7869
|
+
case 403:
|
|
7870
|
+
throw new ForbiddenError(
|
|
7871
|
+
_response.error.body,
|
|
7872
|
+
_response.rawResponse
|
|
7873
|
+
);
|
|
7116
7874
|
case 404:
|
|
7117
7875
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
7118
7876
|
case 429:
|
|
@@ -7133,34 +7891,35 @@ var NbaClient = class {
|
|
|
7133
7891
|
});
|
|
7134
7892
|
}
|
|
7135
7893
|
}
|
|
7136
|
-
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/nba/
|
|
7894
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/nba/confidence");
|
|
7137
7895
|
}
|
|
7138
7896
|
/**
|
|
7139
|
-
*
|
|
7897
|
+
* Per-game box score stats for an NBA player from `player_game_logs`, populated by the NBA Stats connector (stats.nba.com). Returns up to 82 games for a given season.
|
|
7140
7898
|
*
|
|
7141
|
-
* **Tier access:** Pro Insights, Syndicate Alpha
|
|
7899
|
+
* **Tier access:** Build, Growth, Pro Insights, Syndicate Alpha
|
|
7142
7900
|
*
|
|
7143
|
-
* @param {PlaycallerApi.
|
|
7901
|
+
* @param {PlaycallerApi.GetNbaPlayerGameLogRequest} request
|
|
7144
7902
|
* @param {NbaClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
7145
7903
|
*
|
|
7146
7904
|
* @throws {@link PlaycallerApi.UnauthorizedError}
|
|
7147
|
-
* @throws {@link PlaycallerApi.
|
|
7905
|
+
* @throws {@link PlaycallerApi.PaymentRequiredError}
|
|
7148
7906
|
* @throws {@link PlaycallerApi.NotFoundError}
|
|
7149
7907
|
* @throws {@link PlaycallerApi.TooManyRequestsError}
|
|
7150
7908
|
* @throws {@link PlaycallerApi.InternalServerError}
|
|
7151
7909
|
*
|
|
7152
7910
|
* @example
|
|
7153
|
-
* await client.nba.
|
|
7154
|
-
*
|
|
7911
|
+
* await client.nba.getNbaPlayerGameLog({
|
|
7912
|
+
* id: "nba_2544",
|
|
7913
|
+
* season: "2024-25"
|
|
7155
7914
|
* })
|
|
7156
7915
|
*/
|
|
7157
|
-
|
|
7158
|
-
return HttpResponsePromise.fromPromise(this.
|
|
7916
|
+
getNbaPlayerGameLog(request, requestOptions) {
|
|
7917
|
+
return HttpResponsePromise.fromPromise(this.__getNbaPlayerGameLog(request, requestOptions));
|
|
7159
7918
|
}
|
|
7160
|
-
async
|
|
7161
|
-
const {
|
|
7919
|
+
async __getNbaPlayerGameLog(request, requestOptions) {
|
|
7920
|
+
const { id, season } = request;
|
|
7162
7921
|
const _queryParams = {
|
|
7163
|
-
|
|
7922
|
+
season
|
|
7164
7923
|
};
|
|
7165
7924
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
7166
7925
|
const _headers = mergeHeaders(
|
|
@@ -7171,7 +7930,7 @@ var NbaClient = class {
|
|
|
7171
7930
|
const _response = await fetcher({
|
|
7172
7931
|
url: url_exports.join(
|
|
7173
7932
|
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
|
|
7174
|
-
|
|
7933
|
+
`v1/nba/players/${url_exports.encodePathParam(id)}/game-log`
|
|
7175
7934
|
),
|
|
7176
7935
|
method: "GET",
|
|
7177
7936
|
headers: _headers,
|
|
@@ -7195,8 +7954,8 @@ var NbaClient = class {
|
|
|
7195
7954
|
_response.error.body,
|
|
7196
7955
|
_response.rawResponse
|
|
7197
7956
|
);
|
|
7198
|
-
case
|
|
7199
|
-
throw new
|
|
7957
|
+
case 402:
|
|
7958
|
+
throw new PaymentRequiredError(
|
|
7200
7959
|
_response.error.body,
|
|
7201
7960
|
_response.rawResponse
|
|
7202
7961
|
);
|
|
@@ -7220,7 +7979,7 @@ var NbaClient = class {
|
|
|
7220
7979
|
});
|
|
7221
7980
|
}
|
|
7222
7981
|
}
|
|
7223
|
-
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/nba/
|
|
7982
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/nba/players/{id}/game-log");
|
|
7224
7983
|
}
|
|
7225
7984
|
};
|
|
7226
7985
|
|
|
@@ -7469,7 +8228,7 @@ var NflClient = class {
|
|
|
7469
8228
|
/**
|
|
7470
8229
|
* Players ranked by consensus Average Draft Position (ADP), blended from Sleeper and FantasyCalc. Includes position rank, tier, and our validated confidence score where available. Refreshed weekly.
|
|
7471
8230
|
*
|
|
7472
|
-
* **Tier access:**
|
|
8231
|
+
* **Tier access:** Growth, Pro Insights, Syndicate Alpha
|
|
7473
8232
|
*
|
|
7474
8233
|
* @param {PlaycallerApi.GetNflRankingsRequest} request
|
|
7475
8234
|
* @param {NflClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -7856,6 +8615,267 @@ var NflClient = class {
|
|
|
7856
8615
|
}
|
|
7857
8616
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/nfl/standings");
|
|
7858
8617
|
}
|
|
8618
|
+
/**
|
|
8619
|
+
* Rank NFL players by expected fantasy points in your league's exact scoring system. Pass scoring weights in the request body; receive players sorted by `custom_pts_per_game` — computed from prior-season per-game averages.
|
|
8620
|
+
*
|
|
8621
|
+
* **Example use case:** Get PPR rankings (`rec: 1`), half-PPR (`rec: 0.5`), or any custom scoring system.
|
|
8622
|
+
*
|
|
8623
|
+
* **Tier access:** Pro Insights, Syndicate Alpha
|
|
8624
|
+
*
|
|
8625
|
+
* @param {PlaycallerApi.GetNflCustomRankingsRequest} request
|
|
8626
|
+
* @param {NflClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
8627
|
+
*
|
|
8628
|
+
* @throws {@link PlaycallerApi.UnauthorizedError}
|
|
8629
|
+
* @throws {@link PlaycallerApi.PaymentRequiredError}
|
|
8630
|
+
* @throws {@link PlaycallerApi.TooManyRequestsError}
|
|
8631
|
+
* @throws {@link PlaycallerApi.InternalServerError}
|
|
8632
|
+
*
|
|
8633
|
+
* @example
|
|
8634
|
+
* await client.nfl.getNflCustomRankings()
|
|
8635
|
+
*/
|
|
8636
|
+
getNflCustomRankings(request = {}, requestOptions) {
|
|
8637
|
+
return HttpResponsePromise.fromPromise(this.__getNflCustomRankings(request, requestOptions));
|
|
8638
|
+
}
|
|
8639
|
+
async __getNflCustomRankings(request = {}, requestOptions) {
|
|
8640
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
8641
|
+
const _headers = mergeHeaders(
|
|
8642
|
+
_authRequest.headers,
|
|
8643
|
+
this._options?.headers,
|
|
8644
|
+
requestOptions?.headers
|
|
8645
|
+
);
|
|
8646
|
+
const _response = await fetcher({
|
|
8647
|
+
url: url_exports.join(
|
|
8648
|
+
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
|
|
8649
|
+
"v1/nfl/rankings/custom"
|
|
8650
|
+
),
|
|
8651
|
+
method: "POST",
|
|
8652
|
+
headers: _headers,
|
|
8653
|
+
contentType: "application/json",
|
|
8654
|
+
queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
8655
|
+
requestType: "json",
|
|
8656
|
+
body: request,
|
|
8657
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
8658
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
8659
|
+
abortSignal: requestOptions?.abortSignal,
|
|
8660
|
+
fetchFn: this._options?.fetch,
|
|
8661
|
+
logging: this._options.logging
|
|
8662
|
+
});
|
|
8663
|
+
if (_response.ok) {
|
|
8664
|
+
return {
|
|
8665
|
+
data: _response.body,
|
|
8666
|
+
rawResponse: _response.rawResponse
|
|
8667
|
+
};
|
|
8668
|
+
}
|
|
8669
|
+
if (_response.error.reason === "status-code") {
|
|
8670
|
+
switch (_response.error.statusCode) {
|
|
8671
|
+
case 401:
|
|
8672
|
+
throw new UnauthorizedError(
|
|
8673
|
+
_response.error.body,
|
|
8674
|
+
_response.rawResponse
|
|
8675
|
+
);
|
|
8676
|
+
case 402:
|
|
8677
|
+
throw new PaymentRequiredError(
|
|
8678
|
+
_response.error.body,
|
|
8679
|
+
_response.rawResponse
|
|
8680
|
+
);
|
|
8681
|
+
case 429:
|
|
8682
|
+
throw new TooManyRequestsError(
|
|
8683
|
+
_response.error.body,
|
|
8684
|
+
_response.rawResponse
|
|
8685
|
+
);
|
|
8686
|
+
case 500:
|
|
8687
|
+
throw new InternalServerError(
|
|
8688
|
+
_response.error.body,
|
|
8689
|
+
_response.rawResponse
|
|
8690
|
+
);
|
|
8691
|
+
default:
|
|
8692
|
+
throw new PlaycallerApiError({
|
|
8693
|
+
statusCode: _response.error.statusCode,
|
|
8694
|
+
body: _response.error.body,
|
|
8695
|
+
rawResponse: _response.rawResponse
|
|
8696
|
+
});
|
|
8697
|
+
}
|
|
8698
|
+
}
|
|
8699
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/nfl/rankings/custom");
|
|
8700
|
+
}
|
|
8701
|
+
/**
|
|
8702
|
+
* Training camp and in-season depth chart moves detected from Sleeper daily snapshots. Includes AI-generated blurbs explaining fantasy impact. Active Jul 20–Feb; returns empty array off-season.
|
|
8703
|
+
*
|
|
8704
|
+
* **Tier access:** Growth, Pro Insights, Syndicate Alpha
|
|
8705
|
+
*
|
|
8706
|
+
* @param {PlaycallerApi.GetNflDepthChartChangesRequest} request
|
|
8707
|
+
* @param {NflClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
8708
|
+
*
|
|
8709
|
+
* @throws {@link PlaycallerApi.UnauthorizedError}
|
|
8710
|
+
* @throws {@link PlaycallerApi.PaymentRequiredError}
|
|
8711
|
+
* @throws {@link PlaycallerApi.TooManyRequestsError}
|
|
8712
|
+
* @throws {@link PlaycallerApi.InternalServerError}
|
|
8713
|
+
*
|
|
8714
|
+
* @example
|
|
8715
|
+
* await client.nfl.getNflDepthChartChanges({
|
|
8716
|
+
* since: "2026-07-10",
|
|
8717
|
+
* team: "KC"
|
|
8718
|
+
* })
|
|
8719
|
+
*/
|
|
8720
|
+
getNflDepthChartChanges(request = {}, requestOptions) {
|
|
8721
|
+
return HttpResponsePromise.fromPromise(this.__getNflDepthChartChanges(request, requestOptions));
|
|
8722
|
+
}
|
|
8723
|
+
async __getNflDepthChartChanges(request = {}, requestOptions) {
|
|
8724
|
+
const { since, team, position, change_type: changeType, limit } = request;
|
|
8725
|
+
const _queryParams = {
|
|
8726
|
+
since: since != null ? since : void 0,
|
|
8727
|
+
team,
|
|
8728
|
+
position: position != null ? position : void 0,
|
|
8729
|
+
change_type: changeType != null ? changeType : void 0,
|
|
8730
|
+
limit
|
|
8731
|
+
};
|
|
8732
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
8733
|
+
const _headers = mergeHeaders(
|
|
8734
|
+
_authRequest.headers,
|
|
8735
|
+
this._options?.headers,
|
|
8736
|
+
requestOptions?.headers
|
|
8737
|
+
);
|
|
8738
|
+
const _response = await fetcher({
|
|
8739
|
+
url: url_exports.join(
|
|
8740
|
+
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
|
|
8741
|
+
"v1/nfl/depth-chart/changes"
|
|
8742
|
+
),
|
|
8743
|
+
method: "GET",
|
|
8744
|
+
headers: _headers,
|
|
8745
|
+
queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
|
|
8746
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
8747
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
8748
|
+
abortSignal: requestOptions?.abortSignal,
|
|
8749
|
+
fetchFn: this._options?.fetch,
|
|
8750
|
+
logging: this._options.logging
|
|
8751
|
+
});
|
|
8752
|
+
if (_response.ok) {
|
|
8753
|
+
return {
|
|
8754
|
+
data: _response.body,
|
|
8755
|
+
rawResponse: _response.rawResponse
|
|
8756
|
+
};
|
|
8757
|
+
}
|
|
8758
|
+
if (_response.error.reason === "status-code") {
|
|
8759
|
+
switch (_response.error.statusCode) {
|
|
8760
|
+
case 401:
|
|
8761
|
+
throw new UnauthorizedError(
|
|
8762
|
+
_response.error.body,
|
|
8763
|
+
_response.rawResponse
|
|
8764
|
+
);
|
|
8765
|
+
case 402:
|
|
8766
|
+
throw new PaymentRequiredError(
|
|
8767
|
+
_response.error.body,
|
|
8768
|
+
_response.rawResponse
|
|
8769
|
+
);
|
|
8770
|
+
case 429:
|
|
8771
|
+
throw new TooManyRequestsError(
|
|
8772
|
+
_response.error.body,
|
|
8773
|
+
_response.rawResponse
|
|
8774
|
+
);
|
|
8775
|
+
case 500:
|
|
8776
|
+
throw new InternalServerError(
|
|
8777
|
+
_response.error.body,
|
|
8778
|
+
_response.rawResponse
|
|
8779
|
+
);
|
|
8780
|
+
default:
|
|
8781
|
+
throw new PlaycallerApiError({
|
|
8782
|
+
statusCode: _response.error.statusCode,
|
|
8783
|
+
body: _response.error.body,
|
|
8784
|
+
rawResponse: _response.rawResponse
|
|
8785
|
+
});
|
|
8786
|
+
}
|
|
8787
|
+
}
|
|
8788
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/nfl/depth-chart/changes");
|
|
8789
|
+
}
|
|
8790
|
+
/**
|
|
8791
|
+
* Aggregated training camp snapshot: current depth chart position changes (last 30 days), practice status, anomaly signals, and recent game stats. Replaces 5 separate endpoint calls with a single request.
|
|
8792
|
+
*
|
|
8793
|
+
* **Tier access:** Build, Growth, Pro Insights, Syndicate Alpha
|
|
8794
|
+
*
|
|
8795
|
+
* @param {PlaycallerApi.GetNflCampIntelRequest} request
|
|
8796
|
+
* @param {NflClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
8797
|
+
*
|
|
8798
|
+
* @throws {@link PlaycallerApi.UnauthorizedError}
|
|
8799
|
+
* @throws {@link PlaycallerApi.PaymentRequiredError}
|
|
8800
|
+
* @throws {@link PlaycallerApi.NotFoundError}
|
|
8801
|
+
* @throws {@link PlaycallerApi.TooManyRequestsError}
|
|
8802
|
+
* @throws {@link PlaycallerApi.InternalServerError}
|
|
8803
|
+
*
|
|
8804
|
+
* @example
|
|
8805
|
+
* await client.nfl.getNflCampIntel({
|
|
8806
|
+
* id: "id"
|
|
8807
|
+
* })
|
|
8808
|
+
*/
|
|
8809
|
+
getNflCampIntel(request, requestOptions) {
|
|
8810
|
+
return HttpResponsePromise.fromPromise(this.__getNflCampIntel(request, requestOptions));
|
|
8811
|
+
}
|
|
8812
|
+
async __getNflCampIntel(request, requestOptions) {
|
|
8813
|
+
const { id } = request;
|
|
8814
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
8815
|
+
const _headers = mergeHeaders(
|
|
8816
|
+
_authRequest.headers,
|
|
8817
|
+
this._options?.headers,
|
|
8818
|
+
requestOptions?.headers
|
|
8819
|
+
);
|
|
8820
|
+
const _response = await fetcher({
|
|
8821
|
+
url: url_exports.join(
|
|
8822
|
+
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
|
|
8823
|
+
`v1/nfl/players/${url_exports.encodePathParam(id)}/camp-intel`
|
|
8824
|
+
),
|
|
8825
|
+
method: "GET",
|
|
8826
|
+
headers: _headers,
|
|
8827
|
+
queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
8828
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
8829
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
8830
|
+
abortSignal: requestOptions?.abortSignal,
|
|
8831
|
+
fetchFn: this._options?.fetch,
|
|
8832
|
+
logging: this._options.logging
|
|
8833
|
+
});
|
|
8834
|
+
if (_response.ok) {
|
|
8835
|
+
return {
|
|
8836
|
+
data: _response.body,
|
|
8837
|
+
rawResponse: _response.rawResponse
|
|
8838
|
+
};
|
|
8839
|
+
}
|
|
8840
|
+
if (_response.error.reason === "status-code") {
|
|
8841
|
+
switch (_response.error.statusCode) {
|
|
8842
|
+
case 401:
|
|
8843
|
+
throw new UnauthorizedError(
|
|
8844
|
+
_response.error.body,
|
|
8845
|
+
_response.rawResponse
|
|
8846
|
+
);
|
|
8847
|
+
case 402:
|
|
8848
|
+
throw new PaymentRequiredError(
|
|
8849
|
+
_response.error.body,
|
|
8850
|
+
_response.rawResponse
|
|
8851
|
+
);
|
|
8852
|
+
case 404:
|
|
8853
|
+
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
8854
|
+
case 429:
|
|
8855
|
+
throw new TooManyRequestsError(
|
|
8856
|
+
_response.error.body,
|
|
8857
|
+
_response.rawResponse
|
|
8858
|
+
);
|
|
8859
|
+
case 500:
|
|
8860
|
+
throw new InternalServerError(
|
|
8861
|
+
_response.error.body,
|
|
8862
|
+
_response.rawResponse
|
|
8863
|
+
);
|
|
8864
|
+
default:
|
|
8865
|
+
throw new PlaycallerApiError({
|
|
8866
|
+
statusCode: _response.error.statusCode,
|
|
8867
|
+
body: _response.error.body,
|
|
8868
|
+
rawResponse: _response.rawResponse
|
|
8869
|
+
});
|
|
8870
|
+
}
|
|
8871
|
+
}
|
|
8872
|
+
return handleNonStatusCodeError(
|
|
8873
|
+
_response.error,
|
|
8874
|
+
_response.rawResponse,
|
|
8875
|
+
"GET",
|
|
8876
|
+
"/v1/nfl/players/{id}/camp-intel"
|
|
8877
|
+
);
|
|
8878
|
+
}
|
|
7859
8879
|
};
|
|
7860
8880
|
|
|
7861
8881
|
// api/resources/nhl/client/Client.ts
|
|
@@ -9165,9 +10185,6 @@ var PlaycallerApiClient = class {
|
|
|
9165
10185
|
get multi() {
|
|
9166
10186
|
return this._multi ?? (this._multi = new MultiClient(this._options));
|
|
9167
10187
|
}
|
|
9168
|
-
get leagues() {
|
|
9169
|
-
return this._leagues ?? (this._leagues = new LeaguesClient(this._options));
|
|
9170
|
-
}
|
|
9171
10188
|
get account() {
|
|
9172
10189
|
return this._account ?? (this._account = new AccountClient(this._options));
|
|
9173
10190
|
}
|