@powerhousedao/shared 6.2.0-dev.4 → 6.2.0-dev.41
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/clis/args/access-token.mjs +1 -1
- package/dist/clis/args/{common-BQ2pvhCr.d.mts → common-C5n5ai5C.d.mts} +5 -2
- package/dist/clis/args/{common-BQ2pvhCr.d.mts.map → common-C5n5ai5C.d.mts.map} +1 -1
- package/dist/clis/args/{common-fPNESurz.mjs → common-dbsvksvf.mjs} +7 -2
- package/dist/clis/args/common-dbsvksvf.mjs.map +1 -0
- package/dist/clis/args/common.d.mts +2 -2
- package/dist/clis/args/common.mjs +2 -2
- package/dist/clis/args/connect.d.mts +18 -0
- package/dist/clis/args/connect.d.mts.map +1 -1
- package/dist/clis/args/connect.mjs +9 -2
- package/dist/clis/args/connect.mjs.map +1 -1
- package/dist/clis/args/{generate-CTTdiwMD.mjs → generate-Cs5okckF.mjs} +2 -2
- package/dist/clis/args/{generate-CTTdiwMD.mjs.map → generate-Cs5okckF.mjs.map} +1 -1
- package/dist/clis/args/generate.mjs +1 -1
- package/dist/clis/args/{help-CfBzQJpL.mjs → help-BkF9Cxud.mjs} +3 -3
- package/dist/clis/args/{help-CfBzQJpL.mjs.map → help-BkF9Cxud.mjs.map} +1 -1
- package/dist/clis/args/help.mjs +1 -1
- package/dist/clis/args/index.d.mts +3 -3
- package/dist/clis/args/index.mjs +4 -4
- package/dist/clis/args/init.d.mts +3 -0
- package/dist/clis/args/init.d.mts.map +1 -1
- package/dist/clis/args/init.mjs +9 -3
- package/dist/clis/args/init.mjs.map +1 -1
- package/dist/clis/args/inspect.mjs +1 -1
- package/dist/clis/args/install.mjs +1 -1
- package/dist/clis/args/list.mjs +1 -1
- package/dist/clis/args/login.mjs +1 -1
- package/dist/clis/args/migrate.mjs +1 -1
- package/dist/clis/args/publish.mjs +1 -1
- package/dist/clis/args/registry.mjs +1 -1
- package/dist/clis/args/service-C88bN_g_.d.mts +22 -0
- package/dist/clis/args/service-C88bN_g_.d.mts.map +1 -0
- package/dist/clis/args/service.d.mts +1 -1
- package/dist/clis/args/service.mjs +1 -1
- package/dist/clis/args/switchboard.mjs +1 -1
- package/dist/clis/args/uninstall.mjs +1 -1
- package/dist/clis/args/unpublish.mjs +1 -1
- package/dist/clis/args/vetra.d.mts +6 -0
- package/dist/clis/args/vetra.d.mts.map +1 -1
- package/dist/clis/args/vetra.mjs +7 -1
- package/dist/clis/args/vetra.mjs.map +1 -1
- package/dist/clis/build-config.d.mts.map +1 -1
- package/dist/clis/build-config.mjs +2 -1
- package/dist/clis/build-config.mjs.map +1 -1
- package/dist/clis/constants.d.mts +22 -98
- package/dist/clis/constants.d.mts.map +1 -1
- package/dist/clis/constants.mjs +47 -12
- package/dist/clis/constants.mjs.map +1 -1
- package/dist/clis/index.d.mts +72 -103
- package/dist/clis/index.d.mts.map +1 -1
- package/dist/clis/index.mjs +94 -19
- package/dist/clis/index.mjs.map +1 -1
- package/dist/{config-loader-DORViRnN.js → config-loader-237452Tn.js} +5 -1
- package/dist/config-loader-237452Tn.js.map +1 -0
- package/dist/connect/config-loader.d.ts +1 -1
- package/dist/connect/config-loader.js +1 -1
- package/dist/connect/index.d.ts +19 -1
- package/dist/connect/index.d.ts.map +1 -1
- package/dist/connect/index.js +19 -1
- package/dist/connect/index.js.map +1 -1
- package/dist/document-drive/index.d.ts +2 -2
- package/dist/document-model/index.d.ts +4 -4
- package/dist/document-model/index.js +315 -4
- package/dist/document-model/index.js.map +1 -1
- package/dist/document-model/mock.d.ts +1 -1
- package/dist/document-model/mock.js +7 -2
- package/dist/document-model/mock.js.map +1 -1
- package/dist/document-model/utils.d.ts +1 -1
- package/dist/{index-CxGZy8_i.d.ts → index-DLx4nU83.d.ts} +41 -3
- package/dist/index-DLx4nU83.d.ts.map +1 -0
- package/dist/index.d.ts +4 -4
- package/dist/{mock-CbrXTFOF.d.ts → mock-CBcf78ra.d.ts} +2 -2
- package/dist/mock-CBcf78ra.d.ts.map +1 -0
- package/dist/processors/index.d.ts +1 -1
- package/dist/registry/index.d.ts +4 -3
- package/dist/registry/index.d.ts.map +1 -1
- package/dist/registry/index.js +2 -1
- package/dist/registry/index.js.map +1 -1
- package/dist/registry/manifest-slim.d.ts +17 -0
- package/dist/registry/manifest-slim.d.ts.map +1 -0
- package/dist/registry/manifest-slim.js +57 -0
- package/dist/registry/manifest-slim.js.map +1 -0
- package/dist/{types-Daq_zHP_.d.ts → types-BFTKHmzr.d.ts} +9 -4
- package/dist/{types-Daq_zHP_.d.ts.map → types-BFTKHmzr.d.ts.map} +1 -1
- package/dist/types-Bo4Rb8Yf.d.ts +2492 -0
- package/dist/types-Bo4Rb8Yf.d.ts.map +1 -0
- package/dist/{types-CdiI9CJ9.d.ts → types-CgGSyOl6.d.ts} +2 -2
- package/dist/{types-CdiI9CJ9.d.ts.map → types-CgGSyOl6.d.ts.map} +1 -1
- package/package.json +16 -3
- package/dist/clis/args/common-fPNESurz.mjs.map +0 -1
- package/dist/clis/args/service-Bzt4_WtZ.d.mts +0 -106
- package/dist/clis/args/service-Bzt4_WtZ.d.mts.map +0 -1
- package/dist/config-loader-DORViRnN.js.map +0 -1
- package/dist/index-CxGZy8_i.d.ts.map +0 -1
- package/dist/mock-CbrXTFOF.d.ts.map +0 -1
- package/dist/types-DFeAUtLQ.d.ts +0 -21023
- package/dist/types-DFeAUtLQ.d.ts.map +0 -1
|
@@ -0,0 +1,2492 @@
|
|
|
1
|
+
import { f as IAnalyticsStore } from "./types-C1in4fl3.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { Draft } from "mutative";
|
|
4
|
+
import { OperationWithContext } from "@powerhousedao/shared/document-model";
|
|
5
|
+
import { Kysely, QueryCreator } from "kysely";
|
|
6
|
+
import { FC, ReactNode } from "react";
|
|
7
|
+
|
|
8
|
+
//#region processors/constants.d.ts
|
|
9
|
+
declare const PROCESSOR_APPS: readonly ["connect", "switchboard"];
|
|
10
|
+
declare const DEFAULT_RELATIONAL_PROCESSOR_DB_NAME = "relational-db";
|
|
11
|
+
declare const DEFAULT_ANALYTICS_PROCESSOR_DB_NAME = "analytics-db";
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region document-model/signatures.d.ts
|
|
14
|
+
/**
|
|
15
|
+
* A signature of an action.
|
|
16
|
+
*
|
|
17
|
+
* This will be refactored in a future release.
|
|
18
|
+
*/
|
|
19
|
+
type Signature = [string, string, string, string, string];
|
|
20
|
+
/**
|
|
21
|
+
* A user action signer.
|
|
22
|
+
*/
|
|
23
|
+
type UserActionSigner = {
|
|
24
|
+
address: string;
|
|
25
|
+
networkId: string;
|
|
26
|
+
chainId: number;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* An app action signer.
|
|
30
|
+
*/
|
|
31
|
+
type AppActionSigner = {
|
|
32
|
+
name: string;
|
|
33
|
+
key: string;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* An action signer.
|
|
37
|
+
*/
|
|
38
|
+
type ActionSigner = {
|
|
39
|
+
user: UserActionSigner;
|
|
40
|
+
app: AppActionSigner;
|
|
41
|
+
signatures: Signature[];
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Information to verify the document creator.
|
|
45
|
+
*/
|
|
46
|
+
type PHDocumentSignatureInfo = {
|
|
47
|
+
/**
|
|
48
|
+
* The public key of the document creator.
|
|
49
|
+
**/
|
|
50
|
+
publicKey: JsonWebKey; /** The nonce that was appended to the message to create the signature. */
|
|
51
|
+
nonce: string;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Configuration for hashing document state in operations.
|
|
55
|
+
*/
|
|
56
|
+
type HashConfig = {
|
|
57
|
+
/** The hashing algorithm to use (e.g., "sha1", "sha256") */algorithm: string; /** The encoding format for the hash output (e.g., "base64", "hex") */
|
|
58
|
+
encoding: string; /** Optional algorithm-specific parameters */
|
|
59
|
+
params?: Record<string, unknown>;
|
|
60
|
+
};
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region document-model/state.d.ts
|
|
63
|
+
/**
|
|
64
|
+
* Creates a default PHAuthState
|
|
65
|
+
*/
|
|
66
|
+
declare function defaultAuthState(): PHAuthState;
|
|
67
|
+
/**
|
|
68
|
+
* Creates a default PHDocumentState
|
|
69
|
+
*/
|
|
70
|
+
declare function defaultDocumentState(): PHDocumentState;
|
|
71
|
+
/**
|
|
72
|
+
* Creates a default PHBaseState with auth and document properties
|
|
73
|
+
*/
|
|
74
|
+
declare function defaultBaseState(): PHBaseState;
|
|
75
|
+
/**
|
|
76
|
+
* Creates a PHAuthState with the given properties
|
|
77
|
+
*/
|
|
78
|
+
declare function createAuthState(auth?: Partial<PHAuthState>): PHAuthState;
|
|
79
|
+
/**
|
|
80
|
+
* Creates a PHDocumentState with the given properties
|
|
81
|
+
*/
|
|
82
|
+
declare function createDocumentState(document?: Partial<PHDocumentState>): PHDocumentState;
|
|
83
|
+
/**
|
|
84
|
+
* Creates a PHBaseState with the given auth and document properties
|
|
85
|
+
*/
|
|
86
|
+
declare function createBaseState(auth?: Partial<PHAuthState>, document?: Partial<PHDocumentState>): PHBaseState;
|
|
87
|
+
/**
|
|
88
|
+
* The document state of the document.
|
|
89
|
+
*/
|
|
90
|
+
type PHDocumentState = {
|
|
91
|
+
/**
|
|
92
|
+
* The current document model schema version of the document. This is used
|
|
93
|
+
* with the UPGRADE_DOCUMENT operation to specify the DocumentModelModule
|
|
94
|
+
* version to use for reducer execution.
|
|
95
|
+
*/
|
|
96
|
+
version: number; /** Hash configuration for operation state verification */
|
|
97
|
+
hash: HashConfig; /** True if and only if the document has been deleted */
|
|
98
|
+
isDeleted?: boolean; /** The timestamp when the document was deleted, in UTC ISO format */
|
|
99
|
+
deletedAtUtcIso?: string; /** Optional: who deleted the document */
|
|
100
|
+
deletedBy?: string; /** Optional: reason for deletion */
|
|
101
|
+
deletionReason?: string;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* The authentication state of the document.
|
|
105
|
+
*
|
|
106
|
+
* This has yet to be implemented.
|
|
107
|
+
*/
|
|
108
|
+
type PHAuthState = {};
|
|
109
|
+
/**
|
|
110
|
+
* The base state of the document.
|
|
111
|
+
*/
|
|
112
|
+
type PHBaseState = {
|
|
113
|
+
/** Carries authentication information. */auth: PHAuthState; /** Carries information about the document. */
|
|
114
|
+
document: PHDocumentState;
|
|
115
|
+
};
|
|
116
|
+
declare function defaultGlobalState(): DocumentModelGlobalState;
|
|
117
|
+
declare function defaultLocalState(): DocumentModelLocalState;
|
|
118
|
+
declare function defaultPHState(): DocumentModelPHState;
|
|
119
|
+
declare function createGlobalState(state?: Partial<DocumentModelGlobalState>): DocumentModelGlobalState;
|
|
120
|
+
declare function createLocalState(state?: Partial<DocumentModelLocalState>): DocumentModelLocalState;
|
|
121
|
+
declare function createState(baseState?: Partial<PHBaseState>, globalState?: Partial<DocumentModelGlobalState>, localState?: Partial<DocumentModelLocalState>): DocumentModelPHState;
|
|
122
|
+
//#endregion
|
|
123
|
+
//#region document-model/operations.d.ts
|
|
124
|
+
declare function setNameOperation<TDocument extends PHDocument>(document: TDocument, input: {
|
|
125
|
+
name: string;
|
|
126
|
+
}): TDocument & {
|
|
127
|
+
header: {
|
|
128
|
+
name: string;
|
|
129
|
+
id: string;
|
|
130
|
+
sig: PHDocumentSignatureInfo;
|
|
131
|
+
documentType: string;
|
|
132
|
+
createdAtUtcIso: string;
|
|
133
|
+
slug: string;
|
|
134
|
+
branch: string;
|
|
135
|
+
revision: {
|
|
136
|
+
[scope: string]: number;
|
|
137
|
+
};
|
|
138
|
+
lastModifiedAtUtcIso: string;
|
|
139
|
+
protocolVersions?: {
|
|
140
|
+
[key: string]: number;
|
|
141
|
+
};
|
|
142
|
+
meta?: PHDocumentMeta;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
declare function setPreferredEditorOperation<TDocument extends PHDocument>(document: TDocument, input: {
|
|
146
|
+
preferredEditor: string | null;
|
|
147
|
+
}): TDocument;
|
|
148
|
+
declare function undoOperation<TDocument extends PHDocument>(document: TDocument, action: Action, skip: number): {
|
|
149
|
+
document: TDocument;
|
|
150
|
+
action: Action;
|
|
151
|
+
skip: number;
|
|
152
|
+
reuseLastOperationIndex: boolean;
|
|
153
|
+
};
|
|
154
|
+
/**
|
|
155
|
+
* V2 of undoOperation for protocol version 2+.
|
|
156
|
+
* Key differences from undoOperation:
|
|
157
|
+
* - Never reuses operation index (always increments)
|
|
158
|
+
* - Always sets skip=1 (consecutive NOOPs are handled during rebuild/GC)
|
|
159
|
+
* - No complex skip calculation - simpler model where each UNDO is independent
|
|
160
|
+
*/
|
|
161
|
+
declare function undoOperationV2<TDocument extends PHDocument>(document: TDocument, action: Action, skip: number): {
|
|
162
|
+
document: TDocument;
|
|
163
|
+
action: Action;
|
|
164
|
+
skip: number;
|
|
165
|
+
reuseLastOperationIndex: false;
|
|
166
|
+
};
|
|
167
|
+
declare function redoOperation<TDocument extends PHDocument>(document: TDocument, action: Action, skip: number): {
|
|
168
|
+
document: TDocument;
|
|
169
|
+
action: Action;
|
|
170
|
+
skip: number;
|
|
171
|
+
reuseLastOperationIndex: boolean;
|
|
172
|
+
};
|
|
173
|
+
declare function loadStateOperation<TState extends PHBaseState>(document: PHDocument<TState>, action: LoadStateActionInput): PHDocument<TState>;
|
|
174
|
+
/**
|
|
175
|
+
* An operation that was applied to a {@link BaseDocument}.
|
|
176
|
+
*
|
|
177
|
+
* @remarks
|
|
178
|
+
* Wraps an action with an index, to be added to the operations history of a Document.
|
|
179
|
+
* The `index` field is used to keep all operations in order and enable replaying the
|
|
180
|
+
* document's history from the beginning. Note that indices and skips are relative to
|
|
181
|
+
* a specific reactor. Example below:
|
|
182
|
+
*
|
|
183
|
+
* For (index, skip, ts, action)
|
|
184
|
+
* A - [(0, 0, 1, "A0"), (1, 0, 2, "A1")]
|
|
185
|
+
* B - [(0, 0, 0, "B0"), (1, 0, 3, "B1")]
|
|
186
|
+
* ...
|
|
187
|
+
* B gets A's Operations Scenario:
|
|
188
|
+
* B' - [(0, 0, 0, "B0"), (1, 0, 3, "B1"), (2, 1, 1, "A0"), (3, 0, 2, "A1"), (4, 0, 3, "B1")]
|
|
189
|
+
* Then A needs to end up with:
|
|
190
|
+
* A' - [(0, 0, 1, "A0"), (1, 0, 2, "A1"), (2, 2, 0, "B0"), (3, 0, 1, "A0"), (4, 0, 2, "A1"), (5, 0, 3, "B1")]
|
|
191
|
+
* So that both A and B end up with the stream of actions (action):
|
|
192
|
+
* [("B0"), ("A0"), ("A1"), ("B1")]
|
|
193
|
+
*
|
|
194
|
+
* @typeParam A - The type of the action.
|
|
195
|
+
*/
|
|
196
|
+
type Operation = {
|
|
197
|
+
/**
|
|
198
|
+
* This is a stable id, derived from various document and action properties
|
|
199
|
+
* in deriveOperationId().
|
|
200
|
+
*
|
|
201
|
+
* It _cannot_ be an arbitrary string.
|
|
202
|
+
*
|
|
203
|
+
* It it also not unique per operation, as reshuffled operations will keep'
|
|
204
|
+
* the same id they had before they were reshuffled. This means that the
|
|
205
|
+
* IOperationStore may have multiple operations with the same operation id.
|
|
206
|
+
**/
|
|
207
|
+
id: string; /** Position of the operation in the history. This is relative to a specific reactor -- they may not all agree on this value. */
|
|
208
|
+
index: number; /** The number of operations skipped with this Operation. This is relative to a specific reactor -- they may not all agree on this value. */
|
|
209
|
+
skip: number; /** Timestamp of when the operation was added */
|
|
210
|
+
timestampUtcMs: string; /** Hash of the resulting document data after the operation */
|
|
211
|
+
hash: string; /** Error message for a failed action */
|
|
212
|
+
error?: string; /** The resulting state after the operation */
|
|
213
|
+
resultingState?: string;
|
|
214
|
+
/**
|
|
215
|
+
* The action that was applied to the document to produce this operation.
|
|
216
|
+
*/
|
|
217
|
+
action: Action;
|
|
218
|
+
};
|
|
219
|
+
/**
|
|
220
|
+
* The operations history of the document by scope.
|
|
221
|
+
*
|
|
222
|
+
* This will be removed in a future release.
|
|
223
|
+
*
|
|
224
|
+
* TODO: Type should be Partial<Record<string, Operation[]>>,
|
|
225
|
+
* but that is a breaking change for codegen + external doc models.
|
|
226
|
+
*/
|
|
227
|
+
type DocumentOperations = Record<string, Operation[]>;
|
|
228
|
+
type OperationContext = {
|
|
229
|
+
documentId: string;
|
|
230
|
+
documentType: string;
|
|
231
|
+
scope: string;
|
|
232
|
+
branch: string;
|
|
233
|
+
resultingState?: string;
|
|
234
|
+
ordinal: number;
|
|
235
|
+
};
|
|
236
|
+
type OperationWithContext$1 = {
|
|
237
|
+
operation: Operation;
|
|
238
|
+
context: OperationContext;
|
|
239
|
+
};
|
|
240
|
+
//#endregion
|
|
241
|
+
//#region document-model/documents.d.ts
|
|
242
|
+
/** Meta information about the document. */
|
|
243
|
+
type PHDocumentMeta = {
|
|
244
|
+
/** The preferred editor for the document. */preferredEditor?: string;
|
|
245
|
+
};
|
|
246
|
+
/**
|
|
247
|
+
* The header of a document.
|
|
248
|
+
*/
|
|
249
|
+
type PHDocumentHeader = {
|
|
250
|
+
/**
|
|
251
|
+
* The id of the document.
|
|
252
|
+
*
|
|
253
|
+
* This is a Ed25519 signature and is immutable.
|
|
254
|
+
**/
|
|
255
|
+
id: string;
|
|
256
|
+
/**
|
|
257
|
+
* Information to verify the document creator.
|
|
258
|
+
*
|
|
259
|
+
* This is immutable.
|
|
260
|
+
**/
|
|
261
|
+
sig: PHDocumentSignatureInfo;
|
|
262
|
+
/**
|
|
263
|
+
* The type of the document.
|
|
264
|
+
*
|
|
265
|
+
* This is used as part of the signature payload and thus, cannot be changed
|
|
266
|
+
* after the document header has been created.
|
|
267
|
+
**/
|
|
268
|
+
documentType: string;
|
|
269
|
+
/**
|
|
270
|
+
* The timestamp of the creation date of the document, in UTC ISO format.
|
|
271
|
+
*
|
|
272
|
+
* This is used as part of the signature payload and thus, cannot be changed
|
|
273
|
+
* after the document header has been created.
|
|
274
|
+
**/
|
|
275
|
+
createdAtUtcIso: string; /** The slug of the document. */
|
|
276
|
+
slug: string; /** The name of the document. */
|
|
277
|
+
name: string; /** The branch of this document. */
|
|
278
|
+
branch: string;
|
|
279
|
+
/**
|
|
280
|
+
* The revision of each scope of the document. This object is updated every
|
|
281
|
+
* time any _other_ scope is updated.
|
|
282
|
+
*/
|
|
283
|
+
revision: {
|
|
284
|
+
[scope: string]: number;
|
|
285
|
+
};
|
|
286
|
+
/**
|
|
287
|
+
* The timestamp of the last change in the document, in UTC ISO format.
|
|
288
|
+
**/
|
|
289
|
+
lastModifiedAtUtcIso: string;
|
|
290
|
+
/**
|
|
291
|
+
* This is a map from protocol name to version. A protocol can be any set of
|
|
292
|
+
* rules that are applied to the document.
|
|
293
|
+
*
|
|
294
|
+
* Examples of protocols include:
|
|
295
|
+
*
|
|
296
|
+
* - "base-reducer"
|
|
297
|
+
*/
|
|
298
|
+
protocolVersions?: {
|
|
299
|
+
[key: string]: number;
|
|
300
|
+
}; /** Meta information about the document. */
|
|
301
|
+
meta?: PHDocumentMeta;
|
|
302
|
+
};
|
|
303
|
+
/**
|
|
304
|
+
* The base type of a document model.
|
|
305
|
+
*
|
|
306
|
+
* @remarks
|
|
307
|
+
* This type is extended by all Document models.
|
|
308
|
+
*
|
|
309
|
+
* @typeParam TState - The type of the document state.
|
|
310
|
+
*/
|
|
311
|
+
type PHDocument<TState extends PHBaseState = PHBaseState> = {
|
|
312
|
+
/** The header of the document. */header: PHDocumentHeader; /** The document model specific state. */
|
|
313
|
+
state: TState;
|
|
314
|
+
/**
|
|
315
|
+
* The initial state of the document, enabling replaying operations.
|
|
316
|
+
*
|
|
317
|
+
* This will be removed in a future release.
|
|
318
|
+
*/
|
|
319
|
+
initialState: TState;
|
|
320
|
+
/**
|
|
321
|
+
* The operations history of the document.
|
|
322
|
+
*
|
|
323
|
+
* This will be removed in a future release.
|
|
324
|
+
*/
|
|
325
|
+
operations: DocumentOperations;
|
|
326
|
+
/**
|
|
327
|
+
* A list of undone operations
|
|
328
|
+
*
|
|
329
|
+
* This will be removed in a future release.
|
|
330
|
+
*/
|
|
331
|
+
clipboard: Operation[];
|
|
332
|
+
};
|
|
333
|
+
declare function isNoopOperation<TOp extends {
|
|
334
|
+
type: string;
|
|
335
|
+
skip: number;
|
|
336
|
+
hash: string;
|
|
337
|
+
}>(op: Partial<TOp>): boolean;
|
|
338
|
+
declare function isUndoRedo(action: Action): action is UndoRedoAction;
|
|
339
|
+
declare function isUndo(action: Action): action is UndoAction;
|
|
340
|
+
declare function isDocumentAction(action: Action): action is DocumentAction;
|
|
341
|
+
/**
|
|
342
|
+
* Creates a new document. When `documentType` is given the header is stamped
|
|
343
|
+
* with it and the document-scope operations are seeded.
|
|
344
|
+
*/
|
|
345
|
+
declare function baseCreateDocument<TState extends PHBaseState = PHBaseState>(createState: CreateState<TState>, initialState?: Partial<TState>, documentType?: string): PHDocument<TState>;
|
|
346
|
+
declare function hashDocumentStateForScope(document: {
|
|
347
|
+
state: {
|
|
348
|
+
[key: string]: unknown;
|
|
349
|
+
};
|
|
350
|
+
}, scope?: string): string;
|
|
351
|
+
declare function readOnly<T>(value: T): Readonly<T>;
|
|
352
|
+
/**
|
|
353
|
+
* Maps skipped operations in an array of operations.
|
|
354
|
+
* Skipped operations are operations that are ignored during processing.
|
|
355
|
+
* @param operations - The array of operations to map.
|
|
356
|
+
* @param skippedHeadOperations - The number of operations to skip at the head of the array of operations.
|
|
357
|
+
* @returns An array of mapped operations with ignore flag indicating if the operation is skipped.
|
|
358
|
+
* @throws Error if the operation index is invalid and there are missing operations.
|
|
359
|
+
*/
|
|
360
|
+
declare function mapSkippedOperations(operations: Operation[], skippedHeadOperations?: number): MappedOperation[];
|
|
361
|
+
/**
|
|
362
|
+
* V2 version of mapSkippedOperations for protocol version 2+.
|
|
363
|
+
* In V2, all NOOPs have skip=1 and consecutive NOOPs form chains.
|
|
364
|
+
* N consecutive NOOPs at any point skip N preceding content operations.
|
|
365
|
+
*
|
|
366
|
+
* Algorithm: Process from end to start
|
|
367
|
+
* - When hitting a NOOP: increment chain length, mark as ignored
|
|
368
|
+
* - When hitting a non-NOOP:
|
|
369
|
+
* - If chain > 0: decrement chain, mark as ignored (this op was undone)
|
|
370
|
+
* - If chain == 0: mark as not ignored (apply this op)
|
|
371
|
+
*/
|
|
372
|
+
declare function mapSkippedOperationsV2(operations: Operation[]): MappedOperation[];
|
|
373
|
+
/**
|
|
374
|
+
* V2 garbage collect that returns only operations that should be applied for state.
|
|
375
|
+
* Uses the V2 model where consecutive NOOPs form chains.
|
|
376
|
+
* Unlike V1 garbageCollect, this preserves ALL operations but marks which to apply.
|
|
377
|
+
*/
|
|
378
|
+
declare function garbageCollectV2<TOpIndex extends OperationIndex>(sortedOperations: TOpIndex[]): TOpIndex[];
|
|
379
|
+
declare function sortMappedOperations(operations: DocumentOperationsIgnoreMap): MappedOperation[];
|
|
380
|
+
declare function replayDocument<TState extends PHBaseState = PHBaseState>(initialState: TState, operations: DocumentOperations, reducer: Reducer<TState>, header: PHDocumentHeader, dispatch?: SignalDispatch, skipHeaderOperations?: SkipHeaderOperations, options?: ReplayDocumentOptions): PHDocument<TState>;
|
|
381
|
+
declare function parseResultingState<TState>(state: string | null | undefined): TState;
|
|
382
|
+
declare enum IntegrityIssueType {
|
|
383
|
+
UNEXPECTED_INDEX = "UNEXPECTED_INDEX"
|
|
384
|
+
}
|
|
385
|
+
declare enum IntegrityIssueSubType {
|
|
386
|
+
DUPLICATED_INDEX = "DUPLICATED_INDEX",
|
|
387
|
+
MISSING_INDEX = "MISSING_INDEX"
|
|
388
|
+
}
|
|
389
|
+
type IntegrityIssue = {
|
|
390
|
+
operation: OperationIndex;
|
|
391
|
+
issue: IntegrityIssueType;
|
|
392
|
+
category: IntegrityIssueSubType;
|
|
393
|
+
message: string;
|
|
394
|
+
};
|
|
395
|
+
type Reshuffle = (startIndex: OperationIndex, opsA: Operation[], opsB: Operation[]) => Operation[];
|
|
396
|
+
declare function checkCleanedOperationsIntegrity(sortedOperations: OperationIndex[]): IntegrityIssue[];
|
|
397
|
+
declare function garbageCollect<TOpIndex extends OperationIndex>(sortedOperations: TOpIndex[]): TOpIndex[];
|
|
398
|
+
declare function addUndo(sortedOperations: Operation[]): Operation[];
|
|
399
|
+
declare function sortOperations<TOpIndex extends OperationIndex>(operations: TOpIndex[]): TOpIndex[];
|
|
400
|
+
declare function reshuffleByTimestamp<TOp extends OperationIndex>(startIndex: OperationIndex, opsA: TOp[], opsB: TOp[]): TOp[];
|
|
401
|
+
declare function reshuffleByTimestampAndIndex<TOp extends OperationIndex>(startIndex: OperationIndex, opsA: TOp[], opsB: TOp[]): TOp[];
|
|
402
|
+
declare function operationsAreEqual<TOp extends {
|
|
403
|
+
index: number;
|
|
404
|
+
skip: number;
|
|
405
|
+
type?: string;
|
|
406
|
+
scope?: string;
|
|
407
|
+
input?: unknown;
|
|
408
|
+
}>(op1: TOp, op2: TOp): boolean;
|
|
409
|
+
declare function attachBranch(trunk: Operation[], newBranch: Operation[]): [Operation[], Operation[]];
|
|
410
|
+
declare function precedes(op1: OperationIndex, op2: OperationIndex): boolean;
|
|
411
|
+
declare function split(sortedTargetOperations: Operation[], sortedMergeOperations: Operation[]): [Operation[], Operation[], Operation[]];
|
|
412
|
+
declare function merge(sortedTargetOperations: Operation[], sortedMergeOperations: Operation[], reshuffle: Reshuffle): Operation[];
|
|
413
|
+
declare function nextSkipNumber(sortedOperations: OperationIndex[]): number;
|
|
414
|
+
declare function checkOperationsIntegrity(operations: Operation[]): IntegrityIssue[];
|
|
415
|
+
declare function groupOperationsByScope(operations: Operation[]): Partial<Record<string, Operation[]>>;
|
|
416
|
+
type PrepareOperationsResult = {
|
|
417
|
+
validOperations: Operation[];
|
|
418
|
+
invalidOperations: Operation[];
|
|
419
|
+
duplicatedOperations: Operation[];
|
|
420
|
+
integrityIssues: IntegrityIssue[];
|
|
421
|
+
};
|
|
422
|
+
declare function prepareOperations(operationsHistory: Operation[], newOperations: Operation[]): PrepareOperationsResult;
|
|
423
|
+
declare function removeExistingOperations(newOperations: Operation[], operationsHistory: Operation[]): Operation[];
|
|
424
|
+
/**
|
|
425
|
+
* Skips header operations and returns the remaining operations.
|
|
426
|
+
*
|
|
427
|
+
* @param operations - The array of operations.
|
|
428
|
+
* @param skipHeaderOperation - The skip header operation index.
|
|
429
|
+
* @returns The remaining operations after skipping header operations.
|
|
430
|
+
*/
|
|
431
|
+
declare function skipHeaderOperations(operations: Operation[], skipHeaderOperation: SkipHeaderOperationIndex): Operation[];
|
|
432
|
+
declare function garbageCollectDocumentOperations(documentOperations: DocumentOperations): DocumentOperations;
|
|
433
|
+
/**
|
|
434
|
+
* Filters out duplicated operations from the target operations array based on their IDs.
|
|
435
|
+
* If an operation has an ID, it is considered duplicated if there is another operation in the source operations array with the same ID.
|
|
436
|
+
* If an operation does not have an ID, it is considered unique and will not be filtered out.
|
|
437
|
+
* @param targetOperations - The array of target operations to filter.
|
|
438
|
+
* @param sourceOperations - The array of source operations to compare against.
|
|
439
|
+
* @returns An array of operations with duplicates filtered out.
|
|
440
|
+
*/
|
|
441
|
+
declare function filterDuplicatedOperations<T extends {
|
|
442
|
+
id?: string | number;
|
|
443
|
+
}>(targetOperations: T[], sourceOperations: T[]): T[];
|
|
444
|
+
declare function filterDocumentOperationsResultingState(documentOperations?: DocumentOperations): {
|
|
445
|
+
[x: string]: Operation[] | {
|
|
446
|
+
id: string;
|
|
447
|
+
index: number;
|
|
448
|
+
skip: number;
|
|
449
|
+
timestampUtcMs: string;
|
|
450
|
+
hash: string;
|
|
451
|
+
error?: string;
|
|
452
|
+
action: Action;
|
|
453
|
+
}[];
|
|
454
|
+
};
|
|
455
|
+
/**
|
|
456
|
+
* Calculates the difference between two arrays of operations.
|
|
457
|
+
* Returns an array of operations that are present in `clearedOperationsA` but not in `clearedOperationsB`.
|
|
458
|
+
*
|
|
459
|
+
* @template TOp - The type of the operations.
|
|
460
|
+
* @param {TOp[]} clearedOperationsA - The first array of operations.
|
|
461
|
+
* @param {TOp[]} clearedOperationsB - The second array of operations.
|
|
462
|
+
* @returns {TOp[]} - The difference between the two arrays of operations.
|
|
463
|
+
*/
|
|
464
|
+
declare function diffOperations<TOp extends OperationIndex>(clearedOperationsA: TOp[], clearedOperationsB: TOp[]): TOp[];
|
|
465
|
+
declare function getDocumentLastModified(document: PHDocument): string;
|
|
466
|
+
/**
|
|
467
|
+
* Updates the document header with the latest revision number and
|
|
468
|
+
* date of last modification.
|
|
469
|
+
*
|
|
470
|
+
* @param document The current state of the document.
|
|
471
|
+
* @param scope The scope of the operation.
|
|
472
|
+
* @param lastModifiedTimestamp Optional timestamp to use directly, avoiding a scan of all operations.
|
|
473
|
+
* @returns The updated document state.
|
|
474
|
+
*/
|
|
475
|
+
declare function updateHeaderRevision(document: PHDocument, scope: string, lastModifiedTimestamp?: string): PHDocument;
|
|
476
|
+
//#endregion
|
|
477
|
+
//#region document-model/actions.d.ts
|
|
478
|
+
/**
|
|
479
|
+
* Cancels the last `count` operations.
|
|
480
|
+
*
|
|
481
|
+
* @param count - Number of operations to cancel
|
|
482
|
+
* @category Actions
|
|
483
|
+
*/
|
|
484
|
+
declare const undo: (count?: number, scope?: string) => UndoAction;
|
|
485
|
+
/**
|
|
486
|
+
* Cancels the last `count` {@link undo | UNDO} operations.
|
|
487
|
+
*
|
|
488
|
+
* @param count - Number of UNDO operations to cancel
|
|
489
|
+
* @category Actions
|
|
490
|
+
*/
|
|
491
|
+
declare const redo: (count?: number, scope?: string) => RedoAction;
|
|
492
|
+
/**
|
|
493
|
+
* Joins multiple operations into a single {@link loadState | LOAD_STATE} operation.
|
|
494
|
+
*
|
|
495
|
+
* @remarks
|
|
496
|
+
* Useful to keep operations history smaller. Operations to prune are selected by index,
|
|
497
|
+
* similar to the {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice | slice} method in Arrays.
|
|
498
|
+
*
|
|
499
|
+
* @param start - Index of the first operation to prune
|
|
500
|
+
* @param end - Index of the last operation to prune
|
|
501
|
+
* @category Actions
|
|
502
|
+
*/
|
|
503
|
+
declare const prune: (start?: number, end?: number, scope?: string) => SchemaPruneAction;
|
|
504
|
+
/**
|
|
505
|
+
* Replaces the state of the document.
|
|
506
|
+
*
|
|
507
|
+
* @remarks
|
|
508
|
+
* This action shouldn't be used directly. It is dispatched by the {@link prune} action.
|
|
509
|
+
*
|
|
510
|
+
* @param state - State to be set in the document.
|
|
511
|
+
* @param operations - Number of operations that were removed from the previous state.
|
|
512
|
+
* @category Actions
|
|
513
|
+
*/
|
|
514
|
+
declare const loadState: <TState extends PHBaseState = PHBaseState>(state: TState & {
|
|
515
|
+
name: string;
|
|
516
|
+
}, operations: number) => LoadStateAction;
|
|
517
|
+
declare const noop: (scope?: string) => NOOPAction;
|
|
518
|
+
/**
|
|
519
|
+
* Helper function to be used by action creators.
|
|
520
|
+
*
|
|
521
|
+
* @remarks
|
|
522
|
+
* Creates an action with the given type and input properties. The input
|
|
523
|
+
* properties default to an empty object.
|
|
524
|
+
*
|
|
525
|
+
* @typeParam A - Type of the action to be returned.
|
|
526
|
+
*
|
|
527
|
+
* @param type - The type of the action.
|
|
528
|
+
* @param input - The input properties of the action.
|
|
529
|
+
* @param _attachments - Deprecated and ignored. Retained so action creators
|
|
530
|
+
* generated before the attachment-system removal keep their 5-argument shape.
|
|
531
|
+
* @param validator - The validator to use for the input properties.
|
|
532
|
+
* @param scope - The scope of the action, can either be 'global' or 'local'.
|
|
533
|
+
*
|
|
534
|
+
* @throws Error if the type is empty or not a string.
|
|
535
|
+
*
|
|
536
|
+
* @returns The new action.
|
|
537
|
+
*/
|
|
538
|
+
declare function createAction<TAction extends Action>(type: TAction["type"], input?: TAction["input"], _attachments?: unknown, validator?: () => {
|
|
539
|
+
parse(v: unknown): TAction["input"];
|
|
540
|
+
}, scope?: Action["scope"]): TAction;
|
|
541
|
+
/**
|
|
542
|
+
* This function should be used instead of { ...action } to ensure
|
|
543
|
+
* that extra properties are not included in the action.
|
|
544
|
+
*/
|
|
545
|
+
declare const actionFromAction: (action: Action) => Action;
|
|
546
|
+
declare const operationFromAction: (action: Action, index: number, skip: number, context: OperationContext) => Operation;
|
|
547
|
+
declare const operationFromOperation: (operation: Operation, index: number, skip: number, context: OperationContext) => Operation;
|
|
548
|
+
declare const operationWithContext: (operation: Operation, context: ActionContext) => Operation;
|
|
549
|
+
declare const actionContext: () => ActionContext;
|
|
550
|
+
declare const actionSigner: (user: UserActionSigner, app: AppActionSigner, signatures?: Signature[]) => ActionSigner;
|
|
551
|
+
declare function buildOperationSignature(context: ActionSignatureContext, signMethod: ActionSigningHandler): Promise<Signature>;
|
|
552
|
+
declare function buildSignedAction<TState extends PHBaseState = PHBaseState>(action: Action, reducer: Reducer<TState>, document: PHDocument<TState>, signer: ActionSigner, signHandler: ActionSigningHandler): Promise<Operation>;
|
|
553
|
+
declare function verifyOperationSignature(signature: Signature, signer: Omit<ActionSigner, "signatures">, verifyHandler: ActionVerificationHandler): Promise<boolean>;
|
|
554
|
+
/**
|
|
555
|
+
* Changes the name of the document.
|
|
556
|
+
*
|
|
557
|
+
* @param name - The name to be set in the document.
|
|
558
|
+
* @category Actions
|
|
559
|
+
*/
|
|
560
|
+
declare const setName: (name: string | {
|
|
561
|
+
name: string;
|
|
562
|
+
}) => SetNameAction;
|
|
563
|
+
/**
|
|
564
|
+
* Changes the preferred editor recorded in the document header meta.
|
|
565
|
+
*
|
|
566
|
+
* Passing `null` clears the preferred editor.
|
|
567
|
+
*
|
|
568
|
+
* @category Actions
|
|
569
|
+
*/
|
|
570
|
+
declare const setPreferredEditor: (input: string | null | {
|
|
571
|
+
preferredEditor: string | null;
|
|
572
|
+
}) => SetPreferredEditorAction;
|
|
573
|
+
declare const setModelName: (input: SetModelNameInput) => SetModelNameAction;
|
|
574
|
+
declare const setModelId: (input: SetModelIdInput) => SetModelIdAction;
|
|
575
|
+
declare const setModelExtension: (input: SetModelExtensionInput) => SetModelExtensionAction;
|
|
576
|
+
declare const setModelDescription: (input: SetModelDescriptionInput) => SetModelDescriptionAction;
|
|
577
|
+
declare const setAuthorName: (input: SetAuthorNameInput) => SetAuthorNameAction;
|
|
578
|
+
declare const setAuthorWebsite: (input: SetAuthorWebsiteInput) => SetAuthorWebsiteAction;
|
|
579
|
+
declare const addModule: (input: AddModuleInput) => AddModuleAction;
|
|
580
|
+
declare const setModuleName: (input: SetModuleNameInput) => SetModuleNameAction;
|
|
581
|
+
declare const setModuleDescription: (input: SetModuleDescriptionInput) => SetModuleDescriptionAction;
|
|
582
|
+
declare const deleteModule: (input: DeleteModuleInput) => DeleteModuleAction;
|
|
583
|
+
declare const reorderModules: (input: ReorderModulesInput) => ReorderModulesAction;
|
|
584
|
+
declare const addOperation: (input: AddOperationInput) => AddOperationAction;
|
|
585
|
+
declare const setOperationName: (input: SetOperationNameInput) => SetOperationNameAction;
|
|
586
|
+
declare const setOperationScope: (input: SetOperationScopeInput) => SetOperationScopeAction;
|
|
587
|
+
declare const setOperationSchema: (input: SetOperationSchemaInput) => SetOperationSchemaAction;
|
|
588
|
+
declare const setOperationDescription: (input: SetOperationDescriptionInput) => SetOperationDescriptionAction;
|
|
589
|
+
declare const setOperationTemplate: (input: SetOperationTemplateInput) => SetOperationTemplateAction;
|
|
590
|
+
declare const setOperationReducer: (input: SetOperationReducerInput) => SetOperationReducerAction;
|
|
591
|
+
declare const moveOperation: (input: MoveOperationInput) => MoveOperationAction;
|
|
592
|
+
declare const deleteOperation: (input: DeleteOperationInput) => DeleteOperationAction;
|
|
593
|
+
declare const reorderModuleOperations: (input: ReorderModuleOperationsInput) => ReorderModuleOperationsAction;
|
|
594
|
+
declare const addOperationError: (input: AddOperationErrorInput) => AddOperationErrorAction;
|
|
595
|
+
declare const setOperationErrorCode: (input: SetOperationErrorCodeInput) => SetOperationErrorCodeAction;
|
|
596
|
+
declare const setOperationErrorName: (input: SetOperationErrorNameInput) => SetOperationErrorNameAction;
|
|
597
|
+
declare const setOperationErrorDescription: (input: SetOperationErrorDescriptionInput) => SetOperationErrorDescriptionAction;
|
|
598
|
+
declare const setOperationErrorTemplate: (input: SetOperationErrorTemplateInput) => SetOperationErrorTemplateAction;
|
|
599
|
+
declare const deleteOperationError: (input: DeleteOperationErrorInput) => DeleteOperationErrorAction;
|
|
600
|
+
declare const reorderOperationErrors: (input: ReorderOperationErrorsInput) => ReorderOperationErrorsAction;
|
|
601
|
+
declare const addOperationExample: (input: AddOperationExampleInput) => AddOperationExampleAction;
|
|
602
|
+
declare const updateOperationExample: (input: UpdateOperationExampleInput) => UpdateOperationExampleAction;
|
|
603
|
+
declare const deleteOperationExample: (input: DeleteOperationExampleInput) => DeleteOperationExampleAction;
|
|
604
|
+
declare const reorderOperationExamples: (input: ReorderOperationExamplesInput) => ReorderOperationExamplesAction;
|
|
605
|
+
declare const operationExampleCreators: {
|
|
606
|
+
addOperationExample: (input: AddOperationExampleInput) => AddOperationExampleAction;
|
|
607
|
+
updateOperationExample: (input: UpdateOperationExampleInput) => UpdateOperationExampleAction;
|
|
608
|
+
deleteOperationExample: (input: DeleteOperationExampleInput) => DeleteOperationExampleAction;
|
|
609
|
+
reorderOperationExamples: (input: ReorderOperationExamplesInput) => ReorderOperationExamplesAction;
|
|
610
|
+
};
|
|
611
|
+
declare const setStateSchema: (input: SetStateSchemaInput) => SetStateSchemaAction;
|
|
612
|
+
declare const setInitialState: (input: SetInitialStateInput) => SetInitialStateAction;
|
|
613
|
+
declare const addStateExample: (input: AddStateExampleInput) => AddStateExampleAction;
|
|
614
|
+
declare const updateStateExample: (input: UpdateStateExampleInput) => UpdateStateExampleAction;
|
|
615
|
+
declare const deleteStateExample: (input: DeleteStateExampleInput) => DeleteStateExampleAction;
|
|
616
|
+
declare const reorderStateExamples: (input: ReorderStateExamplesInput) => ReorderStateExamplesAction;
|
|
617
|
+
declare const addChangeLogItem: (input: AddChangeLogItemInput) => AddChangeLogItemAction;
|
|
618
|
+
declare const updateChangeLogItem: (input: UpdateChangeLogItemInput) => UpdateChangeLogItemAction;
|
|
619
|
+
declare const deleteChangeLogItem: (input: DeleteChangeLogItemInput) => DeleteChangeLogItemAction;
|
|
620
|
+
declare const reorderChangeLogItems: (input: ReorderChangeLogItemsInput) => ReorderChangeLogItemsAction;
|
|
621
|
+
declare const releaseNewVersion: () => ReleaseNewVersionAction;
|
|
622
|
+
declare const baseActions: {
|
|
623
|
+
setName: (name: string | {
|
|
624
|
+
name: string;
|
|
625
|
+
}) => SetNameAction;
|
|
626
|
+
setPreferredEditor: (input: string | null | {
|
|
627
|
+
preferredEditor: string | null;
|
|
628
|
+
}) => SetPreferredEditorAction;
|
|
629
|
+
undo: (count?: number, scope?: string) => UndoAction;
|
|
630
|
+
redo: (count?: number, scope?: string) => RedoAction;
|
|
631
|
+
prune: (start?: number, end?: number, scope?: string) => SchemaPruneAction;
|
|
632
|
+
loadState: <TState extends PHBaseState = PHBaseState>(state: TState & {
|
|
633
|
+
name: string;
|
|
634
|
+
}, operations: number) => LoadStateAction;
|
|
635
|
+
noop: (scope?: string) => NOOPAction;
|
|
636
|
+
};
|
|
637
|
+
declare const documentModelActions: {
|
|
638
|
+
setModelName: (input: SetModelNameInput) => SetModelNameAction;
|
|
639
|
+
setModelId: (input: SetModelIdInput) => SetModelIdAction;
|
|
640
|
+
setModelExtension: (input: SetModelExtensionInput) => SetModelExtensionAction;
|
|
641
|
+
setModelDescription: (input: SetModelDescriptionInput) => SetModelDescriptionAction;
|
|
642
|
+
setAuthorName: (input: SetAuthorNameInput) => SetAuthorNameAction;
|
|
643
|
+
setAuthorWebsite: (input: SetAuthorWebsiteInput) => SetAuthorWebsiteAction;
|
|
644
|
+
addModule: (input: AddModuleInput) => AddModuleAction;
|
|
645
|
+
setModuleName: (input: SetModuleNameInput) => SetModuleNameAction;
|
|
646
|
+
setModuleDescription: (input: SetModuleDescriptionInput) => SetModuleDescriptionAction;
|
|
647
|
+
deleteModule: (input: DeleteModuleInput) => DeleteModuleAction;
|
|
648
|
+
reorderModules: (input: ReorderModulesInput) => ReorderModulesAction;
|
|
649
|
+
addOperation: (input: AddOperationInput) => AddOperationAction;
|
|
650
|
+
setOperationName: (input: SetOperationNameInput) => SetOperationNameAction;
|
|
651
|
+
setOperationScope: (input: SetOperationScopeInput) => SetOperationScopeAction;
|
|
652
|
+
setOperationSchema: (input: SetOperationSchemaInput) => SetOperationSchemaAction;
|
|
653
|
+
setOperationDescription: (input: SetOperationDescriptionInput) => SetOperationDescriptionAction;
|
|
654
|
+
setOperationTemplate: (input: SetOperationTemplateInput) => SetOperationTemplateAction;
|
|
655
|
+
setOperationReducer: (input: SetOperationReducerInput) => SetOperationReducerAction;
|
|
656
|
+
moveOperation: (input: MoveOperationInput) => MoveOperationAction;
|
|
657
|
+
deleteOperation: (input: DeleteOperationInput) => DeleteOperationAction;
|
|
658
|
+
reorderModuleOperations: (input: ReorderModuleOperationsInput) => ReorderModuleOperationsAction;
|
|
659
|
+
addOperationError: (input: AddOperationErrorInput) => AddOperationErrorAction;
|
|
660
|
+
setOperationErrorCode: (input: SetOperationErrorCodeInput) => SetOperationErrorCodeAction;
|
|
661
|
+
setOperationErrorName: (input: SetOperationErrorNameInput) => SetOperationErrorNameAction;
|
|
662
|
+
setOperationErrorDescription: (input: SetOperationErrorDescriptionInput) => SetOperationErrorDescriptionAction;
|
|
663
|
+
setOperationErrorTemplate: (input: SetOperationErrorTemplateInput) => SetOperationErrorTemplateAction;
|
|
664
|
+
deleteOperationError: (input: DeleteOperationErrorInput) => DeleteOperationErrorAction;
|
|
665
|
+
reorderOperationErrors: (input: ReorderOperationErrorsInput) => ReorderOperationErrorsAction;
|
|
666
|
+
addOperationExample: (input: AddOperationExampleInput) => AddOperationExampleAction;
|
|
667
|
+
updateOperationExample: (input: UpdateOperationExampleInput) => UpdateOperationExampleAction;
|
|
668
|
+
deleteOperationExample: (input: DeleteOperationExampleInput) => DeleteOperationExampleAction;
|
|
669
|
+
reorderOperationExamples: (input: ReorderOperationExamplesInput) => ReorderOperationExamplesAction;
|
|
670
|
+
setStateSchema: (input: SetStateSchemaInput) => SetStateSchemaAction;
|
|
671
|
+
setInitialState: (input: SetInitialStateInput) => SetInitialStateAction;
|
|
672
|
+
addStateExample: (input: AddStateExampleInput) => AddStateExampleAction;
|
|
673
|
+
updateStateExample: (input: UpdateStateExampleInput) => UpdateStateExampleAction;
|
|
674
|
+
deleteStateExample: (input: DeleteStateExampleInput) => DeleteStateExampleAction;
|
|
675
|
+
reorderStateExamples: (input: ReorderStateExamplesInput) => ReorderStateExamplesAction;
|
|
676
|
+
addChangeLogItem: (input: AddChangeLogItemInput) => AddChangeLogItemAction;
|
|
677
|
+
updateChangeLogItem: (input: UpdateChangeLogItemInput) => UpdateChangeLogItemAction;
|
|
678
|
+
deleteChangeLogItem: (input: DeleteChangeLogItemInput) => DeleteChangeLogItemAction;
|
|
679
|
+
reorderChangeLogItems: (input: ReorderChangeLogItemsInput) => ReorderChangeLogItemsAction;
|
|
680
|
+
releaseNewVersion: () => ReleaseNewVersionAction;
|
|
681
|
+
};
|
|
682
|
+
declare const actions: {
|
|
683
|
+
setModelName: (input: SetModelNameInput) => SetModelNameAction;
|
|
684
|
+
setModelId: (input: SetModelIdInput) => SetModelIdAction;
|
|
685
|
+
setModelExtension: (input: SetModelExtensionInput) => SetModelExtensionAction;
|
|
686
|
+
setModelDescription: (input: SetModelDescriptionInput) => SetModelDescriptionAction;
|
|
687
|
+
setAuthorName: (input: SetAuthorNameInput) => SetAuthorNameAction;
|
|
688
|
+
setAuthorWebsite: (input: SetAuthorWebsiteInput) => SetAuthorWebsiteAction;
|
|
689
|
+
addModule: (input: AddModuleInput) => AddModuleAction;
|
|
690
|
+
setModuleName: (input: SetModuleNameInput) => SetModuleNameAction;
|
|
691
|
+
setModuleDescription: (input: SetModuleDescriptionInput) => SetModuleDescriptionAction;
|
|
692
|
+
deleteModule: (input: DeleteModuleInput) => DeleteModuleAction;
|
|
693
|
+
reorderModules: (input: ReorderModulesInput) => ReorderModulesAction;
|
|
694
|
+
addOperation: (input: AddOperationInput) => AddOperationAction;
|
|
695
|
+
setOperationName: (input: SetOperationNameInput) => SetOperationNameAction;
|
|
696
|
+
setOperationScope: (input: SetOperationScopeInput) => SetOperationScopeAction;
|
|
697
|
+
setOperationSchema: (input: SetOperationSchemaInput) => SetOperationSchemaAction;
|
|
698
|
+
setOperationDescription: (input: SetOperationDescriptionInput) => SetOperationDescriptionAction;
|
|
699
|
+
setOperationTemplate: (input: SetOperationTemplateInput) => SetOperationTemplateAction;
|
|
700
|
+
setOperationReducer: (input: SetOperationReducerInput) => SetOperationReducerAction;
|
|
701
|
+
moveOperation: (input: MoveOperationInput) => MoveOperationAction;
|
|
702
|
+
deleteOperation: (input: DeleteOperationInput) => DeleteOperationAction;
|
|
703
|
+
reorderModuleOperations: (input: ReorderModuleOperationsInput) => ReorderModuleOperationsAction;
|
|
704
|
+
addOperationError: (input: AddOperationErrorInput) => AddOperationErrorAction;
|
|
705
|
+
setOperationErrorCode: (input: SetOperationErrorCodeInput) => SetOperationErrorCodeAction;
|
|
706
|
+
setOperationErrorName: (input: SetOperationErrorNameInput) => SetOperationErrorNameAction;
|
|
707
|
+
setOperationErrorDescription: (input: SetOperationErrorDescriptionInput) => SetOperationErrorDescriptionAction;
|
|
708
|
+
setOperationErrorTemplate: (input: SetOperationErrorTemplateInput) => SetOperationErrorTemplateAction;
|
|
709
|
+
deleteOperationError: (input: DeleteOperationErrorInput) => DeleteOperationErrorAction;
|
|
710
|
+
reorderOperationErrors: (input: ReorderOperationErrorsInput) => ReorderOperationErrorsAction;
|
|
711
|
+
addOperationExample: (input: AddOperationExampleInput) => AddOperationExampleAction;
|
|
712
|
+
updateOperationExample: (input: UpdateOperationExampleInput) => UpdateOperationExampleAction;
|
|
713
|
+
deleteOperationExample: (input: DeleteOperationExampleInput) => DeleteOperationExampleAction;
|
|
714
|
+
reorderOperationExamples: (input: ReorderOperationExamplesInput) => ReorderOperationExamplesAction;
|
|
715
|
+
setStateSchema: (input: SetStateSchemaInput) => SetStateSchemaAction;
|
|
716
|
+
setInitialState: (input: SetInitialStateInput) => SetInitialStateAction;
|
|
717
|
+
addStateExample: (input: AddStateExampleInput) => AddStateExampleAction;
|
|
718
|
+
updateStateExample: (input: UpdateStateExampleInput) => UpdateStateExampleAction;
|
|
719
|
+
deleteStateExample: (input: DeleteStateExampleInput) => DeleteStateExampleAction;
|
|
720
|
+
reorderStateExamples: (input: ReorderStateExamplesInput) => ReorderStateExamplesAction;
|
|
721
|
+
addChangeLogItem: (input: AddChangeLogItemInput) => AddChangeLogItemAction;
|
|
722
|
+
updateChangeLogItem: (input: UpdateChangeLogItemInput) => UpdateChangeLogItemAction;
|
|
723
|
+
deleteChangeLogItem: (input: DeleteChangeLogItemInput) => DeleteChangeLogItemAction;
|
|
724
|
+
reorderChangeLogItems: (input: ReorderChangeLogItemsInput) => ReorderChangeLogItemsAction;
|
|
725
|
+
releaseNewVersion: () => ReleaseNewVersionAction;
|
|
726
|
+
setName: (name: string | {
|
|
727
|
+
name: string;
|
|
728
|
+
}) => SetNameAction;
|
|
729
|
+
setPreferredEditor: (input: string | null | {
|
|
730
|
+
preferredEditor: string | null;
|
|
731
|
+
}) => SetPreferredEditorAction;
|
|
732
|
+
undo: (count?: number, scope?: string) => UndoAction;
|
|
733
|
+
redo: (count?: number, scope?: string) => RedoAction;
|
|
734
|
+
prune: (start?: number, end?: number, scope?: string) => SchemaPruneAction;
|
|
735
|
+
loadState: <TState extends PHBaseState = PHBaseState>(state: TState & {
|
|
736
|
+
name: string;
|
|
737
|
+
}, operations: number) => LoadStateAction;
|
|
738
|
+
noop: (scope?: string) => NOOPAction;
|
|
739
|
+
};
|
|
740
|
+
/**
|
|
741
|
+
* The context of an action.
|
|
742
|
+
*/
|
|
743
|
+
type ActionContext = {
|
|
744
|
+
/** The index of the previous operation, showing intended ordering. */prevOpIndex?: number; /** The hash of the previous operation, showing intended state. */
|
|
745
|
+
prevOpHash?: string; /** A nonce, to cover specific signing attacks and to prevent replay attacks from no-ops. */
|
|
746
|
+
nonce?: string; /** The signer of the action. */
|
|
747
|
+
signer?: ActionSigner;
|
|
748
|
+
};
|
|
749
|
+
/**
|
|
750
|
+
* Defines the basic structure of an action.
|
|
751
|
+
*/
|
|
752
|
+
type Action = {
|
|
753
|
+
/** The id of the action. This is distinct from the operation id. */id: string; /** The name of the action. */
|
|
754
|
+
type: string; /** The timestamp of the action. */
|
|
755
|
+
timestampUtcMs: string; /** The payload of the action. */
|
|
756
|
+
input: unknown; /** The scope of the action */
|
|
757
|
+
scope: string; /** The context of the action. */
|
|
758
|
+
context?: ActionContext;
|
|
759
|
+
};
|
|
760
|
+
//#endregion
|
|
761
|
+
//#region processors/types.d.ts
|
|
762
|
+
type ProcessorDispatchResult = {
|
|
763
|
+
id: string;
|
|
764
|
+
status: string;
|
|
765
|
+
};
|
|
766
|
+
interface IProcessorDispatch {
|
|
767
|
+
execute(docId: string, branch: string, actions: Action[], signal?: AbortSignal, meta?: Record<string, unknown>): Promise<ProcessorDispatchResult>;
|
|
768
|
+
}
|
|
769
|
+
interface IProcessorHostModule {
|
|
770
|
+
analyticsStore: IAnalyticsStore;
|
|
771
|
+
relationalDb: IRelationalDb;
|
|
772
|
+
processorApp: ProcessorApp;
|
|
773
|
+
dispatch: IProcessorDispatch;
|
|
774
|
+
getReadModel<T>(name: string): T;
|
|
775
|
+
config?: Map<string, unknown>;
|
|
776
|
+
}
|
|
777
|
+
/**
|
|
778
|
+
* Filter for matching operations to processors.
|
|
779
|
+
* All fields are optional arrays - when provided, operations must match at least one value in each specified field.
|
|
780
|
+
* When a field is undefined or empty, it matches all values for that field.
|
|
781
|
+
*/
|
|
782
|
+
type ProcessorFilter = {
|
|
783
|
+
documentType?: string[];
|
|
784
|
+
scope?: string[];
|
|
785
|
+
branch?: string[];
|
|
786
|
+
documentId?: string[];
|
|
787
|
+
};
|
|
788
|
+
/**
|
|
789
|
+
* Describes an object that can process operations.
|
|
790
|
+
*/
|
|
791
|
+
interface IProcessor {
|
|
792
|
+
/**
|
|
793
|
+
* Processes a list of operations with context.
|
|
794
|
+
* Called when operations match this processor's filter.
|
|
795
|
+
*/
|
|
796
|
+
onOperations(operations: OperationWithContext[]): Promise<void>;
|
|
797
|
+
/**
|
|
798
|
+
* Called when the processor is disconnected.
|
|
799
|
+
* Used to clean up any resources allocated during processor creation.
|
|
800
|
+
*/
|
|
801
|
+
onDisconnect(): Promise<void>;
|
|
802
|
+
}
|
|
803
|
+
/**
|
|
804
|
+
* Relates a processor to its filter configuration.
|
|
805
|
+
*/
|
|
806
|
+
type ProcessorRecord = {
|
|
807
|
+
processor: IProcessor;
|
|
808
|
+
filter: ProcessorFilter;
|
|
809
|
+
startFrom?: "beginning" | "current";
|
|
810
|
+
};
|
|
811
|
+
/**
|
|
812
|
+
* A factory function that creates processor records for a given drive.
|
|
813
|
+
* Called once per drive when the drive is first detected or when the factory is registered.
|
|
814
|
+
*/
|
|
815
|
+
type ProcessorFactory = (driveHeader: PHDocumentHeader, processorApp?: ProcessorApp) => Promise<ProcessorRecord[]> | ProcessorRecord[];
|
|
816
|
+
/** Takes a processor host module and builds processor factories using its context */
|
|
817
|
+
type ProcessorFactoryBuilder = (module: IProcessorHostModule) => Promise<ProcessorFactory> | ProcessorFactory;
|
|
818
|
+
type ProcessorStatus = "active" | "errored";
|
|
819
|
+
type TrackedProcessor = {
|
|
820
|
+
processorId: string;
|
|
821
|
+
factoryId: string;
|
|
822
|
+
driveId: string;
|
|
823
|
+
processorIndex: number;
|
|
824
|
+
record: ProcessorRecord;
|
|
825
|
+
lastOrdinal: number;
|
|
826
|
+
status: ProcessorStatus;
|
|
827
|
+
lastError: string | undefined;
|
|
828
|
+
lastErrorTimestamp: Date | undefined;
|
|
829
|
+
retry: () => Promise<void>;
|
|
830
|
+
};
|
|
831
|
+
/**
|
|
832
|
+
* Manages processor creation and destruction based on drive operations.
|
|
833
|
+
*/
|
|
834
|
+
interface IProcessorManager {
|
|
835
|
+
/**
|
|
836
|
+
* Registers a processor factory.
|
|
837
|
+
* Immediately creates processors for all existing drives.
|
|
838
|
+
*/
|
|
839
|
+
registerFactory(identifier: string, factory: ProcessorFactory): Promise<void>;
|
|
840
|
+
/**
|
|
841
|
+
* Unregisters a processor factory and disconnects all processors it created.
|
|
842
|
+
*/
|
|
843
|
+
unregisterFactory(identifier: string): Promise<void>;
|
|
844
|
+
/**
|
|
845
|
+
* Gets a tracked processor by its ID.
|
|
846
|
+
*/
|
|
847
|
+
get(processorId: string): TrackedProcessor | undefined;
|
|
848
|
+
/**
|
|
849
|
+
* Gets all tracked processors.
|
|
850
|
+
*/
|
|
851
|
+
getAll(): TrackedProcessor[];
|
|
852
|
+
}
|
|
853
|
+
type ProcessorApp = (typeof PROCESSOR_APPS)[number];
|
|
854
|
+
type ProcessorApps = readonly ProcessorApp[];
|
|
855
|
+
//#endregion
|
|
856
|
+
//#region processors/relational/types.d.ts
|
|
857
|
+
type IRelationalQueryMethods = "selectFrom" | "selectNoFrom" | "with" | "withRecursive";
|
|
858
|
+
type IRelationalQueryBuilder<Schema = unknown> = Pick<QueryCreator<Schema>, IRelationalQueryMethods> & {
|
|
859
|
+
withSchema: (schema: string) => IRelationalQueryBuilder<Schema>;
|
|
860
|
+
};
|
|
861
|
+
type HashAlgorithms = "fnv1a";
|
|
862
|
+
type IBaseRelationalDb<Schema = unknown> = Kysely<Schema>;
|
|
863
|
+
/**
|
|
864
|
+
* The standardized relational database interface for relational db processors.
|
|
865
|
+
* This abstraction provides type-safe database operations while hiding the underlying
|
|
866
|
+
* database framework implementation details.
|
|
867
|
+
**/
|
|
868
|
+
type IRelationalDb<Schema = unknown> = IBaseRelationalDb<Schema> & {
|
|
869
|
+
createNamespace<NamespaceSchema>(namespace: string): Promise<IRelationalDb<ExtractProcessorSchemaOrSelf<NamespaceSchema>>>;
|
|
870
|
+
queryNamespace<NamespaceSchema>(namespace: string): IRelationalQueryBuilder<NamespaceSchema>;
|
|
871
|
+
};
|
|
872
|
+
type ExtractProcessorSchemaOrSelf<TProcessor> = TProcessor extends RelationalDbProcessor<infer TSchema> ? TSchema : TProcessor;
|
|
873
|
+
type RelationalDbProcessorClass<TSchema> = typeof RelationalDbProcessor<TSchema>;
|
|
874
|
+
interface IRelationalDbProcessor<TDatabaseSchema = unknown> extends IProcessor {
|
|
875
|
+
namespace: string;
|
|
876
|
+
query: IRelationalQueryBuilder<TDatabaseSchema>;
|
|
877
|
+
filter: ProcessorFilter;
|
|
878
|
+
initAndUpgrade(): Promise<void>;
|
|
879
|
+
}
|
|
880
|
+
declare const IS_RELATIONAL_DB_PROCESSOR: unique symbol;
|
|
881
|
+
/**
|
|
882
|
+
* Base class for relational db processors that require a relational database storage.
|
|
883
|
+
* This class abstracts database initialization, migration management, and resource cleanup,
|
|
884
|
+
* allowing derived classes to focus on business logic.
|
|
885
|
+
*/
|
|
886
|
+
declare abstract class RelationalDbProcessor<TDatabaseSchema = unknown> implements IRelationalDbProcessor<TDatabaseSchema> {
|
|
887
|
+
protected _namespace: string;
|
|
888
|
+
protected _filter: ProcessorFilter;
|
|
889
|
+
protected relationalDb: IRelationalDb<TDatabaseSchema>;
|
|
890
|
+
constructor(_namespace: string, _filter: ProcessorFilter, relationalDb: IRelationalDb<TDatabaseSchema>);
|
|
891
|
+
static [IS_RELATIONAL_DB_PROCESSOR]: boolean;
|
|
892
|
+
/**
|
|
893
|
+
* Returns the namespace for a given drive id.
|
|
894
|
+
* This method can be overridden by derived classes to provide a custom namespace.
|
|
895
|
+
*/
|
|
896
|
+
static getNamespace(driveId: string): string;
|
|
897
|
+
static query<Schema>(this: RelationalDbProcessorClass<Schema>, driveId: string, db: IRelationalDb<any>): IRelationalQueryBuilder<Schema>;
|
|
898
|
+
/**
|
|
899
|
+
* Processes a list of operations with context.
|
|
900
|
+
* Called when operations match this processor's filter.
|
|
901
|
+
*/
|
|
902
|
+
abstract onOperations(operations: OperationWithContext[]): Promise<void>;
|
|
903
|
+
/**
|
|
904
|
+
* Returns the filter for the processor.
|
|
905
|
+
* This method can be overridden by derived classes to provide a custom filter.
|
|
906
|
+
*/
|
|
907
|
+
get filter(): ProcessorFilter;
|
|
908
|
+
/**
|
|
909
|
+
* Returns the namespace used by the processor.
|
|
910
|
+
*/
|
|
911
|
+
get namespace(): string;
|
|
912
|
+
get query(): IRelationalQueryBuilder<TDatabaseSchema>;
|
|
913
|
+
/**
|
|
914
|
+
* Abstract method that derived classes must implement.
|
|
915
|
+
* This method is meant to be called on subclasses to initialize and upgrade the database.
|
|
916
|
+
*/
|
|
917
|
+
abstract initAndUpgrade(): Promise<void>;
|
|
918
|
+
/**
|
|
919
|
+
* Called when the processor is disconnected.
|
|
920
|
+
* This method is meant to be overridden by subclasses to clean up resources.
|
|
921
|
+
*/
|
|
922
|
+
abstract onDisconnect(): Promise<void>;
|
|
923
|
+
}
|
|
924
|
+
//#endregion
|
|
925
|
+
//#region processors/relational/utils.d.ts
|
|
926
|
+
/**
|
|
927
|
+
* Hashes a string to a lowercase base-26 string.
|
|
928
|
+
* @param str The string to hash.
|
|
929
|
+
* @param length The length of the hash. Defaults to 10.
|
|
930
|
+
* @param algorithm The hashing algorithm to use. Defaults to "fnv1a".
|
|
931
|
+
* @returns The hashed string.
|
|
932
|
+
*/
|
|
933
|
+
declare function hashNamespace(str: string, length?: number): string;
|
|
934
|
+
/**
|
|
935
|
+
* Creates a RelationalDb instance with namespace support.
|
|
936
|
+
* @param baseDb The base RelationalDb instance to enhance.
|
|
937
|
+
* @param baseOptions The default options for namespace creation. Hashes namespace by default.
|
|
938
|
+
* @returns The enhanced RelationalDb instance.
|
|
939
|
+
*/
|
|
940
|
+
declare function createRelationalDb<Schema>(baseDb: IBaseRelationalDb<Schema>, baseOptions?: NamespaceOptions): IRelationalDb<Schema>;
|
|
941
|
+
type NamespaceOptions = {
|
|
942
|
+
hashNamespace?: boolean;
|
|
943
|
+
};
|
|
944
|
+
declare function createNamespacedDb<Schema>(db: IBaseRelationalDb<any>, namespace: string, options?: NamespaceOptions): Promise<IRelationalDb<Schema>>;
|
|
945
|
+
declare function createNamespacedQueryBuilder<Schema>(db: IBaseRelationalDb<any>, namespace: string, options?: NamespaceOptions): IRelationalQueryBuilder<Schema>;
|
|
946
|
+
/**
|
|
947
|
+
* Returns a query builder for a RelationalDb instance.
|
|
948
|
+
* @param query The RelationalDb instance to convert.
|
|
949
|
+
* @returns The IRelationalQueryBuilder instance.
|
|
950
|
+
*/
|
|
951
|
+
declare function relationalDbToQueryBuilder<TSchema>(query: IBaseRelationalDb<TSchema>): IRelationalQueryBuilder<TSchema>;
|
|
952
|
+
//#endregion
|
|
953
|
+
//#region document-model/schemas.d.ts
|
|
954
|
+
type definedNonNullAny = {};
|
|
955
|
+
declare const isDefinedNonNullAny: (v: any) => v is definedNonNullAny;
|
|
956
|
+
declare const definedNonNullAnySchema: z.ZodAny & z.ZodType<definedNonNullAny, any, z.core.$ZodTypeInternals<definedNonNullAny, any>>;
|
|
957
|
+
declare const Load_StateSchema: z.ZodEnum<{
|
|
958
|
+
LOAD_STATE: "LOAD_STATE";
|
|
959
|
+
}>;
|
|
960
|
+
declare const PruneSchema: z.ZodEnum<{
|
|
961
|
+
PRUNE: "PRUNE";
|
|
962
|
+
}>;
|
|
963
|
+
declare const RedoSchema: z.ZodEnum<{
|
|
964
|
+
REDO: "REDO";
|
|
965
|
+
}>;
|
|
966
|
+
declare const Set_NameSchema: z.ZodEnum<{
|
|
967
|
+
SET_NAME: "SET_NAME";
|
|
968
|
+
}>;
|
|
969
|
+
declare const Set_PreferredEditorSchema: z.ZodEnum<{
|
|
970
|
+
SET_PREFERRED_EDITOR: "SET_PREFERRED_EDITOR";
|
|
971
|
+
}>;
|
|
972
|
+
declare const UndoSchema: z.ZodEnum<{
|
|
973
|
+
UNDO: "UNDO";
|
|
974
|
+
}>;
|
|
975
|
+
declare function OperationScopeSchema(): z.ZodString;
|
|
976
|
+
declare function DocumentActionSchema(): z.ZodUnion<readonly [z.ZodObject<Required<{
|
|
977
|
+
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
978
|
+
timestampUtcMs: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
979
|
+
input: z.ZodType<LoadStateActionInput, LoadStateActionInput, z.core.$ZodTypeInternals<LoadStateActionInput, LoadStateActionInput>>;
|
|
980
|
+
type: z.ZodType<"LOAD_STATE", "LOAD_STATE", z.core.$ZodTypeInternals<"LOAD_STATE", "LOAD_STATE">>;
|
|
981
|
+
scope: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
982
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
983
|
+
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
984
|
+
timestampUtcMs: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
985
|
+
input: z.ZodType<PruneActionInput, PruneActionInput, z.core.$ZodTypeInternals<PruneActionInput, PruneActionInput>>;
|
|
986
|
+
type: z.ZodType<"PRUNE", "PRUNE", z.core.$ZodTypeInternals<"PRUNE", "PRUNE">>;
|
|
987
|
+
scope: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
988
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
989
|
+
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
990
|
+
timestampUtcMs: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
991
|
+
input: z.ZodType<RedoActionInput, RedoActionInput, z.core.$ZodTypeInternals<RedoActionInput, RedoActionInput>>;
|
|
992
|
+
type: z.ZodType<"REDO", "REDO", z.core.$ZodTypeInternals<"REDO", "REDO">>;
|
|
993
|
+
scope: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
994
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
995
|
+
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
996
|
+
timestampUtcMs: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
997
|
+
input: z.ZodType<SetNameActionInput, SetNameActionInput, z.core.$ZodTypeInternals<SetNameActionInput, SetNameActionInput>>;
|
|
998
|
+
type: z.ZodType<"SET_NAME", "SET_NAME", z.core.$ZodTypeInternals<"SET_NAME", "SET_NAME">>;
|
|
999
|
+
scope: z.ZodType<"global", "global", z.core.$ZodTypeInternals<"global", "global">>;
|
|
1000
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1001
|
+
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1002
|
+
timestampUtcMs: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1003
|
+
input: z.ZodType<SetPreferredEditorActionInput, SetPreferredEditorActionInput, z.core.$ZodTypeInternals<SetPreferredEditorActionInput, SetPreferredEditorActionInput>>;
|
|
1004
|
+
type: z.ZodType<"SET_PREFERRED_EDITOR", "SET_PREFERRED_EDITOR", z.core.$ZodTypeInternals<"SET_PREFERRED_EDITOR", "SET_PREFERRED_EDITOR">>;
|
|
1005
|
+
scope: z.ZodType<"header", "header", z.core.$ZodTypeInternals<"header", "header">>;
|
|
1006
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1007
|
+
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1008
|
+
timestampUtcMs: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1009
|
+
input: z.ZodType<UndoActionInput, UndoActionInput, z.core.$ZodTypeInternals<UndoActionInput, UndoActionInput>>;
|
|
1010
|
+
type: z.ZodType<"UNDO", "UNDO", z.core.$ZodTypeInternals<"UNDO", "UNDO">>;
|
|
1011
|
+
scope: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1012
|
+
}>, z.core.$strip>]>;
|
|
1013
|
+
declare function LoadStateActionSchema(): z.ZodObject<Properties<SchemaLoadStateAction>>;
|
|
1014
|
+
declare function LoadStateActionInputSchema(): z.ZodObject<Properties<LoadStateActionInput>>;
|
|
1015
|
+
declare function LoadStateActionStateInputSchema(): z.ZodObject<Properties<LoadStateActionStateInput>>;
|
|
1016
|
+
declare function PruneActionSchema(): z.ZodObject<Properties<SchemaPruneAction>>;
|
|
1017
|
+
declare function PruneActionInputSchema(): z.ZodObject<Properties<PruneActionInput>>;
|
|
1018
|
+
declare function RedoActionInputSchema(): z.ZodObject<{
|
|
1019
|
+
count: z.ZodNumber;
|
|
1020
|
+
}, z.core.$strip>;
|
|
1021
|
+
declare function RedoActionSchema(): z.ZodObject<Properties<SchemaRedoAction>>;
|
|
1022
|
+
declare function SetNameActionInputSchema(): z.ZodObject<{
|
|
1023
|
+
name: z.ZodString;
|
|
1024
|
+
}, z.core.$strip>;
|
|
1025
|
+
declare function SetNameActionSchema(): z.ZodObject<Properties<SchemaSetNameAction>>;
|
|
1026
|
+
declare function SetPreferredEditorActionInputSchema(): z.ZodObject<{
|
|
1027
|
+
preferredEditor: z.ZodNullable<z.ZodString>;
|
|
1028
|
+
}, z.core.$strip>;
|
|
1029
|
+
declare function SetPreferredEditorActionSchema(): z.ZodObject<Properties<SchemaSetPreferredEditorAction>>;
|
|
1030
|
+
declare function UndoActionInputSchema(): z.ZodObject<{
|
|
1031
|
+
count: z.ZodNumber;
|
|
1032
|
+
}, z.core.$strip>;
|
|
1033
|
+
declare function UndoActionSchema(): z.ZodObject<Properties<SchemaUndoAction>>;
|
|
1034
|
+
type Properties<T> = Required<{ [K in keyof T]: z.ZodType<T[K], T[K]> }>;
|
|
1035
|
+
declare function AddChangeLogItemInputSchema(): z.ZodObject<Properties<AddChangeLogItemInput>>;
|
|
1036
|
+
declare function AddModuleInputSchema(): z.ZodObject<Properties<AddModuleInput>>;
|
|
1037
|
+
declare function AddOperationErrorInputSchema(): z.ZodObject<Properties<AddOperationErrorInput>>;
|
|
1038
|
+
declare function AddOperationExampleInputSchema(): z.ZodObject<Properties<AddOperationExampleInput>>;
|
|
1039
|
+
declare function AddOperationInputSchema(): z.ZodObject<Properties<AddOperationInput>>;
|
|
1040
|
+
declare function AddStateExampleInputSchema(): z.ZodObject<Properties<AddStateExampleInput>>;
|
|
1041
|
+
declare function AuthorSchema(): z.ZodObject<Properties<Author>>;
|
|
1042
|
+
declare function CodeExampleSchema(): z.ZodObject<Properties<CodeExample>>;
|
|
1043
|
+
declare function DeleteChangeLogItemInputSchema(): z.ZodObject<Properties<DeleteChangeLogItemInput>>;
|
|
1044
|
+
declare function DeleteModuleInputSchema(): z.ZodObject<Properties<DeleteModuleInput>>;
|
|
1045
|
+
declare function DeleteOperationErrorInputSchema(): z.ZodObject<Properties<DeleteOperationErrorInput>>;
|
|
1046
|
+
declare function DeleteOperationExampleInputSchema(): z.ZodObject<Properties<DeleteOperationExampleInput>>;
|
|
1047
|
+
declare function DeleteOperationInputSchema(): z.ZodObject<Properties<DeleteOperationInput>>;
|
|
1048
|
+
declare function DeleteStateExampleInputSchema(): z.ZodObject<Properties<DeleteStateExampleInput>>;
|
|
1049
|
+
declare function DocumentModelInputSchema(): z.ZodUnion<readonly [z.ZodObject<Required<{
|
|
1050
|
+
__typename?: z.ZodType<"AddChangeLogItemInput" | undefined, "AddChangeLogItemInput" | undefined, z.core.$ZodTypeInternals<"AddChangeLogItemInput" | undefined, "AddChangeLogItemInput" | undefined>> | undefined;
|
|
1051
|
+
content: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1052
|
+
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1053
|
+
insertBefore: z.ZodType<Maybe<string>, Maybe<string>, z.core.$ZodTypeInternals<Maybe<string>, Maybe<string>>>;
|
|
1054
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1055
|
+
description?: z.ZodType<InputMaybe<string>, InputMaybe<string>, z.core.$ZodTypeInternals<InputMaybe<string>, InputMaybe<string>>> | undefined;
|
|
1056
|
+
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1057
|
+
name: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1058
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1059
|
+
errorCode?: z.ZodType<InputMaybe<string>, InputMaybe<string>, z.core.$ZodTypeInternals<InputMaybe<string>, InputMaybe<string>>> | undefined;
|
|
1060
|
+
errorDescription?: z.ZodType<InputMaybe<string>, InputMaybe<string>, z.core.$ZodTypeInternals<InputMaybe<string>, InputMaybe<string>>> | undefined;
|
|
1061
|
+
errorName?: z.ZodType<InputMaybe<string>, InputMaybe<string>, z.core.$ZodTypeInternals<InputMaybe<string>, InputMaybe<string>>> | undefined;
|
|
1062
|
+
errorTemplate?: z.ZodType<InputMaybe<string>, InputMaybe<string>, z.core.$ZodTypeInternals<InputMaybe<string>, InputMaybe<string>>> | undefined;
|
|
1063
|
+
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1064
|
+
operationId: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1065
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1066
|
+
example: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1067
|
+
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1068
|
+
operationId: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1069
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1070
|
+
description?: z.ZodType<InputMaybe<string>, InputMaybe<string>, z.core.$ZodTypeInternals<InputMaybe<string>, InputMaybe<string>>> | undefined;
|
|
1071
|
+
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1072
|
+
moduleId: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1073
|
+
name: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1074
|
+
reducer?: z.ZodType<InputMaybe<string>, InputMaybe<string>, z.core.$ZodTypeInternals<InputMaybe<string>, InputMaybe<string>>> | undefined;
|
|
1075
|
+
schema?: z.ZodType<InputMaybe<string>, InputMaybe<string>, z.core.$ZodTypeInternals<InputMaybe<string>, InputMaybe<string>>> | undefined;
|
|
1076
|
+
template?: z.ZodType<InputMaybe<string>, InputMaybe<string>, z.core.$ZodTypeInternals<InputMaybe<string>, InputMaybe<string>>> | undefined;
|
|
1077
|
+
scope?: z.ZodType<InputMaybe<string>, InputMaybe<string>, z.core.$ZodTypeInternals<InputMaybe<string>, InputMaybe<string>>> | undefined;
|
|
1078
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1079
|
+
scope: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1080
|
+
example: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1081
|
+
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1082
|
+
insertBefore?: z.ZodType<InputMaybe<string>, InputMaybe<string>, z.core.$ZodTypeInternals<InputMaybe<string>, InputMaybe<string>>> | undefined;
|
|
1083
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1084
|
+
__typename?: z.ZodType<"DeleteChangeLogItemInput" | undefined, "DeleteChangeLogItemInput" | undefined, z.core.$ZodTypeInternals<"DeleteChangeLogItemInput" | undefined, "DeleteChangeLogItemInput" | undefined>> | undefined;
|
|
1085
|
+
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1086
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1087
|
+
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1088
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1089
|
+
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1090
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1091
|
+
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1092
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1093
|
+
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1094
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1095
|
+
scope: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1096
|
+
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1097
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1098
|
+
newModuleId: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1099
|
+
operationId: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1100
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1101
|
+
__typename?: z.ZodType<"ReorderChangeLogItemsInput" | undefined, "ReorderChangeLogItemsInput" | undefined, z.core.$ZodTypeInternals<"ReorderChangeLogItemsInput" | undefined, "ReorderChangeLogItemsInput" | undefined>> | undefined;
|
|
1102
|
+
order: z.ZodType<string[], string[], z.core.$ZodTypeInternals<string[], string[]>>;
|
|
1103
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1104
|
+
moduleId: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1105
|
+
order: z.ZodType<string[], string[], z.core.$ZodTypeInternals<string[], string[]>>;
|
|
1106
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1107
|
+
order: z.ZodType<string[], string[], z.core.$ZodTypeInternals<string[], string[]>>;
|
|
1108
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1109
|
+
operationId: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1110
|
+
order: z.ZodType<string[], string[], z.core.$ZodTypeInternals<string[], string[]>>;
|
|
1111
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1112
|
+
operationId: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1113
|
+
order: z.ZodType<string[], string[], z.core.$ZodTypeInternals<string[], string[]>>;
|
|
1114
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1115
|
+
scope: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1116
|
+
order: z.ZodType<string[], string[], z.core.$ZodTypeInternals<string[], string[]>>;
|
|
1117
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1118
|
+
authorName: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1119
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1120
|
+
authorWebsite: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1121
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1122
|
+
scope: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1123
|
+
initialValue: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1124
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1125
|
+
description: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1126
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1127
|
+
extension: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1128
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1129
|
+
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1130
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1131
|
+
name: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1132
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1133
|
+
description?: z.ZodType<InputMaybe<string>, InputMaybe<string>, z.core.$ZodTypeInternals<InputMaybe<string>, InputMaybe<string>>> | undefined;
|
|
1134
|
+
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1135
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1136
|
+
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1137
|
+
name?: z.ZodType<InputMaybe<string>, InputMaybe<string>, z.core.$ZodTypeInternals<InputMaybe<string>, InputMaybe<string>>> | undefined;
|
|
1138
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1139
|
+
description?: z.ZodType<InputMaybe<string>, InputMaybe<string>, z.core.$ZodTypeInternals<InputMaybe<string>, InputMaybe<string>>> | undefined;
|
|
1140
|
+
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1141
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1142
|
+
errorCode?: z.ZodType<InputMaybe<string>, InputMaybe<string>, z.core.$ZodTypeInternals<InputMaybe<string>, InputMaybe<string>>> | undefined;
|
|
1143
|
+
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1144
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1145
|
+
errorDescription?: z.ZodType<InputMaybe<string>, InputMaybe<string>, z.core.$ZodTypeInternals<InputMaybe<string>, InputMaybe<string>>> | undefined;
|
|
1146
|
+
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1147
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1148
|
+
errorName?: z.ZodType<InputMaybe<string>, InputMaybe<string>, z.core.$ZodTypeInternals<InputMaybe<string>, InputMaybe<string>>> | undefined;
|
|
1149
|
+
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1150
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1151
|
+
errorTemplate?: z.ZodType<InputMaybe<string>, InputMaybe<string>, z.core.$ZodTypeInternals<InputMaybe<string>, InputMaybe<string>>> | undefined;
|
|
1152
|
+
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1153
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1154
|
+
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1155
|
+
name?: z.ZodType<InputMaybe<string>, InputMaybe<string>, z.core.$ZodTypeInternals<InputMaybe<string>, InputMaybe<string>>> | undefined;
|
|
1156
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1157
|
+
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1158
|
+
reducer?: z.ZodType<InputMaybe<string>, InputMaybe<string>, z.core.$ZodTypeInternals<InputMaybe<string>, InputMaybe<string>>> | undefined;
|
|
1159
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1160
|
+
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1161
|
+
schema?: z.ZodType<InputMaybe<string>, InputMaybe<string>, z.core.$ZodTypeInternals<InputMaybe<string>, InputMaybe<string>>> | undefined;
|
|
1162
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1163
|
+
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1164
|
+
template?: z.ZodType<InputMaybe<string>, InputMaybe<string>, z.core.$ZodTypeInternals<InputMaybe<string>, InputMaybe<string>>> | undefined;
|
|
1165
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1166
|
+
scope: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1167
|
+
schema: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1168
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1169
|
+
__typename?: z.ZodType<"UpdateChangeLogItemInput" | undefined, "UpdateChangeLogItemInput" | undefined, z.core.$ZodTypeInternals<"UpdateChangeLogItemInput" | undefined, "UpdateChangeLogItemInput" | undefined>> | undefined;
|
|
1170
|
+
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1171
|
+
newContent: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1172
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1173
|
+
example: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1174
|
+
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1175
|
+
}>, z.core.$strip>, z.ZodObject<Required<{
|
|
1176
|
+
scope: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1177
|
+
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1178
|
+
newExample: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
1179
|
+
}>, z.core.$strip>]>;
|
|
1180
|
+
declare function DocumentModelGlobalStateSchema(): z.ZodObject<Properties<DocumentModelGlobalState>>;
|
|
1181
|
+
declare function DocumentSpecificationSchema(): z.ZodObject<Properties<DocumentSpecification>>;
|
|
1182
|
+
declare function ModuleSchema(): z.ZodObject<Properties<ModuleSpecification>>;
|
|
1183
|
+
declare function MoveOperationInputSchema(): z.ZodObject<Properties<MoveOperationInput>>;
|
|
1184
|
+
declare function OperationSpecificationSchema(): z.ZodObject<Properties<OperationSpecification>>;
|
|
1185
|
+
declare function OperationErrorSchema(): z.ZodObject<Properties<OperationErrorSpecification>>;
|
|
1186
|
+
declare function ReorderChangeLogItemsInputSchema(): z.ZodObject<Properties<ReorderChangeLogItemsInput>>;
|
|
1187
|
+
declare function ReorderModuleOperationsInputSchema(): z.ZodObject<Properties<ReorderModuleOperationsInput>>;
|
|
1188
|
+
declare function ReorderModulesInputSchema(): z.ZodObject<Properties<ReorderModulesInput>>;
|
|
1189
|
+
declare function ReorderOperationErrorsInputSchema(): z.ZodObject<Properties<ReorderOperationErrorsInput>>;
|
|
1190
|
+
declare function ReorderOperationExamplesInputSchema(): z.ZodObject<Properties<ReorderOperationExamplesInput>>;
|
|
1191
|
+
declare function ReorderStateExamplesInputSchema(): z.ZodObject<Properties<ReorderStateExamplesInput>>;
|
|
1192
|
+
declare function SetAuthorNameInputSchema(): z.ZodObject<Properties<SetAuthorNameInput>>;
|
|
1193
|
+
declare function SetAuthorWebsiteInputSchema(): z.ZodObject<Properties<SetAuthorWebsiteInput>>;
|
|
1194
|
+
declare function SetInitialStateInputSchema(): z.ZodObject<Properties<SetInitialStateInput>>;
|
|
1195
|
+
declare function SetModelDescriptionInputSchema(): z.ZodObject<Properties<SetModelDescriptionInput>>;
|
|
1196
|
+
declare function SetModelExtensionInputSchema(): z.ZodObject<Properties<SetModelExtensionInput>>;
|
|
1197
|
+
declare function SetModelIdInputSchema(): z.ZodObject<Properties<SetModelIdInput>>;
|
|
1198
|
+
declare function SetModelNameInputSchema(): z.ZodObject<Properties<SetModelNameInput>>;
|
|
1199
|
+
declare function SetModuleDescriptionInputSchema(): z.ZodObject<Properties<SetModuleDescriptionInput>>;
|
|
1200
|
+
declare function SetModuleNameInputSchema(): z.ZodObject<Properties<SetModuleNameInput>>;
|
|
1201
|
+
declare function SetOperationDescriptionInputSchema(): z.ZodObject<Properties<SetOperationDescriptionInput>>;
|
|
1202
|
+
declare function SetOperationErrorCodeInputSchema(): z.ZodObject<Properties<SetOperationErrorCodeInput>>;
|
|
1203
|
+
declare function SetOperationErrorDescriptionInputSchema(): z.ZodObject<Properties<SetOperationErrorDescriptionInput>>;
|
|
1204
|
+
declare function SetOperationErrorNameInputSchema(): z.ZodObject<Properties<SetOperationErrorNameInput>>;
|
|
1205
|
+
declare function SetOperationErrorTemplateInputSchema(): z.ZodObject<Properties<SetOperationErrorTemplateInput>>;
|
|
1206
|
+
declare function SetOperationNameInputSchema(): z.ZodObject<Properties<SetOperationNameInput>>;
|
|
1207
|
+
declare function SetOperationScopeInputSchema(): z.ZodObject<Properties<SetOperationScopeInput>>;
|
|
1208
|
+
declare function SetOperationReducerInputSchema(): z.ZodObject<Properties<SetOperationReducerInput>>;
|
|
1209
|
+
declare function SetOperationSchemaInputSchema(): z.ZodObject<Properties<SetOperationSchemaInput>>;
|
|
1210
|
+
declare function SetOperationTemplateInputSchema(): z.ZodObject<Properties<SetOperationTemplateInput>>;
|
|
1211
|
+
declare function SetStateSchemaInputSchema(): z.ZodObject<Properties<SetStateSchemaInput>>;
|
|
1212
|
+
declare function StateSchema(): z.ZodObject<Properties<State>>;
|
|
1213
|
+
declare function ScopeStateSchema(): z.ZodObject<Properties<ScopeState>>;
|
|
1214
|
+
declare function UpdateChangeLogItemInputSchema(): z.ZodObject<Properties<UpdateChangeLogItemInput>>;
|
|
1215
|
+
declare function UpdateOperationExampleInputSchema(): z.ZodObject<Properties<UpdateOperationExampleInput>>;
|
|
1216
|
+
declare function UpdateStateExampleInputSchema(): z.ZodObject<Properties<UpdateStateExampleInput>>;
|
|
1217
|
+
declare const PowerhouseModuleSchema: z.ZodObject<{
|
|
1218
|
+
id: z.ZodString;
|
|
1219
|
+
name: z.ZodString;
|
|
1220
|
+
documentTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1221
|
+
}, z.core.$strip>;
|
|
1222
|
+
declare const PowerhouseModulesSchema: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1223
|
+
id: z.ZodString;
|
|
1224
|
+
name: z.ZodString;
|
|
1225
|
+
documentTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1226
|
+
}, z.core.$strip>>>;
|
|
1227
|
+
declare const PublisherSchema: z.ZodObject<{
|
|
1228
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1229
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1230
|
+
}, z.core.$strip>;
|
|
1231
|
+
declare const ConfigEntryTypeSchema: z.ZodUnion<readonly [z.ZodLiteral<"var">, z.ZodLiteral<"secret">]>;
|
|
1232
|
+
declare const ConfigEntrySchema: z.ZodObject<{
|
|
1233
|
+
name: z.ZodString;
|
|
1234
|
+
type: z.ZodUnion<readonly [z.ZodLiteral<"var">, z.ZodLiteral<"secret">]>;
|
|
1235
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1236
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
1237
|
+
default: z.ZodOptional<z.ZodBoolean>;
|
|
1238
|
+
}, z.core.$strip>;
|
|
1239
|
+
declare const ManifestSchema: z.ZodObject<{
|
|
1240
|
+
name: z.ZodString;
|
|
1241
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1242
|
+
category: z.ZodOptional<z.ZodString>;
|
|
1243
|
+
publisher: z.ZodOptional<z.ZodObject<{
|
|
1244
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1245
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1246
|
+
}, z.core.$strip>>;
|
|
1247
|
+
documentModels: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1248
|
+
id: z.ZodString;
|
|
1249
|
+
name: z.ZodString;
|
|
1250
|
+
documentTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1251
|
+
}, z.core.$strip>>>;
|
|
1252
|
+
apps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1253
|
+
id: z.ZodString;
|
|
1254
|
+
name: z.ZodString;
|
|
1255
|
+
documentTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1256
|
+
}, z.core.$strip>>>;
|
|
1257
|
+
editors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1258
|
+
id: z.ZodString;
|
|
1259
|
+
name: z.ZodString;
|
|
1260
|
+
documentTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1261
|
+
}, z.core.$strip>>>;
|
|
1262
|
+
processors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1263
|
+
id: z.ZodString;
|
|
1264
|
+
name: z.ZodString;
|
|
1265
|
+
documentTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1266
|
+
}, z.core.$strip>>>;
|
|
1267
|
+
subgraphs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1268
|
+
id: z.ZodString;
|
|
1269
|
+
name: z.ZodString;
|
|
1270
|
+
documentTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1271
|
+
}, z.core.$strip>>>;
|
|
1272
|
+
config: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1273
|
+
name: z.ZodString;
|
|
1274
|
+
type: z.ZodUnion<readonly [z.ZodLiteral<"var">, z.ZodLiteral<"secret">]>;
|
|
1275
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1276
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
1277
|
+
default: z.ZodOptional<z.ZodBoolean>;
|
|
1278
|
+
}, z.core.$strip>>>;
|
|
1279
|
+
}, z.core.$strip>;
|
|
1280
|
+
//#endregion
|
|
1281
|
+
//#region document-model/upgrades.d.ts
|
|
1282
|
+
/** Upgrade reducer transforms a document from one version to another */
|
|
1283
|
+
type UpgradeReducer<TFrom extends PHBaseState, TTo extends PHBaseState> = (document: PHDocument<TFrom>, action: Action) => PHDocument<TTo>;
|
|
1284
|
+
type ModelVersion = number;
|
|
1285
|
+
/** Metadata about a version transition */
|
|
1286
|
+
type UpgradeTransition = {
|
|
1287
|
+
toVersion: ModelVersion;
|
|
1288
|
+
upgradeReducer: UpgradeReducer<any, any>;
|
|
1289
|
+
description?: string;
|
|
1290
|
+
};
|
|
1291
|
+
type TupleMember<T extends readonly unknown[]> = T[number];
|
|
1292
|
+
/** Manifest declaring all supported versions and upgrade paths */
|
|
1293
|
+
type UpgradeManifest<TVersions extends readonly number[]> = {
|
|
1294
|
+
documentType: string;
|
|
1295
|
+
latestVersion: TupleMember<TVersions>;
|
|
1296
|
+
supportedVersions: TVersions;
|
|
1297
|
+
upgrades: { [V in Exclude<TupleMember<TVersions>, 1> as `v${V}`]: UpgradeTransition };
|
|
1298
|
+
};
|
|
1299
|
+
/**
|
|
1300
|
+
* Applies an UPGRADE_DOCUMENT action to a document.
|
|
1301
|
+
* Handles all upgrade scenarios including initial upgrades, no-ops, and multi-step upgrades.
|
|
1302
|
+
*
|
|
1303
|
+
* Behavior based on fromVersion/toVersion:
|
|
1304
|
+
* - fromVersion === toVersion (and fromVersion > 0): No-op - return unchanged document
|
|
1305
|
+
* - fromVersion > toVersion: Throw DowngradeNotSupportedError
|
|
1306
|
+
* - All other cases: Apply upgradePath transitions (if provided), then apply initialState, set version
|
|
1307
|
+
*/
|
|
1308
|
+
declare function applyUpgradeDocumentAction(document: PHDocument, action: UpgradeDocumentAction, upgradePath?: UpgradeTransition[]): PHDocument;
|
|
1309
|
+
/**
|
|
1310
|
+
* Applies a DELETE_DOCUMENT action to a document.
|
|
1311
|
+
* Marks the document as deleted in the document scope state.
|
|
1312
|
+
*/
|
|
1313
|
+
declare function applyDeleteDocumentAction(document: PHDocument, action: DeleteDocumentAction): PHDocument;
|
|
1314
|
+
/**
|
|
1315
|
+
* Computes the ordered list of upgrade transitions needed to move from
|
|
1316
|
+
* fromVersion to toVersion using the provided manifest.
|
|
1317
|
+
* Walks keys v(fromVersion+1)..v(toVersion) and throws a descriptive Error
|
|
1318
|
+
* if the manifest is absent or any step is missing.
|
|
1319
|
+
*/
|
|
1320
|
+
declare function computeUpgradeTransitions(manifest: UpgradeManifest<readonly number[]> | undefined, fromVersion: number, toVersion: number): UpgradeTransition[];
|
|
1321
|
+
//#endregion
|
|
1322
|
+
//#region document-model/types.d.ts
|
|
1323
|
+
type State = {
|
|
1324
|
+
examples: CodeExample[];
|
|
1325
|
+
initialValue: string;
|
|
1326
|
+
schema: string;
|
|
1327
|
+
};
|
|
1328
|
+
type ScopeState = {
|
|
1329
|
+
global: State;
|
|
1330
|
+
local: State;
|
|
1331
|
+
};
|
|
1332
|
+
type Author = {
|
|
1333
|
+
name: string;
|
|
1334
|
+
website: string | null;
|
|
1335
|
+
};
|
|
1336
|
+
type OperationErrorSpecification = {
|
|
1337
|
+
code: string | null;
|
|
1338
|
+
description: string | null;
|
|
1339
|
+
id: ID;
|
|
1340
|
+
name: string | null;
|
|
1341
|
+
template: string | null;
|
|
1342
|
+
};
|
|
1343
|
+
type CodeExample = {
|
|
1344
|
+
id: ID;
|
|
1345
|
+
value: string;
|
|
1346
|
+
};
|
|
1347
|
+
type OperationSpecification = {
|
|
1348
|
+
description: string | null;
|
|
1349
|
+
errors: OperationErrorSpecification[];
|
|
1350
|
+
examples: CodeExample[];
|
|
1351
|
+
id: ID;
|
|
1352
|
+
name: string | null;
|
|
1353
|
+
reducer: string | null;
|
|
1354
|
+
schema: string | null;
|
|
1355
|
+
template: string | null;
|
|
1356
|
+
scope: string;
|
|
1357
|
+
};
|
|
1358
|
+
type ModuleSpecification = {
|
|
1359
|
+
description: string | null;
|
|
1360
|
+
id: ID;
|
|
1361
|
+
name: string;
|
|
1362
|
+
operations: OperationSpecification[];
|
|
1363
|
+
};
|
|
1364
|
+
type DocumentSpecification = {
|
|
1365
|
+
changeLog: string[];
|
|
1366
|
+
modules: ModuleSpecification[];
|
|
1367
|
+
state: ScopeState;
|
|
1368
|
+
version: number;
|
|
1369
|
+
};
|
|
1370
|
+
type DocumentModelGlobalState = {
|
|
1371
|
+
author: Author;
|
|
1372
|
+
description: string;
|
|
1373
|
+
extension: string;
|
|
1374
|
+
id: string;
|
|
1375
|
+
name: string;
|
|
1376
|
+
specifications: DocumentSpecification[];
|
|
1377
|
+
};
|
|
1378
|
+
type DocumentModelLocalState = {};
|
|
1379
|
+
type DocumentModelPHState = PHBaseState & {
|
|
1380
|
+
global: DocumentModelGlobalState;
|
|
1381
|
+
local: DocumentModelLocalState;
|
|
1382
|
+
};
|
|
1383
|
+
type DocumentModelDocument = PHDocument<DocumentModelPHState>;
|
|
1384
|
+
type DocumentModelAction = DocumentModelHeaderAction | DocumentModelVersioningAction | DocumentModelModuleAction | DocumentModelOperationErrorAction | DocumentModelOperationExampleAction | DocumentModelOperationAction | DocumentModelStateAction;
|
|
1385
|
+
type AddChangeLogItemInput = {
|
|
1386
|
+
__typename?: "AddChangeLogItemInput";
|
|
1387
|
+
content: Scalars["String"]["output"];
|
|
1388
|
+
id: Scalars["ID"]["output"];
|
|
1389
|
+
insertBefore: Maybe<Scalars["ID"]["output"]>;
|
|
1390
|
+
};
|
|
1391
|
+
type AddModuleInput = {
|
|
1392
|
+
description?: InputMaybe<Scalars["String"]["input"]>;
|
|
1393
|
+
id: Scalars["ID"]["input"];
|
|
1394
|
+
name: Scalars["String"]["input"];
|
|
1395
|
+
};
|
|
1396
|
+
type AddOperationErrorInput = {
|
|
1397
|
+
errorCode?: InputMaybe<Scalars["String"]["input"]>;
|
|
1398
|
+
errorDescription?: InputMaybe<Scalars["String"]["input"]>;
|
|
1399
|
+
errorName?: InputMaybe<Scalars["String"]["input"]>;
|
|
1400
|
+
errorTemplate?: InputMaybe<Scalars["String"]["input"]>;
|
|
1401
|
+
id: Scalars["ID"]["input"];
|
|
1402
|
+
operationId: Scalars["ID"]["input"];
|
|
1403
|
+
};
|
|
1404
|
+
type AddOperationExampleInput = {
|
|
1405
|
+
example: Scalars["String"]["input"];
|
|
1406
|
+
id: Scalars["ID"]["input"];
|
|
1407
|
+
operationId: Scalars["ID"]["input"];
|
|
1408
|
+
};
|
|
1409
|
+
type AddOperationInput = {
|
|
1410
|
+
description?: InputMaybe<Scalars["String"]["input"]>;
|
|
1411
|
+
id: Scalars["ID"]["input"];
|
|
1412
|
+
moduleId: Scalars["ID"]["input"];
|
|
1413
|
+
name: Scalars["String"]["input"];
|
|
1414
|
+
reducer?: InputMaybe<Scalars["String"]["input"]>;
|
|
1415
|
+
schema?: InputMaybe<Scalars["String"]["input"]>;
|
|
1416
|
+
template?: InputMaybe<Scalars["String"]["input"]>;
|
|
1417
|
+
scope?: InputMaybe<string>;
|
|
1418
|
+
};
|
|
1419
|
+
type AddStateExampleInput = {
|
|
1420
|
+
scope: Scalars["String"]["input"];
|
|
1421
|
+
example: Scalars["String"]["input"];
|
|
1422
|
+
id: Scalars["ID"]["input"];
|
|
1423
|
+
insertBefore?: InputMaybe<Scalars["ID"]["input"]>;
|
|
1424
|
+
};
|
|
1425
|
+
type DeleteChangeLogItemInput = {
|
|
1426
|
+
__typename?: "DeleteChangeLogItemInput";
|
|
1427
|
+
id: Scalars["ID"]["output"];
|
|
1428
|
+
};
|
|
1429
|
+
type DeleteModuleInput = {
|
|
1430
|
+
id: Scalars["ID"]["input"];
|
|
1431
|
+
};
|
|
1432
|
+
type DeleteOperationErrorInput = {
|
|
1433
|
+
id: Scalars["ID"]["input"];
|
|
1434
|
+
};
|
|
1435
|
+
type DeleteOperationExampleInput = {
|
|
1436
|
+
id: Scalars["ID"]["input"];
|
|
1437
|
+
};
|
|
1438
|
+
type DeleteOperationInput = {
|
|
1439
|
+
id: Scalars["ID"]["input"];
|
|
1440
|
+
};
|
|
1441
|
+
type DeleteStateExampleInput = {
|
|
1442
|
+
scope: Scalars["String"]["input"];
|
|
1443
|
+
id: Scalars["ID"]["input"];
|
|
1444
|
+
};
|
|
1445
|
+
type DocumentModelInput = AddChangeLogItemInput | AddModuleInput | AddOperationErrorInput | AddOperationExampleInput | AddOperationInput | AddStateExampleInput | DeleteChangeLogItemInput | DeleteModuleInput | DeleteOperationErrorInput | DeleteOperationExampleInput | DeleteOperationInput | DeleteStateExampleInput | MoveOperationInput | ReorderChangeLogItemsInput | ReorderModuleOperationsInput | ReorderModulesInput | ReorderOperationErrorsInput | ReorderOperationExamplesInput | ReorderStateExamplesInput | SetAuthorNameInput | SetAuthorWebsiteInput | SetInitialStateInput | SetModelDescriptionInput | SetModelExtensionInput | SetModelIdInput | SetModelNameInput | SetModuleDescriptionInput | SetModuleNameInput | SetOperationDescriptionInput | SetOperationErrorCodeInput | SetOperationErrorDescriptionInput | SetOperationErrorNameInput | SetOperationErrorTemplateInput | SetOperationNameInput | SetOperationReducerInput | SetOperationSchemaInput | SetOperationTemplateInput | SetStateSchemaInput | UpdateChangeLogItemInput | UpdateOperationExampleInput | UpdateStateExampleInput;
|
|
1446
|
+
type MoveOperationInput = {
|
|
1447
|
+
newModuleId: Scalars["ID"]["input"];
|
|
1448
|
+
operationId: Scalars["ID"]["input"];
|
|
1449
|
+
};
|
|
1450
|
+
type Mutation = {
|
|
1451
|
+
__typename?: "Mutation";
|
|
1452
|
+
addChangeLogItemInput: DocumentModelGlobalState;
|
|
1453
|
+
addModule: DocumentModelGlobalState;
|
|
1454
|
+
addOperation: DocumentModelGlobalState;
|
|
1455
|
+
addOperationError: DocumentModelGlobalState;
|
|
1456
|
+
addOperationExample: DocumentModelGlobalState;
|
|
1457
|
+
addStateExample: DocumentModelGlobalState;
|
|
1458
|
+
deleteChangeLogItemInput: DocumentModelGlobalState;
|
|
1459
|
+
deleteModule: DocumentModelGlobalState;
|
|
1460
|
+
deleteOperation: DocumentModelGlobalState;
|
|
1461
|
+
deleteOperationError: DocumentModelGlobalState;
|
|
1462
|
+
deleteOperationExample: DocumentModelGlobalState;
|
|
1463
|
+
deleteStateExample: DocumentModelGlobalState;
|
|
1464
|
+
moveOperation: DocumentModelGlobalState;
|
|
1465
|
+
releaseNewVersion: DocumentModelGlobalState;
|
|
1466
|
+
reorderChangeLogItemsInput: DocumentModelGlobalState;
|
|
1467
|
+
reorderModuleOperations: DocumentModelGlobalState;
|
|
1468
|
+
reorderModules: DocumentModelGlobalState;
|
|
1469
|
+
reorderOperationErrors: DocumentModelGlobalState;
|
|
1470
|
+
reorderOperationExamples: DocumentModelGlobalState;
|
|
1471
|
+
reorderStateExamples: DocumentModelGlobalState;
|
|
1472
|
+
setAuthorName: DocumentModelGlobalState;
|
|
1473
|
+
setAuthorWebsite: DocumentModelGlobalState;
|
|
1474
|
+
setInitialState: DocumentModelGlobalState;
|
|
1475
|
+
setModelDescription: DocumentModelGlobalState;
|
|
1476
|
+
setModelExtension: DocumentModelGlobalState;
|
|
1477
|
+
setModelId: DocumentModelGlobalState;
|
|
1478
|
+
setModelName: DocumentModelGlobalState;
|
|
1479
|
+
setModuleDescription: DocumentModelGlobalState;
|
|
1480
|
+
setModuleName: DocumentModelGlobalState;
|
|
1481
|
+
setOperationDescription: DocumentModelGlobalState;
|
|
1482
|
+
setOperationErrorCode: DocumentModelGlobalState;
|
|
1483
|
+
setOperationErrorDescription: DocumentModelGlobalState;
|
|
1484
|
+
setOperationErrorName: DocumentModelGlobalState;
|
|
1485
|
+
setOperationErrorTemplate: DocumentModelGlobalState;
|
|
1486
|
+
setOperationName: DocumentModelGlobalState;
|
|
1487
|
+
setOperationReducer: DocumentModelGlobalState;
|
|
1488
|
+
setOperationSchema: DocumentModelGlobalState;
|
|
1489
|
+
setOperationTemplate: DocumentModelGlobalState;
|
|
1490
|
+
setStateSchema: DocumentModelGlobalState;
|
|
1491
|
+
updateChangeLogItemInput: DocumentModelGlobalState;
|
|
1492
|
+
updateOperationExample: DocumentModelGlobalState;
|
|
1493
|
+
updateStateExample: DocumentModelGlobalState;
|
|
1494
|
+
};
|
|
1495
|
+
type MutationAddChangeLogItemInputArgs = {
|
|
1496
|
+
input?: InputMaybe<AddChangeLogItemInput>;
|
|
1497
|
+
};
|
|
1498
|
+
type MutationAddModuleArgs = {
|
|
1499
|
+
input: AddModuleInput;
|
|
1500
|
+
};
|
|
1501
|
+
type MutationAddOperationArgs = {
|
|
1502
|
+
input: AddOperationInput;
|
|
1503
|
+
};
|
|
1504
|
+
type MutationAddOperationErrorArgs = {
|
|
1505
|
+
input: AddOperationErrorInput;
|
|
1506
|
+
};
|
|
1507
|
+
type MutationAddOperationExampleArgs = {
|
|
1508
|
+
input: AddOperationExampleInput;
|
|
1509
|
+
};
|
|
1510
|
+
type MutationAddStateExampleArgs = {
|
|
1511
|
+
input: AddStateExampleInput;
|
|
1512
|
+
};
|
|
1513
|
+
type MutationDeleteChangeLogItemInputArgs = {
|
|
1514
|
+
input?: InputMaybe<DeleteChangeLogItemInput>;
|
|
1515
|
+
};
|
|
1516
|
+
type MutationDeleteModuleArgs = {
|
|
1517
|
+
input: DeleteModuleInput;
|
|
1518
|
+
};
|
|
1519
|
+
type MutationDeleteOperationArgs = {
|
|
1520
|
+
input: DeleteOperationInput;
|
|
1521
|
+
};
|
|
1522
|
+
type MutationDeleteOperationErrorArgs = {
|
|
1523
|
+
input: DeleteOperationErrorInput;
|
|
1524
|
+
};
|
|
1525
|
+
type MutationDeleteOperationExampleArgs = {
|
|
1526
|
+
input: DeleteOperationExampleInput;
|
|
1527
|
+
};
|
|
1528
|
+
type MutationDeleteStateExampleArgs = {
|
|
1529
|
+
input: DeleteStateExampleInput;
|
|
1530
|
+
};
|
|
1531
|
+
type MutationMoveOperationArgs = {
|
|
1532
|
+
input: MoveOperationInput;
|
|
1533
|
+
};
|
|
1534
|
+
type MutationReorderChangeLogItemsInputArgs = {
|
|
1535
|
+
input?: InputMaybe<ReorderChangeLogItemsInput>;
|
|
1536
|
+
};
|
|
1537
|
+
type MutationReorderModuleOperationsArgs = {
|
|
1538
|
+
input: ReorderModuleOperationsInput;
|
|
1539
|
+
};
|
|
1540
|
+
type MutationReorderModulesArgs = {
|
|
1541
|
+
input: ReorderModulesInput;
|
|
1542
|
+
};
|
|
1543
|
+
type MutationReorderOperationErrorsArgs = {
|
|
1544
|
+
input: ReorderOperationErrorsInput;
|
|
1545
|
+
};
|
|
1546
|
+
type MutationReorderOperationExamplesArgs = {
|
|
1547
|
+
input: ReorderOperationExamplesInput;
|
|
1548
|
+
};
|
|
1549
|
+
type MutationReorderStateExamplesArgs = {
|
|
1550
|
+
input: ReorderStateExamplesInput;
|
|
1551
|
+
};
|
|
1552
|
+
type MutationSetAuthorNameArgs = {
|
|
1553
|
+
input: SetAuthorNameInput;
|
|
1554
|
+
};
|
|
1555
|
+
type MutationSetAuthorWebsiteArgs = {
|
|
1556
|
+
input: SetAuthorWebsiteInput;
|
|
1557
|
+
};
|
|
1558
|
+
type MutationSetInitialStateArgs = {
|
|
1559
|
+
input: SetInitialStateInput;
|
|
1560
|
+
};
|
|
1561
|
+
type MutationSetModelDescriptionArgs = {
|
|
1562
|
+
input: SetModelDescriptionInput;
|
|
1563
|
+
};
|
|
1564
|
+
type MutationSetModelExtensionArgs = {
|
|
1565
|
+
input: SetModelExtensionInput;
|
|
1566
|
+
};
|
|
1567
|
+
type MutationSetModelIdArgs = {
|
|
1568
|
+
input: SetModelIdInput;
|
|
1569
|
+
};
|
|
1570
|
+
type MutationSetModelNameArgs = {
|
|
1571
|
+
input: SetModelNameInput;
|
|
1572
|
+
};
|
|
1573
|
+
type MutationSetModuleDescriptionArgs = {
|
|
1574
|
+
input: SetModuleDescriptionInput;
|
|
1575
|
+
};
|
|
1576
|
+
type MutationSetModuleNameArgs = {
|
|
1577
|
+
input: SetModuleNameInput;
|
|
1578
|
+
};
|
|
1579
|
+
type MutationSetOperationDescriptionArgs = {
|
|
1580
|
+
input: SetOperationDescriptionInput;
|
|
1581
|
+
};
|
|
1582
|
+
type MutationSetOperationErrorCodeArgs = {
|
|
1583
|
+
input: SetOperationErrorCodeInput;
|
|
1584
|
+
};
|
|
1585
|
+
type MutationSetOperationErrorDescriptionArgs = {
|
|
1586
|
+
input: SetOperationErrorDescriptionInput;
|
|
1587
|
+
};
|
|
1588
|
+
type MutationSetOperationErrorNameArgs = {
|
|
1589
|
+
input: SetOperationErrorNameInput;
|
|
1590
|
+
};
|
|
1591
|
+
type MutationSetOperationErrorTemplateArgs = {
|
|
1592
|
+
input: SetOperationErrorTemplateInput;
|
|
1593
|
+
};
|
|
1594
|
+
type MutationSetOperationNameArgs = {
|
|
1595
|
+
input: SetOperationNameInput;
|
|
1596
|
+
};
|
|
1597
|
+
type MutationSetOperationReducerArgs = {
|
|
1598
|
+
input: SetOperationReducerInput;
|
|
1599
|
+
};
|
|
1600
|
+
type MutationSetOperationSchemaArgs = {
|
|
1601
|
+
input: SetOperationSchemaInput;
|
|
1602
|
+
};
|
|
1603
|
+
type MutationSetOperationTemplateArgs = {
|
|
1604
|
+
input: SetOperationTemplateInput;
|
|
1605
|
+
};
|
|
1606
|
+
type MutationSetStateSchemaArgs = {
|
|
1607
|
+
input: SetStateSchemaInput;
|
|
1608
|
+
};
|
|
1609
|
+
type MutationUpdateChangeLogItemInputArgs = {
|
|
1610
|
+
input?: InputMaybe<UpdateChangeLogItemInput>;
|
|
1611
|
+
};
|
|
1612
|
+
type MutationUpdateOperationExampleArgs = {
|
|
1613
|
+
input: UpdateOperationExampleInput;
|
|
1614
|
+
};
|
|
1615
|
+
type MutationUpdateStateExampleArgs = {
|
|
1616
|
+
input: UpdateStateExampleInput;
|
|
1617
|
+
};
|
|
1618
|
+
type ReorderChangeLogItemsInput = {
|
|
1619
|
+
__typename?: "ReorderChangeLogItemsInput";
|
|
1620
|
+
order: Array<Scalars["ID"]["output"]>;
|
|
1621
|
+
};
|
|
1622
|
+
type ReorderModuleOperationsInput = {
|
|
1623
|
+
moduleId: Scalars["ID"]["input"];
|
|
1624
|
+
order: Array<Scalars["ID"]["input"]>;
|
|
1625
|
+
};
|
|
1626
|
+
type ReorderModulesInput = {
|
|
1627
|
+
order: Array<Scalars["ID"]["input"]>;
|
|
1628
|
+
};
|
|
1629
|
+
type ReorderOperationErrorsInput = {
|
|
1630
|
+
operationId: Scalars["ID"]["input"];
|
|
1631
|
+
order: Array<Scalars["ID"]["input"]>;
|
|
1632
|
+
};
|
|
1633
|
+
type ReorderOperationExamplesInput = {
|
|
1634
|
+
operationId: Scalars["ID"]["input"];
|
|
1635
|
+
order: Array<Scalars["ID"]["input"]>;
|
|
1636
|
+
};
|
|
1637
|
+
type ReorderStateExamplesInput = {
|
|
1638
|
+
scope: Scalars["String"]["input"];
|
|
1639
|
+
order: Array<Scalars["ID"]["input"]>;
|
|
1640
|
+
};
|
|
1641
|
+
type SetAuthorNameInput = {
|
|
1642
|
+
authorName: Scalars["String"]["input"];
|
|
1643
|
+
};
|
|
1644
|
+
type SetAuthorWebsiteInput = {
|
|
1645
|
+
authorWebsite: Scalars["String"]["input"];
|
|
1646
|
+
};
|
|
1647
|
+
type SetInitialStateInput = {
|
|
1648
|
+
scope: Scalars["String"]["input"];
|
|
1649
|
+
initialValue: Scalars["String"]["input"];
|
|
1650
|
+
};
|
|
1651
|
+
type SetModelDescriptionInput = {
|
|
1652
|
+
description: Scalars["String"]["input"];
|
|
1653
|
+
};
|
|
1654
|
+
type SetModelExtensionInput = {
|
|
1655
|
+
extension: Scalars["String"]["input"];
|
|
1656
|
+
};
|
|
1657
|
+
type SetModelIdInput = {
|
|
1658
|
+
id: Scalars["String"]["input"];
|
|
1659
|
+
};
|
|
1660
|
+
type SetModelNameInput = {
|
|
1661
|
+
name: Scalars["String"]["input"];
|
|
1662
|
+
};
|
|
1663
|
+
type SetModuleDescriptionInput = {
|
|
1664
|
+
description?: InputMaybe<Scalars["String"]["input"]>;
|
|
1665
|
+
id: Scalars["ID"]["input"];
|
|
1666
|
+
};
|
|
1667
|
+
type SetModuleNameInput = {
|
|
1668
|
+
id: Scalars["ID"]["input"];
|
|
1669
|
+
name?: InputMaybe<Scalars["String"]["input"]>;
|
|
1670
|
+
};
|
|
1671
|
+
type SetOperationDescriptionInput = {
|
|
1672
|
+
description?: InputMaybe<Scalars["String"]["input"]>;
|
|
1673
|
+
id: Scalars["ID"]["input"];
|
|
1674
|
+
};
|
|
1675
|
+
type SetOperationErrorCodeInput = {
|
|
1676
|
+
errorCode?: InputMaybe<Scalars["String"]["input"]>;
|
|
1677
|
+
id: Scalars["ID"]["input"];
|
|
1678
|
+
};
|
|
1679
|
+
type SetOperationErrorDescriptionInput = {
|
|
1680
|
+
errorDescription?: InputMaybe<Scalars["String"]["input"]>;
|
|
1681
|
+
id: Scalars["ID"]["input"];
|
|
1682
|
+
};
|
|
1683
|
+
type SetOperationErrorNameInput = {
|
|
1684
|
+
errorName?: InputMaybe<Scalars["String"]["input"]>;
|
|
1685
|
+
id: Scalars["ID"]["input"];
|
|
1686
|
+
};
|
|
1687
|
+
type SetOperationErrorTemplateInput = {
|
|
1688
|
+
errorTemplate?: InputMaybe<Scalars["String"]["input"]>;
|
|
1689
|
+
id: Scalars["ID"]["input"];
|
|
1690
|
+
};
|
|
1691
|
+
type SetOperationNameInput = {
|
|
1692
|
+
id: Scalars["ID"]["input"];
|
|
1693
|
+
name?: InputMaybe<Scalars["String"]["input"]>;
|
|
1694
|
+
};
|
|
1695
|
+
type SetOperationScopeInput = {
|
|
1696
|
+
id: Scalars["ID"]["input"];
|
|
1697
|
+
scope?: InputMaybe<string>;
|
|
1698
|
+
};
|
|
1699
|
+
type SetOperationReducerInput = {
|
|
1700
|
+
id: Scalars["ID"]["input"];
|
|
1701
|
+
reducer?: InputMaybe<Scalars["String"]["input"]>;
|
|
1702
|
+
};
|
|
1703
|
+
type SetOperationSchemaInput = {
|
|
1704
|
+
id: Scalars["ID"]["input"];
|
|
1705
|
+
schema?: InputMaybe<Scalars["String"]["input"]>;
|
|
1706
|
+
};
|
|
1707
|
+
type SetOperationTemplateInput = {
|
|
1708
|
+
id: Scalars["ID"]["input"];
|
|
1709
|
+
template?: InputMaybe<Scalars["String"]["input"]>;
|
|
1710
|
+
};
|
|
1711
|
+
type SetStateSchemaInput = {
|
|
1712
|
+
scope: Scalars["String"]["input"];
|
|
1713
|
+
schema: Scalars["String"]["input"];
|
|
1714
|
+
};
|
|
1715
|
+
type UpdateChangeLogItemInput = {
|
|
1716
|
+
__typename?: "UpdateChangeLogItemInput";
|
|
1717
|
+
id: Scalars["ID"]["output"];
|
|
1718
|
+
newContent: Scalars["String"]["output"];
|
|
1719
|
+
};
|
|
1720
|
+
type UpdateOperationExampleInput = {
|
|
1721
|
+
example: Scalars["String"]["input"];
|
|
1722
|
+
id: Scalars["ID"]["input"];
|
|
1723
|
+
};
|
|
1724
|
+
type UpdateStateExampleInput = {
|
|
1725
|
+
scope: Scalars["String"]["input"];
|
|
1726
|
+
id: Scalars["ID"]["input"];
|
|
1727
|
+
newExample: Scalars["String"]["input"];
|
|
1728
|
+
};
|
|
1729
|
+
type SetModelNameAction = Action & {
|
|
1730
|
+
type: "SET_MODEL_NAME";
|
|
1731
|
+
input: SetModelNameInput;
|
|
1732
|
+
};
|
|
1733
|
+
type SetModelIdAction = Action & {
|
|
1734
|
+
type: "SET_MODEL_ID";
|
|
1735
|
+
input: SetModelIdInput;
|
|
1736
|
+
};
|
|
1737
|
+
type SetModelExtensionAction = Action & {
|
|
1738
|
+
type: "SET_MODEL_EXTENSION";
|
|
1739
|
+
input: SetModelExtensionInput;
|
|
1740
|
+
};
|
|
1741
|
+
type SetModelDescriptionAction = Action & {
|
|
1742
|
+
type: "SET_MODEL_DESCRIPTION";
|
|
1743
|
+
input: SetModelDescriptionInput;
|
|
1744
|
+
};
|
|
1745
|
+
type SetAuthorNameAction = Action & {
|
|
1746
|
+
type: "SET_AUTHOR_NAME";
|
|
1747
|
+
input: SetAuthorNameInput;
|
|
1748
|
+
};
|
|
1749
|
+
type SetAuthorWebsiteAction = Action & {
|
|
1750
|
+
type: "SET_AUTHOR_WEBSITE";
|
|
1751
|
+
input: SetAuthorWebsiteInput;
|
|
1752
|
+
};
|
|
1753
|
+
type DocumentModelHeaderAction = SetModelNameAction | SetModelIdAction | SetModelExtensionAction | SetModelDescriptionAction | SetAuthorNameAction | SetAuthorWebsiteAction;
|
|
1754
|
+
type AddModuleAction = Action & {
|
|
1755
|
+
type: "ADD_MODULE";
|
|
1756
|
+
input: AddModuleInput;
|
|
1757
|
+
};
|
|
1758
|
+
type SetModuleNameAction = Action & {
|
|
1759
|
+
type: "SET_MODULE_NAME";
|
|
1760
|
+
input: SetModuleNameInput;
|
|
1761
|
+
};
|
|
1762
|
+
type SetModuleDescriptionAction = Action & {
|
|
1763
|
+
type: "SET_MODULE_DESCRIPTION";
|
|
1764
|
+
input: SetModuleDescriptionInput;
|
|
1765
|
+
};
|
|
1766
|
+
type DeleteModuleAction = Action & {
|
|
1767
|
+
type: "DELETE_MODULE";
|
|
1768
|
+
input: DeleteModuleInput;
|
|
1769
|
+
};
|
|
1770
|
+
type ReorderModulesAction = Action & {
|
|
1771
|
+
type: "REORDER_MODULES";
|
|
1772
|
+
input: ReorderModulesInput;
|
|
1773
|
+
};
|
|
1774
|
+
type DocumentModelModuleAction = AddModuleAction | SetModuleNameAction | SetModuleDescriptionAction | DeleteModuleAction | ReorderModulesAction;
|
|
1775
|
+
type AddOperationAction = Action & {
|
|
1776
|
+
type: "ADD_OPERATION";
|
|
1777
|
+
input: AddOperationInput;
|
|
1778
|
+
};
|
|
1779
|
+
type SetOperationNameAction = Action & {
|
|
1780
|
+
type: "SET_OPERATION_NAME";
|
|
1781
|
+
input: SetOperationNameInput;
|
|
1782
|
+
};
|
|
1783
|
+
type SetOperationScopeAction = Action & {
|
|
1784
|
+
type: "SET_OPERATION_SCOPE";
|
|
1785
|
+
input: SetOperationScopeInput;
|
|
1786
|
+
};
|
|
1787
|
+
type SetOperationSchemaAction = Action & {
|
|
1788
|
+
type: "SET_OPERATION_SCHEMA";
|
|
1789
|
+
input: SetOperationSchemaInput;
|
|
1790
|
+
};
|
|
1791
|
+
type SetOperationDescriptionAction = Action & {
|
|
1792
|
+
type: "SET_OPERATION_DESCRIPTION";
|
|
1793
|
+
input: SetOperationDescriptionInput;
|
|
1794
|
+
};
|
|
1795
|
+
type SetOperationTemplateAction = Action & {
|
|
1796
|
+
type: "SET_OPERATION_TEMPLATE";
|
|
1797
|
+
input: SetOperationTemplateInput;
|
|
1798
|
+
};
|
|
1799
|
+
type SetOperationReducerAction = Action & {
|
|
1800
|
+
type: "SET_OPERATION_REDUCER";
|
|
1801
|
+
input: SetOperationReducerInput;
|
|
1802
|
+
};
|
|
1803
|
+
type MoveOperationAction = Action & {
|
|
1804
|
+
type: "MOVE_OPERATION";
|
|
1805
|
+
input: MoveOperationInput;
|
|
1806
|
+
};
|
|
1807
|
+
type DeleteOperationAction = Action & {
|
|
1808
|
+
type: "DELETE_OPERATION";
|
|
1809
|
+
input: DeleteOperationInput;
|
|
1810
|
+
};
|
|
1811
|
+
type ReorderModuleOperationsAction = Action & {
|
|
1812
|
+
type: "REORDER_MODULE_OPERATIONS";
|
|
1813
|
+
input: ReorderModuleOperationsInput;
|
|
1814
|
+
};
|
|
1815
|
+
type DocumentModelOperationAction = AddOperationAction | SetOperationNameAction | SetOperationScopeAction | SetOperationSchemaAction | SetOperationDescriptionAction | SetOperationTemplateAction | SetOperationReducerAction | MoveOperationAction | DeleteOperationAction | ReorderModuleOperationsAction;
|
|
1816
|
+
type AddOperationErrorAction = Action & {
|
|
1817
|
+
type: "ADD_OPERATION_ERROR";
|
|
1818
|
+
input: AddOperationErrorInput;
|
|
1819
|
+
};
|
|
1820
|
+
type SetOperationErrorCodeAction = Action & {
|
|
1821
|
+
type: "SET_OPERATION_ERROR_CODE";
|
|
1822
|
+
input: SetOperationErrorCodeInput;
|
|
1823
|
+
};
|
|
1824
|
+
type SetOperationErrorNameAction = Action & {
|
|
1825
|
+
type: "SET_OPERATION_ERROR_NAME";
|
|
1826
|
+
input: SetOperationErrorNameInput;
|
|
1827
|
+
};
|
|
1828
|
+
type SetOperationErrorDescriptionAction = Action & {
|
|
1829
|
+
type: "SET_OPERATION_ERROR_DESCRIPTION";
|
|
1830
|
+
input: SetOperationErrorDescriptionInput;
|
|
1831
|
+
};
|
|
1832
|
+
type SetOperationErrorTemplateAction = Action & {
|
|
1833
|
+
type: "SET_OPERATION_ERROR_TEMPLATE";
|
|
1834
|
+
input: SetOperationErrorTemplateInput;
|
|
1835
|
+
};
|
|
1836
|
+
type DeleteOperationErrorAction = Action & {
|
|
1837
|
+
type: "DELETE_OPERATION_ERROR";
|
|
1838
|
+
input: DeleteOperationErrorInput;
|
|
1839
|
+
};
|
|
1840
|
+
type ReorderOperationErrorsAction = Action & {
|
|
1841
|
+
type: "REORDER_OPERATION_ERRORS";
|
|
1842
|
+
input: ReorderOperationErrorsInput;
|
|
1843
|
+
};
|
|
1844
|
+
type DocumentModelOperationErrorAction = AddOperationErrorAction | SetOperationErrorCodeAction | SetOperationErrorNameAction | SetOperationErrorDescriptionAction | SetOperationErrorTemplateAction | DeleteOperationErrorAction | ReorderOperationErrorsAction;
|
|
1845
|
+
type AddOperationExampleAction = Action & {
|
|
1846
|
+
type: "ADD_OPERATION_EXAMPLE";
|
|
1847
|
+
input: AddOperationExampleInput;
|
|
1848
|
+
};
|
|
1849
|
+
type UpdateOperationExampleAction = Action & {
|
|
1850
|
+
type: "UPDATE_OPERATION_EXAMPLE";
|
|
1851
|
+
input: UpdateOperationExampleInput;
|
|
1852
|
+
};
|
|
1853
|
+
type DeleteOperationExampleAction = Action & {
|
|
1854
|
+
type: "DELETE_OPERATION_EXAMPLE";
|
|
1855
|
+
input: DeleteOperationExampleInput;
|
|
1856
|
+
};
|
|
1857
|
+
type ReorderOperationExamplesAction = Action & {
|
|
1858
|
+
type: "REORDER_OPERATION_EXAMPLES";
|
|
1859
|
+
input: ReorderOperationExamplesInput;
|
|
1860
|
+
};
|
|
1861
|
+
type DocumentModelOperationExampleAction = AddOperationExampleAction | UpdateOperationExampleAction | DeleteOperationExampleAction | ReorderOperationExamplesAction;
|
|
1862
|
+
type SetStateSchemaAction = Action & {
|
|
1863
|
+
type: "SET_STATE_SCHEMA";
|
|
1864
|
+
input: SetStateSchemaInput;
|
|
1865
|
+
};
|
|
1866
|
+
type SetInitialStateAction = Action & {
|
|
1867
|
+
type: "SET_INITIAL_STATE";
|
|
1868
|
+
input: SetInitialStateInput;
|
|
1869
|
+
};
|
|
1870
|
+
type AddStateExampleAction = Action & {
|
|
1871
|
+
type: "ADD_STATE_EXAMPLE";
|
|
1872
|
+
input: AddStateExampleInput;
|
|
1873
|
+
};
|
|
1874
|
+
type UpdateStateExampleAction = Action & {
|
|
1875
|
+
type: "UPDATE_STATE_EXAMPLE";
|
|
1876
|
+
input: UpdateStateExampleInput;
|
|
1877
|
+
};
|
|
1878
|
+
type DeleteStateExampleAction = Action & {
|
|
1879
|
+
type: "DELETE_STATE_EXAMPLE";
|
|
1880
|
+
input: DeleteStateExampleInput;
|
|
1881
|
+
};
|
|
1882
|
+
type ReorderStateExamplesAction = Action & {
|
|
1883
|
+
type: "REORDER_STATE_EXAMPLES";
|
|
1884
|
+
input: ReorderStateExamplesInput;
|
|
1885
|
+
};
|
|
1886
|
+
type DocumentModelStateAction = SetStateSchemaAction | SetInitialStateAction | AddStateExampleAction | UpdateStateExampleAction | DeleteStateExampleAction | ReorderStateExamplesAction;
|
|
1887
|
+
type AddChangeLogItemAction = Action & {
|
|
1888
|
+
type: "ADD_CHANGE_LOG_ITEM";
|
|
1889
|
+
input: AddChangeLogItemInput;
|
|
1890
|
+
};
|
|
1891
|
+
type UpdateChangeLogItemAction = Action & {
|
|
1892
|
+
type: "UPDATE_CHANGE_LOG_ITEM";
|
|
1893
|
+
input: UpdateChangeLogItemInput;
|
|
1894
|
+
};
|
|
1895
|
+
type DeleteChangeLogItemAction = Action & {
|
|
1896
|
+
type: "DELETE_CHANGE_LOG_ITEM";
|
|
1897
|
+
input: DeleteChangeLogItemInput;
|
|
1898
|
+
};
|
|
1899
|
+
type ReorderChangeLogItemsAction = Action & {
|
|
1900
|
+
type: "REORDER_CHANGE_LOG_ITEMS";
|
|
1901
|
+
input: ReorderChangeLogItemsInput;
|
|
1902
|
+
};
|
|
1903
|
+
type ReleaseNewVersionAction = Action & {
|
|
1904
|
+
type: "RELEASE_NEW_VERSION";
|
|
1905
|
+
input: {};
|
|
1906
|
+
};
|
|
1907
|
+
type DocumentModelVersioningAction = AddChangeLogItemAction | UpdateChangeLogItemAction | DeleteChangeLogItemAction | ReorderChangeLogItemsAction | ReleaseNewVersionAction;
|
|
1908
|
+
interface DocumentModelHeaderOperations {
|
|
1909
|
+
setModelNameOperation: (state: DocumentModelGlobalState, action: SetModelNameAction) => void;
|
|
1910
|
+
setModelIdOperation: (state: DocumentModelGlobalState, action: SetModelIdAction) => void;
|
|
1911
|
+
setModelExtensionOperation: (state: DocumentModelGlobalState, action: SetModelExtensionAction) => void;
|
|
1912
|
+
setModelDescriptionOperation: (state: DocumentModelGlobalState, action: SetModelDescriptionAction) => void;
|
|
1913
|
+
setAuthorNameOperation: (state: DocumentModelGlobalState, action: SetAuthorNameAction) => void;
|
|
1914
|
+
setAuthorWebsiteOperation: (state: DocumentModelGlobalState, action: SetAuthorWebsiteAction) => void;
|
|
1915
|
+
}
|
|
1916
|
+
interface DocumentModelModuleOperations {
|
|
1917
|
+
addModuleOperation: (state: DocumentModelGlobalState, action: AddModuleAction) => void;
|
|
1918
|
+
setModuleNameOperation: (state: DocumentModelGlobalState, action: SetModuleNameAction) => void;
|
|
1919
|
+
setModuleDescriptionOperation: (state: DocumentModelGlobalState, action: SetModuleDescriptionAction) => void;
|
|
1920
|
+
deleteModuleOperation: (state: DocumentModelGlobalState, action: DeleteModuleAction) => void;
|
|
1921
|
+
reorderModulesOperation: (state: DocumentModelGlobalState, action: ReorderModulesAction) => void;
|
|
1922
|
+
}
|
|
1923
|
+
type DocumentModelOperationOperations = {
|
|
1924
|
+
addOperationOperation: (state: DocumentModelGlobalState, action: AddOperationAction) => void;
|
|
1925
|
+
setOperationNameOperation: (state: DocumentModelGlobalState, action: SetOperationNameAction) => void;
|
|
1926
|
+
setOperationScopeOperation: (state: DocumentModelGlobalState, action: SetOperationScopeAction) => void;
|
|
1927
|
+
setOperationSchemaOperation: (state: DocumentModelGlobalState, action: SetOperationSchemaAction) => void;
|
|
1928
|
+
setOperationDescriptionOperation: (state: DocumentModelGlobalState, action: SetOperationDescriptionAction) => void;
|
|
1929
|
+
setOperationTemplateOperation: (state: DocumentModelGlobalState, action: SetOperationTemplateAction) => void;
|
|
1930
|
+
setOperationReducerOperation: (state: DocumentModelGlobalState, action: SetOperationReducerAction) => void;
|
|
1931
|
+
moveOperationOperation: (state: DocumentModelGlobalState, action: MoveOperationAction) => void;
|
|
1932
|
+
deleteOperationOperation: (state: DocumentModelGlobalState, action: DeleteOperationAction) => void;
|
|
1933
|
+
reorderModuleOperationsOperation: (state: DocumentModelGlobalState, action: ReorderModuleOperationsAction) => void;
|
|
1934
|
+
};
|
|
1935
|
+
interface DocumentModelOperationErrorOperations {
|
|
1936
|
+
addOperationErrorOperation: (state: DocumentModelGlobalState, action: AddOperationErrorAction) => void;
|
|
1937
|
+
setOperationErrorCodeOperation: (state: DocumentModelGlobalState, action: SetOperationErrorCodeAction) => void;
|
|
1938
|
+
setOperationErrorNameOperation: (state: DocumentModelGlobalState, action: SetOperationErrorNameAction) => void;
|
|
1939
|
+
setOperationErrorDescriptionOperation: (state: DocumentModelGlobalState, action: SetOperationErrorDescriptionAction) => void;
|
|
1940
|
+
setOperationErrorTemplateOperation: (state: DocumentModelGlobalState, action: SetOperationErrorTemplateAction) => void;
|
|
1941
|
+
deleteOperationErrorOperation: (state: DocumentModelGlobalState, action: DeleteOperationErrorAction) => void;
|
|
1942
|
+
reorderOperationErrorsOperation: (state: DocumentModelGlobalState, action: ReorderOperationErrorsAction) => void;
|
|
1943
|
+
}
|
|
1944
|
+
interface DocumentModelOperationExampleOperations {
|
|
1945
|
+
addOperationExampleOperation: (state: DocumentModelGlobalState, action: AddOperationExampleAction) => void;
|
|
1946
|
+
updateOperationExampleOperation: (state: DocumentModelGlobalState, action: UpdateOperationExampleAction) => void;
|
|
1947
|
+
deleteOperationExampleOperation: (state: DocumentModelGlobalState, action: DeleteOperationExampleAction) => void;
|
|
1948
|
+
reorderOperationExamplesOperation: (state: DocumentModelGlobalState, action: ReorderOperationExamplesAction) => void;
|
|
1949
|
+
}
|
|
1950
|
+
interface DocumentModelStateOperations {
|
|
1951
|
+
setStateSchemaOperation: (state: DocumentModelGlobalState, action: SetStateSchemaAction) => void;
|
|
1952
|
+
setInitialStateOperation: (state: DocumentModelGlobalState, action: SetInitialStateAction) => void;
|
|
1953
|
+
addStateExampleOperation: (state: DocumentModelGlobalState, action: AddStateExampleAction) => void;
|
|
1954
|
+
updateStateExampleOperation: (state: DocumentModelGlobalState, action: UpdateStateExampleAction) => void;
|
|
1955
|
+
deleteStateExampleOperation: (state: DocumentModelGlobalState, action: DeleteStateExampleAction) => void;
|
|
1956
|
+
reorderStateExamplesOperation: (state: DocumentModelGlobalState, action: ReorderStateExamplesAction) => void;
|
|
1957
|
+
}
|
|
1958
|
+
interface DocumentModelVersioningOperations {
|
|
1959
|
+
addChangeLogItemOperation: (state: DocumentModelGlobalState, action: AddChangeLogItemAction) => void;
|
|
1960
|
+
updateChangeLogItemOperation: (state: DocumentModelGlobalState, action: UpdateChangeLogItemAction) => void;
|
|
1961
|
+
deleteChangeLogItemOperation: (state: DocumentModelGlobalState, action: DeleteChangeLogItemAction) => void;
|
|
1962
|
+
reorderChangeLogItemsOperation: (state: DocumentModelGlobalState, action: ReorderChangeLogItemsAction) => void;
|
|
1963
|
+
releaseNewVersionOperation: (state: DocumentModelGlobalState, action: ReleaseNewVersionAction) => void;
|
|
1964
|
+
}
|
|
1965
|
+
type Maybe<T> = T | null;
|
|
1966
|
+
type InputMaybe<T> = T | null | undefined;
|
|
1967
|
+
type Exact<T extends Record<string, unknown>> = { [K in keyof T]: T[K] };
|
|
1968
|
+
type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
|
|
1969
|
+
type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
|
|
1970
|
+
type MakeEmpty<T extends Record<string, unknown>, K extends keyof T> = { [_ in K]?: never };
|
|
1971
|
+
type Incremental<T> = T | { [P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never };
|
|
1972
|
+
/** All built-in and custom scalars, mapped to their actual values */
|
|
1973
|
+
type Scalars = {
|
|
1974
|
+
ID: {
|
|
1975
|
+
input: string;
|
|
1976
|
+
output: string;
|
|
1977
|
+
};
|
|
1978
|
+
String: {
|
|
1979
|
+
input: string;
|
|
1980
|
+
output: string;
|
|
1981
|
+
};
|
|
1982
|
+
Boolean: {
|
|
1983
|
+
input: boolean;
|
|
1984
|
+
output: boolean;
|
|
1985
|
+
};
|
|
1986
|
+
Int: {
|
|
1987
|
+
input: number;
|
|
1988
|
+
output: number;
|
|
1989
|
+
};
|
|
1990
|
+
Float: {
|
|
1991
|
+
input: number;
|
|
1992
|
+
output: number;
|
|
1993
|
+
};
|
|
1994
|
+
Address: {
|
|
1995
|
+
input: `${string}:0x${string}`;
|
|
1996
|
+
output: `${string}:0x${string}`;
|
|
1997
|
+
};
|
|
1998
|
+
AttachmentRef: {
|
|
1999
|
+
input: `attachment://v${number}:${string}`;
|
|
2000
|
+
output: `attachment://v${number}:${string}`;
|
|
2001
|
+
};
|
|
2002
|
+
DateTime: {
|
|
2003
|
+
input: string;
|
|
2004
|
+
output: string;
|
|
2005
|
+
};
|
|
2006
|
+
Unknown: {
|
|
2007
|
+
input: unknown;
|
|
2008
|
+
output: unknown;
|
|
2009
|
+
};
|
|
2010
|
+
};
|
|
2011
|
+
type ID = string;
|
|
2012
|
+
type OperationsByScope = Partial<Record<string, Operation[]>>;
|
|
2013
|
+
type SkipHeaderOperationIndex = Partial<Pick<OperationIndex, "index">> & Pick<OperationIndex, "skip">;
|
|
2014
|
+
type UndoRedoAction = SchemaRedoAction | SchemaUndoAction;
|
|
2015
|
+
type IAction = {
|
|
2016
|
+
type: Scalars["String"]["output"];
|
|
2017
|
+
};
|
|
2018
|
+
type IDocument = {
|
|
2019
|
+
created: Scalars["DateTime"]["output"];
|
|
2020
|
+
documentType: Scalars["String"]["output"];
|
|
2021
|
+
lastModified: Scalars["DateTime"]["output"];
|
|
2022
|
+
name: Scalars["String"]["output"];
|
|
2023
|
+
operations: Array<IOperation>;
|
|
2024
|
+
revision: Scalars["Int"]["output"];
|
|
2025
|
+
};
|
|
2026
|
+
type IOperation = {
|
|
2027
|
+
hash: Scalars["String"]["output"];
|
|
2028
|
+
index: Scalars["Int"]["output"];
|
|
2029
|
+
timestampUtcMs: Scalars["DateTime"]["output"];
|
|
2030
|
+
type: Scalars["String"]["output"];
|
|
2031
|
+
};
|
|
2032
|
+
type Load_State = "LOAD_STATE";
|
|
2033
|
+
type SchemaLoadStateAction = {
|
|
2034
|
+
id: Scalars["String"]["output"];
|
|
2035
|
+
timestampUtcMs: Scalars["DateTime"]["output"];
|
|
2036
|
+
input: LoadStateActionInput;
|
|
2037
|
+
type: Load_State;
|
|
2038
|
+
scope: string;
|
|
2039
|
+
};
|
|
2040
|
+
type LoadStateActionInput = {
|
|
2041
|
+
operations: Scalars["Int"]["input"];
|
|
2042
|
+
state: LoadStateActionStateInput;
|
|
2043
|
+
};
|
|
2044
|
+
type LoadStateActionStateInput = {
|
|
2045
|
+
data?: InputMaybe<Scalars["Unknown"]["input"]>;
|
|
2046
|
+
name: Scalars["String"]["input"];
|
|
2047
|
+
};
|
|
2048
|
+
type MutationLoadStateArgs = {
|
|
2049
|
+
input: SchemaLoadStateAction;
|
|
2050
|
+
};
|
|
2051
|
+
type MutationPruneArgs = {
|
|
2052
|
+
input: SchemaPruneAction;
|
|
2053
|
+
};
|
|
2054
|
+
type MutationRedoArgs = {
|
|
2055
|
+
input: SchemaRedoAction;
|
|
2056
|
+
};
|
|
2057
|
+
type MutationSetNameArgs = {
|
|
2058
|
+
input: SchemaSetNameAction;
|
|
2059
|
+
};
|
|
2060
|
+
type MutationUndoArgs = {
|
|
2061
|
+
input: SchemaUndoAction;
|
|
2062
|
+
};
|
|
2063
|
+
type Prune = "PRUNE";
|
|
2064
|
+
type SchemaPruneAction = {
|
|
2065
|
+
id: Scalars["String"]["output"];
|
|
2066
|
+
timestampUtcMs: Scalars["DateTime"]["output"];
|
|
2067
|
+
input: PruneActionInput;
|
|
2068
|
+
type: Prune;
|
|
2069
|
+
scope: string;
|
|
2070
|
+
};
|
|
2071
|
+
type PruneActionInput = {
|
|
2072
|
+
end?: InputMaybe<Scalars["Int"]["input"]>;
|
|
2073
|
+
start?: InputMaybe<Scalars["Int"]["input"]>;
|
|
2074
|
+
};
|
|
2075
|
+
type Query = {
|
|
2076
|
+
__typename?: "Query";
|
|
2077
|
+
document: Maybe<IDocument>;
|
|
2078
|
+
};
|
|
2079
|
+
type Redo = "REDO";
|
|
2080
|
+
type RedoActionInput = {
|
|
2081
|
+
count: Scalars["Int"]["input"];
|
|
2082
|
+
};
|
|
2083
|
+
type SchemaRedoAction = {
|
|
2084
|
+
id: Scalars["String"]["output"];
|
|
2085
|
+
timestampUtcMs: Scalars["DateTime"]["output"];
|
|
2086
|
+
input: RedoActionInput;
|
|
2087
|
+
type: Redo;
|
|
2088
|
+
scope: string;
|
|
2089
|
+
};
|
|
2090
|
+
type Set_Name = "SET_NAME";
|
|
2091
|
+
type SetNameActionInput = {
|
|
2092
|
+
name: Scalars["String"]["input"];
|
|
2093
|
+
};
|
|
2094
|
+
type SchemaSetNameAction = {
|
|
2095
|
+
id: Scalars["String"]["output"];
|
|
2096
|
+
timestampUtcMs: Scalars["DateTime"]["output"];
|
|
2097
|
+
input: SetNameActionInput;
|
|
2098
|
+
type: Set_Name;
|
|
2099
|
+
scope: "global";
|
|
2100
|
+
};
|
|
2101
|
+
type SetNameOperation = IOperation & {
|
|
2102
|
+
__typename?: "SetNameOperation";
|
|
2103
|
+
hash: Scalars["String"]["output"];
|
|
2104
|
+
index: Scalars["Int"]["output"];
|
|
2105
|
+
input: Scalars["String"]["output"];
|
|
2106
|
+
timestamp: Scalars["DateTime"]["output"];
|
|
2107
|
+
type: Scalars["String"]["output"];
|
|
2108
|
+
};
|
|
2109
|
+
type Set_PreferredEditor = "SET_PREFERRED_EDITOR";
|
|
2110
|
+
type SetPreferredEditorActionInput = {
|
|
2111
|
+
preferredEditor: Scalars["String"]["input"] | null;
|
|
2112
|
+
};
|
|
2113
|
+
type SchemaSetPreferredEditorAction = {
|
|
2114
|
+
id: Scalars["String"]["output"];
|
|
2115
|
+
timestampUtcMs: Scalars["DateTime"]["output"];
|
|
2116
|
+
input: SetPreferredEditorActionInput;
|
|
2117
|
+
type: Set_PreferredEditor;
|
|
2118
|
+
scope: "header";
|
|
2119
|
+
};
|
|
2120
|
+
type SetPreferredEditorOperation = IOperation & {
|
|
2121
|
+
__typename?: "SetPreferredEditorOperation";
|
|
2122
|
+
hash: Scalars["String"]["output"];
|
|
2123
|
+
index: Scalars["Int"]["output"];
|
|
2124
|
+
input: SetPreferredEditorActionInput;
|
|
2125
|
+
timestamp: Scalars["DateTime"]["output"];
|
|
2126
|
+
type: Scalars["String"]["output"];
|
|
2127
|
+
};
|
|
2128
|
+
type Undo = "UNDO";
|
|
2129
|
+
type UndoActionInput = {
|
|
2130
|
+
count: Scalars["Int"]["input"];
|
|
2131
|
+
};
|
|
2132
|
+
type SchemaUndoAction = {
|
|
2133
|
+
id: Scalars["String"]["output"];
|
|
2134
|
+
timestampUtcMs: Scalars["DateTime"]["output"];
|
|
2135
|
+
input: UndoActionInput;
|
|
2136
|
+
type: Undo;
|
|
2137
|
+
scope: string;
|
|
2138
|
+
};
|
|
2139
|
+
type SchemaNOOPAction = {
|
|
2140
|
+
id: Scalars["String"]["output"];
|
|
2141
|
+
input: Scalars["Unknown"]["input"];
|
|
2142
|
+
scope: string;
|
|
2143
|
+
timestampUtcMs: Scalars["DateTime"]["output"];
|
|
2144
|
+
type: "NOOP";
|
|
2145
|
+
};
|
|
2146
|
+
type LoadStateAction = Action & {
|
|
2147
|
+
type: "LOAD_STATE";
|
|
2148
|
+
input: LoadStateActionInput;
|
|
2149
|
+
};
|
|
2150
|
+
type PruneAction = Action & {
|
|
2151
|
+
type: "PRUNE";
|
|
2152
|
+
input: PruneActionInput;
|
|
2153
|
+
};
|
|
2154
|
+
type RedoAction = Action & {
|
|
2155
|
+
type: "REDO";
|
|
2156
|
+
input: SchemaRedoAction["input"];
|
|
2157
|
+
};
|
|
2158
|
+
type SetNameAction = Action & {
|
|
2159
|
+
type: "SET_NAME";
|
|
2160
|
+
input: SchemaSetNameAction["input"];
|
|
2161
|
+
};
|
|
2162
|
+
type SetPreferredEditorAction = Action & {
|
|
2163
|
+
type: "SET_PREFERRED_EDITOR";
|
|
2164
|
+
input: SchemaSetPreferredEditorAction["input"];
|
|
2165
|
+
};
|
|
2166
|
+
type UndoAction = Action & {
|
|
2167
|
+
type: "UNDO";
|
|
2168
|
+
input: SchemaUndoAction["input"];
|
|
2169
|
+
};
|
|
2170
|
+
type NOOPAction = Action & {
|
|
2171
|
+
type: "NOOP";
|
|
2172
|
+
input: SchemaNOOPAction["input"];
|
|
2173
|
+
};
|
|
2174
|
+
type CreateDocumentActionInput = {
|
|
2175
|
+
model: string;
|
|
2176
|
+
version: 0;
|
|
2177
|
+
documentId: string;
|
|
2178
|
+
signing?: {
|
|
2179
|
+
signature: string;
|
|
2180
|
+
publicKey: JsonWebKey;
|
|
2181
|
+
nonce: string;
|
|
2182
|
+
createdAtUtcIso: string;
|
|
2183
|
+
documentType: string;
|
|
2184
|
+
};
|
|
2185
|
+
slug?: string;
|
|
2186
|
+
name?: string;
|
|
2187
|
+
branch?: string;
|
|
2188
|
+
meta?: Record<string, unknown>;
|
|
2189
|
+
protocolVersions?: {
|
|
2190
|
+
[key: string]: number;
|
|
2191
|
+
};
|
|
2192
|
+
};
|
|
2193
|
+
type UpgradeDocumentActionInput = {
|
|
2194
|
+
model: string;
|
|
2195
|
+
fromVersion: number;
|
|
2196
|
+
toVersion: number;
|
|
2197
|
+
documentId: string;
|
|
2198
|
+
initialState?: object;
|
|
2199
|
+
/**
|
|
2200
|
+
* Per-scope next-operation-index snapshot at the moment the upgrade executes.
|
|
2201
|
+
* Absent on legacy operations; loaders fall back to timestamp ordering when missing.
|
|
2202
|
+
* Stamped CLIENT-SIDE at action creation (before signing), NEVER at execution.
|
|
2203
|
+
*/
|
|
2204
|
+
revision?: Record<string, number>;
|
|
2205
|
+
};
|
|
2206
|
+
type DeleteDocumentActionInput = {
|
|
2207
|
+
documentId: string;
|
|
2208
|
+
propagate?: "none" | "cascade";
|
|
2209
|
+
};
|
|
2210
|
+
type AddRelationshipActionInput = {
|
|
2211
|
+
sourceId: string;
|
|
2212
|
+
targetId: string;
|
|
2213
|
+
relationshipType: string;
|
|
2214
|
+
metadata?: Record<string, unknown>;
|
|
2215
|
+
};
|
|
2216
|
+
type RemoveRelationshipActionInput = {
|
|
2217
|
+
sourceId: string;
|
|
2218
|
+
targetId: string;
|
|
2219
|
+
relationshipType: string;
|
|
2220
|
+
};
|
|
2221
|
+
type UpdateRelationshipActionInput = {
|
|
2222
|
+
sourceId: string;
|
|
2223
|
+
targetId: string;
|
|
2224
|
+
relationshipType: string;
|
|
2225
|
+
metadata: Record<string, unknown> | null;
|
|
2226
|
+
};
|
|
2227
|
+
type CreateDocumentAction = Action & {
|
|
2228
|
+
type: "CREATE_DOCUMENT";
|
|
2229
|
+
input: CreateDocumentActionInput;
|
|
2230
|
+
};
|
|
2231
|
+
type UpgradeDocumentAction = Action & {
|
|
2232
|
+
type: "UPGRADE_DOCUMENT";
|
|
2233
|
+
input: UpgradeDocumentActionInput;
|
|
2234
|
+
};
|
|
2235
|
+
type DeleteDocumentAction = Action & {
|
|
2236
|
+
type: "DELETE_DOCUMENT";
|
|
2237
|
+
input: DeleteDocumentActionInput;
|
|
2238
|
+
};
|
|
2239
|
+
type AddRelationshipAction = Action & {
|
|
2240
|
+
type: "ADD_RELATIONSHIP";
|
|
2241
|
+
input: AddRelationshipActionInput;
|
|
2242
|
+
};
|
|
2243
|
+
type RemoveRelationshipAction = Action & {
|
|
2244
|
+
type: "REMOVE_RELATIONSHIP";
|
|
2245
|
+
input: RemoveRelationshipActionInput;
|
|
2246
|
+
};
|
|
2247
|
+
type UpdateRelationshipAction = Action & {
|
|
2248
|
+
type: "UPDATE_RELATIONSHIP";
|
|
2249
|
+
input: UpdateRelationshipActionInput;
|
|
2250
|
+
};
|
|
2251
|
+
type DocumentAction = LoadStateAction | PruneAction | RedoAction | SetNameAction | SetPreferredEditorAction | UndoAction | NOOPAction;
|
|
2252
|
+
interface ISignal<TType extends string, TInput> {
|
|
2253
|
+
type: TType;
|
|
2254
|
+
input: TInput;
|
|
2255
|
+
}
|
|
2256
|
+
type ISignalResult<TTYpe, TInput, TResult> = {
|
|
2257
|
+
signal: {
|
|
2258
|
+
type: TTYpe;
|
|
2259
|
+
input: TInput;
|
|
2260
|
+
};
|
|
2261
|
+
result: TResult;
|
|
2262
|
+
};
|
|
2263
|
+
type CreateChildDocumentInput = {
|
|
2264
|
+
id: string;
|
|
2265
|
+
documentType: string;
|
|
2266
|
+
};
|
|
2267
|
+
type CreateChildDocumentSignal = ISignal<"CREATE_CHILD_DOCUMENT", CreateChildDocumentInput>;
|
|
2268
|
+
type DeleteChildDocumentInput = {
|
|
2269
|
+
id: string;
|
|
2270
|
+
};
|
|
2271
|
+
type DeleteChildDocumentSignal = ISignal<"DELETE_CHILD_DOCUMENT", DeleteChildDocumentInput>;
|
|
2272
|
+
type CopyChildDocumentInput = {
|
|
2273
|
+
id: string;
|
|
2274
|
+
newId: string;
|
|
2275
|
+
};
|
|
2276
|
+
type CopyChildDocumentSignal = ISignal<"COPY_CHILD_DOCUMENT", CopyChildDocumentInput>;
|
|
2277
|
+
type Signal = CreateChildDocumentSignal | CopyChildDocumentSignal | DeleteChildDocumentSignal;
|
|
2278
|
+
type SignalDispatch = (signal: Signal) => void;
|
|
2279
|
+
type SignalResult = ISignalResult<CreateChildDocumentSignal["type"], CreateChildDocumentSignal["input"], PHDocument> | ISignalResult<CopyChildDocumentSignal["type"], CopyChildDocumentSignal["input"], boolean> | ISignalResult<DeleteChildDocumentSignal["type"], DeleteChildDocumentSignal["input"], PHDocument>;
|
|
2280
|
+
type SignalResults = {
|
|
2281
|
+
CREATE_CHILD_DOCUMENT: PHDocument;
|
|
2282
|
+
COPY_CHILD_DOCUMENT: PHDocument;
|
|
2283
|
+
DELETE_CHILD_DOCUMENT: boolean;
|
|
2284
|
+
};
|
|
2285
|
+
type SignalType<T extends Signal> = T["type"];
|
|
2286
|
+
type FileInput = string | number[] | Uint8Array | ArrayBuffer | Blob;
|
|
2287
|
+
type ReducerOptions = {
|
|
2288
|
+
/** The number of operations to skip before this new action is applied. This overrides the skip count in the operation. */skip?: number; /** When true the skip count is ignored and the action is applied regardless of the skip count */
|
|
2289
|
+
ignoreSkipOperations?: boolean; /** if true reuses the provided action resulting state instead of replaying it */
|
|
2290
|
+
reuseOperationResultingState?: boolean; /** if true checks the hashes of the operations */
|
|
2291
|
+
checkHashes?: boolean; /** Options for performing a replay. */
|
|
2292
|
+
replayOptions?: {
|
|
2293
|
+
/** The previously created operation to verify against. */operation: Operation;
|
|
2294
|
+
}; /** Optional parser for the operation resulting state, uses JSON.parse by default */
|
|
2295
|
+
operationResultingStateParser?: <TState>(state: string | null | undefined) => TState;
|
|
2296
|
+
/**
|
|
2297
|
+
* When true (default), the reducer will prune operations (garbage collect) when processing a skip.
|
|
2298
|
+
* When false, it will recompute state for the skip but preserve the existing operations history.
|
|
2299
|
+
*/
|
|
2300
|
+
pruneOnSkip?: boolean; /** The branch being operated on. Defaults to "main". */
|
|
2301
|
+
branch?: string;
|
|
2302
|
+
/**
|
|
2303
|
+
* Protocol version controlling undo/redo behavior.
|
|
2304
|
+
* - Version 1 (default): Legacy behavior with index reuse
|
|
2305
|
+
* - Version 2: Reactor behavior with monotonic indices
|
|
2306
|
+
*/
|
|
2307
|
+
protocolVersion?: number;
|
|
2308
|
+
/**
|
|
2309
|
+
* When true, skip index contiguity validation during replay.
|
|
2310
|
+
* Used for V2 state rebuild where gapped indices are expected.
|
|
2311
|
+
*/
|
|
2312
|
+
skipIndexValidation?: boolean;
|
|
2313
|
+
};
|
|
2314
|
+
/**
|
|
2315
|
+
* A pure function that takes an action and the previous state
|
|
2316
|
+
* of the document and returns the new state.
|
|
2317
|
+
*/
|
|
2318
|
+
type Reducer<TState extends PHBaseState = PHBaseState> = (document: PHDocument<TState>, action: Action, dispatch?: SignalDispatch, options?: ReducerOptions) => PHDocument<TState>;
|
|
2319
|
+
type StateReducer<TState extends PHBaseState = PHBaseState> = (state: Draft<TState>, action: Action, dispatch?: SignalDispatch) => TState | undefined;
|
|
2320
|
+
type MappedOperation = {
|
|
2321
|
+
ignore: boolean;
|
|
2322
|
+
operation: Operation;
|
|
2323
|
+
};
|
|
2324
|
+
type DocumentOperationsIgnoreMap = Record<string, MappedOperation[]>;
|
|
2325
|
+
type ActionSignatureContext = {
|
|
2326
|
+
documentId: string;
|
|
2327
|
+
signer: ActionSigner;
|
|
2328
|
+
action: Action;
|
|
2329
|
+
previousStateHash: string;
|
|
2330
|
+
};
|
|
2331
|
+
type ActionSigningHandler = (message: Uint8Array) => Promise<Uint8Array>;
|
|
2332
|
+
type ActionVerificationHandler = (publicKey: string, signature: Uint8Array, data: Uint8Array) => Promise<boolean>;
|
|
2333
|
+
/**
|
|
2334
|
+
* Handler for verifying operation signatures.
|
|
2335
|
+
*
|
|
2336
|
+
* @param operation - The operation to verify
|
|
2337
|
+
* @param publicKey - The public key to verify against (from signer.app.key)
|
|
2338
|
+
* @returns Promise that resolves to true if signature is valid, false otherwise
|
|
2339
|
+
*/
|
|
2340
|
+
type SignatureVerificationHandler = (operation: Operation, publicKey: string) => Promise<boolean>;
|
|
2341
|
+
type ENSInfo = {
|
|
2342
|
+
name?: string;
|
|
2343
|
+
avatarUrl?: string;
|
|
2344
|
+
};
|
|
2345
|
+
type User = {
|
|
2346
|
+
address: `0x${string}`;
|
|
2347
|
+
networkId: string;
|
|
2348
|
+
chainId: number;
|
|
2349
|
+
ens?: ENSInfo;
|
|
2350
|
+
};
|
|
2351
|
+
type PartialRecord<K extends keyof any, T> = { [P in K]?: T };
|
|
2352
|
+
type RevisionsFilter = PartialRecord<string, number>;
|
|
2353
|
+
type GetDocumentOptions = ReducerOptions & {
|
|
2354
|
+
revisions?: RevisionsFilter;
|
|
2355
|
+
checkHashes?: boolean;
|
|
2356
|
+
};
|
|
2357
|
+
type ActionErrorCallback = (error: unknown) => void;
|
|
2358
|
+
type EditorDispatch = (action: Action, onErrorCallback?: ActionErrorCallback) => void;
|
|
2359
|
+
type EditorProps = {
|
|
2360
|
+
children?: ReactNode;
|
|
2361
|
+
className?: string;
|
|
2362
|
+
document?: PHDocument;
|
|
2363
|
+
};
|
|
2364
|
+
type SubgraphModule = {
|
|
2365
|
+
id: string;
|
|
2366
|
+
name: string;
|
|
2367
|
+
gql: string;
|
|
2368
|
+
endpoint: string;
|
|
2369
|
+
};
|
|
2370
|
+
type EditorModule<TProps = any> = {
|
|
2371
|
+
Component: FC<EditorProps & TProps>;
|
|
2372
|
+
documentTypes: string[];
|
|
2373
|
+
config: {
|
|
2374
|
+
id: string;
|
|
2375
|
+
name: string;
|
|
2376
|
+
};
|
|
2377
|
+
};
|
|
2378
|
+
type ValidationError = {
|
|
2379
|
+
message: string;
|
|
2380
|
+
details: object;
|
|
2381
|
+
};
|
|
2382
|
+
type SkipHeaderOperations = Partial<Record<string, number>>;
|
|
2383
|
+
type ReplayDocumentOptions = {
|
|
2384
|
+
checkHashes?: boolean;
|
|
2385
|
+
reuseOperationResultingState?: boolean;
|
|
2386
|
+
operationResultingStateParser?: <TState>(state: string) => TState;
|
|
2387
|
+
skipIndexValidation?: boolean;
|
|
2388
|
+
};
|
|
2389
|
+
type OperationIndex = {
|
|
2390
|
+
index: number;
|
|
2391
|
+
skip: number;
|
|
2392
|
+
id?: string;
|
|
2393
|
+
timestampUtcMs?: string;
|
|
2394
|
+
};
|
|
2395
|
+
/**
|
|
2396
|
+
* Parameters used in a document signature.
|
|
2397
|
+
*/
|
|
2398
|
+
type SigningParameters = {
|
|
2399
|
+
documentType: string;
|
|
2400
|
+
createdAtUtcIso: string;
|
|
2401
|
+
/**
|
|
2402
|
+
* The nonce can act as both a salt and a typical nonce.
|
|
2403
|
+
*/
|
|
2404
|
+
nonce: string;
|
|
2405
|
+
};
|
|
2406
|
+
/**
|
|
2407
|
+
* Describes a signer that can sign both document headers and actions.
|
|
2408
|
+
*/
|
|
2409
|
+
interface ISigner {
|
|
2410
|
+
/** The user associated with the signer */
|
|
2411
|
+
user?: UserActionSigner;
|
|
2412
|
+
/** The app associated with the signer */
|
|
2413
|
+
app?: AppActionSigner;
|
|
2414
|
+
/** The corresponding public key */
|
|
2415
|
+
publicKey: CryptoKey;
|
|
2416
|
+
/**
|
|
2417
|
+
* Signs raw data (used for document header signing).
|
|
2418
|
+
*
|
|
2419
|
+
* @param data - The data to sign.
|
|
2420
|
+
* @returns The signature of the data.
|
|
2421
|
+
*/
|
|
2422
|
+
sign: (data: Uint8Array) => Promise<Uint8Array>;
|
|
2423
|
+
/**
|
|
2424
|
+
* Verifies a signature.
|
|
2425
|
+
*
|
|
2426
|
+
* @param data - The data to verify.
|
|
2427
|
+
* @param signature - The signature to verify.
|
|
2428
|
+
*/
|
|
2429
|
+
verify: (data: Uint8Array, signature: Uint8Array) => Promise<void>;
|
|
2430
|
+
/**
|
|
2431
|
+
* Signs an action (used for operation signing).
|
|
2432
|
+
*
|
|
2433
|
+
* @param action - The action to sign.
|
|
2434
|
+
* @param abortSignal - Optional abort signal to cancel the signing.
|
|
2435
|
+
* @returns The signature tuple.
|
|
2436
|
+
*/
|
|
2437
|
+
signAction: (action: Action, abortSignal?: AbortSignal) => Promise<Signature>;
|
|
2438
|
+
}
|
|
2439
|
+
type IsStateOfType<TState> = (state: unknown) => state is TState;
|
|
2440
|
+
type AssertIsStateOfType<TState> = (state: unknown) => asserts state is TState;
|
|
2441
|
+
type IsDocumentOfType<TState extends PHBaseState> = (document: unknown) => document is PHDocument<TState>;
|
|
2442
|
+
type AssertIsDocumentOfType<TState extends PHBaseState> = (document: unknown) => asserts document is PHDocument<TState>;
|
|
2443
|
+
type PartialState<TState> = TState | Partial<TState>;
|
|
2444
|
+
type CreateState<TState extends PHBaseState = PHBaseState> = (state?: PartialState<TState>) => TState;
|
|
2445
|
+
type SaveToFileHandle = (document: PHDocument, input: FileSystemFileHandle) => void | Promise<void>;
|
|
2446
|
+
type SaveToFile = (document: PHDocument, path: string, name?: string) => string | Promise<string>;
|
|
2447
|
+
type LoadFromInput<TState extends PHBaseState = PHBaseState> = (input: FileInput) => PHDocument<TState> | Promise<PHDocument<TState>>;
|
|
2448
|
+
type LoadFromFile<TState extends PHBaseState = PHBaseState> = (path: string) => PHDocument<TState> | Promise<PHDocument<TState>>;
|
|
2449
|
+
type CreateDocument<TState extends PHBaseState = PHBaseState> = (initialState?: Partial<TState>, createState?: CreateState<TState>) => PHDocument<TState>;
|
|
2450
|
+
type MinimalBackupData = {
|
|
2451
|
+
documentId: string;
|
|
2452
|
+
documentType: string;
|
|
2453
|
+
branch: string;
|
|
2454
|
+
state: PHBaseState;
|
|
2455
|
+
name: string;
|
|
2456
|
+
};
|
|
2457
|
+
type DocumentModelUtils<TState extends PHBaseState = PHBaseState> = {
|
|
2458
|
+
fileExtension: string;
|
|
2459
|
+
createState: CreateState<TState>;
|
|
2460
|
+
createDocument: CreateDocument<TState>;
|
|
2461
|
+
loadFromInput: LoadFromInput<TState>;
|
|
2462
|
+
saveToFileHandle: SaveToFileHandle;
|
|
2463
|
+
isStateOfType: IsStateOfType<TState>;
|
|
2464
|
+
assertIsStateOfType: AssertIsStateOfType<TState>;
|
|
2465
|
+
isDocumentOfType: IsDocumentOfType<TState>;
|
|
2466
|
+
assertIsDocumentOfType: AssertIsDocumentOfType<TState>;
|
|
2467
|
+
};
|
|
2468
|
+
type Actions = Record<string, (...args: any[]) => Action>;
|
|
2469
|
+
type DocumentModelModule<TState extends PHBaseState = PHBaseState> = {
|
|
2470
|
+
/** optional version field, should be made required */version?: number;
|
|
2471
|
+
reducer: Reducer<TState>;
|
|
2472
|
+
actions: Actions;
|
|
2473
|
+
utils: DocumentModelUtils<TState>;
|
|
2474
|
+
documentModel: DocumentModelPHState;
|
|
2475
|
+
};
|
|
2476
|
+
type DocumentModelLib<TState extends PHBaseState = PHBaseState> = {
|
|
2477
|
+
manifest: Manifest;
|
|
2478
|
+
documentModels: readonly DocumentModelModule<TState>[];
|
|
2479
|
+
editors: readonly EditorModule[];
|
|
2480
|
+
subgraphs?: readonly SubgraphModule[];
|
|
2481
|
+
upgradeManifests?: readonly UpgradeManifest<readonly number[]>[] | undefined;
|
|
2482
|
+
processorFactory?: ProcessorFactoryBuilder;
|
|
2483
|
+
};
|
|
2484
|
+
type DocumentModelDocumentModelModule = DocumentModelModule<DocumentModelPHState>;
|
|
2485
|
+
type ConfigEntryType = z.infer<typeof ConfigEntryTypeSchema>;
|
|
2486
|
+
type ConfigEntry = z.infer<typeof ConfigEntrySchema>;
|
|
2487
|
+
type PowerhouseModule = z.infer<typeof PowerhouseModuleSchema>;
|
|
2488
|
+
type Publisher = z.infer<typeof PublisherSchema>;
|
|
2489
|
+
type Manifest = z.infer<typeof ManifestSchema>;
|
|
2490
|
+
//#endregion
|
|
2491
|
+
export { DocumentModelDocumentModelModule as $, RedoActionSchema as $a, merge as $c, UpdateChangeLogItemInput as $i, OperationSpecification as $n, IRelationalQueryBuilder as $o, SetModelIdInput as $r, reorderOperationExamples as $s, MinimalBackupData as $t, CreateDocument as A, DeleteOperationInputSchema as Aa, PHDocument as Ac, SetPreferredEditorActionInput as Ai, createDocumentState as Al, MutationSetModelExtensionArgs as An, SetPreferredEditorActionSchema as Ao, RevisionsFilter as Ar, buildSignedAction as As, IAction as At, DeleteModuleAction as B, ManifestSchema as Ba, filterDuplicatedOperations as Bc, SignalType as Bi, ActionSigner as Bl, MutationSetOperationErrorTemplateArgs as Bn, UpdateStateExampleInputSchema as Bo, SchemaUndoAction as Br, moveOperation as Bs, IsStateOfType as Bt, CodeExample as C, CodeExampleSchema as Ca, undo as Cc, SetOperationSchemaAction as Ci, undoOperation as Cl, MutationReorderOperationErrorsArgs as Cn, SetOperationErrorTemplateInputSchema as Co, ReorderOperationErrorsAction as Cr, addModule as Cs, ENSInfo as Ct, CopyChildDocumentSignal as D, DeleteModuleInputSchema as Da, verifyOperationSignature as Dc, SetOperationTemplateAction as Di, PHDocumentState as Dl, MutationSetAuthorWebsiteArgs as Dn, SetOperationScopeInputSchema as Do, ReorderStateExamplesAction as Dr, addStateExample as Ds, Exact as Dt, CopyChildDocumentInput as E, DeleteChangeLogItemInputSchema as Ea, updateStateExample as Ec, SetOperationScopeInput as Ei, PHBaseState as El, MutationSetAuthorNameArgs as En, SetOperationSchemaInputSchema as Eo, ReorderOperationExamplesInput as Er, addOperationExample as Es, EditorProps as Et, DeleteChangeLogItemInput as F, DocumentSpecificationSchema as Fa, baseCreateDocument as Fc, Set_PreferredEditor as Fi, defaultBaseState as Fl, MutationSetNameArgs as Fn, UndoActionInputSchema as Fo, SchemaNOOPAction as Fr, deleteOperationError as Fs, ISignalResult as Ft, DeleteOperationExampleAction as G, OperationSpecificationSchema as Ga, groupOperationsByScope as Gc, State as Gi, UserActionSigner as Gl, MutationSetStateSchemaArgs as Gn, createRelationalDb as Go, SetAuthorWebsiteInput as Gr, operationWithContext as Gs, LoadStateActionStateInput as Gt, DeleteOperationAction as H, MoveOperationInputSchema as Ha, garbageCollectDocumentOperations as Hc, SigningParameters as Hi, HashConfig as Hl, MutationSetOperationReducerArgs as Hn, isDefinedNonNullAny as Ho, SetAuthorNameAction as Hr, operationExampleCreators as Hs, LoadFromInput as Ht, DeleteChildDocumentInput as I, LoadStateActionInputSchema as Ia, checkCleanedOperationsIntegrity as Ic, Signal as Ii, defaultDocumentState as Il, MutationSetOperationDescriptionArgs as In, UndoActionSchema as Io, SchemaPruneAction as Ir, deleteOperationExample as Is, ISigner as It, DeleteStateExampleAction as J, PruneActionInputSchema as Ja, isNoopOperation as Jc, Undo as Ji, PROCESSOR_APPS as Jl, MutationUpdateOperationExampleArgs as Jn, ExtractProcessorSchemaOrSelf as Jo, SetModelDescriptionAction as Jr, releaseNewVersion as Js, MakeMaybe as Jt, DeleteOperationExampleInput as K, PowerhouseModuleSchema as Ka, hashDocumentStateForScope as Kc, StateReducer as Ki, DEFAULT_ANALYTICS_PROCESSOR_DB_NAME as Kl, MutationUndoArgs as Kn, hashNamespace as Ko, SetInitialStateAction as Kr, prune as Ks, Load_State as Kt, DeleteChildDocumentSignal as L, LoadStateActionSchema as La, checkOperationsIntegrity as Lc, SignalDispatch as Li, defaultGlobalState as Ll, MutationSetOperationErrorCodeArgs as Ln, UndoSchema as Lo, SchemaRedoAction as Lr, deleteStateExample as Ls, Incremental as Lt, CreateDocumentActionInput as M, DocumentActionSchema as Ma, PHDocumentMeta as Mc, SetStateSchemaAction as Mi, createLocalState as Ml, MutationSetModelNameArgs as Mn, Set_NameSchema as Mo, SaveToFileHandle as Mr, deleteChangeLogItem as Ms, IDocument as Mt, CreateState as N, DocumentModelGlobalStateSchema as Na, addUndo as Nc, SetStateSchemaInput as Ni, createState as Nl, MutationSetModuleDescriptionArgs as Nn, Set_PreferredEditorSchema as No, Scalars as Nr, deleteModule as Ns, IOperation as Nt, CreateChildDocumentInput as O, DeleteOperationErrorInputSchema as Oa, IntegrityIssueSubType as Oc, SetOperationTemplateInput as Oi, createAuthState as Ol, MutationSetInitialStateArgs as On, SetOperationTemplateInputSchema as Oo, ReorderStateExamplesInput as Or, baseActions as Os, FileInput as Ot, DeleteChangeLogItemAction as P, DocumentModelInputSchema as Pa, attachBranch as Pc, Set_Name as Pi, defaultAuthState as Pl, MutationSetModuleNameArgs as Pn, StateSchema as Po, SchemaLoadStateAction as Pr, deleteOperation as Ps, ISignal as Pt, DocumentModelDocument as Q, RedoActionInputSchema as Qa, mapSkippedOperationsV2 as Qc, UpdateChangeLogItemAction as Qi, OperationIndex as Qn, IRelationalDbProcessor as Qo, SetModelIdAction as Qr, reorderOperationErrors as Qs, Maybe as Qt, DeleteDocumentAction as R, LoadStateActionStateInputSchema as Ra, diffOperations as Rc, SignalResult as Ri, defaultLocalState as Rl, MutationSetOperationErrorDescriptionArgs as Rn, UpdateChangeLogItemInputSchema as Ro, SchemaSetNameAction as Rr, documentModelActions as Rs, InputMaybe as Rt, Author as S, AuthorSchema as Sa, setStateSchema as Sc, SetOperationReducerInput as Si, setPreferredEditorOperation as Sl, MutationReorderModulesArgs as Sn, SetOperationErrorNameInputSchema as So, ReorderModulesInput as Sr, addChangeLogItem as Ss, DocumentSpecification as St, ConfigEntryType as T, ConfigEntryTypeSchema as Ta, updateOperationExample as Tc, SetOperationScopeAction as Ti, PHAuthState as Tl, MutationReorderStateExamplesArgs as Tn, SetOperationReducerInputSchema as To, ReorderOperationExamplesAction as Tr, addOperationError as Ts, EditorModule as Tt, DeleteOperationErrorAction as U, OperationErrorSchema as Ua, garbageCollectV2 as Uc, SkipHeaderOperationIndex as Ui, PHDocumentSignatureInfo as Ul, MutationSetOperationSchemaArgs as Un, createNamespacedDb as Uo, SetAuthorNameInput as Ur, operationFromAction as Us, LoadStateAction as Ut, DeleteModuleInput as V, ModuleSchema as Va, garbageCollect as Vc, SignatureVerificationHandler as Vi, AppActionSigner as Vl, MutationSetOperationNameArgs as Vn, definedNonNullAnySchema as Vo, ScopeState as Vr, noop as Vs, LoadFromFile as Vt, DeleteOperationErrorInput as W, OperationScopeSchema as Wa, getDocumentLastModified as Wc, SkipHeaderOperations as Wi, Signature as Wl, MutationSetOperationTemplateArgs as Wn, createNamespacedQueryBuilder as Wo, SetAuthorWebsiteAction as Wr, operationFromOperation as Ws, LoadStateActionInput as Wt, DocumentAction as X, PruneSchema as Xa, isUndoRedo as Xc, UndoActionInput as Xi, NOOPAction as Xn, IBaseRelationalDb as Xo, SetModelExtensionAction as Xr, reorderModuleOperations as Xs, Manifest as Xt, DeleteStateExampleInput as Y, PruneActionSchema as Ya, isUndo as Yc, UndoAction as Yi, MutationUpdateStateExampleArgs as Yn, HashAlgorithms as Yo, SetModelDescriptionInput as Yr, reorderChangeLogItems as Ys, MakeOptional as Yt, DocumentModelAction as Z, PublisherSchema as Za, mapSkippedOperations as Zc, UndoRedoAction as Zi, OperationErrorSpecification as Zn, IRelationalDb as Zo, SetModelExtensionInput as Zr, reorderModules as Zs, MappedOperation as Zt, AddRelationshipActionInput as _, AddModuleInputSchema as _a, setOperationReducer as _c, SetOperationErrorTemplateAction as _i, OperationContext as _l, MutationMoveOperationArgs as _n, SetNameActionInputSchema as _o, ReorderChangeLogItemsAction as _r, ActionContext as _s, DocumentModelStateOperations as _t, Actions as a, UpdateStateExampleInput as aa, setModelExtension as ac, SetModuleNameInput as ai, readOnly as al, MutationAddModuleArgs as an, ReorderOperationExamplesInputSchema as ao, PruneAction as ar, IProcessorHostModule as as, DocumentModelLocalState as at, AssertIsDocumentOfType as b, AddOperationInputSchema as ba, setOperationTemplate as bc, SetOperationNameInput as bi, redoOperation as bl, MutationReorderChangeLogItemsInputArgs as bn, SetOperationErrorCodeInputSchema as bo, ReorderModuleOperationsInput as br, actionSigner as bs, DocumentModelVersioningOperations as bt, AddModuleAction as c, User as ca, setModuleDescription as cc, SetNameOperation as ci, reshuffleByTimestamp as cl, MutationAddOperationExampleArgs as cn, SetAuthorNameInputSchema as co, Query as cr, ProcessorApps as cs, DocumentModelModuleOperations as ct, AddOperationErrorAction as d, UpgradeReducer as da, setOperationDescription as dc, SetOperationErrorCodeAction as di, sortMappedOperations as dl, MutationDeleteModuleArgs as dn, SetModelDescriptionInputSchema as do, RedoActionInput as dr, ProcessorFactoryBuilder as ds, DocumentModelOperationErrorOperations as dt, UpdateOperationExampleAction as ea, reorderStateExamples as ec, SetModelNameAction as ei, nextSkipNumber as el, ModuleSpecification as en, RedoSchema as eo, OperationsByScope as er, IRelationalQueryMethods as es, DocumentModelGlobalState as et, AddOperationErrorInput as f, UpgradeTransition as fa, setOperationErrorCode as fc, SetOperationErrorCodeInput as fi, sortOperations as fl, MutationDeleteOperationArgs as fn, SetModelExtensionInputSchema as fo, Reducer as fr, ProcessorFilter as fs, DocumentModelOperationExampleAction as ft, AddRelationshipAction as g, AddChangeLogItemInputSchema as ga, setOperationName as gc, SetOperationErrorNameInput as gi, Operation as gl, MutationLoadStateArgs as gn, SetModuleNameInputSchema as go, RemoveRelationshipActionInput as gr, Action as gs, DocumentModelStateAction as gt, AddOperationInput as h, computeUpgradeTransitions as ha, setOperationErrorTemplate as hc, SetOperationErrorNameAction as hi, DocumentOperations as hl, MutationDeleteStateExampleArgs as hn, SetModuleDescriptionInputSchema as ho, RemoveRelationshipAction as hr, TrackedProcessor as hs, DocumentModelPHState as ht, ActionVerificationHandler as i, UpdateStateExampleAction as ia, setModelDescription as ic, SetModuleNameAction as ii, prepareOperations as il, MutationAddChangeLogItemInputArgs as in, ReorderOperationErrorsInputSchema as io, Prune as ir, IProcessorDispatch as is, DocumentModelLib as it, CreateDocumentAction as j, DeleteStateExampleInputSchema as ja, PHDocumentHeader as jc, SetPreferredEditorOperation as ji, createGlobalState as jl, MutationSetModelIdArgs as jn, SetStateSchemaInputSchema as jo, SaveToFile as jr, createAction as js, ID as jt, CreateChildDocumentSignal as k, DeleteOperationExampleInputSchema as ka, IntegrityIssueType as kc, SetPreferredEditorAction as ki, createBaseState as kl, MutationSetModelDescriptionArgs as kn, SetPreferredEditorActionInputSchema as ko, ReplayDocumentOptions as kr, buildOperationSignature as ks, GetDocumentOptions as kt, AddModuleInput as l, ValidationError as la, setModuleName as lc, SetOperationDescriptionAction as li, reshuffleByTimestampAndIndex as ll, MutationAddStateExampleArgs as ln, SetAuthorWebsiteInputSchema as lo, Redo as lr, ProcessorDispatchResult as ls, DocumentModelOperationAction as lt, AddOperationExampleInput as m, applyUpgradeDocumentAction as ma, setOperationErrorName as mc, SetOperationErrorDescriptionInput as mi, updateHeaderRevision as ml, MutationDeleteOperationExampleArgs as mn, SetModelNameInputSchema as mo, ReleaseNewVersionAction as mr, ProcessorStatus as ms, DocumentModelOperationOperations as mt, ActionSignatureContext as n, UpdateRelationshipAction as na, setAuthorWebsite as nc, SetModuleDescriptionAction as ni, parseResultingState as nl, MoveOperationInput as nn, ReorderModuleOperationsInputSchema as no, PartialState as nr, RelationalDbProcessorClass as ns, DocumentModelHeaderOperations as nt, AddChangeLogItemAction as o, UpgradeDocumentAction as oa, setModelId as oc, SetNameAction as oi, removeExistingOperations as ol, MutationAddOperationArgs as on, ReorderStateExamplesInputSchema as oo, PruneActionInput as or, IProcessorManager as os, DocumentModelModule as ot, AddOperationExampleAction as p, applyDeleteDocumentAction as pa, setOperationErrorDescription as pc, SetOperationErrorDescriptionAction as pi, split as pl, MutationDeleteOperationErrorArgs as pn, SetModelIdInputSchema as po, ReducerOptions as pr, ProcessorRecord as ps, DocumentModelOperationExampleOperations as pt, DeleteOperationInput as q, PowerhouseModulesSchema as qa, isDocumentAction as qc, SubgraphModule as qi, DEFAULT_RELATIONAL_PROCESSOR_DB_NAME as ql, MutationUpdateChangeLogItemInputArgs as qn, relationalDbToQueryBuilder as qo, SetInitialStateInput as qr, redo as qs, MakeEmpty as qt, ActionSigningHandler as r, UpdateRelationshipActionInput as ra, setInitialState as rc, SetModuleDescriptionInput as ri, precedes as rl, Mutation as rn, ReorderModulesInputSchema as ro, PowerhouseModule as rr, IProcessor as rs, DocumentModelInput as rt, AddChangeLogItemInput as s, UpgradeDocumentActionInput as sa, setModelName as sc, SetNameActionInput as si, replayDocument as sl, MutationAddOperationErrorArgs as sn, ScopeStateSchema as so, Publisher as sr, ProcessorApp as ss, DocumentModelModuleAction as st, ActionErrorCallback as t, UpdateOperationExampleInput as ta, setAuthorName as tc, SetModelNameInput as ti, operationsAreEqual as tl, MoveOperationAction as tn, ReorderChangeLogItemsInputSchema as to, PartialRecord as tr, RelationalDbProcessor as ts, DocumentModelHeaderAction as tt, AddOperationAction as u, UpgradeManifest as ua, setName as uc, SetOperationDescriptionInput as ui, skipHeaderOperations as ul, MutationDeleteChangeLogItemInputArgs as un, SetInitialStateInputSchema as uo, RedoAction as ur, ProcessorFactory as us, DocumentModelOperationErrorAction as ut, AddStateExampleAction as v, AddOperationErrorInputSchema as va, setOperationSchema as vc, SetOperationErrorTemplateInput as vi, OperationWithContext$1 as vl, MutationPruneArgs as vn, SetNameActionSchema as vo, ReorderChangeLogItemsInput as vr, actionContext as vs, DocumentModelUtils as vt, ConfigEntry as w, ConfigEntrySchema as wa, updateChangeLogItem as wc, SetOperationSchemaInput as wi, undoOperationV2 as wl, MutationReorderOperationExamplesArgs as wn, SetOperationNameInputSchema as wo, ReorderOperationErrorsInput as wr, addOperation as ws, EditorDispatch as wt, AssertIsStateOfType as x, AddStateExampleInputSchema as xa, setPreferredEditor as xc, SetOperationReducerAction as xi, setNameOperation as xl, MutationReorderModuleOperationsArgs as xn, SetOperationErrorDescriptionInputSchema as xo, ReorderModulesAction as xr, actions as xs, DocumentOperationsIgnoreMap as xt, AddStateExampleInput as y, AddOperationExampleInputSchema as ya, setOperationScope as yc, SetOperationNameAction as yi, loadStateOperation as yl, MutationRedoArgs as yn, SetOperationDescriptionInputSchema as yo, ReorderModuleOperationsAction as yr, actionFromAction as ys, DocumentModelVersioningAction as yt, DeleteDocumentActionInput as z, Load_StateSchema as za, filterDocumentOperationsResultingState as zc, SignalResults as zi, defaultPHState as zl, MutationSetOperationErrorNameArgs as zn, UpdateOperationExampleInputSchema as zo, SchemaSetPreferredEditorAction as zr, loadState as zs, IsDocumentOfType as zt };
|
|
2492
|
+
//# sourceMappingURL=types-Bo4Rb8Yf.d.ts.map
|