@atlaskit/collab-provider 20.0.16 → 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 +6 -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,16 +0,0 @@
|
|
|
1
|
-
import type { StepsPayload } from '../types';
|
|
2
|
-
export declare class StepQueueState {
|
|
3
|
-
private queuePaused;
|
|
4
|
-
private queue;
|
|
5
|
-
queueSteps(data: StepsPayload): void;
|
|
6
|
-
getQueue: () => StepsPayload[];
|
|
7
|
-
filterQueue: (condition: (stepsPayload: StepsPayload) => boolean) => void;
|
|
8
|
-
/**
|
|
9
|
-
* Get whether the document service has stopped processing new steps whilst it carries out processes such as catchup.
|
|
10
|
-
* Exposed for testing
|
|
11
|
-
*/
|
|
12
|
-
isPaused: () => boolean;
|
|
13
|
-
pauseQueue: () => void;
|
|
14
|
-
resumeQueue: () => void;
|
|
15
|
-
shift: () => StepsPayload | undefined;
|
|
16
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare class Emitter<T = any> {
|
|
2
|
-
private eventEmitter;
|
|
3
|
-
/**
|
|
4
|
-
* Emit events to subscribers
|
|
5
|
-
*/
|
|
6
|
-
protected emit<K extends keyof T>(evt: K, data: T[K]): this;
|
|
7
|
-
/**
|
|
8
|
-
* Subscribe to events emitted by this provider
|
|
9
|
-
*/
|
|
10
|
-
on<K extends keyof T>(evt: K, handler: (args: T[K]) => void): this;
|
|
11
|
-
/**
|
|
12
|
-
* Unsubscribe from events emitted by this provider
|
|
13
|
-
*/
|
|
14
|
-
off<K extends keyof T>(evt: K, handler: (args: T[K]) => void): this;
|
|
15
|
-
/**
|
|
16
|
-
* Unsubscribe from all events emitted by this provider.
|
|
17
|
-
*/
|
|
18
|
-
unsubscribeAll<K extends keyof T>(evt?: K): this;
|
|
19
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Provider } from '../provider/index';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { createSocketIOCollabProvider, createSocketIOSocket } from '../socket-io-provider';
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export { AcknowledgementResponseTypes } from '../types';
|
|
2
|
-
export type { AcknowledgementErrorPayload, AcknowledgementPayload, AcknowledgementSuccessPayload, AddStepAcknowledgementPayload, AddStepAcknowledgementSuccessPayload, AuthCallback, BroadcastIncomingPayload, Catchupv2Options, Catchupv2Response, ChannelEvent, CollabEventDisconnectedData, Config, EventHandler, FetchAnonymousAsset, GenerateDiffStepsResponseBody, InitAndAuthData, InitPayload, InitialDraft, Lifecycle, LifecycleEvents, NamespaceStatus, PresenceData, PresencePayload, ProductInformation, ReconcileResponse, ReconnectionMetadata, Socket, StepsPayload, Storage, TelepointerPayload, } from '../types';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { name, nextMajorVersion, version } from '../version-wrapper';
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import type { CantSyncUpErrorAttributes, DocumentUpdateErrorAttributes } from '../helpers/const';
|
|
2
|
-
type ValidEventAttributeType = boolean | string | number | object;
|
|
3
|
-
export declare class CustomError extends Error {
|
|
4
|
-
extraEventAttributes?: {
|
|
5
|
-
[key: string]: ValidEventAttributeType;
|
|
6
|
-
};
|
|
7
|
-
constructor(message: string, error?: unknown, extraEventAttributes?: {
|
|
8
|
-
[key: string]: ValidEventAttributeType;
|
|
9
|
-
});
|
|
10
|
-
toJSON(): {
|
|
11
|
-
name: string;
|
|
12
|
-
message: string;
|
|
13
|
-
};
|
|
14
|
-
getExtraErrorEventAttributes: () => {
|
|
15
|
-
[key: string]: ValidEventAttributeType;
|
|
16
|
-
} | undefined;
|
|
17
|
-
}
|
|
18
|
-
export declare class NotConnectedError extends CustomError {
|
|
19
|
-
name: string;
|
|
20
|
-
}
|
|
21
|
-
export declare class NotInitializedError extends CustomError {
|
|
22
|
-
name: string;
|
|
23
|
-
}
|
|
24
|
-
export declare class ProviderInitialisationError extends CustomError {
|
|
25
|
-
name: string;
|
|
26
|
-
}
|
|
27
|
-
export declare class SendTransactionError extends CustomError {
|
|
28
|
-
name: string;
|
|
29
|
-
}
|
|
30
|
-
export declare class DestroyError extends CustomError {
|
|
31
|
-
name: string;
|
|
32
|
-
}
|
|
33
|
-
export declare class SetTitleError extends CustomError {
|
|
34
|
-
name: string;
|
|
35
|
-
}
|
|
36
|
-
export declare class SetEditorWidthError extends CustomError {
|
|
37
|
-
name: string;
|
|
38
|
-
}
|
|
39
|
-
export declare class SetMetadataError extends CustomError {
|
|
40
|
-
name: string;
|
|
41
|
-
}
|
|
42
|
-
export declare class GetCurrentStateError extends CustomError {
|
|
43
|
-
name: string;
|
|
44
|
-
}
|
|
45
|
-
export declare class GetFinalAcknowledgedStateError extends CustomError {
|
|
46
|
-
name: string;
|
|
47
|
-
}
|
|
48
|
-
export declare class UpdateDocumentError extends CustomError {
|
|
49
|
-
name: string;
|
|
50
|
-
constructor(message: string, extraAttributes: DocumentUpdateErrorAttributes);
|
|
51
|
-
}
|
|
52
|
-
export declare class CantSyncUpError extends CustomError {
|
|
53
|
-
name: string;
|
|
54
|
-
constructor(message: string, extraAttributes: CantSyncUpErrorAttributes);
|
|
55
|
-
}
|
|
56
|
-
export {};
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import type { NCSErrors } from './ncs-errors';
|
|
2
|
-
export declare enum INTERNAL_ERROR_CODE {
|
|
3
|
-
TOKEN_PERMISSION_ERROR = "TOKEN_PERMISSION_ERROR",
|
|
4
|
-
RECONNECTION_NETWORK_ISSUE = "RECONNECTION_NETWORK_ISSUE",
|
|
5
|
-
CONNECTION_ERROR = "CONNECTION_ERROR",
|
|
6
|
-
RECONNECTION_ERROR = "RECONNECTION_ERROR",
|
|
7
|
-
DOCUMENT_NOT_FOUND = "DOCUMENT_NOT_FOUND",
|
|
8
|
-
CATCHUP_FAILED = "CATCHUP_FAILED",
|
|
9
|
-
DOCUMENT_RESTORE_ERROR = "DOCUMENT_RESTORE_ERROR",
|
|
10
|
-
ADD_STEPS_ERROR = "ADD_STEPS_ERROR",
|
|
11
|
-
DOCUMENT_UPDATE_ERROR = "DOCUMENT_UPDATE_ERROR",
|
|
12
|
-
VIEW_ONLY_STEPS_ERROR = "VIEW_ONLY_STEPS_ERROR",
|
|
13
|
-
OUT_OF_SYNC_CLIENT_DATA_LOSS_EVENT = "OUT_OF_SYNC_CLIENT_DATA_LOSS_EVENT"
|
|
14
|
-
}
|
|
15
|
-
type DocumentRecoveryError = {
|
|
16
|
-
data: {
|
|
17
|
-
code: INTERNAL_ERROR_CODE.DOCUMENT_RESTORE_ERROR;
|
|
18
|
-
status: number;
|
|
19
|
-
};
|
|
20
|
-
message: string;
|
|
21
|
-
};
|
|
22
|
-
type AddStepsError = {
|
|
23
|
-
data: {
|
|
24
|
-
code: INTERNAL_ERROR_CODE.ADD_STEPS_ERROR;
|
|
25
|
-
status: number;
|
|
26
|
-
};
|
|
27
|
-
message: string;
|
|
28
|
-
};
|
|
29
|
-
type OutOfSyncClientDatalossEvent = {
|
|
30
|
-
data: {
|
|
31
|
-
code: INTERNAL_ERROR_CODE.OUT_OF_SYNC_CLIENT_DATA_LOSS_EVENT;
|
|
32
|
-
meta: {
|
|
33
|
-
reason?: string;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
message: string;
|
|
37
|
-
};
|
|
38
|
-
export type CatchUpFailedError = {
|
|
39
|
-
data: {
|
|
40
|
-
code: INTERNAL_ERROR_CODE.CATCHUP_FAILED;
|
|
41
|
-
status: number;
|
|
42
|
-
};
|
|
43
|
-
message: string;
|
|
44
|
-
};
|
|
45
|
-
export type TokenPermissionError = {
|
|
46
|
-
data: {
|
|
47
|
-
code: INTERNAL_ERROR_CODE.TOKEN_PERMISSION_ERROR;
|
|
48
|
-
meta: {
|
|
49
|
-
originalError?: unknown;
|
|
50
|
-
reason?: string;
|
|
51
|
-
};
|
|
52
|
-
status: number;
|
|
53
|
-
};
|
|
54
|
-
message: string;
|
|
55
|
-
};
|
|
56
|
-
export type ReconnectionError = {
|
|
57
|
-
data: {
|
|
58
|
-
code: INTERNAL_ERROR_CODE.RECONNECTION_ERROR;
|
|
59
|
-
status: number;
|
|
60
|
-
};
|
|
61
|
-
message: string;
|
|
62
|
-
};
|
|
63
|
-
export type ConnectionError = {
|
|
64
|
-
data: {
|
|
65
|
-
code: INTERNAL_ERROR_CODE.CONNECTION_ERROR;
|
|
66
|
-
};
|
|
67
|
-
message: string;
|
|
68
|
-
};
|
|
69
|
-
export type ReconnectionNetworkError = {
|
|
70
|
-
data: {
|
|
71
|
-
code: INTERNAL_ERROR_CODE.RECONNECTION_NETWORK_ISSUE;
|
|
72
|
-
};
|
|
73
|
-
message: string;
|
|
74
|
-
};
|
|
75
|
-
export type DocumentNotFoundError = {
|
|
76
|
-
data: {
|
|
77
|
-
code: INTERNAL_ERROR_CODE.DOCUMENT_NOT_FOUND;
|
|
78
|
-
status: number;
|
|
79
|
-
};
|
|
80
|
-
message: string;
|
|
81
|
-
};
|
|
82
|
-
/**
|
|
83
|
-
* When we try to apply state updates to the editor, if that fails to apply the user can enter an invalid state where no
|
|
84
|
-
* changes can be saved to NCS.
|
|
85
|
-
*/
|
|
86
|
-
export type InternalDocumentUpdateFailure = {
|
|
87
|
-
data: {
|
|
88
|
-
code: INTERNAL_ERROR_CODE.DOCUMENT_UPDATE_ERROR;
|
|
89
|
-
meta: {
|
|
90
|
-
editorVersion?: number;
|
|
91
|
-
newVersion?: number;
|
|
92
|
-
};
|
|
93
|
-
status: 500;
|
|
94
|
-
};
|
|
95
|
-
message: 'The provider failed to apply changes to the editor';
|
|
96
|
-
};
|
|
97
|
-
/**
|
|
98
|
-
* When in view only mode, we should not generate any steps whatsoever.
|
|
99
|
-
*/
|
|
100
|
-
export type ViewOnlyStepsError = {
|
|
101
|
-
data: {
|
|
102
|
-
code: INTERNAL_ERROR_CODE.VIEW_ONLY_STEPS_ERROR;
|
|
103
|
-
};
|
|
104
|
-
message: 'Attempted to send steps in view only mode';
|
|
105
|
-
};
|
|
106
|
-
/**
|
|
107
|
-
* A union of all possible internal errors, that are mapped to another error if being emitted to the editor.
|
|
108
|
-
*/
|
|
109
|
-
export type InternalError = NCSErrors | DocumentRecoveryError | AddStepsError | CatchUpFailedError | TokenPermissionError | ReconnectionError | ConnectionError | ReconnectionNetworkError | DocumentNotFoundError | InternalDocumentUpdateFailure | OutOfSyncClientDatalossEvent;
|
|
110
|
-
export {};
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
export declare enum NCS_ERROR_CODE {
|
|
2
|
-
HEAD_VERSION_UPDATE_FAILED = "HEAD_VERSION_UPDATE_FAILED",
|
|
3
|
-
VERSION_NUMBER_ALREADY_EXISTS = "VERSION_NUMBER_ALREADY_EXISTS",
|
|
4
|
-
INSUFFICIENT_EDITING_PERMISSION = "INSUFFICIENT_EDITING_PERMISSION",
|
|
5
|
-
FORBIDDEN_USER_TOKEN = "FORBIDDEN_USER_TOKEN",
|
|
6
|
-
DOCUMENT_NOT_FOUND = "DOCUMENT_NOT_FOUND",
|
|
7
|
-
INIT_DATA_LOAD_FAILED = "INIT_DATA_LOAD_FAILED",
|
|
8
|
-
ERROR_MAPPING_ERROR = "ERROR_MAPPING_ERROR",
|
|
9
|
-
NAMESPACE_INVALID = "NAMESPACE_INVALID",
|
|
10
|
-
NAMESPACE_NOT_FOUND = "NAMESPACE_NOT_FOUND",
|
|
11
|
-
TENANT_INSTANCE_MAINTENANCE = "TENANT_INSTANCE_MAINTENANCE",
|
|
12
|
-
LOCKED_DOCUMENT = "LOCKED_DOCUMENT",
|
|
13
|
-
EMPTY_BROADCAST = "EMPTY_BROADCAST",
|
|
14
|
-
DYNAMO_ERROR = "DYNAMO_ERROR",
|
|
15
|
-
INVALID_ACTIVATION_ID = "INVALID_ACTIVATION_ID",
|
|
16
|
-
INVALID_DOCUMENT_ARI = "INVALID_DOCUMENT_ARI",
|
|
17
|
-
INVALID_CLOUD_ID = "INVALID_CLOUD_ID",
|
|
18
|
-
RATE_LIMIT_ERROR = "RATE_LIMIT_ERROR",
|
|
19
|
-
PROSEMIRROR_SCHEMA_VALIDATION_ERROR = "PROSEMIRROR_SCHEMA_VALIDATION_ERROR"
|
|
20
|
-
}
|
|
21
|
-
type HeadVersionUpdateFailedError = {
|
|
22
|
-
data: {
|
|
23
|
-
code: NCS_ERROR_CODE.HEAD_VERSION_UPDATE_FAILED;
|
|
24
|
-
meta: {
|
|
25
|
-
currentVersion: any;
|
|
26
|
-
incomingVersion: number;
|
|
27
|
-
};
|
|
28
|
-
status: number;
|
|
29
|
-
};
|
|
30
|
-
message: string;
|
|
31
|
-
};
|
|
32
|
-
type VersionAlreadyPresentInDynamoError = {
|
|
33
|
-
data: {
|
|
34
|
-
code: NCS_ERROR_CODE.VERSION_NUMBER_ALREADY_EXISTS;
|
|
35
|
-
meta: string;
|
|
36
|
-
status: number;
|
|
37
|
-
};
|
|
38
|
-
message: string;
|
|
39
|
-
};
|
|
40
|
-
type InsufficientEditingPermissionError = {
|
|
41
|
-
data: {
|
|
42
|
-
code: NCS_ERROR_CODE.INSUFFICIENT_EDITING_PERMISSION;
|
|
43
|
-
meta: {
|
|
44
|
-
description: string;
|
|
45
|
-
reason?: string;
|
|
46
|
-
};
|
|
47
|
-
status: number;
|
|
48
|
-
};
|
|
49
|
-
message: string;
|
|
50
|
-
};
|
|
51
|
-
type ForbiddenUserTokenError = {
|
|
52
|
-
data: {
|
|
53
|
-
code: NCS_ERROR_CODE.FORBIDDEN_USER_TOKEN;
|
|
54
|
-
meta: string;
|
|
55
|
-
status: number;
|
|
56
|
-
};
|
|
57
|
-
message: string;
|
|
58
|
-
};
|
|
59
|
-
type NCSDocumentNotFoundError = {
|
|
60
|
-
data: {
|
|
61
|
-
code: NCS_ERROR_CODE.DOCUMENT_NOT_FOUND;
|
|
62
|
-
status: number;
|
|
63
|
-
};
|
|
64
|
-
message: string;
|
|
65
|
-
};
|
|
66
|
-
type FailedToLoadInitDataError = {
|
|
67
|
-
data: {
|
|
68
|
-
code: NCS_ERROR_CODE.INIT_DATA_LOAD_FAILED;
|
|
69
|
-
status: number;
|
|
70
|
-
};
|
|
71
|
-
message: string;
|
|
72
|
-
};
|
|
73
|
-
/**
|
|
74
|
-
* The backend has retrieved the document successfully, as ADF, but failed to convert it to Prosemirror.
|
|
75
|
-
* This might be because invalid ADF has been written to a document, as it was not validated correctly.
|
|
76
|
-
*/
|
|
77
|
-
type ProsemirrorSchemaValidationError = {
|
|
78
|
-
data: {
|
|
79
|
-
code: NCS_ERROR_CODE.PROSEMIRROR_SCHEMA_VALIDATION_ERROR;
|
|
80
|
-
status: number;
|
|
81
|
-
};
|
|
82
|
-
message: string;
|
|
83
|
-
};
|
|
84
|
-
type ErrorMappingError = {
|
|
85
|
-
data: {
|
|
86
|
-
code: NCS_ERROR_CODE.ERROR_MAPPING_ERROR;
|
|
87
|
-
status: number;
|
|
88
|
-
};
|
|
89
|
-
message: string;
|
|
90
|
-
};
|
|
91
|
-
type InvalidNamespaceDefinedError = {
|
|
92
|
-
data: {
|
|
93
|
-
code: NCS_ERROR_CODE.NAMESPACE_INVALID;
|
|
94
|
-
meta: string;
|
|
95
|
-
status: number;
|
|
96
|
-
};
|
|
97
|
-
message: string;
|
|
98
|
-
};
|
|
99
|
-
type SocketNamespaceNotFoundError = {
|
|
100
|
-
data: {
|
|
101
|
-
code: NCS_ERROR_CODE.NAMESPACE_NOT_FOUND;
|
|
102
|
-
meta: string;
|
|
103
|
-
status: number;
|
|
104
|
-
};
|
|
105
|
-
message: string;
|
|
106
|
-
};
|
|
107
|
-
type TenantInstanceMaintenanceError = {
|
|
108
|
-
data: {
|
|
109
|
-
code: NCS_ERROR_CODE.TENANT_INSTANCE_MAINTENANCE;
|
|
110
|
-
meta: {
|
|
111
|
-
description: string;
|
|
112
|
-
reason: string;
|
|
113
|
-
};
|
|
114
|
-
status: number;
|
|
115
|
-
};
|
|
116
|
-
message: string;
|
|
117
|
-
};
|
|
118
|
-
type NamespaceLockedError = {
|
|
119
|
-
data: {
|
|
120
|
-
code: NCS_ERROR_CODE.LOCKED_DOCUMENT;
|
|
121
|
-
meta: string;
|
|
122
|
-
status: number;
|
|
123
|
-
};
|
|
124
|
-
message: string;
|
|
125
|
-
};
|
|
126
|
-
type EmptyBroadcastError = {
|
|
127
|
-
data: {
|
|
128
|
-
code: NCS_ERROR_CODE.EMPTY_BROADCAST;
|
|
129
|
-
meta: string;
|
|
130
|
-
status: number;
|
|
131
|
-
};
|
|
132
|
-
message: string;
|
|
133
|
-
};
|
|
134
|
-
type DynamoError = {
|
|
135
|
-
data: {
|
|
136
|
-
code: NCS_ERROR_CODE.DYNAMO_ERROR;
|
|
137
|
-
meta: string;
|
|
138
|
-
status: number;
|
|
139
|
-
};
|
|
140
|
-
message: string;
|
|
141
|
-
};
|
|
142
|
-
type InvalidActivationIdError = {
|
|
143
|
-
data: {
|
|
144
|
-
code: NCS_ERROR_CODE.INVALID_ACTIVATION_ID;
|
|
145
|
-
meta: string;
|
|
146
|
-
status: number;
|
|
147
|
-
};
|
|
148
|
-
message: string;
|
|
149
|
-
};
|
|
150
|
-
type InvalidDocumentAriError = {
|
|
151
|
-
data: {
|
|
152
|
-
code: NCS_ERROR_CODE.INVALID_DOCUMENT_ARI;
|
|
153
|
-
meta: string;
|
|
154
|
-
status: number;
|
|
155
|
-
};
|
|
156
|
-
message: string;
|
|
157
|
-
};
|
|
158
|
-
type InvalidCloudIdError = {
|
|
159
|
-
data: {
|
|
160
|
-
code: NCS_ERROR_CODE.INVALID_CLOUD_ID;
|
|
161
|
-
meta: string;
|
|
162
|
-
status: number;
|
|
163
|
-
};
|
|
164
|
-
message: string;
|
|
165
|
-
};
|
|
166
|
-
/**
|
|
167
|
-
* The client is trying to send too many messages or messages that are too large. This not expected to be a standard
|
|
168
|
-
* operating condition and should only ever indicate a frontend bug.
|
|
169
|
-
*/
|
|
170
|
-
export type RateLimitError = {
|
|
171
|
-
data: {
|
|
172
|
-
code: NCS_ERROR_CODE.RATE_LIMIT_ERROR;
|
|
173
|
-
meta: {
|
|
174
|
-
maxStepSize: number;
|
|
175
|
-
rateLimitType: number;
|
|
176
|
-
stepCounter: number;
|
|
177
|
-
stepSizeCounter: number;
|
|
178
|
-
};
|
|
179
|
-
status: 500;
|
|
180
|
-
};
|
|
181
|
-
message: string;
|
|
182
|
-
};
|
|
183
|
-
export type NCSErrors = HeadVersionUpdateFailedError | VersionAlreadyPresentInDynamoError | InsufficientEditingPermissionError | ForbiddenUserTokenError | NCSDocumentNotFoundError | FailedToLoadInitDataError | ErrorMappingError | InvalidNamespaceDefinedError | SocketNamespaceNotFoundError | TenantInstanceMaintenanceError | NamespaceLockedError | EmptyBroadcastError | DynamoError | InvalidActivationIdError | InvalidDocumentAriError | InvalidCloudIdError | RateLimitError | ProsemirrorSchemaValidationError;
|
|
184
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { NCSFeatureFlags, RequiredNCSFeatureFlags, SupportedProduct } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Takes a record of {NCS Feature Flag Names → boolean} and a supported product name.
|
|
4
|
-
* Returns the corresponding product’s Launch Darkly Keys for each of the flags set as true in the input record.
|
|
5
|
-
* */
|
|
6
|
-
export declare const getProductSpecificFeatureFlags: (flags: RequiredNCSFeatureFlags, product: SupportedProduct) => Array<string>;
|
|
7
|
-
export declare function getCollabProviderFeatureFlag<T = boolean>(flagName: keyof NCSFeatureFlags, featureFlags?: {
|
|
8
|
-
[key: string]: boolean;
|
|
9
|
-
}): T;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export interface NCSFeatureFlags {
|
|
2
|
-
testFF?: boolean;
|
|
3
|
-
}
|
|
4
|
-
export interface WithNCSFeatureFlags {
|
|
5
|
-
featureFlags?: NCSFeatureFlags;
|
|
6
|
-
}
|
|
7
|
-
export type RequiredNCSFeatureFlags = Record<keyof Required<NCSFeatureFlags>, boolean>;
|
|
8
|
-
export type NCSFeatureFlagsMap = Record<keyof Required<NCSFeatureFlags>, string>;
|
|
9
|
-
export declare const supportedProducts: readonly [
|
|
10
|
-
"confluence"
|
|
11
|
-
];
|
|
12
|
-
export type SupportedProduct = (typeof supportedProducts)[number];
|
|
13
|
-
export type ProductKeys = Record<SupportedProduct, NCSFeatureFlagsMap>;
|