@oaknational/google-classroom-addon 1.28.0 → 1.30.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.
@@ -41,6 +41,14 @@ declare const createAnnouncementAttachmentArgsSchema: z.ZodObject<{
41
41
  type CreateAnnouncementAttachmentArgs = z.infer<typeof createAnnouncementAttachmentArgsSchema>;
42
42
 
43
43
  declare const pupilLessonProgressSchema: z.ZodObject<{
44
+ postSubmissionState: z.ZodEnum<{
45
+ NEW: "NEW";
46
+ CREATED: "CREATED";
47
+ RECLAIMED_BY_STUDENT: "RECLAIMED_BY_STUDENT";
48
+ SUBMISSION_STATE_UNSPECIFIED: "SUBMISSION_STATE_UNSPECIFIED";
49
+ TURNED_IN: "TURNED_IN";
50
+ RETURNED: "RETURNED";
51
+ }>;
44
52
  submissionId: z.ZodString;
45
53
  attachmentId: z.ZodString;
46
54
  courseId: z.ZodString;
@@ -185,6 +193,13 @@ declare const upsertPupilLessonProgressArgsSchema: z.ZodObject<{
185
193
  }, z.core.$strip>;
186
194
  type UpsertPupilLessonProgressArgs = z.infer<typeof upsertPupilLessonProgressArgsSchema>;
187
195
 
196
+ type FetchPupilResponseArgs = {
197
+ courseId: string;
198
+ itemId: string;
199
+ attachmentId: string;
200
+ submissionId: string;
201
+ };
202
+
188
203
  type VerifiedAuthSession = {
189
204
  session: string;
190
205
  token: string;
@@ -284,6 +299,7 @@ declare class OakGoogleClassroomAddOn {
284
299
  * @param submissionId - The Google Classroom submission ID
285
300
  */
286
301
  getPupilLessonProgress(submissionId: string, attachmentId: string, itemId: string): Promise<PupilLessonProgress | null>;
302
+ getPostSubmissionState(args: FetchPupilResponseArgs, accessToken: string, session: string): Promise<string>;
287
303
  }
288
304
 
289
305
  declare enum ExceptionType {
package/dist/types.d.ts CHANGED
@@ -146,7 +146,24 @@ declare const introProgressSchema: z.ZodObject<{
146
146
  worksheetDownloaded: z.ZodOptional<z.ZodBoolean>;
147
147
  isComplete: z.ZodBoolean;
148
148
  }, z.core.$strip>;
149
+ declare const postSubmissionStateSchema: z.ZodEnum<{
150
+ NEW: "NEW";
151
+ CREATED: "CREATED";
152
+ RECLAIMED_BY_STUDENT: "RECLAIMED_BY_STUDENT";
153
+ SUBMISSION_STATE_UNSPECIFIED: "SUBMISSION_STATE_UNSPECIFIED";
154
+ TURNED_IN: "TURNED_IN";
155
+ RETURNED: "RETURNED";
156
+ }>;
157
+ type PostSubmissionState = z.infer<typeof postSubmissionStateSchema>;
149
158
  declare const pupilLessonProgressSchema: z.ZodObject<{
159
+ postSubmissionState: z.ZodEnum<{
160
+ NEW: "NEW";
161
+ CREATED: "CREATED";
162
+ RECLAIMED_BY_STUDENT: "RECLAIMED_BY_STUDENT";
163
+ SUBMISSION_STATE_UNSPECIFIED: "SUBMISSION_STATE_UNSPECIFIED";
164
+ TURNED_IN: "TURNED_IN";
165
+ RETURNED: "RETURNED";
166
+ }>;
150
167
  submissionId: z.ZodString;
151
168
  attachmentId: z.ZodString;
152
169
  courseId: z.ZodString;
@@ -291,5 +308,5 @@ declare const upsertPupilLessonProgressArgsSchema: z.ZodObject<{
291
308
  }, z.core.$strip>;
292
309
  type UpsertPupilLessonProgressArgs = z.infer<typeof upsertPupilLessonProgressArgsSchema>;
293
310
 
294
- export { CreateAttachmentCallSchema, UPDATABLE_SUBMISSION_STATES, classroomAttachmentEntitySchema, classroomAttachmentSchema, codeSchema, createAnnouncementAttachmentArgsSchema, googleOAuthUserSchema, introProgressSchema, pupilLessonProgressSchema, questionResultSchema, quizProgressSchema, tokenPayloadSchema, upsertPupilLessonProgressArgsSchema, userCredentialsEntitySchema, videoProgressSchema };
295
- export type { ClassroomAttachment, ClassroomAttachmentEntity, Code, CreateAnnouncementAttachmentArgs, CreateAttachmentCall, GoogleOAuthUser, PupilLessonProgress, TokenPayload, UpdatableSubmissionState, UpsertPupilLessonProgressArgs, UserCredentialsEntity };
311
+ export { CreateAttachmentCallSchema, UPDATABLE_SUBMISSION_STATES, classroomAttachmentEntitySchema, classroomAttachmentSchema, codeSchema, createAnnouncementAttachmentArgsSchema, googleOAuthUserSchema, introProgressSchema, postSubmissionStateSchema, pupilLessonProgressSchema, questionResultSchema, quizProgressSchema, tokenPayloadSchema, upsertPupilLessonProgressArgsSchema, userCredentialsEntitySchema, videoProgressSchema };
312
+ export type { ClassroomAttachment, ClassroomAttachmentEntity, Code, CreateAnnouncementAttachmentArgs, CreateAttachmentCall, GoogleOAuthUser, PostSubmissionState, PupilLessonProgress, TokenPayload, UpdatableSubmissionState, UpsertPupilLessonProgressArgs, UserCredentialsEntity };
package/dist/views.d.ts CHANGED
@@ -157,7 +157,7 @@ type OnLessonAttachedData = {
157
157
  type Props$6 = {
158
158
  children: React.ReactNode;
159
159
  createAttachmentAction: (attachment: NewAttachment) => Promise<void>;
160
- onLessonAttached?: (data: OnLessonAttachedData) => void;
160
+ onLessonAttached?: (data: OnLessonAttachedData) => Promise<void> | void;
161
161
  };
162
162
  declare const BrowseLayout: ({ children, createAttachmentAction, onLessonAttached, }: Props$6) => React.JSX.Element;
163
163
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oaknational/google-classroom-addon",
3
- "version": "1.28.0",
3
+ "version": "1.30.0",
4
4
  "description": "Components and helpers for the Oak Google Classroom Add-on",
5
5
  "exports": {
6
6
  "./ui": {