@playcaller/sdk 0.3.0 → 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.js CHANGED
@@ -33,6 +33,8 @@ module.exports = __toCommonJS(index_exports);
33
33
  var api_exports = {};
34
34
  __export(api_exports, {
35
35
  BadRequestError: () => BadRequestError,
36
+ BatchPlayerSignalsRequest: () => BatchPlayerSignalsRequest,
37
+ BatchPlayersRequest: () => BatchPlayersRequest,
36
38
  BeatReporterSignal: () => BeatReporterSignal,
37
39
  ComparePlayersRequestSport: () => ComparePlayersRequestSport,
38
40
  ConflictError: () => ConflictError,
@@ -49,16 +51,24 @@ __export(api_exports, {
49
51
  GetIntelligenceNewsRequestSeverity: () => GetIntelligenceNewsRequestSeverity,
50
52
  GetIntelligenceNewsRequestSignalType: () => GetIntelligenceNewsRequestSignalType,
51
53
  GetIntelligenceNewsRequestSport: () => GetIntelligenceNewsRequestSport,
54
+ GetIntelligenceSignalsRequestSeverity: () => GetIntelligenceSignalsRequestSeverity,
55
+ GetIntelligenceSignalsRequestSport: () => GetIntelligenceSignalsRequestSport,
56
+ GetIntelligenceSignalsResponse: () => GetIntelligenceSignalsResponse,
52
57
  GetMlbScoringLeadersRequestPosition: () => GetMlbScoringLeadersRequestPosition,
53
58
  GetMlbTeamRosterRequestPosition: () => GetMlbTeamRosterRequestPosition,
54
59
  GetNbaConfidenceResponse: () => GetNbaConfidenceResponse,
55
60
  GetNbaStandingsRequestConference: () => GetNbaStandingsRequestConference,
56
61
  GetNbaTeamRosterRequestPosition: () => GetNbaTeamRosterRequestPosition,
62
+ GetNflCustomRankingsRequest: () => GetNflCustomRankingsRequest,
63
+ GetNflDepthChartChangesRequestChangeType: () => GetNflDepthChartChangesRequestChangeType,
64
+ GetNflDepthChartChangesRequestPosition: () => GetNflDepthChartChangesRequestPosition,
65
+ GetNflDepthChartChangesResponse: () => GetNflDepthChartChangesResponse,
57
66
  GetNflRankingsRequestFormat: () => GetNflRankingsRequestFormat,
58
67
  GetNflRankingsRequestPosition: () => GetNflRankingsRequestPosition,
59
68
  GetNflRankingsResponse: () => GetNflRankingsResponse,
60
69
  GetNflStandingsRequestConference: () => GetNflStandingsRequestConference,
61
70
  GetNflTeamRosterRequestPosition: () => GetNflTeamRosterRequestPosition,
71
+ GetOddsHistoryRequestSport: () => GetOddsHistoryRequestSport,
62
72
  GetPlayerAlphaMetricsRequestSport: () => GetPlayerAlphaMetricsRequestSport,
63
73
  GetPlayerNewsRequestSport: () => GetPlayerNewsRequestSport,
64
74
  GetPlayerNewsResponse: () => GetPlayerNewsResponse,
@@ -66,12 +76,15 @@ __export(api_exports, {
66
76
  GetSoccerStandingsRequestLeague: () => GetSoccerStandingsRequestLeague,
67
77
  GetTeamInjuriesRequestSport: () => GetTeamInjuriesRequestSport,
68
78
  GetTeamInjuriesResponse: () => GetTeamInjuriesResponse,
79
+ GetTeamRosterPulseRequestSport: () => GetTeamRosterPulseRequestSport,
69
80
  GetTeamScheduleRequestSport: () => GetTeamScheduleRequestSport,
70
81
  GetTeamScheduleRequestStatus: () => GetTeamScheduleRequestStatus,
71
82
  GetTennisMatchesRequestTour: () => GetTennisMatchesRequestTour,
72
83
  GetTrendingRequestSport: () => GetTrendingRequestSport,
73
84
  GetUfcEventsRequestState: () => GetUfcEventsRequestState,
74
85
  GetWaiverArticlesRequestSport: () => GetWaiverArticlesRequestSport,
86
+ GetWaiverPriorityRequestSport: () => GetWaiverPriorityRequestSport,
87
+ GetWaiverPriorityResponse: () => GetWaiverPriorityResponse,
75
88
  InternalServerError: () => InternalServerError,
76
89
  InvokeMcpToolRequest: () => InvokeMcpToolRequest,
77
90
  ListCfbGamesRequestState: () => ListCfbGamesRequestState,
@@ -89,6 +102,7 @@ __export(api_exports, {
89
102
  MlbGame: () => MlbGame,
90
103
  MlbPlayer: () => MlbPlayer,
91
104
  NotFoundError: () => NotFoundError,
105
+ PaymentRequiredError: () => PaymentRequiredError,
92
106
  PlayerIdentity: () => PlayerIdentity,
93
107
  SearchPlayersRequestSport: () => SearchPlayersRequestSport,
94
108
  StreamEventsRequestSport: () => StreamEventsRequestSport,
@@ -262,6 +276,23 @@ var NotFoundError = class extends PlaycallerApiError {
262
276
  }
263
277
  };
264
278
 
279
+ // api/errors/PaymentRequiredError.ts
280
+ var PaymentRequiredError = class extends PlaycallerApiError {
281
+ constructor(body, rawResponse) {
282
+ super({
283
+ message: "PaymentRequiredError",
284
+ statusCode: 402,
285
+ body,
286
+ rawResponse
287
+ });
288
+ Object.setPrototypeOf(this, new.target.prototype);
289
+ if (Error.captureStackTrace) {
290
+ Error.captureStackTrace(this, this.constructor);
291
+ }
292
+ this.name = "PaymentRequiredError";
293
+ }
294
+ };
295
+
265
296
  // api/errors/TooManyRequestsError.ts
266
297
  var TooManyRequestsError = class extends PlaycallerApiError {
267
298
  constructor(body, rawResponse) {
@@ -371,7 +402,12 @@ __export(intelligence_exports, {
371
402
  GetIntelligenceInjuriesRequestSport: () => GetIntelligenceInjuriesRequestSport,
372
403
  GetIntelligenceNewsRequestSeverity: () => GetIntelligenceNewsRequestSeverity,
373
404
  GetIntelligenceNewsRequestSignalType: () => GetIntelligenceNewsRequestSignalType,
374
- GetIntelligenceNewsRequestSport: () => GetIntelligenceNewsRequestSport
405
+ GetIntelligenceNewsRequestSport: () => GetIntelligenceNewsRequestSport,
406
+ GetIntelligenceSignalsRequestSeverity: () => GetIntelligenceSignalsRequestSeverity,
407
+ GetIntelligenceSignalsRequestSport: () => GetIntelligenceSignalsRequestSport,
408
+ GetIntelligenceSignalsResponse: () => GetIntelligenceSignalsResponse,
409
+ GetWaiverPriorityRequestSport: () => GetWaiverPriorityRequestSport,
410
+ GetWaiverPriorityResponse: () => GetWaiverPriorityResponse
375
411
  });
376
412
 
377
413
  // api/resources/intelligence/types/GetAnalyticsTrendsRequestSport.ts
@@ -420,6 +456,63 @@ var GetIntelligenceNewsRequestSport = {
420
456
  All: "all"
421
457
  };
422
458
 
459
+ // api/resources/intelligence/types/GetIntelligenceSignalsRequestSeverity.ts
460
+ var GetIntelligenceSignalsRequestSeverity = {
461
+ High: "high",
462
+ Medium: "medium",
463
+ Low: "low"
464
+ };
465
+
466
+ // api/resources/intelligence/types/GetIntelligenceSignalsRequestSport.ts
467
+ var GetIntelligenceSignalsRequestSport = {
468
+ Nfl: "nfl",
469
+ Nba: "nba",
470
+ Mlb: "mlb",
471
+ Nhl: "nhl",
472
+ Golf: "golf",
473
+ Soccer: "soccer"
474
+ };
475
+
476
+ // api/resources/intelligence/types/GetIntelligenceSignalsResponse.ts
477
+ var GetIntelligenceSignalsResponse;
478
+ ((GetIntelligenceSignalsResponse2) => {
479
+ let Data;
480
+ ((Data2) => {
481
+ let Item;
482
+ ((Item2) => {
483
+ Item2.Severity = {
484
+ High: "high",
485
+ Medium: "medium",
486
+ Low: "low"
487
+ };
488
+ })(Item = Data2.Item || (Data2.Item = {}));
489
+ })(Data = GetIntelligenceSignalsResponse2.Data || (GetIntelligenceSignalsResponse2.Data = {}));
490
+ })(GetIntelligenceSignalsResponse || (GetIntelligenceSignalsResponse = {}));
491
+
492
+ // api/resources/intelligence/types/GetWaiverPriorityRequestSport.ts
493
+ var GetWaiverPriorityRequestSport = {
494
+ Nfl: "nfl",
495
+ Nba: "nba",
496
+ Mlb: "mlb",
497
+ Nhl: "nhl"
498
+ };
499
+
500
+ // api/resources/intelligence/types/GetWaiverPriorityResponse.ts
501
+ var GetWaiverPriorityResponse;
502
+ ((GetWaiverPriorityResponse2) => {
503
+ let WaiverCandidates;
504
+ ((WaiverCandidates2) => {
505
+ let Item;
506
+ ((Item2) => {
507
+ Item2.Severity = {
508
+ High: "high",
509
+ Medium: "medium",
510
+ Low: "low"
511
+ };
512
+ })(Item = WaiverCandidates2.Item || (WaiverCandidates2.Item = {}));
513
+ })(WaiverCandidates = GetWaiverPriorityResponse2.WaiverCandidates || (GetWaiverPriorityResponse2.WaiverCandidates = {}));
514
+ })(GetWaiverPriorityResponse || (GetWaiverPriorityResponse = {}));
515
+
423
516
  // api/resources/mcp/client/requests/InvokeMcpToolRequest.ts
424
517
  var InvokeMcpToolRequest;
425
518
  ((InvokeMcpToolRequest2) => {
@@ -506,17 +599,53 @@ var ListMlbPlayersRequestStatus = {
506
599
  Inactive: "inactive"
507
600
  };
508
601
 
602
+ // api/resources/multi/client/requests/BatchPlayerSignalsRequest.ts
603
+ var BatchPlayerSignalsRequest;
604
+ ((BatchPlayerSignalsRequest2) => {
605
+ let Players;
606
+ ((Players2) => {
607
+ let Item;
608
+ ((Item2) => {
609
+ Item2.Sport = {
610
+ Nfl: "nfl",
611
+ Mlb: "mlb",
612
+ Nba: "nba",
613
+ Nhl: "nhl",
614
+ Golf: "golf",
615
+ Soccer: "soccer"
616
+ };
617
+ })(Item = Players2.Item || (Players2.Item = {}));
618
+ })(Players = BatchPlayerSignalsRequest2.Players || (BatchPlayerSignalsRequest2.Players = {}));
619
+ })(BatchPlayerSignalsRequest || (BatchPlayerSignalsRequest = {}));
620
+
621
+ // api/resources/multi/client/requests/BatchPlayersRequest.ts
622
+ var BatchPlayersRequest;
623
+ ((BatchPlayersRequest2) => {
624
+ let Include;
625
+ ((Include2) => {
626
+ Include2.Item = {
627
+ Stats: "stats",
628
+ Injuries: "injuries",
629
+ Anomalies: "anomalies"
630
+ };
631
+ })(Include = BatchPlayersRequest2.Include || (BatchPlayersRequest2.Include = {}));
632
+ })(BatchPlayersRequest || (BatchPlayersRequest = {}));
633
+
509
634
  // api/resources/multi/index.ts
510
635
  var multi_exports = {};
511
636
  __export(multi_exports, {
637
+ BatchPlayerSignalsRequest: () => BatchPlayerSignalsRequest,
638
+ BatchPlayersRequest: () => BatchPlayersRequest,
512
639
  ComparePlayersRequestSport: () => ComparePlayersRequestSport,
513
640
  GetGamesHistoryRequestSport: () => GetGamesHistoryRequestSport,
641
+ GetOddsHistoryRequestSport: () => GetOddsHistoryRequestSport,
514
642
  GetPlayerAlphaMetricsRequestSport: () => GetPlayerAlphaMetricsRequestSport,
515
643
  GetPlayerNewsRequestSport: () => GetPlayerNewsRequestSport,
516
644
  GetPlayerNewsResponse: () => GetPlayerNewsResponse,
517
645
  GetSimilarPlayersRequestSport: () => GetSimilarPlayersRequestSport,
518
646
  GetTeamInjuriesRequestSport: () => GetTeamInjuriesRequestSport,
519
647
  GetTeamInjuriesResponse: () => GetTeamInjuriesResponse,
648
+ GetTeamRosterPulseRequestSport: () => GetTeamRosterPulseRequestSport,
520
649
  GetTeamScheduleRequestSport: () => GetTeamScheduleRequestSport,
521
650
  GetTeamScheduleRequestStatus: () => GetTeamScheduleRequestStatus,
522
651
  GetTrendingRequestSport: () => GetTrendingRequestSport,
@@ -539,6 +668,14 @@ var GetGamesHistoryRequestSport = {
539
668
  Mlb: "mlb"
540
669
  };
541
670
 
671
+ // api/resources/multi/types/GetOddsHistoryRequestSport.ts
672
+ var GetOddsHistoryRequestSport = {
673
+ Nfl: "nfl",
674
+ Nba: "nba",
675
+ Mlb: "mlb",
676
+ Nhl: "nhl"
677
+ };
678
+
542
679
  // api/resources/multi/types/GetPlayerAlphaMetricsRequestSport.ts
543
680
  var GetPlayerAlphaMetricsRequestSport = {
544
681
  Nfl: "nfl",
@@ -603,6 +740,14 @@ var GetTeamInjuriesResponse;
603
740
  })(Data = GetTeamInjuriesResponse2.Data || (GetTeamInjuriesResponse2.Data = {}));
604
741
  })(GetTeamInjuriesResponse || (GetTeamInjuriesResponse = {}));
605
742
 
743
+ // api/resources/multi/types/GetTeamRosterPulseRequestSport.ts
744
+ var GetTeamRosterPulseRequestSport = {
745
+ Nfl: "nfl",
746
+ Nba: "nba",
747
+ Mlb: "mlb",
748
+ Nhl: "nhl"
749
+ };
750
+
606
751
  // api/resources/multi/types/GetTeamScheduleRequestSport.ts
607
752
  var GetTeamScheduleRequestSport = {
608
753
  Nfl: "nfl",
@@ -717,9 +862,25 @@ var ListNbaTeamsRequestConference = {
717
862
  West: "West"
718
863
  };
719
864
 
865
+ // api/resources/nfl/client/requests/GetNflCustomRankingsRequest.ts
866
+ var GetNflCustomRankingsRequest;
867
+ ((GetNflCustomRankingsRequest2) => {
868
+ GetNflCustomRankingsRequest2.Position = {
869
+ Qb: "QB",
870
+ Rb: "RB",
871
+ Wr: "WR",
872
+ Te: "TE",
873
+ K: "K"
874
+ };
875
+ })(GetNflCustomRankingsRequest || (GetNflCustomRankingsRequest = {}));
876
+
720
877
  // api/resources/nfl/index.ts
721
878
  var nfl_exports = {};
722
879
  __export(nfl_exports, {
880
+ GetNflCustomRankingsRequest: () => GetNflCustomRankingsRequest,
881
+ GetNflDepthChartChangesRequestChangeType: () => GetNflDepthChartChangesRequestChangeType,
882
+ GetNflDepthChartChangesRequestPosition: () => GetNflDepthChartChangesRequestPosition,
883
+ GetNflDepthChartChangesResponse: () => GetNflDepthChartChangesResponse,
723
884
  GetNflRankingsRequestFormat: () => GetNflRankingsRequestFormat,
724
885
  GetNflRankingsRequestPosition: () => GetNflRankingsRequestPosition,
725
886
  GetNflRankingsResponse: () => GetNflRankingsResponse,
@@ -730,6 +891,39 @@ __export(nfl_exports, {
730
891
  ListNflTeamsRequestConference: () => ListNflTeamsRequestConference
731
892
  });
732
893
 
894
+ // api/resources/nfl/types/GetNflDepthChartChangesRequestChangeType.ts
895
+ var GetNflDepthChartChangesRequestChangeType = {
896
+ Promoted: "promoted",
897
+ Demoted: "demoted",
898
+ Added: "added",
899
+ Removed: "removed"
900
+ };
901
+
902
+ // api/resources/nfl/types/GetNflDepthChartChangesRequestPosition.ts
903
+ var GetNflDepthChartChangesRequestPosition = {
904
+ Qb: "QB",
905
+ Rb: "RB",
906
+ Wr: "WR",
907
+ Te: "TE"
908
+ };
909
+
910
+ // api/resources/nfl/types/GetNflDepthChartChangesResponse.ts
911
+ var GetNflDepthChartChangesResponse;
912
+ ((GetNflDepthChartChangesResponse2) => {
913
+ let Data;
914
+ ((Data2) => {
915
+ let Item;
916
+ ((Item2) => {
917
+ Item2.ChangeType = {
918
+ Promoted: "promoted",
919
+ Demoted: "demoted",
920
+ Added: "added",
921
+ Removed: "removed"
922
+ };
923
+ })(Item = Data2.Item || (Data2.Item = {}));
924
+ })(Data = GetNflDepthChartChangesResponse2.Data || (GetNflDepthChartChangesResponse2.Data = {}));
925
+ })(GetNflDepthChartChangesResponse || (GetNflDepthChartChangesResponse = {}));
926
+
733
927
  // api/resources/nfl/types/GetNflRankingsRequestFormat.ts
734
928
  var GetNflRankingsRequestFormat = {
735
929
  Ppr: "ppr",
@@ -4215,38 +4409,51 @@ var IntelligenceClient = class {
4215
4409
  }
4216
4410
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/analytics/trends");
4217
4411
  }
4218
- };
4219
-
4220
- // api/resources/mcp/client/Client.ts
4221
- var McpClient = class {
4222
- constructor(options = {}) {
4223
- this._options = normalizeClientOptionsWithAuth(options);
4224
- }
4225
4412
  /**
4226
- * Returns human-readable JSON describing the PlayCaller MCP server: endpoint URL, auth method, all available tools with descriptions, and links to documentation.
4413
+ * 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.
4227
4414
  *
4228
- * Point Cursor, Claude Desktop, or any MCP-compatible client at this URL to discover available tools automatically.
4415
+ * **Tier access:** Pro Insights, Syndicate Alpha
4229
4416
  *
4230
- * **Auth:** No authentication required for GET (tool invocation requires X-PlayCaller-Key)
4417
+ * @param {PlaycallerApi.GetIntelligenceSignalsRequest} request
4418
+ * @param {IntelligenceClient.RequestOptions} requestOptions - Request-specific configuration.
4231
4419
  *
4232
- * @param {McpClient.RequestOptions} requestOptions - Request-specific configuration.
4420
+ * @throws {@link PlaycallerApi.UnauthorizedError}
4421
+ * @throws {@link PlaycallerApi.PaymentRequiredError}
4422
+ * @throws {@link PlaycallerApi.TooManyRequestsError}
4423
+ * @throws {@link PlaycallerApi.InternalServerError}
4233
4424
  *
4234
4425
  * @example
4235
- * await client.mcp.getMcpInfo()
4426
+ * await client.intelligence.getIntelligenceSignals({
4427
+ * type: "injury",
4428
+ * since: "2026-07-10"
4429
+ * })
4236
4430
  */
4237
- getMcpInfo(requestOptions) {
4238
- return HttpResponsePromise.fromPromise(this.__getMcpInfo(requestOptions));
4431
+ getIntelligenceSignals(request = {}, requestOptions) {
4432
+ return HttpResponsePromise.fromPromise(this.__getIntelligenceSignals(request, requestOptions));
4239
4433
  }
4240
- async __getMcpInfo(requestOptions) {
4241
- const _headers = mergeHeaders(this._options?.headers, requestOptions?.headers);
4434
+ async __getIntelligenceSignals(request = {}, requestOptions) {
4435
+ const { sport, severity, type: type_, since, limit } = request;
4436
+ const _queryParams = {
4437
+ sport: sport != null ? sport : void 0,
4438
+ severity: severity != null ? severity : void 0,
4439
+ type: type_,
4440
+ since: since != null ? since : void 0,
4441
+ limit
4442
+ };
4443
+ const _authRequest = await this._options.authProvider.getAuthRequest();
4444
+ const _headers = mergeHeaders(
4445
+ _authRequest.headers,
4446
+ this._options?.headers,
4447
+ requestOptions?.headers
4448
+ );
4242
4449
  const _response = await fetcher({
4243
4450
  url: url_exports.join(
4244
4451
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
4245
- "mcp"
4452
+ "v1/intelligence/signals"
4246
4453
  ),
4247
4454
  method: "GET",
4248
4455
  headers: _headers,
4249
- queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
4456
+ queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
4250
4457
  timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
4251
4458
  maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
4252
4459
  abortSignal: requestOptions?.abortSignal,
@@ -4254,96 +4461,71 @@ var McpClient = class {
4254
4461
  logging: this._options.logging
4255
4462
  });
4256
4463
  if (_response.ok) {
4257
- return { data: _response.body, rawResponse: _response.rawResponse };
4464
+ return {
4465
+ data: _response.body,
4466
+ rawResponse: _response.rawResponse
4467
+ };
4258
4468
  }
4259
4469
  if (_response.error.reason === "status-code") {
4260
- throw new PlaycallerApiError({
4261
- statusCode: _response.error.statusCode,
4262
- body: _response.error.body,
4263
- rawResponse: _response.rawResponse
4264
- });
4470
+ switch (_response.error.statusCode) {
4471
+ case 401:
4472
+ throw new UnauthorizedError(
4473
+ _response.error.body,
4474
+ _response.rawResponse
4475
+ );
4476
+ case 402:
4477
+ throw new PaymentRequiredError(
4478
+ _response.error.body,
4479
+ _response.rawResponse
4480
+ );
4481
+ case 429:
4482
+ throw new TooManyRequestsError(
4483
+ _response.error.body,
4484
+ _response.rawResponse
4485
+ );
4486
+ case 500:
4487
+ throw new InternalServerError(
4488
+ _response.error.body,
4489
+ _response.rawResponse
4490
+ );
4491
+ default:
4492
+ throw new PlaycallerApiError({
4493
+ statusCode: _response.error.statusCode,
4494
+ body: _response.error.body,
4495
+ rawResponse: _response.rawResponse
4496
+ });
4497
+ }
4265
4498
  }
4266
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/mcp");
4499
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/intelligence/signals");
4267
4500
  }
4268
4501
  /**
4269
- * The PlayCaller MCP server implements Anthropic's Model Context Protocol over HTTP transport. Send JSON-RPC 2.0 messages to invoke sports intelligence tools from any AI application.
4270
- *
4271
- * **Available tools (10):**
4272
- * - `get_injury_signals` — Active beat reporter signals filtered by sport/severity
4273
- * - `get_player_identity` — Resolve a player name or platform ID across ESPN, Sleeper, Yahoo, NFL.com
4274
- * - `get_anomaly_scores` — Players with usage patterns deviating from 3-season baseline (score 0–100)
4275
- * - `get_prediction_markets` — Active Kalshi prop markets with AI confidence scores
4276
- * - `get_player_projections` — AI fantasy point projections using recent game logs and injury signals
4277
- * - `get_player_stats` — Game log for any player by name across NFL/MLB/NBA historical_performance
4278
- * - `get_team_roster` — Active roster for any team by sport and abbreviation
4279
- * - `get_games` — Schedule and scores for all 9 sports (NFL, MLB, NBA, NHL, CFB, Soccer, Tennis, Golf, UFC)
4280
- * - `get_standings` — Division/conference standings for any sport and season
4281
- * - `get_player_dossier` — Consolidated single-call profile: identity + injury + anomaly score + recent stats
4282
- *
4283
- * **Config for Cursor (.cursor/mcp.json):**
4284
- * ```json
4285
- * {
4286
- * "mcpServers": {
4287
- * "playcaller": {
4288
- * "url": "https://playcallerapp.com/mcp",
4289
- * "headers": { "X-PlayCaller-Key": "YOUR_API_KEY" }
4290
- * }
4291
- * }
4292
- * }
4293
- * ```
4294
- *
4295
- * **Get a free trial key instantly — no card required:**
4296
- * ```bash
4297
- * curl -X POST https://playcallerapp.com/mcp/start-trial \
4298
- * -H "Content-Type: application/json" \
4299
- * -d '{"email": "you@example.com"}'
4300
- * ```
4502
+ * 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.
4301
4503
  *
4302
- * **Tier access:** Developer Sandbox, Build, Growth, Pro Insights, Syndicate Alpha
4303
- *
4304
- * @param {PlaycallerApi.InvokeMcpToolRequest} request
4305
- * @param {McpClient.RequestOptions} requestOptions - Request-specific configuration.
4504
+ * **Tier access:** Pro Insights, Syndicate Alpha
4306
4505
  *
4307
- * @example
4308
- * await client.mcp.invokeMcpTool({
4309
- * jsonrpc: "2.0",
4310
- * id: 1,
4311
- * method: "tools/list"
4312
- * })
4506
+ * @param {PlaycallerApi.GetModelPredictionsRequest} request
4507
+ * @param {IntelligenceClient.RequestOptions} requestOptions - Request-specific configuration.
4313
4508
  *
4314
- * @example
4315
- * await client.mcp.invokeMcpTool({
4316
- * jsonrpc: "2.0",
4317
- * id: 2,
4318
- * method: "tools/call",
4319
- * params: {
4320
- * name: "get_injury_signals",
4321
- * arguments: {
4322
- * "sport": "nfl",
4323
- * "severity": "high",
4324
- * "limit": 5
4325
- * }
4326
- * }
4327
- * })
4509
+ * @throws {@link PlaycallerApi.UnauthorizedError}
4510
+ * @throws {@link PlaycallerApi.PaymentRequiredError}
4511
+ * @throws {@link PlaycallerApi.TooManyRequestsError}
4512
+ * @throws {@link PlaycallerApi.InternalServerError}
4328
4513
  *
4329
4514
  * @example
4330
- * await client.mcp.invokeMcpTool({
4331
- * jsonrpc: "2.0",
4332
- * id: 3,
4333
- * method: "tools/call",
4334
- * params: {
4335
- * name: "get_player_identity",
4336
- * arguments: {
4337
- * "name": "Christian McCaffrey",
4338
- * "sport": "nfl"
4339
- * }
4340
- * }
4515
+ * await client.intelligence.getModelPredictions({
4516
+ * playerId: "playerId"
4341
4517
  * })
4342
4518
  */
4343
- invokeMcpTool(request, requestOptions) {
4344
- return HttpResponsePromise.fromPromise(this.__invokeMcpTool(request, requestOptions));
4519
+ getModelPredictions(request, requestOptions) {
4520
+ return HttpResponsePromise.fromPromise(this.__getModelPredictions(request, requestOptions));
4345
4521
  }
4346
- async __invokeMcpTool(request, requestOptions) {
4522
+ async __getModelPredictions(request, requestOptions) {
4523
+ const { playerId, limit, season, model_type: modelType } = request;
4524
+ const _queryParams = {
4525
+ limit,
4526
+ season,
4527
+ model_type: modelType
4528
+ };
4347
4529
  const _authRequest = await this._options.authProvider.getAuthRequest();
4348
4530
  const _headers = mergeHeaders(
4349
4531
  _authRequest.headers,
@@ -4353,14 +4535,11 @@ var McpClient = class {
4353
4535
  const _response = await fetcher({
4354
4536
  url: url_exports.join(
4355
4537
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
4356
- "mcp"
4538
+ `v1/model/predictions/${url_exports.encodePathParam(playerId)}`
4357
4539
  ),
4358
- method: "POST",
4540
+ method: "GET",
4359
4541
  headers: _headers,
4360
- contentType: "application/json",
4361
- queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
4362
- requestType: "json",
4363
- body: request,
4542
+ queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
4364
4543
  timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
4365
4544
  maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
4366
4545
  abortSignal: requestOptions?.abortSignal,
@@ -4368,44 +4547,273 @@ var McpClient = class {
4368
4547
  logging: this._options.logging
4369
4548
  });
4370
4549
  if (_response.ok) {
4371
- return { data: _response.body, rawResponse: _response.rawResponse };
4372
- }
4373
- if (_response.error.reason === "status-code") {
4374
- throw new PlaycallerApiError({
4375
- statusCode: _response.error.statusCode,
4376
- body: _response.error.body,
4550
+ return {
4551
+ data: _response.body,
4377
4552
  rawResponse: _response.rawResponse
4378
- });
4553
+ };
4379
4554
  }
4380
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/mcp");
4381
- }
4382
- /**
4383
- * Provisions a 14-day Sandbox API key and returns it immediately in the response body — no email verification gate, no credit card required. Use this to start calling PlayCaller MCP tools from Claude Desktop, Cursor, Windsurf, or any MCP-compatible AI agent within seconds.
4384
- *
4385
- * **Rate limit:** 5 requests per IP per hour
4555
+ if (_response.error.reason === "status-code") {
4556
+ switch (_response.error.statusCode) {
4557
+ case 401:
4558
+ throw new UnauthorizedError(
4559
+ _response.error.body,
4560
+ _response.rawResponse
4561
+ );
4562
+ case 402:
4563
+ throw new PaymentRequiredError(
4564
+ _response.error.body,
4565
+ _response.rawResponse
4566
+ );
4567
+ case 429:
4568
+ throw new TooManyRequestsError(
4569
+ _response.error.body,
4570
+ _response.rawResponse
4571
+ );
4572
+ case 500:
4573
+ throw new InternalServerError(
4574
+ _response.error.body,
4575
+ _response.rawResponse
4576
+ );
4577
+ default:
4578
+ throw new PlaycallerApiError({
4579
+ statusCode: _response.error.statusCode,
4580
+ body: _response.error.body,
4581
+ rawResponse: _response.rawResponse
4582
+ });
4583
+ }
4584
+ }
4585
+ return handleNonStatusCodeError(
4586
+ _response.error,
4587
+ _response.rawResponse,
4588
+ "GET",
4589
+ "/v1/model/predictions/{playerId}"
4590
+ );
4591
+ }
4592
+ /**
4593
+ * 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.
4386
4594
  *
4387
- * **Trial limits:** 200 requests/day for 14 days (Sandbox tier). Upgrade at playcallerapp.com/developer#pricing to keep access.
4595
+ * **Tier access:** Growth, Pro Insights, Syndicate Alpha
4388
4596
  *
4389
- * @param {PlaycallerApi.StartMcpTrialRequest} request
4390
- * @param {McpClient.RequestOptions} requestOptions - Request-specific configuration.
4597
+ * @param {PlaycallerApi.GetWaiverPriorityRequest} request
4598
+ * @param {IntelligenceClient.RequestOptions} requestOptions - Request-specific configuration.
4391
4599
  *
4392
- * @throws {@link PlaycallerApi.BadRequestError}
4600
+ * @throws {@link PlaycallerApi.UnauthorizedError}
4601
+ * @throws {@link PlaycallerApi.PaymentRequiredError}
4393
4602
  * @throws {@link PlaycallerApi.TooManyRequestsError}
4603
+ * @throws {@link PlaycallerApi.InternalServerError}
4394
4604
  *
4395
4605
  * @example
4396
- * await client.mcp.startMcpTrial({
4397
- * email: "dev@example.com"
4606
+ * await client.intelligence.getWaiverPriority({
4607
+ * sport: "nfl"
4398
4608
  * })
4399
4609
  */
4400
- startMcpTrial(request, requestOptions) {
4401
- return HttpResponsePromise.fromPromise(this.__startMcpTrial(request, requestOptions));
4610
+ getWaiverPriority(request, requestOptions) {
4611
+ return HttpResponsePromise.fromPromise(this.__getWaiverPriority(request, requestOptions));
4402
4612
  }
4403
- async __startMcpTrial(request, requestOptions) {
4613
+ async __getWaiverPriority(request, requestOptions) {
4614
+ const { sport, limit, position, exclude_injured: excludeInjured } = request;
4615
+ const _queryParams = {
4616
+ limit,
4617
+ position,
4618
+ exclude_injured: excludeInjured
4619
+ };
4620
+ const _authRequest = await this._options.authProvider.getAuthRequest();
4621
+ const _headers = mergeHeaders(
4622
+ _authRequest.headers,
4623
+ this._options?.headers,
4624
+ requestOptions?.headers
4625
+ );
4626
+ const _response = await fetcher({
4627
+ url: url_exports.join(
4628
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
4629
+ `v1/${url_exports.encodePathParam(sport)}/waiver-priority`
4630
+ ),
4631
+ method: "GET",
4632
+ headers: _headers,
4633
+ queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
4634
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
4635
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
4636
+ abortSignal: requestOptions?.abortSignal,
4637
+ fetchFn: this._options?.fetch,
4638
+ logging: this._options.logging
4639
+ });
4640
+ if (_response.ok) {
4641
+ return {
4642
+ data: _response.body,
4643
+ rawResponse: _response.rawResponse
4644
+ };
4645
+ }
4646
+ if (_response.error.reason === "status-code") {
4647
+ switch (_response.error.statusCode) {
4648
+ case 401:
4649
+ throw new UnauthorizedError(
4650
+ _response.error.body,
4651
+ _response.rawResponse
4652
+ );
4653
+ case 402:
4654
+ throw new PaymentRequiredError(
4655
+ _response.error.body,
4656
+ _response.rawResponse
4657
+ );
4658
+ case 429:
4659
+ throw new TooManyRequestsError(
4660
+ _response.error.body,
4661
+ _response.rawResponse
4662
+ );
4663
+ case 500:
4664
+ throw new InternalServerError(
4665
+ _response.error.body,
4666
+ _response.rawResponse
4667
+ );
4668
+ default:
4669
+ throw new PlaycallerApiError({
4670
+ statusCode: _response.error.statusCode,
4671
+ body: _response.error.body,
4672
+ rawResponse: _response.rawResponse
4673
+ });
4674
+ }
4675
+ }
4676
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/{sport}/waiver-priority");
4677
+ }
4678
+ };
4679
+
4680
+ // api/resources/mcp/client/Client.ts
4681
+ var McpClient = class {
4682
+ constructor(options = {}) {
4683
+ this._options = normalizeClientOptionsWithAuth(options);
4684
+ }
4685
+ /**
4686
+ * Returns human-readable JSON describing the PlayCaller MCP server: endpoint URL, auth method, all available tools with descriptions, and links to documentation.
4687
+ *
4688
+ * Point Cursor, Claude Desktop, or any MCP-compatible client at this URL to discover available tools automatically.
4689
+ *
4690
+ * **Auth:** No authentication required for GET (tool invocation requires X-PlayCaller-Key)
4691
+ *
4692
+ * @param {McpClient.RequestOptions} requestOptions - Request-specific configuration.
4693
+ *
4694
+ * @example
4695
+ * await client.mcp.getMcpInfo()
4696
+ */
4697
+ getMcpInfo(requestOptions) {
4698
+ return HttpResponsePromise.fromPromise(this.__getMcpInfo(requestOptions));
4699
+ }
4700
+ async __getMcpInfo(requestOptions) {
4404
4701
  const _headers = mergeHeaders(this._options?.headers, requestOptions?.headers);
4405
4702
  const _response = await fetcher({
4406
4703
  url: url_exports.join(
4407
4704
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
4408
- "mcp/start-trial"
4705
+ "mcp"
4706
+ ),
4707
+ method: "GET",
4708
+ headers: _headers,
4709
+ queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
4710
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
4711
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
4712
+ abortSignal: requestOptions?.abortSignal,
4713
+ fetchFn: this._options?.fetch,
4714
+ logging: this._options.logging
4715
+ });
4716
+ if (_response.ok) {
4717
+ return { data: _response.body, rawResponse: _response.rawResponse };
4718
+ }
4719
+ if (_response.error.reason === "status-code") {
4720
+ throw new PlaycallerApiError({
4721
+ statusCode: _response.error.statusCode,
4722
+ body: _response.error.body,
4723
+ rawResponse: _response.rawResponse
4724
+ });
4725
+ }
4726
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/mcp");
4727
+ }
4728
+ /**
4729
+ * The PlayCaller MCP server implements Anthropic's Model Context Protocol over HTTP transport. Send JSON-RPC 2.0 messages to invoke sports intelligence tools from any AI application.
4730
+ *
4731
+ * **Available tools (10):**
4732
+ * - `get_injury_signals` — Active beat reporter signals filtered by sport/severity
4733
+ * - `get_player_identity` — Resolve a player name or platform ID across ESPN, Sleeper, Yahoo, NFL.com
4734
+ * - `get_anomaly_scores` — Players with usage patterns deviating from 3-season baseline (score 0–100)
4735
+ * - `get_prediction_markets` — Active Kalshi prop markets with AI confidence scores
4736
+ * - `get_player_projections` — AI fantasy point projections using recent game logs and injury signals
4737
+ * - `get_player_stats` — Game log for any player by name across NFL/MLB/NBA historical_performance
4738
+ * - `get_team_roster` — Active roster for any team by sport and abbreviation
4739
+ * - `get_games` — Schedule and scores for all 9 sports (NFL, MLB, NBA, NHL, CFB, Soccer, Tennis, Golf, UFC)
4740
+ * - `get_standings` — Division/conference standings for any sport and season
4741
+ * - `get_player_dossier` — Consolidated single-call profile: identity + injury + anomaly score + recent stats
4742
+ *
4743
+ * **Config for Cursor (.cursor/mcp.json):**
4744
+ * ```json
4745
+ * {
4746
+ * "mcpServers": {
4747
+ * "playcaller": {
4748
+ * "url": "https://playcallerapp.com/mcp",
4749
+ * "headers": { "X-PlayCaller-Key": "YOUR_API_KEY" }
4750
+ * }
4751
+ * }
4752
+ * }
4753
+ * ```
4754
+ *
4755
+ * **Get a free trial key instantly — no card required:**
4756
+ * ```bash
4757
+ * curl -X POST https://playcallerapp.com/mcp/start-trial \
4758
+ * -H "Content-Type: application/json" \
4759
+ * -d '{"email": "you@example.com"}'
4760
+ * ```
4761
+ *
4762
+ * **Tier access:** Developer Sandbox, Build, Growth, Pro Insights, Syndicate Alpha
4763
+ *
4764
+ * @param {PlaycallerApi.InvokeMcpToolRequest} request
4765
+ * @param {McpClient.RequestOptions} requestOptions - Request-specific configuration.
4766
+ *
4767
+ * @example
4768
+ * await client.mcp.invokeMcpTool({
4769
+ * jsonrpc: "2.0",
4770
+ * id: 1,
4771
+ * method: "tools/list"
4772
+ * })
4773
+ *
4774
+ * @example
4775
+ * await client.mcp.invokeMcpTool({
4776
+ * jsonrpc: "2.0",
4777
+ * id: 2,
4778
+ * method: "tools/call",
4779
+ * params: {
4780
+ * name: "get_injury_signals",
4781
+ * arguments: {
4782
+ * "sport": "nfl",
4783
+ * "severity": "high",
4784
+ * "limit": 5
4785
+ * }
4786
+ * }
4787
+ * })
4788
+ *
4789
+ * @example
4790
+ * await client.mcp.invokeMcpTool({
4791
+ * jsonrpc: "2.0",
4792
+ * id: 3,
4793
+ * method: "tools/call",
4794
+ * params: {
4795
+ * name: "get_player_identity",
4796
+ * arguments: {
4797
+ * "name": "Christian McCaffrey",
4798
+ * "sport": "nfl"
4799
+ * }
4800
+ * }
4801
+ * })
4802
+ */
4803
+ invokeMcpTool(request, requestOptions) {
4804
+ return HttpResponsePromise.fromPromise(this.__invokeMcpTool(request, requestOptions));
4805
+ }
4806
+ async __invokeMcpTool(request, requestOptions) {
4807
+ const _authRequest = await this._options.authProvider.getAuthRequest();
4808
+ const _headers = mergeHeaders(
4809
+ _authRequest.headers,
4810
+ this._options?.headers,
4811
+ requestOptions?.headers
4812
+ );
4813
+ const _response = await fetcher({
4814
+ url: url_exports.join(
4815
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
4816
+ "mcp"
4409
4817
  ),
4410
4818
  method: "POST",
4411
4819
  headers: _headers,
@@ -4422,15 +4830,541 @@ var McpClient = class {
4422
4830
  if (_response.ok) {
4423
4831
  return { data: _response.body, rawResponse: _response.rawResponse };
4424
4832
  }
4833
+ if (_response.error.reason === "status-code") {
4834
+ throw new PlaycallerApiError({
4835
+ statusCode: _response.error.statusCode,
4836
+ body: _response.error.body,
4837
+ rawResponse: _response.rawResponse
4838
+ });
4839
+ }
4840
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/mcp");
4841
+ }
4842
+ /**
4843
+ * Provisions a 14-day Sandbox API key and returns it immediately in the response body — no email verification gate, no credit card required. Use this to start calling PlayCaller MCP tools from Claude Desktop, Cursor, Windsurf, or any MCP-compatible AI agent within seconds.
4844
+ *
4845
+ * **Rate limit:** 5 requests per IP per hour
4846
+ *
4847
+ * **Trial limits:** 200 requests/day for 14 days (Sandbox tier). Upgrade at playcallerapp.com/developer#pricing to keep access.
4848
+ *
4849
+ * @param {PlaycallerApi.StartMcpTrialRequest} request
4850
+ * @param {McpClient.RequestOptions} requestOptions - Request-specific configuration.
4851
+ *
4852
+ * @throws {@link PlaycallerApi.BadRequestError}
4853
+ * @throws {@link PlaycallerApi.TooManyRequestsError}
4854
+ *
4855
+ * @example
4856
+ * await client.mcp.startMcpTrial({
4857
+ * email: "dev@example.com"
4858
+ * })
4859
+ */
4860
+ startMcpTrial(request, requestOptions) {
4861
+ return HttpResponsePromise.fromPromise(this.__startMcpTrial(request, requestOptions));
4862
+ }
4863
+ async __startMcpTrial(request, requestOptions) {
4864
+ const _headers = mergeHeaders(this._options?.headers, requestOptions?.headers);
4865
+ const _response = await fetcher({
4866
+ url: url_exports.join(
4867
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
4868
+ "mcp/start-trial"
4869
+ ),
4870
+ method: "POST",
4871
+ headers: _headers,
4872
+ contentType: "application/json",
4873
+ queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
4874
+ requestType: "json",
4875
+ body: request,
4876
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
4877
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
4878
+ abortSignal: requestOptions?.abortSignal,
4879
+ fetchFn: this._options?.fetch,
4880
+ logging: this._options.logging
4881
+ });
4882
+ if (_response.ok) {
4883
+ return { data: _response.body, rawResponse: _response.rawResponse };
4884
+ }
4885
+ if (_response.error.reason === "status-code") {
4886
+ switch (_response.error.statusCode) {
4887
+ case 400:
4888
+ throw new BadRequestError(_response.error.body, _response.rawResponse);
4889
+ case 429:
4890
+ throw new TooManyRequestsError(
4891
+ _response.error.body,
4892
+ _response.rawResponse
4893
+ );
4894
+ default:
4895
+ throw new PlaycallerApiError({
4896
+ statusCode: _response.error.statusCode,
4897
+ body: _response.error.body,
4898
+ rawResponse: _response.rawResponse
4899
+ });
4900
+ }
4901
+ }
4902
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/mcp/start-trial");
4903
+ }
4904
+ };
4905
+
4906
+ // api/resources/mlb/client/Client.ts
4907
+ var MlbClient = class {
4908
+ constructor(options = {}) {
4909
+ this._options = normalizeClientOptionsWithAuth(options);
4910
+ }
4911
+ /**
4912
+ * Returns all active MLB players (966 total). Positions, teams, and statuses are normalized from MLB Stats API and reconciled against ESPN for accuracy.
4913
+ *
4914
+ * Filter by position and team to build DFS pools or lineup constraints without doing the normalization yourself.
4915
+ *
4916
+ * **Tier access:** Developer Sandbox, Build, Growth, Pro Insights, Syndicate Alpha
4917
+ *
4918
+ * @param {PlaycallerApi.ListMlbPlayersRequest} request
4919
+ * @param {MlbClient.RequestOptions} requestOptions - Request-specific configuration.
4920
+ *
4921
+ * @throws {@link PlaycallerApi.UnauthorizedError}
4922
+ * @throws {@link PlaycallerApi.TooManyRequestsError}
4923
+ * @throws {@link PlaycallerApi.InternalServerError}
4924
+ *
4925
+ * @example
4926
+ * await client.mlb.listMlbPlayers({
4927
+ * team: "NYY",
4928
+ * search: "Ohtani"
4929
+ * })
4930
+ */
4931
+ listMlbPlayers(request = {}, requestOptions) {
4932
+ return HttpResponsePromise.fromPromise(this.__listMlbPlayers(request, requestOptions));
4933
+ }
4934
+ async __listMlbPlayers(request = {}, requestOptions) {
4935
+ const { position, team, status, search, limit, offset } = request;
4936
+ const _queryParams = {
4937
+ position: position != null ? position : void 0,
4938
+ team,
4939
+ status: status != null ? status : void 0,
4940
+ search,
4941
+ limit,
4942
+ offset
4943
+ };
4944
+ const _authRequest = await this._options.authProvider.getAuthRequest();
4945
+ const _headers = mergeHeaders(
4946
+ _authRequest.headers,
4947
+ this._options?.headers,
4948
+ requestOptions?.headers
4949
+ );
4950
+ const _response = await fetcher({
4951
+ url: url_exports.join(
4952
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
4953
+ "v1/mlb/players"
4954
+ ),
4955
+ method: "GET",
4956
+ headers: _headers,
4957
+ queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
4958
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
4959
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
4960
+ abortSignal: requestOptions?.abortSignal,
4961
+ fetchFn: this._options?.fetch,
4962
+ logging: this._options.logging
4963
+ });
4964
+ if (_response.ok) {
4965
+ return { data: _response.body, rawResponse: _response.rawResponse };
4966
+ }
4967
+ if (_response.error.reason === "status-code") {
4968
+ switch (_response.error.statusCode) {
4969
+ case 401:
4970
+ throw new UnauthorizedError(
4971
+ _response.error.body,
4972
+ _response.rawResponse
4973
+ );
4974
+ case 429:
4975
+ throw new TooManyRequestsError(
4976
+ _response.error.body,
4977
+ _response.rawResponse
4978
+ );
4979
+ case 500:
4980
+ throw new InternalServerError(
4981
+ _response.error.body,
4982
+ _response.rawResponse
4983
+ );
4984
+ default:
4985
+ throw new PlaycallerApiError({
4986
+ statusCode: _response.error.statusCode,
4987
+ body: _response.error.body,
4988
+ rawResponse: _response.rawResponse
4989
+ });
4990
+ }
4991
+ }
4992
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/mlb/players");
4993
+ }
4994
+ /**
4995
+ * Returns the full profile for a single MLB player by PlayCaller ID. Use `/v1/mlb/players?search=` to find IDs by name.
4996
+ *
4997
+ * **Tier access:** Developer Sandbox, Build, Growth, Pro Insights, Syndicate Alpha
4998
+ *
4999
+ * @param {PlaycallerApi.GetMlbPlayerRequest} request
5000
+ * @param {MlbClient.RequestOptions} requestOptions - Request-specific configuration.
5001
+ *
5002
+ * @throws {@link PlaycallerApi.UnauthorizedError}
5003
+ * @throws {@link PlaycallerApi.NotFoundError}
5004
+ * @throws {@link PlaycallerApi.TooManyRequestsError}
5005
+ * @throws {@link PlaycallerApi.InternalServerError}
5006
+ *
5007
+ * @example
5008
+ * await client.mlb.getMlbPlayer({
5009
+ * id: "pc_mlb_001234"
5010
+ * })
5011
+ */
5012
+ getMlbPlayer(request, requestOptions) {
5013
+ return HttpResponsePromise.fromPromise(this.__getMlbPlayer(request, requestOptions));
5014
+ }
5015
+ async __getMlbPlayer(request, requestOptions) {
5016
+ const { id } = request;
5017
+ const _authRequest = await this._options.authProvider.getAuthRequest();
5018
+ const _headers = mergeHeaders(
5019
+ _authRequest.headers,
5020
+ this._options?.headers,
5021
+ requestOptions?.headers
5022
+ );
5023
+ const _response = await fetcher({
5024
+ url: url_exports.join(
5025
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
5026
+ `v1/mlb/players/${url_exports.encodePathParam(id)}`
5027
+ ),
5028
+ method: "GET",
5029
+ headers: _headers,
5030
+ queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
5031
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
5032
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
5033
+ abortSignal: requestOptions?.abortSignal,
5034
+ fetchFn: this._options?.fetch,
5035
+ logging: this._options.logging
5036
+ });
5037
+ if (_response.ok) {
5038
+ return { data: _response.body, rawResponse: _response.rawResponse };
5039
+ }
5040
+ if (_response.error.reason === "status-code") {
5041
+ switch (_response.error.statusCode) {
5042
+ case 401:
5043
+ throw new UnauthorizedError(
5044
+ _response.error.body,
5045
+ _response.rawResponse
5046
+ );
5047
+ case 404:
5048
+ throw new NotFoundError(_response.error.body, _response.rawResponse);
5049
+ case 429:
5050
+ throw new TooManyRequestsError(
5051
+ _response.error.body,
5052
+ _response.rawResponse
5053
+ );
5054
+ case 500:
5055
+ throw new InternalServerError(
5056
+ _response.error.body,
5057
+ _response.rawResponse
5058
+ );
5059
+ default:
5060
+ throw new PlaycallerApiError({
5061
+ statusCode: _response.error.statusCode,
5062
+ body: _response.error.body,
5063
+ rawResponse: _response.rawResponse
5064
+ });
5065
+ }
5066
+ }
5067
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/mlb/players/{id}");
5068
+ }
5069
+ /**
5070
+ * Returns daily batting and pitching stat lines with pre-calculated fantasy points. Useful for tracking recent form, streaks, and park-factor-adjusted production.
5071
+ *
5072
+ * **Tier access:** Developer Sandbox, Build, Growth, Pro Insights, Syndicate Alpha
5073
+ *
5074
+ * @param {PlaycallerApi.GetMlbPlayerStatsRequest} request
5075
+ * @param {MlbClient.RequestOptions} requestOptions - Request-specific configuration.
5076
+ *
5077
+ * @throws {@link PlaycallerApi.UnauthorizedError}
5078
+ * @throws {@link PlaycallerApi.NotFoundError}
5079
+ * @throws {@link PlaycallerApi.TooManyRequestsError}
5080
+ * @throws {@link PlaycallerApi.InternalServerError}
5081
+ *
5082
+ * @example
5083
+ * await client.mlb.getMlbPlayerStats({
5084
+ * id: "pc_mlb_001234",
5085
+ * date: "2026-05-01"
5086
+ * })
5087
+ */
5088
+ getMlbPlayerStats(request, requestOptions) {
5089
+ return HttpResponsePromise.fromPromise(this.__getMlbPlayerStats(request, requestOptions));
5090
+ }
5091
+ async __getMlbPlayerStats(request, requestOptions) {
5092
+ const { id, date, limit } = request;
5093
+ const _queryParams = {
5094
+ date: date != null ? date : void 0,
5095
+ limit
5096
+ };
5097
+ const _authRequest = await this._options.authProvider.getAuthRequest();
5098
+ const _headers = mergeHeaders(
5099
+ _authRequest.headers,
5100
+ this._options?.headers,
5101
+ requestOptions?.headers
5102
+ );
5103
+ const _response = await fetcher({
5104
+ url: url_exports.join(
5105
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
5106
+ `v1/mlb/players/${url_exports.encodePathParam(id)}/stats`
5107
+ ),
5108
+ method: "GET",
5109
+ headers: _headers,
5110
+ queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
5111
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
5112
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
5113
+ abortSignal: requestOptions?.abortSignal,
5114
+ fetchFn: this._options?.fetch,
5115
+ logging: this._options.logging
5116
+ });
5117
+ if (_response.ok) {
5118
+ return {
5119
+ data: _response.body,
5120
+ rawResponse: _response.rawResponse
5121
+ };
5122
+ }
5123
+ if (_response.error.reason === "status-code") {
5124
+ switch (_response.error.statusCode) {
5125
+ case 401:
5126
+ throw new UnauthorizedError(
5127
+ _response.error.body,
5128
+ _response.rawResponse
5129
+ );
5130
+ case 404:
5131
+ throw new NotFoundError(_response.error.body, _response.rawResponse);
5132
+ case 429:
5133
+ throw new TooManyRequestsError(
5134
+ _response.error.body,
5135
+ _response.rawResponse
5136
+ );
5137
+ case 500:
5138
+ throw new InternalServerError(
5139
+ _response.error.body,
5140
+ _response.rawResponse
5141
+ );
5142
+ default:
5143
+ throw new PlaycallerApiError({
5144
+ statusCode: _response.error.statusCode,
5145
+ body: _response.error.body,
5146
+ rawResponse: _response.rawResponse
5147
+ });
5148
+ }
5149
+ }
5150
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/mlb/players/{id}/stats");
5151
+ }
5152
+ /**
5153
+ * Returns metadata for all 30 MLB teams including roster depth. Abbreviations are normalized (e.g. NYY, BOS, LAD).
5154
+ *
5155
+ * **Tier access:** Developer Sandbox, Build, Growth, Pro Insights, Syndicate Alpha
5156
+ *
5157
+ * @param {MlbClient.RequestOptions} requestOptions - Request-specific configuration.
5158
+ *
5159
+ * @throws {@link PlaycallerApi.UnauthorizedError}
5160
+ * @throws {@link PlaycallerApi.TooManyRequestsError}
5161
+ * @throws {@link PlaycallerApi.InternalServerError}
5162
+ *
5163
+ * @example
5164
+ * await client.mlb.listMlbTeams()
5165
+ */
5166
+ listMlbTeams(requestOptions) {
5167
+ return HttpResponsePromise.fromPromise(this.__listMlbTeams(requestOptions));
5168
+ }
5169
+ async __listMlbTeams(requestOptions) {
5170
+ const _authRequest = await this._options.authProvider.getAuthRequest();
5171
+ const _headers = mergeHeaders(
5172
+ _authRequest.headers,
5173
+ this._options?.headers,
5174
+ requestOptions?.headers
5175
+ );
5176
+ const _response = await fetcher({
5177
+ url: url_exports.join(
5178
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
5179
+ "v1/mlb/teams"
5180
+ ),
5181
+ method: "GET",
5182
+ headers: _headers,
5183
+ queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
5184
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
5185
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
5186
+ abortSignal: requestOptions?.abortSignal,
5187
+ fetchFn: this._options?.fetch,
5188
+ logging: this._options.logging
5189
+ });
5190
+ if (_response.ok) {
5191
+ return { data: _response.body, rawResponse: _response.rawResponse };
5192
+ }
5193
+ if (_response.error.reason === "status-code") {
5194
+ switch (_response.error.statusCode) {
5195
+ case 401:
5196
+ throw new UnauthorizedError(
5197
+ _response.error.body,
5198
+ _response.rawResponse
5199
+ );
5200
+ case 429:
5201
+ throw new TooManyRequestsError(
5202
+ _response.error.body,
5203
+ _response.rawResponse
5204
+ );
5205
+ case 500:
5206
+ throw new InternalServerError(
5207
+ _response.error.body,
5208
+ _response.rawResponse
5209
+ );
5210
+ default:
5211
+ throw new PlaycallerApiError({
5212
+ statusCode: _response.error.statusCode,
5213
+ body: _response.error.body,
5214
+ rawResponse: _response.rawResponse
5215
+ });
5216
+ }
5217
+ }
5218
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/mlb/teams");
5219
+ }
5220
+ /**
5221
+ * Returns the active roster for a specific team. Filter by position to pull only starting pitchers or corner infielders for lineup construction.
5222
+ *
5223
+ * **Tier access:** Developer Sandbox, Build, Growth, Pro Insights, Syndicate Alpha
5224
+ *
5225
+ * @param {PlaycallerApi.GetMlbTeamRosterRequest} request
5226
+ * @param {MlbClient.RequestOptions} requestOptions - Request-specific configuration.
5227
+ *
5228
+ * @throws {@link PlaycallerApi.UnauthorizedError}
5229
+ * @throws {@link PlaycallerApi.NotFoundError}
5230
+ * @throws {@link PlaycallerApi.TooManyRequestsError}
5231
+ * @throws {@link PlaycallerApi.InternalServerError}
5232
+ *
5233
+ * @example
5234
+ * await client.mlb.getMlbTeamRoster({
5235
+ * team: "NYY"
5236
+ * })
5237
+ */
5238
+ getMlbTeamRoster(request, requestOptions) {
5239
+ return HttpResponsePromise.fromPromise(this.__getMlbTeamRoster(request, requestOptions));
5240
+ }
5241
+ async __getMlbTeamRoster(request, requestOptions) {
5242
+ const { team, position } = request;
5243
+ const _queryParams = {
5244
+ position: position != null ? position : void 0
5245
+ };
5246
+ const _authRequest = await this._options.authProvider.getAuthRequest();
5247
+ const _headers = mergeHeaders(
5248
+ _authRequest.headers,
5249
+ this._options?.headers,
5250
+ requestOptions?.headers
5251
+ );
5252
+ const _response = await fetcher({
5253
+ url: url_exports.join(
5254
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
5255
+ `v1/mlb/teams/${url_exports.encodePathParam(team)}/roster`
5256
+ ),
5257
+ method: "GET",
5258
+ headers: _headers,
5259
+ queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
5260
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
5261
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
5262
+ abortSignal: requestOptions?.abortSignal,
5263
+ fetchFn: this._options?.fetch,
5264
+ logging: this._options.logging
5265
+ });
5266
+ if (_response.ok) {
5267
+ return {
5268
+ data: _response.body,
5269
+ rawResponse: _response.rawResponse
5270
+ };
5271
+ }
5272
+ if (_response.error.reason === "status-code") {
5273
+ switch (_response.error.statusCode) {
5274
+ case 401:
5275
+ throw new UnauthorizedError(
5276
+ _response.error.body,
5277
+ _response.rawResponse
5278
+ );
5279
+ case 404:
5280
+ throw new NotFoundError(_response.error.body, _response.rawResponse);
5281
+ case 429:
5282
+ throw new TooManyRequestsError(
5283
+ _response.error.body,
5284
+ _response.rawResponse
5285
+ );
5286
+ case 500:
5287
+ throw new InternalServerError(
5288
+ _response.error.body,
5289
+ _response.rawResponse
5290
+ );
5291
+ default:
5292
+ throw new PlaycallerApiError({
5293
+ statusCode: _response.error.statusCode,
5294
+ body: _response.error.body,
5295
+ rawResponse: _response.rawResponse
5296
+ });
5297
+ }
5298
+ }
5299
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/mlb/teams/{team}/roster");
5300
+ }
5301
+ /**
5302
+ * Live inning-by-inning game state from the MLB Stats API pipeline. Defaults to today's games. Scores update on a polling cycle throughout the game day.
5303
+ *
5304
+ * **Tier access:** Developer Sandbox, Build, Growth, Pro Insights, Syndicate Alpha
5305
+ *
5306
+ * @param {PlaycallerApi.ListMlbGamesRequest} request
5307
+ * @param {MlbClient.RequestOptions} requestOptions - Request-specific configuration.
5308
+ *
5309
+ * @throws {@link PlaycallerApi.UnauthorizedError}
5310
+ * @throws {@link PlaycallerApi.TooManyRequestsError}
5311
+ * @throws {@link PlaycallerApi.InternalServerError}
5312
+ *
5313
+ * @example
5314
+ * await client.mlb.listMlbGames({
5315
+ * date: "2026-05-01"
5316
+ * })
5317
+ */
5318
+ listMlbGames(request = {}, requestOptions) {
5319
+ return HttpResponsePromise.fromPromise(this.__listMlbGames(request, requestOptions));
5320
+ }
5321
+ async __listMlbGames(request = {}, requestOptions) {
5322
+ const { date, state, limit } = request;
5323
+ const _queryParams = {
5324
+ date: date != null ? date : void 0,
5325
+ state: state != null ? state : void 0,
5326
+ limit
5327
+ };
5328
+ const _authRequest = await this._options.authProvider.getAuthRequest();
5329
+ const _headers = mergeHeaders(
5330
+ _authRequest.headers,
5331
+ this._options?.headers,
5332
+ requestOptions?.headers
5333
+ );
5334
+ const _response = await fetcher({
5335
+ url: url_exports.join(
5336
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
5337
+ "v1/mlb/games"
5338
+ ),
5339
+ method: "GET",
5340
+ headers: _headers,
5341
+ queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
5342
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
5343
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
5344
+ abortSignal: requestOptions?.abortSignal,
5345
+ fetchFn: this._options?.fetch,
5346
+ logging: this._options.logging
5347
+ });
5348
+ if (_response.ok) {
5349
+ return { data: _response.body, rawResponse: _response.rawResponse };
5350
+ }
4425
5351
  if (_response.error.reason === "status-code") {
4426
5352
  switch (_response.error.statusCode) {
4427
- case 400:
4428
- throw new BadRequestError(_response.error.body, _response.rawResponse);
5353
+ case 401:
5354
+ throw new UnauthorizedError(
5355
+ _response.error.body,
5356
+ _response.rawResponse
5357
+ );
4429
5358
  case 429:
4430
5359
  throw new TooManyRequestsError(
4431
5360
  _response.error.body,
4432
5361
  _response.rawResponse
4433
5362
  );
5363
+ case 500:
5364
+ throw new InternalServerError(
5365
+ _response.error.body,
5366
+ _response.rawResponse
5367
+ );
4434
5368
  default:
4435
5369
  throw new PlaycallerApiError({
4436
5370
  statusCode: _response.error.statusCode,
@@ -4439,23 +5373,14 @@ var McpClient = class {
4439
5373
  });
4440
5374
  }
4441
5375
  }
4442
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/mcp/start-trial");
4443
- }
4444
- };
4445
-
4446
- // api/resources/mlb/client/Client.ts
4447
- var MlbClient = class {
4448
- constructor(options = {}) {
4449
- this._options = normalizeClientOptionsWithAuth(options);
5376
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/mlb/games");
4450
5377
  }
4451
5378
  /**
4452
- * Returns all active MLB players (966 total). Positions, teams, and statuses are normalized from MLB Stats API and reconciled against ESPN for accuracy.
4453
- *
4454
- * Filter by position and team to build DFS pools or lineup constraints without doing the normalization yourself.
5379
+ * Current MLB standings by division sourced from ESPN. Includes win %, streak, home/away splits, and runs differential.
4455
5380
  *
4456
5381
  * **Tier access:** Developer Sandbox, Build, Growth, Pro Insights, Syndicate Alpha
4457
5382
  *
4458
- * @param {PlaycallerApi.ListMlbPlayersRequest} request
5383
+ * @param {PlaycallerApi.GetMlbStandingsRequest} request
4459
5384
  * @param {MlbClient.RequestOptions} requestOptions - Request-specific configuration.
4460
5385
  *
4461
5386
  * @throws {@link PlaycallerApi.UnauthorizedError}
@@ -4463,23 +5388,18 @@ var MlbClient = class {
4463
5388
  * @throws {@link PlaycallerApi.InternalServerError}
4464
5389
  *
4465
5390
  * @example
4466
- * await client.mlb.listMlbPlayers({
4467
- * team: "NYY",
4468
- * search: "Ohtani"
5391
+ * await client.mlb.getMlbStandings({
5392
+ * division: "AL East"
4469
5393
  * })
4470
5394
  */
4471
- listMlbPlayers(request = {}, requestOptions) {
4472
- return HttpResponsePromise.fromPromise(this.__listMlbPlayers(request, requestOptions));
5395
+ getMlbStandings(request = {}, requestOptions) {
5396
+ return HttpResponsePromise.fromPromise(this.__getMlbStandings(request, requestOptions));
4473
5397
  }
4474
- async __listMlbPlayers(request = {}, requestOptions) {
4475
- const { position, team, status, search, limit, offset } = request;
5398
+ async __getMlbStandings(request = {}, requestOptions) {
5399
+ const { season, division } = request;
4476
5400
  const _queryParams = {
4477
- position: position != null ? position : void 0,
4478
- team,
4479
- status: status != null ? status : void 0,
4480
- search,
4481
- limit,
4482
- offset
5401
+ season,
5402
+ division
4483
5403
  };
4484
5404
  const _authRequest = await this._options.authProvider.getAuthRequest();
4485
5405
  const _headers = mergeHeaders(
@@ -4490,7 +5410,7 @@ var MlbClient = class {
4490
5410
  const _response = await fetcher({
4491
5411
  url: url_exports.join(
4492
5412
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
4493
- "v1/mlb/players"
5413
+ "v1/mlb/standings"
4494
5414
  ),
4495
5415
  method: "GET",
4496
5416
  headers: _headers,
@@ -4502,7 +5422,10 @@ var MlbClient = class {
4502
5422
  logging: this._options.logging
4503
5423
  });
4504
5424
  if (_response.ok) {
4505
- return { data: _response.body, rawResponse: _response.rawResponse };
5425
+ return {
5426
+ data: _response.body,
5427
+ rawResponse: _response.rawResponse
5428
+ };
4506
5429
  }
4507
5430
  if (_response.error.reason === "status-code") {
4508
5431
  switch (_response.error.statusCode) {
@@ -4529,31 +5452,40 @@ var MlbClient = class {
4529
5452
  });
4530
5453
  }
4531
5454
  }
4532
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/mlb/players");
5455
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/mlb/standings");
4533
5456
  }
4534
5457
  /**
4535
- * Returns the full profile for a single MLB player by PlayCaller ID. Use `/v1/mlb/players?search=` to find IDs by name.
5458
+ * Top fantasy scorers for any game day, ranked by total points. Uses the PlayCaller scoring engine with standard roto weights (H, HR, RBI, SB, R, BB for batters; IP, K, SV for pitchers).
4536
5459
  *
4537
- * **Tier access:** Developer Sandbox, Build, Growth, Pro Insights, Syndicate Alpha
5460
+ * Useful for identifying daily stack targets and late-swap pivots before lock.
4538
5461
  *
4539
- * @param {PlaycallerApi.GetMlbPlayerRequest} request
5462
+ * **Tier access:** Pro Insights, Syndicate Alpha
5463
+ *
5464
+ * @param {PlaycallerApi.GetMlbScoringLeadersRequest} request
4540
5465
  * @param {MlbClient.RequestOptions} requestOptions - Request-specific configuration.
4541
5466
  *
4542
5467
  * @throws {@link PlaycallerApi.UnauthorizedError}
4543
- * @throws {@link PlaycallerApi.NotFoundError}
5468
+ * @throws {@link PlaycallerApi.ForbiddenError}
4544
5469
  * @throws {@link PlaycallerApi.TooManyRequestsError}
4545
5470
  * @throws {@link PlaycallerApi.InternalServerError}
4546
5471
  *
4547
5472
  * @example
4548
- * await client.mlb.getMlbPlayer({
4549
- * id: "pc_mlb_001234"
5473
+ * await client.mlb.getMlbScoringLeaders({
5474
+ * date: "2026-05-01",
5475
+ * team: "NYY"
4550
5476
  * })
4551
5477
  */
4552
- getMlbPlayer(request, requestOptions) {
4553
- return HttpResponsePromise.fromPromise(this.__getMlbPlayer(request, requestOptions));
5478
+ getMlbScoringLeaders(request = {}, requestOptions) {
5479
+ return HttpResponsePromise.fromPromise(this.__getMlbScoringLeaders(request, requestOptions));
4554
5480
  }
4555
- async __getMlbPlayer(request, requestOptions) {
4556
- const { id } = request;
5481
+ async __getMlbScoringLeaders(request = {}, requestOptions) {
5482
+ const { date, position, team, limit } = request;
5483
+ const _queryParams = {
5484
+ date: date != null ? date : void 0,
5485
+ position: position != null ? position : void 0,
5486
+ team,
5487
+ limit
5488
+ };
4557
5489
  const _authRequest = await this._options.authProvider.getAuthRequest();
4558
5490
  const _headers = mergeHeaders(
4559
5491
  _authRequest.headers,
@@ -4563,11 +5495,11 @@ var MlbClient = class {
4563
5495
  const _response = await fetcher({
4564
5496
  url: url_exports.join(
4565
5497
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
4566
- `v1/mlb/players/${url_exports.encodePathParam(id)}`
5498
+ "v1/mlb/scoring/leaders"
4567
5499
  ),
4568
5500
  method: "GET",
4569
5501
  headers: _headers,
4570
- queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
5502
+ queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
4571
5503
  timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
4572
5504
  maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
4573
5505
  abortSignal: requestOptions?.abortSignal,
@@ -4575,7 +5507,10 @@ var MlbClient = class {
4575
5507
  logging: this._options.logging
4576
5508
  });
4577
5509
  if (_response.ok) {
4578
- return { data: _response.body, rawResponse: _response.rawResponse };
5510
+ return {
5511
+ data: _response.body,
5512
+ rawResponse: _response.rawResponse
5513
+ };
4579
5514
  }
4580
5515
  if (_response.error.reason === "status-code") {
4581
5516
  switch (_response.error.statusCode) {
@@ -4584,8 +5519,11 @@ var MlbClient = class {
4584
5519
  _response.error.body,
4585
5520
  _response.rawResponse
4586
5521
  );
4587
- case 404:
4588
- throw new NotFoundError(_response.error.body, _response.rawResponse);
5522
+ case 403:
5523
+ throw new ForbiddenError(
5524
+ _response.error.body,
5525
+ _response.rawResponse
5526
+ );
4589
5527
  case 429:
4590
5528
  throw new TooManyRequestsError(
4591
5529
  _response.error.body,
@@ -4604,35 +5542,33 @@ var MlbClient = class {
4604
5542
  });
4605
5543
  }
4606
5544
  }
4607
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/mlb/players/{id}");
5545
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/mlb/scoring/leaders");
4608
5546
  }
4609
5547
  /**
4610
- * Returns daily batting and pitching stat lines with pre-calculated fantasy points. Useful for tracking recent form, streaks, and park-factor-adjusted production.
5548
+ * Top 10 players per rotisserie scoring category (HR, RBI, SB, R, BB, IP, K, SV) for a given date. Ideal for roto league managers tracking category races and daily contributions.
4611
5549
  *
4612
- * **Tier access:** Developer Sandbox, Build, Growth, Pro Insights, Syndicate Alpha
5550
+ * **Tier access:** Pro Insights, Syndicate Alpha
4613
5551
  *
4614
- * @param {PlaycallerApi.GetMlbPlayerStatsRequest} request
5552
+ * @param {PlaycallerApi.GetMlbScoringCategoriesRequest} request
4615
5553
  * @param {MlbClient.RequestOptions} requestOptions - Request-specific configuration.
4616
5554
  *
4617
5555
  * @throws {@link PlaycallerApi.UnauthorizedError}
4618
- * @throws {@link PlaycallerApi.NotFoundError}
5556
+ * @throws {@link PlaycallerApi.ForbiddenError}
4619
5557
  * @throws {@link PlaycallerApi.TooManyRequestsError}
4620
5558
  * @throws {@link PlaycallerApi.InternalServerError}
4621
5559
  *
4622
5560
  * @example
4623
- * await client.mlb.getMlbPlayerStats({
4624
- * id: "pc_mlb_001234",
5561
+ * await client.mlb.getMlbScoringCategories({
4625
5562
  * date: "2026-05-01"
4626
5563
  * })
4627
5564
  */
4628
- getMlbPlayerStats(request, requestOptions) {
4629
- return HttpResponsePromise.fromPromise(this.__getMlbPlayerStats(request, requestOptions));
5565
+ getMlbScoringCategories(request = {}, requestOptions) {
5566
+ return HttpResponsePromise.fromPromise(this.__getMlbScoringCategories(request, requestOptions));
4630
5567
  }
4631
- async __getMlbPlayerStats(request, requestOptions) {
4632
- const { id, date, limit } = request;
5568
+ async __getMlbScoringCategories(request = {}, requestOptions) {
5569
+ const { date } = request;
4633
5570
  const _queryParams = {
4634
- date: date != null ? date : void 0,
4635
- limit
5571
+ date: date != null ? date : void 0
4636
5572
  };
4637
5573
  const _authRequest = await this._options.authProvider.getAuthRequest();
4638
5574
  const _headers = mergeHeaders(
@@ -4643,7 +5579,7 @@ var MlbClient = class {
4643
5579
  const _response = await fetcher({
4644
5580
  url: url_exports.join(
4645
5581
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
4646
- `v1/mlb/players/${url_exports.encodePathParam(id)}/stats`
5582
+ "v1/mlb/scoring/categories"
4647
5583
  ),
4648
5584
  method: "GET",
4649
5585
  headers: _headers,
@@ -4667,8 +5603,11 @@ var MlbClient = class {
4667
5603
  _response.error.body,
4668
5604
  _response.rawResponse
4669
5605
  );
4670
- case 404:
4671
- throw new NotFoundError(_response.error.body, _response.rawResponse);
5606
+ case 403:
5607
+ throw new ForbiddenError(
5608
+ _response.error.body,
5609
+ _response.rawResponse
5610
+ );
4672
5611
  case 429:
4673
5612
  throw new TooManyRequestsError(
4674
5613
  _response.error.body,
@@ -4687,26 +5626,38 @@ var MlbClient = class {
4687
5626
  });
4688
5627
  }
4689
5628
  }
4690
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/mlb/players/{id}/stats");
5629
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/mlb/scoring/categories");
4691
5630
  }
4692
5631
  /**
4693
- * Returns metadata for all 30 MLB teams including roster depth. Abbreviations are normalized (e.g. NYY, BOS, LAD).
5632
+ * 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.
4694
5633
  *
4695
- * **Tier access:** Developer Sandbox, Build, Growth, Pro Insights, Syndicate Alpha
5634
+ * **Tier access:** Build, Growth, Pro Insights, Syndicate Alpha
4696
5635
  *
5636
+ * @param {PlaycallerApi.GetMlbTransactionsRequest} request
4697
5637
  * @param {MlbClient.RequestOptions} requestOptions - Request-specific configuration.
4698
5638
  *
4699
5639
  * @throws {@link PlaycallerApi.UnauthorizedError}
5640
+ * @throws {@link PlaycallerApi.PaymentRequiredError}
4700
5641
  * @throws {@link PlaycallerApi.TooManyRequestsError}
4701
5642
  * @throws {@link PlaycallerApi.InternalServerError}
4702
5643
  *
4703
5644
  * @example
4704
- * await client.mlb.listMlbTeams()
5645
+ * await client.mlb.getMlbTransactions({
5646
+ * startDate: "2026-07-10",
5647
+ * endDate: "2026-07-17",
5648
+ * type: "IL"
5649
+ * })
4705
5650
  */
4706
- listMlbTeams(requestOptions) {
4707
- return HttpResponsePromise.fromPromise(this.__listMlbTeams(requestOptions));
5651
+ getMlbTransactions(request = {}, requestOptions) {
5652
+ return HttpResponsePromise.fromPromise(this.__getMlbTransactions(request, requestOptions));
4708
5653
  }
4709
- async __listMlbTeams(requestOptions) {
5654
+ async __getMlbTransactions(request = {}, requestOptions) {
5655
+ const { startDate, endDate, type: type_ } = request;
5656
+ const _queryParams = {
5657
+ startDate: startDate != null ? startDate : void 0,
5658
+ endDate: endDate != null ? endDate : void 0,
5659
+ type: type_
5660
+ };
4710
5661
  const _authRequest = await this._options.authProvider.getAuthRequest();
4711
5662
  const _headers = mergeHeaders(
4712
5663
  _authRequest.headers,
@@ -4716,11 +5667,11 @@ var MlbClient = class {
4716
5667
  const _response = await fetcher({
4717
5668
  url: url_exports.join(
4718
5669
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
4719
- "v1/mlb/teams"
5670
+ "v1/mlb/transactions"
4720
5671
  ),
4721
5672
  method: "GET",
4722
5673
  headers: _headers,
4723
- queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
5674
+ queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
4724
5675
  timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
4725
5676
  maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
4726
5677
  abortSignal: requestOptions?.abortSignal,
@@ -4728,7 +5679,10 @@ var MlbClient = class {
4728
5679
  logging: this._options.logging
4729
5680
  });
4730
5681
  if (_response.ok) {
4731
- return { data: _response.body, rawResponse: _response.rawResponse };
5682
+ return {
5683
+ data: _response.body,
5684
+ rawResponse: _response.rawResponse
5685
+ };
4732
5686
  }
4733
5687
  if (_response.error.reason === "status-code") {
4734
5688
  switch (_response.error.statusCode) {
@@ -4737,6 +5691,11 @@ var MlbClient = class {
4737
5691
  _response.error.body,
4738
5692
  _response.rawResponse
4739
5693
  );
5694
+ case 402:
5695
+ throw new PaymentRequiredError(
5696
+ _response.error.body,
5697
+ _response.rawResponse
5698
+ );
4740
5699
  case 429:
4741
5700
  throw new TooManyRequestsError(
4742
5701
  _response.error.body,
@@ -4755,34 +5714,46 @@ var MlbClient = class {
4755
5714
  });
4756
5715
  }
4757
5716
  }
4758
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/mlb/teams");
5717
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/mlb/transactions");
5718
+ }
5719
+ };
5720
+
5721
+ // api/resources/multi/client/Client.ts
5722
+ var MultiClient = class {
5723
+ constructor(options = {}) {
5724
+ this._options = normalizeClientOptionsWithAuth(options);
4759
5725
  }
4760
5726
  /**
4761
- * Returns the active roster for a specific team. Filter by position to pull only starting pitchers or corner infielders for lineup construction.
5727
+ * Returns three proprietary ML-derived signals computed from the player's last 8 games:
4762
5728
  *
4763
- * **Tier access:** Developer Sandbox, Build, Growth, Pro Insights, Syndicate Alpha
5729
+ * - **Consistency Score (0–100)** — how stable the player's usage/floor is. Higher = more reliable starter.
5730
+ * - **Momentum Delta** — signed float. Positive = trending up vs. prior 3-game baseline; negative = cooling off.
5731
+ * - **Opportunity Ceiling** — 90th-percentile fantasy output from the sample window. Represents the player's peak upside.
4764
5732
  *
4765
- * @param {PlaycallerApi.GetMlbTeamRosterRequest} request
4766
- * @param {MlbClient.RequestOptions} requestOptions - Request-specific configuration.
5733
+ * Results are pre-computed weekly (Tuesday 3 AM ET, post-MNF) and cached. Fresh players compute on-the-fly.
5734
+ *
5735
+ * **Tier access:** Pro Insights, Syndicate Alpha
5736
+ *
5737
+ * @param {PlaycallerApi.GetPlayerAlphaMetricsRequest} request
5738
+ * @param {MultiClient.RequestOptions} requestOptions - Request-specific configuration.
4767
5739
  *
4768
5740
  * @throws {@link PlaycallerApi.UnauthorizedError}
5741
+ * @throws {@link PlaycallerApi.ForbiddenError}
4769
5742
  * @throws {@link PlaycallerApi.NotFoundError}
4770
5743
  * @throws {@link PlaycallerApi.TooManyRequestsError}
4771
5744
  * @throws {@link PlaycallerApi.InternalServerError}
4772
5745
  *
4773
5746
  * @example
4774
- * await client.mlb.getMlbTeamRoster({
4775
- * team: "NYY"
5747
+ * await client.multi.getPlayerAlphaMetrics({
5748
+ * sport: "nfl",
5749
+ * id: "pc_nfl_001234"
4776
5750
  * })
4777
5751
  */
4778
- getMlbTeamRoster(request, requestOptions) {
4779
- return HttpResponsePromise.fromPromise(this.__getMlbTeamRoster(request, requestOptions));
5752
+ getPlayerAlphaMetrics(request, requestOptions) {
5753
+ return HttpResponsePromise.fromPromise(this.__getPlayerAlphaMetrics(request, requestOptions));
4780
5754
  }
4781
- async __getMlbTeamRoster(request, requestOptions) {
4782
- const { team, position } = request;
4783
- const _queryParams = {
4784
- position: position != null ? position : void 0
4785
- };
5755
+ async __getPlayerAlphaMetrics(request, requestOptions) {
5756
+ const { sport, id } = request;
4786
5757
  const _authRequest = await this._options.authProvider.getAuthRequest();
4787
5758
  const _headers = mergeHeaders(
4788
5759
  _authRequest.headers,
@@ -4792,11 +5763,11 @@ var MlbClient = class {
4792
5763
  const _response = await fetcher({
4793
5764
  url: url_exports.join(
4794
5765
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
4795
- `v1/mlb/teams/${url_exports.encodePathParam(team)}/roster`
5766
+ `v1/${url_exports.encodePathParam(sport)}/players/${url_exports.encodePathParam(id)}/alpha`
4796
5767
  ),
4797
5768
  method: "GET",
4798
5769
  headers: _headers,
4799
- queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
5770
+ queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
4800
5771
  timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
4801
5772
  maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
4802
5773
  abortSignal: requestOptions?.abortSignal,
@@ -4816,6 +5787,11 @@ var MlbClient = class {
4816
5787
  _response.error.body,
4817
5788
  _response.rawResponse
4818
5789
  );
5790
+ case 403:
5791
+ throw new ForbiddenError(
5792
+ _response.error.body,
5793
+ _response.rawResponse
5794
+ );
4819
5795
  case 404:
4820
5796
  throw new NotFoundError(_response.error.body, _response.rawResponse);
4821
5797
  case 429:
@@ -4836,33 +5812,52 @@ var MlbClient = class {
4836
5812
  });
4837
5813
  }
4838
5814
  }
4839
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/mlb/teams/{team}/roster");
5815
+ return handleNonStatusCodeError(
5816
+ _response.error,
5817
+ _response.rawResponse,
5818
+ "GET",
5819
+ "/v1/{sport}/players/{id}/alpha"
5820
+ );
4840
5821
  }
4841
5822
  /**
4842
- * Live inning-by-inning game state from the MLB Stats API pipeline. Defaults to today's games. Scores update on a polling cycle throughout the game day.
5823
+ * Returns the N most similar players by cosine distance across an 8-dimension stat-profile vector:
4843
5824
  *
4844
- * **Tier access:** Developer Sandbox, Build, Growth, Pro Insights, Syndicate Alpha
5825
+ * 1. Average fantasy points
5826
+ * 2. Usage rate (snap% for NFL, minutes for NBA)
5827
+ * 3. Opportunity rate (target share for NFL, usage% for NBA)
5828
+ * 4. Average rushing yards
5829
+ * 5. Average receiving yards
5830
+ * 6. Consistency Score (from Alpha Metrics)
5831
+ * 7. Momentum Delta (normalized)
5832
+ * 8. Opportunity Ceiling (from Alpha Metrics)
4845
5833
  *
4846
- * @param {PlaycallerApi.ListMlbGamesRequest} request
4847
- * @param {MlbClient.RequestOptions} requestOptions - Request-specific configuration.
5834
+ * Use case: "Find WRs with the same profile as CeeDee Lamb," "Identify breakout candidates with similar usage to Cooper Kupp Year 2," DFS stack-building, dynasty trade comps.
5835
+ *
5836
+ * **Tier access:** Pro Insights, Syndicate Alpha
4848
5837
  *
5838
+ * @param {PlaycallerApi.GetSimilarPlayersRequest} request
5839
+ * @param {MultiClient.RequestOptions} requestOptions - Request-specific configuration.
5840
+ *
5841
+ * @throws {@link PlaycallerApi.BadRequestError}
4849
5842
  * @throws {@link PlaycallerApi.UnauthorizedError}
5843
+ * @throws {@link PlaycallerApi.ForbiddenError}
5844
+ * @throws {@link PlaycallerApi.NotFoundError}
4850
5845
  * @throws {@link PlaycallerApi.TooManyRequestsError}
4851
5846
  * @throws {@link PlaycallerApi.InternalServerError}
4852
5847
  *
4853
5848
  * @example
4854
- * await client.mlb.listMlbGames({
4855
- * date: "2026-05-01"
5849
+ * await client.multi.getSimilarPlayers({
5850
+ * id: "pc_nfl_001234",
5851
+ * sport: "nfl"
4856
5852
  * })
4857
5853
  */
4858
- listMlbGames(request = {}, requestOptions) {
4859
- return HttpResponsePromise.fromPromise(this.__listMlbGames(request, requestOptions));
5854
+ getSimilarPlayers(request, requestOptions) {
5855
+ return HttpResponsePromise.fromPromise(this.__getSimilarPlayers(request, requestOptions));
4860
5856
  }
4861
- async __listMlbGames(request = {}, requestOptions) {
4862
- const { date, state, limit } = request;
5857
+ async __getSimilarPlayers(request, requestOptions) {
5858
+ const { id, sport, limit } = request;
4863
5859
  const _queryParams = {
4864
- date: date != null ? date : void 0,
4865
- state: state != null ? state : void 0,
5860
+ sport,
4866
5861
  limit
4867
5862
  };
4868
5863
  const _authRequest = await this._options.authProvider.getAuthRequest();
@@ -4874,7 +5869,7 @@ var MlbClient = class {
4874
5869
  const _response = await fetcher({
4875
5870
  url: url_exports.join(
4876
5871
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
4877
- "v1/mlb/games"
5872
+ `v1/players/similar/${url_exports.encodePathParam(id)}`
4878
5873
  ),
4879
5874
  method: "GET",
4880
5875
  headers: _headers,
@@ -4886,15 +5881,27 @@ var MlbClient = class {
4886
5881
  logging: this._options.logging
4887
5882
  });
4888
5883
  if (_response.ok) {
4889
- return { data: _response.body, rawResponse: _response.rawResponse };
5884
+ return {
5885
+ data: _response.body,
5886
+ rawResponse: _response.rawResponse
5887
+ };
4890
5888
  }
4891
5889
  if (_response.error.reason === "status-code") {
4892
5890
  switch (_response.error.statusCode) {
5891
+ case 400:
5892
+ throw new BadRequestError(_response.error.body, _response.rawResponse);
4893
5893
  case 401:
4894
5894
  throw new UnauthorizedError(
4895
5895
  _response.error.body,
4896
5896
  _response.rawResponse
4897
5897
  );
5898
+ case 403:
5899
+ throw new ForbiddenError(
5900
+ _response.error.body,
5901
+ _response.rawResponse
5902
+ );
5903
+ case 404:
5904
+ throw new NotFoundError(_response.error.body, _response.rawResponse);
4898
5905
  case 429:
4899
5906
  throw new TooManyRequestsError(
4900
5907
  _response.error.body,
@@ -4913,33 +5920,33 @@ var MlbClient = class {
4913
5920
  });
4914
5921
  }
4915
5922
  }
4916
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/mlb/games");
5923
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/players/similar/{id}");
4917
5924
  }
4918
5925
  /**
4919
- * Current MLB standings by division sourced from ESPN. Includes win %, streak, home/away splits, and runs differential.
5926
+ * 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.
4920
5927
  *
4921
- * **Tier access:** Developer Sandbox, Build, Growth, Pro Insights, Syndicate Alpha
5928
+ * **Tier access:** Build, Growth, Pro Insights, Syndicate Alpha
4922
5929
  *
4923
- * @param {PlaycallerApi.GetMlbStandingsRequest} request
4924
- * @param {MlbClient.RequestOptions} requestOptions - Request-specific configuration.
5930
+ * @param {PlaycallerApi.GetAuditEventsRequest} request
5931
+ * @param {MultiClient.RequestOptions} requestOptions - Request-specific configuration.
4925
5932
  *
4926
5933
  * @throws {@link PlaycallerApi.UnauthorizedError}
5934
+ * @throws {@link PlaycallerApi.PaymentRequiredError}
4927
5935
  * @throws {@link PlaycallerApi.TooManyRequestsError}
4928
5936
  * @throws {@link PlaycallerApi.InternalServerError}
4929
5937
  *
4930
5938
  * @example
4931
- * await client.mlb.getMlbStandings({
4932
- * division: "AL East"
4933
- * })
5939
+ * await client.multi.getAuditEvents()
4934
5940
  */
4935
- getMlbStandings(request = {}, requestOptions) {
4936
- return HttpResponsePromise.fromPromise(this.__getMlbStandings(request, requestOptions));
5941
+ getAuditEvents(request = {}, requestOptions) {
5942
+ return HttpResponsePromise.fromPromise(this.__getAuditEvents(request, requestOptions));
4937
5943
  }
4938
- async __getMlbStandings(request = {}, requestOptions) {
4939
- const { season, division } = request;
5944
+ async __getAuditEvents(request = {}, requestOptions) {
5945
+ const { limit, before, action } = request;
4940
5946
  const _queryParams = {
4941
- season,
4942
- division
5947
+ limit,
5948
+ before: before != null ? before : void 0,
5949
+ action
4943
5950
  };
4944
5951
  const _authRequest = await this._options.authProvider.getAuthRequest();
4945
5952
  const _headers = mergeHeaders(
@@ -4950,7 +5957,7 @@ var MlbClient = class {
4950
5957
  const _response = await fetcher({
4951
5958
  url: url_exports.join(
4952
5959
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
4953
- "v1/mlb/standings"
5960
+ "v1/audit/events"
4954
5961
  ),
4955
5962
  method: "GET",
4956
5963
  headers: _headers,
@@ -4962,10 +5969,7 @@ var MlbClient = class {
4962
5969
  logging: this._options.logging
4963
5970
  });
4964
5971
  if (_response.ok) {
4965
- return {
4966
- data: _response.body,
4967
- rawResponse: _response.rawResponse
4968
- };
5972
+ return { data: _response.body, rawResponse: _response.rawResponse };
4969
5973
  }
4970
5974
  if (_response.error.reason === "status-code") {
4971
5975
  switch (_response.error.statusCode) {
@@ -4974,6 +5978,11 @@ var MlbClient = class {
4974
5978
  _response.error.body,
4975
5979
  _response.rawResponse
4976
5980
  );
5981
+ case 402:
5982
+ throw new PaymentRequiredError(
5983
+ _response.error.body,
5984
+ _response.rawResponse
5985
+ );
4977
5986
  case 429:
4978
5987
  throw new TooManyRequestsError(
4979
5988
  _response.error.body,
@@ -4992,40 +6001,35 @@ var MlbClient = class {
4992
6001
  });
4993
6002
  }
4994
6003
  }
4995
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/mlb/standings");
6004
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/audit/events");
4996
6005
  }
4997
6006
  /**
4998
- * Top fantasy scorers for any game day, ranked by total points. Uses the PlayCaller scoring engine with standard roto weights (H, HR, RBI, SB, R, BB for batters; IP, K, SV for pitchers).
6007
+ * 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.
4999
6008
  *
5000
- * Useful for identifying daily stack targets and late-swap pivots before lock.
6009
+ * Supported sports for confidence: NFL, MLB, NBA, NHL. Golf and Soccer return `confidence_score: null` (no validated model).
5001
6010
  *
5002
6011
  * **Tier access:** Pro Insights, Syndicate Alpha
5003
6012
  *
5004
- * @param {PlaycallerApi.GetMlbScoringLeadersRequest} request
5005
- * @param {MlbClient.RequestOptions} requestOptions - Request-specific configuration.
6013
+ * @param {PlaycallerApi.BatchPlayerSignalsRequest} request
6014
+ * @param {MultiClient.RequestOptions} requestOptions - Request-specific configuration.
5006
6015
  *
5007
6016
  * @throws {@link PlaycallerApi.UnauthorizedError}
5008
- * @throws {@link PlaycallerApi.ForbiddenError}
6017
+ * @throws {@link PlaycallerApi.PaymentRequiredError}
5009
6018
  * @throws {@link PlaycallerApi.TooManyRequestsError}
5010
6019
  * @throws {@link PlaycallerApi.InternalServerError}
5011
6020
  *
5012
6021
  * @example
5013
- * await client.mlb.getMlbScoringLeaders({
5014
- * date: "2026-05-01",
5015
- * team: "NYY"
6022
+ * await client.multi.batchPlayerSignals({
6023
+ * players: [{
6024
+ * player_id: "pc_nfl_001234",
6025
+ * sport: "nfl"
6026
+ * }]
5016
6027
  * })
5017
6028
  */
5018
- getMlbScoringLeaders(request = {}, requestOptions) {
5019
- return HttpResponsePromise.fromPromise(this.__getMlbScoringLeaders(request, requestOptions));
6029
+ batchPlayerSignals(request, requestOptions) {
6030
+ return HttpResponsePromise.fromPromise(this.__batchPlayerSignals(request, requestOptions));
5020
6031
  }
5021
- async __getMlbScoringLeaders(request = {}, requestOptions) {
5022
- const { date, position, team, limit } = request;
5023
- const _queryParams = {
5024
- date: date != null ? date : void 0,
5025
- position: position != null ? position : void 0,
5026
- team,
5027
- limit
5028
- };
6032
+ async __batchPlayerSignals(request, requestOptions) {
5029
6033
  const _authRequest = await this._options.authProvider.getAuthRequest();
5030
6034
  const _headers = mergeHeaders(
5031
6035
  _authRequest.headers,
@@ -5035,11 +6039,14 @@ var MlbClient = class {
5035
6039
  const _response = await fetcher({
5036
6040
  url: url_exports.join(
5037
6041
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
5038
- "v1/mlb/scoring/leaders"
6042
+ "v1/batch/signals"
5039
6043
  ),
5040
- method: "GET",
6044
+ method: "POST",
5041
6045
  headers: _headers,
5042
- queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
6046
+ contentType: "application/json",
6047
+ queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
6048
+ requestType: "json",
6049
+ body: request,
5043
6050
  timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
5044
6051
  maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
5045
6052
  abortSignal: requestOptions?.abortSignal,
@@ -5059,8 +6066,8 @@ var MlbClient = class {
5059
6066
  _response.error.body,
5060
6067
  _response.rawResponse
5061
6068
  );
5062
- case 403:
5063
- throw new ForbiddenError(
6069
+ case 402:
6070
+ throw new PaymentRequiredError(
5064
6071
  _response.error.body,
5065
6072
  _response.rawResponse
5066
6073
  );
@@ -5082,34 +6089,33 @@ var MlbClient = class {
5082
6089
  });
5083
6090
  }
5084
6091
  }
5085
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/mlb/scoring/leaders");
6092
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/batch/signals");
5086
6093
  }
5087
6094
  /**
5088
- * Top 10 players per rotisserie scoring category (HR, RBI, SB, R, BB, IP, K, SV) for a given date. Ideal for roto league managers tracking category races and daily contributions.
6095
+ * 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.
5089
6096
  *
5090
6097
  * **Tier access:** Pro Insights, Syndicate Alpha
5091
6098
  *
5092
- * @param {PlaycallerApi.GetMlbScoringCategoriesRequest} request
5093
- * @param {MlbClient.RequestOptions} requestOptions - Request-specific configuration.
6099
+ * @param {PlaycallerApi.GetOddsHistoryRequest} request
6100
+ * @param {MultiClient.RequestOptions} requestOptions - Request-specific configuration.
5094
6101
  *
5095
6102
  * @throws {@link PlaycallerApi.UnauthorizedError}
5096
- * @throws {@link PlaycallerApi.ForbiddenError}
6103
+ * @throws {@link PlaycallerApi.PaymentRequiredError}
6104
+ * @throws {@link PlaycallerApi.NotFoundError}
5097
6105
  * @throws {@link PlaycallerApi.TooManyRequestsError}
5098
6106
  * @throws {@link PlaycallerApi.InternalServerError}
5099
6107
  *
5100
6108
  * @example
5101
- * await client.mlb.getMlbScoringCategories({
5102
- * date: "2026-05-01"
6109
+ * await client.multi.getOddsHistory({
6110
+ * sport: "nfl",
6111
+ * gameId: "abc12345"
5103
6112
  * })
5104
6113
  */
5105
- getMlbScoringCategories(request = {}, requestOptions) {
5106
- return HttpResponsePromise.fromPromise(this.__getMlbScoringCategories(request, requestOptions));
6114
+ getOddsHistory(request, requestOptions) {
6115
+ return HttpResponsePromise.fromPromise(this.__getOddsHistory(request, requestOptions));
5107
6116
  }
5108
- async __getMlbScoringCategories(request = {}, requestOptions) {
5109
- const { date } = request;
5110
- const _queryParams = {
5111
- date: date != null ? date : void 0
5112
- };
6117
+ async __getOddsHistory(request, requestOptions) {
6118
+ const { sport, gameId } = request;
5113
6119
  const _authRequest = await this._options.authProvider.getAuthRequest();
5114
6120
  const _headers = mergeHeaders(
5115
6121
  _authRequest.headers,
@@ -5119,11 +6125,11 @@ var MlbClient = class {
5119
6125
  const _response = await fetcher({
5120
6126
  url: url_exports.join(
5121
6127
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
5122
- "v1/mlb/scoring/categories"
6128
+ `v1/${url_exports.encodePathParam(sport)}/odds/history/${url_exports.encodePathParam(gameId)}`
5123
6129
  ),
5124
6130
  method: "GET",
5125
6131
  headers: _headers,
5126
- queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
6132
+ queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
5127
6133
  timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
5128
6134
  maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
5129
6135
  abortSignal: requestOptions?.abortSignal,
@@ -5131,10 +6137,7 @@ var MlbClient = class {
5131
6137
  logging: this._options.logging
5132
6138
  });
5133
6139
  if (_response.ok) {
5134
- return {
5135
- data: _response.body,
5136
- rawResponse: _response.rawResponse
5137
- };
6140
+ return { data: _response.body, rawResponse: _response.rawResponse };
5138
6141
  }
5139
6142
  if (_response.error.reason === "status-code") {
5140
6143
  switch (_response.error.statusCode) {
@@ -5143,11 +6146,13 @@ var MlbClient = class {
5143
6146
  _response.error.body,
5144
6147
  _response.rawResponse
5145
6148
  );
5146
- case 403:
5147
- throw new ForbiddenError(
6149
+ case 402:
6150
+ throw new PaymentRequiredError(
5148
6151
  _response.error.body,
5149
6152
  _response.rawResponse
5150
6153
  );
6154
+ case 404:
6155
+ throw new NotFoundError(_response.error.body, _response.rawResponse);
5151
6156
  case 429:
5152
6157
  throw new TooManyRequestsError(
5153
6158
  _response.error.body,
@@ -5166,46 +6171,37 @@ var MlbClient = class {
5166
6171
  });
5167
6172
  }
5168
6173
  }
5169
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/mlb/scoring/categories");
5170
- }
5171
- };
5172
-
5173
- // api/resources/multi/client/Client.ts
5174
- var MultiClient = class {
5175
- constructor(options = {}) {
5176
- this._options = normalizeClientOptionsWithAuth(options);
6174
+ return handleNonStatusCodeError(
6175
+ _response.error,
6176
+ _response.rawResponse,
6177
+ "GET",
6178
+ "/v1/{sport}/odds/history/{gameId}"
6179
+ );
5177
6180
  }
5178
6181
  /**
5179
- * Returns three proprietary ML-derived signals computed from the player's last 8 games:
5180
- *
5181
- * - **Consistency Score (0–100)** — how stable the player's usage/floor is. Higher = more reliable starter.
5182
- * - **Momentum Delta** — signed float. Positive = trending up vs. prior 3-game baseline; negative = cooling off.
5183
- * - **Opportunity Ceiling** — 90th-percentile fantasy output from the sample window. Represents the player's peak upside.
5184
- *
5185
- * Results are pre-computed weekly (Tuesday 3 AM ET, post-MNF) and cached. Fresh players compute on-the-fly.
6182
+ * 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).
5186
6183
  *
5187
- * **Tier access:** Pro Insights, Syndicate Alpha
6184
+ * **Tier access:** Growth, Pro Insights, Syndicate Alpha
5188
6185
  *
5189
- * @param {PlaycallerApi.GetPlayerAlphaMetricsRequest} request
6186
+ * @param {PlaycallerApi.GetTeamRosterPulseRequest} request
5190
6187
  * @param {MultiClient.RequestOptions} requestOptions - Request-specific configuration.
5191
6188
  *
5192
6189
  * @throws {@link PlaycallerApi.UnauthorizedError}
5193
- * @throws {@link PlaycallerApi.ForbiddenError}
5194
- * @throws {@link PlaycallerApi.NotFoundError}
6190
+ * @throws {@link PlaycallerApi.PaymentRequiredError}
5195
6191
  * @throws {@link PlaycallerApi.TooManyRequestsError}
5196
6192
  * @throws {@link PlaycallerApi.InternalServerError}
5197
6193
  *
5198
6194
  * @example
5199
- * await client.multi.getPlayerAlphaMetrics({
6195
+ * await client.multi.getTeamRosterPulse({
5200
6196
  * sport: "nfl",
5201
- * id: "pc_nfl_001234"
6197
+ * team: "KC"
5202
6198
  * })
5203
6199
  */
5204
- getPlayerAlphaMetrics(request, requestOptions) {
5205
- return HttpResponsePromise.fromPromise(this.__getPlayerAlphaMetrics(request, requestOptions));
6200
+ getTeamRosterPulse(request, requestOptions) {
6201
+ return HttpResponsePromise.fromPromise(this.__getTeamRosterPulse(request, requestOptions));
5206
6202
  }
5207
- async __getPlayerAlphaMetrics(request, requestOptions) {
5208
- const { sport, id } = request;
6203
+ async __getTeamRosterPulse(request, requestOptions) {
6204
+ const { sport, team } = request;
5209
6205
  const _authRequest = await this._options.authProvider.getAuthRequest();
5210
6206
  const _headers = mergeHeaders(
5211
6207
  _authRequest.headers,
@@ -5215,7 +6211,7 @@ var MultiClient = class {
5215
6211
  const _response = await fetcher({
5216
6212
  url: url_exports.join(
5217
6213
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
5218
- `v1/${url_exports.encodePathParam(sport)}/players/${url_exports.encodePathParam(id)}/alpha`
6214
+ `v1/${url_exports.encodePathParam(sport)}/teams/${url_exports.encodePathParam(team)}/roster-pulse`
5219
6215
  ),
5220
6216
  method: "GET",
5221
6217
  headers: _headers,
@@ -5239,13 +6235,11 @@ var MultiClient = class {
5239
6235
  _response.error.body,
5240
6236
  _response.rawResponse
5241
6237
  );
5242
- case 403:
5243
- throw new ForbiddenError(
6238
+ case 402:
6239
+ throw new PaymentRequiredError(
5244
6240
  _response.error.body,
5245
6241
  _response.rawResponse
5246
6242
  );
5247
- case 404:
5248
- throw new NotFoundError(_response.error.body, _response.rawResponse);
5249
6243
  case 429:
5250
6244
  throw new TooManyRequestsError(
5251
6245
  _response.error.body,
@@ -5268,50 +6262,32 @@ var MultiClient = class {
5268
6262
  _response.error,
5269
6263
  _response.rawResponse,
5270
6264
  "GET",
5271
- "/v1/{sport}/players/{id}/alpha"
6265
+ "/v1/{sport}/teams/{team}/roster-pulse"
5272
6266
  );
5273
6267
  }
5274
6268
  /**
5275
- * Returns the N most similar players by cosine distance across an 8-dimension stat-profile vector:
5276
- *
5277
- * 1. Average fantasy points
5278
- * 2. Usage rate (snap% for NFL, minutes for NBA)
5279
- * 3. Opportunity rate (target share for NFL, usage% for NBA)
5280
- * 4. Average rushing yards
5281
- * 5. Average receiving yards
5282
- * 6. Consistency Score (from Alpha Metrics)
5283
- * 7. Momentum Delta (normalized)
5284
- * 8. Opportunity Ceiling (from Alpha Metrics)
5285
- *
5286
- * Use case: "Find WRs with the same profile as CeeDee Lamb," "Identify breakout candidates with similar usage to Cooper Kupp Year 2," DFS stack-building, dynasty trade comps.
6269
+ * 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.
5287
6270
  *
5288
- * **Tier access:** Pro Insights, Syndicate Alpha
6271
+ * **Tier access:** Growth, Pro Insights, Syndicate Alpha
5289
6272
  *
5290
- * @param {PlaycallerApi.GetSimilarPlayersRequest} request
6273
+ * @param {PlaycallerApi.BatchPlayersRequest} request
5291
6274
  * @param {MultiClient.RequestOptions} requestOptions - Request-specific configuration.
5292
6275
  *
5293
6276
  * @throws {@link PlaycallerApi.BadRequestError}
5294
6277
  * @throws {@link PlaycallerApi.UnauthorizedError}
5295
- * @throws {@link PlaycallerApi.ForbiddenError}
5296
- * @throws {@link PlaycallerApi.NotFoundError}
6278
+ * @throws {@link PlaycallerApi.PaymentRequiredError}
5297
6279
  * @throws {@link PlaycallerApi.TooManyRequestsError}
5298
6280
  * @throws {@link PlaycallerApi.InternalServerError}
5299
6281
  *
5300
6282
  * @example
5301
- * await client.multi.getSimilarPlayers({
5302
- * id: "pc_nfl_001234",
5303
- * sport: "nfl"
6283
+ * await client.multi.batchPlayers({
6284
+ * player_ids: ["nfl_001234", "nfl_005678"]
5304
6285
  * })
5305
6286
  */
5306
- getSimilarPlayers(request, requestOptions) {
5307
- return HttpResponsePromise.fromPromise(this.__getSimilarPlayers(request, requestOptions));
6287
+ batchPlayers(request, requestOptions) {
6288
+ return HttpResponsePromise.fromPromise(this.__batchPlayers(request, requestOptions));
5308
6289
  }
5309
- async __getSimilarPlayers(request, requestOptions) {
5310
- const { id, sport, limit } = request;
5311
- const _queryParams = {
5312
- sport,
5313
- limit
5314
- };
6290
+ async __batchPlayers(request, requestOptions) {
5315
6291
  const _authRequest = await this._options.authProvider.getAuthRequest();
5316
6292
  const _headers = mergeHeaders(
5317
6293
  _authRequest.headers,
@@ -5321,11 +6297,14 @@ var MultiClient = class {
5321
6297
  const _response = await fetcher({
5322
6298
  url: url_exports.join(
5323
6299
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
5324
- `v1/players/similar/${url_exports.encodePathParam(id)}`
6300
+ "v1/batch/players"
5325
6301
  ),
5326
- method: "GET",
6302
+ method: "POST",
5327
6303
  headers: _headers,
5328
- queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
6304
+ contentType: "application/json",
6305
+ queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
6306
+ requestType: "json",
6307
+ body: request,
5329
6308
  timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
5330
6309
  maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
5331
6310
  abortSignal: requestOptions?.abortSignal,
@@ -5333,10 +6312,7 @@ var MultiClient = class {
5333
6312
  logging: this._options.logging
5334
6313
  });
5335
6314
  if (_response.ok) {
5336
- return {
5337
- data: _response.body,
5338
- rawResponse: _response.rawResponse
5339
- };
6315
+ return { data: _response.body, rawResponse: _response.rawResponse };
5340
6316
  }
5341
6317
  if (_response.error.reason === "status-code") {
5342
6318
  switch (_response.error.statusCode) {
@@ -5347,13 +6323,11 @@ var MultiClient = class {
5347
6323
  _response.error.body,
5348
6324
  _response.rawResponse
5349
6325
  );
5350
- case 403:
5351
- throw new ForbiddenError(
6326
+ case 402:
6327
+ throw new PaymentRequiredError(
5352
6328
  _response.error.body,
5353
6329
  _response.rawResponse
5354
6330
  );
5355
- case 404:
5356
- throw new NotFoundError(_response.error.body, _response.rawResponse);
5357
6331
  case 429:
5358
6332
  throw new TooManyRequestsError(
5359
6333
  _response.error.body,
@@ -5372,7 +6346,7 @@ var MultiClient = class {
5372
6346
  });
5373
6347
  }
5374
6348
  }
5375
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/players/similar/{id}");
6349
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/batch/players");
5376
6350
  }
5377
6351
  /**
5378
6352
  * 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.
@@ -6797,10 +7771,92 @@ var NbaClient = class {
6797
7771
  getNbaTeamRoster(request, requestOptions) {
6798
7772
  return HttpResponsePromise.fromPromise(this.__getNbaTeamRoster(request, requestOptions));
6799
7773
  }
6800
- async __getNbaTeamRoster(request, requestOptions) {
6801
- const { team, position } = request;
7774
+ async __getNbaTeamRoster(request, requestOptions) {
7775
+ const { team, position } = request;
7776
+ const _queryParams = {
7777
+ position: position != null ? position : void 0
7778
+ };
7779
+ const _authRequest = await this._options.authProvider.getAuthRequest();
7780
+ const _headers = mergeHeaders(
7781
+ _authRequest.headers,
7782
+ this._options?.headers,
7783
+ requestOptions?.headers
7784
+ );
7785
+ const _response = await fetcher({
7786
+ url: url_exports.join(
7787
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
7788
+ `v1/nba/teams/${url_exports.encodePathParam(team)}/roster`
7789
+ ),
7790
+ method: "GET",
7791
+ headers: _headers,
7792
+ queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
7793
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
7794
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
7795
+ abortSignal: requestOptions?.abortSignal,
7796
+ fetchFn: this._options?.fetch,
7797
+ logging: this._options.logging
7798
+ });
7799
+ if (_response.ok) {
7800
+ return {
7801
+ data: _response.body,
7802
+ rawResponse: _response.rawResponse
7803
+ };
7804
+ }
7805
+ if (_response.error.reason === "status-code") {
7806
+ switch (_response.error.statusCode) {
7807
+ case 401:
7808
+ throw new UnauthorizedError(
7809
+ _response.error.body,
7810
+ _response.rawResponse
7811
+ );
7812
+ case 404:
7813
+ throw new NotFoundError(_response.error.body, _response.rawResponse);
7814
+ case 429:
7815
+ throw new TooManyRequestsError(
7816
+ _response.error.body,
7817
+ _response.rawResponse
7818
+ );
7819
+ case 500:
7820
+ throw new InternalServerError(
7821
+ _response.error.body,
7822
+ _response.rawResponse
7823
+ );
7824
+ default:
7825
+ throw new PlaycallerApiError({
7826
+ statusCode: _response.error.statusCode,
7827
+ body: _response.error.body,
7828
+ rawResponse: _response.rawResponse
7829
+ });
7830
+ }
7831
+ }
7832
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/nba/teams/{team}/roster");
7833
+ }
7834
+ /**
7835
+ * 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`.
7836
+ *
7837
+ * **Tier access:** Pro Insights, Syndicate Alpha
7838
+ *
7839
+ * @param {PlaycallerApi.GetNbaConfidenceRequest} request
7840
+ * @param {NbaClient.RequestOptions} requestOptions - Request-specific configuration.
7841
+ *
7842
+ * @throws {@link PlaycallerApi.UnauthorizedError}
7843
+ * @throws {@link PlaycallerApi.ForbiddenError}
7844
+ * @throws {@link PlaycallerApi.NotFoundError}
7845
+ * @throws {@link PlaycallerApi.TooManyRequestsError}
7846
+ * @throws {@link PlaycallerApi.InternalServerError}
7847
+ *
7848
+ * @example
7849
+ * await client.nba.getNbaConfidence({
7850
+ * player: "Nikola Jokic"
7851
+ * })
7852
+ */
7853
+ getNbaConfidence(request, requestOptions) {
7854
+ return HttpResponsePromise.fromPromise(this.__getNbaConfidence(request, requestOptions));
7855
+ }
7856
+ async __getNbaConfidence(request, requestOptions) {
7857
+ const { player } = request;
6802
7858
  const _queryParams = {
6803
- position: position != null ? position : void 0
7859
+ player
6804
7860
  };
6805
7861
  const _authRequest = await this._options.authProvider.getAuthRequest();
6806
7862
  const _headers = mergeHeaders(
@@ -6811,7 +7867,7 @@ var NbaClient = class {
6811
7867
  const _response = await fetcher({
6812
7868
  url: url_exports.join(
6813
7869
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
6814
- `v1/nba/teams/${url_exports.encodePathParam(team)}/roster`
7870
+ "v1/nba/confidence"
6815
7871
  ),
6816
7872
  method: "GET",
6817
7873
  headers: _headers,
@@ -6835,6 +7891,11 @@ var NbaClient = class {
6835
7891
  _response.error.body,
6836
7892
  _response.rawResponse
6837
7893
  );
7894
+ case 403:
7895
+ throw new ForbiddenError(
7896
+ _response.error.body,
7897
+ _response.rawResponse
7898
+ );
6838
7899
  case 404:
6839
7900
  throw new NotFoundError(_response.error.body, _response.rawResponse);
6840
7901
  case 429:
@@ -6855,34 +7916,35 @@ var NbaClient = class {
6855
7916
  });
6856
7917
  }
6857
7918
  }
6858
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/nba/teams/{team}/roster");
7919
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/nba/confidence");
6859
7920
  }
6860
7921
  /**
6861
- * 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`.
7922
+ * 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.
6862
7923
  *
6863
- * **Tier access:** Pro Insights, Syndicate Alpha
7924
+ * **Tier access:** Build, Growth, Pro Insights, Syndicate Alpha
6864
7925
  *
6865
- * @param {PlaycallerApi.GetNbaConfidenceRequest} request
7926
+ * @param {PlaycallerApi.GetNbaPlayerGameLogRequest} request
6866
7927
  * @param {NbaClient.RequestOptions} requestOptions - Request-specific configuration.
6867
7928
  *
6868
7929
  * @throws {@link PlaycallerApi.UnauthorizedError}
6869
- * @throws {@link PlaycallerApi.ForbiddenError}
7930
+ * @throws {@link PlaycallerApi.PaymentRequiredError}
6870
7931
  * @throws {@link PlaycallerApi.NotFoundError}
6871
7932
  * @throws {@link PlaycallerApi.TooManyRequestsError}
6872
7933
  * @throws {@link PlaycallerApi.InternalServerError}
6873
7934
  *
6874
7935
  * @example
6875
- * await client.nba.getNbaConfidence({
6876
- * player: "Nikola Jokic"
7936
+ * await client.nba.getNbaPlayerGameLog({
7937
+ * id: "nba_2544",
7938
+ * season: "2024-25"
6877
7939
  * })
6878
7940
  */
6879
- getNbaConfidence(request, requestOptions) {
6880
- return HttpResponsePromise.fromPromise(this.__getNbaConfidence(request, requestOptions));
7941
+ getNbaPlayerGameLog(request, requestOptions) {
7942
+ return HttpResponsePromise.fromPromise(this.__getNbaPlayerGameLog(request, requestOptions));
6881
7943
  }
6882
- async __getNbaConfidence(request, requestOptions) {
6883
- const { player } = request;
7944
+ async __getNbaPlayerGameLog(request, requestOptions) {
7945
+ const { id, season } = request;
6884
7946
  const _queryParams = {
6885
- player
7947
+ season
6886
7948
  };
6887
7949
  const _authRequest = await this._options.authProvider.getAuthRequest();
6888
7950
  const _headers = mergeHeaders(
@@ -6893,7 +7955,7 @@ var NbaClient = class {
6893
7955
  const _response = await fetcher({
6894
7956
  url: url_exports.join(
6895
7957
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
6896
- "v1/nba/confidence"
7958
+ `v1/nba/players/${url_exports.encodePathParam(id)}/game-log`
6897
7959
  ),
6898
7960
  method: "GET",
6899
7961
  headers: _headers,
@@ -6917,8 +7979,8 @@ var NbaClient = class {
6917
7979
  _response.error.body,
6918
7980
  _response.rawResponse
6919
7981
  );
6920
- case 403:
6921
- throw new ForbiddenError(
7982
+ case 402:
7983
+ throw new PaymentRequiredError(
6922
7984
  _response.error.body,
6923
7985
  _response.rawResponse
6924
7986
  );
@@ -6942,7 +8004,7 @@ var NbaClient = class {
6942
8004
  });
6943
8005
  }
6944
8006
  }
6945
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/nba/confidence");
8007
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/nba/players/{id}/game-log");
6946
8008
  }
6947
8009
  };
6948
8010
 
@@ -7191,7 +8253,7 @@ var NflClient = class {
7191
8253
  /**
7192
8254
  * 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.
7193
8255
  *
7194
- * **Tier access:** Developer Sandbox, Build, Growth, Pro Insights, Syndicate Alpha
8256
+ * **Tier access:** Growth, Pro Insights, Syndicate Alpha
7195
8257
  *
7196
8258
  * @param {PlaycallerApi.GetNflRankingsRequest} request
7197
8259
  * @param {NflClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -7578,6 +8640,267 @@ var NflClient = class {
7578
8640
  }
7579
8641
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/nfl/standings");
7580
8642
  }
8643
+ /**
8644
+ * 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.
8645
+ *
8646
+ * **Example use case:** Get PPR rankings (`rec: 1`), half-PPR (`rec: 0.5`), or any custom scoring system.
8647
+ *
8648
+ * **Tier access:** Pro Insights, Syndicate Alpha
8649
+ *
8650
+ * @param {PlaycallerApi.GetNflCustomRankingsRequest} request
8651
+ * @param {NflClient.RequestOptions} requestOptions - Request-specific configuration.
8652
+ *
8653
+ * @throws {@link PlaycallerApi.UnauthorizedError}
8654
+ * @throws {@link PlaycallerApi.PaymentRequiredError}
8655
+ * @throws {@link PlaycallerApi.TooManyRequestsError}
8656
+ * @throws {@link PlaycallerApi.InternalServerError}
8657
+ *
8658
+ * @example
8659
+ * await client.nfl.getNflCustomRankings()
8660
+ */
8661
+ getNflCustomRankings(request = {}, requestOptions) {
8662
+ return HttpResponsePromise.fromPromise(this.__getNflCustomRankings(request, requestOptions));
8663
+ }
8664
+ async __getNflCustomRankings(request = {}, requestOptions) {
8665
+ const _authRequest = await this._options.authProvider.getAuthRequest();
8666
+ const _headers = mergeHeaders(
8667
+ _authRequest.headers,
8668
+ this._options?.headers,
8669
+ requestOptions?.headers
8670
+ );
8671
+ const _response = await fetcher({
8672
+ url: url_exports.join(
8673
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
8674
+ "v1/nfl/rankings/custom"
8675
+ ),
8676
+ method: "POST",
8677
+ headers: _headers,
8678
+ contentType: "application/json",
8679
+ queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
8680
+ requestType: "json",
8681
+ body: request,
8682
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
8683
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
8684
+ abortSignal: requestOptions?.abortSignal,
8685
+ fetchFn: this._options?.fetch,
8686
+ logging: this._options.logging
8687
+ });
8688
+ if (_response.ok) {
8689
+ return {
8690
+ data: _response.body,
8691
+ rawResponse: _response.rawResponse
8692
+ };
8693
+ }
8694
+ if (_response.error.reason === "status-code") {
8695
+ switch (_response.error.statusCode) {
8696
+ case 401:
8697
+ throw new UnauthorizedError(
8698
+ _response.error.body,
8699
+ _response.rawResponse
8700
+ );
8701
+ case 402:
8702
+ throw new PaymentRequiredError(
8703
+ _response.error.body,
8704
+ _response.rawResponse
8705
+ );
8706
+ case 429:
8707
+ throw new TooManyRequestsError(
8708
+ _response.error.body,
8709
+ _response.rawResponse
8710
+ );
8711
+ case 500:
8712
+ throw new InternalServerError(
8713
+ _response.error.body,
8714
+ _response.rawResponse
8715
+ );
8716
+ default:
8717
+ throw new PlaycallerApiError({
8718
+ statusCode: _response.error.statusCode,
8719
+ body: _response.error.body,
8720
+ rawResponse: _response.rawResponse
8721
+ });
8722
+ }
8723
+ }
8724
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/nfl/rankings/custom");
8725
+ }
8726
+ /**
8727
+ * 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.
8728
+ *
8729
+ * **Tier access:** Growth, Pro Insights, Syndicate Alpha
8730
+ *
8731
+ * @param {PlaycallerApi.GetNflDepthChartChangesRequest} request
8732
+ * @param {NflClient.RequestOptions} requestOptions - Request-specific configuration.
8733
+ *
8734
+ * @throws {@link PlaycallerApi.UnauthorizedError}
8735
+ * @throws {@link PlaycallerApi.PaymentRequiredError}
8736
+ * @throws {@link PlaycallerApi.TooManyRequestsError}
8737
+ * @throws {@link PlaycallerApi.InternalServerError}
8738
+ *
8739
+ * @example
8740
+ * await client.nfl.getNflDepthChartChanges({
8741
+ * since: "2026-07-10",
8742
+ * team: "KC"
8743
+ * })
8744
+ */
8745
+ getNflDepthChartChanges(request = {}, requestOptions) {
8746
+ return HttpResponsePromise.fromPromise(this.__getNflDepthChartChanges(request, requestOptions));
8747
+ }
8748
+ async __getNflDepthChartChanges(request = {}, requestOptions) {
8749
+ const { since, team, position, change_type: changeType, limit } = request;
8750
+ const _queryParams = {
8751
+ since: since != null ? since : void 0,
8752
+ team,
8753
+ position: position != null ? position : void 0,
8754
+ change_type: changeType != null ? changeType : void 0,
8755
+ limit
8756
+ };
8757
+ const _authRequest = await this._options.authProvider.getAuthRequest();
8758
+ const _headers = mergeHeaders(
8759
+ _authRequest.headers,
8760
+ this._options?.headers,
8761
+ requestOptions?.headers
8762
+ );
8763
+ const _response = await fetcher({
8764
+ url: url_exports.join(
8765
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
8766
+ "v1/nfl/depth-chart/changes"
8767
+ ),
8768
+ method: "GET",
8769
+ headers: _headers,
8770
+ queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
8771
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
8772
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
8773
+ abortSignal: requestOptions?.abortSignal,
8774
+ fetchFn: this._options?.fetch,
8775
+ logging: this._options.logging
8776
+ });
8777
+ if (_response.ok) {
8778
+ return {
8779
+ data: _response.body,
8780
+ rawResponse: _response.rawResponse
8781
+ };
8782
+ }
8783
+ if (_response.error.reason === "status-code") {
8784
+ switch (_response.error.statusCode) {
8785
+ case 401:
8786
+ throw new UnauthorizedError(
8787
+ _response.error.body,
8788
+ _response.rawResponse
8789
+ );
8790
+ case 402:
8791
+ throw new PaymentRequiredError(
8792
+ _response.error.body,
8793
+ _response.rawResponse
8794
+ );
8795
+ case 429:
8796
+ throw new TooManyRequestsError(
8797
+ _response.error.body,
8798
+ _response.rawResponse
8799
+ );
8800
+ case 500:
8801
+ throw new InternalServerError(
8802
+ _response.error.body,
8803
+ _response.rawResponse
8804
+ );
8805
+ default:
8806
+ throw new PlaycallerApiError({
8807
+ statusCode: _response.error.statusCode,
8808
+ body: _response.error.body,
8809
+ rawResponse: _response.rawResponse
8810
+ });
8811
+ }
8812
+ }
8813
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/nfl/depth-chart/changes");
8814
+ }
8815
+ /**
8816
+ * 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.
8817
+ *
8818
+ * **Tier access:** Build, Growth, Pro Insights, Syndicate Alpha
8819
+ *
8820
+ * @param {PlaycallerApi.GetNflCampIntelRequest} request
8821
+ * @param {NflClient.RequestOptions} requestOptions - Request-specific configuration.
8822
+ *
8823
+ * @throws {@link PlaycallerApi.UnauthorizedError}
8824
+ * @throws {@link PlaycallerApi.PaymentRequiredError}
8825
+ * @throws {@link PlaycallerApi.NotFoundError}
8826
+ * @throws {@link PlaycallerApi.TooManyRequestsError}
8827
+ * @throws {@link PlaycallerApi.InternalServerError}
8828
+ *
8829
+ * @example
8830
+ * await client.nfl.getNflCampIntel({
8831
+ * id: "id"
8832
+ * })
8833
+ */
8834
+ getNflCampIntel(request, requestOptions) {
8835
+ return HttpResponsePromise.fromPromise(this.__getNflCampIntel(request, requestOptions));
8836
+ }
8837
+ async __getNflCampIntel(request, requestOptions) {
8838
+ const { id } = request;
8839
+ const _authRequest = await this._options.authProvider.getAuthRequest();
8840
+ const _headers = mergeHeaders(
8841
+ _authRequest.headers,
8842
+ this._options?.headers,
8843
+ requestOptions?.headers
8844
+ );
8845
+ const _response = await fetcher({
8846
+ url: url_exports.join(
8847
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment) ?? PlaycallerApiEnvironment.Production,
8848
+ `v1/nfl/players/${url_exports.encodePathParam(id)}/camp-intel`
8849
+ ),
8850
+ method: "GET",
8851
+ headers: _headers,
8852
+ queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
8853
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
8854
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
8855
+ abortSignal: requestOptions?.abortSignal,
8856
+ fetchFn: this._options?.fetch,
8857
+ logging: this._options.logging
8858
+ });
8859
+ if (_response.ok) {
8860
+ return {
8861
+ data: _response.body,
8862
+ rawResponse: _response.rawResponse
8863
+ };
8864
+ }
8865
+ if (_response.error.reason === "status-code") {
8866
+ switch (_response.error.statusCode) {
8867
+ case 401:
8868
+ throw new UnauthorizedError(
8869
+ _response.error.body,
8870
+ _response.rawResponse
8871
+ );
8872
+ case 402:
8873
+ throw new PaymentRequiredError(
8874
+ _response.error.body,
8875
+ _response.rawResponse
8876
+ );
8877
+ case 404:
8878
+ throw new NotFoundError(_response.error.body, _response.rawResponse);
8879
+ case 429:
8880
+ throw new TooManyRequestsError(
8881
+ _response.error.body,
8882
+ _response.rawResponse
8883
+ );
8884
+ case 500:
8885
+ throw new InternalServerError(
8886
+ _response.error.body,
8887
+ _response.rawResponse
8888
+ );
8889
+ default:
8890
+ throw new PlaycallerApiError({
8891
+ statusCode: _response.error.statusCode,
8892
+ body: _response.error.body,
8893
+ rawResponse: _response.rawResponse
8894
+ });
8895
+ }
8896
+ }
8897
+ return handleNonStatusCodeError(
8898
+ _response.error,
8899
+ _response.rawResponse,
8900
+ "GET",
8901
+ "/v1/nfl/players/{id}/camp-intel"
8902
+ );
8903
+ }
7581
8904
  };
7582
8905
 
7583
8906
  // api/resources/nhl/client/Client.ts