forked from CIT/Vmeda.Online
		
	MOBILE-3109 addon: Add 'since' tags in WS return types
This commit is contained in:
		
							parent
							
								
									f80dd0c241
								
							
						
					
					
						commit
						346c8a42ff
					
				| @ -86,7 +86,7 @@ export class AddonBadgesProvider { | ||||
|                     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) { | ||||
|                     // In 3.7, competencies was renamed to alignment. Rename the property in 3.6 too.
 | ||||
|                     response.badges.forEach((badge) => { | ||||
|  | ||||
| @ -1906,7 +1906,7 @@ export type AddonCalendarEventBase = { | ||||
|     name: string; // Name.
 | ||||
|     description?: string; // Description.
 | ||||
|     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.
 | ||||
|     groupid?: number; // Groupid.
 | ||||
|     userid?: number; // Userid.
 | ||||
| @ -1947,17 +1947,17 @@ export type AddonCalendarEventBase = { | ||||
|         summaryformat: number; // Summary format (1 = HTML, 0 = MOODLE, 2 = PLAIN or 4 = MARKDOWN).
 | ||||
|         startdate: number; // Startdate.
 | ||||
|         enddate: number; // Enddate.
 | ||||
|         visible: boolean; // Visible.
 | ||||
|         visible: boolean; // @since 3.8. Visible.
 | ||||
|         fullnamedisplay: string; // Fullnamedisplay.
 | ||||
|         viewurl: string; // Viewurl.
 | ||||
|         courseimage: string; // Courseimage.
 | ||||
|         progress?: number; // Progress.
 | ||||
|         hasprogress: boolean; // Hasprogress.
 | ||||
|         isfavourite: boolean; // Isfavourite.
 | ||||
|         hidden: boolean; // Hidden.
 | ||||
|         timeaccess?: number; // Timeaccess.
 | ||||
|         showshortname: boolean; // Showshortname.
 | ||||
|         coursecategory: string; // Coursecategory.
 | ||||
|         courseimage: string; // @since 3.6. Courseimage.
 | ||||
|         progress?: number; // @since 3.6. Progress.
 | ||||
|         hasprogress: boolean; // @since 3.6. Hasprogress.
 | ||||
|         isfavourite: boolean; // @since 3.6. Isfavourite.
 | ||||
|         hidden: boolean; // @since 3.6. Hidden.
 | ||||
|         timeaccess?: number; // @since 3.6. Timeaccess.
 | ||||
|         showshortname: boolean; // @since 3.6. Showshortname.
 | ||||
|         coursecategory: string; // @since 3.7. Coursecategory.
 | ||||
|     }; | ||||
|     subscription?: { | ||||
|         displayeventsource: boolean; // Displayeventsource.
 | ||||
| @ -1974,8 +1974,8 @@ export type AddonCalendarEventBase = { | ||||
|     iscourseevent: boolean; // Iscourseevent.
 | ||||
|     iscategoryevent: boolean; // Iscategoryevent.
 | ||||
|     groupname?: string; // Groupname.
 | ||||
|     normalisedeventtype: string; // Normalisedeventtype.
 | ||||
|     normalisedeventtypetext: string; // Normalisedeventtypetext.
 | ||||
|     normalisedeventtype: string; // @since 3.7. Normalisedeventtype.
 | ||||
|     normalisedeventtypetext: string; // @since 3.7. Normalisedeventtypetext.
 | ||||
| }; | ||||
| 
 | ||||
| /** | ||||
| @ -2047,7 +2047,7 @@ export type AddonCalendarMonth = { | ||||
|     date: CoreWSDate; | ||||
|     periodname: string; // Periodname.
 | ||||
|     includenavigation: boolean; // Includenavigation.
 | ||||
|     initialeventsloaded: boolean; // Initialeventsloaded.
 | ||||
|     initialeventsloaded: boolean; // @since 3.5. Initialeventsloaded.
 | ||||
|     previousperiod: CoreWSDate; | ||||
|     previousperiodlink: string; // Previousperiodlink.
 | ||||
|     previousperiodname: string; // Previousperiodname.
 | ||||
| @ -2121,7 +2121,7 @@ export type AddonCalendarUpcoming = { | ||||
|     courseid: number; // Courseid.
 | ||||
|     categoryid?: number; // Categoryid.
 | ||||
|     isloggedin: boolean; // Isloggedin.
 | ||||
|     date: CoreWSDate; // Date.
 | ||||
|     date: CoreWSDate; // @since 3.8. Date.
 | ||||
| }; | ||||
| 
 | ||||
| /** | ||||
|  | ||||
| @ -717,7 +717,7 @@ export type AddonCompetencyPath = { | ||||
|     framework: AddonCompetencyPathNode; | ||||
|     pluginbaseurl: string; // Pluginbaseurl.
 | ||||
|     pagecontextid: number; // Pagecontextid.
 | ||||
|     showlinks: boolean; // Showlinks.
 | ||||
|     showlinks: boolean; // @since 3.7. Showlinks.
 | ||||
| }; | ||||
| 
 | ||||
| /** | ||||
| @ -816,7 +816,7 @@ export type AddonCompetencySummary = { | ||||
|     scaleconfiguration: string; // Scaleconfiguration.
 | ||||
|     taxonomyterm: string; // Taxonomyterm.
 | ||||
|     comppath: AddonCompetencyPath; | ||||
|     pluginbaseurl: string; // Pluginbaseurl.
 | ||||
|     pluginbaseurl: string; // @since 3.7. Pluginbaseurl.
 | ||||
| }; | ||||
| 
 | ||||
| /** | ||||
| @ -891,8 +891,8 @@ export type AddonCompetencyUserCompetencySummaryInCourse = { | ||||
|     usercompetencysummary: AddonCompetencyUserCompetencySummary; | ||||
|     course: CoreCourseSummary; | ||||
|     coursemodules: CoreCourseModuleSummary[]; // Coursemodules.
 | ||||
|     plans: AddonCompetencyPlan[]; // Plans.
 | ||||
|     pluginbaseurl: string; // Pluginbaseurl.
 | ||||
|     plans: AddonCompetencyPlan[]; // @since 3.7. Plans.
 | ||||
|     pluginbaseurl: string; // @since 3.7. Pluginbaseurl.
 | ||||
| }; | ||||
| 
 | ||||
| /** | ||||
| @ -986,7 +986,7 @@ export type AddonCompetencyDataForCourseCompetenciesPageResult = { | ||||
|     statistics: AddonCompetencyCourseCompetencyStatistics; | ||||
|     competencies: AddonCompetencyDataForCourseCompetenciesPageCompetency[]; | ||||
|     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.
 | ||||
|     }[]; | ||||
|     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.
 | ||||
|     type: number; // The type of the conversation (1=individual,2=group,3=self).
 | ||||
|     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.
 | ||||
|     isread: boolean; // If the user has read all messages in the 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.
 | ||||
|     iscontact: boolean; // Is the user a contact?.
 | ||||
|     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.
 | ||||
|     requirescontact: boolean; // If the user requires to be contacts.
 | ||||
|     contactrequests?: { // The contact requests.
 | ||||
| @ -2897,7 +2897,7 @@ export type AddonMessagesMessagePreferencesNotificationProcessor = { | ||||
|     displayname: string; // Display name.
 | ||||
|     name: string; // Processor name.
 | ||||
|     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?.
 | ||||
|     loggedin: { | ||||
|         name: string; // Name.
 | ||||
| @ -2938,14 +2938,14 @@ export type AddonMessagesMessageAreaContact = { | ||||
|     ismessaging: boolean; // If we are messaging the user.
 | ||||
|     sentfromcurrentuser: boolean; // Was the last message sent from the current user?.
 | ||||
|     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.
 | ||||
|     showonlinestatus: boolean; // Show the user's online status?.
 | ||||
|     isonline: boolean; // The user's online status.
 | ||||
|     isread: boolean; // If the user has read the message.
 | ||||
|     isblocked: boolean; // If the user has been blocked.
 | ||||
|     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; | ||||
| 
 | ||||
| /** | ||||
| @ -3019,7 +3019,7 @@ export type AddonMessagesGetConversationCountsResult = { | ||||
|     types: { | ||||
|         1: number; // Total number of individual 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: { | ||||
|         1: number; // Total number of unread individual 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 = { | ||||
|     preferences: AddonMessagesMessagePreferences; | ||||
|     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[]; | ||||
| }; | ||||
| 
 | ||||
| @ -3073,9 +3073,9 @@ export type AddonMessagesGetMessagesMessage = { | ||||
|     timeread: number; // Time read.
 | ||||
|     usertofullname: string; // User to full name.
 | ||||
|     userfromfullname: string; // User from full name.
 | ||||
|     component?: string; // The component that generated the notification.
 | ||||
|     eventtype?: string; // The type of notification.
 | ||||
|     customdata?: string; // Custom data to be passed to the message processor.
 | ||||
|     component?: string; // @since 3.7. The component that generated the notification.
 | ||||
|     eventtype?: string; // @since 3.7. The type of notification.
 | ||||
|     customdata?: string; // @since 3.7. Custom data to be passed to the message processor.
 | ||||
| } & 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.
 | ||||
|     clientmsgid?: string; // Your own id for the message.
 | ||||
|     errormessage?: string; // Error message - if it failed.
 | ||||
|     text?: string; // The text of the message.
 | ||||
|     timecreated?: number; // The timecreated timestamp for the message.
 | ||||
|     conversationid?: number; // The conversation id for this message.
 | ||||
|     useridfrom?: number; // The user id who sent the message.
 | ||||
|     candeletemessagesforallusers: boolean; // If the user can delete messages in the conversation for all users.
 | ||||
|     text?: string; // @since 3.6. The text of the message.
 | ||||
|     timecreated?: number; // @since 3.6. The timecreated timestamp for the message.
 | ||||
|     conversationid?: number; // @since 3.6. The conversation id for this message.
 | ||||
|     useridfrom?: number; // @since 3.6. The user id who sent the message.
 | ||||
|     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.
 | ||||
|     coursenotes?: AddonNotesNote[]; // Couse notes.
 | ||||
|     personalnotes?: AddonNotesNote[]; // Personal notes.
 | ||||
|     canmanagesystemnotes?: boolean; // Whether the user can manage notes at system level.
 | ||||
|     canmanagecoursenotes?: boolean; // Whether the user can manage notes at the given course.
 | ||||
|     canmanagesystemnotes?: boolean; // @since 3.7. Whether the user can manage notes at system level.
 | ||||
|     canmanagecoursenotes?: boolean; // @since 3.7. Whether the user can manage notes at the given course.
 | ||||
|     warnings?: CoreWSExternalWarning[]; | ||||
| }; | ||||
| 
 | ||||
|  | ||||
| @ -486,7 +486,7 @@ export type AddonNotificationsNotificationPreferencesNotificationProcessor = { | ||||
|     displayname: string; // Display name.
 | ||||
|     name: string; // Processor name.
 | ||||
|     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?.
 | ||||
|     loggedin: AddonNotificationsNotificationPreferencesNotificationProcessorState; | ||||
|     loggedoff: AddonNotificationsNotificationPreferencesNotificationProcessorState; | ||||
|  | ||||
| @ -422,7 +422,7 @@ export type CoreCommentsArea = { | ||||
|     canpost: boolean; // Canpost.
 | ||||
|     canview: boolean; // Canview.
 | ||||
|     count: number; // Count.
 | ||||
|     collapsediconkey: string; // Collapsediconkey.
 | ||||
|     collapsediconkey: string; // @since 3.3. Collapsediconkey.
 | ||||
|     displaytotalcount: boolean; // Displaytotalcount.
 | ||||
|     displaycancel: boolean; // Displaycancel.
 | ||||
|     fullwidth: boolean; // Fullwidth.
 | ||||
|  | ||||
| @ -1144,21 +1144,21 @@ export type CoreCourseSummary = { | ||||
|     fullname: string; // Fullname.
 | ||||
|     shortname: string; // Shortname.
 | ||||
|     idnumber: string; // Idnumber.
 | ||||
|     summary: string; // Summary.
 | ||||
|     summaryformat: number; // Summary format (1 = HTML, 0 = MOODLE, 2 = PLAIN or 4 = MARKDOWN).
 | ||||
|     startdate: number; // Startdate.
 | ||||
|     enddate: number; // Enddate.
 | ||||
|     visible: boolean; // Visible.
 | ||||
|     fullnamedisplay: string; // Fullnamedisplay.
 | ||||
|     summary: string; // @since 3.3. Summary.
 | ||||
|     summaryformat: number; // @since 3.3. Summary format (1 = HTML, 0 = MOODLE, 2 = PLAIN or 4 = MARKDOWN).
 | ||||
|     startdate: number; // @since 3.3. Startdate.
 | ||||
|     enddate: number; // @since 3.3. Enddate.
 | ||||
|     visible: boolean; // @since 3.8. Visible.
 | ||||
|     fullnamedisplay: string; // @since 3.3. Fullnamedisplay.
 | ||||
|     viewurl: string; // Viewurl.
 | ||||
|     courseimage: string; // Courseimage.
 | ||||
|     progress?: number; // Progress.
 | ||||
|     hasprogress: boolean; // Hasprogress.
 | ||||
|     isfavourite: boolean; // Isfavourite.
 | ||||
|     hidden: boolean; // Hidden.
 | ||||
|     timeaccess?: number; // Timeaccess.
 | ||||
|     showshortname: boolean; // Showshortname.
 | ||||
|     coursecategory: string; // Coursecategory.
 | ||||
|     courseimage: string; // @since 3.6. Courseimage.
 | ||||
|     progress?: number; // @since 3.6. Progress.
 | ||||
|     hasprogress: boolean; // @since 3.6. Hasprogress.
 | ||||
|     isfavourite: boolean; // @since 3.6. Isfavourite.
 | ||||
|     hidden: boolean; // @since 3.6. Hidden.
 | ||||
|     timeaccess?: number; // @since 3.6. Timeaccess.
 | ||||
|     showshortname: boolean; // @since 3.6. Showshortname.
 | ||||
|     coursecategory: string; // @since 3.7. Coursecategory.
 | ||||
| }; | ||||
| 
 | ||||
| /** | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user