UNPKG

googleapis

Version:
1,283 lines 345 kB
/// <reference types="node" /> import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosPromise, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common'; import { Readable } from 'stream'; export declare namespace classroom_v1 { export interface Options extends GlobalOptions { version: 'v1'; } interface StandardParameters { /** * Auth client or API Key for the request */ auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth; /** * V1 error format. */ '$.xgafv'?: string; /** * OAuth access token. */ access_token?: string; /** * Data format for response. */ alt?: string; /** * JSONP */ callback?: string; /** * Selector specifying which fields to include in a partial response. */ fields?: string; /** * 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. */ key?: string; /** * OAuth 2.0 token for the current user. */ oauth_token?: string; /** * Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** * 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. */ quotaUser?: string; /** * Legacy upload protocol for media (e.g. "media", "multipart"). */ uploadType?: string; /** * Upload protocol for media (e.g. "raw", "multipart"). */ upload_protocol?: string; } /** * Google Classroom API * * Manages classes, rosters, and invitations in Google Classroom. * * @example * ```js * const {google} = require('googleapis'); * const classroom = google.classroom('v1'); * ``` */ export class Classroom { context: APIRequestContext; courses: Resource$Courses; invitations: Resource$Invitations; registrations: Resource$Registrations; userProfiles: Resource$Userprofiles; constructor(options: GlobalOptions, google?: GoogleConfigurable); } /** * Announcement created by a teacher for students of the course */ export interface Schema$Announcement { /** * Absolute link to this announcement in the Classroom web UI. This is only populated if `state` is `PUBLISHED`. Read-only. */ alternateLink?: string | null; /** * Assignee mode of the announcement. If unspecified, the default value is `ALL_STUDENTS`. */ assigneeMode?: string | null; /** * Identifier of the course. Read-only. */ courseId?: string | null; /** * Timestamp when this announcement was created. Read-only. */ creationTime?: string | null; /** * Identifier for the user that created the announcement. Read-only. */ creatorUserId?: string | null; /** * Classroom-assigned identifier of this announcement, unique per course. Read-only. */ id?: string | null; /** * Identifiers of students with access to the announcement. This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students specified in this field can see the announcement. */ individualStudentsOptions?: Schema$IndividualStudentsOptions; /** * Additional materials. Announcements must have no more than 20 material items. */ materials?: Schema$Material[]; /** * Optional timestamp when this announcement is scheduled to be published. */ scheduledTime?: string | null; /** * Status of this announcement. If unspecified, the default state is `DRAFT`. */ state?: string | null; /** * Description of this announcement. The text must be a valid UTF-8 string containing no more than 30,000 characters. */ text?: string | null; /** * Timestamp of the most recent change to this announcement. Read-only. */ updateTime?: string | null; } /** * Additional details for assignments. */ export interface Schema$Assignment { /** * Drive folder where attachments from student submissions are placed. This is only populated for course teachers and administrators. */ studentWorkFolder?: Schema$DriveFolder; } /** * Student work for an assignment. */ export interface Schema$AssignmentSubmission { /** * Attachments added by the student. Drive files that correspond to materials with a share mode of STUDENT_COPY may not exist yet if the student has not accessed the assignment in Classroom. Some attachment metadata is only populated if the requesting user has permission to access it. Identifier and alternate_link fields are always available, but others (for example, title) may not be. */ attachments?: Schema$Attachment[]; } /** * Attachment added to student assignment work. When creating attachments, setting the `form` field is not supported. */ export interface Schema$Attachment { /** * Google Drive file attachment. */ driveFile?: Schema$DriveFile; /** * Google Forms attachment. */ form?: Schema$Form; /** * Link attachment. */ link?: Schema$Link; /** * Youtube video attachment. */ youTubeVideo?: Schema$YouTubeVideo; } /** * A reference to a Cloud Pub/Sub topic. To register for notifications, the owner of the topic must grant `classroom-notifications@system.gserviceaccount.com` the `projects.topics.publish` permission. */ export interface Schema$CloudPubsubTopic { /** * The `name` field of a Cloud Pub/Sub [Topic](https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics#Topic). */ topicName?: string | null; } /** * A Course in Classroom. */ export interface Schema$Course { /** * Absolute link to this course in the Classroom web UI. Read-only. */ alternateLink?: string | null; /** * The Calendar ID for a calendar that all course members can see, to which Classroom adds events for course work and announcements in the course. Read-only. */ calendarId?: string | null; /** * The email address of a Google group containing all members of the course. This group does not accept email and can only be used for permissions. Read-only. */ courseGroupEmail?: string | null; /** * Sets of materials that appear on the "about" page of this course. Read-only. */ courseMaterialSets?: Schema$CourseMaterialSet[]; /** * State of the course. If unspecified, the default state is `PROVISIONED`. */ courseState?: string | null; /** * Creation time of the course. Specifying this field in a course update mask results in an error. Read-only. */ creationTime?: string | null; /** * Optional description. For example, "We'll be learning about the structure of living creatures from a combination of textbooks, guest lectures, and lab work. Expect to be excited!" If set, this field must be a valid UTF-8 string and no longer than 30,000 characters. */ description?: string | null; /** * Optional heading for the description. For example, "Welcome to 10th Grade Biology." If set, this field must be a valid UTF-8 string and no longer than 3600 characters. */ descriptionHeading?: string | null; /** * Enrollment code to use when joining this course. Specifying this field in a course update mask results in an error. Read-only. */ enrollmentCode?: string | null; /** * Whether or not guardian notifications are enabled for this course. Read-only. */ guardiansEnabled?: boolean | null; /** * 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. */ id?: string | null; /** * 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. */ name?: string | null; /** * 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. */ ownerId?: string | null; /** * Optional room location. For example, "301". If set, this field must be a valid UTF-8 string and no longer than 650 characters. */ room?: string | null; /** * Section of the course. For example, "Period 2". If set, this field must be a valid UTF-8 string and no longer than 2800 characters. */ section?: string | null; /** * Information about a Drive Folder that is shared with all teachers of the course. This field will only be set for teachers of the course and domain administrators. Read-only. */ teacherFolder?: Schema$DriveFolder; /** * The email address of a Google group containing all teachers of the course. This group does not accept email and can only be used for permissions. Read-only. */ teacherGroupEmail?: string | null; /** * Time of the most recent update to this course. Specifying this field in a course update mask results in an error. Read-only. */ updateTime?: string | null; } /** * Alternative identifier for a course. An alias uniquely identifies a course. It must be unique within one of the following scopes: * domain: A domain-scoped alias is visible to all users within the alias creator's domain and can be created only by a domain admin. A domain-scoped alias is often used when a course has an identifier external to Classroom. * project: A project-scoped alias is visible to any request from an application using the Developer Console project ID that created the alias and can be created by any project. A project-scoped alias is often used when an application has alternative identifiers. A random value can also be used to avoid duplicate courses in the event of transmission failures, as retrying a request will return `ALREADY_EXISTS` if a previous one has succeeded. */ export interface Schema$CourseAlias { /** * Alias string. The format of the string indicates the desired alias scoping. * `d:` indicates a domain-scoped alias. Example: `d:math_101` * `p:` indicates a project-scoped alias. Example: `p:abc123` This field has a maximum length of 256 characters. */ alias?: string | null; } /** * A material attached to a course as part of a material set. */ export interface Schema$CourseMaterial { /** * Google Drive file attachment. */ driveFile?: Schema$DriveFile; /** * Google Forms attachment. */ form?: Schema$Form; /** * Link atatchment. */ link?: Schema$Link; /** * Youtube video attachment. */ youTubeVideo?: Schema$YouTubeVideo; } /** * A set of materials that appears on the "About" page of the course. These materials might include a syllabus, schedule, or other background information relating to the course as a whole. */ export interface Schema$CourseMaterialSet { /** * Materials attached to this set. */ materials?: Schema$CourseMaterial[]; /** * Title for this set. */ title?: string | null; } /** * Information about a `Feed` with a `feed_type` of `COURSE_ROSTER_CHANGES`. */ export interface Schema$CourseRosterChangesInfo { /** * The `course_id` of the course to subscribe to roster changes for. */ courseId?: string | null; } /** * Course work created by a teacher for students of the course. */ export interface Schema$CourseWork { /** * Absolute link to this course work in the Classroom web UI. This is only populated if `state` is `PUBLISHED`. Read-only. */ alternateLink?: string | null; /** * Assignee mode of the coursework. If unspecified, the default value is `ALL_STUDENTS`. */ assigneeMode?: string | null; /** * Assignment details. This is populated only when `work_type` is `ASSIGNMENT`. Read-only. */ assignment?: Schema$Assignment; /** * Whether this course work item is associated with the Developer Console project making the request. See CreateCourseWork for more details. Read-only. */ associatedWithDeveloper?: boolean | null; /** * Identifier of the course. Read-only. */ courseId?: string | null; /** * Timestamp when this course work was created. Read-only. */ creationTime?: string | null; /** * Identifier for the user that created the coursework. Read-only. */ creatorUserId?: string | null; /** * Optional description of this course work. If set, the description must be a valid UTF-8 string containing no more than 30,000 characters. */ description?: string | null; /** * Optional date, in UTC, that submissions for this course work are due. This must be specified if `due_time` is specified. */ dueDate?: Schema$Date; /** * Optional time of day, in UTC, that submissions for this course work are due. This must be specified if `due_date` is specified. */ dueTime?: Schema$TimeOfDay; /** * Classroom-assigned identifier of this course work, unique per course. Read-only. */ id?: string | null; /** * 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. */ individualStudentsOptions?: Schema$IndividualStudentsOptions; /** * Additional materials. CourseWork must have no more than 20 material items. */ materials?: Schema$Material[]; /** * Maximum grade for this course work. If zero or unspecified, this assignment is considered ungraded. This must be a non-negative integer value. */ maxPoints?: number | null; /** * Multiple choice question details. For read operations, this field is populated only when `work_type` is `MULTIPLE_CHOICE_QUESTION`. For write operations, this field must be specified when creating course work with a `work_type` of `MULTIPLE_CHOICE_QUESTION`, and it must not be set otherwise. */ multipleChoiceQuestion?: Schema$MultipleChoiceQuestion; /** * Optional timestamp when this course work is scheduled to be published. */ scheduledTime?: string | null; /** * Status of this course work. If unspecified, the default state is `DRAFT`. */ state?: string | null; /** * Setting to determine when students are allowed to modify submissions. If unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`. */ submissionModificationMode?: string | null; /** * Title of this course work. The title must be a valid UTF-8 string containing between 1 and 3000 characters. */ title?: string | null; /** * Identifier for the topic that this coursework is associated with. Must match an existing topic in the course. */ topicId?: string | null; /** * Timestamp of the most recent change to this course work. Read-only. */ updateTime?: string | null; /** * Type of this course work. The type is set when the course work is created and cannot be changed. */ workType?: string | null; } /** * Information about a `Feed` with a `feed_type` of `COURSE_WORK_CHANGES`. */ export interface Schema$CourseWorkChangesInfo { /** * The `course_id` of the course to subscribe to work changes for. */ courseId?: string | null; } /** * Course work material created by a teacher for students of the course */ export interface Schema$CourseWorkMaterial { /** * Absolute link to this course work material in the Classroom web UI. This is only populated if `state` is `PUBLISHED`. Read-only. */ alternateLink?: string | null; /** * Assignee mode of the course work material. If unspecified, the default value is `ALL_STUDENTS`. */ assigneeMode?: string | null; /** * Identifier of the course. Read-only. */ courseId?: string | null; /** * Timestamp when this course work material was created. Read-only. */ creationTime?: string | null; /** * Identifier for the user that created the course work material. Read-only. */ creatorUserId?: string | null; /** * Optional description of this course work material. The text must be a valid UTF-8 string containing no more than 30,000 characters. */ description?: string | null; /** * Classroom-assigned identifier of this course work material, unique per course. Read-only. */ id?: string | null; /** * Identifiers of students with access to the course work material. This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students specified in this field can see the course work material. */ individualStudentsOptions?: Schema$IndividualStudentsOptions; /** * Additional materials. A course work material must have no more than 20 material items. */ materials?: Schema$Material[]; /** * Optional timestamp when this course work material is scheduled to be published. */ scheduledTime?: string | null; /** * Status of this course work material. If unspecified, the default state is `DRAFT`. */ state?: string | null; /** * Title of this course work material. The title must be a valid UTF-8 string containing between 1 and 3000 characters. */ title?: string | null; /** * Identifier for the topic that this course work material is associated with. Must match an existing topic in the course. */ topicId?: string | null; /** * Timestamp of the most recent change to this course work material. Read-only. */ updateTime?: string | null; } /** * Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values * A month and day value, with a zero year, such as an anniversary * A year on its own, with zero month and day values * A year and month value, with a zero day, such as a credit card expiration date Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`. */ export interface Schema$Date { /** * Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. */ day?: number | null; /** * Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. */ month?: number | null; /** * Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. */ year?: number | null; } /** * Representation of a Google Drive file. */ export interface Schema$DriveFile { /** * URL that can be used to access the Drive item. Read-only. */ alternateLink?: string | null; /** * Drive API resource ID. */ id?: string | null; /** * URL of a thumbnail image of the Drive item. Read-only. */ thumbnailUrl?: string | null; /** * Title of the Drive item. Read-only. */ title?: string | null; } /** * Representation of a Google Drive folder. */ export interface Schema$DriveFolder { /** * URL that can be used to access the Drive folder. Read-only. */ alternateLink?: string | null; /** * Drive API resource ID. */ id?: string | null; /** * Title of the Drive folder. Read-only. */ title?: string | null; } /** * A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \} The JSON representation for `Empty` is empty JSON object `{\}`. */ export interface Schema$Empty { } /** * A class of notifications that an application can register to receive. For example: "all roster changes for a domain". */ export interface Schema$Feed { /** * Information about a `Feed` with a `feed_type` of `COURSE_ROSTER_CHANGES`. This field must be specified if `feed_type` is `COURSE_ROSTER_CHANGES`. */ courseRosterChangesInfo?: Schema$CourseRosterChangesInfo; /** * Information about a `Feed` with a `feed_type` of `COURSE_WORK_CHANGES`. This field must be specified if `feed_type` is `COURSE_WORK_CHANGES`. */ courseWorkChangesInfo?: Schema$CourseWorkChangesInfo; /** * The type of feed. */ feedType?: string | null; } /** * Google Forms item. */ export interface Schema$Form { /** * URL of the form. */ formUrl?: string | null; /** * URL of the form responses document. Only set if respsonses have been recorded and only when the requesting user is an editor of the form. Read-only. */ responseUrl?: string | null; /** * URL of a thumbnail image of the Form. Read-only. */ thumbnailUrl?: string | null; /** * Title of the Form. Read-only. */ title?: string | null; } /** * Global user permission description. */ export interface Schema$GlobalPermission { /** * Permission value. */ permission?: string | null; } /** * The history of each grade on this submission. */ export interface Schema$GradeHistory { /** * The teacher who made the grade change. */ actorUserId?: string | null; /** * The type of grade change at this time in the submission grade history. */ gradeChangeType?: string | null; /** * When the grade of the submission was changed. */ gradeTimestamp?: string | null; /** * The denominator of the grade at this time in the submission grade history. */ maxPoints?: number | null; /** * The numerator of the grade at this time in the submission grade history. */ pointsEarned?: number | null; } /** * Association between a student and a guardian of that student. The guardian may receive information about the student's course work. */ export interface Schema$Guardian { /** * Identifier for the guardian. */ guardianId?: string | null; /** * User profile for the guardian. */ guardianProfile?: Schema$UserProfile; /** * The email address to which the initial guardian invitation was sent. This field is only visible to domain administrators. */ invitedEmailAddress?: string | null; /** * Identifier for the student to whom the guardian relationship applies. */ studentId?: string | null; } /** * An invitation to become the guardian of a specified user, sent to a specified email address. */ export interface Schema$GuardianInvitation { /** * The time that this invitation was created. Read-only. */ creationTime?: string | null; /** * Unique identifier for this invitation. Read-only. */ invitationId?: string | null; /** * Email address that the invitation was sent to. This field is only visible to domain administrators. */ invitedEmailAddress?: string | null; /** * The state that this invitation is in. */ state?: string | null; /** * ID of the student (in standard format) */ studentId?: string | null; } /** * Assignee details about a coursework/announcement. This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. */ export interface Schema$IndividualStudentsOptions { /** * Identifiers for the students that have access to the coursework/announcement. */ studentIds?: string[] | null; } /** * An invitation to join a course. */ export interface Schema$Invitation { /** * Identifier of the course to invite the user to. */ courseId?: string | null; /** * Identifier assigned by Classroom. Read-only. */ id?: string | null; /** * Role to invite the user to have. Must not be `COURSE_ROLE_UNSPECIFIED`. */ role?: string | null; /** * Identifier of the invited user. When specified as a parameter of a request, this identifier can be set to one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user */ userId?: string | null; } /** * URL item. */ export interface Schema$Link { /** * URL of a thumbnail image of the target URL. Read-only. */ thumbnailUrl?: string | null; /** * Title of the target of the URL. Read-only. */ title?: string | null; /** * URL to link to. This must be a valid UTF-8 string containing between 1 and 2024 characters. */ url?: string | null; } /** * Response when listing course work. */ export interface Schema$ListAnnouncementsResponse { /** * Announcement items that match the request. */ announcements?: Schema$Announcement[]; /** * Token identifying the next page of results to return. If empty, no further results are available. */ nextPageToken?: string | null; } /** * Response when listing course aliases. */ export interface Schema$ListCourseAliasesResponse { /** * The course aliases. */ aliases?: Schema$CourseAlias[]; /** * Token identifying the next page of results to return. If empty, no further results are available. */ nextPageToken?: string | null; } /** * Response when listing courses. */ export interface Schema$ListCoursesResponse { /** * Courses that match the list request. */ courses?: Schema$Course[]; /** * Token identifying the next page of results to return. If empty, no further results are available. */ nextPageToken?: string | null; } /** * Response when listing course work material. */ export interface Schema$ListCourseWorkMaterialResponse { /** * Course work material items that match the request. */ courseWorkMaterial?: Schema$CourseWorkMaterial[]; /** * Token identifying the next page of results to return. If empty, no further results are available. */ nextPageToken?: string | null; } /** * Response when listing course work. */ export interface Schema$ListCourseWorkResponse { /** * Course work items that match the request. */ courseWork?: Schema$CourseWork[]; /** * Token identifying the next page of results to return. If empty, no further results are available. */ nextPageToken?: string | null; } /** * Response when listing guardian invitations. */ export interface Schema$ListGuardianInvitationsResponse { /** * Guardian invitations that matched the list request. */ guardianInvitations?: Schema$GuardianInvitation[]; /** * Token identifying the next page of results to return. If empty, no further results are available. */ nextPageToken?: string | null; } /** * Response when listing guardians. */ export interface Schema$ListGuardiansResponse { /** * Guardians on this page of results that met the criteria specified in the request. */ guardians?: Schema$Guardian[]; /** * Token identifying the next page of results to return. If empty, no further results are available. */ nextPageToken?: string | null; } /** * Response when listing invitations. */ export interface Schema$ListInvitationsResponse { /** * Invitations that match the list request. */ invitations?: Schema$Invitation[]; /** * Token identifying the next page of results to return. If empty, no further results are available. */ nextPageToken?: string | null; } /** * Response when listing students. */ export interface Schema$ListStudentsResponse { /** * Token identifying the next page of results to return. If empty, no further results are available. */ nextPageToken?: string | null; /** * Students who match the list request. */ students?: Schema$Student[]; } /** * Response when listing student submissions. */ export interface Schema$ListStudentSubmissionsResponse { /** * Token identifying the next page of results to return. If empty, no further results are available. */ nextPageToken?: string | null; /** * Student work that matches the request. */ studentSubmissions?: Schema$StudentSubmission[]; } /** * Response when listing teachers. */ export interface Schema$ListTeachersResponse { /** * Token identifying the next page of results to return. If empty, no further results are available. */ nextPageToken?: string | null; /** * Teachers who match the list request. */ teachers?: Schema$Teacher[]; } /** * Response when listing topics. */ export interface Schema$ListTopicResponse { /** * Token identifying the next page of results to return. If empty, no further results are available. */ nextPageToken?: string | null; /** * Topic items that match the request. */ topic?: Schema$Topic[]; } /** * Material attached to course work. When creating attachments, setting the `form` field is not supported. */ export interface Schema$Material { /** * Google Drive file material. */ driveFile?: Schema$SharedDriveFile; /** * Google Forms material. */ form?: Schema$Form; /** * Link material. On creation, this is upgraded to a more appropriate type if possible, and this is reflected in the response. */ link?: Schema$Link; /** * YouTube video material. */ youtubeVideo?: Schema$YouTubeVideo; } /** * Request to modify assignee mode and options of an announcement. */ export interface Schema$ModifyAnnouncementAssigneesRequest { /** * Mode of the announcement describing whether it is accessible by all students or specified individual students. */ assigneeMode?: string | null; /** * Set which students can view or cannot view the announcement. Must be specified only when `assigneeMode` is `INDIVIDUAL_STUDENTS`. */ modifyIndividualStudentsOptions?: Schema$ModifyIndividualStudentsOptions; } /** * Request to modify the attachments of a student submission. */ export interface Schema$ModifyAttachmentsRequest { /** * Attachments to add. A student submission may not have more than 20 attachments. Form attachments are not supported. */ addAttachments?: Schema$Attachment[]; } /** * Request to modify assignee mode and options of a coursework. */ export interface Schema$ModifyCourseWorkAssigneesRequest { /** * Mode of the coursework describing whether it will be assigned to all students or specified individual students. */ assigneeMode?: string | null; /** * Set which students are assigned or not assigned to the coursework. Must be specified only when `assigneeMode` is `INDIVIDUAL_STUDENTS`. */ modifyIndividualStudentsOptions?: Schema$ModifyIndividualStudentsOptions; } /** * Contains fields to add or remove students from a course work or announcement where the `assigneeMode` is set to `INDIVIDUAL_STUDENTS`. */ export interface Schema$ModifyIndividualStudentsOptions { /** * IDs of students to be added as having access to this coursework/announcement. */ addStudentIds?: string[] | null; /** * IDs of students to be removed from having access to this coursework/announcement. */ removeStudentIds?: string[] | null; } /** * Additional details for multiple-choice questions. */ export interface Schema$MultipleChoiceQuestion { /** * Possible choices. */ choices?: string[] | null; } /** * Student work for a multiple-choice question. */ export interface Schema$MultipleChoiceSubmission { /** * Student's select choice. */ answer?: string | null; } /** * Details of the user's name. */ export interface Schema$Name { /** * The user's last name. Read-only. */ familyName?: string | null; /** * The user's full name formed by concatenating the first and last name values. Read-only. */ fullName?: string | null; /** * The user's first name. Read-only. */ givenName?: string | null; } /** * Request to reclaim a student submission. */ export interface Schema$ReclaimStudentSubmissionRequest { } /** * An instruction to Classroom to send notifications from the `feed` to the provided destination. */ export interface Schema$Registration { /** * The Cloud Pub/Sub topic that notifications are to be sent to. */ cloudPubsubTopic?: Schema$CloudPubsubTopic; /** * The time until which the `Registration` is effective. This is a read-only field assigned by the server. */ expiryTime?: string | null; /** * Specification for the class of notifications that Classroom should deliver to the destination. */ feed?: Schema$Feed; /** * A server-generated unique identifier for this `Registration`. Read-only. */ registrationId?: string | null; } /** * Request to return a student submission. */ export interface Schema$ReturnStudentSubmissionRequest { } /** * Drive file that is used as material for course work. */ export interface Schema$SharedDriveFile { /** * Drive file details. */ driveFile?: Schema$DriveFile; /** * Mechanism by which students access the Drive item. */ shareMode?: string | null; } /** * Student work for a short answer question. */ export interface Schema$ShortAnswerSubmission { /** * Student response to a short-answer question. */ answer?: string | null; } /** * The history of each state this submission has been in. */ export interface Schema$StateHistory { /** * The teacher or student who made the change. */ actorUserId?: string | null; /** * The workflow pipeline stage. */ state?: string | null; /** * When the submission entered this state. */ stateTimestamp?: string | null; } /** * Student in a course. */ export interface Schema$Student { /** * Identifier of the course. Read-only. */ courseId?: string | null; /** * Global user information for the student. Read-only. */ profile?: Schema$UserProfile; /** * Information about a Drive Folder for this student's work in this course. Only visible to the student and domain administrators. Read-only. */ studentWorkFolder?: Schema$DriveFolder; /** * Identifier of the user. When specified as a parameter of a request, this 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 */ userId?: string | null; } /** * Student submission for course work. StudentSubmission items are generated when a CourseWork item is created. StudentSubmissions that have never been accessed (i.e. with `state` = NEW) may not have a creation time or update time. */ export interface Schema$StudentSubmission { /** * Absolute link to the submission in the Classroom web UI. Read-only. */ alternateLink?: string | null; /** * Optional grade. If unset, no grade was set. This value must be non-negative. Decimal (that is, non-integer) values are allowed, but are rounded to two decimal places. This may be modified only by course teachers. */ assignedGrade?: number | null; /** * Submission content when course_work_type is ASSIGNMENT. Students can modify this content using ModifyAttachments. */ assignmentSubmission?: Schema$AssignmentSubmission; /** * Whether this student submission is associated with the Developer Console project making the request. See CreateCourseWork for more details. Read-only. */ associatedWithDeveloper?: boolean | null; /** * Identifier of the course. Read-only. */ courseId?: string | null; /** * Identifier for the course work this corresponds to. Read-only. */ courseWorkId?: string | null; /** * Type of course work this submission is for. Read-only. */ courseWorkType?: string | null; /** * Creation time of this submission. This may be unset if the student has not accessed this item. Read-only. */ creationTime?: string | null; /** * Optional pending grade. If unset, no grade was set. This value must be non-negative. Decimal (that is, non-integer) values are allowed, but are rounded to two decimal places. This is only visible to and modifiable by course teachers. */ draftGrade?: number | null; /** * Classroom-assigned Identifier for the student submission. This is unique among submissions for the relevant course work. Read-only. */ id?: string | null; /** * Whether this submission is late. Read-only. */ late?: boolean | null; /** * Submission content when course_work_type is MULTIPLE_CHOICE_QUESTION. */ multipleChoiceSubmission?: Schema$MultipleChoiceSubmission; /** * Submission content when course_work_type is SHORT_ANSWER_QUESTION. */ shortAnswerSubmission?: Schema$ShortAnswerSubmission; /** * State of this submission. Read-only. */ state?: string | null; /** * The history of the submission (includes state and grade histories). Read-only. */ submissionHistory?: Schema$SubmissionHistory[]; /** * Last update time of this submission. This may be unset if the student has not accessed this item. Read-only. */ updateTime?: string | null; /** * Identifier for the student that owns this submission. Read-only. */ userId?: string | null; } /** * The history of the submission. This currently includes state and grade histories. */ export interface Schema$SubmissionHistory { /** * The grade history information of the submission, if present. */ gradeHistory?: Schema$GradeHistory; /** * The state history information of the submission, if present. */ stateHistory?: Schema$StateHistory; } /** * Teacher of a course. */ export interface Schema$Teacher { /** * Identifier of the course. Read-only. */ courseId?: string | null; /** * Global user information for the teacher. Read-only. */ profile?: Schema$UserProfile; /** * Identifier of the user. When specified as a parameter of a request, this 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 */ userId?: string | null; } /** * Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`. */ export interface Schema$TimeOfDay { /** * Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time. */ hours?: number | null; /** * Minutes of hour of day. Must be from 0 to 59. */ minutes?: number | null; /** * Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. */ nanos?: number | null; /** * Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds. */ seconds?: number | null; } /** * Topic created by a teacher for the course */ export interface Schema$Topic { /** * Identifier of the course. Read-only. */ courseId?: string | null; /** * The name of the topic, generated by the user. Leading and trailing whitespaces, if any, are trimmed. Also, multiple consecutive whitespaces are collapsed into one inside the name. The result must be a non-empty string. Topic names are case sensitive, and must be no longer than 100 characters. */ name?: string | null; /** * Unique identifier for the topic. Read-only. */ topicId?: string | null; /** * The time the topic was last updated by the system. Read-only. */ updateTime?: string | null; } /** * Request to turn in a student submission. */ export interface Schema$TurnInStudentSubmissionRequest { } /** * Global information for a user. */ export interface Schema$UserProfile { /** * Email address of the user. Read-only. */ emailAddress?: string | null; /** * Identifier of the user. Read-only. */ id?: string | null; /** * Name of the user. Read-only. */ name?: Schema$Name; /** * Global permissions of the user. Read-only. */ permissions?: Schema$GlobalPermission[]; /** * URL of user's profile photo. Read-only. */ photoUrl?: string | null; /** * Represents whether a G Suite for Education user's domain administrator has explicitly verified them as being a teacher. If the user is not a member of a G Suite for Education domain, than this field is always false. Read-only */ verifiedTeacher?: boolean | null; } /** * YouTube video item. */ export interface Schema$YouTubeVideo { /** * URL that can be used to view the YouTube video. Read-only. */ alternateLink?: string | null; /** * YouTube API resource ID. */ id?: string | null; /** * URL of a thumbnail image of the YouTube video. Read-only. */ thumbnailUrl?: string | null; /** * Title of the YouTube video. Read-only. */ title?: string | null; } export class Resource$Courses { context: APIRequestContext; aliases: Resource$Courses$Aliases; announcements: Resource$Courses$Announcements; courseWork: Resource$Courses$Coursework; courseWorkMaterials: Resource$Courses$Courseworkmaterials; students: Resource$Courses$Students; teachers: Resource$Courses$Teachers; topics: Resource$Courses$Topics; constructor(context: APIRequestContext); /** * Creates a course. The user specified in `ownerId` is the owner of the created course and added as a teacher. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create courses or for access errors. * `NOT_FOUND` if the primary teacher is not a valid user. * `FAILED_PRECONDITION` if the course owner's account is disabled or for the following request errors: * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if an alias was specified in the `id` and already exists. * @example * ```js * // Before running the sample: * // - Enable the API at: * // https://console.developers.google.com/apis/api/classroom.googleapis.com * // - Login into gcloud by running: * // `$ gcloud auth application-default login` * // - Install the npm module by running: * // `$ npm install googleapis` * * const {google} = require('googleapis'); * const classroom = google.classroom('v1'); * * async function main() { * const auth = new google.auth.GoogleAuth({ * // Scopes can be specified either as an array or as a single, space-delimited string. * scopes: ['https://www.googleapis.com/auth/classroom.courses'], * }); * * // Acquire an auth client, and bind it to all future calls * const authClient = await auth.getClient(); * google.options({auth: authClient}); * * // Do the magic * const res = await classroom.courses.create({ * // Requ