@playcademy/sdk 0.19.1-beta.3 → 0.19.1-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3086,8 +3086,8 @@ function validateStartAssessmentInput(input) {
3086
3086
  if (input.purpose !== "review") {
3087
3087
  return;
3088
3088
  }
3089
- if (input.requireBothQuestions !== undefined && typeof input.requireBothQuestions !== "boolean") {
3090
- throw new Error("requireBothQuestions must be a boolean");
3089
+ if ("requireBothQuestions" in input && input.requireBothQuestions !== undefined) {
3090
+ throw new Error("Set requireBothQuestions on individual review standards, not the review request");
3091
3091
  }
3092
3092
  if (!Array.isArray(input.standards) || input.standards.length === 0) {
3093
3093
  throw new Error("standards must contain at least one standard for review");
@@ -3099,6 +3099,9 @@ function validateStartAssessmentInput(input) {
3099
3099
  if (!standard || typeof standard !== "object" || !standard.framework?.trim() || !standard.identifier?.trim()) {
3100
3100
  throw new Error("review standards require a framework and identifier");
3101
3101
  }
3102
+ if (standard.requireBothQuestions !== undefined && typeof standard.requireBothQuestions !== "boolean") {
3103
+ throw new Error("review standard requireBothQuestions must be a boolean");
3104
+ }
3102
3105
  if (standard.framework.trim().length > TIMEBACK_ASSESSMENT_REVIEW_REQUEST_LIMITS.standardFieldLength || standard.identifier.trim().length > TIMEBACK_ASSESSMENT_REVIEW_REQUEST_LIMITS.standardFieldLength) {
3103
3106
  throw new Error(`review standard fields must be at most ${TIMEBACK_ASSESSMENT_REVIEW_REQUEST_LIMITS.standardFieldLength} characters`);
3104
3107
  }
@@ -3757,7 +3760,7 @@ async function request({
3757
3760
  return rawText && rawText.length > 0 ? rawText : undefined;
3758
3761
  }
3759
3762
  // src/version.ts
3760
- var SDK_VERSION = "0.19.1-beta.3";
3763
+ var SDK_VERSION = "0.19.1-beta.4";
3761
3764
 
3762
3765
  // src/clients/base.ts
3763
3766
  class PlaycademyBaseClient {
@@ -1,7 +1,7 @@
1
1
  import { SchemaInfo } from '@playcademy/cloudflare';
2
2
  import { GamePermission, AUTH_PROVIDER_IDS } from '@playcademy/constants';
3
3
  import { TimebackGrade, TimebackSubject, ELevel, HeartbeatRequest, EndActivityRequest, EndActivityScoreData, EndActivityResponse, TimebackCourseConfig, CourseConfig, OrganizationConfig, ComponentConfig, ResourceConfig, ComponentResourceConfig } from '@playcademy/types/timeback';
4
- export { AssessmentAttemptSnapshot, AssessmentAwardRecord, AssessmentFinalizeResult, AssessmentFlow, AssessmentItemGrading, AssessmentItemOutcome, AssessmentItemSubmission, AssessmentMasteryAward, AssessmentPreparationResult, AssessmentResponseUpdate, AssessmentResponseValue, AssessmentResponses, AssessmentSaveResult, AssessmentScore, AssessmentStandardRef, AssessmentSubmitResult, AssessmentTranscript, ConventionalAssessmentAttemptSnapshot, ConventionalAssessmentSubmitResult, DiagnosticAssessmentItemReceipt, DiagnosticAssessmentSubmitResult, DiagnosticRoutingSnapshot, DiagnosticRoutingTrackSnapshot, ELevel, FinalizeAssessmentInput, MasteryAssessmentSubmitResult, PlatformRoutedDiagnosticAttemptSnapshot, PlatformRoutedDiagnosticSelectionContext, PlayableAssessment, PlayableAssessmentAttemptSnapshot, PlayableAssessmentChoice, PlayableAssessmentGraphic, PlayableAssessmentHotspot, PlayableAssessmentInteraction, PlayableAssessmentItem, PlayableContentNode, RecordAssessmentProgressInput, ResumeAssessmentInput, SaveAssessmentInput, SettledAssessmentAttemptSnapshot, StartAssessmentInput, StartAssessmentOptions, StartDiagnosticAssessmentInput, SubmitAssessmentInput, SubmitAssessmentItemInput, SubmitAssessmentItemResult, SubmitDiagnosticAssessmentItemInput, SubmitDiagnosticAssessmentItemResult } from '@playcademy/types/timeback';
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, PlayableContentNode, 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
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';
package/dist/internal.js CHANGED
@@ -3086,8 +3086,8 @@ function validateStartAssessmentInput(input) {
3086
3086
  if (input.purpose !== "review") {
3087
3087
  return;
3088
3088
  }
3089
- if (input.requireBothQuestions !== undefined && typeof input.requireBothQuestions !== "boolean") {
3090
- throw new Error("requireBothQuestions must be a boolean");
3089
+ if ("requireBothQuestions" in input && input.requireBothQuestions !== undefined) {
3090
+ throw new Error("Set requireBothQuestions on individual review standards, not the review request");
3091
3091
  }
3092
3092
  if (!Array.isArray(input.standards) || input.standards.length === 0) {
3093
3093
  throw new Error("standards must contain at least one standard for review");
@@ -3099,6 +3099,9 @@ function validateStartAssessmentInput(input) {
3099
3099
  if (!standard || typeof standard !== "object" || !standard.framework?.trim() || !standard.identifier?.trim()) {
3100
3100
  throw new Error("review standards require a framework and identifier");
3101
3101
  }
3102
+ if (standard.requireBothQuestions !== undefined && typeof standard.requireBothQuestions !== "boolean") {
3103
+ throw new Error("review standard requireBothQuestions must be a boolean");
3104
+ }
3102
3105
  if (standard.framework.trim().length > TIMEBACK_ASSESSMENT_REVIEW_REQUEST_LIMITS.standardFieldLength || standard.identifier.trim().length > TIMEBACK_ASSESSMENT_REVIEW_REQUEST_LIMITS.standardFieldLength) {
3103
3106
  throw new Error(`review standard fields must be at most ${TIMEBACK_ASSESSMENT_REVIEW_REQUEST_LIMITS.standardFieldLength} characters`);
3104
3107
  }
@@ -4649,7 +4652,7 @@ async function request({
4649
4652
  return rawText && rawText.length > 0 ? rawText : undefined;
4650
4653
  }
4651
4654
  // src/version.ts
4652
- var SDK_VERSION = "0.19.1-beta.3";
4655
+ var SDK_VERSION = "0.19.1-beta.4";
4653
4656
 
4654
4657
  // src/clients/base.ts
4655
4658
  class PlaycademyBaseClient {
@@ -337,7 +337,7 @@ function extractApiErrorInfo(error) {
337
337
  }
338
338
 
339
339
  // src/version.ts
340
- var SDK_VERSION = "0.19.1-beta.3";
340
+ var SDK_VERSION = "0.19.1-beta.4";
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.3";
529
+ var SDK_VERSION = "0.19.1-beta.4";
530
530
 
531
531
  // src/server/request.ts
532
532
  async function makeApiRequest(opts) {
package/dist/types.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as _playcademy_types from '@playcademy/types';
2
2
  import { GameManifest, LocalDayContext } from '@playcademy/types';
3
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';
4
4
  import { TimebackCourseConfig, CourseConfig, OrganizationConfig, ComponentConfig, ResourceConfig, ComponentResourceConfig, TimebackGrade, TimebackSubject, ELevel, EndActivityRequest, HeartbeatRequest, EndActivityScoreData, EndActivityResponse } from '@playcademy/types/timeback';
5
- export { AssessmentAttemptSnapshot, AssessmentAwardRecord, AssessmentFinalizeResult, AssessmentFlow, AssessmentItemGrading, AssessmentItemOutcome, AssessmentItemSubmission, AssessmentMasteryAward, AssessmentPreparationResult, AssessmentResponseUpdate, AssessmentResponseValue, AssessmentResponses, AssessmentSaveResult, AssessmentScore, AssessmentStandardRef, AssessmentSubmitResult, AssessmentTranscript, ConventionalAssessmentAttemptSnapshot, ConventionalAssessmentSubmitResult, DiagnosticAssessmentItemReceipt, DiagnosticAssessmentSubmitResult, DiagnosticRoutingSnapshot, DiagnosticRoutingTrackSnapshot, ELevel, FinalizeAssessmentInput, MasteryAssessmentSubmitResult, PlatformRoutedDiagnosticAttemptSnapshot, PlatformRoutedDiagnosticSelectionContext, PlayableAssessment, PlayableAssessmentAttemptSnapshot, PlayableAssessmentChoice, PlayableAssessmentGraphic, PlayableAssessmentHotspot, PlayableAssessmentInteraction, PlayableAssessmentItem, PlayableContentNode, RecordAssessmentProgressInput, ResumeAssessmentInput, SaveAssessmentInput, SettledAssessmentAttemptSnapshot, StartAssessmentInput, StartAssessmentOptions, StartDiagnosticAssessmentInput, SubmitAssessmentInput, SubmitAssessmentItemInput, SubmitAssessmentItemResult, SubmitDiagnosticAssessmentItemInput, SubmitDiagnosticAssessmentItemResult } from '@playcademy/types/timeback';
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, PlayableContentNode, 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';
7
7
  import { GamePermission, AUTH_PROVIDER_IDS } from '@playcademy/constants';
8
8
  import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playcademy/sdk",
3
- "version": "0.19.1-beta.3",
3
+ "version": "0.19.1-beta.4",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {