@maxim_mazurok/gapi.client.classroom-v1 0.0.20250323 → 0.0.20250401

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 +110 -3
  2. package/package.json +1 -1
  3. package/readme.md +14 -0
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: 20250323
12
+ // Revision: 20250401
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -215,6 +215,8 @@ declare namespace gapi.client {
215
215
  dueTime?: TimeOfDay;
216
216
  /** The category that this coursework's grade contributes to. Present only when a category has been chosen for the coursework. May be used in calculating the overall grade. Read-only. */
217
217
  gradeCategory?: GradeCategory;
218
+ /** Identifier of the grading period associated with the coursework. * At creation, if unspecified, the grading period ID will be set based on the `dueDate` (or `scheduledTime` if no `dueDate` is set). * To indicate no association to any grading period, set this field to an empty string (""). * If specified, it must match an existing grading period ID in the course. */
219
+ gradingPeriodId?: string;
218
220
  /** Classroom-assigned identifier of this course work, unique per course. Read-only. */
219
221
  id?: string;
220
222
  /** Identifiers of students with access to the coursework. This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students specified in this field are assigned the coursework. */
@@ -367,6 +369,22 @@ declare namespace gapi.client {
367
369
  /** The numerator of the grade at this time in the submission grade history. */
368
370
  pointsEarned?: number;
369
371
  }
372
+ interface GradingPeriod {
373
+ /** Required. End date, in UTC, of the grading period. Inclusive. */
374
+ endDate?: Date;
375
+ /** Output only. System generated grading period ID. Read-only. */
376
+ id?: string;
377
+ /** Required. Start date, in UTC, of the grading period. Inclusive. */
378
+ startDate?: Date;
379
+ /** Required. Title of the grading period. For example, “Semester 1”. */
380
+ title?: string;
381
+ }
382
+ interface GradingPeriodSettings {
383
+ /** Supports toggling the application of grading periods on existing stream items. Once set, this value is persisted meaning that it does not need to be set in every request to update `GradingPeriodSettings`. If not previously set, the default is False. */
384
+ applyToExistingCoursework?: boolean;
385
+ /** The list of grading periods in a specific course. Grading periods must not have overlapping date ranges and must be listed in chronological order. Each grading period must have a unique title within a course. */
386
+ gradingPeriods?: GradingPeriod[];
387
+ }
370
388
  interface Guardian {
371
389
  /** Identifier for the guardian. */
372
390
  guardianId?: string;
@@ -2676,7 +2694,7 @@ declare namespace gapi.client {
2676
2694
  prettyPrint?: boolean;
2677
2695
  /** 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. */
2678
2696
  quotaUser?: string;
2679
- /** Mask that identifies which fields on the course work to update. This field is required to do an update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the `CourseWork` object. If a field that does not support empty values is included in the update mask and not set in the `CourseWork` object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified by teachers: * `title` * `description` * `state` * `due_date` * `due_time` * `max_points` * `scheduled_time` * `submission_modification_mode` * `topic_id` * `grading_period_id` Available in [V1_20240401_PREVIEW](https://developers.google.com/classroom/reference/preview) and later. */
2697
+ /** Mask that identifies which fields on the course work to update. This field is required to do an update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the `CourseWork` object. If a field that does not support empty values is included in the update mask and not set in the `CourseWork` object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified by teachers: * `title` * `description` * `state` * `due_date` * `due_time` * `max_points` * `scheduled_time` * `submission_modification_mode` * `topic_id` * `grading_period_id` */
2680
2698
  updateMask?: string;
2681
2699
  /** Upload protocol for media (e.g. "raw", "multipart"). */
2682
2700
  upload_protocol?: string;
@@ -2709,7 +2727,7 @@ declare namespace gapi.client {
2709
2727
  prettyPrint?: boolean;
2710
2728
  /** 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. */
2711
2729
  quotaUser?: string;
2712
- /** Mask that identifies which fields on the course work to update. This field is required to do an update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the `CourseWork` object. If a field that does not support empty values is included in the update mask and not set in the `CourseWork` object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified by teachers: * `title` * `description` * `state` * `due_date` * `due_time` * `max_points` * `scheduled_time` * `submission_modification_mode` * `topic_id` * `grading_period_id` Available in [V1_20240401_PREVIEW](https://developers.google.com/classroom/reference/preview) and later. */
2730
+ /** Mask that identifies which fields on the course work to update. This field is required to do an update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the `CourseWork` object. If a field that does not support empty values is included in the update mask and not set in the `CourseWork` object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified by teachers: * `title` * `description` * `state` * `due_date` * `due_time` * `max_points` * `scheduled_time` * `submission_modification_mode` * `topic_id` * `grading_period_id` */
2713
2731
  updateMask?: string;
2714
2732
  /** Upload protocol for media (e.g. "raw", "multipart"). */
2715
2733
  upload_protocol?: string;
@@ -4325,6 +4343,33 @@ declare namespace gapi.client {
4325
4343
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
4326
4344
  uploadType?: string;
4327
4345
  }): Request<Course>;
4346
+ /** Returns the grading period settings in a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user isn't permitted to access the grading period settings in the requested course or for access errors. * `NOT_FOUND` if the requested course does not exist. */
4347
+ getGradingPeriodSettings(request?: {
4348
+ /** V1 error format. */
4349
+ '$.xgafv'?: string;
4350
+ /** OAuth access token. */
4351
+ access_token?: string;
4352
+ /** Data format for response. */
4353
+ alt?: string;
4354
+ /** JSONP */
4355
+ callback?: string;
4356
+ /** Required. The identifier of the course. */
4357
+ courseId: string;
4358
+ /** Selector specifying which fields to include in a partial response. */
4359
+ fields?: string;
4360
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
4361
+ key?: string;
4362
+ /** OAuth 2.0 token for the current user. */
4363
+ oauth_token?: string;
4364
+ /** Returns response with indentations and line breaks. */
4365
+ prettyPrint?: boolean;
4366
+ /** 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. */
4367
+ quotaUser?: string;
4368
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
4369
+ upload_protocol?: string;
4370
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
4371
+ uploadType?: string;
4372
+ }): Request<GradingPeriodSettings>;
4328
4373
  /** Returns a list of courses that the requesting user is permitted to view, restricted to those that match the request. Returned courses are ordered by creation time, with the most recently created coming first. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the query argument is malformed. * `NOT_FOUND` if any users specified in the query arguments do not exist. */
4329
4374
  list(request?: {
4330
4375
  /** V1 error format. */
@@ -4480,6 +4525,68 @@ declare namespace gapi.client {
4480
4525
  },
4481
4526
  body: Course,
4482
4527
  ): Request<Course>;
4528
+ /** Updates grading period settings of a course. Individual grading periods can be added, removed, or modified using this method. The requesting user and course owner must be eligible to modify Grading Periods. For details, see [licensing requirements](https://developers.google.com/classroom/grading-periods/manage-grading-periods#licensing_requirements). This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to modify the grading period settings in a course or for access errors: * UserIneligibleToUpdateGradingPeriodSettings * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist. */
4529
+ updateGradingPeriodSettings(request: {
4530
+ /** V1 error format. */
4531
+ '$.xgafv'?: string;
4532
+ /** OAuth access token. */
4533
+ access_token?: string;
4534
+ /** Data format for response. */
4535
+ alt?: string;
4536
+ /** JSONP */
4537
+ callback?: string;
4538
+ /** Required. The identifier of the course. */
4539
+ courseId: string;
4540
+ /** Selector specifying which fields to include in a partial response. */
4541
+ fields?: string;
4542
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
4543
+ key?: string;
4544
+ /** OAuth 2.0 token for the current user. */
4545
+ oauth_token?: string;
4546
+ /** Returns response with indentations and line breaks. */
4547
+ prettyPrint?: boolean;
4548
+ /** 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. */
4549
+ quotaUser?: string;
4550
+ /** Mask that identifies which fields in the GradingPeriodSettings to update. The GradingPeriodSettings `grading_periods` list will be fully replaced by the grading periods specified in the update request. For example: * Grading periods included in the list without an ID are considered additions, and a new ID will be assigned when the request is made. * Grading periods that currently exist, but are missing from the request will be considered deletions. * Grading periods with an existing ID and modified data are considered edits. Unmodified data will be left as is. * Grading periods included with an unknown ID will result in an error. The following fields may be specified: * `grading_periods` * `apply_to_existing_coursework` */
4551
+ updateMask?: string;
4552
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
4553
+ upload_protocol?: string;
4554
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
4555
+ uploadType?: string;
4556
+ /** Request body */
4557
+ resource: GradingPeriodSettings;
4558
+ }): Request<GradingPeriodSettings>;
4559
+ updateGradingPeriodSettings(
4560
+ request: {
4561
+ /** V1 error format. */
4562
+ '$.xgafv'?: string;
4563
+ /** OAuth access token. */
4564
+ access_token?: string;
4565
+ /** Data format for response. */
4566
+ alt?: string;
4567
+ /** JSONP */
4568
+ callback?: string;
4569
+ /** Required. The identifier of the course. */
4570
+ courseId: string;
4571
+ /** Selector specifying which fields to include in a partial response. */
4572
+ fields?: string;
4573
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
4574
+ key?: string;
4575
+ /** OAuth 2.0 token for the current user. */
4576
+ oauth_token?: string;
4577
+ /** Returns response with indentations and line breaks. */
4578
+ prettyPrint?: boolean;
4579
+ /** 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. */
4580
+ quotaUser?: string;
4581
+ /** Mask that identifies which fields in the GradingPeriodSettings to update. The GradingPeriodSettings `grading_periods` list will be fully replaced by the grading periods specified in the update request. For example: * Grading periods included in the list without an ID are considered additions, and a new ID will be assigned when the request is made. * Grading periods that currently exist, but are missing from the request will be considered deletions. * Grading periods with an existing ID and modified data are considered edits. Unmodified data will be left as is. * Grading periods included with an unknown ID will result in an error. The following fields may be specified: * `grading_periods` * `apply_to_existing_coursework` */
4582
+ updateMask?: string;
4583
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
4584
+ upload_protocol?: string;
4585
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
4586
+ uploadType?: string;
4587
+ },
4588
+ body: GradingPeriodSettings,
4589
+ ): Request<GradingPeriodSettings>;
4483
4590
  aliases: AliasesResource;
4484
4591
  announcements: AnnouncementsResource;
4485
4592
  courseWork: CourseWorkResource;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.classroom-v1",
3
- "version": "0.0.20250323",
3
+ "version": "0.0.20250401",
4
4
  "description": "TypeScript typings for Google Classroom API v1",
5
5
  "repository": {
6
6
  "type": "git",
package/readme.md CHANGED
@@ -153,6 +153,13 @@ Returns a course. This method returns the following error codes: * `PERMISSION_D
153
153
  */
154
154
  await gapi.client.classroom.courses.get({id: 'id'});
155
155
 
156
+ /*
157
+ Returns the grading period settings in a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user isn't permitted to access the grading period settings in the requested course or for access errors. * `NOT_FOUND` if the requested course does not exist.
158
+ */
159
+ await gapi.client.classroom.courses.getGradingPeriodSettings({
160
+ courseId: 'courseId',
161
+ });
162
+
156
163
  /*
157
164
  Returns a list of courses that the requesting user is permitted to view, restricted to those that match the request. Returned courses are ordered by creation time, with the most recently created coming first. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the query argument is malformed. * `NOT_FOUND` if any users specified in the query arguments do not exist.
158
165
  */
@@ -168,6 +175,13 @@ Updates a course. This method returns the following error codes: * `PERMISSION_D
168
175
  */
169
176
  await gapi.client.classroom.courses.update({id: 'id'});
170
177
 
178
+ /*
179
+ Updates grading period settings of a course. Individual grading periods can be added, removed, or modified using this method. The requesting user and course owner must be eligible to modify Grading Periods. For details, see [licensing requirements](https://developers.google.com/classroom/grading-periods/manage-grading-periods#licensing_requirements). This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to modify the grading period settings in a course or for access errors: * UserIneligibleToUpdateGradingPeriodSettings * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist.
180
+ */
181
+ await gapi.client.classroom.courses.updateGradingPeriodSettings({
182
+ courseId: 'courseId',
183
+ });
184
+
171
185
  /*
172
186
  Accepts an invitation, removing it and adding the invited user to the teachers or students (as appropriate) of the specified course. Only the invited user may accept an invitation. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to accept the requested invitation or for access errors. * `FAILED_PRECONDITION` for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * CourseTeacherLimitReached * UserGroupsMembershipLimitReached * `NOT_FOUND` if no invitation exists with the requested ID.
173
187
  */