document-model 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/cjs/document-model.js +20 -1
- package/dist/browser/cjs/document-model.js.map +1 -0
- package/dist/browser/cjs/document.js +15 -1
- package/dist/browser/cjs/document.js.map +1 -0
- package/dist/browser/cjs/index.js +14 -1
- package/dist/browser/cjs/index.js.map +1 -0
- package/dist/browser/cjs/internal/index-DdOJi6Ua.js +2336 -0
- package/dist/browser/cjs/internal/index-DdOJi6Ua.js.map +1 -0
- package/dist/browser/cjs/internal/index-pAtJQrtD.js +49 -0
- package/dist/browser/cjs/internal/index-pAtJQrtD.js.map +1 -0
- package/dist/browser/cjs/internal/object-CRlmL8Nt.js +4333 -0
- package/dist/browser/cjs/internal/object-CRlmL8Nt.js.map +1 -0
- package/dist/browser/es/document-model.js +17 -17
- package/dist/browser/es/document-model.js.map +1 -0
- package/dist/browser/es/document.js +13 -14
- package/dist/browser/es/document.js.map +1 -0
- package/dist/browser/es/index.js +12 -14
- package/dist/browser/es/index.js.map +1 -0
- package/dist/browser/es/internal/index-BsGRYydP.js +50 -0
- package/dist/browser/es/internal/index-BsGRYydP.js.map +1 -0
- package/dist/browser/es/internal/index-C1HKYMZA.js +2337 -0
- package/dist/browser/es/internal/index-C1HKYMZA.js.map +1 -0
- package/dist/browser/es/internal/object-B562qKhQ.js +4334 -0
- package/dist/browser/es/internal/object-B562qKhQ.js.map +1 -0
- package/dist/browser/src/document/actions/creators.d.ts +2 -1
- package/dist/browser/src/document/actions/index.d.ts +1 -0
- package/dist/browser/src/document/actions/types.d.ts +3 -2
- package/dist/browser/src/document/object.d.ts +9 -1128
- package/dist/browser/src/document/reducer.d.ts +16 -13
- package/dist/browser/src/document/schema/types.d.ts +1 -0
- package/dist/browser/src/document/schema/zod.d.ts +12 -8
- package/dist/browser/src/document/signal.d.ts +1 -0
- package/dist/browser/src/document/types.d.ts +9 -6
- package/dist/browser/src/document/utils/base.d.ts +7 -5
- package/dist/browser/src/document/utils/document-helpers.d.ts +1 -0
- package/dist/browser/src/document/utils/file.d.ts +3 -2
- package/dist/browser/src/document/utils/validation.d.ts +1 -0
- package/dist/browser/src/document-model/custom/reducers/header.d.ts +1 -0
- package/dist/browser/src/document-model/custom/reducers/module.d.ts +1 -0
- package/dist/browser/src/document-model/custom/reducers/operation-error.d.ts +1 -0
- package/dist/browser/src/document-model/custom/reducers/operation-example.d.ts +1 -0
- package/dist/browser/src/document-model/custom/reducers/operation.d.ts +1 -0
- package/dist/browser/src/document-model/custom/reducers/state.d.ts +1 -0
- package/dist/browser/src/document-model/custom/reducers/versioning.d.ts +1 -5
- package/dist/browser/src/document-model/custom/utils.d.ts +1 -0
- package/dist/browser/src/document-model/gen/actions.d.ts +1 -0
- package/dist/browser/src/document-model/gen/document-model.d.ts +2 -1
- package/dist/browser/src/document-model/gen/header/actions.d.ts +1 -0
- package/dist/browser/src/document-model/gen/header/creators.d.ts +1 -0
- package/dist/browser/src/document-model/gen/header/object.d.ts +1 -0
- package/dist/browser/src/document-model/gen/header/operations.d.ts +1 -0
- package/dist/browser/src/document-model/gen/module/actions.d.ts +1 -0
- package/dist/browser/src/document-model/gen/module/creators.d.ts +1 -0
- package/dist/browser/src/document-model/gen/module/object.d.ts +1 -0
- package/dist/browser/src/document-model/gen/module/operations.d.ts +1 -0
- package/dist/browser/src/document-model/gen/object.d.ts +8 -7
- package/dist/browser/src/document-model/gen/operation/actions.d.ts +1 -0
- package/dist/browser/src/document-model/gen/operation/creators.d.ts +1 -0
- package/dist/browser/src/document-model/gen/operation/object.d.ts +1 -0
- package/dist/browser/src/document-model/gen/operation/operations.d.ts +1 -0
- package/dist/browser/src/document-model/gen/operation-error/actions.d.ts +1 -0
- package/dist/browser/src/document-model/gen/operation-error/creators.d.ts +1 -0
- package/dist/browser/src/document-model/gen/operation-error/object.d.ts +1 -0
- package/dist/browser/src/document-model/gen/operation-error/operations.d.ts +1 -0
- package/dist/browser/src/document-model/gen/operation-example/actions.d.ts +1 -0
- package/dist/browser/src/document-model/gen/operation-example/creators.d.ts +1 -0
- package/dist/browser/src/document-model/gen/operation-example/object.d.ts +1 -0
- package/dist/browser/src/document-model/gen/operation-example/operations.d.ts +1 -0
- package/dist/browser/src/document-model/gen/reducer.d.ts +2 -1
- package/dist/browser/src/document-model/gen/schema/index.d.ts +2 -2
- package/dist/browser/src/document-model/gen/schema/types.d.ts +1 -0
- package/dist/browser/src/document-model/gen/schema/zod.d.ts +70 -69
- package/dist/browser/src/document-model/gen/state/actions.d.ts +1 -0
- package/dist/browser/src/document-model/gen/state/creators.d.ts +1 -0
- package/dist/browser/src/document-model/gen/state/object.d.ts +1 -0
- package/dist/browser/src/document-model/gen/state/operations.d.ts +1 -0
- package/dist/browser/src/document-model/gen/types.d.ts +4 -3
- package/dist/browser/src/document-model/gen/utils.d.ts +1 -0
- package/dist/browser/src/document-model/gen/versioning/actions.d.ts +1 -0
- package/dist/browser/src/document-model/gen/versioning/creators.d.ts +1 -0
- package/dist/browser/src/document-model/gen/versioning/object.d.ts +1 -0
- package/dist/browser/src/document-model/gen/versioning/operations.d.ts +1 -0
- package/dist/browser/src/document-model/index.d.ts +62 -65
- package/dist/browser/vite.config.d.ts +1 -1
- package/dist/browser/vitest.config.d.ts +1 -1
- package/dist/node/cjs/document-model.js +24 -1
- package/dist/node/cjs/document-model.js.map +1 -0
- package/dist/node/cjs/document.js +15 -1
- package/dist/node/cjs/document.js.map +1 -0
- package/dist/node/cjs/index.js +14 -1
- package/dist/node/cjs/index.js.map +1 -0
- package/dist/node/cjs/internal/index-BWc0K1Dk.js +2340 -0
- package/dist/node/cjs/internal/index-BWc0K1Dk.js.map +1 -0
- package/dist/node/cjs/internal/index-DxD7Ha1j.js +49 -0
- package/dist/node/cjs/internal/index-DxD7Ha1j.js.map +1 -0
- package/dist/node/cjs/internal/object-_zq9luMS.js +2335 -0
- package/dist/node/cjs/internal/object-_zq9luMS.js.map +1 -0
- package/dist/node/es/document-model.js +16 -16
- package/dist/node/es/document-model.js.map +1 -0
- package/dist/node/es/document.js +13 -18
- package/dist/node/es/document.js.map +1 -0
- package/dist/node/es/index.js +12 -18
- package/dist/node/es/index.js.map +1 -0
- package/dist/node/es/internal/index-D8WTToX1.js +2341 -0
- package/dist/node/es/internal/index-D8WTToX1.js.map +1 -0
- package/dist/node/es/internal/index-DkkBVgni.js +50 -0
- package/dist/node/es/internal/index-DkkBVgni.js.map +1 -0
- package/dist/node/es/internal/object-D3jjs7tr.js +2336 -0
- package/dist/node/es/internal/object-D3jjs7tr.js.map +1 -0
- package/dist/node/src/document/actions/creators.d.ts +2 -1
- package/dist/node/src/document/actions/index.d.ts +1 -0
- package/dist/node/src/document/actions/types.d.ts +3 -2
- package/dist/node/src/document/object.d.ts +9 -1128
- package/dist/node/src/document/reducer.d.ts +16 -13
- package/dist/node/src/document/schema/types.d.ts +1 -0
- package/dist/node/src/document/schema/zod.d.ts +12 -8
- package/dist/node/src/document/signal.d.ts +1 -0
- package/dist/node/src/document/types.d.ts +9 -6
- package/dist/node/src/document/utils/base.d.ts +7 -5
- package/dist/node/src/document/utils/document-helpers.d.ts +1 -0
- package/dist/node/src/document/utils/file.d.ts +3 -2
- package/dist/node/src/document/utils/validation.d.ts +1 -0
- package/dist/node/src/document-model/custom/reducers/header.d.ts +1 -0
- package/dist/node/src/document-model/custom/reducers/module.d.ts +1 -0
- package/dist/node/src/document-model/custom/reducers/operation-error.d.ts +1 -0
- package/dist/node/src/document-model/custom/reducers/operation-example.d.ts +1 -0
- package/dist/node/src/document-model/custom/reducers/operation.d.ts +1 -0
- package/dist/node/src/document-model/custom/reducers/state.d.ts +1 -0
- package/dist/node/src/document-model/custom/reducers/versioning.d.ts +1 -5
- package/dist/node/src/document-model/custom/utils.d.ts +1 -0
- package/dist/node/src/document-model/gen/actions.d.ts +1 -0
- package/dist/node/src/document-model/gen/document-model.d.ts +2 -1
- package/dist/node/src/document-model/gen/header/actions.d.ts +1 -0
- package/dist/node/src/document-model/gen/header/creators.d.ts +1 -0
- package/dist/node/src/document-model/gen/header/object.d.ts +1 -0
- package/dist/node/src/document-model/gen/header/operations.d.ts +1 -0
- package/dist/node/src/document-model/gen/module/actions.d.ts +1 -0
- package/dist/node/src/document-model/gen/module/creators.d.ts +1 -0
- package/dist/node/src/document-model/gen/module/object.d.ts +1 -0
- package/dist/node/src/document-model/gen/module/operations.d.ts +1 -0
- package/dist/node/src/document-model/gen/object.d.ts +8 -7
- package/dist/node/src/document-model/gen/operation/actions.d.ts +1 -0
- package/dist/node/src/document-model/gen/operation/creators.d.ts +1 -0
- package/dist/node/src/document-model/gen/operation/object.d.ts +1 -0
- package/dist/node/src/document-model/gen/operation/operations.d.ts +1 -0
- package/dist/node/src/document-model/gen/operation-error/actions.d.ts +1 -0
- package/dist/node/src/document-model/gen/operation-error/creators.d.ts +1 -0
- package/dist/node/src/document-model/gen/operation-error/object.d.ts +1 -0
- package/dist/node/src/document-model/gen/operation-error/operations.d.ts +1 -0
- package/dist/node/src/document-model/gen/operation-example/actions.d.ts +1 -0
- package/dist/node/src/document-model/gen/operation-example/creators.d.ts +1 -0
- package/dist/node/src/document-model/gen/operation-example/object.d.ts +1 -0
- package/dist/node/src/document-model/gen/operation-example/operations.d.ts +1 -0
- package/dist/node/src/document-model/gen/reducer.d.ts +2 -1
- package/dist/node/src/document-model/gen/schema/index.d.ts +2 -2
- package/dist/node/src/document-model/gen/schema/types.d.ts +1 -0
- package/dist/node/src/document-model/gen/schema/zod.d.ts +70 -69
- package/dist/node/src/document-model/gen/state/actions.d.ts +1 -0
- package/dist/node/src/document-model/gen/state/creators.d.ts +1 -0
- package/dist/node/src/document-model/gen/state/object.d.ts +1 -0
- package/dist/node/src/document-model/gen/state/operations.d.ts +1 -0
- package/dist/node/src/document-model/gen/types.d.ts +4 -3
- package/dist/node/src/document-model/gen/utils.d.ts +1 -0
- package/dist/node/src/document-model/gen/versioning/actions.d.ts +1 -0
- package/dist/node/src/document-model/gen/versioning/creators.d.ts +1 -0
- package/dist/node/src/document-model/gen/versioning/object.d.ts +1 -0
- package/dist/node/src/document-model/gen/versioning/operations.d.ts +1 -0
- package/dist/node/src/document-model/index.d.ts +62 -65
- package/dist/node/vite.config.d.ts +1 -1
- package/dist/node/vitest.config.d.ts +1 -1
- package/package.json +5 -4
- package/dist/browser/cjs/internal/index-DGWOisRG.js +0 -22
- package/dist/browser/cjs/internal/index-Dl3D9TzG.js +0 -1
- package/dist/browser/cjs/internal/object-DQmy6ar9.js +0 -25
- package/dist/browser/es/internal/index-BnpyOR6R.js +0 -46
- package/dist/browser/es/internal/index-DynAX_OS.js +0 -2104
- package/dist/browser/es/internal/object-DenwvByi.js +0 -2838
- package/dist/node/cjs/internal/index-B96klT84.js +0 -1
- package/dist/node/cjs/internal/index-CtqbrEO2.js +0 -22
- package/dist/node/cjs/internal/object-CXx7IaXb.js +0 -20
- package/dist/node/es/internal/index-DEAJDDrx.js +0 -46
- package/dist/node/es/internal/index-pNw-lk-q.js +0 -2108
- package/dist/node/es/internal/object-2jyfnUeK.js +0 -1736
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { BaseAction } from './actions/types';
|
|
2
|
+
import { SignalDispatch } from './signal';
|
|
3
|
+
import { Action, AttachmentRef, Document, ExtendedState, OperationScope, Reducer, ReducerOptions } from './types';
|
|
4
|
+
|
|
4
5
|
/**
|
|
5
6
|
* This is an abstract class representing a document and provides methods
|
|
6
7
|
* for creating and manipulating documents.
|
|
@@ -45,435 +46,11 @@ export declare abstract class BaseDocument<T, A extends Action, L = unknown> {
|
|
|
45
46
|
/**
|
|
46
47
|
* Gets the current state of the document.
|
|
47
48
|
*/
|
|
48
|
-
get state():
|
|
49
|
-
readonly global: import("immer").Immutable<T>;
|
|
50
|
-
readonly local: import("immer").Immutable<L>;
|
|
51
|
-
};
|
|
49
|
+
get state(): Readonly<import('./types').State<T, L>>;
|
|
52
50
|
/**
|
|
53
51
|
* Gets the list of operations performed on the document.
|
|
54
52
|
*/
|
|
55
|
-
get operations():
|
|
56
|
-
readonly global: readonly ({
|
|
57
|
-
readonly type: "LOAD_STATE";
|
|
58
|
-
readonly input: {
|
|
59
|
-
readonly operations: number;
|
|
60
|
-
readonly state: {
|
|
61
|
-
readonly data?: unknown;
|
|
62
|
-
readonly name: string;
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
readonly scope: OperationScope;
|
|
66
|
-
readonly attachments?: readonly {
|
|
67
|
-
readonly data: string;
|
|
68
|
-
readonly mimeType: string;
|
|
69
|
-
readonly extension?: string | null | undefined;
|
|
70
|
-
readonly fileName?: string | null | undefined;
|
|
71
|
-
readonly hash: string;
|
|
72
|
-
}[] | undefined;
|
|
73
|
-
readonly context?: {
|
|
74
|
-
readonly signer?: {
|
|
75
|
-
readonly user: {
|
|
76
|
-
readonly address: string;
|
|
77
|
-
readonly networkId: string;
|
|
78
|
-
readonly chainId: number;
|
|
79
|
-
};
|
|
80
|
-
readonly app: {
|
|
81
|
-
readonly name: string;
|
|
82
|
-
readonly key: string;
|
|
83
|
-
};
|
|
84
|
-
readonly signature: string;
|
|
85
|
-
} | undefined;
|
|
86
|
-
} | undefined;
|
|
87
|
-
readonly index: number;
|
|
88
|
-
readonly timestamp: string;
|
|
89
|
-
readonly hash: string;
|
|
90
|
-
readonly skip: number;
|
|
91
|
-
readonly error?: string | undefined;
|
|
92
|
-
readonly resultingState?: unknown;
|
|
93
|
-
readonly id?: string | undefined;
|
|
94
|
-
} | {
|
|
95
|
-
readonly type: "PRUNE";
|
|
96
|
-
readonly input: {
|
|
97
|
-
readonly end?: import("./types").InputMaybe<number>;
|
|
98
|
-
readonly start?: import("./types").InputMaybe<number>;
|
|
99
|
-
};
|
|
100
|
-
readonly scope: OperationScope;
|
|
101
|
-
readonly attachments?: readonly {
|
|
102
|
-
readonly data: string;
|
|
103
|
-
readonly mimeType: string;
|
|
104
|
-
readonly extension?: string | null | undefined;
|
|
105
|
-
readonly fileName?: string | null | undefined;
|
|
106
|
-
readonly hash: string;
|
|
107
|
-
}[] | undefined;
|
|
108
|
-
readonly context?: {
|
|
109
|
-
readonly signer?: {
|
|
110
|
-
readonly user: {
|
|
111
|
-
readonly address: string;
|
|
112
|
-
readonly networkId: string;
|
|
113
|
-
readonly chainId: number;
|
|
114
|
-
};
|
|
115
|
-
readonly app: {
|
|
116
|
-
readonly name: string;
|
|
117
|
-
readonly key: string;
|
|
118
|
-
};
|
|
119
|
-
readonly signature: string;
|
|
120
|
-
} | undefined;
|
|
121
|
-
} | undefined;
|
|
122
|
-
readonly index: number;
|
|
123
|
-
readonly timestamp: string;
|
|
124
|
-
readonly hash: string;
|
|
125
|
-
readonly skip: number;
|
|
126
|
-
readonly error?: string | undefined;
|
|
127
|
-
readonly resultingState?: unknown;
|
|
128
|
-
readonly id?: string | undefined;
|
|
129
|
-
} | {
|
|
130
|
-
readonly type: "REDO";
|
|
131
|
-
readonly input: number;
|
|
132
|
-
readonly scope: OperationScope;
|
|
133
|
-
readonly attachments?: readonly {
|
|
134
|
-
readonly data: string;
|
|
135
|
-
readonly mimeType: string;
|
|
136
|
-
readonly extension?: string | null | undefined;
|
|
137
|
-
readonly fileName?: string | null | undefined;
|
|
138
|
-
readonly hash: string;
|
|
139
|
-
}[] | undefined;
|
|
140
|
-
readonly context?: {
|
|
141
|
-
readonly signer?: {
|
|
142
|
-
readonly user: {
|
|
143
|
-
readonly address: string;
|
|
144
|
-
readonly networkId: string;
|
|
145
|
-
readonly chainId: number;
|
|
146
|
-
};
|
|
147
|
-
readonly app: {
|
|
148
|
-
readonly name: string;
|
|
149
|
-
readonly key: string;
|
|
150
|
-
};
|
|
151
|
-
readonly signature: string;
|
|
152
|
-
} | undefined;
|
|
153
|
-
} | undefined;
|
|
154
|
-
readonly index: number;
|
|
155
|
-
readonly timestamp: string;
|
|
156
|
-
readonly hash: string;
|
|
157
|
-
readonly skip: number;
|
|
158
|
-
readonly error?: string | undefined;
|
|
159
|
-
readonly resultingState?: unknown;
|
|
160
|
-
readonly id?: string | undefined;
|
|
161
|
-
} | {
|
|
162
|
-
readonly type: "SET_NAME";
|
|
163
|
-
readonly input: string;
|
|
164
|
-
readonly scope: OperationScope;
|
|
165
|
-
readonly attachments?: readonly {
|
|
166
|
-
readonly data: string;
|
|
167
|
-
readonly mimeType: string;
|
|
168
|
-
readonly extension?: string | null | undefined;
|
|
169
|
-
readonly fileName?: string | null | undefined;
|
|
170
|
-
readonly hash: string;
|
|
171
|
-
}[] | undefined;
|
|
172
|
-
readonly context?: {
|
|
173
|
-
readonly signer?: {
|
|
174
|
-
readonly user: {
|
|
175
|
-
readonly address: string;
|
|
176
|
-
readonly networkId: string;
|
|
177
|
-
readonly chainId: number;
|
|
178
|
-
};
|
|
179
|
-
readonly app: {
|
|
180
|
-
readonly name: string;
|
|
181
|
-
readonly key: string;
|
|
182
|
-
};
|
|
183
|
-
readonly signature: string;
|
|
184
|
-
} | undefined;
|
|
185
|
-
} | undefined;
|
|
186
|
-
readonly index: number;
|
|
187
|
-
readonly timestamp: string;
|
|
188
|
-
readonly hash: string;
|
|
189
|
-
readonly skip: number;
|
|
190
|
-
readonly error?: string | undefined;
|
|
191
|
-
readonly resultingState?: unknown;
|
|
192
|
-
readonly id?: string | undefined;
|
|
193
|
-
} | {
|
|
194
|
-
readonly type: "UNDO";
|
|
195
|
-
readonly input: number;
|
|
196
|
-
readonly scope: OperationScope;
|
|
197
|
-
readonly attachments?: readonly {
|
|
198
|
-
readonly data: string;
|
|
199
|
-
readonly mimeType: string;
|
|
200
|
-
readonly extension?: string | null | undefined;
|
|
201
|
-
readonly fileName?: string | null | undefined;
|
|
202
|
-
readonly hash: string;
|
|
203
|
-
}[] | undefined;
|
|
204
|
-
readonly context?: {
|
|
205
|
-
readonly signer?: {
|
|
206
|
-
readonly user: {
|
|
207
|
-
readonly address: string;
|
|
208
|
-
readonly networkId: string;
|
|
209
|
-
readonly chainId: number;
|
|
210
|
-
};
|
|
211
|
-
readonly app: {
|
|
212
|
-
readonly name: string;
|
|
213
|
-
readonly key: string;
|
|
214
|
-
};
|
|
215
|
-
readonly signature: string;
|
|
216
|
-
} | undefined;
|
|
217
|
-
} | undefined;
|
|
218
|
-
readonly index: number;
|
|
219
|
-
readonly timestamp: string;
|
|
220
|
-
readonly hash: string;
|
|
221
|
-
readonly skip: number;
|
|
222
|
-
readonly error?: string | undefined;
|
|
223
|
-
readonly resultingState?: unknown;
|
|
224
|
-
readonly id?: string | undefined;
|
|
225
|
-
} | {
|
|
226
|
-
readonly type: "NOOP";
|
|
227
|
-
readonly input: unknown;
|
|
228
|
-
readonly scope: OperationScope;
|
|
229
|
-
readonly attachments?: readonly {
|
|
230
|
-
readonly data: string;
|
|
231
|
-
readonly mimeType: string;
|
|
232
|
-
readonly extension?: string | null | undefined;
|
|
233
|
-
readonly fileName?: string | null | undefined;
|
|
234
|
-
readonly hash: string;
|
|
235
|
-
}[] | undefined;
|
|
236
|
-
readonly context?: {
|
|
237
|
-
readonly signer?: {
|
|
238
|
-
readonly user: {
|
|
239
|
-
readonly address: string;
|
|
240
|
-
readonly networkId: string;
|
|
241
|
-
readonly chainId: number;
|
|
242
|
-
};
|
|
243
|
-
readonly app: {
|
|
244
|
-
readonly name: string;
|
|
245
|
-
readonly key: string;
|
|
246
|
-
};
|
|
247
|
-
readonly signature: string;
|
|
248
|
-
} | undefined;
|
|
249
|
-
} | undefined;
|
|
250
|
-
readonly index: number;
|
|
251
|
-
readonly timestamp: string;
|
|
252
|
-
readonly hash: string;
|
|
253
|
-
readonly skip: number;
|
|
254
|
-
readonly error?: string | undefined;
|
|
255
|
-
readonly resultingState?: unknown;
|
|
256
|
-
readonly id?: string | undefined;
|
|
257
|
-
} | import("immer").Immutable<A & {
|
|
258
|
-
index: number;
|
|
259
|
-
timestamp: string;
|
|
260
|
-
hash: string;
|
|
261
|
-
skip: number;
|
|
262
|
-
error?: string | undefined;
|
|
263
|
-
resultingState?: unknown;
|
|
264
|
-
id?: string | undefined;
|
|
265
|
-
}>)[];
|
|
266
|
-
readonly local: readonly ({
|
|
267
|
-
readonly type: "LOAD_STATE";
|
|
268
|
-
readonly input: {
|
|
269
|
-
readonly operations: number;
|
|
270
|
-
readonly state: {
|
|
271
|
-
readonly data?: unknown;
|
|
272
|
-
readonly name: string;
|
|
273
|
-
};
|
|
274
|
-
};
|
|
275
|
-
readonly scope: OperationScope;
|
|
276
|
-
readonly attachments?: readonly {
|
|
277
|
-
readonly data: string;
|
|
278
|
-
readonly mimeType: string;
|
|
279
|
-
readonly extension?: string | null | undefined;
|
|
280
|
-
readonly fileName?: string | null | undefined;
|
|
281
|
-
readonly hash: string;
|
|
282
|
-
}[] | undefined;
|
|
283
|
-
readonly context?: {
|
|
284
|
-
readonly signer?: {
|
|
285
|
-
readonly user: {
|
|
286
|
-
readonly address: string;
|
|
287
|
-
readonly networkId: string;
|
|
288
|
-
readonly chainId: number;
|
|
289
|
-
};
|
|
290
|
-
readonly app: {
|
|
291
|
-
readonly name: string;
|
|
292
|
-
readonly key: string;
|
|
293
|
-
};
|
|
294
|
-
readonly signature: string;
|
|
295
|
-
} | undefined;
|
|
296
|
-
} | undefined;
|
|
297
|
-
readonly index: number;
|
|
298
|
-
readonly timestamp: string;
|
|
299
|
-
readonly hash: string;
|
|
300
|
-
readonly skip: number;
|
|
301
|
-
readonly error?: string | undefined;
|
|
302
|
-
readonly resultingState?: unknown;
|
|
303
|
-
readonly id?: string | undefined;
|
|
304
|
-
} | {
|
|
305
|
-
readonly type: "PRUNE";
|
|
306
|
-
readonly input: {
|
|
307
|
-
readonly end?: import("./types").InputMaybe<number>;
|
|
308
|
-
readonly start?: import("./types").InputMaybe<number>;
|
|
309
|
-
};
|
|
310
|
-
readonly scope: OperationScope;
|
|
311
|
-
readonly attachments?: readonly {
|
|
312
|
-
readonly data: string;
|
|
313
|
-
readonly mimeType: string;
|
|
314
|
-
readonly extension?: string | null | undefined;
|
|
315
|
-
readonly fileName?: string | null | undefined;
|
|
316
|
-
readonly hash: string;
|
|
317
|
-
}[] | undefined;
|
|
318
|
-
readonly context?: {
|
|
319
|
-
readonly signer?: {
|
|
320
|
-
readonly user: {
|
|
321
|
-
readonly address: string;
|
|
322
|
-
readonly networkId: string;
|
|
323
|
-
readonly chainId: number;
|
|
324
|
-
};
|
|
325
|
-
readonly app: {
|
|
326
|
-
readonly name: string;
|
|
327
|
-
readonly key: string;
|
|
328
|
-
};
|
|
329
|
-
readonly signature: string;
|
|
330
|
-
} | undefined;
|
|
331
|
-
} | undefined;
|
|
332
|
-
readonly index: number;
|
|
333
|
-
readonly timestamp: string;
|
|
334
|
-
readonly hash: string;
|
|
335
|
-
readonly skip: number;
|
|
336
|
-
readonly error?: string | undefined;
|
|
337
|
-
readonly resultingState?: unknown;
|
|
338
|
-
readonly id?: string | undefined;
|
|
339
|
-
} | {
|
|
340
|
-
readonly type: "REDO";
|
|
341
|
-
readonly input: number;
|
|
342
|
-
readonly scope: OperationScope;
|
|
343
|
-
readonly attachments?: readonly {
|
|
344
|
-
readonly data: string;
|
|
345
|
-
readonly mimeType: string;
|
|
346
|
-
readonly extension?: string | null | undefined;
|
|
347
|
-
readonly fileName?: string | null | undefined;
|
|
348
|
-
readonly hash: string;
|
|
349
|
-
}[] | undefined;
|
|
350
|
-
readonly context?: {
|
|
351
|
-
readonly signer?: {
|
|
352
|
-
readonly user: {
|
|
353
|
-
readonly address: string;
|
|
354
|
-
readonly networkId: string;
|
|
355
|
-
readonly chainId: number;
|
|
356
|
-
};
|
|
357
|
-
readonly app: {
|
|
358
|
-
readonly name: string;
|
|
359
|
-
readonly key: string;
|
|
360
|
-
};
|
|
361
|
-
readonly signature: string;
|
|
362
|
-
} | undefined;
|
|
363
|
-
} | undefined;
|
|
364
|
-
readonly index: number;
|
|
365
|
-
readonly timestamp: string;
|
|
366
|
-
readonly hash: string;
|
|
367
|
-
readonly skip: number;
|
|
368
|
-
readonly error?: string | undefined;
|
|
369
|
-
readonly resultingState?: unknown;
|
|
370
|
-
readonly id?: string | undefined;
|
|
371
|
-
} | {
|
|
372
|
-
readonly type: "SET_NAME";
|
|
373
|
-
readonly input: string;
|
|
374
|
-
readonly scope: OperationScope;
|
|
375
|
-
readonly attachments?: readonly {
|
|
376
|
-
readonly data: string;
|
|
377
|
-
readonly mimeType: string;
|
|
378
|
-
readonly extension?: string | null | undefined;
|
|
379
|
-
readonly fileName?: string | null | undefined;
|
|
380
|
-
readonly hash: string;
|
|
381
|
-
}[] | undefined;
|
|
382
|
-
readonly context?: {
|
|
383
|
-
readonly signer?: {
|
|
384
|
-
readonly user: {
|
|
385
|
-
readonly address: string;
|
|
386
|
-
readonly networkId: string;
|
|
387
|
-
readonly chainId: number;
|
|
388
|
-
};
|
|
389
|
-
readonly app: {
|
|
390
|
-
readonly name: string;
|
|
391
|
-
readonly key: string;
|
|
392
|
-
};
|
|
393
|
-
readonly signature: string;
|
|
394
|
-
} | undefined;
|
|
395
|
-
} | undefined;
|
|
396
|
-
readonly index: number;
|
|
397
|
-
readonly timestamp: string;
|
|
398
|
-
readonly hash: string;
|
|
399
|
-
readonly skip: number;
|
|
400
|
-
readonly error?: string | undefined;
|
|
401
|
-
readonly resultingState?: unknown;
|
|
402
|
-
readonly id?: string | undefined;
|
|
403
|
-
} | {
|
|
404
|
-
readonly type: "UNDO";
|
|
405
|
-
readonly input: number;
|
|
406
|
-
readonly scope: OperationScope;
|
|
407
|
-
readonly attachments?: readonly {
|
|
408
|
-
readonly data: string;
|
|
409
|
-
readonly mimeType: string;
|
|
410
|
-
readonly extension?: string | null | undefined;
|
|
411
|
-
readonly fileName?: string | null | undefined;
|
|
412
|
-
readonly hash: string;
|
|
413
|
-
}[] | undefined;
|
|
414
|
-
readonly context?: {
|
|
415
|
-
readonly signer?: {
|
|
416
|
-
readonly user: {
|
|
417
|
-
readonly address: string;
|
|
418
|
-
readonly networkId: string;
|
|
419
|
-
readonly chainId: number;
|
|
420
|
-
};
|
|
421
|
-
readonly app: {
|
|
422
|
-
readonly name: string;
|
|
423
|
-
readonly key: string;
|
|
424
|
-
};
|
|
425
|
-
readonly signature: string;
|
|
426
|
-
} | undefined;
|
|
427
|
-
} | undefined;
|
|
428
|
-
readonly index: number;
|
|
429
|
-
readonly timestamp: string;
|
|
430
|
-
readonly hash: string;
|
|
431
|
-
readonly skip: number;
|
|
432
|
-
readonly error?: string | undefined;
|
|
433
|
-
readonly resultingState?: unknown;
|
|
434
|
-
readonly id?: string | undefined;
|
|
435
|
-
} | {
|
|
436
|
-
readonly type: "NOOP";
|
|
437
|
-
readonly input: unknown;
|
|
438
|
-
readonly scope: OperationScope;
|
|
439
|
-
readonly attachments?: readonly {
|
|
440
|
-
readonly data: string;
|
|
441
|
-
readonly mimeType: string;
|
|
442
|
-
readonly extension?: string | null | undefined;
|
|
443
|
-
readonly fileName?: string | null | undefined;
|
|
444
|
-
readonly hash: string;
|
|
445
|
-
}[] | undefined;
|
|
446
|
-
readonly context?: {
|
|
447
|
-
readonly signer?: {
|
|
448
|
-
readonly user: {
|
|
449
|
-
readonly address: string;
|
|
450
|
-
readonly networkId: string;
|
|
451
|
-
readonly chainId: number;
|
|
452
|
-
};
|
|
453
|
-
readonly app: {
|
|
454
|
-
readonly name: string;
|
|
455
|
-
readonly key: string;
|
|
456
|
-
};
|
|
457
|
-
readonly signature: string;
|
|
458
|
-
} | undefined;
|
|
459
|
-
} | undefined;
|
|
460
|
-
readonly index: number;
|
|
461
|
-
readonly timestamp: string;
|
|
462
|
-
readonly hash: string;
|
|
463
|
-
readonly skip: number;
|
|
464
|
-
readonly error?: string | undefined;
|
|
465
|
-
readonly resultingState?: unknown;
|
|
466
|
-
readonly id?: string | undefined;
|
|
467
|
-
} | import("immer").Immutable<A & {
|
|
468
|
-
index: number;
|
|
469
|
-
timestamp: string;
|
|
470
|
-
hash: string;
|
|
471
|
-
skip: number;
|
|
472
|
-
error?: string | undefined;
|
|
473
|
-
resultingState?: unknown;
|
|
474
|
-
id?: string | undefined;
|
|
475
|
-
}>)[];
|
|
476
|
-
};
|
|
53
|
+
get operations(): Readonly<Required<Record<OperationScope, import('./types').Operation<BaseAction | A>[]>>>;
|
|
477
54
|
/**
|
|
478
55
|
* Gets the name of the document.
|
|
479
56
|
*/
|
|
@@ -498,712 +75,16 @@ export declare abstract class BaseDocument<T, A extends Action, L = unknown> {
|
|
|
498
75
|
/**
|
|
499
76
|
* Gets the initial state of the document.
|
|
500
77
|
*/
|
|
501
|
-
get initialState():
|
|
502
|
-
readonly name: string;
|
|
503
|
-
readonly revision: {
|
|
504
|
-
readonly global: number;
|
|
505
|
-
readonly local: number;
|
|
506
|
-
};
|
|
507
|
-
readonly documentType: string;
|
|
508
|
-
readonly created: string;
|
|
509
|
-
readonly lastModified: string;
|
|
510
|
-
readonly state: {
|
|
511
|
-
readonly global: import("immer").Immutable<T>;
|
|
512
|
-
readonly local: import("immer").Immutable<L>;
|
|
513
|
-
};
|
|
514
|
-
readonly attachments: {
|
|
515
|
-
readonly [x: string]: {
|
|
516
|
-
readonly data: string;
|
|
517
|
-
readonly mimeType: string;
|
|
518
|
-
readonly extension?: string | null | undefined;
|
|
519
|
-
readonly fileName?: string | null | undefined;
|
|
520
|
-
};
|
|
521
|
-
};
|
|
522
|
-
};
|
|
78
|
+
get initialState(): Readonly<ExtendedState<T, L>>;
|
|
523
79
|
/**
|
|
524
80
|
* Returns the current document as an object
|
|
525
81
|
*/
|
|
526
|
-
toDocument():
|
|
527
|
-
readonly name: string;
|
|
528
|
-
readonly revision: {
|
|
529
|
-
readonly global: number;
|
|
530
|
-
readonly local: number;
|
|
531
|
-
};
|
|
532
|
-
readonly documentType: string;
|
|
533
|
-
readonly created: string;
|
|
534
|
-
readonly lastModified: string;
|
|
535
|
-
readonly state: {
|
|
536
|
-
readonly global: import("immer").Immutable<T>;
|
|
537
|
-
readonly local: import("immer").Immutable<L>;
|
|
538
|
-
};
|
|
539
|
-
readonly attachments: {
|
|
540
|
-
readonly [x: string]: {
|
|
541
|
-
readonly data: string;
|
|
542
|
-
readonly mimeType: string;
|
|
543
|
-
readonly extension?: string | null | undefined;
|
|
544
|
-
readonly fileName?: string | null | undefined;
|
|
545
|
-
};
|
|
546
|
-
};
|
|
547
|
-
readonly operations: {
|
|
548
|
-
readonly global: readonly ({
|
|
549
|
-
readonly type: "LOAD_STATE";
|
|
550
|
-
readonly input: {
|
|
551
|
-
readonly operations: number;
|
|
552
|
-
readonly state: {
|
|
553
|
-
readonly data?: unknown;
|
|
554
|
-
readonly name: string;
|
|
555
|
-
};
|
|
556
|
-
};
|
|
557
|
-
readonly scope: OperationScope;
|
|
558
|
-
readonly attachments?: readonly {
|
|
559
|
-
readonly data: string;
|
|
560
|
-
readonly mimeType: string;
|
|
561
|
-
readonly extension?: string | null | undefined;
|
|
562
|
-
readonly fileName?: string | null | undefined;
|
|
563
|
-
readonly hash: string;
|
|
564
|
-
}[] | undefined;
|
|
565
|
-
readonly context?: {
|
|
566
|
-
readonly signer?: {
|
|
567
|
-
readonly user: {
|
|
568
|
-
readonly address: string;
|
|
569
|
-
readonly networkId: string;
|
|
570
|
-
readonly chainId: number;
|
|
571
|
-
};
|
|
572
|
-
readonly app: {
|
|
573
|
-
readonly name: string;
|
|
574
|
-
readonly key: string;
|
|
575
|
-
};
|
|
576
|
-
readonly signature: string;
|
|
577
|
-
} | undefined;
|
|
578
|
-
} | undefined;
|
|
579
|
-
readonly index: number;
|
|
580
|
-
readonly timestamp: string;
|
|
581
|
-
readonly hash: string;
|
|
582
|
-
readonly skip: number;
|
|
583
|
-
readonly error?: string | undefined;
|
|
584
|
-
readonly resultingState?: unknown;
|
|
585
|
-
readonly id?: string | undefined;
|
|
586
|
-
} | {
|
|
587
|
-
readonly type: "PRUNE";
|
|
588
|
-
readonly input: {
|
|
589
|
-
readonly end?: import("./types").InputMaybe<number>;
|
|
590
|
-
readonly start?: import("./types").InputMaybe<number>;
|
|
591
|
-
};
|
|
592
|
-
readonly scope: OperationScope;
|
|
593
|
-
readonly attachments?: readonly {
|
|
594
|
-
readonly data: string;
|
|
595
|
-
readonly mimeType: string;
|
|
596
|
-
readonly extension?: string | null | undefined;
|
|
597
|
-
readonly fileName?: string | null | undefined;
|
|
598
|
-
readonly hash: string;
|
|
599
|
-
}[] | undefined;
|
|
600
|
-
readonly context?: {
|
|
601
|
-
readonly signer?: {
|
|
602
|
-
readonly user: {
|
|
603
|
-
readonly address: string;
|
|
604
|
-
readonly networkId: string;
|
|
605
|
-
readonly chainId: number;
|
|
606
|
-
};
|
|
607
|
-
readonly app: {
|
|
608
|
-
readonly name: string;
|
|
609
|
-
readonly key: string;
|
|
610
|
-
};
|
|
611
|
-
readonly signature: string;
|
|
612
|
-
} | undefined;
|
|
613
|
-
} | undefined;
|
|
614
|
-
readonly index: number;
|
|
615
|
-
readonly timestamp: string;
|
|
616
|
-
readonly hash: string;
|
|
617
|
-
readonly skip: number;
|
|
618
|
-
readonly error?: string | undefined;
|
|
619
|
-
readonly resultingState?: unknown;
|
|
620
|
-
readonly id?: string | undefined;
|
|
621
|
-
} | {
|
|
622
|
-
readonly type: "REDO";
|
|
623
|
-
readonly input: number;
|
|
624
|
-
readonly scope: OperationScope;
|
|
625
|
-
readonly attachments?: readonly {
|
|
626
|
-
readonly data: string;
|
|
627
|
-
readonly mimeType: string;
|
|
628
|
-
readonly extension?: string | null | undefined;
|
|
629
|
-
readonly fileName?: string | null | undefined;
|
|
630
|
-
readonly hash: string;
|
|
631
|
-
}[] | undefined;
|
|
632
|
-
readonly context?: {
|
|
633
|
-
readonly signer?: {
|
|
634
|
-
readonly user: {
|
|
635
|
-
readonly address: string;
|
|
636
|
-
readonly networkId: string;
|
|
637
|
-
readonly chainId: number;
|
|
638
|
-
};
|
|
639
|
-
readonly app: {
|
|
640
|
-
readonly name: string;
|
|
641
|
-
readonly key: string;
|
|
642
|
-
};
|
|
643
|
-
readonly signature: string;
|
|
644
|
-
} | undefined;
|
|
645
|
-
} | undefined;
|
|
646
|
-
readonly index: number;
|
|
647
|
-
readonly timestamp: string;
|
|
648
|
-
readonly hash: string;
|
|
649
|
-
readonly skip: number;
|
|
650
|
-
readonly error?: string | undefined;
|
|
651
|
-
readonly resultingState?: unknown;
|
|
652
|
-
readonly id?: string | undefined;
|
|
653
|
-
} | {
|
|
654
|
-
readonly type: "SET_NAME";
|
|
655
|
-
readonly input: string;
|
|
656
|
-
readonly scope: OperationScope;
|
|
657
|
-
readonly attachments?: readonly {
|
|
658
|
-
readonly data: string;
|
|
659
|
-
readonly mimeType: string;
|
|
660
|
-
readonly extension?: string | null | undefined;
|
|
661
|
-
readonly fileName?: string | null | undefined;
|
|
662
|
-
readonly hash: string;
|
|
663
|
-
}[] | undefined;
|
|
664
|
-
readonly context?: {
|
|
665
|
-
readonly signer?: {
|
|
666
|
-
readonly user: {
|
|
667
|
-
readonly address: string;
|
|
668
|
-
readonly networkId: string;
|
|
669
|
-
readonly chainId: number;
|
|
670
|
-
};
|
|
671
|
-
readonly app: {
|
|
672
|
-
readonly name: string;
|
|
673
|
-
readonly key: string;
|
|
674
|
-
};
|
|
675
|
-
readonly signature: string;
|
|
676
|
-
} | undefined;
|
|
677
|
-
} | undefined;
|
|
678
|
-
readonly index: number;
|
|
679
|
-
readonly timestamp: string;
|
|
680
|
-
readonly hash: string;
|
|
681
|
-
readonly skip: number;
|
|
682
|
-
readonly error?: string | undefined;
|
|
683
|
-
readonly resultingState?: unknown;
|
|
684
|
-
readonly id?: string | undefined;
|
|
685
|
-
} | {
|
|
686
|
-
readonly type: "UNDO";
|
|
687
|
-
readonly input: number;
|
|
688
|
-
readonly scope: OperationScope;
|
|
689
|
-
readonly attachments?: readonly {
|
|
690
|
-
readonly data: string;
|
|
691
|
-
readonly mimeType: string;
|
|
692
|
-
readonly extension?: string | null | undefined;
|
|
693
|
-
readonly fileName?: string | null | undefined;
|
|
694
|
-
readonly hash: string;
|
|
695
|
-
}[] | undefined;
|
|
696
|
-
readonly context?: {
|
|
697
|
-
readonly signer?: {
|
|
698
|
-
readonly user: {
|
|
699
|
-
readonly address: string;
|
|
700
|
-
readonly networkId: string;
|
|
701
|
-
readonly chainId: number;
|
|
702
|
-
};
|
|
703
|
-
readonly app: {
|
|
704
|
-
readonly name: string;
|
|
705
|
-
readonly key: string;
|
|
706
|
-
};
|
|
707
|
-
readonly signature: string;
|
|
708
|
-
} | undefined;
|
|
709
|
-
} | undefined;
|
|
710
|
-
readonly index: number;
|
|
711
|
-
readonly timestamp: string;
|
|
712
|
-
readonly hash: string;
|
|
713
|
-
readonly skip: number;
|
|
714
|
-
readonly error?: string | undefined;
|
|
715
|
-
readonly resultingState?: unknown;
|
|
716
|
-
readonly id?: string | undefined;
|
|
717
|
-
} | {
|
|
718
|
-
readonly type: "NOOP";
|
|
719
|
-
readonly input: unknown;
|
|
720
|
-
readonly scope: OperationScope;
|
|
721
|
-
readonly attachments?: readonly {
|
|
722
|
-
readonly data: string;
|
|
723
|
-
readonly mimeType: string;
|
|
724
|
-
readonly extension?: string | null | undefined;
|
|
725
|
-
readonly fileName?: string | null | undefined;
|
|
726
|
-
readonly hash: string;
|
|
727
|
-
}[] | undefined;
|
|
728
|
-
readonly context?: {
|
|
729
|
-
readonly signer?: {
|
|
730
|
-
readonly user: {
|
|
731
|
-
readonly address: string;
|
|
732
|
-
readonly networkId: string;
|
|
733
|
-
readonly chainId: number;
|
|
734
|
-
};
|
|
735
|
-
readonly app: {
|
|
736
|
-
readonly name: string;
|
|
737
|
-
readonly key: string;
|
|
738
|
-
};
|
|
739
|
-
readonly signature: string;
|
|
740
|
-
} | undefined;
|
|
741
|
-
} | undefined;
|
|
742
|
-
readonly index: number;
|
|
743
|
-
readonly timestamp: string;
|
|
744
|
-
readonly hash: string;
|
|
745
|
-
readonly skip: number;
|
|
746
|
-
readonly error?: string | undefined;
|
|
747
|
-
readonly resultingState?: unknown;
|
|
748
|
-
readonly id?: string | undefined;
|
|
749
|
-
} | import("immer").Immutable<A & {
|
|
750
|
-
index: number;
|
|
751
|
-
timestamp: string;
|
|
752
|
-
hash: string;
|
|
753
|
-
skip: number;
|
|
754
|
-
error?: string | undefined;
|
|
755
|
-
resultingState?: unknown;
|
|
756
|
-
id?: string | undefined;
|
|
757
|
-
}>)[];
|
|
758
|
-
readonly local: readonly ({
|
|
759
|
-
readonly type: "LOAD_STATE";
|
|
760
|
-
readonly input: {
|
|
761
|
-
readonly operations: number;
|
|
762
|
-
readonly state: {
|
|
763
|
-
readonly data?: unknown;
|
|
764
|
-
readonly name: string;
|
|
765
|
-
};
|
|
766
|
-
};
|
|
767
|
-
readonly scope: OperationScope;
|
|
768
|
-
readonly attachments?: readonly {
|
|
769
|
-
readonly data: string;
|
|
770
|
-
readonly mimeType: string;
|
|
771
|
-
readonly extension?: string | null | undefined;
|
|
772
|
-
readonly fileName?: string | null | undefined;
|
|
773
|
-
readonly hash: string;
|
|
774
|
-
}[] | undefined;
|
|
775
|
-
readonly context?: {
|
|
776
|
-
readonly signer?: {
|
|
777
|
-
readonly user: {
|
|
778
|
-
readonly address: string;
|
|
779
|
-
readonly networkId: string;
|
|
780
|
-
readonly chainId: number;
|
|
781
|
-
};
|
|
782
|
-
readonly app: {
|
|
783
|
-
readonly name: string;
|
|
784
|
-
readonly key: string;
|
|
785
|
-
};
|
|
786
|
-
readonly signature: string;
|
|
787
|
-
} | undefined;
|
|
788
|
-
} | undefined;
|
|
789
|
-
readonly index: number;
|
|
790
|
-
readonly timestamp: string;
|
|
791
|
-
readonly hash: string;
|
|
792
|
-
readonly skip: number;
|
|
793
|
-
readonly error?: string | undefined;
|
|
794
|
-
readonly resultingState?: unknown;
|
|
795
|
-
readonly id?: string | undefined;
|
|
796
|
-
} | {
|
|
797
|
-
readonly type: "PRUNE";
|
|
798
|
-
readonly input: {
|
|
799
|
-
readonly end?: import("./types").InputMaybe<number>;
|
|
800
|
-
readonly start?: import("./types").InputMaybe<number>;
|
|
801
|
-
};
|
|
802
|
-
readonly scope: OperationScope;
|
|
803
|
-
readonly attachments?: readonly {
|
|
804
|
-
readonly data: string;
|
|
805
|
-
readonly mimeType: string;
|
|
806
|
-
readonly extension?: string | null | undefined;
|
|
807
|
-
readonly fileName?: string | null | undefined;
|
|
808
|
-
readonly hash: string;
|
|
809
|
-
}[] | undefined;
|
|
810
|
-
readonly context?: {
|
|
811
|
-
readonly signer?: {
|
|
812
|
-
readonly user: {
|
|
813
|
-
readonly address: string;
|
|
814
|
-
readonly networkId: string;
|
|
815
|
-
readonly chainId: number;
|
|
816
|
-
};
|
|
817
|
-
readonly app: {
|
|
818
|
-
readonly name: string;
|
|
819
|
-
readonly key: string;
|
|
820
|
-
};
|
|
821
|
-
readonly signature: string;
|
|
822
|
-
} | undefined;
|
|
823
|
-
} | undefined;
|
|
824
|
-
readonly index: number;
|
|
825
|
-
readonly timestamp: string;
|
|
826
|
-
readonly hash: string;
|
|
827
|
-
readonly skip: number;
|
|
828
|
-
readonly error?: string | undefined;
|
|
829
|
-
readonly resultingState?: unknown;
|
|
830
|
-
readonly id?: string | undefined;
|
|
831
|
-
} | {
|
|
832
|
-
readonly type: "REDO";
|
|
833
|
-
readonly input: number;
|
|
834
|
-
readonly scope: OperationScope;
|
|
835
|
-
readonly attachments?: readonly {
|
|
836
|
-
readonly data: string;
|
|
837
|
-
readonly mimeType: string;
|
|
838
|
-
readonly extension?: string | null | undefined;
|
|
839
|
-
readonly fileName?: string | null | undefined;
|
|
840
|
-
readonly hash: string;
|
|
841
|
-
}[] | undefined;
|
|
842
|
-
readonly context?: {
|
|
843
|
-
readonly signer?: {
|
|
844
|
-
readonly user: {
|
|
845
|
-
readonly address: string;
|
|
846
|
-
readonly networkId: string;
|
|
847
|
-
readonly chainId: number;
|
|
848
|
-
};
|
|
849
|
-
readonly app: {
|
|
850
|
-
readonly name: string;
|
|
851
|
-
readonly key: string;
|
|
852
|
-
};
|
|
853
|
-
readonly signature: string;
|
|
854
|
-
} | undefined;
|
|
855
|
-
} | undefined;
|
|
856
|
-
readonly index: number;
|
|
857
|
-
readonly timestamp: string;
|
|
858
|
-
readonly hash: string;
|
|
859
|
-
readonly skip: number;
|
|
860
|
-
readonly error?: string | undefined;
|
|
861
|
-
readonly resultingState?: unknown;
|
|
862
|
-
readonly id?: string | undefined;
|
|
863
|
-
} | {
|
|
864
|
-
readonly type: "SET_NAME";
|
|
865
|
-
readonly input: string;
|
|
866
|
-
readonly scope: OperationScope;
|
|
867
|
-
readonly attachments?: readonly {
|
|
868
|
-
readonly data: string;
|
|
869
|
-
readonly mimeType: string;
|
|
870
|
-
readonly extension?: string | null | undefined;
|
|
871
|
-
readonly fileName?: string | null | undefined;
|
|
872
|
-
readonly hash: string;
|
|
873
|
-
}[] | undefined;
|
|
874
|
-
readonly context?: {
|
|
875
|
-
readonly signer?: {
|
|
876
|
-
readonly user: {
|
|
877
|
-
readonly address: string;
|
|
878
|
-
readonly networkId: string;
|
|
879
|
-
readonly chainId: number;
|
|
880
|
-
};
|
|
881
|
-
readonly app: {
|
|
882
|
-
readonly name: string;
|
|
883
|
-
readonly key: string;
|
|
884
|
-
};
|
|
885
|
-
readonly signature: string;
|
|
886
|
-
} | undefined;
|
|
887
|
-
} | undefined;
|
|
888
|
-
readonly index: number;
|
|
889
|
-
readonly timestamp: string;
|
|
890
|
-
readonly hash: string;
|
|
891
|
-
readonly skip: number;
|
|
892
|
-
readonly error?: string | undefined;
|
|
893
|
-
readonly resultingState?: unknown;
|
|
894
|
-
readonly id?: string | undefined;
|
|
895
|
-
} | {
|
|
896
|
-
readonly type: "UNDO";
|
|
897
|
-
readonly input: number;
|
|
898
|
-
readonly scope: OperationScope;
|
|
899
|
-
readonly attachments?: readonly {
|
|
900
|
-
readonly data: string;
|
|
901
|
-
readonly mimeType: string;
|
|
902
|
-
readonly extension?: string | null | undefined;
|
|
903
|
-
readonly fileName?: string | null | undefined;
|
|
904
|
-
readonly hash: string;
|
|
905
|
-
}[] | undefined;
|
|
906
|
-
readonly context?: {
|
|
907
|
-
readonly signer?: {
|
|
908
|
-
readonly user: {
|
|
909
|
-
readonly address: string;
|
|
910
|
-
readonly networkId: string;
|
|
911
|
-
readonly chainId: number;
|
|
912
|
-
};
|
|
913
|
-
readonly app: {
|
|
914
|
-
readonly name: string;
|
|
915
|
-
readonly key: string;
|
|
916
|
-
};
|
|
917
|
-
readonly signature: string;
|
|
918
|
-
} | undefined;
|
|
919
|
-
} | undefined;
|
|
920
|
-
readonly index: number;
|
|
921
|
-
readonly timestamp: string;
|
|
922
|
-
readonly hash: string;
|
|
923
|
-
readonly skip: number;
|
|
924
|
-
readonly error?: string | undefined;
|
|
925
|
-
readonly resultingState?: unknown;
|
|
926
|
-
readonly id?: string | undefined;
|
|
927
|
-
} | {
|
|
928
|
-
readonly type: "NOOP";
|
|
929
|
-
readonly input: unknown;
|
|
930
|
-
readonly scope: OperationScope;
|
|
931
|
-
readonly attachments?: readonly {
|
|
932
|
-
readonly data: string;
|
|
933
|
-
readonly mimeType: string;
|
|
934
|
-
readonly extension?: string | null | undefined;
|
|
935
|
-
readonly fileName?: string | null | undefined;
|
|
936
|
-
readonly hash: string;
|
|
937
|
-
}[] | undefined;
|
|
938
|
-
readonly context?: {
|
|
939
|
-
readonly signer?: {
|
|
940
|
-
readonly user: {
|
|
941
|
-
readonly address: string;
|
|
942
|
-
readonly networkId: string;
|
|
943
|
-
readonly chainId: number;
|
|
944
|
-
};
|
|
945
|
-
readonly app: {
|
|
946
|
-
readonly name: string;
|
|
947
|
-
readonly key: string;
|
|
948
|
-
};
|
|
949
|
-
readonly signature: string;
|
|
950
|
-
} | undefined;
|
|
951
|
-
} | undefined;
|
|
952
|
-
readonly index: number;
|
|
953
|
-
readonly timestamp: string;
|
|
954
|
-
readonly hash: string;
|
|
955
|
-
readonly skip: number;
|
|
956
|
-
readonly error?: string | undefined;
|
|
957
|
-
readonly resultingState?: unknown;
|
|
958
|
-
readonly id?: string | undefined;
|
|
959
|
-
} | import("immer").Immutable<A & {
|
|
960
|
-
index: number;
|
|
961
|
-
timestamp: string;
|
|
962
|
-
hash: string;
|
|
963
|
-
skip: number;
|
|
964
|
-
error?: string | undefined;
|
|
965
|
-
resultingState?: unknown;
|
|
966
|
-
id?: string | undefined;
|
|
967
|
-
}>)[];
|
|
968
|
-
};
|
|
969
|
-
readonly initialState: {
|
|
970
|
-
readonly name: string;
|
|
971
|
-
readonly revision: {
|
|
972
|
-
readonly global: number;
|
|
973
|
-
readonly local: number;
|
|
974
|
-
};
|
|
975
|
-
readonly documentType: string;
|
|
976
|
-
readonly created: string;
|
|
977
|
-
readonly lastModified: string;
|
|
978
|
-
readonly state: {
|
|
979
|
-
readonly global: import("immer").Immutable<T>;
|
|
980
|
-
readonly local: import("immer").Immutable<L>;
|
|
981
|
-
};
|
|
982
|
-
readonly attachments: {
|
|
983
|
-
readonly [x: string]: {
|
|
984
|
-
readonly data: string;
|
|
985
|
-
readonly mimeType: string;
|
|
986
|
-
readonly extension?: string | null | undefined;
|
|
987
|
-
readonly fileName?: string | null | undefined;
|
|
988
|
-
};
|
|
989
|
-
};
|
|
990
|
-
};
|
|
991
|
-
readonly clipboard: readonly ({
|
|
992
|
-
readonly type: "LOAD_STATE";
|
|
993
|
-
readonly input: {
|
|
994
|
-
readonly operations: number;
|
|
995
|
-
readonly state: {
|
|
996
|
-
readonly data?: unknown;
|
|
997
|
-
readonly name: string;
|
|
998
|
-
};
|
|
999
|
-
};
|
|
1000
|
-
readonly scope: OperationScope;
|
|
1001
|
-
readonly attachments?: readonly {
|
|
1002
|
-
readonly data: string;
|
|
1003
|
-
readonly mimeType: string;
|
|
1004
|
-
readonly extension?: string | null | undefined;
|
|
1005
|
-
readonly fileName?: string | null | undefined;
|
|
1006
|
-
readonly hash: string;
|
|
1007
|
-
}[] | undefined;
|
|
1008
|
-
readonly context?: {
|
|
1009
|
-
readonly signer?: {
|
|
1010
|
-
readonly user: {
|
|
1011
|
-
readonly address: string;
|
|
1012
|
-
readonly networkId: string;
|
|
1013
|
-
readonly chainId: number;
|
|
1014
|
-
};
|
|
1015
|
-
readonly app: {
|
|
1016
|
-
readonly name: string;
|
|
1017
|
-
readonly key: string;
|
|
1018
|
-
};
|
|
1019
|
-
readonly signature: string;
|
|
1020
|
-
} | undefined;
|
|
1021
|
-
} | undefined;
|
|
1022
|
-
readonly index: number;
|
|
1023
|
-
readonly timestamp: string;
|
|
1024
|
-
readonly hash: string;
|
|
1025
|
-
readonly skip: number;
|
|
1026
|
-
readonly error?: string | undefined;
|
|
1027
|
-
readonly resultingState?: unknown;
|
|
1028
|
-
readonly id?: string | undefined;
|
|
1029
|
-
} | {
|
|
1030
|
-
readonly type: "PRUNE";
|
|
1031
|
-
readonly input: {
|
|
1032
|
-
readonly end?: import("./types").InputMaybe<number>;
|
|
1033
|
-
readonly start?: import("./types").InputMaybe<number>;
|
|
1034
|
-
};
|
|
1035
|
-
readonly scope: OperationScope;
|
|
1036
|
-
readonly attachments?: readonly {
|
|
1037
|
-
readonly data: string;
|
|
1038
|
-
readonly mimeType: string;
|
|
1039
|
-
readonly extension?: string | null | undefined;
|
|
1040
|
-
readonly fileName?: string | null | undefined;
|
|
1041
|
-
readonly hash: string;
|
|
1042
|
-
}[] | undefined;
|
|
1043
|
-
readonly context?: {
|
|
1044
|
-
readonly signer?: {
|
|
1045
|
-
readonly user: {
|
|
1046
|
-
readonly address: string;
|
|
1047
|
-
readonly networkId: string;
|
|
1048
|
-
readonly chainId: number;
|
|
1049
|
-
};
|
|
1050
|
-
readonly app: {
|
|
1051
|
-
readonly name: string;
|
|
1052
|
-
readonly key: string;
|
|
1053
|
-
};
|
|
1054
|
-
readonly signature: string;
|
|
1055
|
-
} | undefined;
|
|
1056
|
-
} | undefined;
|
|
1057
|
-
readonly index: number;
|
|
1058
|
-
readonly timestamp: string;
|
|
1059
|
-
readonly hash: string;
|
|
1060
|
-
readonly skip: number;
|
|
1061
|
-
readonly error?: string | undefined;
|
|
1062
|
-
readonly resultingState?: unknown;
|
|
1063
|
-
readonly id?: string | undefined;
|
|
1064
|
-
} | {
|
|
1065
|
-
readonly type: "REDO";
|
|
1066
|
-
readonly input: number;
|
|
1067
|
-
readonly scope: OperationScope;
|
|
1068
|
-
readonly attachments?: readonly {
|
|
1069
|
-
readonly data: string;
|
|
1070
|
-
readonly mimeType: string;
|
|
1071
|
-
readonly extension?: string | null | undefined;
|
|
1072
|
-
readonly fileName?: string | null | undefined;
|
|
1073
|
-
readonly hash: string;
|
|
1074
|
-
}[] | undefined;
|
|
1075
|
-
readonly context?: {
|
|
1076
|
-
readonly signer?: {
|
|
1077
|
-
readonly user: {
|
|
1078
|
-
readonly address: string;
|
|
1079
|
-
readonly networkId: string;
|
|
1080
|
-
readonly chainId: number;
|
|
1081
|
-
};
|
|
1082
|
-
readonly app: {
|
|
1083
|
-
readonly name: string;
|
|
1084
|
-
readonly key: string;
|
|
1085
|
-
};
|
|
1086
|
-
readonly signature: string;
|
|
1087
|
-
} | undefined;
|
|
1088
|
-
} | undefined;
|
|
1089
|
-
readonly index: number;
|
|
1090
|
-
readonly timestamp: string;
|
|
1091
|
-
readonly hash: string;
|
|
1092
|
-
readonly skip: number;
|
|
1093
|
-
readonly error?: string | undefined;
|
|
1094
|
-
readonly resultingState?: unknown;
|
|
1095
|
-
readonly id?: string | undefined;
|
|
1096
|
-
} | {
|
|
1097
|
-
readonly type: "SET_NAME";
|
|
1098
|
-
readonly input: string;
|
|
1099
|
-
readonly scope: OperationScope;
|
|
1100
|
-
readonly attachments?: readonly {
|
|
1101
|
-
readonly data: string;
|
|
1102
|
-
readonly mimeType: string;
|
|
1103
|
-
readonly extension?: string | null | undefined;
|
|
1104
|
-
readonly fileName?: string | null | undefined;
|
|
1105
|
-
readonly hash: string;
|
|
1106
|
-
}[] | undefined;
|
|
1107
|
-
readonly context?: {
|
|
1108
|
-
readonly signer?: {
|
|
1109
|
-
readonly user: {
|
|
1110
|
-
readonly address: string;
|
|
1111
|
-
readonly networkId: string;
|
|
1112
|
-
readonly chainId: number;
|
|
1113
|
-
};
|
|
1114
|
-
readonly app: {
|
|
1115
|
-
readonly name: string;
|
|
1116
|
-
readonly key: string;
|
|
1117
|
-
};
|
|
1118
|
-
readonly signature: string;
|
|
1119
|
-
} | undefined;
|
|
1120
|
-
} | undefined;
|
|
1121
|
-
readonly index: number;
|
|
1122
|
-
readonly timestamp: string;
|
|
1123
|
-
readonly hash: string;
|
|
1124
|
-
readonly skip: number;
|
|
1125
|
-
readonly error?: string | undefined;
|
|
1126
|
-
readonly resultingState?: unknown;
|
|
1127
|
-
readonly id?: string | undefined;
|
|
1128
|
-
} | {
|
|
1129
|
-
readonly type: "UNDO";
|
|
1130
|
-
readonly input: number;
|
|
1131
|
-
readonly scope: OperationScope;
|
|
1132
|
-
readonly attachments?: readonly {
|
|
1133
|
-
readonly data: string;
|
|
1134
|
-
readonly mimeType: string;
|
|
1135
|
-
readonly extension?: string | null | undefined;
|
|
1136
|
-
readonly fileName?: string | null | undefined;
|
|
1137
|
-
readonly hash: string;
|
|
1138
|
-
}[] | undefined;
|
|
1139
|
-
readonly context?: {
|
|
1140
|
-
readonly signer?: {
|
|
1141
|
-
readonly user: {
|
|
1142
|
-
readonly address: string;
|
|
1143
|
-
readonly networkId: string;
|
|
1144
|
-
readonly chainId: number;
|
|
1145
|
-
};
|
|
1146
|
-
readonly app: {
|
|
1147
|
-
readonly name: string;
|
|
1148
|
-
readonly key: string;
|
|
1149
|
-
};
|
|
1150
|
-
readonly signature: string;
|
|
1151
|
-
} | undefined;
|
|
1152
|
-
} | undefined;
|
|
1153
|
-
readonly index: number;
|
|
1154
|
-
readonly timestamp: string;
|
|
1155
|
-
readonly hash: string;
|
|
1156
|
-
readonly skip: number;
|
|
1157
|
-
readonly error?: string | undefined;
|
|
1158
|
-
readonly resultingState?: unknown;
|
|
1159
|
-
readonly id?: string | undefined;
|
|
1160
|
-
} | {
|
|
1161
|
-
readonly type: "NOOP";
|
|
1162
|
-
readonly input: unknown;
|
|
1163
|
-
readonly scope: OperationScope;
|
|
1164
|
-
readonly attachments?: readonly {
|
|
1165
|
-
readonly data: string;
|
|
1166
|
-
readonly mimeType: string;
|
|
1167
|
-
readonly extension?: string | null | undefined;
|
|
1168
|
-
readonly fileName?: string | null | undefined;
|
|
1169
|
-
readonly hash: string;
|
|
1170
|
-
}[] | undefined;
|
|
1171
|
-
readonly context?: {
|
|
1172
|
-
readonly signer?: {
|
|
1173
|
-
readonly user: {
|
|
1174
|
-
readonly address: string;
|
|
1175
|
-
readonly networkId: string;
|
|
1176
|
-
readonly chainId: number;
|
|
1177
|
-
};
|
|
1178
|
-
readonly app: {
|
|
1179
|
-
readonly name: string;
|
|
1180
|
-
readonly key: string;
|
|
1181
|
-
};
|
|
1182
|
-
readonly signature: string;
|
|
1183
|
-
} | undefined;
|
|
1184
|
-
} | undefined;
|
|
1185
|
-
readonly index: number;
|
|
1186
|
-
readonly timestamp: string;
|
|
1187
|
-
readonly hash: string;
|
|
1188
|
-
readonly skip: number;
|
|
1189
|
-
readonly error?: string | undefined;
|
|
1190
|
-
readonly resultingState?: unknown;
|
|
1191
|
-
readonly id?: string | undefined;
|
|
1192
|
-
} | import("immer").Immutable<A & {
|
|
1193
|
-
index: number;
|
|
1194
|
-
timestamp: string;
|
|
1195
|
-
hash: string;
|
|
1196
|
-
skip: number;
|
|
1197
|
-
error?: string | undefined;
|
|
1198
|
-
resultingState?: unknown;
|
|
1199
|
-
id?: string | undefined;
|
|
1200
|
-
}>)[];
|
|
1201
|
-
};
|
|
82
|
+
toDocument(): Readonly<Document<T, A, L>>;
|
|
1202
83
|
/**
|
|
1203
84
|
* Gets the attachment associated with the given key.
|
|
1204
85
|
* @param attachment - The key of the attachment to retrieve.
|
|
1205
86
|
*/
|
|
1206
|
-
getAttachment(attachment: AttachmentRef): import(
|
|
87
|
+
getAttachment(attachment: AttachmentRef): import('./types').Attachment;
|
|
1207
88
|
/**
|
|
1208
89
|
* Sets the name of the document.
|
|
1209
90
|
* @param name - The new name of the document.
|