@oaknational/google-classroom-addon 1.27.1 → 1.29.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.
@@ -20,7 +20,7 @@ declare const classroomAttachmentEntitySchema: z.ZodObject<{
20
20
  uri: z.ZodString;
21
21
  }, z.core.$strip>>;
22
22
  itemId: z.ZodString;
23
- maxPoints: z.ZodOptional<z.ZodNumber>;
23
+ maxPoints: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
24
24
  attachmentId: z.ZodString;
25
25
  createdAt: z.ZodString;
26
26
  teacherLoginHint: z.ZodOptional<z.ZodString>;
@@ -262,9 +262,12 @@ declare class OakGoogleClassroomAddOn {
262
262
  /**
263
263
  * Resolves a teacher OAuth client by looking up the attachment's teacherLoginHint
264
264
  * and fetching the teacher's stored credentials from Firestore.
265
+ * Grade sync is intentionally skipped when the attachment's maxPoints is not a
266
+ * positive number (null, undefined, or 0), allowing teachers to disable automatic
267
+ * grading by setting the score to 0 or Unmarked.
265
268
  * In dev mode, falls back to GOOGLE_CLASSROOM_DEV_REFRESH_TOKEN if teacher credentials are not found.
266
269
  * @param attachmentId - The attachment ID to look up the teacher for.
267
- * @returns A GoogleOAuthClient authenticated with teacher credentials, or undefined if unavailable.
270
+ * @returns A GoogleOAuthClient authenticated with teacher credentials, or undefined if grade sync is disabled or credentials are unavailable.
268
271
  */
269
272
  private resolveTeacherOAuthClient;
270
273
  /**
package/dist/types.d.ts CHANGED
@@ -42,7 +42,7 @@ declare const classroomAttachmentEntitySchema: z.ZodObject<{
42
42
  uri: z.ZodString;
43
43
  }, z.core.$strip>>;
44
44
  itemId: z.ZodString;
45
- maxPoints: z.ZodOptional<z.ZodNumber>;
45
+ maxPoints: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
46
46
  attachmentId: z.ZodString;
47
47
  createdAt: z.ZodString;
48
48
  teacherLoginHint: z.ZodOptional<z.ZodString>;
@@ -82,7 +82,7 @@ declare const classroomAttachmentSchema: z.ZodObject<{
82
82
  uri: z.ZodString;
83
83
  }, z.core.$strip>>;
84
84
  itemId: z.ZodString;
85
- maxPoints: z.ZodOptional<z.ZodNumber>;
85
+ maxPoints: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
86
86
  }, z.core.$strip>;
87
87
  type ClassroomAttachment = z.infer<typeof classroomAttachmentSchema>;
88
88
 
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.27.1",
3
+ "version": "1.29.0",
4
4
  "description": "Components and helpers for the Oak Google Classroom Add-on",
5
5
  "exports": {
6
6
  "./ui": {