/
IModifyCreator.ts
81 lines (73 loc) · 2.82 KB
/
IModifyCreator.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import { ILivechatMessage } from '../livechat';
import { IMessage } from '../messages';
import { IRoom } from '../rooms';
import { BlockBuilder } from '../uikit';
import { AppVideoConference } from '../videoConferences';
import { IDiscussionBuilder } from './IDiscussionBuilder';
import { ILivechatCreator } from './ILivechatCreator';
import { ILivechatMessageBuilder } from './ILivechatMessageBuilder';
import { IMessageBuilder } from './IMessageBuilder';
import { IRoomBuilder } from './IRoomBuilder';
import { IUploadCreator } from './IUploadCreator';
import { IVideoConferenceBuilder } from './IVideoConferenceBuilder';
export interface IModifyCreator {
/**
* Get the creator object responsible for the
* Livechat integrations
*/
getLivechatCreator(): ILivechatCreator;
/**
* Get the creator object responsible for the upload.
*/
getUploadCreator(): IUploadCreator;
/**
* Gets a new instance of a BlockBuilder
*/
getBlockBuilder(): BlockBuilder;
/**
* Starts the process for building a new message object.
*
* @param data (optional) the initial data to pass into the builder,
* the `id` property will be ignored
* @return an IMessageBuilder instance
*/
startMessage(data?: IMessage): IMessageBuilder;
/**
* Starts the process for building a new livechat message object.
*
* @param data (optional) the initial data to pass into the builder,
* the `id` property will be ignored
* @return an IMessageBuilder instance
*/
startLivechatMessage(data?: ILivechatMessage): ILivechatMessageBuilder;
/**
* Starts the process for building a new room.
*
* @param data (optional) the initial data to pass into the builder,
* the `id` property will be ignored
* @return an IRoomBuilder instance
*/
startRoom(data?: IRoom): IRoomBuilder;
/**
* Starts the process for building a new discussion.
*
* @param data (optional) the initial data to pass into the builder,
* the `id` property will be ignored
* @return an IDiscussionBuilder instance
*/
startDiscussion(data?: Partial<IRoom>): IDiscussionBuilder;
/**
* Starts the process for building a new video conference.
*
* @param data (optional) the initial data to pass into the builder,
* @return an IVideoConferenceBuilder instance
*/
startVideoConference(data?: Partial<AppVideoConference>): IVideoConferenceBuilder;
/**
* Finishes the creating process, saving the object to the database.
*
* @param builder the builder instance
* @return the resulting `id` of the resulting object
*/
finish(builder: IMessageBuilder | ILivechatMessageBuilder | IRoomBuilder | IDiscussionBuilder | IVideoConferenceBuilder): Promise<string>;
}