@ckeditor/ckeditor-cloud-services-collaboration 55.1.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/index.d.ts +2 -0
- package/dist/revision-history/messages/revisionhistorygetlatestrevisionmessage.d.ts +18 -0
- 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/version.d.ts +1 -1
- package/package.json +1 -1
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 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
|
+
}
|
|
@@ -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
|
*/
|