@maxim_mazurok/gapi.client.classroom-v1 0.2.20260316 → 0.2.20260602

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.
Files changed (3) hide show
  1. package/index.d.ts +13 -7
  2. package/package.json +1 -1
  3. package/readme.md +13 -1
package/index.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
10
10
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
11
11
  // Generated from: https://classroom.googleapis.com/$discovery/rest?version=v1
12
- // Revision: 20260316
12
+ // Revision: 20260602
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -51,6 +51,10 @@ declare namespace gapi.client {
51
51
  title?: string;
52
52
  }
53
53
  interface AddOnAttachmentStudentSubmission {
54
+ /** Output only. Identifier of the course work submission under which this attachment submission was made. */
55
+ courseWorkSubmissionId?: string;
56
+ /** Output only. Classroom-assigned identifier for this student submission. This is unique among submissions for the relevant course work and add-on attachment combination. */
57
+ id?: string;
54
58
  /** Student grade on this attachment. If unset, no grade was set. */
55
59
  pointsEarned?: number;
56
60
  /** Submission state of add-on attachment's parent post (i.e. assignment). */
@@ -174,6 +178,8 @@ declare namespace gapi.client {
174
178
  guardiansEnabled?: boolean;
175
179
  /** Identifier for this course assigned by Classroom. When creating a course, you may optionally set this identifier to an alias string in the request to create a corresponding alias. The `id` is still assigned by Classroom and cannot be updated after the course is created. Specifying this field in a course update mask results in an error. */
176
180
  id?: string;
181
+ /** Optional. Levels for the course. Examples: "9th grade", "Middle school", "4th - 5th", "K-2", "3000". If set, this field must be a valid UTF-8 string and fewer than 1000 characters. This field can only be cleared using the `PatchCourse` method. */
182
+ levels?: string;
177
183
  /** Name of the course. For example, "10th Grade Biology". The name is required. It must be between 1 and 750 characters and a valid UTF-8 string. */
178
184
  name?: string;
179
185
  /** The identifier of the owner of a course. When specified as a parameter of a create course request, this field is required. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user This must be set in a create request. Admins can also specify this field in a patch course request to transfer ownership. In other contexts, it is read-only. */
@@ -4868,7 +4874,7 @@ declare namespace gapi.client {
4868
4874
  alt?: 'json' | 'media' | 'proto';
4869
4875
  /** JSONP */
4870
4876
  callback?: string;
4871
- /** Restricts returned courses to those in one of the specified states The default value is ACTIVE, ARCHIVED, PROVISIONED, DECLINED. */
4877
+ /** Restricts returned courses to those in one of the specified states. If unspecified, Courses in any state are returned. */
4872
4878
  courseStates?:
4873
4879
  | 'COURSE_STATE_UNSPECIFIED'
4874
4880
  | 'ACTIVE'
@@ -4898,9 +4904,9 @@ declare namespace gapi.client {
4898
4904
  prettyPrint?: boolean;
4899
4905
  /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
4900
4906
  quotaUser?: string;
4901
- /** Restricts returned courses to those having a student with the specified identifier. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user */
4907
+ /** Restricts returned courses to those having a student with the specified identifier. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user If specified, `teacher_id` must be empty. */
4902
4908
  studentId?: string;
4903
- /** Restricts returned courses to those having a teacher with the specified identifier. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user */
4909
+ /** Restricts returned courses to those having a teacher with the specified identifier. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user If specified, `student_id` must be empty. */
4904
4910
  teacherId?: string;
4905
4911
  /** Upload protocol for media (e.g. "raw", "multipart"). */
4906
4912
  upload_protocol?: string;
@@ -4929,7 +4935,7 @@ declare namespace gapi.client {
4929
4935
  prettyPrint?: boolean;
4930
4936
  /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
4931
4937
  quotaUser?: string;
4932
- /** Mask that identifies which fields on the course to update. This field is required to do an update. The update will fail if invalid fields are specified. The following fields are valid: * `courseState` * `description` * `descriptionHeading` * `name` * `ownerId` * `room` * `section` * `subject` Note: patches to ownerId are treated as being effective immediately, but in practice it may take some time for the ownership transfer of all affected resources to complete. When set in a query parameter, this field should be specified as `updateMask=,,...` */
4938
+ /** Mask that identifies which fields on the course to update. This field is required to do an update. The update will fail if invalid fields are specified. The following fields are valid: * `courseState` * `description` * `descriptionHeading` * `name` * `ownerId` * `room` * `section` * `subject` * `levels` Note: patches to ownerId are treated as being effective immediately, but in practice it may take some time for the ownership transfer of all affected resources to complete. When set in a query parameter, this field should be specified as `updateMask=,,...` */
4933
4939
  updateMask?: string;
4934
4940
  /** Upload protocol for media (e.g. "raw", "multipart"). */
4935
4941
  upload_protocol?: string;
@@ -4960,7 +4966,7 @@ declare namespace gapi.client {
4960
4966
  prettyPrint?: boolean;
4961
4967
  /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
4962
4968
  quotaUser?: string;
4963
- /** Mask that identifies which fields on the course to update. This field is required to do an update. The update will fail if invalid fields are specified. The following fields are valid: * `courseState` * `description` * `descriptionHeading` * `name` * `ownerId` * `room` * `section` * `subject` Note: patches to ownerId are treated as being effective immediately, but in practice it may take some time for the ownership transfer of all affected resources to complete. When set in a query parameter, this field should be specified as `updateMask=,,...` */
4969
+ /** Mask that identifies which fields on the course to update. This field is required to do an update. The update will fail if invalid fields are specified. The following fields are valid: * `courseState` * `description` * `descriptionHeading` * `name` * `ownerId` * `room` * `section` * `subject` * `levels` Note: patches to ownerId are treated as being effective immediately, but in practice it may take some time for the ownership transfer of all affected resources to complete. When set in a query parameter, this field should be specified as `updateMask=,,...` */
4964
4970
  updateMask?: string;
4965
4971
  /** Upload protocol for media (e.g. "raw", "multipart"). */
4966
4972
  upload_protocol?: string;
@@ -4969,7 +4975,7 @@ declare namespace gapi.client {
4969
4975
  },
4970
4976
  body: Course,
4971
4977
  ): Request<Course>;
4972
- /** Updates a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID. * `FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable * CourseTitleCannotContainUrl */
4978
+ /** Updates a course. Note: Unlike other fields, `levels` is not cleared if omitted from the request. The `UpdateCourse` method only modifies `levels` if it is explicitly provided; otherwise, the existing value is preserved. Use the `PatchCourse` method to clear the `levels` field. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID. * `FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable * CourseTitleCannotContainUrl */
4973
4979
  update(request: {
4974
4980
  /** V1 error format. */
4975
4981
  '$.xgafv'?: '1' | '2';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.classroom-v1",
3
- "version": "0.2.20260316",
3
+ "version": "0.2.20260602",
4
4
  "description": "TypeScript typings for Google Classroom API v1",
5
5
  "repository": {
6
6
  "type": "git",
package/readme.md CHANGED
@@ -11,6 +11,18 @@ Install typings for Google Classroom API:
11
11
  npm install @types/gapi.client.classroom-v1 --save-dev
12
12
  ```
13
13
 
14
+ ## TypeScript 6.0+
15
+
16
+ TypeScript 6.0 changed `types` to default to `[]`. You must now explicitly list type packages in `tsconfig.json`:
17
+
18
+ ```json
19
+ {
20
+ "compilerOptions": {
21
+ "types": ["gapi", "gapi.auth2", "gapi.client", "gapi.client.classroom-v1"]
22
+ }
23
+ }
24
+ ```
25
+
14
26
  ## Usage
15
27
 
16
28
  You need to initialize Google API client in your code:
@@ -171,7 +183,7 @@ Updates one or more fields in a course. This method returns the following error
171
183
  await gapi.client.classroom.courses.patch({id: 'id'});
172
184
 
173
185
  /*
174
- Updates a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID. * `FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable * CourseTitleCannotContainUrl
186
+ Updates a course. Note: Unlike other fields, `levels` is not cleared if omitted from the request. The `UpdateCourse` method only modifies `levels` if it is explicitly provided; otherwise, the existing value is preserved. Use the `PatchCourse` method to clear the `levels` field. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID. * `FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable * CourseTitleCannotContainUrl
175
187
  */
176
188
  await gapi.client.classroom.courses.update({id: 'id'});
177
189