typescript-closure-tools
Version:
Command-line tools to convert closure-style JSDoc annotations to typescript, and to convert typescript sources to closure externs files
1,624 lines (1,583 loc) • 82.4 kB
TypeScript
/// <reference path="../winjs/winjs.d.ts" />
// Type definitions for Microsoft Live Connect v5.0.
// Project: http://msdn.microsoft.com/en-us/library/live/hh243643.aspx
// Definitions by: John Vilk <https://github.com/jvilk/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module Microsoft.Live {
//#region REST Object Information
/**
* Sub object of REST objects that contains information about a user.
*/
interface IUserInfo {
/**
* The name of the user.
*/
name: string;
/**
* The Live ID of the user.
*/
id: string;
}
/**
* Sub object of REST objects that contains information about who the
* item is shared with.
*/
interface ISharedWith {
/**
* A localized string that contains info about who can access the
* item. The options are:
* - People I selected
* - Just me
* - Everyone (public)
* - Friends
* - My friends and their friends
* - People with a link
* The default is Just me.
*/
access: string;
}
/**
* Convenience interface for when you have a bunch of objects of different
* types in a single collection. You discriminate between them using their
* 'type' field.
*/
interface IObject {
/**
* The object's type.
*/
type: string;
}
/**
* Contains a collection of one type of object.
*/
interface IObjectCollection<T> {
/**
* An array container for objects when a collection of objects is
* returned.
*/
data: T[];
}
/**
* The Album object contains info about a user's albums in Microsoft
* SkyDrive. Albums are stored at the root level of a user's SkyDrive
* directory, and can contain combinations of photos, videos, audio, files,
* and folders. The Live Connect REST API supports reading Album objects.
* Use the wl.photos scope to read a user's Album objects. Use the
* wl.skydrive scope to read a user's files. Use the wl.contacts_photos
* scope to read any albums, photos, videos, and audio that other users have
* shared with the user.
*/
interface IAlbum {
/**
* The Album object's ID.
*/
id: string;
/**
* Info about the user who authored the album.
*/
from: IUserInfo;
/**
* The name of the album.
*/
name: string;
/**
* A description of the album, or null if no description is specified.
*/
description: string;
/**
* The resource ID of the parent.
*/
parent_id: string;
/**
* The URL to upload items to the album, hosted in SkyDrive. Requires
* the wl.skydrive scope.
*/
upload_location: string;
/**
* A value that indicates whether this album can be embedded. If this
* album can be embedded, this value is true; otherwise, it is false.
*/
is_embeddable: boolean;
/**
* The total number of items in the album.
*/
count: number;
/**
* A URL of the album, hosted in SkyDrive.
*/
link: string;
/**
* The type of object; in this case, "album".
*/
type: string;
/**
* The object that contains permissions info for the album. Requires the
* wl.skydrive scope.
*/
shared_with: ISharedWith;
/**
* The time, in ISO 8601 format, at which the album was created.
*/
created_time: string;
/**
* The time, in ISO 8601 format, that the system updated the album last.
*/
updated_time: string;
/**
* The time, in ISO 8601 format, that the file was last updated.
*/
client_updated_time: string;
}
/**
* Represents a new album.
*/
interface INewAlbum {
/**
* The name of the album.
*/
name: string;
/**
* A description of the album.
*/
description?: string;
}
/**
* The Audio object contains info about a user's audio in SkyDrive. The Live
* Connect REST API supports creating, reading, updating, and deleting Audio
* objects. Use the wl.skydrive scope to read Audio objects. Use the
* wl.contacts_skydrive scope to read any audio that other users have shared
* with the user. Use the wl.skydrive_update scope to create, update, or
* delete Audio objects.
*/
interface IAudio {
/**
* The Audio object's ID.
*/
id: string;
/**
* Info about the user who uploaded the audio.
*/
from: IUserInfo;
/**
* The name of the audio.
*/
name: string;
/**
* A description of the audio, or null if no description is specified.
*/
description: string;
/**
* The id of the folder in which the audio is currently stored.
*/
parent_id: string;
/**
* The size, in bytes, of the audio.
*/
size: number;
/**
* The URL to use to upload a new audio to overwrite the existing audio.
*/
upload_location: string;
/**
* The number of comments associated with the audio.
*/
comments_count: number;
/**
* A value that indicates whether comments are enabled for the audio. If
* comments can be made, this value is true; otherwise, it is false.
*/
comments_enabled: boolean;
/**
* A value that indicates whether this audio can be embedded. If this
* audio can be embedded, this value is true; otherwise, it is false.
*/
is_embeddable: boolean;
/**
* The URL to use to download the audio from SkyDrive.
* Warning
* This value is not persistent. Use it immediately after making the
* request, and avoid caching.
*/
source: string;
/**
* A URL to view the item on SkyDrive.
*/
link: string;
/**
* The type of object; in this case, "audio".
*/
type: string;
/**
* The audio's title.
*/
title: string;
/**
* The audio's artist name.
*/
artist: string;
/**
* The audio's album name.
*/
album: string;
/**
* The artist name of the audio's album.
*/
album_artist: string;
/**
* The audio's genre.
*/
genre: string;
/**
* The audio's playing time, in milliseconds.
*/
duration: number;
/**
* A URL to view the audio's picture on SkyDrive.
*/
picture: string;
/**
* The object that contains permission info.
*/
shared_with: ISharedWith;
/**
* The time, in ISO 8601 format, at which the audio was created.
*/
created_time: string;
/**
* The time, in ISO 8601 format, at which the audio was last updated.
*/
updated_time: string;
}
/**
* Represents a new audio item.
*/
interface INewAudio {
/**
* The name of the audio.
*/
name: string;
/**
* A description of the audio.
*/
description?: string;
/**
* The audio's title.
*/
title?: string;
/**
* The audio's artist name.
*/
artist?: string;
/**
* The audio's album name.
*/
album?: string;
/**
* The artist name of the audio's album.
*/
album_artist?: string;
/**
* The audio's genre.
*/
genre?: string;
}
/**
* The Calendar object contains info about a user's Outlook.com calendar.
* The Live Connect REST API supports creating, reading, updating, and
* deleting calendars. Use the wl.calendars scope to read a user's Calendar
* objects. Use the wl.calendars_update scope to create Calendar objects for
* a user. Use the wl.contacts_calendars scope to read a user's friends'
* Calendar objects.
*/
interface ICalendar {
/**
* The Calendar object's ID.
*/
id: string;
/**
* Name of the calendar.
*/
name: string;
/**
* Description of the calendar.
*/
description: string;
/**
* The time, in ISO 8601 format, at which the calendar was created.
*/
created_time: string;
/**
* The time, in ISO 8601 format, that the calendar was last updated.
*/
updated_time: string;
/**
* Info about the user who owns the calendar.
*/
from: IUserInfo;
/**
* A value that indicates whether this calendar is the default calendar.
* If this calendar is the default calendar, this value is true;
* otherwise, it is false.
*/
is_default: boolean;
/**
* A public subscription URL with which Live Connect will synchronize
* properties and events periodically for this calendar. A NULL value
* indicates that this is not a subscribed calendar.
*/
subscription_location: string;
/**
* Role and permissions that are granted to the user for the calendar.
* The possible values are:
* - free_busy: The user can see only free/busy info.
* - limited_details: The user can see a subset of all details.
* - read: The user can only read the content of the calendar events.
* - read_write: The user can read and write calendar and events.
* - co_owner: The user is co-owner of this calendar.
* - owner: The user is the owner of this calendar.
*/
permissions: string;
}
/**
* Represents a new calendar item.
*/
interface INewCalendar {
/**
* Name of the calendar.
*/
name: string;
/**
* Description of the calendar.
*/
description?: string;
}
/**
* Represents a request to create a new calendar that subscribes to the
* given iCal calendar.
*/
interface INewCalendarSubscription {
/**
* Name of the calendar.
*/
name: string;
/**
* A public subscription URL with which Live Connect will synchronize
* properties and events periodically for this calendar.
*/
subscription_location: string;
}
/**
* The Comment object contains info about comments that are associated with
* a photo, audio, or video on SkyDrive. The Live Connect REST API supports
* reading Comment objects. Use the wl.photos scope to read Comment objects.
* Use the wl.contacts_photos scope to read the Comment objects that are
* associated with any albums, photos, and videos that other users have
* shared with the user.
*/
interface IComment {
/**
* The Comment object's id.
*/
id: string;
/**
* Info about the user who created the comment.
*/
from: IUserInfo;
/**
* The text of the comment. The maximum length of a comment is 10,000
* characters.
*/
message: string;
/**
* The time, in ISO 8601 format, at which the comment was created.
*/
created_time: string;
}
/**
* Represents a new comment.
*/
interface INewComment {
/**
* The text of the comment. The maximum length of a comment is 10,000
* characters.
*/
message: string;
}
/**
* The Contact object contains info about a user's Outlook.com contacts. The
* Live Connect REST API supports reading Contact objects.
*/
interface IContact {
/**
* The Contact object's ID.
*/
id: string;
/**
* The contact's first name, or null if no first name is specified.
*/
first_name: string;
/**
* The contact's last name, or null if no last name is specified.
*/
last_name: string;
/**
* The contact's full name, formatted for location.
*/
name: string;
/**
* A value that indicates whether the contact is set as a friend. If the
* contact is a friend, this value is true; otherwise, it is false.
*/
is_friend: boolean;
/**
* A value that indicates whether the contact is set as a favorite
* contact. If the contact is a favorite, this value is true; otherwise,
* it is false.
*/
is_favorite: boolean;
/**
* The contact's ID, if the contact has one. If not, this value is null.
*/
user_id: string;
/**
* An array containing a SHA-256 hash for each of the contact's email
* addresses. For more info, see Friend finder.
*/
email_hashes: string[];
/**
* The time, in ISO 8601 format, at which the user last updated the
* data.
*/
updated_time: string;
/**
* The day of the contact's birth date, or null if no birth date is
* specified.
*/
birth_day: number;
/**
* The month of the contact's birth date, or null if no birth date is
* specified.
*/
birth_month: number;
}
/**
* Represents a new contact.
*/
interface INewContact {
/**
* The contact's first name.
*/
first_name?: string;
/**
* The contact's last name.
*/
last_name?: string;
/**
* An array that contains the contact's work info.
*/
work?: {
employer: {
name: string;
}
}[];
/**
* The contact's email addresses.
*/
emails?: {
/**
* The contact's preferred email address.
*/
preferred?: string;
/**
* The contact's personal email address.
*/
personal?: string;
/**
* The contact's business email address.
*/
business?: string;
/**
* The contact's "alternate" email address.
*/
other?: string;
};
}
/**
* The Error object contains info about an error that is returned by the
* Live Connect APIs.
*/
interface IError {
/**
* Info about the error.
*/
error: {
/**
* The error code.
*/
code: string;
/**
* The error message.
*/
message: string;
};
}
/**
* The Event object contains info about events on a user's Outlook.com
* calendars. The Live Connect REST API supports creating Event objects. Use
* the wl.events_create scope to create Event objects on the user's default
* calendar only. Use the wl.calendars scope to read Event objects on the
* user's calendars. Use wl.calendars_update to create Event objects on any
* of the user's calendars. Use the wl.contacts_calendars scope to read
* Event objects from the user's friend's calendars.
*/
interface IEvent {
/**
* The ID of the event.
*/
id: string;
/**
* The name of the event, with a maximum length of 255 characters. This
* structure is required.
*/
name: string;
/**
* The time, in ISO 8601 format, at which the event was created.
*/
created_time: string;
/**
* The time, in ISO 8601 format, at which the event was updated. This
* structure is visible only in the Event object that is returned if the
* event was successfully created.
*/
updated_time: string;
/**
* A description of the event, with a maximum length of 32,768
* characters. This structure is required.
*/
description: string;
/**
* The ID of the calendar that contains the event.
*/
calendar_id: string;
/**
* The object that contains the name and ID of the organizer.
*/
from: IUserInfo;
/**
* The start time, in ISO 8601 format, of the event. When the event is
* being read, the time will be the user's local time, in ISO 8601
* format.
*/
start_time: string;
/**
* The end time, in ISO 8601 format, of the event. If no end time is
* specified, the default value is 30 minutes after start_time. This
* structure is optional when creating an event. When the event is being
* read, the time will be the user's local time, in ISO 8601 format.
*/
end_time: string;
/**
* The name of the location at which the event will take place. The
* maximum length is 1,000 characters.
*/
location: string;
/**
* A value that specifies whether the event is an all-day event. If the
* event is an all-day event, this value is true; otherwise, it is
* false. If this structure is missing, the default value is false.
*/
is_all_day_event: boolean;
/**
* A value that specifies whether the event is recurring. If the event
* is recurring, this value is true; otherwise, it is false.
*/
is_recurrent: boolean;
/**
* The text description of the recurrence pattern, for example, "Occurs
* every week on Tuesday". The value is Null if this is not a recurrent
* event.
*/
recurrence: string;
/**
* The time, in minutes, before the event for the reminder alarm.
*/
reminder_time: number;
/**
* The user's availability status for the event. Valid values are:
* - free
* - busy
* - tentative
* - out_of_office
* @default "free"
*/
availability: string;
/**
* A value that specifies whether the event is publicly visible. Valid
* values are:
* - public�the event is visible to anyone who can view the calendar.
* - private"�the event is visible only to the event owner.
* @default "public"
*/
visibility: string;
}
/**
* Represents a new event.
*/
interface INewEvent {
/**
* The name of the event, with a maximum length of 255 characters. This
* structure is required.
*/
name: string;
/**
* A description of the event, with a maximum length of 32,768
* characters. This structure is required.
*/
description: string;
/**
* The start time of the event. When the event is being read, the time
* will be the user's local time, in ISO 8601 format.
* Can be a date string, or a Date object.
*/
start_time: any;
/**
* The end time of the event. If no end time is specified, the default
* value is 30 minutes after start_time. This structure is optional when
* creating an event. When the event is being read, the time will be the
* user's local time, in ISO 8601 format.
* Can be a date string, or a Date object.
*/
end_time?: any;
/**
* The name of the location at which the event will take place. The
* maximum length is 1,000 characters.
*/
location?: string;
/**
* A value that specifies whether the event is an all-day event. If the
* event is an all-day event, this value is true; otherwise, it is
* false. If this structure is missing, the default value is false.
*/
is_all_day_event?: boolean;
/**
* The time, in minutes, before the event for the reminder alarm.
*/
reminder_time?: number;
/**
* The user's availability status for the event. Valid values are:
* - free
* - busy
* - tentative
* - out_of_office
* @default "free"
*/
availability?: string;
/**
* A value that specifies whether the event is publicly visible. Valid
* values are:
* - public�the event is visible to anyone who can view the calendar.
* - private"�the event is visible only to the event owner.
* @default "public"
*/
visibility?: string;
}
/**
* Response received after successfully creating a new event.
*/
interface INewEventResponse {
/**
* The name of the event, with a maximum length of 255 characters. This
* structure is required.
*/
name: string;
/**
* A description of the event, with a maximum length of 32,768
* characters. This structure is required.
*/
description: string;
/**
* The start time, in ISO 8601 format, of the event. When the event is
* being read, the time will be the user's local time, in ISO 8601
* format.
*/
start_time: string;
/**
* The end time, in ISO 8601 format, of the event. If no end time is
* specified, the default value is 30 minutes after start_time. This
* structure is optional when creating an event. When the event is being
* read, the time will be the user's local time, in ISO 8601 format.
*/
end_time: string;
/**
* The name of the location at which the event will take place. The
* maximum length is 1,000 characters.
*/
location: string;
/**
* A value that specifies whether the event is an all-day event. If the
* event is an all-day event, this value is true; otherwise, it is
* false. If this structure is missing, the default value is false.
*/
is_all_day_event: boolean;
/**
* A value that specifies whether the event is recurring. If the event
* is recurring, this value is true; otherwise, it is false.
*/
is_recurrent: boolean;
/**
* The text description of the recurrence pattern, for example, "Occurs
* every week on Tuesday". The value is Null if this is not a recurrent
* event.
*/
recurrence: string;
/**
* The time, in minutes, before the event for the reminder alarm.
*/
reminder_time: number;
/**
* The user's availability status for the event. Valid values are:
* - free
* - busy
* - tentative
* - out_of_office
* @default "free"
*/
availability: string;
/**
* A value that specifies whether the event is publicly visible. Valid
* values are:
* - public�the event is visible to anyone who can view the calendar.
* - private"�the event is visible only to the event owner.
* @default "public"
*/
visibility: string;
/**
* The time, in ISO 8601 format, at which the event was updated. This
* structure is visible only in the Event object that is returned if the
* event was successfully created.
*/
updated_time: string;
}
/**
* The File object contains info about a user's files in SkyDrive. The Live
* Connect REST API supports creating, reading, updating, and deleting File
* objects. Use the wl.skydrive scope to read File objects. Use the
* wl.contacts_skydrive scope to read any files that other users have shared
* with the user. Use the wl.skydrive_update scope to create, update, or
* delete File objects.
*/
interface IFile {
/**
* The File object's ID.
*/
id: string;
/**
* Info about the user who uploaded the file.
*/
from: IUserInfo;
/**
* The name of the file.
*/
name: string;
/**
* A description of the file, or null if no description is specified.
*/
description: string;
/**
* The ID of the folder the file is currently stored in.
*/
parent_id: string;
/**
* The size, in bytes, of the file.
*/
size: number;
/**
* The URL to upload file content hosted in SkyDrive.
* Note: This structure is not available if the file is an Microsoft
* Office OneNote notebook.
*/
upload_location: string;
/**
* The number of comments that are associated with the file.
*/
comments_count: number;
/**
* A value that indicates whether comments are enabled for the file. If
* comments can be made, this value is true; otherwise, it is false.
*/
comments_enabled: boolean;
/**
* A value that indicates whether this file can be embedded. If this
* file can be embedded, this value is true; otherwise, it is false.
*/
is_embeddable: boolean;
/**
* The URL to use to download the file from SkyDrive.
* Warning: This value is not persistent. Use it immediately after
* making the request, and avoid caching.
* Note: This structure is not available if the file is an Office
* OneNote notebook.
*/
source: string;
/**
* A URL to view the item on SkyDrive.
*/
link: string;
/**
* The type of object; in this case, "file".
* Note: If the file is a Office OneNote notebook, the type structure is
* set to "notebook".
*/
type: string;
/**
* Object that contains permission info.
*/
shared_with: ISharedWith;
/**
* The time, in ISO 8601 format, at which the file was created.
*/
created_time: string;
/**
* The time, in ISO 8601 format, that the system updated the file last.
*/
updated_time: string;
/**
* The time, in ISO 8601 format, that the client machine updated the
* file last.
*/
client_updated_time: string;
/**
* Sorts the items to specify the following criteria: updated, name,
* size, or default.
*/
sort_by: string;
}
/**
* Success response to a new file creation request.
*/
interface INewFileResponse {
/**
* ID of the new item.
*/
id: string;
/**
* The file's name and file extension.
*/
name: string;
/**
* URL where the item can be downloaded from.
*/
source: string;
}
/**
* Returns when you perform a GET request to /FILE_ID/content.
*/
interface IFileDownloadLink {
/**
* A URL download link for the file.
*/
location: string;
}
/**
* The Folder object contains info about a user's folders in SkyDrive.
* Folders can contain combinations of photos, videos, audio, and
* subfolders. The Live Connect REST API supports reading Folder objects.
* Use the wl.photos scope to read Folder objects. Use the
* wl.contacts_photos scope to read any albums, photos, videos, and audio
* that other users have shared with the user.
*/
interface IFolder {
/**
* The Folder object's ID.
*/
id: string;
/**
* Info about the user who created the folder.
*/
from: IUserInfo;
/**
* The name of the folder.
*/
name: string;
/**
* A description of the folder, or null if no description is specified.
*/
description: string;
/**
* The total number of items in the folder.
*/
count: number;
/**
* The URL of the folder, hosted in SkyDrive.
*/
link: string;
/**
* The resource ID of the parent.
*/
parent_id: string;
/**
* The URL to upload items to the folder hosted in SkyDrive. Requires
* the wl.skydrive scope.
*/
upload_location: string;
/**
* A value that indicates whether this folder can be embedded. If this
* folder can be embedded, this value is true; otherwise, it is false.
*/
is_embeddable: boolean;
/**
* The type of object; in this case, "folder".
*/
type: string;
/**
* The time, in ISO 8601 format, at which the folder was created.
*/
created_time: string;
/**
* The time, in ISO 8601 format, that the system updated the file last.
*/
updated_time: string;
/**
* The time, in ISO 8601 format, that the client machine updated the
* file last.
*/
client_updated_time: string;
/**
* Permissions info for the folder. Requires the wl.skydrive scope.
*/
shared_with: ISharedWith;
/**
* Sorts the items to specify the following criteria: updated, name,
* size, or default.
*/
sort_by: string;
}
/**
* Represents a new folder.
*/
interface INewFolder {
/**
* The name of the folder.
*/
name: string;
/**
* A description of the folder.
*/
description?: string;
/**
* Sorts the items to specify the following criteria: updated, name,
* size, or default.
*/
sort_by?: string;
}
/**
* The Friend object contains info about a user's friends. A Friend object
* represents a user's contact whose is_friend value is set to true. The
* Live Connect REST API supports reading Friend objects.
*/
interface IFriend {
/**
* The friend's ID.
*/
id: string;
/**
* The friend's full name, formatted for locale.
*/
name: string;
}
/**
* The Permissions object contains a list of scopes, showing those scopes to
* which the user has consented. The response body contains a JSON object
* that lists all consented scopes as a name/value pair. Each scope to which
* the user consented is present as a key.
*/
interface IPermissions {
[scope: string]: number;
}
/**
* Information about an image.
*/
interface IImageInfo {
/**
* The height, in pixels, of this image of this particular size.
*/
height: number;
/**
* The width, in pixels, of this image of this particular size.
*/
width: number;
/**
* The width, in pixels, of this image of this particular size.
*/
source: string;
/**
* The type of this image of this particular size. Valid values are:
* full (maximum size: 2048 � 2048 pixels)
* - normal (maximum size 800 � 800 pixels)
* - album (maximum size 176 � 176 pixels)
* - small (maximum size 96 � 96 pixels)
*/
type: string;
}
/**
* Represents location information.
*/
interface ILocation {
/**
* The latitude portion of the location, expressed as positive (north)
* or negative (south) degrees relative to the equator.
*/
latitude: number;
/**
* The longitude portion of the location expressed as positive (east) or
* negative (west) degrees relative to the Prime Meridian.
*/
longitude: number;
/**
* The altitude portion of the location, expressed as positive (above)
* or negative (below) values relative to sea level, in units of
* measurement as determined by the camera.
*/
altitude: number;
}
/**
* The Photo object contains info about a user's photos on SkyDrive. The
* Live Connect REST API supports creating, reading, updating, and deleting
* Photo objects. Use the wl.photos scope to read Photo objects. Use the
* wl.contacts_photos scope to read any albums, photos, videos, and audio
* that other users have shared with the user. Use the wl.skydrive_update
* scope to create, update, or delete Photo objects.
*/
interface IPhoto {
/**
* The Photo object's ID.
*/
id: string;
/**
* Info about the user who uploaded the photo.
*/
from: IUserInfo;
/**
* The file name of the photo.
*/
name: string;
/**
* A description of the photo, or null if no description is specified.
*/
description: string;
/**
* The ID of the folder where the item is stored.
*/
parent_id: string;
/**
* The size, in bytes, of the photo.
*/
size: number;
/**
* The number of comments associated with the photo.
*/
comments_count: number;
/**
* A value that indicates whether comments are enabled for the photo. If
* comments can be made, this value is true; otherwise, it is false.
*/
comments_enabled: boolean;
/**
* The number of tags on the photo.
*/
tags_count: number;
/**
* A value that indicates whether tags are enabled for the photo. If
* users can tag the photo, this value is true; otherwise, it is false.
*/
tags_enabled: boolean;
/**
* A value that indicates whether this photo can be embedded. If this
* photo can be embedded, this value is true; otherwise, it is false.
*/
is_embeddable: boolean;
/**
* A URL of the photo's picture.
*/
picture: string;
/**
* The download URL for the photo.
* Warning: This value is not persistent. Use it immediately after
* making the request, and avoid caching.
*/
source: string;
/**
* The URL to upload photo content hosted in SkyDrive. This value is
* returned only if the wl.skydrive scope is present.
*/
upload_location: string;
/**
* Info about various sizes of the photo.
*/
images: IImageInfo[];
/**
* A URL of the photo, hosted in SkyDrive.
*/
link: string;
/**
* The date, in ISO 8601 format, on which the photo was taken, or null
* if no date is specified.
*/
when_taken: string;
/**
* The height, in pixels, of the photo.
*/
height: number;
/**
* The width, in pixels, of the photo.
*/
width: number;
/**
* The type of object; in this case, "photo".
*/
type: string;
/**
* The location where the photo was taken.
* Note: The location object is not available for shared photos.
*/
location: ILocation;
/**
* The manufacturer of the camera that took the photo.
*/
camera_make: string;
/**
* The brand and model number of the camera that took the photo.
*/
camera_model: string;
/**
* The f-number that the photo was taken at.
*/
focal_ratio: number;
/**
* The focal length that the photo was taken at, typically expressed in
* millimeters for newer lenses.
*/
focal_length: number;
/**
* The numerator of the shutter speed (for example, the "1" in "1/15 s")
* that the photo was taken at.
*/
exposure_numerator: number;
/**
* The denominator of the shutter speed (for example, the "15" in "1/15
* s") that the photo was taken at.
*/
exposure_denominator: number;
/**
* The object that contains permissions info for the photo.
*/
shared_with: ISharedWith;
/**
* The time, in ISO 8601 format, at which the photo was created.
*/
created_time: string;
/**
* The time, in ISO 8601 format, at which the photo was last updated.
*/
updated_time: string;
}
/**
* The Search object contains info about the objects found in a user's
* SkyDrive that match the search query. See Search query parameters for
* info about formatting a search query request.
*/
interface ISearch {
/**
* An array of file and folder objects found in a user's SkyDrive that
* match the search query.
*/
data: IObject[];
/**
* The path strings that reference the next and previous sets in a
* paginated response.
*/
paging?: {
/**
* Path string for the next set of results.
*/
next?: string;
/**
* Path string for the previous set of results.
*/
previous?: string;
};
}
/**
* The Tag object contains info about tags that are associated with a photo
* or a video on SkyDrive. The Live Connect REST API supports reading Tag
* objects. Use the wl.photos, and wl.skydrive scopes to read Tag objects.
* Use the wl.contacts_photos and wl.contacts_skydrive scopes to read the
* Tag objects that are associated with any photos that other users have
* shared with the user.
*/
interface ITag {
/**
* The Tag object's ID.
*/
id: string;
/**
* The user object for the tagged person.
*/
user: IUserInfo;
/**
* The center of the tag's horizontal position, measured as a
* floating-point percentage from 0 to 100, from the left edge of the
* photo. This value is not returned for Video objects.
*/
x: number;
/**
* The center of the tag's vertical position, measured as a
* floating-point percentage from 0 to 100, from the top edge of the
* photo. This value is not returned for Video objects.
*/
y: number;
/**
* The time, in ISO 8601 format, at which the tag was created.
*/
created_time: string;
}
/**
* Contains work information for one employer.
*/
interface IWorkInfo {
/**
* Info about the user's employer.
*/
employer: {
/**
* The name of the user's employer, or null if the employer's name
* is not specified.
*/
name: string;
};
/**
* Info about the user's work position.
*/
position: {
/**
* The name of the user's work position, or null if the name of the
* work position is not specified.
*/
name: string;
};
}
/**
* Information about one postal address.
*/
interface IPostalAddress {
/**
* The street address, or null if one is not specified.
*/
street: string;
/**
* The second line of the street address, or null if one is not
* specified.
*/
street_2: string;
/**
* The city of the address, or null if one is not specified.
*/
city: string;
/**
* The state of the address, or null if one is not specified.
*/
state: string;
/**
* The postal code of the address, or null if one is not specified.
*/
postal_code: string;
/**
* The region of the address, or null if one is not specified.
*/
region: string;
}
/**
* The User object contains info about a user. The Live Connect REST API
* supports reading User objects.
*/
interface IUser {
/**
* The user's ID.
*/
id: string;
/**
* The user's full name.
*/
name: string;
/**
* The user's first name.
*/
first_name: string;
/**
* The user's last name.
*/
last_name: string;
/**
* The user's gender, or null if no gender is specified.
*/
gender: string;
/**
* The URL of the user's profile page.
*/
link: string;
/**
* The day of the user's birth date, or null if no birth date is
* specified.
*/
birth_day: number;
/**
* The month of the user's birth date, or null if no birth date is
* specified.
*/
birth_month: number;
/**
* The year of the user's birth date, or null if no birth date is
* specified.
*/
birth_year: number;
/**
* An array that contains the user's work info.
*/
work: IWorkInfo[];
/**
* The user's email addresses.
*/
emails: {
/**
* The user's preferred email address, or null if one is not
* specified.
*/
preferred: string;
/**
* The email address that is associated with the account.
*/
account: string;
/**
* The user's personal email address, or null if one is not
* specified.
*/
personal: string;
/**
* The user's business email address, or null if one is not
* specified.
*/
business: string;
/**
* The user's "alternate" email address, or null if one is not
* specified.
*/
other: string;
};
/**
* The user's postal addresses.
*/
addresses: {
/**
* The user's personal postal address.
*/
personal: IPostalAddress;
/**
* The user's business postal address.
*/
business: IPostalAddress;
};
/**
* The user's phone numbers.
*/
phones: {
/**
* The user's personal phone number, or null if one is not
* specified.
*/
personal: string;
/**
* The user's business phone number, or null if one is not
* specified.
*/
business: string;
/**
* The user's mobile phone number, or null if one is not specified.
*/
mobile: string;
};
/**
* The user's locale code.
*/
locale: string;
/**
* The time, in ISO 8601 format, at which the user last updated the
* object.
*/
updated_time: string;
}
/**
* The Video object contains info about a user's videos on SkyDrive. The
* Live Connect REST API supports creating, reading, updating, and deleting
* Video objects. Use the wl.photos scope to read Video objects. Use the
* wl.contacts_photos scope to read albums, photos, and videos that other
* users have shared with the user. Use the wl.skydrive_update scope to
* create, update, or delete Video objects.
*/
interface IVideo {
/**
* The Video object's ID.
*/
id: string;
/**
* Info about the user who uploaded the video.
*/
from: IUserInfo;
/**
* The file name of the video.
*/
name: string;
/**
* A description of the video, or null if no description is specified.
*/
description: string;
/**
* The id of the folder where the item is stored.
*/
parent_id: string;
/**
* The size, in bytes, of the video.
*/
size: number;
/**
* The number of comments that are associated with the video.
*/
comments_count: number;
/**
* A value that indicates whether comments are enabled for the video. If
* comments can be made, this value is true; otherwise, it is false.
*/
comments_enabled: boolean;
/**
* The number of tags on the video.
*/
tags_count: number;
/**
* A value that indicates whether tags are enabled for the video. If
* tags can be set, this value is true; otherwise, it is false.
*/
tags_enabled: boolean;
/**
* A value that indicates whether this video can be embedded. If this
* video can be embedded, this value is true; otherwise, it is false.
*/
is_embeddable: boolean;
/**
* A URL of a picture that represents the video.
*/
picture: string;
/**
* The download URL for the video.
* Warning: This value is not persistent. Use it immediately after
* making the request, and avoid caching.
*/
source: string;
/**
* The URL to upload video content, hosted in SkyDrive. This value is
* returned only if the wl.skydrive scope is present.
*/
upload_location: string;
/**
* A URL of the video, hosted in SkyDrive.
*/
link: string;
/**
* The height, in pixels, of the video.
*/
height: number;
/**
* The width, in pixels, of the video.
*/
width: number;
/**
* The duration, in milliseconds, of the video run time.
*/
duration: number;
/**
* The bit rate, in bits per second, of the video.
*/
bitrate: number;
/**
* The type of object; in this case, "video".
*/
type: string;
/**
* The object that contains permission info.
*/
shared_with: ISharedWith;
/**
* The time, in ISO 8601 format, at which the video was created.
*/
created_time: string;
/**
* The time, in ISO 8601 format, at which the video was last updated.
*/
updated_time: string;
}
//#endregion REST Object Information
//#region API Properties Interfaces
/**
* 'Properties' object passed into the WL.api method.
*/
interface IAPIProperties {
/**
* Contains the path to the REST API object. For information on
* specifying paths for REST objects, see REST reference.
* http://msdn.microsoft.com/en-us/library/live/hh243648.aspx
*/
path: string;
/**
* An HTTP method that specifies the action required for the API call.
* These actions are standard REST API actions: "COPY", "GET", "MOVE",
* "PUT", "POST", and "DELETE".
* @default "GET"
*/
method?: string;
/**
* A JSON object that specifies the REST API request body. The body
* property is used only for "POST" and "PUT" requests.
*/
body?: any;
}
/**
* 'Properties' object passed into the WL.backgroundDownload method.
*/
interface IBackgroundDownloadProperties {
/**
* The path to the file to download. For information on specifying paths
* for REST objects, see REST reference.
* http://msdn.microsoft.com/en-us/library/live/hh243648.aspx
*/
path: string;
/**
* The file output object to which the downloaded file data is written.
*/
file_output?: Windows.Storage.StorageFile;
}
/**
* 'Properties' object passed into the WL.backgroundUpload method.
*/
interface IBackgroundUploadProperties {
/**
* The path to the file to upload.
*/
path: string;
/**
* The name of the file to upload.
*/
file_name?: string;
/**
* The file input object to read the file from. Can be a
* Windows.Storage.StorageFile or an IFile.
*/
file_input?: any;
/**