@atlaskit/collab-provider 20.0.15 → 20.0.17
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 +12 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +2 -2
- package/provider/package.json +1 -8
- package/socket-io-provider/package.json +1 -8
- package/types/package.json +1 -8
- package/version-wrapper/package.json +1 -8
- package/dist/types-ts4.5/analytics/analytics-helper.d.ts +0 -15
- package/dist/types-ts4.5/analytics/performance.d.ts +0 -16
- package/dist/types-ts4.5/analytics/ufo.d.ts +0 -3
- package/dist/types-ts4.5/api/api.d.ts +0 -24
- package/dist/types-ts4.5/api/null-api.d.ts +0 -5
- package/dist/types-ts4.5/channel.d.ts +0 -83
- package/dist/types-ts4.5/config.d.ts +0 -35
- package/dist/types-ts4.5/connectivity/network.d.ts +0 -17
- package/dist/types-ts4.5/connectivity/reconnect-helper.d.ts +0 -8
- package/dist/types-ts4.5/connectivity/singleton.d.ts +0 -3
- package/dist/types-ts4.5/disconnected-reason-mapper.d.ts +0 -9
- package/dist/types-ts4.5/document/catchupv2.d.ts +0 -12
- package/dist/types-ts4.5/document/document-service.d.ts +0 -195
- package/dist/types-ts4.5/document/getConflictChanges.d.ts +0 -24
- package/dist/types-ts4.5/document/interface-document-service.d.ts +0 -37
- package/dist/types-ts4.5/document/null-document-service.d.ts +0 -20
- package/dist/types-ts4.5/document/step-queue-state.d.ts +0 -16
- package/dist/types-ts4.5/emitter.d.ts +0 -19
- package/dist/types-ts4.5/entry-points/provider.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/socket-io-provider.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/types.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/version-wrapper.d.ts +0 -1
- package/dist/types-ts4.5/errors/custom-errors.d.ts +0 -56
- package/dist/types-ts4.5/errors/error-code-mapper.d.ts +0 -3
- package/dist/types-ts4.5/errors/internal-errors.d.ts +0 -110
- package/dist/types-ts4.5/errors/ncs-errors.d.ts +0 -184
- package/dist/types-ts4.5/feature-flags/index.d.ts +0 -9
- package/dist/types-ts4.5/feature-flags/types.d.ts +0 -13
- package/dist/types-ts4.5/helpers/const.d.ts +0 -324
- package/dist/types-ts4.5/helpers/utils.d.ts +0 -72
- package/dist/types-ts4.5/index.d.ts +0 -1
- package/dist/types-ts4.5/metadata/metadata-service.d.ts +0 -25
- package/dist/types-ts4.5/namespace/namespace-service.d.ts +0 -14
- package/dist/types-ts4.5/participants/participants-helper.d.ts +0 -35
- package/dist/types-ts4.5/participants/participants-service.d.ts +0 -200
- package/dist/types-ts4.5/participants/participants-state.d.ts +0 -27
- package/dist/types-ts4.5/participants/telepointers-helper.d.ts +0 -4
- package/dist/types-ts4.5/provider/commit-step.d.ts +0 -41
- package/dist/types-ts4.5/provider/get-offline-steps-length.d.ts +0 -4
- package/dist/types-ts4.5/provider/index.d.ts +0 -206
- package/dist/types-ts4.5/socket-io-provider.d.ts +0 -6
- package/dist/types-ts4.5/types.d.ts +0 -256
- package/dist/types-ts4.5/version-wrapper.d.ts +0 -3
|
@@ -1,324 +0,0 @@
|
|
|
1
|
-
import type { ProviderError } from '@atlaskit/editor-common/collab';
|
|
2
|
-
export declare enum EVENT_ACTION {
|
|
3
|
-
CONNECTION = "connection",// https://data-portal.internal.atlassian.com/analytics/registry/43970
|
|
4
|
-
CATCHUP = "catchup",// https://data-portal.internal.atlassian.com/analytics/registry/44016
|
|
5
|
-
DOCUMENT_INIT = "documentInit",// https://data-portal.internal.atlassian.com/analytics/registry/43971
|
|
6
|
-
ADD_STEPS = "addSteps",// https://data-portal.internal.atlassian.com/analytics/registry/43972
|
|
7
|
-
UPDATE_PARTICIPANTS = "updateParticipants",// https://data-portal.internal.atlassian.com/analytics/registry/45634
|
|
8
|
-
UPDATE_DOCUMENT = "updateDocument",// https://data-portal.internal.atlassian.com/analytics/registry/58213
|
|
9
|
-
COMMIT_UNCONFIRMED_STEPS = "commitUnconfirmedSteps",// https://data-portal.internal.atlassian.com/analytics/registry/46501
|
|
10
|
-
REINITIALISE_DOCUMENT = "reinitialiseDocument",// https://data-portal.internal.atlassian.com/analytics/registry/50231
|
|
11
|
-
ERROR = "error",// https://data-portal.internal.atlassian.com/analytics/registry/51790
|
|
12
|
-
PUBLISH_PAGE = "publishPage",// https://data-portal.internal.atlassian.com/analytics/registry/50235
|
|
13
|
-
GET_CURRENT_STATE = "getCurrentState",// https://data-portal.internal.atlassian.com/analytics/registry/50783
|
|
14
|
-
INVALIDATE_TOKEN = "invalidateToken",// https://data-portal.internal.atlassian.com/analytics/registry/50444
|
|
15
|
-
SEND_STEPS_RETRY = "sendStepsRetry",// https://data-portal.internal.atlassian.com/analytics/registry/53598
|
|
16
|
-
CATCHUP_AFTER_MAX_SEND_STEPS_RETRY = "catchupAfterMaxSendStepsRetry",// https://data-portal.internal.atlassian.com/analytics/registry/53723
|
|
17
|
-
DROPPED_STEPS = "droppedStepInCatchup",// https://data-portal.internal.atlassian.com/analytics/registry/53724
|
|
18
|
-
WEBSOCKET_MESSAGE_VOLUME_METRIC = "websocketMessageVolumeMetric",// https://data-portal.internal.atlassian.com/analytics/registry/53596
|
|
19
|
-
PROVIDER_INITIALIZED = "providerInitialized",// https://data-portal.internal.atlassian.com/analytics/registry/54714
|
|
20
|
-
RECONNECTION = "providerReconnection",// https://data-portal.internal.atlassian.com/analytics/registry/73992
|
|
21
|
-
PROVIDER_SETUP = "providerSetup",// https://data-portal.internal.atlassian.com/analytics/registry/54715
|
|
22
|
-
HAS_UNCONFIRMED_STEPS = "hasUnconfirmedSteps",// https://data-portal.internal.atlassian.com/analytics/registry/56141
|
|
23
|
-
OUT_OF_SYNC = "outOfSync",// https://data-portal.internal.atlassian.com/analytics/registry/74993
|
|
24
|
-
STEPS_REBASED = "stepsRebased",// https://data-portal.internal.atlassian.com/analytics/registry/76616
|
|
25
|
-
POLLING_FALLBACK = "pollingFallback",
|
|
26
|
-
PROCESS_STEPS = "processSteps"
|
|
27
|
-
}
|
|
28
|
-
export declare enum EVENT_STATUS {
|
|
29
|
-
SUCCESS = "SUCCESS",
|
|
30
|
-
FAILURE = "FAILURE",
|
|
31
|
-
INFO = "INFO",
|
|
32
|
-
SUCCESS_10x_SAMPLED = "SUCCESS_10x_SAMPLED"
|
|
33
|
-
}
|
|
34
|
-
export declare enum ADD_STEPS_TYPE {
|
|
35
|
-
ACCEPTED = "ACCEPTED",
|
|
36
|
-
REJECTED = "REJECTED",
|
|
37
|
-
ERROR = "ERROR"
|
|
38
|
-
}
|
|
39
|
-
export type DocumentUpdateErrorAttributes = {
|
|
40
|
-
caller?: string;
|
|
41
|
-
docHasContent?: boolean;
|
|
42
|
-
editorVersion?: number;
|
|
43
|
-
isDocContentValid?: boolean;
|
|
44
|
-
isDocTruthy?: boolean;
|
|
45
|
-
newVersion?: number;
|
|
46
|
-
};
|
|
47
|
-
export type CantSyncUpErrorAttributes = {
|
|
48
|
-
unconfirmedStepsInfo: string;
|
|
49
|
-
};
|
|
50
|
-
export type ErrorAnalyticsEvent = {
|
|
51
|
-
attributes: {
|
|
52
|
-
documentAri?: string;
|
|
53
|
-
errorCode?: string;
|
|
54
|
-
errorMessage: string;
|
|
55
|
-
errorName?: string;
|
|
56
|
-
errorStack?: string;
|
|
57
|
-
errorStatus?: string;
|
|
58
|
-
mappedError?: ProviderError;
|
|
59
|
-
originalErrorMessage: string | undefined;
|
|
60
|
-
subProduct?: string;
|
|
61
|
-
} & DocumentUpdateErrorAttributes;
|
|
62
|
-
eventAction: EVENT_ACTION.ERROR;
|
|
63
|
-
nonPrivacySafeAttributes?: {
|
|
64
|
-
error: unknown;
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
export type BaseActionAnalyticsEventAttributes = {
|
|
68
|
-
documentAri?: string;
|
|
69
|
-
subProduct?: string;
|
|
70
|
-
};
|
|
71
|
-
type InvalidateTokenAnalyticsEvent = {
|
|
72
|
-
attributes: {
|
|
73
|
-
eventStatus: EVENT_STATUS.SUCCESS;
|
|
74
|
-
reason?: string;
|
|
75
|
-
usedCachedToken?: boolean;
|
|
76
|
-
} & BaseActionAnalyticsEventAttributes;
|
|
77
|
-
eventAction: EVENT_ACTION.INVALIDATE_TOKEN;
|
|
78
|
-
};
|
|
79
|
-
type AddStepsSuccessAnalyticsEvent = {
|
|
80
|
-
attributes: {
|
|
81
|
-
eventStatus: EVENT_STATUS.SUCCESS;
|
|
82
|
-
latency?: number;
|
|
83
|
-
stepType?: {
|
|
84
|
-
[key: string]: number;
|
|
85
|
-
};
|
|
86
|
-
type: ADD_STEPS_TYPE.ACCEPTED;
|
|
87
|
-
} & BaseActionAnalyticsEventAttributes;
|
|
88
|
-
eventAction: EVENT_ACTION.ADD_STEPS;
|
|
89
|
-
};
|
|
90
|
-
type AddStepsFailureAnalyticsEvent = {
|
|
91
|
-
attributes: {
|
|
92
|
-
eventStatus: EVENT_STATUS.FAILURE;
|
|
93
|
-
latency?: number;
|
|
94
|
-
type: ADD_STEPS_TYPE.REJECTED | ADD_STEPS_TYPE.ERROR;
|
|
95
|
-
} & BaseActionAnalyticsEventAttributes;
|
|
96
|
-
eventAction: EVENT_ACTION.ADD_STEPS;
|
|
97
|
-
};
|
|
98
|
-
type ReInitDocFailAnalyticsEvent = {
|
|
99
|
-
attributes: {
|
|
100
|
-
eventStatus: EVENT_STATUS.FAILURE;
|
|
101
|
-
numUnconfirmedSteps: number;
|
|
102
|
-
triggeredByCatchup?: boolean;
|
|
103
|
-
} & BaseActionAnalyticsEventAttributes;
|
|
104
|
-
eventAction: EVENT_ACTION.REINITIALISE_DOCUMENT;
|
|
105
|
-
};
|
|
106
|
-
type ReInitDocSuccessAnalyticsEvent = {
|
|
107
|
-
attributes: {
|
|
108
|
-
eventStatus: EVENT_STATUS.SUCCESS;
|
|
109
|
-
numUnconfirmedSteps: number;
|
|
110
|
-
triggeredByCatchup?: boolean;
|
|
111
|
-
} & BaseActionAnalyticsEventAttributes;
|
|
112
|
-
eventAction: EVENT_ACTION.REINITIALISE_DOCUMENT;
|
|
113
|
-
};
|
|
114
|
-
type ConnectionSuccessAnalyticsEvent = {
|
|
115
|
-
attributes: {
|
|
116
|
-
eventStatus: EVENT_STATUS.SUCCESS;
|
|
117
|
-
latency?: number;
|
|
118
|
-
} & BaseActionAnalyticsEventAttributes;
|
|
119
|
-
eventAction: EVENT_ACTION.CONNECTION;
|
|
120
|
-
};
|
|
121
|
-
type ConnectionFailureAnalyticsEvent = {
|
|
122
|
-
attributes: {
|
|
123
|
-
eventStatus: EVENT_STATUS.FAILURE;
|
|
124
|
-
latency?: number;
|
|
125
|
-
} & BaseActionAnalyticsEventAttributes;
|
|
126
|
-
eventAction: EVENT_ACTION.CONNECTION;
|
|
127
|
-
};
|
|
128
|
-
type CatchUpSuccessAnalyticsEvent = {
|
|
129
|
-
attributes: {
|
|
130
|
-
eventStatus: EVENT_STATUS.SUCCESS;
|
|
131
|
-
latency?: number;
|
|
132
|
-
} & BaseActionAnalyticsEventAttributes;
|
|
133
|
-
eventAction: EVENT_ACTION.CATCHUP;
|
|
134
|
-
};
|
|
135
|
-
type CatchUpFailureAnalyticsEvent = {
|
|
136
|
-
attributes: {
|
|
137
|
-
eventStatus: EVENT_STATUS.FAILURE;
|
|
138
|
-
latency?: number;
|
|
139
|
-
} & BaseActionAnalyticsEventAttributes;
|
|
140
|
-
eventAction: EVENT_ACTION.CATCHUP;
|
|
141
|
-
};
|
|
142
|
-
type CatchUpDroppedStepsEvent = {
|
|
143
|
-
attributes: {
|
|
144
|
-
numOfDroppedSteps: number;
|
|
145
|
-
} & BaseActionAnalyticsEventAttributes;
|
|
146
|
-
eventAction: EVENT_ACTION.DROPPED_STEPS;
|
|
147
|
-
};
|
|
148
|
-
type DocumentInitSuccessAnalyticsEvent = {
|
|
149
|
-
attributes: {
|
|
150
|
-
eventStatus: EVENT_STATUS.SUCCESS;
|
|
151
|
-
hasTitle: boolean;
|
|
152
|
-
latency?: number;
|
|
153
|
-
resetReason?: string;
|
|
154
|
-
} & BaseActionAnalyticsEventAttributes;
|
|
155
|
-
eventAction: EVENT_ACTION.DOCUMENT_INIT;
|
|
156
|
-
};
|
|
157
|
-
type UpdateParticipantsSuccessAnalyticsEvent = {
|
|
158
|
-
attributes: {
|
|
159
|
-
eventStatus: EVENT_STATUS.SUCCESS;
|
|
160
|
-
participants: number;
|
|
161
|
-
} & BaseActionAnalyticsEventAttributes;
|
|
162
|
-
eventAction: EVENT_ACTION.UPDATE_PARTICIPANTS;
|
|
163
|
-
};
|
|
164
|
-
type CommitUnconfirmedStepsSuccessAnalyticsEvent = {
|
|
165
|
-
attributes: {
|
|
166
|
-
eventStatus: EVENT_STATUS.SUCCESS;
|
|
167
|
-
latency?: number;
|
|
168
|
-
numUnconfirmedSteps?: number;
|
|
169
|
-
} & BaseActionAnalyticsEventAttributes;
|
|
170
|
-
eventAction: EVENT_ACTION.COMMIT_UNCONFIRMED_STEPS;
|
|
171
|
-
};
|
|
172
|
-
type CommitUnconfirmedStepsFailureAnalyticsEvent = {
|
|
173
|
-
attributes: {
|
|
174
|
-
eventStatus: EVENT_STATUS.FAILURE;
|
|
175
|
-
latency?: number;
|
|
176
|
-
numUnconfirmedSteps?: number;
|
|
177
|
-
} & BaseActionAnalyticsEventAttributes;
|
|
178
|
-
eventAction: EVENT_ACTION.COMMIT_UNCONFIRMED_STEPS;
|
|
179
|
-
};
|
|
180
|
-
type PublishPageSuccessAnalyticsEvent = {
|
|
181
|
-
attributes: {
|
|
182
|
-
eventStatus: EVENT_STATUS.SUCCESS;
|
|
183
|
-
latency?: number;
|
|
184
|
-
} & BaseActionAnalyticsEventAttributes;
|
|
185
|
-
eventAction: EVENT_ACTION.PUBLISH_PAGE;
|
|
186
|
-
};
|
|
187
|
-
type PublishPageFailureAnalyticsEvent = {
|
|
188
|
-
attributes: {
|
|
189
|
-
eventStatus: EVENT_STATUS.FAILURE;
|
|
190
|
-
latency?: number;
|
|
191
|
-
} & BaseActionAnalyticsEventAttributes;
|
|
192
|
-
eventAction: EVENT_ACTION.PUBLISH_PAGE;
|
|
193
|
-
};
|
|
194
|
-
type GetCurrentStateSuccessAnalyticsEvent = {
|
|
195
|
-
attributes: {
|
|
196
|
-
eventStatus: EVENT_STATUS.SUCCESS;
|
|
197
|
-
latency?: number;
|
|
198
|
-
} & BaseActionAnalyticsEventAttributes;
|
|
199
|
-
eventAction: EVENT_ACTION.GET_CURRENT_STATE;
|
|
200
|
-
};
|
|
201
|
-
type GetCurrentStateFailureAnalyticsEvent = {
|
|
202
|
-
attributes: {
|
|
203
|
-
eventStatus: EVENT_STATUS.FAILURE;
|
|
204
|
-
latency?: number;
|
|
205
|
-
} & BaseActionAnalyticsEventAttributes;
|
|
206
|
-
eventAction: EVENT_ACTION.GET_CURRENT_STATE;
|
|
207
|
-
};
|
|
208
|
-
type SendStepsRetryAnalyticsEvent = {
|
|
209
|
-
attributes: {
|
|
210
|
-
count: number;
|
|
211
|
-
eventStatus: EVENT_STATUS.INFO;
|
|
212
|
-
} & BaseActionAnalyticsEventAttributes;
|
|
213
|
-
eventAction: EVENT_ACTION.SEND_STEPS_RETRY;
|
|
214
|
-
};
|
|
215
|
-
type CatchupAfterMaxSendStepsRetryAnalyticsEvent = {
|
|
216
|
-
attributes: {
|
|
217
|
-
eventStatus: EVENT_STATUS.INFO;
|
|
218
|
-
} & BaseActionAnalyticsEventAttributes;
|
|
219
|
-
eventAction: EVENT_ACTION.CATCHUP_AFTER_MAX_SEND_STEPS_RETRY;
|
|
220
|
-
};
|
|
221
|
-
type WebsocketMessageVolumeMetricEvent = {
|
|
222
|
-
attributes: {
|
|
223
|
-
eventStatus: EVENT_STATUS.INFO;
|
|
224
|
-
messageCount: number;
|
|
225
|
-
messageSize: number;
|
|
226
|
-
} & BaseActionAnalyticsEventAttributes;
|
|
227
|
-
eventAction: EVENT_ACTION.WEBSOCKET_MESSAGE_VOLUME_METRIC;
|
|
228
|
-
};
|
|
229
|
-
type ProviderInitializedAnalyticsEvent = {
|
|
230
|
-
attributes: {
|
|
231
|
-
eventStatus: EVENT_STATUS.INFO;
|
|
232
|
-
isBuffered?: boolean;
|
|
233
|
-
isPreinitializing: boolean;
|
|
234
|
-
} & BaseActionAnalyticsEventAttributes;
|
|
235
|
-
eventAction: EVENT_ACTION.PROVIDER_INITIALIZED;
|
|
236
|
-
};
|
|
237
|
-
type ProviderSetupAnalyticsEvent = {
|
|
238
|
-
attributes: {
|
|
239
|
-
eventStatus: EVENT_STATUS.INFO;
|
|
240
|
-
hasState: boolean;
|
|
241
|
-
isPreinitializing: boolean;
|
|
242
|
-
} & BaseActionAnalyticsEventAttributes;
|
|
243
|
-
eventAction: EVENT_ACTION.PROVIDER_SETUP;
|
|
244
|
-
};
|
|
245
|
-
type ProviderHasUnconfirmedStepsAnalyticsEvent = {
|
|
246
|
-
attributes: {
|
|
247
|
-
numUnconfirmedSteps: number;
|
|
248
|
-
} & BaseActionAnalyticsEventAttributes;
|
|
249
|
-
eventAction: EVENT_ACTION.HAS_UNCONFIRMED_STEPS;
|
|
250
|
-
};
|
|
251
|
-
type UpdateDocumentAnalyticsEvent = {
|
|
252
|
-
attributes: {
|
|
253
|
-
docHasContent: boolean;
|
|
254
|
-
editorVersion: number;
|
|
255
|
-
eventStatus: EVENT_STATUS.SUCCESS;
|
|
256
|
-
isDocContentValid: boolean;
|
|
257
|
-
isDocTruthy: boolean;
|
|
258
|
-
newVersion: number;
|
|
259
|
-
} & BaseActionAnalyticsEventAttributes;
|
|
260
|
-
eventAction: EVENT_ACTION.UPDATE_DOCUMENT;
|
|
261
|
-
};
|
|
262
|
-
type ReconnectionAnalyticsEvent = {
|
|
263
|
-
attributes: {
|
|
264
|
-
disconnectionPeriodSeconds: number;
|
|
265
|
-
eventStatus: EVENT_STATUS.SUCCESS;
|
|
266
|
-
} & BaseActionAnalyticsEventAttributes;
|
|
267
|
-
eventAction: EVENT_ACTION.RECONNECTION;
|
|
268
|
-
};
|
|
269
|
-
type OutOfSyncAnalyticsEvent = {
|
|
270
|
-
attributes: {
|
|
271
|
-
catchupReason: CatchupEventReason | undefined;
|
|
272
|
-
eventStatus: EVENT_STATUS.FAILURE;
|
|
273
|
-
obfuscatedDoc: {
|
|
274
|
-
[key: string]: number;
|
|
275
|
-
};
|
|
276
|
-
obfuscatedSteps: {
|
|
277
|
-
[key: string]: number;
|
|
278
|
-
}[];
|
|
279
|
-
} & BaseActionAnalyticsEventAttributes;
|
|
280
|
-
eventAction: EVENT_ACTION.OUT_OF_SYNC;
|
|
281
|
-
};
|
|
282
|
-
type StepsRebasedAnalyticsEvent = {
|
|
283
|
-
attributes: {
|
|
284
|
-
clientID: 'string';
|
|
285
|
-
eventStatus: EVENT_STATUS.INFO;
|
|
286
|
-
obfuscatedRebasedSteps: {
|
|
287
|
-
[key: string]: number;
|
|
288
|
-
}[];
|
|
289
|
-
obfuscatedRemoteSteps: {
|
|
290
|
-
[key: string]: number;
|
|
291
|
-
}[];
|
|
292
|
-
obfuscatedUnconfirmedSteps: {
|
|
293
|
-
[key: string]: number;
|
|
294
|
-
}[];
|
|
295
|
-
userId: 'string';
|
|
296
|
-
versionAfter: 'string';
|
|
297
|
-
versionBefore: 'string';
|
|
298
|
-
} & BaseActionAnalyticsEventAttributes;
|
|
299
|
-
eventAction: EVENT_ACTION.STEPS_REBASED;
|
|
300
|
-
};
|
|
301
|
-
type PollingFallbackAnalyticsEvent = {
|
|
302
|
-
attributes: {
|
|
303
|
-
eventStatus: EVENT_STATUS.INFO;
|
|
304
|
-
url: 'string';
|
|
305
|
-
} & BaseActionAnalyticsEventAttributes;
|
|
306
|
-
eventAction: EVENT_ACTION.POLLING_FALLBACK;
|
|
307
|
-
};
|
|
308
|
-
type ProcessStepsAnalyticsEvent = {
|
|
309
|
-
attributes: {
|
|
310
|
-
eventStatus: EVENT_STATUS.SUCCESS;
|
|
311
|
-
} & BaseActionAnalyticsEventAttributes;
|
|
312
|
-
eventAction: EVENT_ACTION.PROCESS_STEPS;
|
|
313
|
-
};
|
|
314
|
-
export type ActionAnalyticsEvent = AddStepsSuccessAnalyticsEvent | AddStepsFailureAnalyticsEvent | ReInitDocFailAnalyticsEvent | ReInitDocSuccessAnalyticsEvent | ConnectionSuccessAnalyticsEvent | ConnectionFailureAnalyticsEvent | CatchUpSuccessAnalyticsEvent | CatchUpFailureAnalyticsEvent | DocumentInitSuccessAnalyticsEvent | UpdateParticipantsSuccessAnalyticsEvent | CommitUnconfirmedStepsSuccessAnalyticsEvent | CommitUnconfirmedStepsFailureAnalyticsEvent | PublishPageSuccessAnalyticsEvent | PublishPageFailureAnalyticsEvent | GetCurrentStateSuccessAnalyticsEvent | GetCurrentStateFailureAnalyticsEvent | InvalidateTokenAnalyticsEvent | SendStepsRetryAnalyticsEvent | CatchupAfterMaxSendStepsRetryAnalyticsEvent | CatchUpDroppedStepsEvent | WebsocketMessageVolumeMetricEvent | ProviderInitializedAnalyticsEvent | ProviderSetupAnalyticsEvent | ProviderHasUnconfirmedStepsAnalyticsEvent | UpdateDocumentAnalyticsEvent | ReconnectionAnalyticsEvent | OutOfSyncAnalyticsEvent | StepsRebasedAnalyticsEvent | PollingFallbackAnalyticsEvent | ProcessStepsAnalyticsEvent;
|
|
315
|
-
export declare const ACK_MAX_TRY = 60;
|
|
316
|
-
export declare const CONFLUENCE = "confluence";
|
|
317
|
-
/** Enumerable for attaching a reason to catchup (v2) call(s) */
|
|
318
|
-
export declare enum CatchupEventReason {
|
|
319
|
-
STEPS_ADDED = "onStepsAdded",
|
|
320
|
-
STEPS_REJECTED = "onStepsRejected",
|
|
321
|
-
PROCESS_STEPS = "processSteps",
|
|
322
|
-
RECONNECTED = "reconnected"
|
|
323
|
-
}
|
|
324
|
-
export {};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
2
|
-
import type { ProductInformation } from '../types';
|
|
3
|
-
import type { Step as ProseMirrorStep } from '@atlaskit/editor-prosemirror/transform';
|
|
4
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
5
|
-
import type { StepJson } from '@atlaskit/editor-common/collab';
|
|
6
|
-
import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
7
|
-
import type { Node as ProseMirrorNode } from '@atlaskit/editor-prosemirror/model';
|
|
8
|
-
import { CustomError } from '../errors/custom-errors';
|
|
9
|
-
export declare const createLogger: (prefix: string, color?: string) => (msg: string, data?: any) => void;
|
|
10
|
-
export declare function sleep(ms: number): Promise<any>;
|
|
11
|
-
export declare const isAIProviderID: (id: string) => boolean;
|
|
12
|
-
export declare const getProduct: (productInfo?: ProductInformation) => string;
|
|
13
|
-
export declare const getSubProduct: (productInfo?: ProductInformation) => string;
|
|
14
|
-
export type UGCFreeStepDetails = {
|
|
15
|
-
contentTypes: string;
|
|
16
|
-
stepSizeInBytes?: number;
|
|
17
|
-
type: string;
|
|
18
|
-
};
|
|
19
|
-
export declare const getStepUGCFreeDetails: (step: ProseMirrorStep) => UGCFreeStepDetails;
|
|
20
|
-
export declare const getStepTypes: (stepJson: StepJson) => {
|
|
21
|
-
contentTypes: string | null;
|
|
22
|
-
type: string;
|
|
23
|
-
};
|
|
24
|
-
export declare const getStepsAdfWithObfuscation: (stepJson: StepJson) => ADFEntity[] | null;
|
|
25
|
-
export declare const getDocAdfWithObfuscation: (doc: ProseMirrorNode) => ADFEntity | null;
|
|
26
|
-
export declare const getDocAdfWithObfuscationFromJSON: (docJson: JSONDocNode) => ADFEntity | null;
|
|
27
|
-
export declare const getStepPositions: (stepJson: StepJson) => {
|
|
28
|
-
from?: number | undefined;
|
|
29
|
-
gapFrom?: number | undefined;
|
|
30
|
-
gapTo?: number | undefined;
|
|
31
|
-
insert?: number | undefined;
|
|
32
|
-
pos?: number | undefined;
|
|
33
|
-
to?: number | undefined;
|
|
34
|
-
};
|
|
35
|
-
export declare const getObfuscatedSteps: (steps: StepJson[], endIndex?: number | undefined) => {
|
|
36
|
-
stepContent: ADFEntity[] | null;
|
|
37
|
-
stepMetadata: {
|
|
38
|
-
createdOffline?: boolean;
|
|
39
|
-
prevStepId?: string;
|
|
40
|
-
rebased?: boolean;
|
|
41
|
-
reqId?: string;
|
|
42
|
-
schemaVersion?: string;
|
|
43
|
-
source?: string;
|
|
44
|
-
stepId?: string;
|
|
45
|
-
traceId?: string;
|
|
46
|
-
unconfirmedStepAfterRecovery?: boolean;
|
|
47
|
-
} | undefined;
|
|
48
|
-
stepPositions: {
|
|
49
|
-
from?: number | undefined;
|
|
50
|
-
gapFrom?: number | undefined;
|
|
51
|
-
gapTo?: number | undefined;
|
|
52
|
-
insert?: number | undefined;
|
|
53
|
-
pos?: number | undefined;
|
|
54
|
-
to?: number | undefined;
|
|
55
|
-
};
|
|
56
|
-
stepType: {
|
|
57
|
-
contentTypes: string | null;
|
|
58
|
-
type: string;
|
|
59
|
-
};
|
|
60
|
-
}[];
|
|
61
|
-
export declare function logObfuscatedSteps(oldState: EditorState | null, newState: EditorState): Promise<CustomError | {
|
|
62
|
-
stepsFromNewState: string;
|
|
63
|
-
stepsFromOldState: string;
|
|
64
|
-
}>;
|
|
65
|
-
export declare function toObfuscatedSteps(steps: readonly ProseMirrorStep[]): Promise<string>;
|
|
66
|
-
/**
|
|
67
|
-
* Copied from confluence/next/packages/graphql/src/utils/gcpDomainUtils.ts
|
|
68
|
-
* Checks if the current domain is a GCP tenant matching the pattern: .*-cdp-{cdp-id}\.jira-dev\.com
|
|
69
|
-
* @param {string | undefined} hostname optional hostname to evaluate
|
|
70
|
-
* @returns {boolean} true if the domain matches the GCP tenant pattern
|
|
71
|
-
*/
|
|
72
|
-
export declare function isGCPtenant(hostname?: string): boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Provider } from './provider';
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { Metadata, CollabEvents } from '@atlaskit/editor-common/collab';
|
|
2
|
-
export declare class MetadataService {
|
|
3
|
-
private providerEmitCallback;
|
|
4
|
-
private broadcastMetadata;
|
|
5
|
-
private metadata;
|
|
6
|
-
constructor(providerEmitCallback: (evt: keyof CollabEvents, data: any) => void, broadcastMetadata: (metadata: Metadata) => void);
|
|
7
|
-
getMetaData: () => Metadata;
|
|
8
|
-
getTitle: () => string;
|
|
9
|
-
/**
|
|
10
|
-
* Called when a metadata is changed externally from other clients/backend.
|
|
11
|
-
*/
|
|
12
|
-
onMetadataChanged: (metadata?: Metadata) => void;
|
|
13
|
-
setTitle(title: string, broadcast?: boolean): void;
|
|
14
|
-
setEditorWidth(editorWidth: string, broadcast?: boolean): void;
|
|
15
|
-
/**
|
|
16
|
-
* Updates the local metadata and broadcasts the metadata to other clients/backend.
|
|
17
|
-
* @param metadata
|
|
18
|
-
*/
|
|
19
|
-
setMetadata: (metadata: Metadata) => void;
|
|
20
|
-
/**
|
|
21
|
-
* Emits a change in document's metadata
|
|
22
|
-
* @param metadata
|
|
23
|
-
*/
|
|
24
|
-
updateMetadata: (metadata: Metadata | undefined) => void;
|
|
25
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { NamespaceStatus } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Allows us to keep track of any namespace changes from the server.
|
|
4
|
-
* @param isNamespaceLocked - whether the namespace is locked or not, defaults to false
|
|
5
|
-
*/
|
|
6
|
-
export declare class NamespaceService {
|
|
7
|
-
private isNamespaceLocked;
|
|
8
|
-
constructor(isNamespaceLocked?: boolean);
|
|
9
|
-
getIsNamespaceLocked: () => boolean;
|
|
10
|
-
/**
|
|
11
|
-
* ESS-2916 namespace status event- lock/unlock
|
|
12
|
-
*/
|
|
13
|
-
onNamespaceStatusChanged: ({ isLocked, waitTimeInMs, timestamp, }: NamespaceStatus) => Promise<void>;
|
|
14
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { ProviderParticipant } from '@atlaskit/editor-common/collab';
|
|
2
|
-
import type { PresencePayload } from '../types';
|
|
3
|
-
import type { ParticipantsState } from './participants-state';
|
|
4
|
-
export declare const PARTICIPANT_UPDATE_INTERVAL: number;
|
|
5
|
-
export type ParticipantsMap = Map<string, ProviderParticipant>;
|
|
6
|
-
type UserType = Pick<ProviderParticipant, 'name' | 'avatar' | 'userId' | 'email' | 'isGuest'>;
|
|
7
|
-
export type GetUserType = ((userId: string) => Promise<UserType>) | undefined;
|
|
8
|
-
export type GetUsersType = ((userIds: string[]) => Promise<UserType[]>) | undefined;
|
|
9
|
-
export type BatchProps = {
|
|
10
|
-
/** Defaults to {@link #DEFAULT_BATCH_FETCH_SIZE} if none provided **/
|
|
11
|
-
batchSize?: number;
|
|
12
|
-
/** how often the debounce should run. Defaults to {@link ./participants-service#DEFAULT_FETCH_USERS_INTERVAL} if none provided **/
|
|
13
|
-
debounceTime?: number;
|
|
14
|
-
getUsers?: GetUsersType;
|
|
15
|
-
onError?: (error: unknown) => void;
|
|
16
|
-
/** when to stop fetching users. eg. if this = 5, we won't attempt to hydrate more than 5 **/
|
|
17
|
-
participantsLimit?: number;
|
|
18
|
-
};
|
|
19
|
-
export declare const createParticipantFromPayload: (payload: PresencePayload & {
|
|
20
|
-
userId: string;
|
|
21
|
-
}, getUser: GetUserType) => Promise<ProviderParticipant>;
|
|
22
|
-
/**
|
|
23
|
-
* Will use the getUsers callback from batchProps to fetch users
|
|
24
|
-
*
|
|
25
|
-
* 1. Determine all the participants that need to be hydrated
|
|
26
|
-
* 2. Only fetch a subset of those participants based on batchSize
|
|
27
|
-
* 3. Of the users fetched, find all of those users' sessions and mark those entries as hydrated
|
|
28
|
-
*
|
|
29
|
-
* @param participantsState
|
|
30
|
-
* @param batchProps
|
|
31
|
-
* @returns
|
|
32
|
-
* @example
|
|
33
|
-
*/
|
|
34
|
-
export declare const fetchParticipants: (participantsState: ParticipantsState, batchProps: BatchProps) => Promise<ProviderParticipant[]>;
|
|
35
|
-
export {};
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import type { CollabEventPresenceData, CollabTelepointerPayload, CollabPresenceActivityChangePayload, ProviderParticipant, StepJson, UserPermitType } from '@atlaskit/editor-common/collab';
|
|
2
|
-
import type AnalyticsHelper from '../analytics/analytics-helper';
|
|
3
|
-
import type { CollabEventDisconnectedData, ChannelEvent, PresenceData, PresencePayload, TelepointerPayload, FetchAnonymousAsset } from '../types';
|
|
4
|
-
import type { BatchProps, GetUserType } from './participants-helper';
|
|
5
|
-
import { ParticipantsState } from './participants-state';
|
|
6
|
-
import type { ParticipantFilter } from './participants-state';
|
|
7
|
-
export declare const SINGLE_COLLAB_MODE = "single";
|
|
8
|
-
export declare const MULTI_COLLAB_MODE = "collab";
|
|
9
|
-
/**
|
|
10
|
-
* This service is responsible for handling presence and participant events, as well as sending them on to the editor or NCS.
|
|
11
|
-
* @param analyticsHelper Analytics helper instance
|
|
12
|
-
* @param participantsState Starts with no participants, only add this when testing
|
|
13
|
-
* @param emit Emit from the Provider class (to the editor)
|
|
14
|
-
* @param getUser Callback to get user data from the editor
|
|
15
|
-
* @param channelBroadcast Broadcast from the Channel class (to NCS)
|
|
16
|
-
* @param sendPresenceJoined Callback to Channel class
|
|
17
|
-
*/
|
|
18
|
-
export declare class ParticipantsService {
|
|
19
|
-
private analyticsHelper;
|
|
20
|
-
private emit;
|
|
21
|
-
private getUser;
|
|
22
|
-
private batchProps;
|
|
23
|
-
private channelBroadcast;
|
|
24
|
-
private sendPresenceJoined;
|
|
25
|
-
private getPresenceData;
|
|
26
|
-
private setUserId;
|
|
27
|
-
private getAIProviderActiveIds?;
|
|
28
|
-
private fetchAnonymousAsset?;
|
|
29
|
-
private participantUpdateTimeout;
|
|
30
|
-
private presenceUpdateTimeout;
|
|
31
|
-
private presenceFetchTimeout;
|
|
32
|
-
private currentlyPollingFetchUsers;
|
|
33
|
-
private hasBatchFetchError;
|
|
34
|
-
private participantsState;
|
|
35
|
-
/**
|
|
36
|
-
* constructor
|
|
37
|
-
*
|
|
38
|
-
* @param analyticsHelper
|
|
39
|
-
* @param participantsState
|
|
40
|
-
* @param emit
|
|
41
|
-
* @param getUser
|
|
42
|
-
* @param batchProps
|
|
43
|
-
* @param channelBroadcast
|
|
44
|
-
* @param sendPresenceJoined
|
|
45
|
-
* @param getPresenceData
|
|
46
|
-
* @param setUserId
|
|
47
|
-
* @param getAIProviderActiveIds
|
|
48
|
-
* @param fetchAnonymousAsset
|
|
49
|
-
* @example
|
|
50
|
-
*/
|
|
51
|
-
constructor(analyticsHelper: AnalyticsHelper | undefined, participantsState: ParticipantsState | undefined, emit: (evt: 'presence' | 'telepointer' | 'disconnected' | 'presence:changed', data: CollabEventPresenceData | CollabTelepointerPayload | CollabEventDisconnectedData | CollabPresenceActivityChangePayload) => void, getUser: GetUserType, batchProps: BatchProps | undefined, channelBroadcast: <K extends keyof ChannelEvent>(type: K, data: Omit<ChannelEvent[K], 'timestamp'>, callback?: Function) => void, sendPresenceJoined: () => void, getPresenceData: () => PresenceData, setUserId: (id: string) => void, getAIProviderActiveIds?: (() => string[]) | undefined, fetchAnonymousAsset?: FetchAnonymousAsset | undefined);
|
|
52
|
-
sendPresenceActivityChanged: () => void;
|
|
53
|
-
sendAIProviderChanged: (payload: {
|
|
54
|
-
action: "add" | "remove";
|
|
55
|
-
clientId: string | number;
|
|
56
|
-
permit?: UserPermitType;
|
|
57
|
-
providerId?: string;
|
|
58
|
-
sessionId: string;
|
|
59
|
-
userId: string;
|
|
60
|
-
}) => void;
|
|
61
|
-
private buildAIProviderPresencePayload;
|
|
62
|
-
private sendAIProviderParticipantUpdated;
|
|
63
|
-
private sendAIProviderParticipantLeft;
|
|
64
|
-
private sendAIProvidersPresence;
|
|
65
|
-
private hasPresenceActivityChanged;
|
|
66
|
-
private handleAnonymousUser;
|
|
67
|
-
/**
|
|
68
|
-
* Carries out 3 things: 1) enriches the participant with user data, 2) updates the participantsState, 3) emits the presence event
|
|
69
|
-
* @param payload Payload from incoming socket event
|
|
70
|
-
* @example
|
|
71
|
-
*/
|
|
72
|
-
private updateParticipantEager;
|
|
73
|
-
/**
|
|
74
|
-
* Will update participant state without attempting to hydrate the participant, which is handled in {@link #batchFetchUsers}
|
|
75
|
-
* Here's the TLDR of what this method handles
|
|
76
|
-
*
|
|
77
|
-
* 1. If participant that joined is anonymous, update state, emit event and return
|
|
78
|
-
* 2. If incoming participant is new, update state and emit event
|
|
79
|
-
* 3. If incoming participant is not new, update previous state with new values (timestamp, activity)
|
|
80
|
-
*
|
|
81
|
-
* @param payload Payload from incoming socket event
|
|
82
|
-
* @example
|
|
83
|
-
*/
|
|
84
|
-
private updateParticipantLazy;
|
|
85
|
-
onParticipantUpdated: (payload: PresencePayload) => Promise<void>;
|
|
86
|
-
/**
|
|
87
|
-
* Called when a participant leaves the session.
|
|
88
|
-
* We emit the `presence` event to update the active avatars in the editor.
|
|
89
|
-
* @param payload
|
|
90
|
-
* @example
|
|
91
|
-
*/
|
|
92
|
-
onParticipantLeft: (payload: PresencePayload) => void;
|
|
93
|
-
disconnect: (reason: string, sessionId: string | undefined) => void;
|
|
94
|
-
/**
|
|
95
|
-
* Updates when users were last active
|
|
96
|
-
* @param userIds Users in most recent steps
|
|
97
|
-
* @example
|
|
98
|
-
*/
|
|
99
|
-
updateLastActive: (userIds?: string[]) => void;
|
|
100
|
-
/**
|
|
101
|
-
* Called on receiving steps, emits each step's telepointer
|
|
102
|
-
* @param steps Steps to extract telepointers from
|
|
103
|
-
* @example
|
|
104
|
-
*/
|
|
105
|
-
emitTelepointersFromSteps(steps: StepJson[]): void;
|
|
106
|
-
/**
|
|
107
|
-
* Called when we receive a telepointer update from another
|
|
108
|
-
* participant.
|
|
109
|
-
* @param payload
|
|
110
|
-
* @param thisSessionId
|
|
111
|
-
* @example
|
|
112
|
-
*/
|
|
113
|
-
onParticipantTelepointer: (payload: TelepointerPayload, thisSessionId: string | undefined) => void;
|
|
114
|
-
/**
|
|
115
|
-
* Every 5 minutes (PARTICIPANT_UPDATE_INTERVAL), removes inactive participants and emits the update to other participants.
|
|
116
|
-
* Needs to be kicked off in the Provider.
|
|
117
|
-
* @param sessionId SessionId from provider's connection
|
|
118
|
-
* @example
|
|
119
|
-
*/
|
|
120
|
-
startInactiveRemover: (sessionId: string | undefined) => void;
|
|
121
|
-
enrichParticipants: (props: BatchProps) => Promise<void>;
|
|
122
|
-
/**
|
|
123
|
-
* a debounce so we can wait until participants join before hydrating the user and perform batch calls in a timely manner.
|
|
124
|
-
*
|
|
125
|
-
* if {@link BatchProps#participantsLimit} is supplied
|
|
126
|
-
* 1. Fetch users until we've reached the participantsLimit
|
|
127
|
-
* 2. If there are no more participants to hydrate and we haven't reached the participantsLimit, stop polling
|
|
128
|
-
* 3. If we've reached our participantLimit, stop polling
|
|
129
|
-
*
|
|
130
|
-
* if no {@link BatchProps#participantsLimit} is supplied
|
|
131
|
-
* 1. Fetch users until there are no more participants to hydrate
|
|
132
|
-
* @example
|
|
133
|
-
*/
|
|
134
|
-
batchFetchUsers: () => Promise<void>;
|
|
135
|
-
/**
|
|
136
|
-
* We want to give some time for users to initially join before attempting to fetch users
|
|
137
|
-
* otherwise we'll always make at least 2 calls if there's more than 1 participant
|
|
138
|
-
* @example
|
|
139
|
-
*/
|
|
140
|
-
initializeFirstBatchFetchUsers: () => Promise<void>;
|
|
141
|
-
/**
|
|
142
|
-
* Keep list of participants up to date. Filter out inactive users etc.
|
|
143
|
-
* @param sessionId
|
|
144
|
-
* @example
|
|
145
|
-
*/
|
|
146
|
-
private filterInactive;
|
|
147
|
-
/**
|
|
148
|
-
* Wrapper function to emit with error handling and analytics
|
|
149
|
-
* @param data Data to emit
|
|
150
|
-
* @param emit Emit function from Provider
|
|
151
|
-
* @param errorMessage
|
|
152
|
-
* @example
|
|
153
|
-
*/
|
|
154
|
-
private emitPresence;
|
|
155
|
-
/**
|
|
156
|
-
* Wrapper function to emit with error handling and analytics
|
|
157
|
-
* @param data Data to emit
|
|
158
|
-
* @param emit Emit function from Provider
|
|
159
|
-
* @param errorMessage
|
|
160
|
-
* @example
|
|
161
|
-
*/
|
|
162
|
-
private emitTelepointer;
|
|
163
|
-
/**
|
|
164
|
-
* Wrapper function to emit with error handling and analytics
|
|
165
|
-
* @param data Data to emit
|
|
166
|
-
* @param errorMessage Error message for analytics
|
|
167
|
-
* @example
|
|
168
|
-
*/
|
|
169
|
-
private emitPresenceActivityChange;
|
|
170
|
-
/**
|
|
171
|
-
* Used when the provider is disconnected or destroyed to prevent perpetual timers from continuously running
|
|
172
|
-
* @example
|
|
173
|
-
*/
|
|
174
|
-
clearTimers: () => void;
|
|
175
|
-
private sendPresence;
|
|
176
|
-
/**
|
|
177
|
-
* Called when a participant joins the session.
|
|
178
|
-
*
|
|
179
|
-
* We keep track of participants internally, and emit the `presence` event to update
|
|
180
|
-
* the active avatars in the editor.
|
|
181
|
-
* This method will be triggered from backend to notify all participants to exchange presence
|
|
182
|
-
* @param payload
|
|
183
|
-
* @example
|
|
184
|
-
*/
|
|
185
|
-
onPresenceJoined: (payload: PresencePayload) => void;
|
|
186
|
-
/**
|
|
187
|
-
* Called when the current user joins the session.
|
|
188
|
-
*
|
|
189
|
-
* This will send both a 'presence' event and a 'participant:updated' event.
|
|
190
|
-
* This updates both the avatars and the participants list.
|
|
191
|
-
* @param payload
|
|
192
|
-
* @example
|
|
193
|
-
*/
|
|
194
|
-
onPresence: (payload: PresencePayload) => void;
|
|
195
|
-
getParticipants: () => ProviderParticipant[];
|
|
196
|
-
getUniqueParticipantSize: () => number;
|
|
197
|
-
getUniqueParticipants: (filter: ParticipantFilter) => ProviderParticipant[];
|
|
198
|
-
getAIProviderParticipants: () => ProviderParticipant[];
|
|
199
|
-
getCollabMode: () => "collab" | "single";
|
|
200
|
-
}
|