Skip to content

Commit

Permalink
[auto-generated] Update structure file for main
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 16, 2024
1 parent b8c3070 commit 728daba
Showing 1 changed file with 0 additions and 344 deletions.
344 changes: 0 additions & 344 deletions structure/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8906,240 +8906,6 @@ export type AddonModBookViewBookWSResponse = {
warnings?: CoreWSExternalWarning[];
};

/**
* Params of mod_chat_get_chat_latest_messages WS.
*
* WS Description: Get the latest messages from the given chat session.
*/
type AddonModChatGetChatLatestMessagesWSParams = {
chatsid: string; // Chat session id (obtained via mod_chat_login_user).
chatlasttime?: number; // Last time messages were retrieved (epoch time).
};

/**
* Data returned by mod_chat_get_chat_latest_messages WS.
*
* WS Description: Get the latest messages from the given chat session.
*/
export type AddonModChatGetChatLatestMessagesWSResponse = {
messages: { // List of users.
id: number; // Message id.
userid: number; // User id.
system: boolean; // True if is a system message (like user joined).
message: string; // Message text.
timestamp: number; // Timestamp for the message.
}[];
chatnewlasttime: number; // New last time.
warnings?: CoreWSExternalWarning[];
};

/**
* Params of mod_chat_get_chats_by_courses WS.
*
* WS Description: Returns a list of chat instances in a provided set of courses,
if no courses are provided then all the chat instances the user has access to will be returned.
*/
type AddonModChatGetChatsByCoursesWSParams = {
courseids?: number[]; // Array of course ids.
};

/**
* Data returned by mod_chat_get_chats_by_courses WS.
*
* WS Description: Returns a list of chat instances in a provided set of courses,
if no courses are provided then all the chat instances the user has access to will be returned.
*/
export type AddonModChatGetChatsByCoursesWSResponse = {
chats: {
id: number; // Activity instance id.
coursemodule: number; // Course module id.
course: number; // Course id.
name: string; // Activity name.
intro: string; // Activity introduction.
introformat: number; // Intro format (1 = HTML, 0 = MOODLE, 2 = PLAIN, or 4 = MARKDOWN).
introfiles?: CoreWSExternalFile[];
section?: number; // Course section id.
visible?: boolean; // Visible.
groupmode?: number; // Group mode.
groupingid?: number; // Group id.
lang?: string; // Forced activity language.
chatmethod?: string; // Chat method (sockets, ajax, header_js).
keepdays?: number; // Keep days.
studentlogs?: number; // Student logs visible to everyone.
chattime?: number; // Chat time.
schedule?: number; // Schedule type.
timemodified?: number; // Time of last modification.
}[];
warnings?: CoreWSExternalWarning[];
};

/**
* Params of mod_chat_get_chat_users WS.
*
* WS Description: Get the list of users in the given chat session.
*/
type AddonModChatGetChatUsersWSParams = {
chatsid: string; // Chat session id (obtained via mod_chat_login_user).
};

/**
* Data returned by mod_chat_get_chat_users WS.
*
* WS Description: Get the list of users in the given chat session.
*/
export type AddonModChatGetChatUsersWSResponse = {
users: { // List of users.
id: number; // User id.
fullname: string; // User full name.
profileimageurl: string; // User picture URL.
}[];
warnings?: CoreWSExternalWarning[];
};

/**
* Params of mod_chat_get_session_messages WS.
*
* WS Description: Retrieves messages of the given chat session.
*/
type AddonModChatGetSessionMessagesWSParams = {
chatid: number; // Chat instance id.
sessionstart: number; // The session start time (timestamp).
sessionend: number; // The session end time (timestamp).
groupid?: number; // Get messages from users in this group.
// 0 means that the function will determine the user group.

};

/**
* Data returned by mod_chat_get_session_messages WS.
*
* WS Description: Retrieves messages of the given chat session.
*/
export type AddonModChatGetSessionMessagesWSResponse = {
messages: {
id: number; // The message record id.
chatid: number; // The chat id.
userid: number; // The user who wrote the message.
groupid: number; // The group this message belongs to.
issystem: boolean; // Whether is a system message or not.
message: string; // The message text.
timestamp: number; // The message timestamp (indicates when the message was sent).
}[];
warnings?: CoreWSExternalWarning[];
};

/**
* Params of mod_chat_get_sessions WS.
*
* WS Description: Retrieves chat sessions for a given chat.
*/
type AddonModChatGetSessionsWSParams = {
chatid: number; // Chat instance id.
groupid?: number; // Get messages from users in this group.
// 0 means that the function will determine the user group.

showall?: boolean; // Whether to show completed sessions or not.
};

/**
* Data returned by mod_chat_get_sessions WS.
*
* WS Description: Retrieves chat sessions for a given chat.
*/
export type AddonModChatGetSessionsWSResponse = {
sessions: { // List of users.
sessionstart: number; // Session start time.
sessionend: number; // Session end time.
sessionusers: { // Session users.
userid: number; // User id.
messagecount: number; // Number of messages in the session.
}[];
iscomplete: boolean; // Whether the session is completed or not.
}[];
warnings?: CoreWSExternalWarning[];
};

/**
* Params of mod_chat_login_user WS.
*
* WS Description: Log a user into a chat room in the given chat.
*/
type AddonModChatLoginUserWSParams = {
chatid: number; // Chat instance id.
groupid?: number; // Group id, 0 means that the function will determine the user group.
};

/**
* Data returned by mod_chat_login_user WS.
*
* WS Description: Log a user into a chat room in the given chat.
*/
export type AddonModChatLoginUserWSResponse = {
chatsid: string; // Unique chat session id.
warnings?: CoreWSExternalWarning[];
};

/**
* Params of mod_chat_send_chat_message WS.
*
* WS Description: Send a message on the given chat session.
*/
type AddonModChatSendChatMessageWSParams = {
chatsid: string; // Chat session id (obtained via mod_chat_login_user).
messagetext: string; // The message text.
beepid?: string; // The beep id.
};

/**
* Data returned by mod_chat_send_chat_message WS.
*
* WS Description: Send a message on the given chat session.
*/
export type AddonModChatSendChatMessageWSResponse = {
messageid: number; // Message sent id.
warnings?: CoreWSExternalWarning[];
};

/**
* Params of mod_chat_view_chat WS.
*
* WS Description: Trigger the course module viewed event and update the module completion status.
*/
type AddonModChatViewChatWSParams = {
chatid: number; // Chat instance id.
};

/**
* Data returned by mod_chat_view_chat WS.
*
* WS Description: Trigger the course module viewed event and update the module completion status.
*/
export type AddonModChatViewChatWSResponse = {
status: boolean; // Status: true if success.
warnings?: CoreWSExternalWarning[];
};

/**
* Params of mod_chat_view_sessions WS.
*
* WS Description: Trigger the chat session viewed event.
*/
type AddonModChatViewSessionsWSParams = {
cmid: number; // Course module id.
start?: number; // Session start time.
end?: number; // Session end time.
};

/**
* Data returned by mod_chat_view_sessions WS.
*
* WS Description: Trigger the chat session viewed event.
*/
export type AddonModChatViewSessionsWSResponse = {
status: boolean; // Status: true if success.
warnings?: CoreWSExternalWarning[];
};

/**
* Params of mod_choice_delete_choice_responses WS.
*
Expand Down Expand Up @@ -14940,116 +14706,6 @@ export type AddonModScormViewScormWSResponse = {
warnings?: CoreWSExternalWarning[];
};

/**
* Params of mod_survey_get_questions WS.
*
* WS Description: Get the complete list of questions for the survey, including subquestions.
*/
type AddonModSurveyGetQuestionsWSParams = {
surveyid: number; // Survey instance id.
};

/**
* Data returned by mod_survey_get_questions WS.
*
* WS Description: Get the complete list of questions for the survey, including subquestions.
*/
export type AddonModSurveyGetQuestionsWSResponse = {
questions: {
id: number; // Question id.
text: string; // Question text.
shorttext: string; // Question short text.
multi: string; // Subquestions ids.
intro: string; // The question intro.
type: number; // Question type.
options: string; // Question options.
parent: number; // Parent question (for subquestions).
}[];
warnings?: CoreWSExternalWarning[];
};

/**
* Params of mod_survey_get_surveys_by_courses WS.
*
* WS Description: Returns a list of survey instances in a provided set of courses,
if no courses are provided then all the survey instances the user has access to will be returned.
*/
type AddonModSurveyGetSurveysByCoursesWSParams = {
courseids?: number[]; // Array of course ids.
};

/**
* Data returned by mod_survey_get_surveys_by_courses WS.
*
* WS Description: Returns a list of survey instances in a provided set of courses,
if no courses are provided then all the survey instances the user has access to will be returned.
*/
export type AddonModSurveyGetSurveysByCoursesWSResponse = {
surveys: {
id: number; // Activity instance id.
coursemodule: number; // Course module id.
course: number; // Course id.
name: string; // Activity name.
intro?: string; // Activity introduction.
introformat?: number; // Intro format (1 = HTML, 0 = MOODLE, 2 = PLAIN, or 4 = MARKDOWN).
introfiles?: CoreWSExternalFile[];
section?: number; // Course section id.
visible?: boolean; // Visible.
groupmode?: number; // Group mode.
groupingid?: number; // Group id.
lang?: string; // Forced activity language.
template?: number; // Survey type.
days?: number; // Days.
questions?: string; // Question ids.
surveydone?: number; // Did I finish the survey?.
timecreated?: number; // Time of creation.
timemodified?: number; // Time of last modification.
}[];
warnings?: CoreWSExternalWarning[];
};

/**
* Params of mod_survey_submit_answers WS.
*
* WS Description: Submit the answers for a given survey.
*/
type AddonModSurveySubmitAnswersWSParams = {
surveyid: number; // Survey id.
answers: {
key: string; // Answer key.
value: string; // Answer value.
}[];
};

/**
* Data returned by mod_survey_submit_answers WS.
*
* WS Description: Submit the answers for a given survey.
*/
export type AddonModSurveySubmitAnswersWSResponse = {
status: boolean; // Status: true if success.
warnings?: CoreWSExternalWarning[];
};

/**
* Params of mod_survey_view_survey WS.
*
* WS Description: Trigger the course module viewed event and update the module completion status.
*/
type AddonModSurveyViewSurveyWSParams = {
surveyid: number; // Survey instance id.
};

/**
* Data returned by mod_survey_view_survey WS.
*
* WS Description: Trigger the course module viewed event and update the module completion status.
*/
export type AddonModSurveyViewSurveyWSResponse = {
status: boolean; // Status: true if success.
warnings?: CoreWSExternalWarning[];
};

/**
* Params of mod_url_get_urls_by_courses WS.
*
Expand Down

0 comments on commit 728daba

Please sign in to comment.