MOBILE-3109 addon: Add 'since' tags in WS return types
parent
f80dd0c241
commit
346c8a42ff
|
@ -86,7 +86,7 @@ export class AddonBadgesProvider {
|
||||||
updateFrequency: CoreSite.FREQUENCY_RARELY
|
updateFrequency: CoreSite.FREQUENCY_RARELY
|
||||||
};
|
};
|
||||||
|
|
||||||
return site.read('core_badges_get_user_badges', data, preSets).then((response: AddonBadgesGetUserBadgesResult) => {
|
return site.read('core_badges_get_user_badges', data, preSets).then((response: AddonBadgesGetUserBadgesResult): any => {
|
||||||
if (response && response.badges) {
|
if (response && response.badges) {
|
||||||
// In 3.7, competencies was renamed to alignment. Rename the property in 3.6 too.
|
// In 3.7, competencies was renamed to alignment. Rename the property in 3.6 too.
|
||||||
response.badges.forEach((badge) => {
|
response.badges.forEach((badge) => {
|
||||||
|
|
|
@ -1906,7 +1906,7 @@ export type AddonCalendarEventBase = {
|
||||||
name: string; // Name.
|
name: string; // Name.
|
||||||
description?: string; // Description.
|
description?: string; // Description.
|
||||||
descriptionformat: number; // Description format (1 = HTML, 0 = MOODLE, 2 = PLAIN or 4 = MARKDOWN).
|
descriptionformat: number; // Description format (1 = HTML, 0 = MOODLE, 2 = PLAIN or 4 = MARKDOWN).
|
||||||
location?: string; // Location.
|
location?: string; // @since 3.6. Location.
|
||||||
categoryid?: number; // Categoryid.
|
categoryid?: number; // Categoryid.
|
||||||
groupid?: number; // Groupid.
|
groupid?: number; // Groupid.
|
||||||
userid?: number; // Userid.
|
userid?: number; // Userid.
|
||||||
|
@ -1947,17 +1947,17 @@ export type AddonCalendarEventBase = {
|
||||||
summaryformat: number; // Summary format (1 = HTML, 0 = MOODLE, 2 = PLAIN or 4 = MARKDOWN).
|
summaryformat: number; // Summary format (1 = HTML, 0 = MOODLE, 2 = PLAIN or 4 = MARKDOWN).
|
||||||
startdate: number; // Startdate.
|
startdate: number; // Startdate.
|
||||||
enddate: number; // Enddate.
|
enddate: number; // Enddate.
|
||||||
visible: boolean; // Visible.
|
visible: boolean; // @since 3.8. Visible.
|
||||||
fullnamedisplay: string; // Fullnamedisplay.
|
fullnamedisplay: string; // Fullnamedisplay.
|
||||||
viewurl: string; // Viewurl.
|
viewurl: string; // Viewurl.
|
||||||
courseimage: string; // Courseimage.
|
courseimage: string; // @since 3.6. Courseimage.
|
||||||
progress?: number; // Progress.
|
progress?: number; // @since 3.6. Progress.
|
||||||
hasprogress: boolean; // Hasprogress.
|
hasprogress: boolean; // @since 3.6. Hasprogress.
|
||||||
isfavourite: boolean; // Isfavourite.
|
isfavourite: boolean; // @since 3.6. Isfavourite.
|
||||||
hidden: boolean; // Hidden.
|
hidden: boolean; // @since 3.6. Hidden.
|
||||||
timeaccess?: number; // Timeaccess.
|
timeaccess?: number; // @since 3.6. Timeaccess.
|
||||||
showshortname: boolean; // Showshortname.
|
showshortname: boolean; // @since 3.6. Showshortname.
|
||||||
coursecategory: string; // Coursecategory.
|
coursecategory: string; // @since 3.7. Coursecategory.
|
||||||
};
|
};
|
||||||
subscription?: {
|
subscription?: {
|
||||||
displayeventsource: boolean; // Displayeventsource.
|
displayeventsource: boolean; // Displayeventsource.
|
||||||
|
@ -1974,8 +1974,8 @@ export type AddonCalendarEventBase = {
|
||||||
iscourseevent: boolean; // Iscourseevent.
|
iscourseevent: boolean; // Iscourseevent.
|
||||||
iscategoryevent: boolean; // Iscategoryevent.
|
iscategoryevent: boolean; // Iscategoryevent.
|
||||||
groupname?: string; // Groupname.
|
groupname?: string; // Groupname.
|
||||||
normalisedeventtype: string; // Normalisedeventtype.
|
normalisedeventtype: string; // @since 3.7. Normalisedeventtype.
|
||||||
normalisedeventtypetext: string; // Normalisedeventtypetext.
|
normalisedeventtypetext: string; // @since 3.7. Normalisedeventtypetext.
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2047,7 +2047,7 @@ export type AddonCalendarMonth = {
|
||||||
date: CoreWSDate;
|
date: CoreWSDate;
|
||||||
periodname: string; // Periodname.
|
periodname: string; // Periodname.
|
||||||
includenavigation: boolean; // Includenavigation.
|
includenavigation: boolean; // Includenavigation.
|
||||||
initialeventsloaded: boolean; // Initialeventsloaded.
|
initialeventsloaded: boolean; // @since 3.5. Initialeventsloaded.
|
||||||
previousperiod: CoreWSDate;
|
previousperiod: CoreWSDate;
|
||||||
previousperiodlink: string; // Previousperiodlink.
|
previousperiodlink: string; // Previousperiodlink.
|
||||||
previousperiodname: string; // Previousperiodname.
|
previousperiodname: string; // Previousperiodname.
|
||||||
|
@ -2121,7 +2121,7 @@ export type AddonCalendarUpcoming = {
|
||||||
courseid: number; // Courseid.
|
courseid: number; // Courseid.
|
||||||
categoryid?: number; // Categoryid.
|
categoryid?: number; // Categoryid.
|
||||||
isloggedin: boolean; // Isloggedin.
|
isloggedin: boolean; // Isloggedin.
|
||||||
date: CoreWSDate; // Date.
|
date: CoreWSDate; // @since 3.8. Date.
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -717,7 +717,7 @@ export type AddonCompetencyPath = {
|
||||||
framework: AddonCompetencyPathNode;
|
framework: AddonCompetencyPathNode;
|
||||||
pluginbaseurl: string; // Pluginbaseurl.
|
pluginbaseurl: string; // Pluginbaseurl.
|
||||||
pagecontextid: number; // Pagecontextid.
|
pagecontextid: number; // Pagecontextid.
|
||||||
showlinks: boolean; // Showlinks.
|
showlinks: boolean; // @since 3.7. Showlinks.
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -816,7 +816,7 @@ export type AddonCompetencySummary = {
|
||||||
scaleconfiguration: string; // Scaleconfiguration.
|
scaleconfiguration: string; // Scaleconfiguration.
|
||||||
taxonomyterm: string; // Taxonomyterm.
|
taxonomyterm: string; // Taxonomyterm.
|
||||||
comppath: AddonCompetencyPath;
|
comppath: AddonCompetencyPath;
|
||||||
pluginbaseurl: string; // Pluginbaseurl.
|
pluginbaseurl: string; // @since 3.7. Pluginbaseurl.
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -891,8 +891,8 @@ export type AddonCompetencyUserCompetencySummaryInCourse = {
|
||||||
usercompetencysummary: AddonCompetencyUserCompetencySummary;
|
usercompetencysummary: AddonCompetencyUserCompetencySummary;
|
||||||
course: CoreCourseSummary;
|
course: CoreCourseSummary;
|
||||||
coursemodules: CoreCourseModuleSummary[]; // Coursemodules.
|
coursemodules: CoreCourseModuleSummary[]; // Coursemodules.
|
||||||
plans: AddonCompetencyPlan[]; // Plans.
|
plans: AddonCompetencyPlan[]; // @since 3.7. Plans.
|
||||||
pluginbaseurl: string; // Pluginbaseurl.
|
pluginbaseurl: string; // @since 3.7. Pluginbaseurl.
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -986,7 +986,7 @@ export type AddonCompetencyDataForCourseCompetenciesPageResult = {
|
||||||
statistics: AddonCompetencyCourseCompetencyStatistics;
|
statistics: AddonCompetencyCourseCompetencyStatistics;
|
||||||
competencies: AddonCompetencyDataForCourseCompetenciesPageCompetency[];
|
competencies: AddonCompetencyDataForCourseCompetenciesPageCompetency[];
|
||||||
manageurl: string; // Url to the manage competencies page.
|
manageurl: string; // Url to the manage competencies page.
|
||||||
pluginbaseurl: string; // Url to the course competencies page.
|
pluginbaseurl: string; // @since 3.6. Url to the course competencies page.
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1003,5 +1003,5 @@ export type AddonCompetencyDataForCourseCompetenciesPageCompetency = {
|
||||||
selected: boolean; // If this is the currently selected option.
|
selected: boolean; // If this is the currently selected option.
|
||||||
}[];
|
}[];
|
||||||
comppath: AddonCompetencyPath;
|
comppath: AddonCompetencyPath;
|
||||||
plans: AddonCompetencyPlan[];
|
plans: AddonCompetencyPlan[]; // @since 3.7.
|
||||||
};
|
};
|
||||||
|
|
|
@ -2797,7 +2797,7 @@ export type AddonMessagesConversation = {
|
||||||
imageurl: string; // A link to the conversation picture, if set.
|
imageurl: string; // A link to the conversation picture, if set.
|
||||||
type: number; // The type of the conversation (1=individual,2=group,3=self).
|
type: number; // The type of the conversation (1=individual,2=group,3=self).
|
||||||
membercount: number; // Total number of conversation members.
|
membercount: number; // Total number of conversation members.
|
||||||
ismuted: boolean; // If the user muted this conversation.
|
ismuted: boolean; // @since 3.7. If the user muted this conversation.
|
||||||
isfavourite: boolean; // If the user marked this conversation as a favourite.
|
isfavourite: boolean; // If the user marked this conversation as a favourite.
|
||||||
isread: boolean; // If the user has read all messages in the conversation.
|
isread: boolean; // If the user has read all messages in the conversation.
|
||||||
unreadcount: number; // The number of unread messages in this conversation.
|
unreadcount: number; // The number of unread messages in this conversation.
|
||||||
|
@ -2835,7 +2835,7 @@ export type AddonMessagesConversationMember = {
|
||||||
isblocked: boolean; // If the user has been blocked.
|
isblocked: boolean; // If the user has been blocked.
|
||||||
iscontact: boolean; // Is the user a contact?.
|
iscontact: boolean; // Is the user a contact?.
|
||||||
isdeleted: boolean; // Is the user deleted?.
|
isdeleted: boolean; // Is the user deleted?.
|
||||||
canmessageevenifblocked: boolean; // If the user can still message even if they get blocked.
|
canmessageevenifblocked: boolean; // @since 3.8. If the user can still message even if they get blocked.
|
||||||
canmessage: boolean; // If the user can be messaged.
|
canmessage: boolean; // If the user can be messaged.
|
||||||
requirescontact: boolean; // If the user requires to be contacts.
|
requirescontact: boolean; // If the user requires to be contacts.
|
||||||
contactrequests?: { // The contact requests.
|
contactrequests?: { // The contact requests.
|
||||||
|
@ -2897,7 +2897,7 @@ export type AddonMessagesMessagePreferencesNotificationProcessor = {
|
||||||
displayname: string; // Display name.
|
displayname: string; // Display name.
|
||||||
name: string; // Processor name.
|
name: string; // Processor name.
|
||||||
locked: boolean; // Is locked by admin?.
|
locked: boolean; // Is locked by admin?.
|
||||||
lockedmessage?: string; // Text to display if locked.
|
lockedmessage?: string; // @since 3.6. Text to display if locked.
|
||||||
userconfigured: number; // Is configured?.
|
userconfigured: number; // Is configured?.
|
||||||
loggedin: {
|
loggedin: {
|
||||||
name: string; // Name.
|
name: string; // Name.
|
||||||
|
@ -2938,14 +2938,14 @@ export type AddonMessagesMessageAreaContact = {
|
||||||
ismessaging: boolean; // If we are messaging the user.
|
ismessaging: boolean; // If we are messaging the user.
|
||||||
sentfromcurrentuser: boolean; // Was the last message sent from the current user?.
|
sentfromcurrentuser: boolean; // Was the last message sent from the current user?.
|
||||||
lastmessage: string; // The user's last message.
|
lastmessage: string; // The user's last message.
|
||||||
lastmessagedate: number; // Timestamp for last message.
|
lastmessagedate: number; // @since 3.6. Timestamp for last message.
|
||||||
messageid: number; // The unique search message id.
|
messageid: number; // The unique search message id.
|
||||||
showonlinestatus: boolean; // Show the user's online status?.
|
showonlinestatus: boolean; // Show the user's online status?.
|
||||||
isonline: boolean; // The user's online status.
|
isonline: boolean; // The user's online status.
|
||||||
isread: boolean; // If the user has read the message.
|
isread: boolean; // If the user has read the message.
|
||||||
isblocked: boolean; // If the user has been blocked.
|
isblocked: boolean; // If the user has been blocked.
|
||||||
unreadcount: number; // The number of unread messages in this conversation.
|
unreadcount: number; // The number of unread messages in this conversation.
|
||||||
conversationid: number; // The id of the conversation.
|
conversationid: number; // @since 3.6. The id of the conversation.
|
||||||
} & AddonMessagesMessageAreaContactCalculatedData;
|
} & AddonMessagesMessageAreaContactCalculatedData;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3019,7 +3019,7 @@ export type AddonMessagesGetConversationCountsResult = {
|
||||||
types: {
|
types: {
|
||||||
1: number; // Total number of individual conversations.
|
1: number; // Total number of individual conversations.
|
||||||
2: number; // Total number of group conversations.
|
2: number; // Total number of group conversations.
|
||||||
3: number; // Total number of self conversations.
|
3: number; // @since 3.7. Total number of self conversations.
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3031,7 +3031,7 @@ export type AddonMessagesGetUnreadConversationCountsResult = {
|
||||||
types: {
|
types: {
|
||||||
1: number; // Total number of unread individual conversations.
|
1: number; // Total number of unread individual conversations.
|
||||||
2: number; // Total number of unread group conversations.
|
2: number; // Total number of unread group conversations.
|
||||||
3: number; // Total number of unread self conversations.
|
3: number; // @since 3.7. Total number of unread self conversations.
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3041,7 +3041,7 @@ export type AddonMessagesGetUnreadConversationCountsResult = {
|
||||||
export type AddonMessagesGetUserMessagePreferencesResult = {
|
export type AddonMessagesGetUserMessagePreferencesResult = {
|
||||||
preferences: AddonMessagesMessagePreferences;
|
preferences: AddonMessagesMessagePreferences;
|
||||||
blocknoncontacts: number; // Privacy messaging setting to define who can message you.
|
blocknoncontacts: number; // Privacy messaging setting to define who can message you.
|
||||||
entertosend: boolean; // User preference for using enter to send messages.
|
entertosend: boolean; // @since 3.6. User preference for using enter to send messages.
|
||||||
warnings?: CoreWSExternalWarning[];
|
warnings?: CoreWSExternalWarning[];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3073,9 +3073,9 @@ export type AddonMessagesGetMessagesMessage = {
|
||||||
timeread: number; // Time read.
|
timeread: number; // Time read.
|
||||||
usertofullname: string; // User to full name.
|
usertofullname: string; // User to full name.
|
||||||
userfromfullname: string; // User from full name.
|
userfromfullname: string; // User from full name.
|
||||||
component?: string; // The component that generated the notification.
|
component?: string; // @since 3.7. The component that generated the notification.
|
||||||
eventtype?: string; // The type of notification.
|
eventtype?: string; // @since 3.7. The type of notification.
|
||||||
customdata?: string; // Custom data to be passed to the message processor.
|
customdata?: string; // @since 3.7. Custom data to be passed to the message processor.
|
||||||
} & AddonMessagesGetMessagesMessageCalculatedData;
|
} & AddonMessagesGetMessagesMessageCalculatedData;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3108,11 +3108,11 @@ export type AddonMessagesSendInstantMessagesMessage = {
|
||||||
msgid: number; // Test this to know if it succeeds: id of the created message if it succeeded, -1 when failed.
|
msgid: number; // Test this to know if it succeeds: id of the created message if it succeeded, -1 when failed.
|
||||||
clientmsgid?: string; // Your own id for the message.
|
clientmsgid?: string; // Your own id for the message.
|
||||||
errormessage?: string; // Error message - if it failed.
|
errormessage?: string; // Error message - if it failed.
|
||||||
text?: string; // The text of the message.
|
text?: string; // @since 3.6. The text of the message.
|
||||||
timecreated?: number; // The timecreated timestamp for the message.
|
timecreated?: number; // @since 3.6. The timecreated timestamp for the message.
|
||||||
conversationid?: number; // The conversation id for this message.
|
conversationid?: number; // @since 3.6. The conversation id for this message.
|
||||||
useridfrom?: number; // The user id who sent the message.
|
useridfrom?: number; // @since 3.6. The user id who sent the message.
|
||||||
candeletemessagesforallusers: boolean; // If the user can delete messages in the conversation for all users.
|
candeletemessagesforallusers: boolean; // @since 3.7. If the user can delete messages in the conversation for all users.
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -441,8 +441,8 @@ export type AddonNotesGetCourseNotesResult = {
|
||||||
sitenotes?: AddonNotesNote[]; // Site notes.
|
sitenotes?: AddonNotesNote[]; // Site notes.
|
||||||
coursenotes?: AddonNotesNote[]; // Couse notes.
|
coursenotes?: AddonNotesNote[]; // Couse notes.
|
||||||
personalnotes?: AddonNotesNote[]; // Personal notes.
|
personalnotes?: AddonNotesNote[]; // Personal notes.
|
||||||
canmanagesystemnotes?: boolean; // Whether the user can manage notes at system level.
|
canmanagesystemnotes?: boolean; // @since 3.7. Whether the user can manage notes at system level.
|
||||||
canmanagecoursenotes?: boolean; // Whether the user can manage notes at the given course.
|
canmanagecoursenotes?: boolean; // @since 3.7. Whether the user can manage notes at the given course.
|
||||||
warnings?: CoreWSExternalWarning[];
|
warnings?: CoreWSExternalWarning[];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -486,7 +486,7 @@ export type AddonNotificationsNotificationPreferencesNotificationProcessor = {
|
||||||
displayname: string; // Display name.
|
displayname: string; // Display name.
|
||||||
name: string; // Processor name.
|
name: string; // Processor name.
|
||||||
locked: boolean; // Is locked by admin?.
|
locked: boolean; // Is locked by admin?.
|
||||||
lockedmessage?: string; // Text to display if locked.
|
lockedmessage?: string; // @since 3.6. Text to display if locked.
|
||||||
userconfigured: number; // Is configured?.
|
userconfigured: number; // Is configured?.
|
||||||
loggedin: AddonNotificationsNotificationPreferencesNotificationProcessorState;
|
loggedin: AddonNotificationsNotificationPreferencesNotificationProcessorState;
|
||||||
loggedoff: AddonNotificationsNotificationPreferencesNotificationProcessorState;
|
loggedoff: AddonNotificationsNotificationPreferencesNotificationProcessorState;
|
||||||
|
|
|
@ -422,7 +422,7 @@ export type CoreCommentsArea = {
|
||||||
canpost: boolean; // Canpost.
|
canpost: boolean; // Canpost.
|
||||||
canview: boolean; // Canview.
|
canview: boolean; // Canview.
|
||||||
count: number; // Count.
|
count: number; // Count.
|
||||||
collapsediconkey: string; // Collapsediconkey.
|
collapsediconkey: string; // @since 3.3. Collapsediconkey.
|
||||||
displaytotalcount: boolean; // Displaytotalcount.
|
displaytotalcount: boolean; // Displaytotalcount.
|
||||||
displaycancel: boolean; // Displaycancel.
|
displaycancel: boolean; // Displaycancel.
|
||||||
fullwidth: boolean; // Fullwidth.
|
fullwidth: boolean; // Fullwidth.
|
||||||
|
|
|
@ -1144,21 +1144,21 @@ export type CoreCourseSummary = {
|
||||||
fullname: string; // Fullname.
|
fullname: string; // Fullname.
|
||||||
shortname: string; // Shortname.
|
shortname: string; // Shortname.
|
||||||
idnumber: string; // Idnumber.
|
idnumber: string; // Idnumber.
|
||||||
summary: string; // Summary.
|
summary: string; // @since 3.3. Summary.
|
||||||
summaryformat: number; // Summary format (1 = HTML, 0 = MOODLE, 2 = PLAIN or 4 = MARKDOWN).
|
summaryformat: number; // @since 3.3. Summary format (1 = HTML, 0 = MOODLE, 2 = PLAIN or 4 = MARKDOWN).
|
||||||
startdate: number; // Startdate.
|
startdate: number; // @since 3.3. Startdate.
|
||||||
enddate: number; // Enddate.
|
enddate: number; // @since 3.3. Enddate.
|
||||||
visible: boolean; // Visible.
|
visible: boolean; // @since 3.8. Visible.
|
||||||
fullnamedisplay: string; // Fullnamedisplay.
|
fullnamedisplay: string; // @since 3.3. Fullnamedisplay.
|
||||||
viewurl: string; // Viewurl.
|
viewurl: string; // Viewurl.
|
||||||
courseimage: string; // Courseimage.
|
courseimage: string; // @since 3.6. Courseimage.
|
||||||
progress?: number; // Progress.
|
progress?: number; // @since 3.6. Progress.
|
||||||
hasprogress: boolean; // Hasprogress.
|
hasprogress: boolean; // @since 3.6. Hasprogress.
|
||||||
isfavourite: boolean; // Isfavourite.
|
isfavourite: boolean; // @since 3.6. Isfavourite.
|
||||||
hidden: boolean; // Hidden.
|
hidden: boolean; // @since 3.6. Hidden.
|
||||||
timeaccess?: number; // Timeaccess.
|
timeaccess?: number; // @since 3.6. Timeaccess.
|
||||||
showshortname: boolean; // Showshortname.
|
showshortname: boolean; // @since 3.6. Showshortname.
|
||||||
coursecategory: string; // Coursecategory.
|
coursecategory: string; // @since 3.7. Coursecategory.
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue