@playcademy/sdk 0.19.1-beta.8 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3760,7 +3760,7 @@ async function request({
3760
3760
  return rawText && rawText.length > 0 ? rawText : undefined;
3761
3761
  }
3762
3762
  // src/version.ts
3763
- var SDK_VERSION = "0.19.1-beta.8";
3763
+ var SDK_VERSION = "0.20.0";
3764
3764
 
3765
3765
  // src/clients/base.ts
3766
3766
  class PlaycademyBaseClient {
@@ -4,7 +4,7 @@ import { TimebackGrade, TimebackSubject, ELevel, HeartbeatRequest, EndActivityRe
4
4
  export { AssessmentAttemptSnapshot, AssessmentAwardRecord, AssessmentFinalizeResult, AssessmentFlow, AssessmentItemGrading, AssessmentItemOutcome, AssessmentItemSubmission, AssessmentMasteryAward, AssessmentPreparationResult, AssessmentResponseUpdate, AssessmentResponseValue, AssessmentResponses, AssessmentReviewStandard, AssessmentSaveResult, AssessmentScore, AssessmentStandardRef, AssessmentSubmitResult, AssessmentTranscript, ConventionalAssessmentAttemptSnapshot, ConventionalAssessmentSubmitResult, DiagnosticAssessmentItemReceipt, DiagnosticAssessmentSubmitResult, DiagnosticRoutingSnapshot, DiagnosticRoutingTrackSnapshot, ELevel, FinalizeAssessmentInput, MasteryAssessmentSubmitResult, PlatformRoutedDiagnosticAttemptSnapshot, PlatformRoutedDiagnosticSelectionContext, PlayableAssessment, PlayableAssessmentAttemptSnapshot, PlayableAssessmentChoice, PlayableAssessmentGraphic, PlayableAssessmentHotspot, PlayableAssessmentInteraction, PlayableAssessmentItem, PlayableChoiceInteraction, PlayableContentNode, PlayableGapMatchChoice, PlayableGapMatchInteraction, PlayableInlineChoiceInteraction, PlayableMatchChoice, PlayableMatchInteraction, PlayableOrderInteraction, RecordAssessmentProgressInput, ResumeAssessmentInput, SaveAssessmentInput, SettledAssessmentAttemptSnapshot, StandardsReviewSelectionContext, StartAssessmentInput, StartAssessmentOptions, StartDiagnosticAssessmentInput, SubmitAssessmentInput, SubmitAssessmentItemInput, SubmitAssessmentItemResult, SubmitDiagnosticAssessmentItemInput, SubmitDiagnosticAssessmentItemResult } from '@playcademy/types/timeback';
5
5
  import * as _playcademy_types from '@playcademy/types';
6
6
  import { GameManifest, LocalDayContext } from '@playcademy/types';
7
- export { AuthenticatedUser, DeveloperStatusEnumType, DeveloperStatusResponse, DeveloperStatusValue, GameCourseMetrics, GameLeaderboardEntry, GameManifest, GameMetricComparisonKind, GameMetricComparisonMetric, GameMetricComparisonRow, GameMetricComparisonRowStatus, GameMetricsProxyResponse, GameMetricsResponse, GameMetricsUnsupportedReason, GamePlatform, GameRunMetrics, GameRunMetricsComparison, GameRunMetricsComparisonStatus, GameRunMetricsComparisonSummary, GameTimebackIntegration, GameType, GameUser, LeaderboardEntry, LeaderboardOptions, LeaderboardTimeframe, LocalDayContext, LocalDaySource, ManifestV1, ManifestV2, ManifestVersions, PopulateStudentResponse, UserEnrollment, UserInfo, UserOrganization, UserRank, UserRankResponse, UserRoleEnumType, UserScore, UserTimebackData } from '@playcademy/types';
7
+ export { AuthenticatedUser, DeploySource, DeveloperStatusEnumType, DeveloperStatusResponse, DeveloperStatusValue, GameCourseMetrics, GameLeaderboardEntry, GameManifest, GameMetricComparisonKind, GameMetricComparisonMetric, GameMetricComparisonRow, GameMetricComparisonRowStatus, GameMetricsProxyResponse, GameMetricsResponse, GameMetricsUnsupportedReason, GamePlatform, GameReleaseResponse, GameRunMetrics, GameRunMetricsComparison, GameRunMetricsComparisonStatus, GameRunMetricsComparisonSummary, GameTimebackIntegration, GameType, GameUser, LeaderboardEntry, LeaderboardOptions, LeaderboardTimeframe, LocalDayContext, LocalDaySource, ManifestV1, ManifestV2, ManifestVersions, PopulateStudentResponse, Release, ReleasesResponse, UserEnrollment, UserInfo, UserOrganization, UserRank, UserRankResponse, UserRoleEnumType, UserScore, UserTimebackData } from '@playcademy/types';
8
8
  import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
9
9
  import { DomainValidationRecords } from '@playcademy/types/game';
10
10
  import { z } from 'zod';
@@ -3925,6 +3925,17 @@ declare class PlaycademyInternalClient extends PlaycademyBaseClient {
3925
3925
  fetch: (options?: _playcademy_types.LeaderboardOptions) => Promise<_playcademy_types.GameLeaderboardEntry[]>;
3926
3926
  getUserRank: (gameId: string, userId: string) => Promise<_playcademy_types.UserRank | null>;
3927
3927
  };
3928
+ /**
3929
+ * Open deploy provenance: which commit is running for each game.
3930
+ * - `list()` - Current release of every game
3931
+ * - `get(slug, { history })` - One game's release and recent deploys
3932
+ */
3933
+ releases: {
3934
+ list: () => Promise<_playcademy_types.ReleasesResponse>;
3935
+ get: (slug: string, options?: {
3936
+ history?: number;
3937
+ }) => Promise<_playcademy_types.GameReleaseResponse>;
3938
+ };
3928
3939
  /**
3929
3940
  * Score submission and user score queries.
3930
3941
  * - `submit(gameId, score, metadata?)` - Record a game score
package/dist/internal.js CHANGED
@@ -4151,6 +4151,16 @@ function createLeaderboardFetchNamespace(client) {
4151
4151
  fetch: async (options) => fetchPublicLeaderboardEntries(client, options)
4152
4152
  };
4153
4153
  }
4154
+ // src/namespaces/platform/releases.ts
4155
+ function createReleasesNamespace(client) {
4156
+ return {
4157
+ list: () => client["request"]("/releases", "GET"),
4158
+ get: (slug, options) => {
4159
+ const params = options?.history === undefined ? "" : `?history=${options.history}`;
4160
+ return client["request"](`/releases/${slug}${params}`, "GET");
4161
+ }
4162
+ };
4163
+ }
4154
4164
  // src/namespaces/platform/scores.ts
4155
4165
  function createScoresNamespace2(client) {
4156
4166
  return {
@@ -4660,7 +4670,7 @@ async function request({
4660
4670
  return rawText && rawText.length > 0 ? rawText : undefined;
4661
4671
  }
4662
4672
  // src/version.ts
4663
- var SDK_VERSION = "0.19.1-beta.8";
4673
+ var SDK_VERSION = "0.20.0";
4664
4674
 
4665
4675
  // src/clients/base.ts
4666
4676
  class PlaycademyBaseClient {
@@ -4848,6 +4858,7 @@ class PlaycademyInternalClient extends PlaycademyBaseClient {
4848
4858
  dev = createDevNamespace(this);
4849
4859
  games = createGamesNamespace(this);
4850
4860
  leaderboard = createLeaderboardNamespace(this);
4861
+ releases = createReleasesNamespace(this);
4851
4862
  scores = createScoresNamespace2(this);
4852
4863
  timeback = createTimebackNamespace2(this);
4853
4864
  static init = init;
@@ -337,7 +337,7 @@ function extractApiErrorInfo(error) {
337
337
  }
338
338
 
339
339
  // src/version.ts
340
- var SDK_VERSION = "0.19.1-beta.8";
340
+ var SDK_VERSION = "0.20.0";
341
341
 
342
342
  // src/server/request.ts
343
343
  async function makeApiRequest(opts) {
package/dist/server.js CHANGED
@@ -526,7 +526,7 @@ function extractApiErrorInfo(error) {
526
526
  }
527
527
 
528
528
  // src/version.ts
529
- var SDK_VERSION = "0.19.1-beta.8";
529
+ var SDK_VERSION = "0.20.0";
530
530
 
531
531
  // src/server/request.ts
532
532
  async function makeApiRequest(opts) {
package/dist/types.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as _playcademy_types from '@playcademy/types';
2
2
  import { GameManifest, LocalDayContext } from '@playcademy/types';
3
- export { AuthenticatedUser, DeveloperStatusEnumType, DeveloperStatusResponse, DeveloperStatusValue, GameCourseMetrics, GameLeaderboardEntry, GameManifest, GameMetricComparisonKind, GameMetricComparisonMetric, GameMetricComparisonRow, GameMetricComparisonRowStatus, GameMetricsProxyResponse, GameMetricsResponse, GameMetricsUnsupportedReason, GamePlatform, GameRunMetrics, GameRunMetricsComparison, GameRunMetricsComparisonStatus, GameRunMetricsComparisonSummary, GameTimebackIntegration, GameType, GameUser, LeaderboardEntry, LeaderboardOptions, LeaderboardTimeframe, LocalDayContext, LocalDaySource, ManifestV1, ManifestV2, ManifestVersions, PopulateStudentResponse, UserEnrollment, UserInfo, UserOrganization, UserRank, UserRankResponse, UserRoleEnumType, UserScore, UserTimebackData } from '@playcademy/types';
3
+ export { AuthenticatedUser, DeploySource, DeveloperStatusEnumType, DeveloperStatusResponse, DeveloperStatusValue, GameCourseMetrics, GameLeaderboardEntry, GameManifest, GameMetricComparisonKind, GameMetricComparisonMetric, GameMetricComparisonRow, GameMetricComparisonRowStatus, GameMetricsProxyResponse, GameMetricsResponse, GameMetricsUnsupportedReason, GamePlatform, GameReleaseResponse, GameRunMetrics, GameRunMetricsComparison, GameRunMetricsComparisonStatus, GameRunMetricsComparisonSummary, GameTimebackIntegration, GameType, GameUser, LeaderboardEntry, LeaderboardOptions, LeaderboardTimeframe, LocalDayContext, LocalDaySource, ManifestV1, ManifestV2, ManifestVersions, PopulateStudentResponse, Release, ReleasesResponse, UserEnrollment, UserInfo, UserOrganization, UserRank, UserRankResponse, UserRoleEnumType, UserScore, UserTimebackData } from '@playcademy/types';
4
4
  import { TimebackCourseConfig, CourseConfig, OrganizationConfig, ComponentConfig, ResourceConfig, ComponentResourceConfig, TimebackGrade, TimebackSubject, ELevel, EndActivityRequest, HeartbeatRequest, EndActivityScoreData, EndActivityResponse } from '@playcademy/types/timeback';
5
5
  export { AssessmentAttemptSnapshot, AssessmentAwardRecord, AssessmentFinalizeResult, AssessmentFlow, AssessmentItemGrading, AssessmentItemOutcome, AssessmentItemSubmission, AssessmentMasteryAward, AssessmentPreparationResult, AssessmentResponseUpdate, AssessmentResponseValue, AssessmentResponses, AssessmentReviewStandard, AssessmentSaveResult, AssessmentScore, AssessmentStandardRef, AssessmentSubmitResult, AssessmentTranscript, ConventionalAssessmentAttemptSnapshot, ConventionalAssessmentSubmitResult, DiagnosticAssessmentItemReceipt, DiagnosticAssessmentSubmitResult, DiagnosticRoutingSnapshot, DiagnosticRoutingTrackSnapshot, ELevel, FinalizeAssessmentInput, MasteryAssessmentSubmitResult, PlatformRoutedDiagnosticAttemptSnapshot, PlatformRoutedDiagnosticSelectionContext, PlayableAssessment, PlayableAssessmentAttemptSnapshot, PlayableAssessmentChoice, PlayableAssessmentGraphic, PlayableAssessmentHotspot, PlayableAssessmentInteraction, PlayableAssessmentItem, PlayableChoiceInteraction, PlayableContentNode, PlayableGapMatchChoice, PlayableGapMatchInteraction, PlayableInlineChoiceInteraction, PlayableMatchChoice, PlayableMatchInteraction, PlayableOrderInteraction, RecordAssessmentProgressInput, ResumeAssessmentInput, SaveAssessmentInput, SettledAssessmentAttemptSnapshot, StandardsReviewSelectionContext, StartAssessmentInput, StartAssessmentOptions, StartDiagnosticAssessmentInput, SubmitAssessmentInput, SubmitAssessmentItemInput, SubmitAssessmentItemResult, SubmitDiagnosticAssessmentItemInput, SubmitDiagnosticAssessmentItemResult } from '@playcademy/types/timeback';
6
6
  import { TimebackUserRole, UserEnrollment, UserOrganization, UserInfo } from '@playcademy/types/user';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playcademy/sdk",
3
- "version": "0.19.1-beta.8",
3
+ "version": "0.20.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {