@playcademy/sdk 0.7.4-beta.2 → 0.8.1-beta.1

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.
@@ -104,6 +104,8 @@ interface CourseMetadata {
104
104
  isCustom?: boolean;
105
105
  /** Signals whether a course is in production with students */
106
106
  publishStatus?: 'draft' | 'testing' | 'published' | 'deactivated';
107
+ /** Whether this course appears in the TimeBack catalog for teachers and parents */
108
+ timebackVisible?: boolean;
107
109
  /** Who to contact when issues reported with questions */
108
110
  contactEmail?: string;
109
111
  /** Primary app identifier */
@@ -492,6 +494,26 @@ interface GameTimebackIntegration {
492
494
  createdAt: Date;
493
495
  updatedAt: Date;
494
496
  }
497
+ interface GameTimebackIntegrationConfig {
498
+ integration: GameTimebackIntegration;
499
+ title: string;
500
+ courseCode: string;
501
+ subject: TimebackSubject;
502
+ totalXp?: number | null;
503
+ masterableUnits?: number | null;
504
+ metadata?: CourseMetadata | null;
505
+ }
506
+ interface UpdateGameTimebackIntegrationRequest {
507
+ title?: string;
508
+ courseCode?: string;
509
+ subject?: TimebackSubject;
510
+ totalXp?: number | null;
511
+ masterableUnits?: number | null;
512
+ goals?: Partial<Record<keyof CourseGoals, number | null>> | null;
513
+ publishStatus?: string | null;
514
+ isSupplemental?: boolean;
515
+ timebackVisible?: boolean | null;
516
+ }
495
517
  interface TimebackVerificationResources {
496
518
  course: {
497
519
  found: boolean;
@@ -685,6 +707,17 @@ interface SearchStudentsResponse {
685
707
  interface TimebackAdminMutationResponse {
686
708
  status: 'ok';
687
709
  }
710
+ interface ReconcileMasteryForConfigChangeRequest {
711
+ gameId: string;
712
+ courseId: string;
713
+ oldMasterableUnits: number;
714
+ newMasterableUnits: number;
715
+ affectedStudentIds: string[];
716
+ }
717
+ interface ReconcileMasteryForConfigChangeResponse {
718
+ processed: number;
719
+ failed: string[];
720
+ }
688
721
 
689
722
  interface QtiOutcomeDeclaration {
690
723
  identifier: string;
@@ -7713,6 +7746,8 @@ declare class PlaycademyInternalClient extends PlaycademyBaseClient {
7713
7746
  verify: (gameId: string) => Promise<TimebackVerifyAllResponse>;
7714
7747
  cleanup: (gameId: string) => Promise<void>;
7715
7748
  get: (gameId: string) => Promise<GameTimebackIntegration[]>;
7749
+ updateIntegration: (gameId: string, courseId: string, request: UpdateGameTimebackIntegrationRequest) => Promise<GameTimebackIntegration>;
7750
+ getIntegrationConfig: (gameId: string, courseId: string) => Promise<GameTimebackIntegrationConfig>;
7716
7751
  getConfig: (gameId: string) => Promise<TimebackSetupRequest['config']>;
7717
7752
  };
7718
7753
  xp: {
@@ -7752,6 +7787,7 @@ declare class PlaycademyInternalClient extends PlaycademyBaseClient {
7752
7787
  grantXp: (request: GrantTimebackXpRequest) => Promise<TimebackAdminMutationResponse>;
7753
7788
  adjustTime: (request: AdjustTimebackTimeRequest) => Promise<TimebackAdminMutationResponse>;
7754
7789
  adjustMastery: (request: AdjustTimebackMasteryRequest) => Promise<TimebackAdminMutationResponse>;
7790
+ reconcileMasteryForConfigChange: (request: ReconcileMasteryForConfigChangeRequest) => Promise<ReconcileMasteryForConfigChangeResponse>;
7755
7791
  searchStudents: (gameId: string, courseId: string, query: string) => Promise<SearchStudentsResponse>;
7756
7792
  enrollStudent: (request: EnrollStudentRequest) => Promise<TimebackAdminMutationResponse>;
7757
7793
  unenrollStudent: (request: UnenrollStudentRequest) => Promise<TimebackAdminMutationResponse>;
package/dist/internal.js CHANGED
@@ -3118,6 +3118,8 @@ function createTimebackNamespace2(client) {
3118
3118
  verify: (gameId) => client["request"](`/timeback/verify/${gameId}`, "GET"),
3119
3119
  cleanup: (gameId) => client["request"](`/timeback/integrations/${gameId}`, "DELETE"),
3120
3120
  get: (gameId) => client["request"](`/timeback/integrations/${gameId}`, "GET"),
3121
+ updateIntegration: (gameId, courseId, request) => client["request"](`/timeback/integrations/${gameId}/${courseId}`, "PATCH", { body: request }),
3122
+ getIntegrationConfig: (gameId, courseId) => client["request"](`/timeback/integrations/${gameId}/${courseId}`, "GET"),
3121
3123
  getConfig: (gameId) => client["request"](`/timeback/config/${gameId}`, "GET")
3122
3124
  },
3123
3125
  xp: {
@@ -3205,6 +3207,7 @@ function createTimebackNamespace2(client) {
3205
3207
  adjustMastery: (request) => client["request"]("/timeback/adjust-mastery", "POST", {
3206
3208
  body: request
3207
3209
  }),
3210
+ reconcileMasteryForConfigChange: (request) => client["request"]("/timeback/reconcile-mastery", "POST", { body: request }),
3208
3211
  searchStudents: (gameId, courseId, query) => {
3209
3212
  const params = new URLSearchParams({ q: query });
3210
3213
  return client["request"](`/timeback/search-students/${gameId}/${courseId}?${params}`, "GET");
@@ -93,6 +93,8 @@ interface CourseMetadata {
93
93
  isCustom?: boolean;
94
94
  /** Signals whether a course is in production with students */
95
95
  publishStatus?: 'draft' | 'testing' | 'published' | 'deactivated';
96
+ /** Whether this course appears in the TimeBack catalog for teachers and parents */
97
+ timebackVisible?: boolean;
96
98
  /** Who to contact when issues reported with questions */
97
99
  contactEmail?: string;
98
100
  /** Primary app identifier */
package/dist/server.d.ts CHANGED
@@ -93,6 +93,8 @@ interface CourseMetadata {
93
93
  isCustom?: boolean;
94
94
  /** Signals whether a course is in production with students */
95
95
  publishStatus?: 'draft' | 'testing' | 'published' | 'deactivated';
96
+ /** Whether this course appears in the TimeBack catalog for teachers and parents */
97
+ timebackVisible?: boolean;
96
98
  /** Who to contact when issues reported with questions */
97
99
  contactEmail?: string;
98
100
  /** Primary app identifier */
package/dist/types.d.ts CHANGED
@@ -118,6 +118,8 @@ interface CourseMetadata {
118
118
  isCustom?: boolean;
119
119
  /** Signals whether a course is in production with students */
120
120
  publishStatus?: 'draft' | 'testing' | 'published' | 'deactivated';
121
+ /** Whether this course appears in the TimeBack catalog for teachers and parents */
122
+ timebackVisible?: boolean;
121
123
  /** Who to contact when issues reported with questions */
122
124
  contactEmail?: string;
123
125
  /** Primary app identifier */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playcademy/sdk",
3
- "version": "0.7.4-beta.2",
3
+ "version": "0.8.1-beta.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {