@atlaskit/collab-provider 8.8.1 → 8.8.2

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.
Files changed (52) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/version-wrapper.js +1 -1
  3. package/dist/cjs/version.json +1 -1
  4. package/dist/es2019/version-wrapper.js +1 -1
  5. package/dist/es2019/version.json +1 -1
  6. package/dist/esm/version-wrapper.js +1 -1
  7. package/dist/esm/version.json +1 -1
  8. package/dist/types/channel.d.ts +1 -1
  9. package/dist/types/errors/error-types.d.ts +37 -37
  10. package/dist/types/feature-flags/types.d.ts +4 -4
  11. package/dist/types/helpers/const.d.ts +19 -19
  12. package/dist/types/helpers/utils.d.ts +2 -2
  13. package/dist/types/metadata/metadata-service.d.ts +1 -1
  14. package/dist/types/participants/participants-helper.d.ts +5 -5
  15. package/dist/types/provider/commit-step.d.ts +2 -2
  16. package/dist/types/provider/index.d.ts +1 -1
  17. package/dist/types/types.d.ts +27 -27
  18. package/package.json +11 -3
  19. package/socket-io-provider/package.json +2 -2
  20. package/types/package.json +2 -2
  21. package/version-wrapper/package.json +2 -2
  22. package/dist/types-ts4.0/analytics/analytics-helper.d.ts +0 -11
  23. package/dist/types-ts4.0/analytics/performance.d.ts +0 -15
  24. package/dist/types-ts4.0/analytics/ufo.d.ts +0 -3
  25. package/dist/types-ts4.0/channel.d.ts +0 -47
  26. package/dist/types-ts4.0/config.d.ts +0 -5
  27. package/dist/types-ts4.0/connectivity/network.d.ts +0 -17
  28. package/dist/types-ts4.0/connectivity/reconnect-helper.d.ts +0 -8
  29. package/dist/types-ts4.0/connectivity/singleton.d.ts +0 -3
  30. package/dist/types-ts4.0/disconnected-reason-mapper.d.ts +0 -16
  31. package/dist/types-ts4.0/document/catchup.d.ts +0 -9
  32. package/dist/types-ts4.0/document/document-service.d.ts +0 -86
  33. package/dist/types-ts4.0/document/step-queue-state.d.ts +0 -16
  34. package/dist/types-ts4.0/emitter.d.ts +0 -19
  35. package/dist/types-ts4.0/errors/error-code-mapper.d.ts +0 -2
  36. package/dist/types-ts4.0/errors/error-types.d.ts +0 -443
  37. package/dist/types-ts4.0/feature-flags/__test__/index.unit.d.ts +0 -1
  38. package/dist/types-ts4.0/feature-flags/index.d.ts +0 -9
  39. package/dist/types-ts4.0/feature-flags/types.d.ts +0 -13
  40. package/dist/types-ts4.0/helpers/const.d.ts +0 -183
  41. package/dist/types-ts4.0/helpers/utils.d.ts +0 -5
  42. package/dist/types-ts4.0/index.d.ts +0 -4
  43. package/dist/types-ts4.0/metadata/metadata-service.d.ts +0 -25
  44. package/dist/types-ts4.0/participants/participants-helper.d.ts +0 -14
  45. package/dist/types-ts4.0/participants/participants-service.d.ts +0 -70
  46. package/dist/types-ts4.0/participants/participants-state.d.ts +0 -13
  47. package/dist/types-ts4.0/participants/telepointers-helper.d.ts +0 -4
  48. package/dist/types-ts4.0/provider/commit-step.d.ts +0 -25
  49. package/dist/types-ts4.0/provider/index.d.ts +0 -162
  50. package/dist/types-ts4.0/socket-io-provider.d.ts +0 -5
  51. package/dist/types-ts4.0/types.d.ts +0 -265
  52. package/dist/types-ts4.0/version-wrapper.d.ts +0 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/collab-provider
2
2
 
3
+ ## 8.8.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
8
+
3
9
  ## 8.8.1
4
10
 
5
11
  ### Patch Changes
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.version = exports.nextMajorVersion = exports.name = void 0;
7
7
  var name = "@atlaskit/collab-provider";
8
8
  exports.name = name;
9
- var version = "8.8.1";
9
+ var version = "8.8.2";
10
10
  exports.version = version;
11
11
  var nextMajorVersion = function nextMajorVersion() {
12
12
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/collab-provider",
3
- "version": "8.8.1",
3
+ "version": "8.8.2",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/collab-provider";
2
- export const version = "8.8.1";
2
+ export const version = "8.8.2";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/collab-provider",
3
- "version": "8.8.1",
3
+ "version": "8.8.2",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/collab-provider";
2
- export var version = "8.8.1";
2
+ export var version = "8.8.2";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/collab-provider",
3
- "version": "8.8.1",
3
+ "version": "8.8.2",
4
4
  "sideEffects": false
5
5
  }
