@ckeditor/ckeditor-cloud-services-collaboration 55.0.0 → 55.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/comments-v2/descriptors/connectdetailsdescriptor.d.ts +14 -0
- package/dist/comments-v2/messages/connectmessage.d.ts +4 -1
- package/dist/comments-v2/responses/connectresponse.d.ts +4 -1
- package/dist/index.d.ts +2 -0
- package/dist/revision-history/descriptors/connectdetailsdescriptor.d.ts +18 -0
- package/dist/revision-history/messages/revisionhistoryconnectmessage.d.ts +4 -1
- package/dist/revision-history/messages/revisionhistorygetlatestrevisionmessage.d.ts +18 -0
- package/dist/revision-history/responses/revisionhistoryconnectresponse.d.ts +15 -1
- package/dist/revision-history/responses/revisionhistorygetlatestrevisionresponse.d.ts +31 -0
- package/dist/revision-history/revisionhistoryservice.d.ts +9 -0
- package/dist/services.js +19 -19
- package/dist/track-changes/descriptors/connectdetailsdescriptor.d.ts +14 -0
- package/dist/track-changes/messages/connectmessage.d.ts +4 -1
- package/dist/track-changes/responses/connectresponse.d.ts +4 -1
- package/dist/users/descriptors/userdescriptor.d.ts +5 -0
- package/dist/users/responses/getmanyusersresponse.d.ts +2 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (c), CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import Descriptor, { type IDescriptorBody } from './../../descriptor';
|
|
5
|
+
export interface ICommentsConnectDetails {
|
|
6
|
+
/**
|
|
7
|
+
* Requests the authors of the comments.
|
|
8
|
+
*/
|
|
9
|
+
includeUsers?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export default class ConnectDetailsDescriptor extends Descriptor {
|
|
12
|
+
static readonly DESCRIPTOR_NAME: string;
|
|
13
|
+
static readonly DESCRIPTOR: IDescriptorBody;
|
|
14
|
+
}
|
|
@@ -3,16 +3,19 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import Message, { type IMessage } from './../../message';
|
|
5
5
|
import type { IDescriptorBody } from '../../descriptor';
|
|
6
|
+
import type { ICommentsConnectDetails } from '../descriptors/connectdetailsdescriptor';
|
|
6
7
|
export interface IConnectMessage extends IMessage {
|
|
7
8
|
documentId: string;
|
|
9
|
+
details?: ICommentsConnectDetails;
|
|
8
10
|
}
|
|
9
11
|
export default class ConnectMessage extends Message {
|
|
10
12
|
readonly documentId: string;
|
|
13
|
+
readonly details?: ICommentsConnectDetails | undefined;
|
|
11
14
|
static readonly TYPE: string;
|
|
12
15
|
static readonly READABLE_TYPE_NAME: string;
|
|
13
16
|
static readonly DESCRIPTOR_NAME: string;
|
|
14
17
|
static readonly DESCRIPTOR: IDescriptorBody;
|
|
15
|
-
constructor(documentId: string);
|
|
18
|
+
constructor(documentId: string, details?: ICommentsConnectDetails | undefined);
|
|
16
19
|
toJSON(): IConnectMessage;
|
|
17
20
|
static fromJSON(object: IConnectMessage): ConnectMessage;
|
|
18
21
|
}
|
|
@@ -4,19 +4,22 @@
|
|
|
4
4
|
import Message, { type IMessage } from './../../message';
|
|
5
5
|
import type { IDescriptorBody } from '../../descriptor';
|
|
6
6
|
import { type IThread, type IThreadJSON } from '../descriptors/commentsthreaddescriptor';
|
|
7
|
+
import { type IUserJSON } from '../../users/descriptors/userdescriptor';
|
|
7
8
|
export interface IConnectResponse extends IMessage {
|
|
8
9
|
channel: string;
|
|
9
10
|
threads?: string[];
|
|
10
11
|
threadsV2?: IThreadJSON[];
|
|
12
|
+
users?: IUserJSON[];
|
|
11
13
|
}
|
|
12
14
|
export default class ConnectResponse extends Message {
|
|
13
15
|
readonly channel: string;
|
|
14
16
|
private readonly _threads?;
|
|
15
17
|
private readonly _threadsV2?;
|
|
18
|
+
readonly users?: Record<string, unknown>[] | undefined;
|
|
16
19
|
readonly threads: IThread[];
|
|
17
20
|
static readonly DESCRIPTOR_NAME: string;
|
|
18
21
|
static readonly DESCRIPTOR: IDescriptorBody;
|
|
19
|
-
constructor(channel: string, _threads?: IThread[] | undefined, _threadsV2?: IThread[] | undefined);
|
|
22
|
+
constructor(channel: string, _threads?: IThread[] | undefined, _threadsV2?: IThread[] | undefined, users?: Record<string, unknown>[] | undefined);
|
|
20
23
|
toJSON(): IConnectResponse;
|
|
21
24
|
static fromJSON(object: IConnectResponse): ConnectResponse;
|
|
22
25
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -57,9 +57,11 @@ export { default as RevisionHistoryConnectMessage } from './revision-history/mes
|
|
|
57
57
|
export { default as RevisionHistoryReconnectMessage } from './revision-history/messages/revisionhistoryreconnectmessage';
|
|
58
58
|
export { default as RevisionHistoryGetRevisionMessage } from './revision-history/messages/revisionhistorygetrevisionmessage';
|
|
59
59
|
export { default as RevisionHistoryUpdateRevisionsMessage } from './revision-history/messages/revisionhistoryupdaterevisionsmessage';
|
|
60
|
+
export { default as RevisionHistoryGetLatestRevisionMessage } from './revision-history/messages/revisionhistorygetlatestrevisionmessage';
|
|
60
61
|
export { default as RevisionHistoryConnectResponse } from './revision-history/responses/revisionhistoryconnectresponse';
|
|
61
62
|
export { default as RevisionHistoryGetRevisionResponse } from './revision-history/responses/revisionhistorygetrevisionresponse';
|
|
62
63
|
export { default as RevisionHistoryUpdateRevisionsResponse } from './revision-history/responses/revisionhistoryupdaterevisionsresponse';
|
|
64
|
+
export { default as RevisionHistoryGetLatestRevisionResponse } from './revision-history/responses/revisionhistorygetlatestrevisionresponse';
|
|
63
65
|
export type { IRevision } from './revision-history/descriptors/revisiondescriptor';
|
|
64
66
|
export type { IRevisionObject } from './revision-history/revision';
|
|
65
67
|
export { default as IsEditorBundleUploadedResponse, type IIsEditorBundleUploadedResponse } from './editor/responses/iseditorbundleuploadedresponse';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (c), CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import Descriptor, { type IDescriptorBody } from './../../descriptor';
|
|
5
|
+
export interface IRevisionHistoryConnectDetails {
|
|
6
|
+
/**
|
|
7
|
+
* Requests the users of the `creatorId` and `authorsIds` of all revisions.
|
|
8
|
+
*/
|
|
9
|
+
includeUsers?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Requests the latest revision with its `diffData`.
|
|
12
|
+
*/
|
|
13
|
+
includeLatestRevision?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export default class ConnectDetailsDescriptor extends Descriptor {
|
|
16
|
+
static readonly DESCRIPTOR_NAME: string;
|
|
17
|
+
static readonly DESCRIPTOR: IDescriptorBody;
|
|
18
|
+
}
|
|
@@ -3,16 +3,19 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import Message, { type IMessage } from './../../message';
|
|
5
5
|
import type { IDescriptorBody } from '../../descriptor';
|
|
6
|
+
import type { IRevisionHistoryConnectDetails } from '../descriptors/connectdetailsdescriptor';
|
|
6
7
|
export interface IRevisionHistoryConnectMessage extends IMessage {
|
|
7
8
|
documentId: string;
|
|
9
|
+
details?: IRevisionHistoryConnectDetails;
|
|
8
10
|
}
|
|
9
11
|
export default class RevisionHistoryConnectMessage extends Message {
|
|
10
12
|
readonly documentId: string;
|
|
13
|
+
readonly details?: IRevisionHistoryConnectDetails | undefined;
|
|
11
14
|
static readonly TYPE: string;
|
|
12
15
|
static readonly READABLE_TYPE_NAME: string;
|
|
13
16
|
static readonly DESCRIPTOR_NAME: string;
|
|
14
17
|
static readonly DESCRIPTOR: IDescriptorBody;
|
|
15
|
-
constructor(documentId: string);
|
|
18
|
+
constructor(documentId: string, details?: IRevisionHistoryConnectDetails | undefined);
|
|
16
19
|
toJSON(): IRevisionHistoryConnectMessage;
|
|
17
20
|
static fromJSON(object: IRevisionHistoryConnectMessage): RevisionHistoryConnectMessage;
|
|
18
21
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (c), CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import Message, { type IMessage } from './../../message';
|
|
5
|
+
import type { IDescriptorBody } from '../../descriptor';
|
|
6
|
+
export interface IRevisionHistoryGetLatestRevisionMessage extends IMessage {
|
|
7
|
+
documentId: string;
|
|
8
|
+
}
|
|
9
|
+
export default class RevisionHistoryGetLatestRevisionMessage extends Message {
|
|
10
|
+
readonly documentId: string;
|
|
11
|
+
static readonly TYPE: string;
|
|
12
|
+
static readonly READABLE_TYPE_NAME: string;
|
|
13
|
+
static readonly DESCRIPTOR_NAME: string;
|
|
14
|
+
static readonly DESCRIPTOR: IDescriptorBody;
|
|
15
|
+
constructor(documentId: string);
|
|
16
|
+
toJSON(): IRevisionHistoryGetLatestRevisionMessage;
|
|
17
|
+
static fromJSON(object: IRevisionHistoryGetLatestRevisionMessage): RevisionHistoryGetLatestRevisionMessage;
|
|
18
|
+
}
|
|
@@ -5,23 +5,37 @@ import Message, { type IMessage } from './../../message';
|
|
|
5
5
|
import type { IDescriptorBody } from '../../descriptor';
|
|
6
6
|
import { type IRevision, type IRevisionJSON } from '../descriptors/revisiondescriptor';
|
|
7
7
|
import type { IRevisionObject } from '../revision';
|
|
8
|
+
import { type IUserJSON } from '../../users/descriptors/userdescriptor';
|
|
8
9
|
export interface IRevisionHistoryConnectResponseJSON extends IMessage {
|
|
9
10
|
channel: string;
|
|
10
11
|
requestId: number;
|
|
11
12
|
revisions: IRevisionJSON[];
|
|
13
|
+
users?: IUserJSON[];
|
|
14
|
+
latestRevision?: IRevisionJSON;
|
|
12
15
|
}
|
|
13
16
|
export interface IRevisionHistoryConnectResponseObject {
|
|
14
17
|
channel: string;
|
|
15
18
|
requestId: number;
|
|
16
19
|
revisions: IRevisionObject[];
|
|
20
|
+
users?: Record<string, unknown>[];
|
|
21
|
+
latestRevision?: IRevisionObject;
|
|
17
22
|
}
|
|
18
23
|
export default class RevisionHistoryConnectResponse extends Message {
|
|
19
24
|
readonly channel: string;
|
|
20
25
|
readonly requestId: number;
|
|
21
26
|
readonly revisions: IRevision[];
|
|
27
|
+
readonly users?: Record<string, unknown>[] | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* The last revision of {@link #revisions}, with its `diffData`.
|
|
30
|
+
*/
|
|
31
|
+
readonly latestRevision?: IRevision | undefined;
|
|
22
32
|
static readonly DESCRIPTOR_NAME: string;
|
|
23
33
|
static readonly DESCRIPTOR: IDescriptorBody;
|
|
24
|
-
constructor(channel: string, requestId: number, revisions: IRevision[]
|
|
34
|
+
constructor(channel: string, requestId: number, revisions: IRevision[], users?: Record<string, unknown>[] | undefined,
|
|
35
|
+
/**
|
|
36
|
+
* The last revision of {@link #revisions}, with its `diffData`.
|
|
37
|
+
*/
|
|
38
|
+
latestRevision?: IRevision | undefined);
|
|
25
39
|
toJSON(): IRevisionHistoryConnectResponseJSON;
|
|
26
40
|
/**
|
|
27
41
|
* Creates frontend revision history model from message sent from the backend.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (c), CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import Message, { type IMessage } from './../../message';
|
|
5
|
+
import type { IDescriptorBody } from '../../descriptor';
|
|
6
|
+
import { type IRevision, type IRevisionJSON } from '../descriptors/revisiondescriptor';
|
|
7
|
+
import type { IRevisionObject } from '../revision';
|
|
8
|
+
export interface IRevisionHistoryGetLatestRevisionResponseJSON extends IMessage {
|
|
9
|
+
latestRevision?: IRevisionJSON;
|
|
10
|
+
}
|
|
11
|
+
export default class RevisionHistoryGetLatestRevisionResponse extends Message {
|
|
12
|
+
/**
|
|
13
|
+
* The latest revision of the document, with its `diffData`. It is missing when the document has no revisions.
|
|
14
|
+
*/
|
|
15
|
+
readonly latestRevision?: IRevision | undefined;
|
|
16
|
+
static readonly DESCRIPTOR_NAME: string;
|
|
17
|
+
static readonly DESCRIPTOR: IDescriptorBody;
|
|
18
|
+
constructor(
|
|
19
|
+
/**
|
|
20
|
+
* The latest revision of the document, with its `diffData`. It is missing when the document has no revisions.
|
|
21
|
+
*/
|
|
22
|
+
latestRevision?: IRevision | undefined);
|
|
23
|
+
toJSON(): IRevisionHistoryGetLatestRevisionResponseJSON;
|
|
24
|
+
/**
|
|
25
|
+
* Creates frontend revision model from message sent from the backend.
|
|
26
|
+
*
|
|
27
|
+
* This method is intended to be used on the frontend side after receiving the response from the backend.
|
|
28
|
+
*/
|
|
29
|
+
toObject(): IRevisionObject | undefined;
|
|
30
|
+
static fromJSON(json: IRevisionHistoryGetLatestRevisionResponseJSON): RevisionHistoryGetLatestRevisionResponse;
|
|
31
|
+
}
|
|
@@ -55,6 +55,15 @@ declare class RevisionHistoryService extends /* #__PURE__ -- @preserve */ Revisi
|
|
|
55
55
|
* Thrown in the case of errors on the backend side.
|
|
56
56
|
*/
|
|
57
57
|
getRevision(revisionId: string): Promise<IRevisionObject>;
|
|
58
|
+
/**
|
|
59
|
+
* Returns the latest revision of the document, with its `diffData`, or `undefined` when the document has no revisions.
|
|
60
|
+
*
|
|
61
|
+
* The service does not have to be connected, so the editor can build the initial data before it connects anything.
|
|
62
|
+
*
|
|
63
|
+
* @throws {@link CKEditorCloudServicesError}
|
|
64
|
+
* Thrown when the WebSocket Gateway is not connected, or in the case of errors on the backend side.
|
|
65
|
+
*/
|
|
66
|
+
getLatestRevision(wsGateway: IWebSocketGateway): Promise<IRevisionObject | undefined>;
|
|
58
67
|
/**
|
|
59
68
|
* Connects or reconnects to WebSocketGateway and starts listening on channel.
|
|
60
69
|
*/
|