@powerhousedao/shared 6.0.0-dev.47
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/README.md +15 -0
- package/dist/document-model/core/actions.d.ts +62 -0
- package/dist/document-model/core/actions.d.ts.map +1 -0
- package/dist/document-model/core/actions.js +2 -0
- package/dist/document-model/core/actions.js.map +1 -0
- package/dist/document-model/core/constants.d.ts +6 -0
- package/dist/document-model/core/constants.d.ts.map +1 -0
- package/dist/document-model/core/constants.js +8 -0
- package/dist/document-model/core/constants.js.map +1 -0
- package/dist/document-model/core/documents.d.ts +102 -0
- package/dist/document-model/core/documents.d.ts.map +1 -0
- package/dist/document-model/core/documents.js +2 -0
- package/dist/document-model/core/documents.js.map +1 -0
- package/dist/document-model/core/operations.d.ts +74 -0
- package/dist/document-model/core/operations.d.ts.map +1 -0
- package/dist/document-model/core/operations.js +2 -0
- package/dist/document-model/core/operations.js.map +1 -0
- package/dist/document-model/core/ph-types.d.ts +7 -0
- package/dist/document-model/core/ph-types.d.ts.map +1 -0
- package/dist/document-model/core/ph-types.js +2 -0
- package/dist/document-model/core/ph-types.js.map +1 -0
- package/dist/document-model/core/signatures.d.ts +52 -0
- package/dist/document-model/core/signatures.d.ts.map +1 -0
- package/dist/document-model/core/signatures.js +2 -0
- package/dist/document-model/core/signatures.js.map +1 -0
- package/dist/document-model/core/state.d.ts +38 -0
- package/dist/document-model/core/state.d.ts.map +1 -0
- package/dist/document-model/core/state.js +2 -0
- package/dist/document-model/core/state.js.map +1 -0
- package/dist/document-model/core/types.d.ts +533 -0
- package/dist/document-model/core/types.d.ts.map +1 -0
- package/dist/document-model/core/types.js +2 -0
- package/dist/document-model/core/types.js.map +1 -0
- package/dist/document-model/core/upgrades.d.ts +24 -0
- package/dist/document-model/core/upgrades.d.ts.map +1 -0
- package/dist/document-model/core/upgrades.js +2 -0
- package/dist/document-model/core/upgrades.js.map +1 -0
- package/dist/document-model/index.d.ts +5 -0
- package/dist/document-model/index.d.ts.map +1 -0
- package/dist/document-model/index.js +3 -0
- package/dist/document-model/index.js.map +1 -0
- package/dist/document-model/types.d.ts +97 -0
- package/dist/document-model/types.d.ts.map +1 -0
- package/dist/document-model/types.js +2 -0
- package/dist/document-model/types.js.map +1 -0
- package/dist/processors/constants.d.ts +4 -0
- package/dist/processors/constants.d.ts.map +1 -0
- package/dist/processors/constants.js +4 -0
- package/dist/processors/constants.js.map +1 -0
- package/dist/processors/index.d.ts +5 -0
- package/dist/processors/index.d.ts.map +1 -0
- package/dist/processors/index.js +4 -0
- package/dist/processors/index.js.map +1 -0
- package/dist/processors/relational/types.d.ts +72 -0
- package/dist/processors/relational/types.d.ts.map +1 -0
- package/dist/processors/relational/types.js +45 -0
- package/dist/processors/relational/types.js.map +1 -0
- package/dist/processors/relational/utils.d.ts +29 -0
- package/dist/processors/relational/utils.d.ts.map +1 -0
- package/dist/processors/relational/utils.js +67 -0
- package/dist/processors/relational/utils.js.map +1 -0
- package/dist/processors/types.d.ts +76 -0
- package/dist/processors/types.d.ts.map +1 -0
- package/dist/processors/types.js +2 -0
- package/dist/processors/types.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +37 -0
|
@@ -0,0 +1,533 @@
|
|
|
1
|
+
import type { Draft } from "mutative";
|
|
2
|
+
import type { FC, ReactNode } from "react";
|
|
3
|
+
import type { Action, ActionSigner, AppActionSigner, Attachment, AttachmentRef, Operation, PHBaseState, PHDocument, Signature, UserActionSigner } from "./ph-types.js";
|
|
4
|
+
export type Maybe<T> = T | null;
|
|
5
|
+
export type InputMaybe<T> = T | null | undefined;
|
|
6
|
+
export type Exact<T extends Record<string, unknown>> = {
|
|
7
|
+
[K in keyof T]: T[K];
|
|
8
|
+
};
|
|
9
|
+
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
|
|
10
|
+
[SubKey in K]?: Maybe<T[SubKey]>;
|
|
11
|
+
};
|
|
12
|
+
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
|
|
13
|
+
[SubKey in K]: Maybe<T[SubKey]>;
|
|
14
|
+
};
|
|
15
|
+
export type MakeEmpty<T extends Record<string, unknown>, K extends keyof T> = {
|
|
16
|
+
[_ in K]?: never;
|
|
17
|
+
};
|
|
18
|
+
export type Incremental<T> = T | {
|
|
19
|
+
[P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never;
|
|
20
|
+
};
|
|
21
|
+
/** All built-in and custom scalars, mapped to their actual values */
|
|
22
|
+
export type Scalars = {
|
|
23
|
+
ID: {
|
|
24
|
+
input: string;
|
|
25
|
+
output: string;
|
|
26
|
+
};
|
|
27
|
+
String: {
|
|
28
|
+
input: string;
|
|
29
|
+
output: string;
|
|
30
|
+
};
|
|
31
|
+
Boolean: {
|
|
32
|
+
input: boolean;
|
|
33
|
+
output: boolean;
|
|
34
|
+
};
|
|
35
|
+
Int: {
|
|
36
|
+
input: number;
|
|
37
|
+
output: number;
|
|
38
|
+
};
|
|
39
|
+
Float: {
|
|
40
|
+
input: number;
|
|
41
|
+
output: number;
|
|
42
|
+
};
|
|
43
|
+
Address: {
|
|
44
|
+
input: `${string}:0x${string}`;
|
|
45
|
+
output: `${string}:0x${string}`;
|
|
46
|
+
};
|
|
47
|
+
Attachment: {
|
|
48
|
+
input: string;
|
|
49
|
+
output: string;
|
|
50
|
+
};
|
|
51
|
+
DateTime: {
|
|
52
|
+
input: string;
|
|
53
|
+
output: string;
|
|
54
|
+
};
|
|
55
|
+
Unknown: {
|
|
56
|
+
input: unknown;
|
|
57
|
+
output: unknown;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
export type ID = string;
|
|
61
|
+
export type OperationsByScope = Partial<Record<string, Operation[]>>;
|
|
62
|
+
export type SkipHeaderOperationIndex = Partial<Pick<OperationIndex, "index">> & Pick<OperationIndex, "skip">;
|
|
63
|
+
export type UndoRedoAction = SchemaRedoAction | SchemaUndoAction;
|
|
64
|
+
export type DocumentFile = {
|
|
65
|
+
__typename?: "DocumentFile";
|
|
66
|
+
data: Scalars["String"]["output"];
|
|
67
|
+
extension: Maybe<Scalars["String"]["output"]>;
|
|
68
|
+
fileName: Maybe<Scalars["String"]["output"]>;
|
|
69
|
+
mimeType: Scalars["String"]["output"];
|
|
70
|
+
};
|
|
71
|
+
export type IAction = {
|
|
72
|
+
type: Scalars["String"]["output"];
|
|
73
|
+
};
|
|
74
|
+
export type IDocument = {
|
|
75
|
+
created: Scalars["DateTime"]["output"];
|
|
76
|
+
documentType: Scalars["String"]["output"];
|
|
77
|
+
lastModified: Scalars["DateTime"]["output"];
|
|
78
|
+
name: Scalars["String"]["output"];
|
|
79
|
+
operations: Array<IOperation>;
|
|
80
|
+
revision: Scalars["Int"]["output"];
|
|
81
|
+
};
|
|
82
|
+
export type IOperation = {
|
|
83
|
+
hash: Scalars["String"]["output"];
|
|
84
|
+
index: Scalars["Int"]["output"];
|
|
85
|
+
timestampUtcMs: Scalars["DateTime"]["output"];
|
|
86
|
+
type: Scalars["String"]["output"];
|
|
87
|
+
};
|
|
88
|
+
export type Load_State = "LOAD_STATE";
|
|
89
|
+
export type SchemaLoadStateAction = {
|
|
90
|
+
id: Scalars["String"]["output"];
|
|
91
|
+
timestampUtcMs: Scalars["DateTime"]["output"];
|
|
92
|
+
input: LoadStateActionInput;
|
|
93
|
+
type: Load_State;
|
|
94
|
+
scope: string;
|
|
95
|
+
};
|
|
96
|
+
export type LoadStateActionInput = {
|
|
97
|
+
operations: Scalars["Int"]["input"];
|
|
98
|
+
state: LoadStateActionStateInput;
|
|
99
|
+
};
|
|
100
|
+
export type LoadStateActionStateInput = {
|
|
101
|
+
data?: InputMaybe<Scalars["Unknown"]["input"]>;
|
|
102
|
+
name: Scalars["String"]["input"];
|
|
103
|
+
};
|
|
104
|
+
export type MutationLoadStateArgs = {
|
|
105
|
+
input: SchemaLoadStateAction;
|
|
106
|
+
};
|
|
107
|
+
export type MutationPruneArgs = {
|
|
108
|
+
input: SchemaPruneAction;
|
|
109
|
+
};
|
|
110
|
+
export type MutationRedoArgs = {
|
|
111
|
+
input: SchemaRedoAction;
|
|
112
|
+
};
|
|
113
|
+
export type MutationSetNameArgs = {
|
|
114
|
+
input: SchemaSetNameAction;
|
|
115
|
+
};
|
|
116
|
+
export type MutationUndoArgs = {
|
|
117
|
+
input: SchemaUndoAction;
|
|
118
|
+
};
|
|
119
|
+
export type Prune = "PRUNE";
|
|
120
|
+
export type SchemaPruneAction = {
|
|
121
|
+
id: Scalars["String"]["output"];
|
|
122
|
+
timestampUtcMs: Scalars["DateTime"]["output"];
|
|
123
|
+
input: PruneActionInput;
|
|
124
|
+
type: Prune;
|
|
125
|
+
scope: string;
|
|
126
|
+
};
|
|
127
|
+
export type PruneActionInput = {
|
|
128
|
+
end?: InputMaybe<Scalars["Int"]["input"]>;
|
|
129
|
+
start?: InputMaybe<Scalars["Int"]["input"]>;
|
|
130
|
+
};
|
|
131
|
+
export type Query = {
|
|
132
|
+
__typename?: "Query";
|
|
133
|
+
document: Maybe<IDocument>;
|
|
134
|
+
};
|
|
135
|
+
export type Redo = "REDO";
|
|
136
|
+
export type RedoActionInput = {
|
|
137
|
+
count: Scalars["Int"]["input"];
|
|
138
|
+
};
|
|
139
|
+
export type SchemaRedoAction = {
|
|
140
|
+
id: Scalars["String"]["output"];
|
|
141
|
+
timestampUtcMs: Scalars["DateTime"]["output"];
|
|
142
|
+
input: RedoActionInput;
|
|
143
|
+
type: Redo;
|
|
144
|
+
scope: string;
|
|
145
|
+
};
|
|
146
|
+
export type Set_Name = "SET_NAME";
|
|
147
|
+
export type SetNameActionInput = {
|
|
148
|
+
name: Scalars["String"]["input"];
|
|
149
|
+
};
|
|
150
|
+
export type SchemaSetNameAction = {
|
|
151
|
+
id: Scalars["String"]["output"];
|
|
152
|
+
timestampUtcMs: Scalars["DateTime"]["output"];
|
|
153
|
+
input: SetNameActionInput;
|
|
154
|
+
type: Set_Name;
|
|
155
|
+
scope: "global";
|
|
156
|
+
};
|
|
157
|
+
export type SetNameOperation = IOperation & {
|
|
158
|
+
__typename?: "SetNameOperation";
|
|
159
|
+
hash: Scalars["String"]["output"];
|
|
160
|
+
index: Scalars["Int"]["output"];
|
|
161
|
+
input: Scalars["String"]["output"];
|
|
162
|
+
timestamp: Scalars["DateTime"]["output"];
|
|
163
|
+
type: Scalars["String"]["output"];
|
|
164
|
+
};
|
|
165
|
+
export type Undo = "UNDO";
|
|
166
|
+
export type UndoActionInput = {
|
|
167
|
+
count: Scalars["Int"]["input"];
|
|
168
|
+
};
|
|
169
|
+
export type SchemaUndoAction = {
|
|
170
|
+
id: Scalars["String"]["output"];
|
|
171
|
+
timestampUtcMs: Scalars["DateTime"]["output"];
|
|
172
|
+
input: UndoActionInput;
|
|
173
|
+
type: Undo;
|
|
174
|
+
scope: string;
|
|
175
|
+
};
|
|
176
|
+
export type SchemaNOOPAction = {
|
|
177
|
+
id: Scalars["String"]["output"];
|
|
178
|
+
input: Scalars["Unknown"]["input"];
|
|
179
|
+
scope: string;
|
|
180
|
+
timestampUtcMs: Scalars["DateTime"]["output"];
|
|
181
|
+
type: "NOOP";
|
|
182
|
+
};
|
|
183
|
+
export type LoadStateAction = Action & {
|
|
184
|
+
type: "LOAD_STATE";
|
|
185
|
+
input: LoadStateActionInput;
|
|
186
|
+
};
|
|
187
|
+
export type PruneAction = Action & {
|
|
188
|
+
type: "PRUNE";
|
|
189
|
+
input: PruneActionInput;
|
|
190
|
+
};
|
|
191
|
+
export type RedoAction = Action & {
|
|
192
|
+
type: "REDO";
|
|
193
|
+
input: SchemaRedoAction["input"];
|
|
194
|
+
};
|
|
195
|
+
export type SetNameAction = Action & {
|
|
196
|
+
type: "SET_NAME";
|
|
197
|
+
input: SchemaSetNameAction["input"];
|
|
198
|
+
};
|
|
199
|
+
export type UndoAction = Action & {
|
|
200
|
+
type: "UNDO";
|
|
201
|
+
input: SchemaUndoAction["input"];
|
|
202
|
+
};
|
|
203
|
+
export type NOOPAction = Action & {
|
|
204
|
+
type: "NOOP";
|
|
205
|
+
input: SchemaNOOPAction["input"];
|
|
206
|
+
};
|
|
207
|
+
export type CreateDocumentActionInput = {
|
|
208
|
+
model: string;
|
|
209
|
+
version: 0;
|
|
210
|
+
documentId: string;
|
|
211
|
+
signing?: {
|
|
212
|
+
signature: string;
|
|
213
|
+
publicKey: JsonWebKey;
|
|
214
|
+
nonce: string;
|
|
215
|
+
createdAtUtcIso: string;
|
|
216
|
+
documentType: string;
|
|
217
|
+
};
|
|
218
|
+
slug?: string;
|
|
219
|
+
name?: string;
|
|
220
|
+
branch?: string;
|
|
221
|
+
meta?: Record<string, unknown>;
|
|
222
|
+
protocolVersions?: {
|
|
223
|
+
[key: string]: number;
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
export type UpgradeDocumentActionInput = {
|
|
227
|
+
model: string;
|
|
228
|
+
fromVersion: number;
|
|
229
|
+
toVersion: number;
|
|
230
|
+
documentId: string;
|
|
231
|
+
initialState?: object;
|
|
232
|
+
};
|
|
233
|
+
export type DeleteDocumentActionInput = {
|
|
234
|
+
documentId: string;
|
|
235
|
+
propagate?: "none" | "cascade";
|
|
236
|
+
};
|
|
237
|
+
export type AddRelationshipActionInput = {
|
|
238
|
+
sourceId: string;
|
|
239
|
+
targetId: string;
|
|
240
|
+
relationshipType: string;
|
|
241
|
+
metadata?: Record<string, unknown>;
|
|
242
|
+
};
|
|
243
|
+
export type RemoveRelationshipActionInput = {
|
|
244
|
+
sourceId: string;
|
|
245
|
+
targetId: string;
|
|
246
|
+
relationshipType: string;
|
|
247
|
+
};
|
|
248
|
+
export type CreateDocumentAction = Action & {
|
|
249
|
+
type: "CREATE_DOCUMENT";
|
|
250
|
+
input: CreateDocumentActionInput;
|
|
251
|
+
};
|
|
252
|
+
export type UpgradeDocumentAction = Action & {
|
|
253
|
+
type: "UPGRADE_DOCUMENT";
|
|
254
|
+
input: UpgradeDocumentActionInput;
|
|
255
|
+
};
|
|
256
|
+
export type DeleteDocumentAction = Action & {
|
|
257
|
+
type: "DELETE_DOCUMENT";
|
|
258
|
+
input: DeleteDocumentActionInput;
|
|
259
|
+
};
|
|
260
|
+
export type AddRelationshipAction = Action & {
|
|
261
|
+
type: "ADD_RELATIONSHIP";
|
|
262
|
+
input: AddRelationshipActionInput;
|
|
263
|
+
};
|
|
264
|
+
export type RemoveRelationshipAction = Action & {
|
|
265
|
+
type: "REMOVE_RELATIONSHIP";
|
|
266
|
+
input: RemoveRelationshipActionInput;
|
|
267
|
+
};
|
|
268
|
+
export type DocumentAction = LoadStateAction | PruneAction | RedoAction | SetNameAction | UndoAction | NOOPAction;
|
|
269
|
+
export interface ISignal<TType extends string, TInput> {
|
|
270
|
+
type: TType;
|
|
271
|
+
input: TInput;
|
|
272
|
+
}
|
|
273
|
+
export type ISignalResult<TTYpe, TInput, TResult> = {
|
|
274
|
+
signal: {
|
|
275
|
+
type: TTYpe;
|
|
276
|
+
input: TInput;
|
|
277
|
+
};
|
|
278
|
+
result: TResult;
|
|
279
|
+
};
|
|
280
|
+
export type CreateChildDocumentInput = {
|
|
281
|
+
id: string;
|
|
282
|
+
documentType: string;
|
|
283
|
+
};
|
|
284
|
+
export type CreateChildDocumentSignal = ISignal<"CREATE_CHILD_DOCUMENT", CreateChildDocumentInput>;
|
|
285
|
+
export type DeleteChildDocumentInput = {
|
|
286
|
+
id: string;
|
|
287
|
+
};
|
|
288
|
+
export type DeleteChildDocumentSignal = ISignal<"DELETE_CHILD_DOCUMENT", DeleteChildDocumentInput>;
|
|
289
|
+
export type CopyChildDocumentInput = {
|
|
290
|
+
id: string;
|
|
291
|
+
newId: string;
|
|
292
|
+
};
|
|
293
|
+
export type CopyChildDocumentSignal = ISignal<"COPY_CHILD_DOCUMENT", CopyChildDocumentInput>;
|
|
294
|
+
export type Signal = CreateChildDocumentSignal | CopyChildDocumentSignal | DeleteChildDocumentSignal;
|
|
295
|
+
export type SignalDispatch = (signal: Signal) => void;
|
|
296
|
+
export type SignalResult = ISignalResult<CreateChildDocumentSignal["type"], CreateChildDocumentSignal["input"], PHDocument> | ISignalResult<CopyChildDocumentSignal["type"], CopyChildDocumentSignal["input"], boolean> | ISignalResult<DeleteChildDocumentSignal["type"], DeleteChildDocumentSignal["input"], PHDocument>;
|
|
297
|
+
export type SignalResults = {
|
|
298
|
+
CREATE_CHILD_DOCUMENT: PHDocument;
|
|
299
|
+
COPY_CHILD_DOCUMENT: PHDocument;
|
|
300
|
+
DELETE_CHILD_DOCUMENT: boolean;
|
|
301
|
+
};
|
|
302
|
+
export type SignalType<T extends Signal> = T["type"];
|
|
303
|
+
export type FileInput = string | number[] | Uint8Array | ArrayBuffer | Blob;
|
|
304
|
+
export type ReducerOptions = {
|
|
305
|
+
/** The number of operations to skip before this new action is applied. This overrides the skip count in the operation. */
|
|
306
|
+
skip?: number;
|
|
307
|
+
/** When true the skip count is ignored and the action is applied regardless of the skip count */
|
|
308
|
+
ignoreSkipOperations?: boolean;
|
|
309
|
+
/** if true reuses the provided action resulting state instead of replaying it */
|
|
310
|
+
reuseOperationResultingState?: boolean;
|
|
311
|
+
/** if true checks the hashes of the operations */
|
|
312
|
+
checkHashes?: boolean;
|
|
313
|
+
/** Options for performing a replay. */
|
|
314
|
+
replayOptions?: {
|
|
315
|
+
/** The previously created operation to verify against. */
|
|
316
|
+
operation: Operation;
|
|
317
|
+
};
|
|
318
|
+
/** Optional parser for the operation resulting state, uses JSON.parse by default */
|
|
319
|
+
operationResultingStateParser?: <TState>(state: string | null | undefined) => TState;
|
|
320
|
+
/**
|
|
321
|
+
* When true (default), the reducer will prune operations (garbage collect) when processing a skip.
|
|
322
|
+
* When false, it will recompute state for the skip but preserve the existing operations history.
|
|
323
|
+
*/
|
|
324
|
+
pruneOnSkip?: boolean;
|
|
325
|
+
/** The branch being operated on. Defaults to "main". */
|
|
326
|
+
branch?: string;
|
|
327
|
+
/**
|
|
328
|
+
* Protocol version controlling undo/redo behavior.
|
|
329
|
+
* - Version 1 (default): Legacy behavior with index reuse
|
|
330
|
+
* - Version 2: Reactor behavior with monotonic indices
|
|
331
|
+
*/
|
|
332
|
+
protocolVersion?: number;
|
|
333
|
+
/**
|
|
334
|
+
* When true, skip index contiguity validation during replay.
|
|
335
|
+
* Used for V2 state rebuild where gapped indices are expected.
|
|
336
|
+
*/
|
|
337
|
+
skipIndexValidation?: boolean;
|
|
338
|
+
};
|
|
339
|
+
/**
|
|
340
|
+
* A pure function that takes an action and the previous state
|
|
341
|
+
* of the document and returns the new state.
|
|
342
|
+
*/
|
|
343
|
+
export type Reducer<TState extends PHBaseState = PHBaseState> = (document: PHDocument<TState>, action: Action, dispatch?: SignalDispatch, options?: ReducerOptions) => PHDocument<TState>;
|
|
344
|
+
export type StateReducer<TState extends PHBaseState = PHBaseState> = (state: Draft<TState>, action: Action, dispatch?: SignalDispatch) => TState | undefined;
|
|
345
|
+
export type PHStateReducer<TState extends PHBaseState = PHBaseState> = StateReducer<TState>;
|
|
346
|
+
export type Meta = {
|
|
347
|
+
preferredEditor?: string;
|
|
348
|
+
};
|
|
349
|
+
/**
|
|
350
|
+
* Object that indexes attachments of a Document.
|
|
351
|
+
*
|
|
352
|
+
* @remarks
|
|
353
|
+
* This is used to reduce memory usage to avoid
|
|
354
|
+
* multiple instances of the binary data of the attachments.
|
|
355
|
+
*
|
|
356
|
+
*/
|
|
357
|
+
export type FileRegistry = Record<AttachmentRef, Attachment>;
|
|
358
|
+
export type PartialState<TState> = TState | Partial<TState>;
|
|
359
|
+
export type CreateState<TState extends PHBaseState = PHBaseState> = (state?: PartialState<TState>) => TState;
|
|
360
|
+
export type SaveToFileHandle = (document: PHDocument, input: FileSystemFileHandle) => void | Promise<void>;
|
|
361
|
+
export type SaveToFile = (document: PHDocument, path: string, name?: string) => string | Promise<string>;
|
|
362
|
+
export type IsStateOfType<TState> = (state: unknown) => state is TState;
|
|
363
|
+
export type AssertIsStateOfType<TState> = (state: unknown) => asserts state is TState;
|
|
364
|
+
export type IsDocumentOfType<TState extends PHBaseState> = (document: unknown) => document is PHDocument<TState>;
|
|
365
|
+
export type AssertIsDocumentOfType<TState extends PHBaseState> = (document: unknown) => asserts document is PHDocument<TState>;
|
|
366
|
+
export type LoadFromInput<TState extends PHBaseState = PHBaseState> = (input: FileInput) => PHDocument<TState> | Promise<PHDocument<TState>>;
|
|
367
|
+
export type LoadFromFile<TState extends PHBaseState = PHBaseState> = (path: string) => PHDocument<TState> | Promise<PHDocument<TState>>;
|
|
368
|
+
export type CreateDocument<TState extends PHBaseState = PHBaseState> = (initialState?: Partial<TState>, createState?: CreateState<TState>) => PHDocument<TState>;
|
|
369
|
+
export type MappedOperation = {
|
|
370
|
+
ignore: boolean;
|
|
371
|
+
operation: Operation;
|
|
372
|
+
};
|
|
373
|
+
export type DocumentOperationsIgnoreMap = Record<string, MappedOperation[]>;
|
|
374
|
+
export type ActionSignatureContext = {
|
|
375
|
+
documentId: string;
|
|
376
|
+
signer: ActionSigner;
|
|
377
|
+
action: Action;
|
|
378
|
+
previousStateHash: string;
|
|
379
|
+
};
|
|
380
|
+
export type ActionSigningHandler = (message: Uint8Array) => Promise<Uint8Array>;
|
|
381
|
+
export type ActionVerificationHandler = (publicKey: string, signature: Uint8Array, data: Uint8Array) => Promise<boolean>;
|
|
382
|
+
/**
|
|
383
|
+
* Handler for verifying operation signatures.
|
|
384
|
+
*
|
|
385
|
+
* @param operation - The operation to verify
|
|
386
|
+
* @param publicKey - The public key to verify against (from signer.app.key)
|
|
387
|
+
* @returns Promise that resolves to true if signature is valid, false otherwise
|
|
388
|
+
*/
|
|
389
|
+
export type SignatureVerificationHandler = (operation: Operation, publicKey: string) => Promise<boolean>;
|
|
390
|
+
export type ENSInfo = {
|
|
391
|
+
name?: string;
|
|
392
|
+
avatarUrl?: string;
|
|
393
|
+
};
|
|
394
|
+
export type User = {
|
|
395
|
+
address: `0x${string}`;
|
|
396
|
+
networkId: string;
|
|
397
|
+
chainId: number;
|
|
398
|
+
ens?: ENSInfo;
|
|
399
|
+
};
|
|
400
|
+
export type PartialRecord<K extends keyof any, T> = {
|
|
401
|
+
[P in K]?: T;
|
|
402
|
+
};
|
|
403
|
+
export type RevisionsFilter = PartialRecord<string, number>;
|
|
404
|
+
export type GetDocumentOptions = ReducerOptions & {
|
|
405
|
+
revisions?: RevisionsFilter;
|
|
406
|
+
checkHashes?: boolean;
|
|
407
|
+
};
|
|
408
|
+
export type ActionErrorCallback = (error: unknown) => void;
|
|
409
|
+
export type EditorDispatch = (action: Action, onErrorCallback?: ActionErrorCallback) => void;
|
|
410
|
+
export type EditorProps = {
|
|
411
|
+
children?: ReactNode;
|
|
412
|
+
className?: string;
|
|
413
|
+
document?: PHDocument;
|
|
414
|
+
};
|
|
415
|
+
export type SubgraphModule = {
|
|
416
|
+
id: string;
|
|
417
|
+
name: string;
|
|
418
|
+
gql: string;
|
|
419
|
+
endpoint: string;
|
|
420
|
+
};
|
|
421
|
+
export type ImportScriptModule = {
|
|
422
|
+
id: string;
|
|
423
|
+
name: string;
|
|
424
|
+
gql: string;
|
|
425
|
+
endpoint: string;
|
|
426
|
+
};
|
|
427
|
+
export type EditorModule<TProps = any> = {
|
|
428
|
+
Component: FC<EditorProps & TProps>;
|
|
429
|
+
documentTypes: string[];
|
|
430
|
+
config: {
|
|
431
|
+
id: string;
|
|
432
|
+
name: string;
|
|
433
|
+
};
|
|
434
|
+
};
|
|
435
|
+
export type App = {
|
|
436
|
+
id: string;
|
|
437
|
+
name: string;
|
|
438
|
+
driveEditor?: string;
|
|
439
|
+
};
|
|
440
|
+
export type Manifest = {
|
|
441
|
+
name: string;
|
|
442
|
+
description: string;
|
|
443
|
+
category: string;
|
|
444
|
+
publisher: {
|
|
445
|
+
name: string;
|
|
446
|
+
url: string;
|
|
447
|
+
};
|
|
448
|
+
documentModels?: {
|
|
449
|
+
id: string;
|
|
450
|
+
name: string;
|
|
451
|
+
}[];
|
|
452
|
+
editors?: {
|
|
453
|
+
id: string;
|
|
454
|
+
name: string;
|
|
455
|
+
documentTypes: string[];
|
|
456
|
+
}[];
|
|
457
|
+
processors?: {
|
|
458
|
+
id: string;
|
|
459
|
+
name: string;
|
|
460
|
+
}[];
|
|
461
|
+
subgraphs?: {
|
|
462
|
+
id: string;
|
|
463
|
+
name: string;
|
|
464
|
+
}[];
|
|
465
|
+
importScripts?: {
|
|
466
|
+
id: string;
|
|
467
|
+
name: string;
|
|
468
|
+
documentTypes: string[];
|
|
469
|
+
}[];
|
|
470
|
+
apps?: App[];
|
|
471
|
+
};
|
|
472
|
+
export type ValidationError = {
|
|
473
|
+
message: string;
|
|
474
|
+
details: object;
|
|
475
|
+
};
|
|
476
|
+
export type SkipHeaderOperations = Partial<Record<string, number>>;
|
|
477
|
+
export type ReplayDocumentOptions = {
|
|
478
|
+
checkHashes?: boolean;
|
|
479
|
+
reuseOperationResultingState?: boolean;
|
|
480
|
+
operationResultingStateParser?: <TState>(state: string) => TState;
|
|
481
|
+
skipIndexValidation?: boolean;
|
|
482
|
+
};
|
|
483
|
+
export type OperationIndex = {
|
|
484
|
+
index: number;
|
|
485
|
+
skip: number;
|
|
486
|
+
id?: string;
|
|
487
|
+
timestampUtcMs?: string;
|
|
488
|
+
};
|
|
489
|
+
/**
|
|
490
|
+
* Parameters used in a document signature.
|
|
491
|
+
*/
|
|
492
|
+
export type SigningParameters = {
|
|
493
|
+
documentType: string;
|
|
494
|
+
createdAtUtcIso: string;
|
|
495
|
+
/**
|
|
496
|
+
* The nonce can act as both a salt and a typical nonce.
|
|
497
|
+
*/
|
|
498
|
+
nonce: string;
|
|
499
|
+
};
|
|
500
|
+
/**
|
|
501
|
+
* Describes a signer that can sign both document headers and actions.
|
|
502
|
+
*/
|
|
503
|
+
export interface ISigner {
|
|
504
|
+
/** The user associated with the signer */
|
|
505
|
+
user?: UserActionSigner;
|
|
506
|
+
/** The app associated with the signer */
|
|
507
|
+
app?: AppActionSigner;
|
|
508
|
+
/** The corresponding public key */
|
|
509
|
+
publicKey: CryptoKey;
|
|
510
|
+
/**
|
|
511
|
+
* Signs raw data (used for document header signing).
|
|
512
|
+
*
|
|
513
|
+
* @param data - The data to sign.
|
|
514
|
+
* @returns The signature of the data.
|
|
515
|
+
*/
|
|
516
|
+
sign: (data: Uint8Array) => Promise<Uint8Array>;
|
|
517
|
+
/**
|
|
518
|
+
* Verifies a signature.
|
|
519
|
+
*
|
|
520
|
+
* @param data - The data to verify.
|
|
521
|
+
* @param signature - The signature to verify.
|
|
522
|
+
*/
|
|
523
|
+
verify: (data: Uint8Array, signature: Uint8Array) => Promise<void>;
|
|
524
|
+
/**
|
|
525
|
+
* Signs an action (used for operation signing).
|
|
526
|
+
*
|
|
527
|
+
* @param action - The action to sign.
|
|
528
|
+
* @param abortSignal - Optional abort signal to cancel the signing.
|
|
529
|
+
* @returns The signature tuple.
|
|
530
|
+
*/
|
|
531
|
+
signAction: (action: Action, abortSignal?: AbortSignal) => Promise<Signature>;
|
|
532
|
+
}
|
|
533
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../document-model/core/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EACV,MAAM,EACN,YAAY,EACZ,eAAe,EACf,UAAU,EACV,aAAa,EACb,SAAS,EACT,WAAW,EACX,UAAU,EACV,SAAS,EACT,gBAAgB,EACjB,MAAM,eAAe,CAAC;AAEvB,MAAM,MAAM,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAChC,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;AACjD,MAAM,MAAM,KAAK,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI;KACpD,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACrB,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AE,SAAS,CAAC;IAErB;;;;;OAKG;IACH,IAAI,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IAEhD;;;;;OAKG;IACH,MAAM,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnE;;;;;;OAMG;IACH,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;CAC/E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../document-model/core/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Action } from "./actions.js";
|
|
2
|
+
import type { PHDocument } from "./documents.js";
|
|
3
|
+
import type { PHBaseState } from "./state.js";
|
|
4
|
+
/** Upgrade reducer transforms a document from one version to another */
|
|
5
|
+
export type UpgradeReducer<TFrom extends PHBaseState, TTo extends PHBaseState> = (document: PHDocument<TFrom>, action: Action) => PHDocument<TTo>;
|
|
6
|
+
type ModelVersion = number;
|
|
7
|
+
/** Metadata about a version transition */
|
|
8
|
+
export type UpgradeTransition = {
|
|
9
|
+
toVersion: ModelVersion;
|
|
10
|
+
upgradeReducer: UpgradeReducer<any, any>;
|
|
11
|
+
description?: string;
|
|
12
|
+
};
|
|
13
|
+
type TupleMember<T extends readonly unknown[]> = T[number];
|
|
14
|
+
/** Manifest declaring all supported versions and upgrade paths */
|
|
15
|
+
export type UpgradeManifest<TVersions extends readonly number[]> = {
|
|
16
|
+
documentType: string;
|
|
17
|
+
latestVersion: TupleMember<TVersions>;
|
|
18
|
+
supportedVersions: TVersions;
|
|
19
|
+
upgrades: {
|
|
20
|
+
[V in Exclude<TupleMember<TVersions>, 1> as `v${V}`]: UpgradeTransition;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=upgrades.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upgrades.d.ts","sourceRoot":"","sources":["../../../document-model/core/upgrades.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,wEAAwE;AACxE,MAAM,MAAM,cAAc,CACxB,KAAK,SAAS,WAAW,EACzB,GAAG,SAAS,WAAW,IACrB,CAAC,QAAQ,EAAE,UAAU,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,KAAK,UAAU,CAAC,GAAG,CAAC,CAAC;AACrE,KAAK,YAAY,GAAG,MAAM,CAAC;AAE3B,0CAA0C;AAC1C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE,YAAY,CAAC;IACxB,cAAc,EAAE,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,KAAK,WAAW,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3D,kEAAkE;AAElE,MAAM,MAAM,eAAe,CAAC,SAAS,SAAS,SAAS,MAAM,EAAE,IAAI;IACjE,YAAY,EAAE,MAAM,CAAC;IAErB,aAAa,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IAEtC,iBAAiB,EAAE,SAAS,CAAC;IAE7B,QAAQ,EAAE;SAEP,CAAC,IAAI,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,IAAI,IAAI,CAAC,EAAE,GAAG,iBAAiB;KACxE,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upgrades.js","sourceRoot":"","sources":["../../../document-model/core/upgrades.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../document-model/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../document-model/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC"}
|