Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/sdk/model/o365/__json__/o365-team-channel-json.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* O365 Team Channel JSON properties
*/
export interface O365TeamChannelJson {
native_id: string;
display_name: string;
}
12 changes: 12 additions & 0 deletions src/sdk/model/o365/__json__/o365-team-file-json.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* O365 Team File JSON properties
*/
export interface O365TeamFileJson {
native_id: string;
name: string;
modified_by: string;
modified: number;
size_bytes: number;
type: string;
version: string;
}
11 changes: 11 additions & 0 deletions src/sdk/model/o365/__json__/o365-team-post-json.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* O365 Team Post JSON properties
*/
export interface O365TeamPostJson {
author: string;
created_time: number;
is_important: boolean;
last_modification_time: number;
native_id: string;
subject: string;
}
9 changes: 9 additions & 0 deletions src/sdk/model/o365/__json__/o365-team-tab-json.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* O365 Team Tab JSON properties
*/
export interface O365TeamTabJson {
content_url: string;
display_name: string;
native_id: string;
type: string;
}
119 changes: 113 additions & 6 deletions src/sdk/model/o365/o365-restore-session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ import { O365OneDriveRestoreOptionsRequest } from './o365-onedrive-restore-optio
import { O365SharePointRestoreOptionsRequest } from './o365-sharepoint-restore-options-request';
import { O365Team } from './o365-team';
import { O365TeamJson } from './__json__/o365-team-json';
import { O365TeamChannel } from './o365-team-channel';
import { O365TeamChannelJson } from './__json__/o365-team-channel-json';
import { O365TeamFile } from './o365-team-file';
import { O365TeamFileJson } from './__json__/o365-team-file-json';
import { O365TeamPost } from './o365-team-post';
import { O365TeamPostJson } from './__json__/o365-team-post-json';
import { O365TeamTab } from './o365-team-tab';
import { O365TeamTabJson } from './__json__/o365-team-tab-json';
import { Http } from '../../service/http/http';
import { Task } from '../task/task';
import { TaskJson } from '../task/__json__/task-json';
Expand Down Expand Up @@ -856,15 +864,14 @@ export class O365RestoreSession extends Entity {
/**
* Get O365 Restore Session Teams
* Proxying directly to vbo: page and pageSize are used as offset and limit respectively
* @param displayName - the optional display name of the teams whose representation you want to get from the server.
* Null value will bring all teams for this org.
* @param page
* @param pageSize
* @param {string | null} displayName - the optional display name of the teams whose representation
* you want to get from the server. Null value will bring all teams for this org.
* @param {number} page
* @param {number} pageSize
* @returns {Promise<Array<O365Team>>} the list of O365 teams
*/
/* istanbul ignore next: autogenerated */
async getTeams(displayName: string | null = null, page?: number,
pageSize?: number): Promise<Array<O365Team>> {
async getTeams(displayName: string | null = null, page?: number, pageSize?: number): Promise<Array<O365Team>> {
return Iland.getHttp().get(`/o365-restore-sessions/${this.uuid}/teams`, {
params: {
displayName: displayName,
Expand All @@ -877,4 +884,104 @@ export class O365RestoreSession extends Entity {
});
}

/**
* Get O365 Team Channels
* Proxying directly to vbo: page and pageSize are used as offset and limit respectively
* @param {string} teamId
* @param {string | null} displayName
* @param {number} page
* @param {number} pageSize
* @returns {Promise<Array<O365TeamChannel>>} the list of O365 Team Channels
*/
/* istanbul ignore next: autogenerated */
async getTeamChannels(teamId: string, displayName: string | null = null, page?: number,
pageSize?: number): Promise<Array<O365TeamChannel>> {
return Iland.getHttp().get(`/o365-restore-sessions/${this.uuid}/teams/${teamId}/channels`, {
params: {
displayName: displayName,
page: page || 0,
pageSize: pageSize || 50
}
}).then((response) => {
const json = response.data.data as Array<O365TeamChannelJson>;
return json.map((it) => new O365TeamChannel(it));
});
}

/**
* Get O365 Team Files
* Proxying directly to vbo: page and pageSize are used as offset and limit respectively
* @param {string} teamId
* @param {string | null} channelId
* @param {string | null} parentId can be id of a file (folder) in which more files can be retrieved from
* @param {number} page
* @param {number} pageSize
* @returns {Promise<Array<O365TeamFile>>} the list of O365 Team files
*/
/* istanbul ignore next: autogenerated */
async getTeamFiles(teamId: string, channelId: string | null = null, parentId: string | null = null, page?: number,
pageSize?: number): Promise<Array<O365TeamFile>> {
return Iland.getHttp().get(`/o365-restore-sessions/${this.uuid}/teams/${teamId}/files`, {
params: {
channelId: channelId,
parentId: parentId,
page: page || 0,
pageSize: pageSize || 50
}
}).then((response) => {
const json = response.data.data as Array<O365TeamFileJson>;
return json.map((it) => new O365TeamFile(it));
});
}

/**
* Get O365 Team Posts
* Proxying directly to vbo: page and pageSize are used as offset and limit respectively
* @param {string} teamId
* @param {string | null} channelId
* @param {string | null} parentId can be id of a post in which more posts can be retrieved from
* @param {number} page
* @param {number} pageSize
* @returns {Promise<Array<O365TeamPost>>} the list of O365 Team posts
*/
/* istanbul ignore next: autogenerated */
async getTeamPosts(teamId: string, channelId: string | null = null, parentId: string | null = null, page?: number,
pageSize?: number): Promise<Array<O365TeamPost>> {
return Iland.getHttp().get(`/o365-restore-sessions/${this.uuid}/teams/${teamId}/posts`, {
params: {
channelId: channelId,
parentId: parentId,
page: page || 0,
pageSize: pageSize || 50
}
}).then((response) => {
const json = response.data.data as Array<O365TeamPostJson>;
return json.map((it) => new O365TeamPost(it));
});
}

/**
* Get O365 Team Channel Tabs
* Proxying directly to vbo: page and pageSize are used as offset and limit respectively
* @param {string} teamId
* @param {string} channelId
* @param {number} page
* @param {number} pageSize
* @returns {Promise<Array<O365TeamTab>>} the list of O365 Team channel tabs
*/
/* istanbul ignore next: autogenerated */
async getTeamChannelTabs(teamId: string, channelId: string, page?: number,
pageSize?: number): Promise<Array<O365TeamTab>> {
return Iland.getHttp().get(`/o365-restore-sessions/${this.uuid}/teams/${teamId}/channels/${channelId}/tabs`, {
params: {
channelId: channelId,
page: page || 0,
pageSize: pageSize || 50
}
}).then((response) => {
const json = response.data.data as Array<O365TeamTabJson>;
return json.map((it) => new O365TeamTab(it));
});
}

}
43 changes: 43 additions & 0 deletions src/sdk/model/o365/o365-team-channel.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { O365TeamChannelJson } from './__json__/o365-team-channel-json';

/**
* O365 Team Channel
*/
/* istanbul ignore next: autogenerated */
export class O365TeamChannel {

constructor(private _json: O365TeamChannelJson) {
}

/**
* Get the native id of the Team channel
* @returns {string}
*/
get nativeId(): string {
return this._json.native_id;
}

/**
* Get the display name of the Team channel
* @returns {string}
*/
get displayName(): string {
return this._json.display_name;
}

/**
* Get the json representation of this class.
* @returns {O365TeamChannelJson}
*/
get json(): O365TeamChannelJson {
return Object.assign({}, this._json);
}

/**
* Get the string representation of this class.
* @returns {string}
*/
toString(): string {
return JSON.stringify(this._json, undefined, 2);
}
}
83 changes: 83 additions & 0 deletions src/sdk/model/o365/o365-team-file.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
import { O365TeamFileJson } from './__json__/o365-team-file-json';

/**
* O365 Team File
*/
/* istanbul ignore next: autogenerated */
export class O365TeamFile {

constructor(private _json: O365TeamFileJson) {
}

/**
* Get the native id of the Team file
* @returns {string}
*/
get nativeId(): string {
return this._json.native_id;
}

/**
* Get the name of the Team file
* @returns {string}
*/
get name(): string {
return this._json.name;
}

/**
* Get the name of the user who performed the latest modification of the file
* @returns {string}
*/
get modifiedBy(): string {
return this._json.modified_by;
}

/**
* Get the Date and time of the last modification of the file
* @returns {number}
*/
get modified(): number {
return this._json.modified;
}

/**
* Get the file size.
* @returns {number}
*/
get sizeBytes(): number {
return this._json.size_bytes;
}

/**
* Get the type of the Microsoft Teams item.
* @returns {string}
*/
get type(): string {
return this._json.type;
}

/**
* Get the version of the file in the backup.
* @returns {string}
*/
get version(): string {
return this._json.version;
}

/**
* Get the json representation of this class.
* @returns {O365TeamFileJson}
*/
get json(): O365TeamFileJson {
return Object.assign({}, this._json);
}

/**
* Get the string representation of this class.
* @returns {string}
*/
toString(): string {
return JSON.stringify(this._json, undefined, 2);
}
}
75 changes: 75 additions & 0 deletions src/sdk/model/o365/o365-team-post.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
import { O365TeamPostJson } from './__json__/o365-team-post-json';

/**
* O365 Team Post
*/
/* istanbul ignore next: autogenerated */
export class O365TeamPost {

constructor(private _json: O365TeamPostJson) {
}

/**
* Get the user name of the author of the post
* @returns {string}
*/
get author(): string {
return this._json.author;
}

/**
* Get date and time when the post was created
* @returns {number}
*/
get createdTime(): number {
return this._json.created_time;
}

/**
* Get whether the post is marked as important
* @returns {boolean}
*/
get isImportant(): boolean {
return this._json.is_important;
}

/**
* Get the date and time of the latest modification of the post
* @returns {number}
*/
get lastModificationTime(): number {
return this._json.last_modification_time;
}

/**
* Get the native VBO id for this post
* @returns {string}
*/
get nativeId(): string {
return this._json.native_id;
}

/**
* Get the Subject of the post
* @returns {string}
*/
get subject(): string {
return this._json.subject;
}

/**
* Get the json representation of this class.
* @returns {O365TeamPostJson}
*/
get json(): O365TeamPostJson {
return Object.assign({}, this._json);
}

/**
* Get the string representation of this class.
* @returns {string}
*/
toString(): string {
return JSON.stringify(this._json, undefined, 2);
}
}
Loading