@@ -34,7 +34,7 @@ export declare class Channel extends Emitter<ChannelEvent> {
34
34
  * @throws {NotInitializedError} Channel not initialized
35
35
  * @throws {NotConnectedError} Channel not connected
36
36
  */
37
- broadcast: <K extends keyof ChannelEvent>(type: K, data: Omit<ChannelEvent[K], "timestamp">, callback?: Function | undefined) => void;
37
+ broadcast: <K extends keyof ChannelEvent>(type: K, data: Omit<ChannelEvent[K], "timestamp">, callback?: Function) => void;
38
38
  /**
39
39
  * Send metadata to the back-end service over the channel
40
40
  * @throws {NotInitializedError} Channel not initialized
@@ -26,7 +26,7 @@ export declare enum NCS_ERROR_CODE {
26
26
  INVALID_DOCUMENT_ARI = "INVALID_DOCUMENT_ARI",
27
27
  INVALID_CLOUD_ID = "INVALID_CLOUD_ID"
28
28
  }
29
- declare type HeadVersionUpdateFailedError = {
29
+ type HeadVersionUpdateFailedError = {
30
30
  message: string;
31
31
  data: {
32
32
  code: NCS_ERROR_CODE.HEAD_VERSION_UPDATE_FAILED;
@@ -37,7 +37,7 @@ declare type HeadVersionUpdateFailedError = {
37
37
  status: number;
38
38
  };
39
39
  };
40
- declare type VersionAlreadyPresentInDynamoError = {
40
+ type VersionAlreadyPresentInDynamoError = {
41
41
  message: string;
42
42
  data: {
43
43
  code: NCS_ERROR_CODE.VERSION_NUMBER_ALREADY_EXISTS;
@@ -45,7 +45,7 @@ declare type VersionAlreadyPresentInDynamoError = {
45
45
  status: number;
46
46
  };
47
47
  };
48
- declare type InsufficientEditingPermissionError = {
48
+ type InsufficientEditingPermissionError = {
49
49
  message: string;
50
50
  data: {
51
51
  code: NCS_ERROR_CODE.INSUFFICIENT_EDITING_PERMISSION;
@@ -56,7 +56,7 @@ declare type InsufficientEditingPermissionError = {
56
56
  status: number;
57
57
  };
58
58
  };
59
- declare type ForbiddenUserTokenError = {
59
+ type ForbiddenUserTokenError = {
60
60
  message: string;
61
61
  data: {
62
62
  code: NCS_ERROR_CODE.FORBIDDEN_USER_TOKEN;
@@ -64,28 +64,28 @@ declare type ForbiddenUserTokenError = {
64
64
  status: number;
65
65
  };
66
66
  };
67
- declare type NCSDocumentNotFoundError = {
67
+ type NCSDocumentNotFoundError = {
68
68
  message: string;
69
69
  data: {
70
70
  code: NCS_ERROR_CODE.DOCUMENT_NOT_FOUND;
71
71
  status: number;
72
72
  };
73
73
  };
74
- declare type FailedToLoadInitDataError = {
74
+ type FailedToLoadInitDataError = {
75
75
  message: string;
76
76
  data: {
77
77
  code: NCS_ERROR_CODE.INIT_DATA_LOAD_FAILED;
78
78
  status: number;
79
79
  };
80
80
  };
81
- declare type ErrorMappingError = {
81
+ type ErrorMappingError = {
82
82
  message: string;
83
83
  data: {
84
84
  code: NCS_ERROR_CODE.ERROR_MAPPING_ERROR;
85
85
  status: number;
86
86
  };
87
87
  };
88
- declare type InvalidNamespaceDefinedError = {
88
+ type InvalidNamespaceDefinedError = {
89
89
  message: string;
90
90
  data: {
91
91
  code: NCS_ERROR_CODE.NAMESPACE_INVALID;
@@ -93,7 +93,7 @@ declare type InvalidNamespaceDefinedError = {
93
93
  status: number;
94
94
  };
95
95
  };
96
- declare type SocketNamespaceNotFoundError = {
96
+ type SocketNamespaceNotFoundError = {
97
97
  message: string;
98
98
  data: {
99
99
  code: NCS_ERROR_CODE.NAMESPACE_NOT_FOUND;
@@ -101,7 +101,7 @@ declare type SocketNamespaceNotFoundError = {
101
101
  status: number;
102
102
  };
103
103
  };
104
- declare type TenantInstanceMaintenanceError = {
104
+ type TenantInstanceMaintenanceError = {
105
105
  message: string;
106
106
  data: {
107
107
  code: NCS_ERROR_CODE.TENANT_INSTANCE_MAINTENANCE;
@@ -112,7 +112,7 @@ declare type TenantInstanceMaintenanceError = {
112
112
  status: number;
113
113
  };
114
114
  };
115
- declare type NamespaceLockedError = {
115
+ type NamespaceLockedError = {
116
116
  message: string;
117
117
  data: {
118
118
  code: NCS_ERROR_CODE.LOCKED_DOCUMENT;
@@ -120,7 +120,7 @@ declare type NamespaceLockedError = {
120
120
  status: number;
121
121
  };
122
122
  };
123
- declare type EmptyBroadcastError = {
123
+ type EmptyBroadcastError = {
124
124
  message: string;
125
125
  data: {
126
126
  code: NCS_ERROR_CODE.EMPTY_BROADCAST;
@@ -128,7 +128,7 @@ declare type EmptyBroadcastError = {
128
128
  status: number;
129
129
  };
130
130
  };
131
- declare type DynamoError = {
131
+ type DynamoError = {
132
132
  message: string;
133
133
  data: {
134
134
  code: NCS_ERROR_CODE.DYNAMO_ERROR;
@@ -136,7 +136,7 @@ declare type DynamoError = {
136
136
  status: number;
137
137
  };
138
138
  };
139
- declare type InvalidActivationIdError = {
139
+ type InvalidActivationIdError = {
140
140
  message: string;
141
141
  data: {
142
142
  code: NCS_ERROR_CODE.INVALID_ACTIVATION_ID;
@@ -144,7 +144,7 @@ declare type InvalidActivationIdError = {
144
144
  status: number;
145
145
  };
146
146
  };
147
- declare type InvalidDocumentAriError = {
147
+ type InvalidDocumentAriError = {
148
148
  message: string;
149
149
  data: {
150
150
  code: NCS_ERROR_CODE.INVALID_DOCUMENT_ARI;
@@ -152,7 +152,7 @@ declare type InvalidDocumentAriError = {
152
152
  status: number;
153
153
  };
154
154
  };
155
- declare type InvalidCloudIdError = {
155
+ type InvalidCloudIdError = {
156
156
  message: string;
157
157
  data: {
158
158
  code: NCS_ERROR_CODE.INVALID_CLOUD_ID;
@@ -160,29 +160,29 @@ declare type InvalidCloudIdError = {
160
160
  status: number;
161
161
  };
162
162
  };
163
- declare type NCSErrors = HeadVersionUpdateFailedError | VersionAlreadyPresentInDynamoError | InsufficientEditingPermissionError | ForbiddenUserTokenError | NCSDocumentNotFoundError | FailedToLoadInitDataError | ErrorMappingError | InvalidNamespaceDefinedError | SocketNamespaceNotFoundError | TenantInstanceMaintenanceError | NamespaceLockedError | EmptyBroadcastError | DynamoError | InvalidActivationIdError | InvalidDocumentAriError | InvalidCloudIdError;
164
- declare type DocumentRecoveryError = {
163
+ type NCSErrors = HeadVersionUpdateFailedError | VersionAlreadyPresentInDynamoError | InsufficientEditingPermissionError | ForbiddenUserTokenError | NCSDocumentNotFoundError | FailedToLoadInitDataError | ErrorMappingError | InvalidNamespaceDefinedError | SocketNamespaceNotFoundError | TenantInstanceMaintenanceError | NamespaceLockedError | EmptyBroadcastError | DynamoError | InvalidActivationIdError | InvalidDocumentAriError | InvalidCloudIdError;
164
+ type DocumentRecoveryError = {
165
165
  message: string;
166
166
  data: {
167
167
  code: INTERNAL_ERROR_CODE.DOCUMENT_RESTORE_ERROR;
168
168
  status: number;
169
169
  };
170
170
  };
171
- declare type AddStepsError = {
171
+ type AddStepsError = {
172
172
  message: string;
173
173
  data: {
174
174
  code: INTERNAL_ERROR_CODE.ADD_STEPS_ERROR;
175
175
  status: number;
176
176
  };
177
177
  };
178
- export declare type CatchUpFailedError = {
178
+ export type CatchUpFailedError = {
179
179
  message: string;
180
180
  data: {
181
181
  code: INTERNAL_ERROR_CODE.CATCHUP_FAILED;
182
182
  status: number;
183
183
  };
184
184
  };
185
- export declare type TokenPermissionError = {
185
+ export type TokenPermissionError = {
186
186
  message: string;
187
187
  data: {
188
188
  code: INTERNAL_ERROR_CODE.TOKEN_PERMISSION_ERROR;
@@ -193,26 +193,26 @@ export declare type TokenPermissionError = {
193
193
  };
194
194
  };
195
195
  };
196
- export declare type ReconnectionError = {
196
+ export type ReconnectionError = {
197
197
  message: string;
198
198
  data: {
199
199
  code: INTERNAL_ERROR_CODE.RECONNECTION_ERROR;
200
200
  status: number;
201
201
  };
202
202
  };
203
- export declare type ConnectionError = {
203
+ export type ConnectionError = {
204
204
  message: string;
205
205
  data: {
206
206
  code: INTERNAL_ERROR_CODE.CONNECTION_ERROR;
207
207
  };
208
208
  };
209
- export declare type ReconnectionNetworkError = {
209
+ export type ReconnectionNetworkError = {
210
210
  message: string;
211
211
  data: {
212
212
  code: INTERNAL_ERROR_CODE.RECONNECTION_NETWORK_ISSUE;
213
213
  };
214
214
  };
215
- export declare type DocumentNotFoundError = {
215
+ export type DocumentNotFoundError = {
216
216
  message: string;
217
217
  data: {
218
218
  code: INTERNAL_ERROR_CODE.DOCUMENT_NOT_FOUND;
@@ -222,7 +222,7 @@ export declare type DocumentNotFoundError = {
222
222
  /**
223
223
  * A union of all possible internal errors, that are mapped to another error if being emitted to the editor.
224
224
  */
225
- export declare type InternalError = NCSErrors | DocumentRecoveryError | AddStepsError | CatchUpFailedError | TokenPermissionError | ReconnectionError | ConnectionError | ReconnectionNetworkError | DocumentNotFoundError;
225
+ export type InternalError = NCSErrors | DocumentRecoveryError | AddStepsError | CatchUpFailedError | TokenPermissionError | ReconnectionError | ConnectionError | ReconnectionNetworkError | DocumentNotFoundError;
226
226
  export declare enum PROVIDER_ERROR_CODE {
227
227
  NO_PERMISSION_ERROR = "NO_PERMISSION_ERROR",
228
228
  INVALID_USER_TOKEN = "INVALID_USER_TOKEN",
@@ -242,7 +242,7 @@ export declare enum PROVIDER_ERROR_CODE {
242
242
  * @message Message returned to editor, i.e User does not have permissions to access this document or document is not found
243
243
  * @recoverable It is recoverable, as we will try to refresh the token.
244
244
  */
245
- declare type InsufficientEditingPermission = {
245
+ type InsufficientEditingPermission = {
246
246
  code: PROVIDER_ERROR_CODE.NO_PERMISSION_ERROR;
247
247
  message: string;
248
248
  recoverable: boolean;
@@ -259,7 +259,7 @@ declare type InsufficientEditingPermission = {
259
259
  * @message Message returned to editor, i.e. The user token was invalid
260
260
  * @recoverable It is recoverable, as we will try to refresh the token.
261
261
  */
262
- declare type InvalidUserToken = {
262
+ type InvalidUserToken = {
263
263
  code: PROVIDER_ERROR_CODE.INVALID_USER_TOKEN;
264
264
  message: string;
265
265
  recoverable: boolean;
@@ -275,7 +275,7 @@ declare type InvalidUserToken = {
275
275
  * @message Message returned to editor, i.e. The requested document is not found
276
276
  * @recoverable It is recoverable, as the provider can try again later.
277
277
  */
278
- declare type DocumentNotFound = {
278
+ type DocumentNotFound = {
279
279
  code: PROVIDER_ERROR_CODE.DOCUMENT_NOT_FOUND;
280
280
  message: string;
281
281
  recoverable: boolean;
@@ -290,7 +290,7 @@ declare type DocumentNotFound = {
290
290
  * @message Message returned to editor, i.e. The document is currently not available, please try again later
291
291
  * @recoverable It is recoverable, as the provider can try again later.
292
292
  */
293
- declare type Locked = {
293
+ type Locked = {
294
294
  code: PROVIDER_ERROR_CODE.LOCKED;
295
295
  message: string;
296
296
  recoverable: boolean;
@@ -303,7 +303,7 @@ declare type Locked = {
303
303
  * @message Message returned to editor, i.e. Collab service is not able to save changes
304
304
  * @recoverable It is not recoverable, as we don't want the user to continue editing a document that is not being saved.
305
305
  */
306
- declare type FailToSave = {
306
+ type FailToSave = {
307
307
  code: PROVIDER_ERROR_CODE.FAIL_TO_SAVE;
308
308
  message: string;
309
309
  recoverable: boolean;
@@ -321,7 +321,7 @@ declare type FailToSave = {
321
321
  * @recoverable It is not recoverable, as the provider has no further options after this.
322
322
  * The user will need to refresh the page to try again.
323
323
  */
324
- declare type DocumentNotRestore = {
324
+ type DocumentNotRestore = {
325
325
  code: PROVIDER_ERROR_CODE.DOCUMENT_RESTORE_ERROR;
326
326
  message: string;
327
327
  recoverable: boolean;
@@ -338,7 +338,7 @@ declare type DocumentNotRestore = {
338
338
  * @recoverable It is not recoverable, as the provider cannot do anything to fix it.
339
339
  * The user will need to refresh the page to try again.
340
340
  */
341
- declare type InitialisationError = {
341
+ type InitialisationError = {
342
342
  code: PROVIDER_ERROR_CODE.INITIALISATION_ERROR;
343
343
  message: string;
344
344
  recoverable: boolean;
@@ -354,7 +354,7 @@ declare type InitialisationError = {
354
354
  * @message Message returned to editor, i.e. Couldn't reconnect to the collab service due to network issues
355
355
  * @recoverable It is recoverable, as the provider will try to reconnect.
356
356
  */
357
- declare type NetworkIssue = {
357
+ type NetworkIssue = {
358
358
  code: PROVIDER_ERROR_CODE.NETWORK_ISSUE;
359
359
  message: string;
360
360
  recoverable: boolean;
@@ -374,7 +374,7 @@ declare type NetworkIssue = {
374
374
  * @recoverable It is not recoverable, as the provider cannot do anything to fix it.
375
375
  * The service using the provider will need to fix the configuration.
376
376
  */
377
- declare type InvalidProviderConfiguration = {
377
+ type InvalidProviderConfiguration = {
378
378
  code: PROVIDER_ERROR_CODE.INVALID_PROVIDER_CONFIGURATION;
379
379
  message: string;
380
380
  recoverable: boolean;
@@ -389,7 +389,7 @@ declare type InvalidProviderConfiguration = {
389
389
  * @message Message returned to editor, i.e. Collab Provider experienced an unrecoverable error
390
390
  * @recoverable It is not recoverable, as the provider cannot do anything to fix it.
391
391
  */
392
- declare type InternalServiceError = {
392
+ type InternalServiceError = {
393
393
  code: PROVIDER_ERROR_CODE.INTERNAL_SERVICE_ERROR;
394
394
  message: string;
395
395
  recoverable: boolean;
@@ -402,7 +402,7 @@ declare type InternalServiceError = {
402
402
  /**
403
403
  * A union of all possible provider errors that can be emitted back to the editor.
404
404
  */
405
- export declare type ProviderError = InsufficientEditingPermission | InvalidUserToken | DocumentNotFound | Locked | FailToSave | DocumentNotRestore | InitialisationError | NetworkIssue | InvalidProviderConfiguration | InternalServiceError;
405
+ export type ProviderError = InsufficientEditingPermission | InvalidUserToken | DocumentNotFound | Locked | FailToSave | DocumentNotRestore | InitialisationError | NetworkIssue | InvalidProviderConfiguration | InternalServiceError;
406
406
  declare class CustomError extends Error {
407
407
  constructor(message: string, error?: unknown);
408
408
  toJSON(): {
@@ -4,8 +4,8 @@ export interface NCSFeatureFlags {
4
4
  export interface WithNCSFeatureFlags {
5
5
  featureFlags?: NCSFeatureFlags;
6
6
  }
7
- export declare type RequiredNCSFeatureFlags = Record<keyof Required<NCSFeatureFlags>, boolean>;
8
- export declare type NCSFeatureFlagsMap = Record<keyof Required<NCSFeatureFlags>, string>;
7
+ export type RequiredNCSFeatureFlags = Record<keyof Required<NCSFeatureFlags>, boolean>;
8
+ export type NCSFeatureFlagsMap = Record<keyof Required<NCSFeatureFlags>, string>;
9
9
  export declare const supportedProducts: readonly ["confluence"];
10
- export declare type SupportedProduct = (typeof supportedProducts)[number];
11
- export declare type ProductKeys = Record<SupportedProduct, NCSFeatureFlagsMap>;
10
+ export type SupportedProduct = (typeof supportedProducts)[number];
11
+ export type ProductKeys = Record<SupportedProduct, NCSFeatureFlagsMap>;
@@ -21,7 +21,7 @@ export declare enum ADD_STEPS_TYPE {
21
21
  REJECTED = "REJECTED",
22
22
  ERROR = "ERROR"
23
23
  }
24
- export declare type ErrorAnalyticsEvent = {
24
+ export type ErrorAnalyticsEvent = {
25
25
  eventAction: EVENT_ACTION.ERROR;
26
26
  attributes: {
27
27
  errorMessage: string;
@@ -33,7 +33,7 @@ export declare type ErrorAnalyticsEvent = {
33
33
  error: unknown;
34
34
  };
35
35
  };
36
- declare type InvalidateTokenAnalyticsEvent = {
36
+ type InvalidateTokenAnalyticsEvent = {
37
37
  eventAction: EVENT_ACTION.INVALIDATE_TOKEN;
38
38
  attributes: {
39
39
  eventStatus: EVENT_STATUS.SUCCESS;
@@ -41,7 +41,7 @@ declare type InvalidateTokenAnalyticsEvent = {
41
41
  usedCachedToken?: boolean;
42
42
  };
43
43
  };
44
- declare type AddStepsSuccessAnalyticsEvent = {
44
+ type AddStepsSuccessAnalyticsEvent = {
45
45
  eventAction: EVENT_ACTION.ADD_STEPS;
46
46
  attributes: {
47
47
  documentAri: string;
@@ -53,7 +53,7 @@ declare type AddStepsSuccessAnalyticsEvent = {
53
53
  };
54
54
  };
55
55
  };
56
- declare type AddStepsFailureAnalyticsEvent = {
56
+ type AddStepsFailureAnalyticsEvent = {
57
57
  eventAction: EVENT_ACTION.ADD_STEPS;
58
58
  attributes: {
59
59
  documentAri: string;
@@ -62,7 +62,7 @@ declare type AddStepsFailureAnalyticsEvent = {
62
62
  latency?: number;
63
63
  };
64
64
  };
65
- declare type ReInitDocFailAnalyticsEvent = {
65
+ type ReInitDocFailAnalyticsEvent = {
66
66
  eventAction: EVENT_ACTION.REINITIALISE_DOCUMENT;
67
67
  attributes: {
68
68
  documentAri: string;
@@ -70,7 +70,7 @@ declare type ReInitDocFailAnalyticsEvent = {
70
70
  numUnconfirmedSteps: number;
71
71
  };
72
72
  };
73
- declare type ReInitDocSuccessAnalyticsEvent = {
73
+ type ReInitDocSuccessAnalyticsEvent = {
74
74
  eventAction: EVENT_ACTION.REINITIALISE_DOCUMENT;
75
75
  attributes: {
76
76
  documentAri: string;
@@ -78,7 +78,7 @@ declare type ReInitDocSuccessAnalyticsEvent = {
78
78
  numUnconfirmedSteps: number;
79
79
  };
80
80
  };
81
- declare type ConnectionSuccessAnalyticsEvent = {
81
+ type ConnectionSuccessAnalyticsEvent = {
82
82
  eventAction: EVENT_ACTION.CONNECTION;
83
83
  attributes: {
84
84
  documentAri: string;
@@ -86,7 +86,7 @@ declare type ConnectionSuccessAnalyticsEvent = {
86
86
  latency?: number;
87
87
  };
88
88
  };
89
- declare type ConnectionFailureAnalyticsEvent = {
89
+ type ConnectionFailureAnalyticsEvent = {
90
90
  eventAction: EVENT_ACTION.CONNECTION;
91
91
  attributes: {
92
92
  documentAri: string;
@@ -94,7 +94,7 @@ declare type ConnectionFailureAnalyticsEvent = {
94
94
  latency?: number;
95
95
  };
96
96
  };
97
- declare type CatchUpSuccessAnalyticsEvent = {
97
+ type CatchUpSuccessAnalyticsEvent = {
98
98
  eventAction: EVENT_ACTION.CATCHUP;
99
99
  attributes: {
100
100
  documentAri: string;
@@ -102,7 +102,7 @@ declare type CatchUpSuccessAnalyticsEvent = {
102
102
  latency?: number;
103
103
  };
104
104
  };
105
- declare type CatchUpFailureAnalyticsEvent = {
105
+ type CatchUpFailureAnalyticsEvent = {
106
106
  eventAction: EVENT_ACTION.CATCHUP;
107
107
  attributes: {
108
108
  documentAri: string;
@@ -110,7 +110,7 @@ declare type CatchUpFailureAnalyticsEvent = {
110
110
  latency?: number;
111
111
  };
112
112
  };
113
- declare type DocumentInitSuccessAnalyticsEvent = {
113
+ type DocumentInitSuccessAnalyticsEvent = {
114
114
  eventAction: EVENT_ACTION.DOCUMENT_INIT;
115
115
  attributes: {
116
116
  documentAri: string;
@@ -119,7 +119,7 @@ declare type DocumentInitSuccessAnalyticsEvent = {
119
119
  resetReason?: string;
120
120
  };
121
121
  };
122
- declare type UpdateParticipantsSuccessAnalyticsEvent = {
122
+ type UpdateParticipantsSuccessAnalyticsEvent = {
123
123
  eventAction: EVENT_ACTION.UPDATE_PARTICIPANTS;
124
124
  attributes: {
125
125
  documentAri?: string;
@@ -127,7 +127,7 @@ declare type UpdateParticipantsSuccessAnalyticsEvent = {
127
127
  participants: number;
128
128
  };
129
129
  };
130
- declare type CommitUnconfirmedStepsSuccessAnalyticsEvent = {
130
+ type CommitUnconfirmedStepsSuccessAnalyticsEvent = {
131
131
  eventAction: EVENT_ACTION.COMMIT_UNCONFIRMED_STEPS;
132
132
  attributes: {
133
133
  documentAri: string;
@@ -136,7 +136,7 @@ declare type CommitUnconfirmedStepsSuccessAnalyticsEvent = {
136
136
  numUnconfirmedSteps?: number;
137
137
  };
138
138
  };
139
- declare type CommitUnconfirmedStepsFailureAnalyticsEvent = {
139
+ type CommitUnconfirmedStepsFailureAnalyticsEvent = {
140
140
  eventAction: EVENT_ACTION.COMMIT_UNCONFIRMED_STEPS;
141
141
  attributes: {
142
142
  documentAri: string;
@@ -145,7 +145,7 @@ declare type CommitUnconfirmedStepsFailureAnalyticsEvent = {
145
145
  numUnconfirmedSteps?: number;
146
146
  };
147
147
  };
148
- declare type PublishPageSuccessAnalyticsEvent = {
148
+ type PublishPageSuccessAnalyticsEvent = {
149
149
  eventAction: EVENT_ACTION.PUBLISH_PAGE;
150
150
  attributes: {
151
151
  documentAri: string;
@@ -153,7 +153,7 @@ declare type PublishPageSuccessAnalyticsEvent = {
153
153
  latency?: number;
154
154
  };
155
155
  };
156
- declare type PublishPageFailureAnalyticsEvent = {
156
+ type PublishPageFailureAnalyticsEvent = {
157
157
  eventAction: EVENT_ACTION.PUBLISH_PAGE;
158
158
  attributes: {
159
159
  documentAri: string;
@@ -161,7 +161,7 @@ declare type PublishPageFailureAnalyticsEvent = {
161
161
  latency?: number;
162
162
  };
163
163
  };
164
- declare type GetCurrentStateSuccessAnalyticsEvent = {
164
+ type GetCurrentStateSuccessAnalyticsEvent = {
165
165
  eventAction: EVENT_ACTION.GET_CURRENT_STATE;
166
166
  attributes: {
167
167
  documentAri: string;
@@ -169,7 +169,7 @@ declare type GetCurrentStateSuccessAnalyticsEvent = {
169
169
  latency?: number;
170
170
  };
171
171
  };
172
- declare type GetCurrentStateFailureAnalyticsEvent = {
172
+ type GetCurrentStateFailureAnalyticsEvent = {
173
173
  eventAction: EVENT_ACTION.GET_CURRENT_STATE;
174
174
  attributes: {
175
175
  documentAri: string;
@@ -177,7 +177,7 @@ declare type GetCurrentStateFailureAnalyticsEvent = {
177
177
  latency?: number;
178
178
  };
179
179
  };
180
- export declare type ActionAnalyticsEvent = AddStepsSuccessAnalyticsEvent | AddStepsFailureAnalyticsEvent | ReInitDocFailAnalyticsEvent | ReInitDocSuccessAnalyticsEvent | ConnectionSuccessAnalyticsEvent | ConnectionFailureAnalyticsEvent | CatchUpSuccessAnalyticsEvent | CatchUpFailureAnalyticsEvent | DocumentInitSuccessAnalyticsEvent | UpdateParticipantsSuccessAnalyticsEvent | CommitUnconfirmedStepsSuccessAnalyticsEvent | CommitUnconfirmedStepsFailureAnalyticsEvent | PublishPageSuccessAnalyticsEvent | PublishPageFailureAnalyticsEvent | GetCurrentStateSuccessAnalyticsEvent | GetCurrentStateFailureAnalyticsEvent | InvalidateTokenAnalyticsEvent;
180
+ export type ActionAnalyticsEvent = AddStepsSuccessAnalyticsEvent | AddStepsFailureAnalyticsEvent | ReInitDocFailAnalyticsEvent | ReInitDocSuccessAnalyticsEvent | ConnectionSuccessAnalyticsEvent | ConnectionFailureAnalyticsEvent | CatchUpSuccessAnalyticsEvent | CatchUpFailureAnalyticsEvent | DocumentInitSuccessAnalyticsEvent | UpdateParticipantsSuccessAnalyticsEvent | CommitUnconfirmedStepsSuccessAnalyticsEvent | CommitUnconfirmedStepsFailureAnalyticsEvent | PublishPageSuccessAnalyticsEvent | PublishPageFailureAnalyticsEvent | GetCurrentStateSuccessAnalyticsEvent | GetCurrentStateFailureAnalyticsEvent | InvalidateTokenAnalyticsEvent;
181
181
  export declare const ACK_MAX_TRY = 30;
182
182
  export declare const CONFLUENCE = "confluence";
183
183
  export {};
@@ -1,5 +1,5 @@
1
1
  import type { ProductInformation } from '../types';
2
2
  export declare const createLogger: (prefix: string, color?: string) => (msg: string, data?: any) => void;
3
3
  export declare function sleep(ms: number): Promise<unknown>;
4
- export declare const getProduct: (productInfo?: ProductInformation | undefined) => string;
5
- export declare const getSubProduct: (productInfo?: ProductInformation | undefined) => string;
4
+ export declare const getProduct: (productInfo?: ProductInformation) => string;
5
+ export declare const getSubProduct: (productInfo?: ProductInformation) => string;
@@ -9,7 +9,7 @@ export declare class MetadataService {
9
9
  /**
10
10
  * Called when a metadata is changed externally from other clients/backend.
11
11
  */
12
- onMetadataChanged: (metadata?: Metadata | undefined) => void;
12
+ onMetadataChanged: (metadata?: Metadata) => void;
13
13
  setTitle(title: string, broadcast?: boolean): void;
14
14
  setEditorWidth(editorWidth: string, broadcast?: boolean): void;
15
15
  /**
@@ -1,14 +1,14 @@
1
1
  import type { CollabEventPresenceData, CollabParticipant } from '@atlaskit/editor-common/collab';
2
2
  import type { CollabEventTelepointerData, PresencePayload } from '../types';
3
3
  export declare const PARTICIPANT_UPDATE_INTERVAL: number;
4
- export declare type ProviderParticipant = CollabParticipant & {
4
+ export type ProviderParticipant = CollabParticipant & {
5
5
  userId: string;
6
6
  clientId: number | string;
7
7
  };
8
- export declare type ParticipantsMap = Map<string, ProviderParticipant>;
9
- export declare type PresenceEmit = (evt: 'presence', data: CollabEventPresenceData) => void;
10
- export declare type TelepointerEmit = (evt: 'telepointer', data: CollabEventTelepointerData) => void;
11
- export declare type GetUserType = ((userId: string) => Promise<Pick<ProviderParticipant, 'name' | 'avatar' | 'userId'>>) | undefined;
8
+ export type ParticipantsMap = Map<string, ProviderParticipant>;
9
+ export type PresenceEmit = (evt: 'presence', data: CollabEventPresenceData) => void;
10
+ export type TelepointerEmit = (evt: 'telepointer', data: CollabEventTelepointerData) => void;
11
+ export type GetUserType = ((userId: string) => Promise<Pick<ProviderParticipant, 'name' | 'avatar' | 'userId'>>) | undefined;
12
12
  export declare const createParticipantFromPayload: (payload: PresencePayload & {
13
13
  userId: string;
14
14
  }, getUser: GetUserType) => Promise<ProviderParticipant>;
@@ -4,7 +4,7 @@ import type { Step as ProseMirrorStep } from 'prosemirror-transform';
4
4
  import AnalyticsHelper from '../analytics/analytics-helper';
5
5
  import type { InternalError } from '../errors/error-types';
6
6
  export declare const commitStep: ({ broadcast, steps, version, userId, clientId, onStepsAdded, onErrorHandled, analyticsHelper, }: {
7
- broadcast: <K extends keyof ChannelEvent>(type: K, data: Omit<ChannelEvent[K], "timestamp">, callback?: Function | undefined) => void;
7
+ broadcast: <K extends keyof ChannelEvent>(type: K, data: Omit<ChannelEvent[K], "timestamp">, callback?: Function) => void;
8
8
  steps: readonly ProseMirrorStep[];
9
9
  version: number;
10
10
  userId: string;
@@ -14,7 +14,7 @@ export declare const commitStep: ({ broadcast, steps, version, userId, clientId,
14
14
  analyticsHelper?: AnalyticsHelper | undefined;
15
15
  }) => void;
16
16
  export declare const throttledCommitStep: import("lodash").DebouncedFunc<({ broadcast, steps, version, userId, clientId, onStepsAdded, onErrorHandled, analyticsHelper, }: {
17
- broadcast: <K extends keyof ChannelEvent>(type: K, data: Omit<ChannelEvent[K], "timestamp">, callback?: Function | undefined) => void;
17
+ broadcast: <K extends keyof ChannelEvent>(type: K, data: Omit<ChannelEvent[K], "timestamp">, callback?: Function) => void;
18
18
  steps: readonly ProseMirrorStep[];
19
19
  version: number;
20
20
  userId: string;
@@ -5,7 +5,7 @@ import type { ResolvedEditorState } from '@atlaskit/editor-common/collab';
5
5
  import type { CollabEditProvider, CollabEvents, CollabEventTelepointerData, Config, Metadata } from '../types';
6
6
  import type { SyncUpErrorFunction } from '@atlaskit/editor-common/types';
7
7
  export declare const MAX_STEP_REJECTED_ERROR = 15;
8
- declare type BaseEvents = Pick<CollabEditProvider<CollabEvents>, 'setup' | 'send' | 'sendMessage'>;
8
+ type BaseEvents = Pick<CollabEditProvider<CollabEvents>, 'setup' | 'send' | 'sendMessage'>;
9
9
  export declare class Provider extends Emitter<CollabEvents> implements BaseEvents {
10
10
  private channel;
11
11
  private config;