@playcademy/sdk 0.6.1-beta.6 → 0.6.1-beta.7

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.
@@ -289,6 +289,68 @@ interface EndActivityScoreData {
289
289
  extensions?: TimebackActivityExtensions;
290
290
  }
291
291
 
292
+ /**
293
+ * Caliper Protocol Types
294
+ *
295
+ * Types for the IMS Caliper Analytics standard used by TimeBack
296
+ * for learning activity tracking.
297
+ *
298
+ * @module types/timeback/caliper
299
+ */
300
+
301
+ interface TimebackStoredCaliperMetric {
302
+ type: string;
303
+ value?: number;
304
+ subType?: string;
305
+ }
306
+ interface TimebackStoredCaliperEntity {
307
+ id?: string;
308
+ type?: string;
309
+ name?: string;
310
+ email?: string;
311
+ app?: {
312
+ id?: string;
313
+ name?: string;
314
+ };
315
+ activity?: {
316
+ id?: string;
317
+ name?: string;
318
+ extensions?: Record<string, unknown> | null;
319
+ };
320
+ course?: {
321
+ id?: string;
322
+ name?: string;
323
+ };
324
+ items?: TimebackStoredCaliperMetric[];
325
+ extensions?: Record<string, unknown> | null;
326
+ [key: string]: unknown;
327
+ }
328
+ interface TimebackStoredCaliperEvent {
329
+ id: number;
330
+ externalId: string;
331
+ sensor: string;
332
+ type: string;
333
+ profile?: string;
334
+ action: string;
335
+ eventTime: string;
336
+ sendTime: string;
337
+ updated_at: string | null;
338
+ created_at: string;
339
+ deleted_at: string | null;
340
+ actor: TimebackStoredCaliperEntity;
341
+ object: TimebackStoredCaliperEntity;
342
+ generated?: TimebackStoredCaliperEntity | null;
343
+ target?: TimebackStoredCaliperEntity | null;
344
+ referrer?: TimebackStoredCaliperEntity | null;
345
+ edApp?: TimebackStoredCaliperEntity | null;
346
+ group?: TimebackStoredCaliperEntity | null;
347
+ membership?: TimebackStoredCaliperEntity | null;
348
+ session?: TimebackStoredCaliperEntity | null;
349
+ federatedSession?: TimebackStoredCaliperEntity | null;
350
+ extensions?: Record<string, unknown> | null;
351
+ clientAppId?: string | null;
352
+ }
353
+
292
354
  /**
293
355
  * TimeBack API Request/Response Types
294
356
  *
@@ -539,6 +601,10 @@ interface TimebackStudentActivityResponse {
539
601
  activities: TimebackRecentActivity[];
540
602
  hasMore: boolean;
541
603
  }
604
+ interface TimebackActivityDetailResponse {
605
+ activity: TimebackRecentActivity;
606
+ rawEvents: TimebackStoredCaliperEvent[];
607
+ }
542
608
  interface GrantTimebackXpRequest {
543
609
  gameId: string;
544
610
  courseId: string;
@@ -7518,6 +7584,10 @@ declare class PlaycademyInternalClient extends PlaycademyBaseClient {
7518
7584
  limit?: number;
7519
7585
  offset?: number;
7520
7586
  }) => Promise<TimebackStudentActivityResponse>;
7587
+ getActivityDetail: (timebackId: string, courseId: string, activityId: string, options: {
7588
+ gameId: string;
7589
+ runId?: string;
7590
+ }) => Promise<TimebackActivityDetailResponse>;
7521
7591
  grantXp: (request: GrantTimebackXpRequest) => Promise<TimebackAdminMutationResponse>;
7522
7592
  adjustTime: (request: AdjustTimebackTimeRequest) => Promise<TimebackAdminMutationResponse>;
7523
7593
  adjustMastery: (request: AdjustTimebackMasteryRequest) => Promise<TimebackAdminMutationResponse>;
package/dist/internal.js CHANGED
@@ -3149,6 +3149,13 @@ function createTimebackNamespace2(client) {
3149
3149
  }
3150
3150
  return client["request"](`/timeback/student-activity/${timebackId}/${courseId}?${params}`, "GET");
3151
3151
  },
3152
+ getActivityDetail: (timebackId, courseId, activityId, options) => {
3153
+ const params = new URLSearchParams({ gameId: options.gameId });
3154
+ if (options.runId) {
3155
+ params.set("runId", options.runId);
3156
+ }
3157
+ return client["request"](`/timeback/activity-detail/${timebackId}/${courseId}/${activityId}?${params}`, "GET");
3158
+ },
3152
3159
  grantXp: (request) => client["request"]("/timeback/grant-xp", "POST", {
3153
3160
  body: request
3154
3161
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playcademy/sdk",
3
- "version": "0.6.1-beta.6",
3
+ "version": "0.6.1-beta.7",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {