@playcademy/sdk 0.4.1-beta.2 → 0.4.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.d.ts +1 -1
- package/dist/internal.d.ts +25 -3
- package/dist/internal.js +10 -0
- package/dist/types.d.ts +3 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -388,7 +388,7 @@ type Method = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
|
388
388
|
*
|
|
389
389
|
* @module types/user
|
|
390
390
|
*/
|
|
391
|
-
type UserRoleEnumType = 'admin' | 'player' | 'developer';
|
|
391
|
+
type UserRoleEnumType = 'admin' | 'player' | 'developer' | 'teacher';
|
|
392
392
|
type DeveloperStatusEnumType = 'none' | 'pending' | 'approved';
|
|
393
393
|
type TimebackUserRole = 'administrator' | 'aide' | 'guardian' | 'parent' | 'proctor' | 'relative' | 'student' | 'teacher';
|
|
394
394
|
type TimebackOrgType = 'department' | 'school' | 'district' | 'local' | 'state' | 'national';
|
package/dist/internal.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ type Method = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
|
15
15
|
*
|
|
16
16
|
* @module types/user
|
|
17
17
|
*/
|
|
18
|
-
type UserRoleEnumType = 'admin' | 'player' | 'developer';
|
|
18
|
+
type UserRoleEnumType = 'admin' | 'player' | 'developer' | 'teacher';
|
|
19
19
|
type DeveloperStatusEnumType = 'none' | 'pending' | 'approved';
|
|
20
20
|
type DeveloperStatusValue = DeveloperStatusEnumType;
|
|
21
21
|
type TimebackUserRole = 'administrator' | 'aide' | 'guardian' | 'parent' | 'proctor' | 'relative' | 'student' | 'teacher';
|
|
@@ -796,6 +796,25 @@ interface ToggleCourseCompletionRequest {
|
|
|
796
796
|
studentId: string;
|
|
797
797
|
action: 'complete' | 'resume';
|
|
798
798
|
}
|
|
799
|
+
interface EnrollStudentRequest {
|
|
800
|
+
gameId: string;
|
|
801
|
+
courseId: string;
|
|
802
|
+
studentId: string;
|
|
803
|
+
}
|
|
804
|
+
interface UnenrollStudentRequest {
|
|
805
|
+
gameId: string;
|
|
806
|
+
courseId: string;
|
|
807
|
+
studentId: string;
|
|
808
|
+
}
|
|
809
|
+
interface SearchStudentResult {
|
|
810
|
+
studentId: string;
|
|
811
|
+
name: string;
|
|
812
|
+
email: string | null;
|
|
813
|
+
alreadyEnrolled: boolean;
|
|
814
|
+
}
|
|
815
|
+
interface SearchStudentsResponse {
|
|
816
|
+
students: SearchStudentResult[];
|
|
817
|
+
}
|
|
799
818
|
interface TimebackAdminMutationResponse {
|
|
800
819
|
status: 'ok';
|
|
801
820
|
}
|
|
@@ -2277,14 +2296,14 @@ declare const users: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
|
2277
2296
|
tableName: "user";
|
|
2278
2297
|
dataType: "string";
|
|
2279
2298
|
columnType: "PgEnumColumn";
|
|
2280
|
-
data: "admin" | "developer" | "player";
|
|
2299
|
+
data: "admin" | "developer" | "player" | "teacher";
|
|
2281
2300
|
driverParam: string;
|
|
2282
2301
|
notNull: true;
|
|
2283
2302
|
hasDefault: true;
|
|
2284
2303
|
isPrimaryKey: false;
|
|
2285
2304
|
isAutoincrement: false;
|
|
2286
2305
|
hasRuntimeDefault: false;
|
|
2287
|
-
enumValues: ["admin", "player", "developer"];
|
|
2306
|
+
enumValues: ["admin", "player", "developer", "teacher"];
|
|
2288
2307
|
baseColumn: never;
|
|
2289
2308
|
identity: undefined;
|
|
2290
2309
|
generated: undefined;
|
|
@@ -7754,6 +7773,9 @@ declare class PlaycademyInternalClient extends PlaycademyBaseClient {
|
|
|
7754
7773
|
adjustTime: (request: AdjustTimebackTimeRequest) => Promise<TimebackAdminMutationResponse>;
|
|
7755
7774
|
adjustMastery: (request: AdjustTimebackMasteryRequest) => Promise<TimebackAdminMutationResponse>;
|
|
7756
7775
|
toggleCompletion: (request: ToggleCourseCompletionRequest) => Promise<TimebackAdminMutationResponse>;
|
|
7776
|
+
searchStudents: (gameId: string, courseId: string, query: string) => Promise<SearchStudentsResponse>;
|
|
7777
|
+
enrollStudent: (request: EnrollStudentRequest) => Promise<TimebackAdminMutationResponse>;
|
|
7778
|
+
unenrollStudent: (request: UnenrollStudentRequest) => Promise<TimebackAdminMutationResponse>;
|
|
7757
7779
|
};
|
|
7758
7780
|
};
|
|
7759
7781
|
/** Auto-initializes a PlaycademyInternalClient with context from the environment */
|
package/dist/internal.js
CHANGED
|
@@ -2570,6 +2570,16 @@ function createTimebackNamespace2(client) {
|
|
|
2570
2570
|
}),
|
|
2571
2571
|
toggleCompletion: (request) => client["request"]("/timeback/toggle-completion", "POST", {
|
|
2572
2572
|
body: request
|
|
2573
|
+
}),
|
|
2574
|
+
searchStudents: (gameId, courseId, query) => {
|
|
2575
|
+
const params = new URLSearchParams({ q: query });
|
|
2576
|
+
return client["request"](`/timeback/search-students/${gameId}/${courseId}?${params}`, "GET");
|
|
2577
|
+
},
|
|
2578
|
+
enrollStudent: (request) => client["request"]("/timeback/enroll-student", "POST", {
|
|
2579
|
+
body: request
|
|
2580
|
+
}),
|
|
2581
|
+
unenrollStudent: (request) => client["request"]("/timeback/unenroll-student", "POST", {
|
|
2582
|
+
body: request
|
|
2573
2583
|
})
|
|
2574
2584
|
}
|
|
2575
2585
|
};
|
package/dist/types.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ type Method = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
|
29
29
|
*
|
|
30
30
|
* @module types/user
|
|
31
31
|
*/
|
|
32
|
-
type UserRoleEnumType = 'admin' | 'player' | 'developer';
|
|
32
|
+
type UserRoleEnumType = 'admin' | 'player' | 'developer' | 'teacher';
|
|
33
33
|
type DeveloperStatusEnumType = 'none' | 'pending' | 'approved';
|
|
34
34
|
type DeveloperStatusValue = DeveloperStatusEnumType;
|
|
35
35
|
type TimebackUserRole = 'administrator' | 'aide' | 'guardian' | 'parent' | 'proctor' | 'relative' | 'student' | 'teacher';
|
|
@@ -1280,14 +1280,14 @@ declare const users: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
|
1280
1280
|
tableName: "user";
|
|
1281
1281
|
dataType: "string";
|
|
1282
1282
|
columnType: "PgEnumColumn";
|
|
1283
|
-
data: "admin" | "developer" | "player";
|
|
1283
|
+
data: "admin" | "developer" | "player" | "teacher";
|
|
1284
1284
|
driverParam: string;
|
|
1285
1285
|
notNull: true;
|
|
1286
1286
|
hasDefault: true;
|
|
1287
1287
|
isPrimaryKey: false;
|
|
1288
1288
|
isAutoincrement: false;
|
|
1289
1289
|
hasRuntimeDefault: false;
|
|
1290
|
-
enumValues: ["admin", "player", "developer"];
|
|
1290
|
+
enumValues: ["admin", "player", "developer", "teacher"];
|
|
1291
1291
|
baseColumn: never;
|
|
1292
1292
|
identity: undefined;
|
|
1293
1293
|
generated: undefined;
|