@ckeditor/ckeditor-cloud-services-collaboration 55.0.0 → 55.1.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.
@@ -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
  }
@@ -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
  }
@@ -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.