@atlaskit/collab-provider 9.7.0 → 9.7.1
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/CHANGELOG.md +6 -0
- package/dist/cjs/disconnected-reason-mapper.js +8 -17
- package/dist/cjs/errors/error-code-mapper.js +13 -12
- package/dist/cjs/errors/error-types.js +2 -95
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/types.js +1 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/disconnected-reason-mapper.js +2 -9
- package/dist/es2019/errors/error-code-mapper.js +2 -1
- package/dist/es2019/errors/error-types.js +0 -94
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/types.js +1 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/disconnected-reason-mapper.js +2 -9
- package/dist/esm/errors/error-code-mapper.js +2 -1
- package/dist/esm/errors/error-types.js +0 -94
- package/dist/esm/index.js +1 -1
- package/dist/esm/types.js +1 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/channel.d.ts +2 -1
- package/dist/types/disconnected-reason-mapper.d.ts +1 -8
- package/dist/types/document/document-service.d.ts +3 -2
- package/dist/types/errors/error-code-mapper.d.ts +2 -1
- package/dist/types/errors/error-types.d.ts +0 -190
- package/dist/types/helpers/const.d.ts +1 -1
- package/dist/types/index.d.ts +3 -3
- package/dist/types/metadata/metadata-service.d.ts +1 -1
- package/dist/types/participants/participants-helper.d.ts +2 -6
- package/dist/types/participants/participants-service.d.ts +3 -2
- package/dist/types/participants/participants-state.d.ts +2 -1
- package/dist/types/participants/telepointers-helper.d.ts +2 -2
- package/dist/types/provider/commit-step.d.ts +2 -1
- package/dist/types/provider/index.d.ts +3 -3
- package/dist/types/socket-io-provider.d.ts +1 -1
- package/dist/types/types.d.ts +2 -149
- package/dist/types-ts4.5/channel.d.ts +2 -1
- package/dist/types-ts4.5/disconnected-reason-mapper.d.ts +1 -8
- package/dist/types-ts4.5/document/document-service.d.ts +3 -2
- package/dist/types-ts4.5/errors/error-code-mapper.d.ts +2 -1
- package/dist/types-ts4.5/errors/error-types.d.ts +0 -190
- package/dist/types-ts4.5/helpers/const.d.ts +1 -1
- package/dist/types-ts4.5/index.d.ts +3 -3
- package/dist/types-ts4.5/metadata/metadata-service.d.ts +1 -1
- package/dist/types-ts4.5/participants/participants-helper.d.ts +2 -6
- package/dist/types-ts4.5/participants/participants-service.d.ts +3 -2
- package/dist/types-ts4.5/participants/participants-state.d.ts +2 -1
- package/dist/types-ts4.5/participants/telepointers-helper.d.ts +2 -2
- package/dist/types-ts4.5/provider/commit-step.d.ts +2 -1
- package/dist/types-ts4.5/provider/index.d.ts +3 -3
- package/dist/types-ts4.5/socket-io-provider.d.ts +1 -1
- package/dist/types-ts4.5/types.d.ts +2 -149
- package/package.json +2 -1
- package/report.api.md +49 -390
- package/tmp/api-report-tmp.d.ts +257 -0
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
## API Report File for "@atlaskit/collab-provider"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
import type { AnalyticsWebClient } from '@atlaskit/analytics-listeners';
|
|
8
|
+
import { CollabConnectedPayload } from '@atlaskit/editor-common/collab';
|
|
9
|
+
import { CollabDataPayload } from '@atlaskit/editor-common/collab';
|
|
10
|
+
import { CollabDisconnectedPayload } from '@atlaskit/editor-common/collab';
|
|
11
|
+
import { CollabEditProvider } from '@atlaskit/editor-common/collab';
|
|
12
|
+
import { CollabEventConnectingData } from '@atlaskit/editor-common/collab';
|
|
13
|
+
import { CollabEventConnectionData } from '@atlaskit/editor-common/collab';
|
|
14
|
+
import { CollabEventInitData } from '@atlaskit/editor-common/collab';
|
|
15
|
+
import { CollabEventPresenceData } from '@atlaskit/editor-common/collab';
|
|
16
|
+
import { CollabEventRemoteData } from '@atlaskit/editor-common/collab';
|
|
17
|
+
import { CollabEvents } from '@atlaskit/editor-common/collab';
|
|
18
|
+
import { CollabEventTelepointerData } from '@atlaskit/editor-common/collab';
|
|
19
|
+
import { CollabInitPayload } from '@atlaskit/editor-common/collab';
|
|
20
|
+
import { CollabLocalStepsPayload } from '@atlaskit/editor-common/collab';
|
|
21
|
+
import { CollabMetadataPayload } from '@atlaskit/editor-common/collab';
|
|
22
|
+
import { CollabParticipant } from '@atlaskit/editor-common/collab';
|
|
23
|
+
import { CollabPresencePayload } from '@atlaskit/editor-common/collab';
|
|
24
|
+
import { CollabSendableSelection } from '@atlaskit/editor-common/collab';
|
|
25
|
+
import { CollabTelepointerPayload } from '@atlaskit/editor-common/collab';
|
|
26
|
+
import type { EditorState } from 'prosemirror-state';
|
|
27
|
+
import { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
28
|
+
import type { Manager } from 'socket.io-client';
|
|
29
|
+
import type { Metadata as Metadata_2 } from '@atlaskit/editor-common/collab';
|
|
30
|
+
import { NewCollabSyncUpErrorAttributes } from '@atlaskit/editor-common/collab';
|
|
31
|
+
import { PROVIDER_ERROR_CODE } from '@atlaskit/editor-common/collab';
|
|
32
|
+
import { ProviderError } from '@atlaskit/editor-common/collab';
|
|
33
|
+
import { ProviderParticipant } from '@atlaskit/editor-common/collab';
|
|
34
|
+
import { ResolvedEditorState } from '@atlaskit/editor-common/collab';
|
|
35
|
+
import type { Step } from 'prosemirror-transform';
|
|
36
|
+
import { SyncUpErrorFunction } from '@atlaskit/editor-common/collab';
|
|
37
|
+
import type { Transaction } from 'prosemirror-state';
|
|
38
|
+
|
|
39
|
+
// @public (undocumented)
|
|
40
|
+
type AuthCallback = (cb: (data: InitAndAuthData) => void) => void;
|
|
41
|
+
|
|
42
|
+
// @public (undocumented)
|
|
43
|
+
type BaseEvents = Pick<CollabEditProvider<CollabEvents>, 'send' | 'sendMessage' | 'setup'>;
|
|
44
|
+
|
|
45
|
+
export { CollabConnectedPayload }
|
|
46
|
+
|
|
47
|
+
export { CollabDataPayload }
|
|
48
|
+
|
|
49
|
+
export { CollabDisconnectedPayload }
|
|
50
|
+
|
|
51
|
+
export { CollabEditProvider }
|
|
52
|
+
|
|
53
|
+
export { CollabEventConnectingData }
|
|
54
|
+
|
|
55
|
+
export { CollabEventConnectionData }
|
|
56
|
+
|
|
57
|
+
// @public (undocumented)
|
|
58
|
+
export interface CollabEventDisconnectedData {
|
|
59
|
+
// (undocumented)
|
|
60
|
+
reason: 'CLIENT_DISCONNECT' | 'SERVER_DISCONNECT' | 'SOCKET_CLOSED' | 'SOCKET_ERROR' | 'SOCKET_TIMEOUT' | 'UNKNOWN_DISCONNECT';
|
|
61
|
+
// (undocumented)
|
|
62
|
+
sid: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export { CollabEventInitData }
|
|
66
|
+
|
|
67
|
+
// @public (undocumented)
|
|
68
|
+
export interface CollabEventLocalStepData {
|
|
69
|
+
// (undocumented)
|
|
70
|
+
steps: Array<Step>;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export { CollabEventPresenceData }
|
|
74
|
+
|
|
75
|
+
export { CollabEventRemoteData }
|
|
76
|
+
|
|
77
|
+
export { CollabEvents }
|
|
78
|
+
|
|
79
|
+
export { CollabEventTelepointerData }
|
|
80
|
+
|
|
81
|
+
export { CollabInitPayload }
|
|
82
|
+
|
|
83
|
+
export { CollabLocalStepsPayload }
|
|
84
|
+
|
|
85
|
+
export { CollabMetadataPayload }
|
|
86
|
+
|
|
87
|
+
export { CollabParticipant }
|
|
88
|
+
|
|
89
|
+
export { CollabPresencePayload }
|
|
90
|
+
|
|
91
|
+
export { CollabSendableSelection }
|
|
92
|
+
|
|
93
|
+
export { CollabTelepointerPayload }
|
|
94
|
+
|
|
95
|
+
// @public (undocumented)
|
|
96
|
+
interface Config {
|
|
97
|
+
analyticsClient?: AnalyticsWebClient;
|
|
98
|
+
// (undocumented)
|
|
99
|
+
cacheToken?: boolean;
|
|
100
|
+
// (undocumented)
|
|
101
|
+
createSocket: (path: string, auth?: AuthCallback | InitAndAuthData, productInfo?: ProductInformation) => Socket;
|
|
102
|
+
// (undocumented)
|
|
103
|
+
documentAri: string;
|
|
104
|
+
enableErrorOnFailedDocumentApply?: boolean;
|
|
105
|
+
failedStepLimitBeforeCatchupOnPublish?: number;
|
|
106
|
+
// (undocumented)
|
|
107
|
+
featureFlags?: {
|
|
108
|
+
[key: string]: boolean;
|
|
109
|
+
};
|
|
110
|
+
// (undocumented)
|
|
111
|
+
getAnalyticsWebClient?: Promise<AnalyticsWebClient>;
|
|
112
|
+
// (undocumented)
|
|
113
|
+
getUser?: GetUserType;
|
|
114
|
+
// (undocumented)
|
|
115
|
+
initialDraft?: InitialDraft;
|
|
116
|
+
// (undocumented)
|
|
117
|
+
lifecycle?: Lifecycle;
|
|
118
|
+
// (undocumented)
|
|
119
|
+
need404?: boolean;
|
|
120
|
+
permissionTokenRefresh?: () => Promise<null | string>;
|
|
121
|
+
// (undocumented)
|
|
122
|
+
productInfo?: ProductInformation;
|
|
123
|
+
// (undocumented)
|
|
124
|
+
storage?: Storage_2;
|
|
125
|
+
throwOnNotConnected?: boolean;
|
|
126
|
+
// (undocumented)
|
|
127
|
+
url: string;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// @public (undocumented)
|
|
131
|
+
class Emitter<T = any> {
|
|
132
|
+
protected emit<K extends keyof T>(evt: K, data: T[K]): this;
|
|
133
|
+
off<K extends keyof T>(evt: K, handler: (args: T[K]) => void): this;
|
|
134
|
+
on<K extends keyof T>(evt: K, handler: (args: T[K]) => void): this;
|
|
135
|
+
unsubscribeAll<K extends keyof T>(evt?: K): this;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// @public (undocumented)
|
|
139
|
+
type EventHandler = () => void;
|
|
140
|
+
|
|
141
|
+
// @public (undocumented)
|
|
142
|
+
type GetUserType = ((userId: string) => Promise<Pick<ProviderParticipant, 'avatar' | 'email' | 'name' | 'userId'>>) | undefined;
|
|
143
|
+
|
|
144
|
+
// @public (undocumented)
|
|
145
|
+
interface InitAndAuthData {
|
|
146
|
+
// (undocumented)
|
|
147
|
+
initialized: boolean;
|
|
148
|
+
// (undocumented)
|
|
149
|
+
need404?: boolean;
|
|
150
|
+
// (undocumented)
|
|
151
|
+
token?: string;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// @public (undocumented)
|
|
155
|
+
interface InitialDraft {
|
|
156
|
+
// (undocumented)
|
|
157
|
+
document: JSONDocNode;
|
|
158
|
+
// (undocumented)
|
|
159
|
+
metadata?: Metadata_2;
|
|
160
|
+
// (undocumented)
|
|
161
|
+
timestamp?: number;
|
|
162
|
+
// (undocumented)
|
|
163
|
+
version: number;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// @public (undocumented)
|
|
167
|
+
interface Lifecycle {
|
|
168
|
+
// (undocumented)
|
|
169
|
+
on(event: LifecycleEvents, handler: EventHandler): void;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// @public (undocumented)
|
|
173
|
+
type LifecycleEvents = 'restore' | 'save';
|
|
174
|
+
|
|
175
|
+
export { NewCollabSyncUpErrorAttributes }
|
|
176
|
+
|
|
177
|
+
// @public (undocumented)
|
|
178
|
+
type ProductInformation = {
|
|
179
|
+
product: string;
|
|
180
|
+
subProduct?: string;
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
// @public (undocumented)
|
|
184
|
+
export class Provider extends Emitter<CollabEvents> implements BaseEvents {
|
|
185
|
+
constructor(config: Config);
|
|
186
|
+
destroy(): this;
|
|
187
|
+
// @deprecated
|
|
188
|
+
disconnect(): this;
|
|
189
|
+
getCurrentState: () => Promise<ResolvedEditorState>;
|
|
190
|
+
getFinalAcknowledgedState: () => Promise<ResolvedEditorState>;
|
|
191
|
+
getMetadata: () => Metadata_2;
|
|
192
|
+
// (undocumented)
|
|
193
|
+
getParticipants: () => ProviderParticipant[];
|
|
194
|
+
// (undocumented)
|
|
195
|
+
getUnconfirmedSteps: () => readonly Step[] | undefined;
|
|
196
|
+
// @deprecated
|
|
197
|
+
initialize(getState: () => EditorState): this;
|
|
198
|
+
// (undocumented)
|
|
199
|
+
resolveOnSetupPromise: (value: PromiseLike<void> | void) => void;
|
|
200
|
+
send(_tr: Transaction | null, _oldState: EditorState | null, newState: EditorState): void;
|
|
201
|
+
sendMessage(data: CollabTelepointerPayload): void;
|
|
202
|
+
// @deprecated
|
|
203
|
+
setEditorWidth(editorWidth: string, broadcast?: boolean): void;
|
|
204
|
+
setMetadata(metadata: Metadata_2): void;
|
|
205
|
+
// @deprecated
|
|
206
|
+
setTitle(title: string, broadcast?: boolean): void;
|
|
207
|
+
setup({ getState, onSyncUpError, }: {
|
|
208
|
+
getState?: () => EditorState;
|
|
209
|
+
onSyncUpError?: SyncUpErrorFunction;
|
|
210
|
+
}): this;
|
|
211
|
+
// @deprecated
|
|
212
|
+
unsubscribeAll(): this;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export { PROVIDER_ERROR_CODE }
|
|
216
|
+
|
|
217
|
+
export { ProviderError }
|
|
218
|
+
|
|
219
|
+
export { ProviderParticipant }
|
|
220
|
+
|
|
221
|
+
export { ResolvedEditorState }
|
|
222
|
+
|
|
223
|
+
// @public (undocumented)
|
|
224
|
+
interface SimpleEventEmitter {
|
|
225
|
+
// (undocumented)
|
|
226
|
+
on(event: string, fn: Function): SimpleEventEmitter;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// @public (undocumented)
|
|
230
|
+
export interface Socket extends SimpleEventEmitter {
|
|
231
|
+
// (undocumented)
|
|
232
|
+
close(): Socket;
|
|
233
|
+
// (undocumented)
|
|
234
|
+
connect(): Socket;
|
|
235
|
+
// (undocumented)
|
|
236
|
+
emit(event: string, ...args: any[]): Socket;
|
|
237
|
+
// (undocumented)
|
|
238
|
+
id: string;
|
|
239
|
+
// (undocumented)
|
|
240
|
+
io?: Manager;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
// @public (undocumented)
|
|
244
|
+
interface Storage_2 {
|
|
245
|
+
// (undocumented)
|
|
246
|
+
delete(key: string): Promise<void>;
|
|
247
|
+
// (undocumented)
|
|
248
|
+
get(key: string): Promise<string>;
|
|
249
|
+
// (undocumented)
|
|
250
|
+
set(key: string, value: string): Promise<void>;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export { SyncUpErrorFunction }
|
|
254
|
+
|
|
255
|
+
// (No @packageDocumentation comment for this package)
|
|
256
|
+
|
|
257
|
+
```
|