@powerhousedao/shared 6.2.3-dev.90 → 6.2.3-dev.91
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/service-IZ0Aq58z.d.mts.map +1 -1
- package/dist/clis/build-pieces.d.mts +1 -1
- package/dist/clis/constants.d.mts +1 -1
- package/dist/clis/definition-sources.d.mts +48 -0
- package/dist/clis/definition-sources.d.mts.map +1 -0
- package/dist/clis/definition-sources.mjs +89 -0
- package/dist/clis/definition-sources.mjs.map +1 -0
- package/dist/clis/definition-types-CiUH8dqg.d.mts +18 -0
- package/dist/clis/definition-types-CiUH8dqg.d.mts.map +1 -0
- package/dist/clis/index.d.mts +84 -2
- package/dist/clis/index.d.mts.map +1 -1
- package/dist/clis/index.mjs +63 -3
- package/dist/clis/index.mjs.map +1 -1
- package/dist/clis/{types-CqwqhwOG.d.mts → types-DNeGTpnB.d.mts} +10 -1
- package/dist/clis/types-DNeGTpnB.d.mts.map +1 -0
- package/dist/connect/config-loader.d.ts +1 -1
- package/dist/connect/connect-config-schema.d.ts +1 -1
- package/dist/connect/connect-config-schema.js +3 -2
- package/dist/connect/connect-config-schema.js.map +1 -1
- package/dist/connect/index.d.ts +2 -2
- package/dist/{connect-config-schema-LzQbfZHm.d.ts → connect-config-schema-UFEAoO5W.d.ts} +7 -1
- package/dist/{connect-config-schema-LzQbfZHm.d.ts.map → connect-config-schema-UFEAoO5W.d.ts.map} +1 -1
- package/dist/document-drive/index.d.ts +3 -3
- package/dist/document-drive/index.js +1 -1
- package/dist/document-model/dispatch.d.ts +1 -1
- package/dist/document-model/errors.d.ts +2 -2
- package/dist/document-model/errors.js +15 -1
- package/dist/document-model/errors.js.map +1 -1
- package/dist/document-model/index.d.ts +2 -2
- package/dist/document-model/index.js +4 -4
- package/dist/document-model/utils.d.ts +1 -1
- package/dist/{document-model-D6OQX6ZP.js → document-model-TCCW8aMC.js} +44 -14
- package/dist/document-model-TCCW8aMC.js.map +1 -0
- package/dist/{index-B6uMqLt2.d.ts → index-DD0XMv4t.d.ts} +2 -2
- package/dist/{index-B6uMqLt2.d.ts.map → index-DD0XMv4t.d.ts.map} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/processors/index.d.ts +1 -1
- package/dist/processors/index.js +1 -1
- package/dist/processors/testing.d.ts +1 -1
- package/dist/{purge-BOqSpe4O.js → purge-CbAV5DVh.js} +13 -2
- package/dist/purge-CbAV5DVh.js.map +1 -0
- package/dist/registry/index.d.ts +2 -2
- package/dist/registry/manifest-slim.d.ts +2 -2
- package/dist/{types-ZkfQLcTZ.d.ts → types-Btd9TO_L.d.ts} +2 -2
- package/dist/{types-ZkfQLcTZ.d.ts.map → types-Btd9TO_L.d.ts.map} +1 -1
- package/dist/{types-D2IwhfT4.d.ts → types-Dp2OWq1-.d.ts} +2099 -2077
- package/dist/types-Dp2OWq1-.d.ts.map +1 -0
- package/package.json +5 -1
- package/dist/clis/types-CqwqhwOG.d.mts.map +0 -1
- package/dist/document-model-D6OQX6ZP.js.map +0 -1
- package/dist/purge-BOqSpe4O.js.map +0 -1
- package/dist/types-D2IwhfT4.d.ts.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { f as IAnalyticsStore } from "./types-Bsp8VL2y.js";
|
|
2
|
-
import { $ as connectRuntimePwaSchema, A as connectPackagesSchema, B as connectReactorSchema, C as connectExplorerIconsSchema, D as connectLengthSchema, F as connectPwaRuntimeCachingSchema, G as connectRenownSchema, H as connectRenownAdaptersSchema, J as connectRuntimeDefaultDriveRemoteSchema, K as connectRouterSettingsSchema, L as connectPwaUrlPatternSchema, M as connectPwaFileHandlerSchema, N as connectPwaIconSchema, O as connectLoaderSchema, Q as connectRuntimePwaManifestSchema, R as connectReactorClientModeSchema, S as connectEdgesSchema, T as connectImageRefSchema, U as connectRenownPrivyAdapterSchema, V as connectRemoteBackendSchema, W as connectRenownRainbowAdapterSchema, Y as connectRuntimeDefaultDriveSchema, Z as connectRuntimeInstanceSchema, _ as connectDefaultDriveSchema, a as connectAiSchema, b as connectDriveSectionsSchema, c as connectBackgroundLayersSchema, d as connectCollectionSchema, et as connectSchemedColorSchema, f as connectCompositionEntrySchema, g as connectDefaultDriveRemoteSchema, h as connectDefaultDriveLocalSchema, j as connectPwaCacheStrategySchema, k as connectOpenPanelSchema, l as connectBackgroundSchema, nt as connectSentrySchema, o as connectAppSchema, q as connectRuntimeConfigSchema, rt as connect_config_schema_d_exports, s as connectBackgroundLayerSchema, tt as connectSchemedImageSchema, u as connectBrandingSchema, w as connectHomeSchema, x as connectDrivesSchema, y as connectDriveSectionSchema, z as connectReactorFeatureFlagsSchema } from "./connect-config-schema-
|
|
2
|
+
import { $ as connectRuntimePwaSchema, A as connectPackagesSchema, B as connectReactorSchema, C as connectExplorerIconsSchema, D as connectLengthSchema, F as connectPwaRuntimeCachingSchema, G as connectRenownSchema, H as connectRenownAdaptersSchema, J as connectRuntimeDefaultDriveRemoteSchema, K as connectRouterSettingsSchema, L as connectPwaUrlPatternSchema, M as connectPwaFileHandlerSchema, N as connectPwaIconSchema, O as connectLoaderSchema, Q as connectRuntimePwaManifestSchema, R as connectReactorClientModeSchema, S as connectEdgesSchema, T as connectImageRefSchema, U as connectRenownPrivyAdapterSchema, V as connectRemoteBackendSchema, W as connectRenownRainbowAdapterSchema, Y as connectRuntimeDefaultDriveSchema, Z as connectRuntimeInstanceSchema, _ as connectDefaultDriveSchema, a as connectAiSchema, b as connectDriveSectionsSchema, c as connectBackgroundLayersSchema, d as connectCollectionSchema, et as connectSchemedColorSchema, f as connectCompositionEntrySchema, g as connectDefaultDriveRemoteSchema, h as connectDefaultDriveLocalSchema, j as connectPwaCacheStrategySchema, k as connectOpenPanelSchema, l as connectBackgroundSchema, nt as connectSentrySchema, o as connectAppSchema, q as connectRuntimeConfigSchema, rt as connect_config_schema_d_exports, s as connectBackgroundLayerSchema, tt as connectSchemedImageSchema, u as connectBrandingSchema, w as connectHomeSchema, x as connectDrivesSchema, y as connectDriveSectionSchema, z as connectReactorFeatureFlagsSchema } from "./connect-config-schema-UFEAoO5W.js";
|
|
3
3
|
import { ZodIssue, ZodRawShape, z } from "zod";
|
|
4
4
|
import { Draft } from "mutative";
|
|
5
5
|
import { Kysely, QueryCreator } from "kysely";
|
|
@@ -9,2255 +9,2260 @@ import { DispatchOutcome, DocumentDispatch, DocumentDispatch as DocumentDispatch
|
|
|
9
9
|
import { OperationWithContext } from "@powerhousedao/shared/document-model";
|
|
10
10
|
import { IncomingMessage, ServerResponse } from "node:http";
|
|
11
11
|
import { FC, ReactNode } from "react";
|
|
12
|
-
//#region
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
npm: boolean | undefined;
|
|
17
|
-
pnpm: boolean | undefined;
|
|
18
|
-
yarn: boolean | undefined;
|
|
19
|
-
bun: boolean | undefined;
|
|
20
|
-
}>>;
|
|
21
|
-
} & import("cmd-ts/dist/cjs/helpdoc.js").PrintHelp & import("cmd-ts/dist/cjs/helpdoc.js").ProvidesHelp & import("cmd-ts/dist/cjs/helpdoc.js").Named & Partial<import("cmd-ts/dist/cjs/helpdoc.js").Versioned> & import("cmd-ts/dist/cjs/argparser.js").Register & import("cmd-ts/dist/cjs/runner.js").Handling<{
|
|
22
|
-
packageManager: Agent | undefined;
|
|
23
|
-
npm: boolean | undefined;
|
|
24
|
-
pnpm: boolean | undefined;
|
|
25
|
-
yarn: boolean | undefined;
|
|
26
|
-
bun: boolean | undefined;
|
|
27
|
-
}, {
|
|
28
|
-
packageManager: Agent | undefined;
|
|
29
|
-
npm: boolean | undefined;
|
|
30
|
-
pnpm: boolean | undefined;
|
|
31
|
-
yarn: boolean | undefined;
|
|
32
|
-
bun: boolean | undefined;
|
|
33
|
-
}> & {
|
|
34
|
-
run(context: import("cmd-ts/dist/cjs/argparser.js").ParseContext): Promise<import("cmd-ts/dist/cjs/argparser.js").ParsingResult<{
|
|
35
|
-
packageManager: Agent | undefined;
|
|
36
|
-
npm: boolean | undefined;
|
|
37
|
-
pnpm: boolean | undefined;
|
|
38
|
-
yarn: boolean | undefined;
|
|
39
|
-
bun: boolean | undefined;
|
|
40
|
-
}>>;
|
|
41
|
-
} & Partial<import("cmd-ts/dist/cjs/helpdoc.js").Versioned & import("cmd-ts/dist/cjs/helpdoc.js").Descriptive & import("cmd-ts/dist/cjs/helpdoc.js").Aliased>;
|
|
42
|
-
//#endregion
|
|
43
|
-
//#region processors/constants.d.ts
|
|
44
|
-
declare const PROCESSOR_APPS: readonly ["connect", "switchboard"];
|
|
45
|
-
declare const DEFAULT_RELATIONAL_PROCESSOR_DB_NAME = "relational-db";
|
|
46
|
-
declare const DEFAULT_ANALYTICS_PROCESSOR_DB_NAME = "analytics-db";
|
|
47
|
-
//#endregion
|
|
48
|
-
//#region document-model/signatures.d.ts
|
|
49
|
-
type Signature = [string, string, string, string, string];
|
|
50
|
-
/**
|
|
51
|
-
* A user action signer.
|
|
52
|
-
*/
|
|
53
|
-
type UserActionSigner = {
|
|
54
|
-
address: string;
|
|
55
|
-
networkId: string;
|
|
56
|
-
chainId: number;
|
|
12
|
+
//#region document-model/definition-types.d.ts
|
|
13
|
+
type JsonPrimitive = string | number | boolean | null;
|
|
14
|
+
type JsonValue = JsonPrimitive | readonly JsonValue[] | {
|
|
15
|
+
readonly [key: string]: JsonValue;
|
|
57
16
|
};
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
name: string;
|
|
63
|
-
key: string;
|
|
17
|
+
type Sha256Digest = `sha256:${string}`;
|
|
18
|
+
type DefinitionSource = {
|
|
19
|
+
readonly specifier: `./${string}`;
|
|
20
|
+
readonly exportPath?: readonly string[];
|
|
64
21
|
};
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
type
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
22
|
+
type DefinitionDiagnosticSeverity = "error" | "warning";
|
|
23
|
+
type DefinitionDiagnosticPhase = "configuration" | "import" | "definition" | "composition" | "authorization" | "typecheck" | "package" | "replay";
|
|
24
|
+
type DefinitionKind = "document-model" | "subgraph" | "scalar" | "package";
|
|
25
|
+
type DefinitionRef = {
|
|
26
|
+
readonly kind: DefinitionKind;
|
|
27
|
+
readonly key: string;
|
|
28
|
+
readonly version?: number;
|
|
72
29
|
};
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
* The public key of the document creator.
|
|
79
|
-
**/
|
|
80
|
-
publicKey: JsonWebKey;
|
|
81
|
-
/** The nonce that was appended to the message to create the signature. */
|
|
82
|
-
nonce: string;
|
|
30
|
+
type DefinitionPath = readonly (string | number)[];
|
|
31
|
+
type DefinitionRelatedLocation = {
|
|
32
|
+
readonly source?: DefinitionSource;
|
|
33
|
+
readonly path: DefinitionPath;
|
|
34
|
+
readonly message: string;
|
|
83
35
|
};
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
*/
|
|
97
|
-
type HashConfig = {
|
|
98
|
-
/** The hashing algorithm to use (e.g., "sha1", "sha256") */
|
|
99
|
-
algorithm: string;
|
|
100
|
-
/** The encoding format for the hash output (e.g., "base64", "hex") */
|
|
101
|
-
encoding: string;
|
|
102
|
-
/** Optional algorithm-specific parameters */
|
|
103
|
-
params?: Record<string, unknown>;
|
|
36
|
+
type DefinitionDiagnostic = {
|
|
37
|
+
readonly code: `PH-${string}`;
|
|
38
|
+
readonly severity: DefinitionDiagnosticSeverity;
|
|
39
|
+
readonly phase: DefinitionDiagnosticPhase;
|
|
40
|
+
readonly source?: DefinitionSource;
|
|
41
|
+
readonly definition?: DefinitionRef;
|
|
42
|
+
readonly path: DefinitionPath;
|
|
43
|
+
readonly message: string;
|
|
44
|
+
readonly expected?: string;
|
|
45
|
+
readonly received?: string;
|
|
46
|
+
readonly repair: string;
|
|
47
|
+
readonly related?: readonly DefinitionRelatedLocation[];
|
|
104
48
|
};
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
name: string;
|
|
109
|
-
}): TDocument & {
|
|
110
|
-
header: {
|
|
111
|
-
name: string;
|
|
112
|
-
id: string;
|
|
113
|
-
sig: PHDocumentSignatureInfo;
|
|
114
|
-
documentType: string;
|
|
115
|
-
createdAtUtcIso: string;
|
|
116
|
-
slug: string;
|
|
117
|
-
branch: string;
|
|
118
|
-
revision: {
|
|
119
|
-
[scope: string]: number;
|
|
120
|
-
};
|
|
121
|
-
lastModifiedAtUtcIso: string;
|
|
122
|
-
protocolVersions?: {
|
|
123
|
-
[key: string]: number;
|
|
124
|
-
};
|
|
125
|
-
meta?: PHDocumentMeta;
|
|
126
|
-
};
|
|
49
|
+
type GraphQLNameNode = {
|
|
50
|
+
readonly kind: "Name";
|
|
51
|
+
readonly value: string;
|
|
127
52
|
};
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
declare function setSlugOperation<TDocument extends PHDocument$1>(document: TDocument, input: {
|
|
132
|
-
slug: string;
|
|
133
|
-
}): TDocument;
|
|
134
|
-
declare function undoOperation<TDocument extends PHDocument$1>(document: TDocument, action: Action, skip: number): {
|
|
135
|
-
document: TDocument;
|
|
136
|
-
action: Action;
|
|
137
|
-
skip: number;
|
|
138
|
-
reuseLastOperationIndex: boolean;
|
|
53
|
+
type GraphQLNamedTypeNode = {
|
|
54
|
+
readonly kind: "NamedType";
|
|
55
|
+
readonly name: GraphQLNameNode;
|
|
139
56
|
};
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
* - Never reuses operation index (always increments)
|
|
144
|
-
* - Always sets skip=1 (consecutive NOOPs are handled during rebuild/GC)
|
|
145
|
-
* - No complex skip calculation - simpler model where each UNDO is independent
|
|
146
|
-
*/
|
|
147
|
-
declare function undoOperationV2<TDocument extends PHDocument$1>(document: TDocument, action: Action, skip: number): {
|
|
148
|
-
document: TDocument;
|
|
149
|
-
action: Action;
|
|
150
|
-
skip: number;
|
|
151
|
-
reuseLastOperationIndex: false;
|
|
57
|
+
type GraphQLListTypeNode = {
|
|
58
|
+
readonly kind: "ListType";
|
|
59
|
+
readonly type: GraphQLTypeNode;
|
|
152
60
|
};
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
skip: number;
|
|
157
|
-
reuseLastOperationIndex: boolean;
|
|
61
|
+
type GraphQLNonNullTypeNode = {
|
|
62
|
+
readonly kind: "NonNullType";
|
|
63
|
+
readonly type: GraphQLNamedTypeNode | GraphQLListTypeNode;
|
|
158
64
|
};
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
* The `index` field is used to keep all operations in order and enable replaying the
|
|
165
|
-
* document's history from the beginning. Note that indices and skips are relative to
|
|
166
|
-
* a specific reactor. Example below:
|
|
167
|
-
*
|
|
168
|
-
* For (index, skip, ts, action)
|
|
169
|
-
* A - [(0, 0, 1, "A0"), (1, 0, 2, "A1")]
|
|
170
|
-
* B - [(0, 0, 0, "B0"), (1, 0, 3, "B1")]
|
|
171
|
-
* ...
|
|
172
|
-
* B gets A's Operations Scenario:
|
|
173
|
-
* B' - [(0, 0, 0, "B0"), (1, 0, 3, "B1"), (2, 1, 1, "A0"), (3, 0, 2, "A1"), (4, 0, 3, "B1")]
|
|
174
|
-
* Then A needs to end up with:
|
|
175
|
-
* 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")]
|
|
176
|
-
* So that both A and B end up with the stream of actions (action):
|
|
177
|
-
* [("B0"), ("A0"), ("A1"), ("B1")]
|
|
178
|
-
*
|
|
179
|
-
* @typeParam A - The type of the action.
|
|
180
|
-
*/
|
|
181
|
-
type Operation = {
|
|
182
|
-
/**
|
|
183
|
-
* This is a stable id, derived from various document and action properties
|
|
184
|
-
* in deriveOperationId().
|
|
185
|
-
*
|
|
186
|
-
* It _cannot_ be an arbitrary string.
|
|
187
|
-
*
|
|
188
|
-
* It it also not unique per operation, as reshuffled operations will keep'
|
|
189
|
-
* the same id they had before they were reshuffled. This means that the
|
|
190
|
-
* IOperationStore may have multiple operations with the same operation id.
|
|
191
|
-
**/
|
|
192
|
-
id: string;
|
|
193
|
-
/** Position of the operation in the history. This is relative to a specific reactor -- they may not all agree on this value. */
|
|
194
|
-
index: number;
|
|
195
|
-
/** The number of operations skipped with this Operation. This is relative to a specific reactor -- they may not all agree on this value. */
|
|
196
|
-
skip: number;
|
|
197
|
-
/** Timestamp of when the operation was added */
|
|
198
|
-
timestampUtcMs: string;
|
|
199
|
-
/** Hash of the resulting document data after the operation */
|
|
200
|
-
hash: string;
|
|
201
|
-
/** Error message for a failed action */
|
|
202
|
-
error?: string;
|
|
203
|
-
/** The name of the error a reducer threw, e.g. "BookNotStartedError"; not stored. */
|
|
204
|
-
errorName?: string;
|
|
205
|
-
/** The `errorCode` of the error a reducer threw, e.g. "BOOK_NOT_STARTED"; not stored. */
|
|
206
|
-
errorCode?: string;
|
|
207
|
-
/**
|
|
208
|
-
* If authorization rejected the action, this records the reason why.
|
|
209
|
-
*/
|
|
210
|
-
deniedReason?: string;
|
|
211
|
-
/** The resulting state after the operation */
|
|
212
|
-
resultingState?: string;
|
|
213
|
-
/**
|
|
214
|
-
* The action that was applied to the document to produce this operation.
|
|
215
|
-
*/
|
|
216
|
-
action: Action;
|
|
65
|
+
type GraphQLTypeNode = GraphQLNamedTypeNode | GraphQLListTypeNode | GraphQLNonNullTypeNode;
|
|
66
|
+
type GraphQLStringValueNode = {
|
|
67
|
+
readonly kind: "StringValue";
|
|
68
|
+
readonly value: string;
|
|
69
|
+
readonly block?: boolean;
|
|
217
70
|
};
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
* This will be removed in a future release.
|
|
222
|
-
*
|
|
223
|
-
* TODO: Type should be Partial<Record<string, Operation[]>>,
|
|
224
|
-
* but that is a breaking change for codegen + external doc models.
|
|
225
|
-
*/
|
|
226
|
-
type DocumentOperations = Record<string, Operation[]>;
|
|
227
|
-
/**
|
|
228
|
-
* What happened to an operation. An operation that is not `applied` still
|
|
229
|
-
* occupies its index but contributes nothing to the document's state.
|
|
230
|
-
*/
|
|
231
|
-
type OperationOutcome = {
|
|
232
|
-
kind: "applied";
|
|
71
|
+
type GraphQLConstValueNode = {
|
|
72
|
+
readonly kind: "IntValue";
|
|
73
|
+
readonly value: string;
|
|
233
74
|
} | {
|
|
234
|
-
kind: "
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
75
|
+
readonly kind: "FloatValue";
|
|
76
|
+
readonly value: string;
|
|
77
|
+
} | GraphQLStringValueNode | {
|
|
78
|
+
readonly kind: "BooleanValue";
|
|
79
|
+
readonly value: boolean;
|
|
238
80
|
} | {
|
|
239
|
-
kind: "
|
|
240
|
-
|
|
81
|
+
readonly kind: "NullValue";
|
|
82
|
+
} | {
|
|
83
|
+
readonly kind: "EnumValue";
|
|
84
|
+
readonly value: string;
|
|
85
|
+
} | {
|
|
86
|
+
readonly kind: "ListValue";
|
|
87
|
+
readonly values: readonly GraphQLConstValueNode[];
|
|
88
|
+
} | {
|
|
89
|
+
readonly kind: "ObjectValue";
|
|
90
|
+
readonly fields: readonly GraphQLObjectFieldNode[];
|
|
241
91
|
};
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
declare function operationOutcome(operation: Operation): OperationOutcome;
|
|
247
|
-
type OperationContext = {
|
|
248
|
-
documentId: string;
|
|
249
|
-
documentType: string;
|
|
250
|
-
scope: string;
|
|
251
|
-
branch: string;
|
|
252
|
-
resultingState?: string;
|
|
253
|
-
ordinal: number;
|
|
92
|
+
type GraphQLObjectFieldNode = {
|
|
93
|
+
readonly kind: "ObjectField";
|
|
94
|
+
readonly name: GraphQLNameNode;
|
|
95
|
+
readonly value: GraphQLConstValueNode;
|
|
254
96
|
};
|
|
255
|
-
type
|
|
256
|
-
|
|
257
|
-
|
|
97
|
+
type GraphQLArgumentNode = {
|
|
98
|
+
readonly kind: "Argument";
|
|
99
|
+
readonly name: GraphQLNameNode;
|
|
100
|
+
readonly value: GraphQLConstValueNode;
|
|
258
101
|
};
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
declare function sortOperations<TOpIndex extends OperationIndex>(operations: TOpIndex[]): TOpIndex[];
|
|
264
|
-
declare function nextSkipNumber(sortedOperations: OperationIndex[]): number;
|
|
265
|
-
//#endregion
|
|
266
|
-
//#region document-model/signature-policy.d.ts
|
|
267
|
-
/** The `protocolVersions` key that fixes a document's signature requirement. */
|
|
268
|
-
declare const SIGNATURE_PROTOCOL = "signature";
|
|
269
|
-
/** `protocolVersions.signature` of a document that requires v2 tuples. */
|
|
270
|
-
declare const SIGNATURE_PROTOCOL_V2 = 2;
|
|
271
|
-
/** `v2-required`: v2 tuples only and a content-addressed id. */
|
|
272
|
-
type SignaturePolicy$1 = "legacy" | "v2-required";
|
|
273
|
-
/** What a new document is created as unless the caller or host says otherwise. */
|
|
274
|
-
declare const DEFAULT_SIGNATURE_POLICY: SignaturePolicy$1;
|
|
275
|
-
declare function isSignaturePolicy(value: unknown): value is SignaturePolicy$1;
|
|
276
|
-
type ProtocolVersions = {
|
|
277
|
-
[protocol: string]: number;
|
|
102
|
+
type GraphQLDirectiveNode = {
|
|
103
|
+
readonly kind: "Directive";
|
|
104
|
+
readonly name: GraphQLNameNode;
|
|
105
|
+
readonly arguments: readonly GraphQLArgumentNode[];
|
|
278
106
|
};
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
* The policy a create call asks for: `signaturePolicy`, else the `signature`
|
|
287
|
-
* key of its `protocolVersions`, else `fallback`, the host's default.
|
|
288
|
-
*/
|
|
289
|
-
declare function requestedSignaturePolicy(request: {
|
|
290
|
-
signaturePolicy?: SignaturePolicy$1;
|
|
291
|
-
protocolVersions?: ProtocolVersions;
|
|
292
|
-
} | undefined, fallback: SignaturePolicy$1): SignaturePolicy$1;
|
|
293
|
-
/** `protocolVersions` for a new document under `policy`, over `base`. */
|
|
294
|
-
declare function protocolVersionsFor(policy: SignaturePolicy$1, base?: ProtocolVersions): ProtocolVersions;
|
|
295
|
-
/** What the id of a v2-required document is a hash of. */
|
|
296
|
-
type DocumentIdParams = {
|
|
297
|
-
documentType: string;
|
|
298
|
-
createdAtUtcIso: string;
|
|
299
|
-
nonce: string;
|
|
300
|
-
protocolVersions: ProtocolVersions;
|
|
107
|
+
type GraphQLInputValueDefinitionNode = {
|
|
108
|
+
readonly kind: "InputValueDefinition";
|
|
109
|
+
readonly description?: GraphQLStringValueNode;
|
|
110
|
+
readonly name: GraphQLNameNode;
|
|
111
|
+
readonly type: GraphQLTypeNode;
|
|
112
|
+
readonly defaultValue?: GraphQLConstValueNode;
|
|
113
|
+
readonly directives: readonly GraphQLDirectiveNode[];
|
|
301
114
|
};
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
* Creates a default PHAuthState
|
|
310
|
-
*/
|
|
311
|
-
declare function defaultAuthState(): PHAuthState;
|
|
312
|
-
/**
|
|
313
|
-
* Creates a default PHDocumentState
|
|
314
|
-
*/
|
|
315
|
-
declare function defaultDocumentState(): PHDocumentState;
|
|
316
|
-
/**
|
|
317
|
-
* Creates a default PHBaseState with auth and document properties
|
|
318
|
-
*/
|
|
319
|
-
declare function defaultBaseState(): PHBaseState;
|
|
320
|
-
/**
|
|
321
|
-
* Creates a PHAuthState with the given properties
|
|
322
|
-
*/
|
|
323
|
-
declare function createAuthState(auth?: Partial<PHAuthState>): PHAuthState;
|
|
324
|
-
/**
|
|
325
|
-
* Creates a PHDocumentState with the given properties
|
|
326
|
-
*/
|
|
327
|
-
declare function createDocumentState(document?: Partial<PHDocumentState>): PHDocumentState;
|
|
328
|
-
/**
|
|
329
|
-
* Creates a PHBaseState with the given auth and document properties
|
|
330
|
-
*/
|
|
331
|
-
declare function createBaseState(auth?: Partial<PHAuthState>, document?: Partial<PHDocumentState>): PHBaseState;
|
|
332
|
-
/**
|
|
333
|
-
* Backfills the auth scope to the default for legacy documents serialized with
|
|
334
|
-
* an empty `auth`. Replaces only `state.auth`. Idempotent.
|
|
335
|
-
*/
|
|
336
|
-
declare function backfillAuthState<TState extends PHBaseState>(state: TState): TState;
|
|
337
|
-
/**
|
|
338
|
-
* The document state of the document.
|
|
339
|
-
*/
|
|
340
|
-
type PHDocumentState = {
|
|
341
|
-
/**
|
|
342
|
-
* The current document model schema version of the document. This is used
|
|
343
|
-
* with the UPGRADE_DOCUMENT operation to specify the DocumentModelModule
|
|
344
|
-
* version to use for reducer execution.
|
|
345
|
-
*/
|
|
346
|
-
version: number;
|
|
347
|
-
/** Hash configuration for operation state verification */
|
|
348
|
-
hash: HashConfig;
|
|
349
|
-
/** True if and only if the document has been deleted */
|
|
350
|
-
isDeleted?: boolean;
|
|
351
|
-
/** The timestamp when the document was deleted, in UTC ISO format */
|
|
352
|
-
deletedAtUtcIso?: string;
|
|
353
|
-
/** Optional: who deleted the document */
|
|
354
|
-
deletedBy?: string;
|
|
355
|
-
/** Optional: reason for deletion */
|
|
356
|
-
deletionReason?: string;
|
|
115
|
+
type GraphQLFieldDefinitionNode = {
|
|
116
|
+
readonly kind: "FieldDefinition";
|
|
117
|
+
readonly description?: GraphQLStringValueNode;
|
|
118
|
+
readonly name: GraphQLNameNode;
|
|
119
|
+
readonly arguments: readonly GraphQLInputValueDefinitionNode[];
|
|
120
|
+
readonly type: GraphQLTypeNode;
|
|
121
|
+
readonly directives: readonly GraphQLDirectiveNode[];
|
|
357
122
|
};
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
type PHAuthState = {
|
|
364
|
-
/**
|
|
365
|
-
* Policy language version. 0 is the uninitialized state; INITIALIZE_AUTH
|
|
366
|
-
* sets an integer >= 1.
|
|
367
|
-
*/
|
|
368
|
-
version: number;
|
|
369
|
-
grants: Grant[];
|
|
370
|
-
/**
|
|
371
|
-
* The did:key of the auth-policy creator, captured from the INITIALIZE_AUTH
|
|
372
|
-
* signer. The creator may always administer the auth scope, so a grant policy
|
|
373
|
-
* can never lock administration out of itself. Absent for an unsigned genesis.
|
|
374
|
-
*/
|
|
375
|
-
creator?: string;
|
|
123
|
+
type GraphQLEnumValueDefinitionNode = {
|
|
124
|
+
readonly kind: "EnumValueDefinition";
|
|
125
|
+
readonly description?: GraphQLStringValueNode;
|
|
126
|
+
readonly name: GraphQLNameNode;
|
|
127
|
+
readonly directives: readonly GraphQLDirectiveNode[];
|
|
376
128
|
};
|
|
377
|
-
type
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
effect: "allow" | "deny";
|
|
382
|
-
principal: Principal;
|
|
383
|
-
capability: Capability;
|
|
384
|
-
/**
|
|
385
|
-
* The grant applies only when this condition holds. Until conditions are
|
|
386
|
-
* evaluated, a grant carrying one never applies.
|
|
387
|
-
*/
|
|
388
|
-
where?: Condition;
|
|
129
|
+
type GraphQLNamedDefinitionNode = {
|
|
130
|
+
readonly description?: GraphQLStringValueNode;
|
|
131
|
+
readonly name: GraphQLNameNode;
|
|
132
|
+
readonly directives: readonly GraphQLDirectiveNode[];
|
|
389
133
|
};
|
|
390
|
-
type
|
|
391
|
-
|
|
392
|
-
} | {
|
|
393
|
-
address: string;
|
|
394
|
-
} | {
|
|
395
|
-
group: string;
|
|
396
|
-
} | {
|
|
397
|
-
match: Condition;
|
|
134
|
+
type GraphQLScalarTypeDefinitionNode = GraphQLNamedDefinitionNode & {
|
|
135
|
+
readonly kind: "ScalarTypeDefinition";
|
|
398
136
|
};
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
*/
|
|
404
|
-
type PHGroupState = {
|
|
405
|
-
members: string[];
|
|
137
|
+
type GraphQLObjectTypeDefinitionNode = GraphQLNamedDefinitionNode & {
|
|
138
|
+
readonly kind: "ObjectTypeDefinition";
|
|
139
|
+
readonly interfaces: readonly GraphQLNamedTypeNode[];
|
|
140
|
+
readonly fields: readonly GraphQLFieldDefinitionNode[];
|
|
406
141
|
};
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
*/
|
|
412
|
-
type AuthGroups = Record<string, PHGroupState>;
|
|
413
|
-
type Capability = {
|
|
414
|
-
can: "read";
|
|
415
|
-
scope?: string;
|
|
416
|
-
} | {
|
|
417
|
-
can: "execute";
|
|
418
|
-
scope?: string;
|
|
419
|
-
operation?: string[];
|
|
142
|
+
type GraphQLInterfaceTypeDefinitionNode = GraphQLNamedDefinitionNode & {
|
|
143
|
+
readonly kind: "InterfaceTypeDefinition";
|
|
144
|
+
readonly interfaces: readonly GraphQLNamedTypeNode[];
|
|
145
|
+
readonly fields: readonly GraphQLFieldDefinitionNode[];
|
|
420
146
|
};
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
* yet evaluated or enforced.
|
|
425
|
-
*/
|
|
426
|
-
type Condition = {
|
|
427
|
-
eq: [Operand, Operand];
|
|
428
|
-
} | {
|
|
429
|
-
ne: [Operand, Operand];
|
|
430
|
-
} | {
|
|
431
|
-
in: [Operand, Operand[]];
|
|
432
|
-
} | {
|
|
433
|
-
notIn: [Operand, Operand[]];
|
|
434
|
-
} | {
|
|
435
|
-
lt: [Operand, Operand];
|
|
436
|
-
} | {
|
|
437
|
-
lte: [Operand, Operand];
|
|
438
|
-
} | {
|
|
439
|
-
gt: [Operand, Operand];
|
|
440
|
-
} | {
|
|
441
|
-
gte: [Operand, Operand];
|
|
442
|
-
} | {
|
|
443
|
-
exists: Operand;
|
|
444
|
-
} | {
|
|
445
|
-
and: Condition[];
|
|
446
|
-
} | {
|
|
447
|
-
or: Condition[];
|
|
448
|
-
} | {
|
|
449
|
-
not: Condition;
|
|
147
|
+
type GraphQLUnionTypeDefinitionNode = GraphQLNamedDefinitionNode & {
|
|
148
|
+
readonly kind: "UnionTypeDefinition";
|
|
149
|
+
readonly types: readonly GraphQLNamedTypeNode[];
|
|
450
150
|
};
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
*/
|
|
455
|
-
type Operand = {
|
|
456
|
-
attr: string;
|
|
457
|
-
} | {
|
|
458
|
-
lit: string | number | boolean | null;
|
|
151
|
+
type GraphQLEnumTypeDefinitionNode = GraphQLNamedDefinitionNode & {
|
|
152
|
+
readonly kind: "EnumTypeDefinition";
|
|
153
|
+
readonly values: readonly GraphQLEnumValueDefinitionNode[];
|
|
459
154
|
};
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
type PHBaseState = {
|
|
464
|
-
/** Carries authentication information. */
|
|
465
|
-
auth: PHAuthState;
|
|
466
|
-
/** Carries information about the document. */
|
|
467
|
-
document: PHDocumentState;
|
|
155
|
+
type GraphQLInputObjectTypeDefinitionNode = GraphQLNamedDefinitionNode & {
|
|
156
|
+
readonly kind: "InputObjectTypeDefinition";
|
|
157
|
+
readonly fields: readonly GraphQLInputValueDefinitionNode[];
|
|
468
158
|
};
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
159
|
+
type GraphQLOperationTypeDefinitionNode = {
|
|
160
|
+
readonly kind: "OperationTypeDefinition";
|
|
161
|
+
readonly operation: "query" | "mutation" | "subscription";
|
|
162
|
+
readonly type: GraphQLNamedTypeNode;
|
|
163
|
+
};
|
|
164
|
+
type GraphQLSchemaDefinitionNode = {
|
|
165
|
+
readonly kind: "SchemaDefinition";
|
|
166
|
+
readonly description?: GraphQLStringValueNode;
|
|
167
|
+
readonly directives: readonly GraphQLDirectiveNode[];
|
|
168
|
+
readonly operationTypes: readonly GraphQLOperationTypeDefinitionNode[];
|
|
169
|
+
};
|
|
170
|
+
type GraphQLDirectiveDefinitionNode = {
|
|
171
|
+
readonly kind: "DirectiveDefinition";
|
|
172
|
+
readonly description?: GraphQLStringValueNode;
|
|
173
|
+
readonly name: GraphQLNameNode;
|
|
174
|
+
readonly arguments: readonly GraphQLInputValueDefinitionNode[];
|
|
175
|
+
readonly repeatable: boolean;
|
|
176
|
+
readonly locations: readonly GraphQLNameNode[];
|
|
177
|
+
};
|
|
178
|
+
type GraphQLTypeSystemDefinitionNode = GraphQLSchemaDefinitionNode | GraphQLScalarTypeDefinitionNode | GraphQLObjectTypeDefinitionNode | GraphQLInterfaceTypeDefinitionNode | GraphQLUnionTypeDefinitionNode | GraphQLEnumTypeDefinitionNode | GraphQLInputObjectTypeDefinitionNode | GraphQLDirectiveDefinitionNode;
|
|
179
|
+
type GraphQLTypeSystemExtensionNode = (Omit<GraphQLSchemaDefinitionNode, "kind" | "description"> & {
|
|
180
|
+
readonly kind: "SchemaExtension";
|
|
181
|
+
}) | (Omit<GraphQLScalarTypeDefinitionNode, "kind" | "description"> & {
|
|
182
|
+
readonly kind: "ScalarTypeExtension";
|
|
183
|
+
}) | (Omit<GraphQLObjectTypeDefinitionNode, "kind" | "description"> & {
|
|
184
|
+
readonly kind: "ObjectTypeExtension";
|
|
185
|
+
}) | (Omit<GraphQLInterfaceTypeDefinitionNode, "kind" | "description"> & {
|
|
186
|
+
readonly kind: "InterfaceTypeExtension";
|
|
187
|
+
}) | (Omit<GraphQLUnionTypeDefinitionNode, "kind" | "description"> & {
|
|
188
|
+
readonly kind: "UnionTypeExtension";
|
|
189
|
+
}) | (Omit<GraphQLEnumTypeDefinitionNode, "kind" | "description"> & {
|
|
190
|
+
readonly kind: "EnumTypeExtension";
|
|
191
|
+
}) | (Omit<GraphQLInputObjectTypeDefinitionNode, "kind" | "description"> & {
|
|
192
|
+
readonly kind: "InputObjectTypeExtension";
|
|
193
|
+
});
|
|
194
|
+
type LocationFreeGraphQLDocumentNode = {
|
|
195
|
+
readonly kind: "Document";
|
|
196
|
+
readonly definitions: readonly (GraphQLTypeSystemDefinitionNode | GraphQLTypeSystemExtensionNode)[];
|
|
197
|
+
};
|
|
198
|
+
type SchemaFirstGraphQLDocumentCompatibility = {
|
|
199
|
+
readonly kind: "graphql-ast-v1";
|
|
200
|
+
readonly document: LocationFreeGraphQLDocumentNode;
|
|
201
|
+
readonly preserveDefinitionOrder: true;
|
|
481
202
|
};
|
|
203
|
+
type GraphQLBuiltInScalarName = "ID" | "String" | "Boolean" | "Int" | "Float";
|
|
204
|
+
/** The catalog scalars a document model or subgraph may reference. */
|
|
205
|
+
type PowerhouseScalarName = "PHID" | "OID" | "OLabel" | "Currency" | "EmailAddress" | "EthereumAddress" | "URL" | "Date" | "DateTime" | "Amount_Money" | "Amount_Percentage" | "Amount_Tokens" | "Amount" | "Amount_Fiat" | "Amount_Crypto" | "Amount_Currency" | "Address" | "AttachmentRef" | "Unknown" | "Upload";
|
|
206
|
+
/** Catalog scalars only the reactor host declares. A subgraph can reference one; a document model cannot. */
|
|
207
|
+
type InternalScalarName = "JSONObject";
|
|
208
|
+
/** Every catalog scalar, author-facing and internal. */
|
|
209
|
+
type CatalogScalarName = PowerhouseScalarName | InternalScalarName;
|
|
210
|
+
type ScalarName = GraphQLBuiltInScalarName | PowerhouseScalarName;
|
|
211
|
+
type ScalarRepresentation = "string" | "number" | "boolean" | "json-object" | "json" | "opaque";
|
|
212
|
+
/** The validation and coercion rules of the `document-model/scalars` catalog. */
|
|
213
|
+
type ScalarValidationProfile = "catalog-v1";
|
|
214
|
+
type ScalarGraphQLProfile = "legacy-graphql-default-v1" | "catalog-v1";
|
|
482
215
|
/**
|
|
483
|
-
*
|
|
216
|
+
* A scalar as a stored definition records it. `document-model/scalars`'
|
|
217
|
+
* `ScalarDefinition` is the runtime declaration it is made from.
|
|
484
218
|
*/
|
|
485
|
-
type
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
*
|
|
489
|
-
* This is a Ed25519 signature and is immutable.
|
|
490
|
-
**/
|
|
491
|
-
id: string;
|
|
492
|
-
/**
|
|
493
|
-
* Information to verify the document creator.
|
|
494
|
-
*
|
|
495
|
-
* This is immutable.
|
|
496
|
-
**/
|
|
497
|
-
sig: PHDocumentSignatureInfo;
|
|
498
|
-
/**
|
|
499
|
-
* The type of the document.
|
|
500
|
-
*
|
|
501
|
-
* This is used as part of the signature payload and thus, cannot be changed
|
|
502
|
-
* after the document header has been created.
|
|
503
|
-
**/
|
|
504
|
-
documentType: string;
|
|
505
|
-
/**
|
|
506
|
-
* The timestamp of the creation date of the document, in UTC ISO format.
|
|
507
|
-
*
|
|
508
|
-
* This is used as part of the signature payload and thus, cannot be changed
|
|
509
|
-
* after the document header has been created.
|
|
510
|
-
**/
|
|
511
|
-
createdAtUtcIso: string;
|
|
512
|
-
/** The slug of the document. */
|
|
513
|
-
slug: string;
|
|
514
|
-
/** The name of the document. */
|
|
515
|
-
name: string;
|
|
516
|
-
/** The branch of this document. */
|
|
517
|
-
branch: string;
|
|
518
|
-
/**
|
|
519
|
-
* The revision of each scope of the document. This object is updated every
|
|
520
|
-
* time any _other_ scope is updated.
|
|
521
|
-
*/
|
|
522
|
-
revision: {
|
|
523
|
-
[scope: string]: number;
|
|
524
|
-
};
|
|
525
|
-
/**
|
|
526
|
-
* The timestamp of the last change in the document, in UTC ISO format.
|
|
527
|
-
**/
|
|
528
|
-
lastModifiedAtUtcIso: string;
|
|
219
|
+
type StoredScalarDefinition = {
|
|
220
|
+
readonly kind: "powerhouse.scalar";
|
|
221
|
+
readonly formatVersion: 1;
|
|
529
222
|
/**
|
|
530
|
-
*
|
|
531
|
-
*
|
|
532
|
-
*
|
|
533
|
-
* Examples of protocols include:
|
|
534
|
-
*
|
|
535
|
-
* - "base-reducer"
|
|
223
|
+
* Any GraphQL name. A catalog scalar uses a `PowerhouseScalarName`; a
|
|
224
|
+
* package scalar uses any other name that is not a GraphQL built-in.
|
|
536
225
|
*/
|
|
537
|
-
|
|
538
|
-
|
|
226
|
+
readonly name: string;
|
|
227
|
+
readonly representation: ScalarRepresentation;
|
|
228
|
+
readonly description: string;
|
|
229
|
+
readonly coercion: {
|
|
230
|
+
readonly source: "derived" | "explicit";
|
|
539
231
|
};
|
|
540
|
-
|
|
541
|
-
meta?: PHDocumentMeta;
|
|
232
|
+
readonly coercionProfile: ScalarValidationProfile;
|
|
542
233
|
};
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
*
|
|
546
|
-
* @remarks
|
|
547
|
-
* This type is extended by all Document models.
|
|
548
|
-
*
|
|
549
|
-
* @typeParam TState - The type of the document state.
|
|
550
|
-
*/
|
|
551
|
-
type PHDocument$1<TState extends PHBaseState = PHBaseState> = {
|
|
552
|
-
/** The header of the document. */
|
|
553
|
-
header: PHDocumentHeader;
|
|
554
|
-
/** The document model specific state. */
|
|
555
|
-
state: TState;
|
|
556
|
-
/**
|
|
557
|
-
* The initial state of the document, enabling replaying operations.
|
|
558
|
-
*
|
|
559
|
-
* This will be removed in a future release.
|
|
560
|
-
*/
|
|
561
|
-
initialState: TState;
|
|
562
|
-
/**
|
|
563
|
-
* The operations history of the document.
|
|
564
|
-
*
|
|
565
|
-
* Only documents built by reducers carry it. Documents read from a reactor,
|
|
566
|
-
* such as an editor's `document` in Connect, have an empty array per scope;
|
|
567
|
-
* read their history with `useDocumentOperations(document.header.id, scope)`
|
|
568
|
-
* and their operation count with `header.revision[scope]`.
|
|
569
|
-
*
|
|
570
|
-
* This will be removed in a future release.
|
|
571
|
-
*/
|
|
572
|
-
operations: DocumentOperations;
|
|
234
|
+
type ScalarTypeReferenceDefinition = {
|
|
235
|
+
readonly kind: "scalar";
|
|
573
236
|
/**
|
|
574
|
-
* A
|
|
575
|
-
*
|
|
576
|
-
* This will be removed in a future release.
|
|
237
|
+
* A `ScalarName`, or a package scalar that the enclosing definition's
|
|
238
|
+
* `scalars` list declares.
|
|
577
239
|
*/
|
|
578
|
-
|
|
240
|
+
readonly name: string;
|
|
241
|
+
readonly required: boolean;
|
|
579
242
|
};
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
}>(op: Partial<TOp>): boolean;
|
|
585
|
-
declare function isUndoRedo(action: Action): action is UndoRedoAction;
|
|
586
|
-
declare function isUndo(action: Action): action is UndoAction;
|
|
587
|
-
/**
|
|
588
|
-
* Creates a new document. When `documentType` is given the header is stamped
|
|
589
|
-
* with it and the document-scope operations are seeded. Without
|
|
590
|
-
* `protocolVersions` the document is v2-required and takes a derived id; with
|
|
591
|
-
* them it is v2-required only if they say so (see {@link protocolVersionsFor}).
|
|
592
|
-
*/
|
|
593
|
-
declare function baseCreateDocument<TState extends PHBaseState = PHBaseState>(createState: CreateState<TState>, initialState?: Partial<TState>, documentType?: string, protocolVersions?: ProtocolVersions): PHDocument$1<TState>;
|
|
594
|
-
/**
|
|
595
|
-
* `document`, not yet created, under a fresh header for `policy`. A legacy
|
|
596
|
-
* header takes `id` when given; a v2-required one ignores `id` and derives its
|
|
597
|
-
* own, so a caller that needs a fixed id must ask for legacy.
|
|
598
|
-
* `protocolVersions` are merged over the document's. Name, slug, branch and
|
|
599
|
-
* meta carry over. A document already under `policy` is returned as is unless
|
|
600
|
-
* a legacy `id` or `protocolVersions` are given.
|
|
601
|
-
*/
|
|
602
|
-
declare function withSignaturePolicy<TDocument extends PHDocument$1>(document: TDocument, policy: SignaturePolicy$1, options?: {
|
|
603
|
-
id?: string;
|
|
604
|
-
protocolVersions?: ProtocolVersions;
|
|
605
|
-
}): TDocument;
|
|
606
|
-
declare function hashDocumentStateForScope(document: {
|
|
607
|
-
state: {
|
|
608
|
-
[key: string]: unknown;
|
|
609
|
-
};
|
|
610
|
-
}, scope?: string): string;
|
|
611
|
-
declare function readOnly<T>(value: T): Readonly<T>;
|
|
612
|
-
/**
|
|
613
|
-
* Maps skipped operations in an array of operations.
|
|
614
|
-
* Skipped operations are operations that are ignored during processing.
|
|
615
|
-
* @param operations - The array of operations to map.
|
|
616
|
-
* @param skippedHeadOperations - The number of operations to skip at the head of the array of operations.
|
|
617
|
-
* @returns An array of mapped operations with ignore flag indicating if the operation is skipped.
|
|
618
|
-
* @throws Error if the operation index is invalid and there are missing operations.
|
|
619
|
-
*/
|
|
620
|
-
declare function mapSkippedOperations(operations: Operation[], skippedHeadOperations?: number): MappedOperation[];
|
|
621
|
-
/**
|
|
622
|
-
* V2 version of mapSkippedOperations for protocol version 2+.
|
|
623
|
-
* In V2, all NOOPs have skip=1 and consecutive NOOPs form chains.
|
|
624
|
-
* N consecutive NOOPs at any point skip N preceding content operations.
|
|
625
|
-
*
|
|
626
|
-
* Algorithm: Process from end to start
|
|
627
|
-
* - When hitting a NOOP: increment chain length, mark as ignored
|
|
628
|
-
* - When hitting a non-NOOP:
|
|
629
|
-
* - If chain > 0: decrement chain, mark as ignored (this op was undone)
|
|
630
|
-
* - If chain == 0: mark as not ignored (apply this op)
|
|
631
|
-
*/
|
|
632
|
-
declare function mapSkippedOperationsV2(operations: Operation[]): MappedOperation[];
|
|
633
|
-
/**
|
|
634
|
-
* V2 garbage collect that returns only operations that should be applied for state.
|
|
635
|
-
* Uses the V2 model where consecutive NOOPs form chains.
|
|
636
|
-
* Unlike V1 garbageCollect, this preserves ALL operations but marks which to apply.
|
|
637
|
-
*/
|
|
638
|
-
declare function garbageCollectV2<TOpIndex extends OperationIndex>(sortedOperations: TOpIndex[]): TOpIndex[];
|
|
639
|
-
declare function sortMappedOperations(operations: DocumentOperationsIgnoreMap): MappedOperation[];
|
|
640
|
-
/**
|
|
641
|
-
* Records an operation in the history without applying it, which is what a
|
|
642
|
-
* denied operation needs: it occupies its index and contributes no state.
|
|
643
|
-
*
|
|
644
|
-
* The scope defaults to the action's own, and is passed explicitly by a rebuild
|
|
645
|
-
* that is walking one stream and does not want to trust the action's copy.
|
|
646
|
-
*/
|
|
647
|
-
declare function appendWithoutApplying<TState extends PHBaseState>(document: PHDocument$1<TState>, operation: Operation, scope?: string): PHDocument$1<TState>;
|
|
648
|
-
/** The state reducer base-reducer 3 derives with; throws when `reducer` wraps none. */
|
|
649
|
-
declare function requireStateReducer<TState extends PHBaseState = PHBaseState>(reducer: Reducer<TState>, documentType: string, version?: number): StateReducer<TState>;
|
|
650
|
-
/** Rejects the index gaps the reducer rejects when it appends a replayed row. */
|
|
651
|
-
declare function assertReplayIndices(operations: readonly Operation[]): void;
|
|
652
|
-
declare function appendRows<TState extends PHBaseState>(document: PHDocument$1<TState>, scope: string, rows: readonly Operation[]): PHDocument$1<TState>;
|
|
653
|
-
declare function replayDocument<TState extends PHBaseState = PHBaseState>(initialState: TState, operations: DocumentOperations, reducer: Reducer<TState>, header: PHDocumentHeader, dispatch?: SignalDispatch, skipHeaderOperations?: SkipHeaderOperations, options?: ReplayDocumentOptions): PHDocument$1<TState>;
|
|
654
|
-
declare function parseResultingState<TState>(state: string | null | undefined): TState;
|
|
655
|
-
declare enum IntegrityIssueType {
|
|
656
|
-
UNEXPECTED_INDEX = "UNEXPECTED_INDEX"
|
|
657
|
-
}
|
|
658
|
-
declare enum IntegrityIssueSubType {
|
|
659
|
-
DUPLICATED_INDEX = "DUPLICATED_INDEX",
|
|
660
|
-
MISSING_INDEX = "MISSING_INDEX"
|
|
661
|
-
}
|
|
662
|
-
type IntegrityIssue = {
|
|
663
|
-
operation: OperationIndex;
|
|
664
|
-
issue: IntegrityIssueType;
|
|
665
|
-
category: IntegrityIssueSubType;
|
|
666
|
-
message: string;
|
|
243
|
+
type NamedTypeReferenceDefinition = {
|
|
244
|
+
readonly kind: "named";
|
|
245
|
+
readonly name: string;
|
|
246
|
+
readonly required: boolean;
|
|
667
247
|
};
|
|
668
|
-
type
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
declare function reshuffleByTimestampAndIndex<TOp extends OperationIndex>(startIndex: OperationIndex, opsA: TOp[], opsB: TOp[]): TOp[];
|
|
673
|
-
declare function operationsAreEqual<TOp extends {
|
|
674
|
-
index: number;
|
|
675
|
-
skip: number;
|
|
676
|
-
type?: string;
|
|
677
|
-
scope?: string;
|
|
678
|
-
input?: unknown;
|
|
679
|
-
}>(op1: TOp, op2: TOp): boolean;
|
|
680
|
-
declare function attachBranch(trunk: Operation[], newBranch: Operation[]): [Operation[], Operation[]];
|
|
681
|
-
declare function precedes(op1: OperationIndex, op2: OperationIndex): boolean;
|
|
682
|
-
declare function split(sortedTargetOperations: Operation[], sortedMergeOperations: Operation[]): [Operation[], Operation[], Operation[]];
|
|
683
|
-
declare function merge(sortedTargetOperations: Operation[], sortedMergeOperations: Operation[], reshuffle: Reshuffle): Operation[];
|
|
684
|
-
declare function checkOperationsIntegrity(operations: Operation[]): IntegrityIssue[];
|
|
685
|
-
declare function groupOperationsByScope(operations: Operation[]): Partial<Record<string, Operation[]>>;
|
|
686
|
-
type PrepareOperationsResult = {
|
|
687
|
-
validOperations: Operation[];
|
|
688
|
-
invalidOperations: Operation[];
|
|
689
|
-
duplicatedOperations: Operation[];
|
|
690
|
-
integrityIssues: IntegrityIssue[];
|
|
248
|
+
type ListTypeReferenceDefinition = {
|
|
249
|
+
readonly kind: "list";
|
|
250
|
+
readonly required: boolean;
|
|
251
|
+
readonly item: TypeReferenceDefinition;
|
|
691
252
|
};
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
* @param skipHeaderOperation - The skip header operation index.
|
|
699
|
-
* @returns The remaining operations after skipping header operations.
|
|
700
|
-
*/
|
|
701
|
-
declare function skipHeaderOperations(operations: Operation[], skipHeaderOperation: SkipHeaderOperationIndex): Operation[];
|
|
702
|
-
declare function garbageCollectDocumentOperations(documentOperations: DocumentOperations): DocumentOperations;
|
|
703
|
-
/**
|
|
704
|
-
* Filters out duplicated operations from the target operations array based on their IDs.
|
|
705
|
-
* If an operation has an ID, it is considered duplicated if there is another operation in the source operations array with the same ID.
|
|
706
|
-
* If an operation does not have an ID, it is considered unique and will not be filtered out.
|
|
707
|
-
* @param targetOperations - The array of target operations to filter.
|
|
708
|
-
* @param sourceOperations - The array of source operations to compare against.
|
|
709
|
-
* @returns An array of operations with duplicates filtered out.
|
|
710
|
-
*/
|
|
711
|
-
declare function filterDuplicatedOperations<T extends {
|
|
712
|
-
id?: string | number;
|
|
713
|
-
}>(targetOperations: T[], sourceOperations: T[]): T[];
|
|
714
|
-
declare function filterDocumentOperationsResultingState(documentOperations?: DocumentOperations): {
|
|
715
|
-
[x: string]: Operation[] | {
|
|
716
|
-
id: string;
|
|
717
|
-
index: number;
|
|
718
|
-
skip: number;
|
|
719
|
-
timestampUtcMs: string;
|
|
720
|
-
hash: string;
|
|
721
|
-
error?: string;
|
|
722
|
-
errorName?: string;
|
|
723
|
-
errorCode?: string;
|
|
724
|
-
deniedReason?: string;
|
|
725
|
-
action: Action;
|
|
253
|
+
type TypeReferenceDefinition = ScalarTypeReferenceDefinition | NamedTypeReferenceDefinition | ListTypeReferenceDefinition;
|
|
254
|
+
type DirectiveUseDefinition = {
|
|
255
|
+
readonly name: string;
|
|
256
|
+
readonly arguments: readonly {
|
|
257
|
+
readonly name: string;
|
|
258
|
+
readonly value: JsonValue;
|
|
726
259
|
}[];
|
|
727
260
|
};
|
|
261
|
+
type FieldDefinition = {
|
|
262
|
+
readonly key: string;
|
|
263
|
+
readonly name: string;
|
|
264
|
+
readonly description: string | null;
|
|
265
|
+
readonly deprecated: string | null;
|
|
266
|
+
readonly args?: readonly InputFieldDefinition[];
|
|
267
|
+
readonly type: TypeReferenceDefinition;
|
|
268
|
+
readonly directives?: readonly DirectiveUseDefinition[];
|
|
269
|
+
};
|
|
270
|
+
type InputFieldDefinition = Omit<FieldDefinition, "args"> & ({
|
|
271
|
+
readonly defaultValue?: never;
|
|
272
|
+
} | {
|
|
273
|
+
readonly defaultValue: JsonValue;
|
|
274
|
+
});
|
|
275
|
+
type EnumValueDefinition = {
|
|
276
|
+
readonly name: string;
|
|
277
|
+
readonly description: string | null;
|
|
278
|
+
readonly deprecated: string | null;
|
|
279
|
+
readonly directives?: readonly DirectiveUseDefinition[];
|
|
280
|
+
};
|
|
281
|
+
type EnumTypeDefinition = {
|
|
282
|
+
readonly kind: "enum";
|
|
283
|
+
readonly name: string;
|
|
284
|
+
readonly description: string | null;
|
|
285
|
+
readonly values: readonly EnumValueDefinition[];
|
|
286
|
+
};
|
|
287
|
+
type ObjectTypeDefinition = {
|
|
288
|
+
readonly kind: "object";
|
|
289
|
+
readonly name: string;
|
|
290
|
+
readonly description: string | null;
|
|
291
|
+
readonly implements?: readonly string[];
|
|
292
|
+
readonly fields: readonly FieldDefinition[];
|
|
293
|
+
};
|
|
294
|
+
type InterfaceTypeDefinition = {
|
|
295
|
+
readonly kind: "interface";
|
|
296
|
+
readonly name: string;
|
|
297
|
+
readonly description: string | null;
|
|
298
|
+
readonly implements?: readonly string[];
|
|
299
|
+
readonly fields: readonly FieldDefinition[];
|
|
300
|
+
};
|
|
301
|
+
type InputTypeDefinition = {
|
|
302
|
+
readonly kind: "input";
|
|
303
|
+
readonly name: string;
|
|
304
|
+
readonly description: string | null;
|
|
305
|
+
readonly unknownKeys: "preserve" | "reject";
|
|
306
|
+
readonly fields: readonly InputFieldDefinition[];
|
|
307
|
+
};
|
|
308
|
+
type UnionTypeDefinition = {
|
|
309
|
+
readonly kind: "union";
|
|
310
|
+
readonly name: string;
|
|
311
|
+
readonly description: string | null;
|
|
312
|
+
readonly members: readonly string[];
|
|
313
|
+
};
|
|
314
|
+
type NamedGraphQLTypeDefinition = EnumTypeDefinition | ObjectTypeDefinition | InterfaceTypeDefinition | InputTypeDefinition | UnionTypeDefinition;
|
|
315
|
+
type CatalogScalarImplementationReference<TName extends CatalogScalarName> = { [Name in TName]: {
|
|
316
|
+
readonly name: Name;
|
|
317
|
+
readonly implementation: `powerhouse.catalog#${Name}`;
|
|
318
|
+
}; }[TName];
|
|
319
|
+
type CatalogScalarReferenceDefinition = CatalogScalarImplementationReference<PowerhouseScalarName> & {
|
|
320
|
+
readonly coercionProfile: ScalarValidationProfile;
|
|
321
|
+
};
|
|
728
322
|
/**
|
|
729
|
-
*
|
|
730
|
-
* Returns an array of operations that are present in `clearedOperationsA` but not in `clearedOperationsB`.
|
|
731
|
-
*
|
|
732
|
-
* @template TOp - The type of the operations.
|
|
733
|
-
* @param {TOp[]} clearedOperationsA - The first array of operations.
|
|
734
|
-
* @param {TOp[]} clearedOperationsB - The second array of operations.
|
|
735
|
-
* @returns {TOp[]} - The difference between the two arrays of operations.
|
|
736
|
-
*/
|
|
737
|
-
declare function diffOperations<TOp extends OperationIndex>(clearedOperationsA: TOp[], clearedOperationsB: TOp[]): TOp[];
|
|
738
|
-
declare function getDocumentLastModified(document: PHDocument$1): string;
|
|
739
|
-
/** `revision` with a 0 for each scope of `state` it lacks; auth is not a model scope, so it is left out. */
|
|
740
|
-
declare function withScopeRevisions(revision: PHDocumentHeader["revision"], state: object): PHDocumentHeader["revision"];
|
|
741
|
-
/**
|
|
742
|
-
* Updates the document header with the latest revision number and
|
|
743
|
-
* date of last modification.
|
|
744
|
-
*
|
|
745
|
-
* @param document The current state of the document.
|
|
746
|
-
* @param scope The scope of the operation.
|
|
747
|
-
* @param lastModifiedTimestamp Optional timestamp to use directly, avoiding a scan of all operations.
|
|
748
|
-
* @returns The updated document state.
|
|
749
|
-
*/
|
|
750
|
-
declare function updateHeaderRevision(document: PHDocument$1, scope: string, lastModifiedTimestamp?: string): PHDocument$1;
|
|
751
|
-
//#endregion
|
|
752
|
-
//#region document-model/actions.d.ts
|
|
753
|
-
/**
|
|
754
|
-
* Cancels the last `count` operations.
|
|
755
|
-
*
|
|
756
|
-
* @param count - Number of operations to cancel
|
|
757
|
-
* @category Actions
|
|
758
|
-
*/
|
|
759
|
-
declare const undo: (count?: number, scope?: string) => UndoAction;
|
|
760
|
-
/**
|
|
761
|
-
* Cancels the last `count` {@link undo | UNDO} operations.
|
|
762
|
-
*
|
|
763
|
-
* @param count - Number of UNDO operations to cancel
|
|
764
|
-
* @category Actions
|
|
765
|
-
*/
|
|
766
|
-
declare const redo: (count?: number, scope?: string) => RedoAction;
|
|
767
|
-
declare const noop: (scope?: string) => NOOPAction;
|
|
768
|
-
/**
|
|
769
|
-
* Retracts the action with id `target` on base-reducer 3.
|
|
770
|
-
*
|
|
771
|
-
* @category Actions
|
|
772
|
-
*/
|
|
773
|
-
declare const retract: (target: string, scope?: string) => RetractAction;
|
|
774
|
-
/**
|
|
775
|
-
* Helper function to be used by action creators.
|
|
776
|
-
*
|
|
777
|
-
* @remarks
|
|
778
|
-
* Creates an action with the given type and input properties. The input
|
|
779
|
-
* properties default to an empty object.
|
|
780
|
-
*
|
|
781
|
-
* @typeParam A - Type of the action to be returned.
|
|
782
|
-
*
|
|
783
|
-
* @param type - The type of the action.
|
|
784
|
-
* @param input - The input properties of the action.
|
|
785
|
-
* @param _attachments - Deprecated and ignored. Retained so action creators
|
|
786
|
-
* generated before the attachment-system removal keep their 5-argument shape.
|
|
787
|
-
* @param validator - The validator to use for the input properties.
|
|
788
|
-
* @param scope - The scope of the action, can either be 'global' or 'local'.
|
|
789
|
-
*
|
|
790
|
-
* @throws Error if the type is empty or not a string.
|
|
791
|
-
*
|
|
792
|
-
* @returns The new action.
|
|
793
|
-
*/
|
|
794
|
-
declare function createAction<TAction extends Action>(type: TAction["type"], input?: TAction["input"], _attachments?: unknown, validator?: () => {
|
|
795
|
-
parse(v: unknown): TAction["input"];
|
|
796
|
-
}, scope?: Action["scope"]): TAction;
|
|
797
|
-
/**
|
|
798
|
-
* This function should be used instead of { ...action } to ensure
|
|
799
|
-
* that extra properties are not included in the action.
|
|
323
|
+
* The package that ships the definition declares this scalar with `defineScalar`.
|
|
800
324
|
*/
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
declare const actionSigner: (user: UserActionSigner, app: AppActionSigner, signatures?: Signature[]) => ActionSigner;
|
|
807
|
-
declare function buildOperationSignature(context: ActionSignatureContext, signMethod: ActionSigningHandler): Promise<Signature>;
|
|
808
|
-
/** @deprecated Emits a legacy SHA-1 tuple; sign through `ISigner.signAction`. */
|
|
809
|
-
declare function buildSignedAction<TState extends PHBaseState = PHBaseState>(action: Action, reducer: Reducer<TState>, document: PHDocument$1<TState>, signer: ActionSigner, signHandler: ActionSigningHandler): Promise<Operation>;
|
|
810
|
-
/** @deprecated Use `verifyActionSignature` from `@powerhousedao/reactor`. */
|
|
811
|
-
declare function verifyOperationSignature(signature: Signature, signer: Omit<ActionSigner, "signatures">, verifyHandler: ActionVerificationHandler): Promise<boolean>;
|
|
812
|
-
/**
|
|
813
|
-
* Changes the name of the document.
|
|
814
|
-
*
|
|
815
|
-
* @param name - The name to be set in the document.
|
|
816
|
-
* @category Actions
|
|
817
|
-
*/
|
|
818
|
-
declare const setName: (name: string | {
|
|
819
|
-
name: string;
|
|
820
|
-
}) => SetNameAction;
|
|
821
|
-
/**
|
|
822
|
-
* Changes the preferred editor recorded in the document header meta.
|
|
823
|
-
*
|
|
824
|
-
* Passing `null` clears the preferred editor.
|
|
825
|
-
*
|
|
826
|
-
* @category Actions
|
|
827
|
-
*/
|
|
828
|
-
declare const setPreferredEditor: (input: string | null | {
|
|
829
|
-
preferredEditor: string | null;
|
|
830
|
-
}) => SetPreferredEditorAction;
|
|
831
|
-
/**
|
|
832
|
-
* Gives the document a slug, its name on the reactor that serves it. The last
|
|
833
|
-
* document to claim a slug holds it.
|
|
834
|
-
*
|
|
835
|
-
* @category Actions
|
|
836
|
-
*/
|
|
837
|
-
declare const setSlug: (slug: string) => SetSlugAction;
|
|
838
|
-
declare const setModelName: (input: SetModelNameInput) => SetModelNameAction;
|
|
839
|
-
declare const setModelId: (input: SetModelIdInput) => SetModelIdAction;
|
|
840
|
-
declare const setModelExtension: (input: SetModelExtensionInput) => SetModelExtensionAction;
|
|
841
|
-
declare const setModelDescription: (input: SetModelDescriptionInput) => SetModelDescriptionAction;
|
|
842
|
-
declare const setAuthorName: (input: SetAuthorNameInput) => SetAuthorNameAction;
|
|
843
|
-
declare const setAuthorWebsite: (input: SetAuthorWebsiteInput) => SetAuthorWebsiteAction;
|
|
844
|
-
declare const addModule: (input: AddModuleInput) => AddModuleAction;
|
|
845
|
-
declare const setModuleName: (input: SetModuleNameInput) => SetModuleNameAction;
|
|
846
|
-
declare const setModuleDescription: (input: SetModuleDescriptionInput) => SetModuleDescriptionAction;
|
|
847
|
-
declare const deleteModule: (input: DeleteModuleInput) => DeleteModuleAction;
|
|
848
|
-
declare const reorderModules: (input: ReorderModulesInput) => ReorderModulesAction;
|
|
849
|
-
declare const addOperation: (input: AddOperationInput) => AddOperationAction;
|
|
850
|
-
declare const setOperationName: (input: SetOperationNameInput) => SetOperationNameAction;
|
|
851
|
-
declare const setOperationScope: (input: SetOperationScopeInput) => SetOperationScopeAction;
|
|
852
|
-
declare const setOperationSchema: (input: SetOperationSchemaInput) => SetOperationSchemaAction;
|
|
853
|
-
declare const setOperationDescription: (input: SetOperationDescriptionInput) => SetOperationDescriptionAction;
|
|
854
|
-
declare const setOperationTemplate: (input: SetOperationTemplateInput) => SetOperationTemplateAction;
|
|
855
|
-
declare const setOperationReducer: (input: SetOperationReducerInput) => SetOperationReducerAction;
|
|
856
|
-
declare const moveOperation: (input: MoveOperationInput) => MoveOperationAction;
|
|
857
|
-
declare const deleteOperation: (input: DeleteOperationInput) => DeleteOperationAction;
|
|
858
|
-
declare const reorderModuleOperations: (input: ReorderModuleOperationsInput) => ReorderModuleOperationsAction;
|
|
859
|
-
declare const addOperationError: (input: AddOperationErrorInput) => AddOperationErrorAction;
|
|
860
|
-
declare const setOperationErrorCode: (input: SetOperationErrorCodeInput) => SetOperationErrorCodeAction;
|
|
861
|
-
declare const setOperationErrorName: (input: SetOperationErrorNameInput) => SetOperationErrorNameAction;
|
|
862
|
-
declare const setOperationErrorDescription: (input: SetOperationErrorDescriptionInput) => SetOperationErrorDescriptionAction;
|
|
863
|
-
declare const setOperationErrorTemplate: (input: SetOperationErrorTemplateInput) => SetOperationErrorTemplateAction;
|
|
864
|
-
declare const deleteOperationError: (input: DeleteOperationErrorInput) => DeleteOperationErrorAction;
|
|
865
|
-
declare const reorderOperationErrors: (input: ReorderOperationErrorsInput) => ReorderOperationErrorsAction;
|
|
866
|
-
declare const addOperationExample: (input: AddOperationExampleInput) => AddOperationExampleAction;
|
|
867
|
-
declare const updateOperationExample: (input: UpdateOperationExampleInput) => UpdateOperationExampleAction;
|
|
868
|
-
declare const deleteOperationExample: (input: DeleteOperationExampleInput) => DeleteOperationExampleAction;
|
|
869
|
-
declare const reorderOperationExamples: (input: ReorderOperationExamplesInput) => ReorderOperationExamplesAction;
|
|
870
|
-
declare const operationExampleCreators: {
|
|
871
|
-
addOperationExample: typeof addOperationExample;
|
|
872
|
-
updateOperationExample: typeof updateOperationExample;
|
|
873
|
-
deleteOperationExample: typeof deleteOperationExample;
|
|
874
|
-
reorderOperationExamples: typeof reorderOperationExamples;
|
|
875
|
-
};
|
|
876
|
-
declare const setStateSchema: (input: SetStateSchemaInput) => SetStateSchemaAction;
|
|
877
|
-
declare const setInitialState: (input: SetInitialStateInput) => SetInitialStateAction;
|
|
878
|
-
declare const addStateExample: (input: AddStateExampleInput) => AddStateExampleAction;
|
|
879
|
-
declare const updateStateExample: (input: UpdateStateExampleInput) => UpdateStateExampleAction;
|
|
880
|
-
declare const deleteStateExample: (input: DeleteStateExampleInput) => DeleteStateExampleAction;
|
|
881
|
-
declare const reorderStateExamples: (input: ReorderStateExamplesInput) => ReorderStateExamplesAction;
|
|
882
|
-
declare const addChangeLogItem: (input: AddChangeLogItemInput) => AddChangeLogItemAction;
|
|
883
|
-
declare const updateChangeLogItem: (input: UpdateChangeLogItemInput) => UpdateChangeLogItemAction;
|
|
884
|
-
declare const deleteChangeLogItem: (input: DeleteChangeLogItemInput) => DeleteChangeLogItemAction;
|
|
885
|
-
declare const reorderChangeLogItems: (input: ReorderChangeLogItemsInput) => ReorderChangeLogItemsAction;
|
|
886
|
-
declare const releaseNewVersion: () => ReleaseNewVersionAction;
|
|
887
|
-
declare const baseActions: {
|
|
888
|
-
setName: typeof setName;
|
|
889
|
-
setPreferredEditor: typeof setPreferredEditor;
|
|
890
|
-
setSlug: typeof setSlug;
|
|
891
|
-
undo: typeof undo;
|
|
892
|
-
redo: typeof redo;
|
|
893
|
-
noop: typeof noop;
|
|
325
|
+
type PackageScalarReferenceDefinition = {
|
|
326
|
+
readonly name: string;
|
|
327
|
+
readonly implementation: `package#${string}`;
|
|
328
|
+
readonly coercionProfile: ScalarValidationProfile;
|
|
329
|
+
readonly definition: StoredScalarDefinition;
|
|
894
330
|
};
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
setAuthorName: typeof setAuthorName;
|
|
901
|
-
setAuthorWebsite: typeof setAuthorWebsite;
|
|
902
|
-
addModule: typeof addModule;
|
|
903
|
-
setModuleName: typeof setModuleName;
|
|
904
|
-
setModuleDescription: typeof setModuleDescription;
|
|
905
|
-
deleteModule: typeof deleteModule;
|
|
906
|
-
reorderModules: typeof reorderModules;
|
|
907
|
-
addOperation: typeof addOperation;
|
|
908
|
-
setOperationName: typeof setOperationName;
|
|
909
|
-
setOperationScope: typeof setOperationScope;
|
|
910
|
-
setOperationSchema: typeof setOperationSchema;
|
|
911
|
-
setOperationDescription: typeof setOperationDescription;
|
|
912
|
-
setOperationTemplate: typeof setOperationTemplate;
|
|
913
|
-
setOperationReducer: typeof setOperationReducer;
|
|
914
|
-
moveOperation: typeof moveOperation;
|
|
915
|
-
deleteOperation: typeof deleteOperation;
|
|
916
|
-
reorderModuleOperations: typeof reorderModuleOperations;
|
|
917
|
-
addOperationError: typeof addOperationError;
|
|
918
|
-
setOperationErrorCode: typeof setOperationErrorCode;
|
|
919
|
-
setOperationErrorName: typeof setOperationErrorName;
|
|
920
|
-
setOperationErrorDescription: typeof setOperationErrorDescription;
|
|
921
|
-
setOperationErrorTemplate: typeof setOperationErrorTemplate;
|
|
922
|
-
deleteOperationError: typeof deleteOperationError;
|
|
923
|
-
reorderOperationErrors: typeof reorderOperationErrors;
|
|
924
|
-
addOperationExample: typeof addOperationExample;
|
|
925
|
-
updateOperationExample: typeof updateOperationExample;
|
|
926
|
-
deleteOperationExample: typeof deleteOperationExample;
|
|
927
|
-
reorderOperationExamples: typeof reorderOperationExamples;
|
|
928
|
-
setStateSchema: typeof setStateSchema;
|
|
929
|
-
setInitialState: typeof setInitialState;
|
|
930
|
-
addStateExample: typeof addStateExample;
|
|
931
|
-
updateStateExample: typeof updateStateExample;
|
|
932
|
-
deleteStateExample: typeof deleteStateExample;
|
|
933
|
-
reorderStateExamples: typeof reorderStateExamples;
|
|
934
|
-
addChangeLogItem: typeof addChangeLogItem;
|
|
935
|
-
updateChangeLogItem: typeof updateChangeLogItem;
|
|
936
|
-
deleteChangeLogItem: typeof deleteChangeLogItem;
|
|
937
|
-
reorderChangeLogItems: typeof reorderChangeLogItems;
|
|
938
|
-
releaseNewVersion: typeof releaseNewVersion;
|
|
331
|
+
type DocumentScalarReferenceDefinition = CatalogScalarReferenceDefinition | PackageScalarReferenceDefinition;
|
|
332
|
+
type DefinitionExample = {
|
|
333
|
+
readonly id: string;
|
|
334
|
+
readonly key: string;
|
|
335
|
+
readonly value: string;
|
|
939
336
|
};
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
undo: typeof undo;
|
|
945
|
-
redo: typeof redo;
|
|
946
|
-
noop: typeof noop;
|
|
947
|
-
setModelName: typeof setModelName;
|
|
948
|
-
setModelId: typeof setModelId;
|
|
949
|
-
setModelExtension: typeof setModelExtension;
|
|
950
|
-
setModelDescription: typeof setModelDescription;
|
|
951
|
-
setAuthorName: typeof setAuthorName;
|
|
952
|
-
setAuthorWebsite: typeof setAuthorWebsite;
|
|
953
|
-
addModule: typeof addModule;
|
|
954
|
-
setModuleName: typeof setModuleName;
|
|
955
|
-
setModuleDescription: typeof setModuleDescription;
|
|
956
|
-
deleteModule: typeof deleteModule;
|
|
957
|
-
reorderModules: typeof reorderModules;
|
|
958
|
-
addOperation: typeof addOperation;
|
|
959
|
-
setOperationName: typeof setOperationName;
|
|
960
|
-
setOperationScope: typeof setOperationScope;
|
|
961
|
-
setOperationSchema: typeof setOperationSchema;
|
|
962
|
-
setOperationDescription: typeof setOperationDescription;
|
|
963
|
-
setOperationTemplate: typeof setOperationTemplate;
|
|
964
|
-
setOperationReducer: typeof setOperationReducer;
|
|
965
|
-
moveOperation: typeof moveOperation;
|
|
966
|
-
deleteOperation: typeof deleteOperation;
|
|
967
|
-
reorderModuleOperations: typeof reorderModuleOperations;
|
|
968
|
-
addOperationError: typeof addOperationError;
|
|
969
|
-
setOperationErrorCode: typeof setOperationErrorCode;
|
|
970
|
-
setOperationErrorName: typeof setOperationErrorName;
|
|
971
|
-
setOperationErrorDescription: typeof setOperationErrorDescription;
|
|
972
|
-
setOperationErrorTemplate: typeof setOperationErrorTemplate;
|
|
973
|
-
deleteOperationError: typeof deleteOperationError;
|
|
974
|
-
reorderOperationErrors: typeof reorderOperationErrors;
|
|
975
|
-
addOperationExample: typeof addOperationExample;
|
|
976
|
-
updateOperationExample: typeof updateOperationExample;
|
|
977
|
-
deleteOperationExample: typeof deleteOperationExample;
|
|
978
|
-
reorderOperationExamples: typeof reorderOperationExamples;
|
|
979
|
-
setStateSchema: typeof setStateSchema;
|
|
980
|
-
setInitialState: typeof setInitialState;
|
|
981
|
-
addStateExample: typeof addStateExample;
|
|
982
|
-
updateStateExample: typeof updateStateExample;
|
|
983
|
-
deleteStateExample: typeof deleteStateExample;
|
|
984
|
-
reorderStateExamples: typeof reorderStateExamples;
|
|
985
|
-
addChangeLogItem: typeof addChangeLogItem;
|
|
986
|
-
updateChangeLogItem: typeof updateChangeLogItem;
|
|
987
|
-
deleteChangeLogItem: typeof deleteChangeLogItem;
|
|
988
|
-
reorderChangeLogItems: typeof reorderChangeLogItems;
|
|
989
|
-
releaseNewVersion: typeof releaseNewVersion;
|
|
337
|
+
type MaterializedStateDefinition = {
|
|
338
|
+
readonly schema: string;
|
|
339
|
+
readonly initialValue: string;
|
|
340
|
+
readonly examples: readonly Omit<DefinitionExample, "key">[];
|
|
990
341
|
};
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
/** The hash of the previous operation, showing intended state. */
|
|
998
|
-
prevOpHash?: string;
|
|
999
|
-
/** A nonce, to cover specific signing attacks and to prevent replay attacks from no-ops. */
|
|
1000
|
-
nonce?: string;
|
|
1001
|
-
/** The signer of the action. */
|
|
1002
|
-
signer?: ActionSigner;
|
|
342
|
+
type NonEmptyStateDefinition = {
|
|
343
|
+
readonly root: NamedTypeReferenceDefinition;
|
|
344
|
+
readonly initialValue: JsonValue;
|
|
345
|
+
readonly examples: readonly DefinitionExample[];
|
|
346
|
+
readonly unknownKeys: "preserve";
|
|
347
|
+
readonly materialized: MaterializedStateDefinition;
|
|
1003
348
|
};
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
/** The timestamp of the action. */
|
|
1013
|
-
timestampUtcMs: string;
|
|
1014
|
-
/** The payload of the action. */
|
|
1015
|
-
input: unknown;
|
|
1016
|
-
/** The scope of the action */
|
|
1017
|
-
scope: string;
|
|
1018
|
-
/** The context of the action. */
|
|
1019
|
-
context?: ActionContext;
|
|
349
|
+
type EmptyLocalStateDefinition = {
|
|
350
|
+
readonly root: null;
|
|
351
|
+
readonly initialValue: Readonly<Record<string, never>>;
|
|
352
|
+
readonly examples: readonly DefinitionExample[];
|
|
353
|
+
readonly unknownKeys: "preserve";
|
|
354
|
+
readonly materialized: MaterializedStateDefinition & {
|
|
355
|
+
readonly schema: "";
|
|
356
|
+
};
|
|
1020
357
|
};
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
358
|
+
type StateDefinition = NonEmptyStateDefinition | EmptyLocalStateDefinition;
|
|
359
|
+
type CompiledErrorDefinition = {
|
|
360
|
+
readonly id: string;
|
|
361
|
+
readonly key: string;
|
|
362
|
+
readonly code: string | null;
|
|
363
|
+
readonly name: string | null;
|
|
364
|
+
readonly description: string | null;
|
|
365
|
+
readonly template: string | null;
|
|
1028
366
|
};
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
367
|
+
type DocumentModelOperationDefinition = {
|
|
368
|
+
readonly id: string;
|
|
369
|
+
readonly key: string;
|
|
370
|
+
readonly name: string | null;
|
|
371
|
+
readonly description: string | null;
|
|
372
|
+
readonly actionType: string;
|
|
373
|
+
readonly creatorKey: string;
|
|
374
|
+
readonly scope: "global" | "local";
|
|
375
|
+
readonly input: InputTypeDefinition | null;
|
|
376
|
+
readonly errors: readonly CompiledErrorDefinition[];
|
|
377
|
+
readonly examples: readonly DefinitionExample[];
|
|
378
|
+
readonly template: string | null;
|
|
379
|
+
readonly reducer: string | null;
|
|
1033
380
|
};
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
type: string;
|
|
1050
|
-
input: unknown;
|
|
1051
|
-
}, documentId: string, branch: string): ActionSigningTarget;
|
|
1052
|
-
/** The identity a signer writes into `context.signer`, and signs over. */
|
|
1053
|
-
declare function actionSignerIdentity(signer: {
|
|
1054
|
-
user?: UserActionSigner;
|
|
1055
|
-
app?: AppActionSigner;
|
|
1056
|
-
}): ActionSignerIdentity;
|
|
1057
|
-
/** The v2 preimage; throws `CanonicalJsonError` on an unsignable action. */
|
|
1058
|
-
declare function actionPreimageV2(action: Action, target: ActionSigningTarget, signer: ActionSignerIdentity): string;
|
|
1059
|
-
/** `"v2:" + base64url(sha256(preimage))`, unpadded. */
|
|
1060
|
-
declare function hashActionV2(action: Action, target: ActionSigningTarget, signer: ActionSignerIdentity): Promise<string>;
|
|
1061
|
-
/** Signs `action` as a v2 tuple; the message layout is the legacy one. */
|
|
1062
|
-
declare function signActionV2(params: {
|
|
1063
|
-
action: Action;
|
|
1064
|
-
target: ActionSigningTarget;
|
|
1065
|
-
signer: ActionSignerIdentity;
|
|
1066
|
-
sign: ActionSigningHandler;
|
|
1067
|
-
previousStateHash?: string;
|
|
1068
|
-
}): Promise<Signature>;
|
|
1069
|
-
/** Element [2] carries the v2 prefix, whether or not it is well formed. */
|
|
1070
|
-
declare function isV2ActionHash(hash: string): boolean;
|
|
1071
|
-
/** The strict shape of a v2 tuple, apart from what its hash covers. */
|
|
1072
|
-
declare function v2TupleProblem(tuple: Signature): string | undefined;
|
|
1073
|
-
//#endregion
|
|
1074
|
-
//#region document-model/action-transport.d.ts
|
|
1075
|
-
/**
|
|
1076
|
-
* An action's signer, as the wire declares it: signatures joined into strings,
|
|
1077
|
-
* because GraphQL declares them as a list of strings rather than of lists.
|
|
1078
|
-
*/
|
|
1079
|
-
type TransportSigner = {
|
|
1080
|
-
user?: {
|
|
1081
|
-
address: string;
|
|
1082
|
-
networkId: string;
|
|
1083
|
-
chainId: number;
|
|
381
|
+
type DocumentModelModuleDefinition = {
|
|
382
|
+
readonly id: string;
|
|
383
|
+
readonly key: string;
|
|
384
|
+
readonly name: string;
|
|
385
|
+
readonly description: string | null;
|
|
386
|
+
readonly operations: readonly DocumentModelOperationDefinition[];
|
|
387
|
+
};
|
|
388
|
+
type DocumentModelSpecificationDefinition = {
|
|
389
|
+
readonly version: number;
|
|
390
|
+
readonly scalars: readonly DocumentScalarReferenceDefinition[];
|
|
391
|
+
readonly graphQLCompatibility: SchemaFirstGraphQLDocumentCompatibility | null;
|
|
392
|
+
readonly types: readonly NamedGraphQLTypeDefinition[];
|
|
393
|
+
readonly state: {
|
|
394
|
+
readonly global: NonEmptyStateDefinition;
|
|
395
|
+
readonly local: StateDefinition;
|
|
1084
396
|
};
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
397
|
+
readonly modules: readonly DocumentModelModuleDefinition[];
|
|
398
|
+
readonly changeLog: readonly string[];
|
|
399
|
+
};
|
|
400
|
+
type DocumentModelDefinition = {
|
|
401
|
+
readonly kind: "powerhouse.document-model";
|
|
402
|
+
readonly formatVersion: 1;
|
|
403
|
+
readonly compatibility: {
|
|
404
|
+
readonly identity: "derived-v1" | "explicit-schema-first";
|
|
405
|
+
readonly scalarCoercion: ScalarValidationProfile;
|
|
406
|
+
readonly serialization: "canonical-v1" | "explicit-schema-first";
|
|
1088
407
|
};
|
|
1089
|
-
|
|
408
|
+
readonly model: {
|
|
409
|
+
readonly documentType: string;
|
|
410
|
+
readonly graphQLName: string;
|
|
411
|
+
readonly name: string;
|
|
412
|
+
readonly description: string;
|
|
413
|
+
readonly extension: string;
|
|
414
|
+
readonly author: {
|
|
415
|
+
readonly name: string;
|
|
416
|
+
readonly website: string | null;
|
|
417
|
+
};
|
|
418
|
+
};
|
|
419
|
+
readonly specifications: readonly DocumentModelSpecificationDefinition[];
|
|
1090
420
|
};
|
|
1091
|
-
|
|
1092
|
-
type
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
421
|
+
type DefinitionCheckProfile = "edit" | "release";
|
|
422
|
+
type DefinitionSourcesConfig = {
|
|
423
|
+
readonly formatVersion: 1;
|
|
424
|
+
} & ({
|
|
425
|
+
readonly mode: "code-first";
|
|
426
|
+
readonly entries: readonly DefinitionSource[];
|
|
427
|
+
} | {
|
|
428
|
+
readonly mode: "schema-first";
|
|
429
|
+
readonly entries?: never;
|
|
430
|
+
});
|
|
431
|
+
type DefinitionCheckRequest = {
|
|
432
|
+
readonly formatVersion: 1;
|
|
433
|
+
readonly profile: DefinitionCheckProfile;
|
|
434
|
+
readonly warningsAsErrors?: boolean;
|
|
435
|
+
} & ({
|
|
436
|
+
readonly sourceMode: "code-first";
|
|
437
|
+
readonly sourceOrigin: "config" | "cli" | "request";
|
|
438
|
+
readonly sources: readonly [DefinitionSource, ...DefinitionSource[]];
|
|
439
|
+
} | {
|
|
440
|
+
readonly sourceMode: "schema-first";
|
|
441
|
+
readonly sourceOrigin: "config";
|
|
442
|
+
readonly sources?: never;
|
|
443
|
+
});
|
|
444
|
+
type DefinitionCompatibilitySelection = {
|
|
445
|
+
readonly identity: "derived-v1" | "explicit-schema-first";
|
|
446
|
+
readonly serialization: "canonical-v1" | "explicit-schema-first";
|
|
447
|
+
readonly paths: {
|
|
448
|
+
readonly ids: readonly string[];
|
|
449
|
+
readonly names: readonly string[];
|
|
450
|
+
readonly serialization: readonly string[];
|
|
451
|
+
};
|
|
1097
452
|
};
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
453
|
+
type DefinitionCheckReport = {
|
|
454
|
+
readonly kind: "powerhouse.definition-check";
|
|
455
|
+
readonly formatVersion: 1;
|
|
456
|
+
readonly profile: DefinitionCheckProfile;
|
|
457
|
+
readonly sourceSet: {
|
|
458
|
+
readonly mode: "code-first" | "schema-first";
|
|
459
|
+
readonly origin: "config" | "cli" | "request";
|
|
460
|
+
readonly digest: Sha256Digest;
|
|
461
|
+
readonly sources: readonly DefinitionSource[];
|
|
462
|
+
};
|
|
463
|
+
readonly definitions: readonly (DefinitionRef & {
|
|
464
|
+
readonly digest?: Sha256Digest;
|
|
465
|
+
readonly source: DefinitionSource;
|
|
466
|
+
readonly compatibility?: DefinitionCompatibilitySelection;
|
|
467
|
+
})[];
|
|
468
|
+
readonly diagnostics: readonly DefinitionDiagnostic[];
|
|
469
|
+
readonly summary: {
|
|
470
|
+
readonly errors: number;
|
|
471
|
+
readonly warnings: number;
|
|
472
|
+
};
|
|
473
|
+
} & ({
|
|
474
|
+
readonly status: "ok" | "invalid" | "failed";
|
|
475
|
+
readonly skipReason?: never;
|
|
476
|
+
} | {
|
|
477
|
+
readonly status: "skipped";
|
|
478
|
+
readonly skipReason: DefinitionCheckSkipReason;
|
|
479
|
+
});
|
|
480
|
+
type DefinitionCheckSkipReason = "explicit-schema-first-mode" | "definition-sources-absent" | "definition-sources-empty";
|
|
481
|
+
/**
|
|
482
|
+
* `fieldName` is `null` for a resolver bound to a type rather than a field.
|
|
483
|
+
*/
|
|
484
|
+
type ResolverCoordinateDefinition = {
|
|
485
|
+
readonly typeName: string;
|
|
486
|
+
readonly fieldName: string | null;
|
|
487
|
+
readonly resolverKind: "field" | "subscribe" | "resolve" | "resolveType" | "isTypeOf" | "enum" | "scalar";
|
|
1112
488
|
};
|
|
1113
489
|
/**
|
|
1114
|
-
*
|
|
1115
|
-
*
|
|
1116
|
-
* A projection rather than a spread, because an input object rejects a field it
|
|
1117
|
-
* does not declare, and that refusal takes the whole request with it. An action
|
|
1118
|
-
* read back out of storage can carry fields the type no longer has - a legacy
|
|
1119
|
-
* `attachments` array, or the operation fields left behind by a signing helper
|
|
1120
|
-
* that returns an operation - and any one of them would sink an otherwise valid
|
|
1121
|
-
* submission.
|
|
1122
|
-
*
|
|
1123
|
-
* Only fields the action actually carries are emitted, so an unsigned action
|
|
1124
|
-
* sends no context at all rather than a context full of nulls.
|
|
490
|
+
* The compiler supplies this marker. Resolvers perform their own authorization.
|
|
1125
491
|
*/
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
//#region document-model/auth.d.ts
|
|
1129
|
-
type InitializeAuthActionInput = {
|
|
1130
|
-
version: number;
|
|
1131
|
-
grants: Grant[];
|
|
492
|
+
type SubgraphEntryAccess = {
|
|
493
|
+
readonly kind: "manual";
|
|
1132
494
|
};
|
|
1133
|
-
type
|
|
1134
|
-
|
|
495
|
+
type SubgraphRootEntryBase = {
|
|
496
|
+
/** The author's key, which is stable across a GraphQL name change. */
|
|
497
|
+
readonly key: string;
|
|
498
|
+
readonly fieldName: string;
|
|
499
|
+
readonly description: string | null;
|
|
500
|
+
readonly deprecated: string | null;
|
|
501
|
+
readonly args: readonly InputFieldDefinition[];
|
|
502
|
+
readonly returns: TypeReferenceDefinition;
|
|
503
|
+
readonly access: SubgraphEntryAccess;
|
|
1135
504
|
};
|
|
1136
|
-
type
|
|
1137
|
-
|
|
505
|
+
type SubgraphEntryDefinition = ({
|
|
506
|
+
readonly kind: "query";
|
|
507
|
+
} & SubgraphRootEntryBase) | ({
|
|
508
|
+
readonly kind: "mutation";
|
|
509
|
+
} & SubgraphRootEntryBase) | ({
|
|
510
|
+
readonly kind: "subscription";
|
|
511
|
+
} & SubgraphRootEntryBase) | {
|
|
512
|
+
readonly kind: "computed-field";
|
|
513
|
+
readonly typeName: string;
|
|
514
|
+
readonly fieldName: string;
|
|
515
|
+
readonly access: SubgraphEntryAccess;
|
|
516
|
+
} | {
|
|
517
|
+
readonly kind: "resolve-type";
|
|
518
|
+
readonly typeName: string;
|
|
519
|
+
readonly access: SubgraphEntryAccess;
|
|
520
|
+
} | {
|
|
521
|
+
readonly kind: "is-type-of";
|
|
522
|
+
readonly typeName: string;
|
|
523
|
+
readonly access: SubgraphEntryAccess;
|
|
1138
524
|
};
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
525
|
+
/** A subgraph may also reference the internal scalars the host declares. */
|
|
526
|
+
type SubgraphScalarReferenceDefinition = (CatalogScalarImplementationReference<CatalogScalarName> & {
|
|
527
|
+
readonly graphQLProfile: "legacy-graphql-default-v1";
|
|
528
|
+
}) | {
|
|
529
|
+
readonly name: string;
|
|
530
|
+
readonly implementation: `package#${string}`;
|
|
531
|
+
readonly graphQLProfile: "declared-coercion-v1";
|
|
532
|
+
readonly definition: StoredScalarDefinition;
|
|
1143
533
|
};
|
|
1144
|
-
type
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
};
|
|
1152
|
-
type RemoveGrantAction = Action & {
|
|
1153
|
-
type: "REMOVE_GRANT";
|
|
1154
|
-
input: RemoveGrantActionInput;
|
|
534
|
+
type SubgraphDefinitionBase = {
|
|
535
|
+
readonly kind: "powerhouse.subgraph";
|
|
536
|
+
readonly formatVersion: 1;
|
|
537
|
+
/** The instance and route segment name, not a new global identity. */
|
|
538
|
+
readonly name: string;
|
|
539
|
+
readonly compositionPolicy: "host-current";
|
|
540
|
+
readonly federationProfile: "host-current";
|
|
1155
541
|
};
|
|
1156
|
-
type
|
|
1157
|
-
|
|
1158
|
-
|
|
542
|
+
type SubgraphDefinition = SubgraphDefinitionBase & ({
|
|
543
|
+
readonly schemaKind: "typed";
|
|
544
|
+
readonly hasSubscriptions: boolean;
|
|
545
|
+
readonly types: readonly NamedGraphQLTypeDefinition[];
|
|
546
|
+
readonly entries: readonly SubgraphEntryDefinition[];
|
|
547
|
+
readonly scalars: readonly SubgraphScalarReferenceDefinition[];
|
|
548
|
+
/**
|
|
549
|
+
* Every emitted definition name appears once, including roots and
|
|
550
|
+
* scalars. This order preserves the authored schema's print order.
|
|
551
|
+
*/
|
|
552
|
+
readonly definitionOrder: readonly string[];
|
|
553
|
+
} | {
|
|
554
|
+
readonly schemaKind: "graphql-ast-compat";
|
|
555
|
+
/**
|
|
556
|
+
* `null` records runtime `undefined`. Both `null` and `false` disable
|
|
557
|
+
* subscriptions, but compatibility must preserve their distinct values.
|
|
558
|
+
*/
|
|
559
|
+
readonly hasSubscriptions: boolean | null;
|
|
560
|
+
readonly document: LocationFreeGraphQLDocumentNode;
|
|
561
|
+
readonly resolverCoordinates: readonly ResolverCoordinateDefinition[];
|
|
562
|
+
readonly access: "manual";
|
|
563
|
+
});
|
|
564
|
+
//#endregion
|
|
565
|
+
//#region clis/args/common.d.ts
|
|
566
|
+
declare const getPackageManagerCommand: Partial<import("cmd-ts/dist/cjs/argparser.js").Register> & {
|
|
567
|
+
parse(context: import("cmd-ts/dist/cjs/argparser.js").ParseContext): Promise<import("cmd-ts/dist/cjs/argparser.js").ParsingResult<{
|
|
568
|
+
packageManager: Agent | undefined;
|
|
569
|
+
npm: boolean | undefined;
|
|
570
|
+
pnpm: boolean | undefined;
|
|
571
|
+
yarn: boolean | undefined;
|
|
572
|
+
bun: boolean | undefined;
|
|
573
|
+
}>>;
|
|
574
|
+
} & import("cmd-ts/dist/cjs/helpdoc.js").PrintHelp & import("cmd-ts/dist/cjs/helpdoc.js").ProvidesHelp & import("cmd-ts/dist/cjs/helpdoc.js").Named & Partial<import("cmd-ts/dist/cjs/helpdoc.js").Versioned> & import("cmd-ts/dist/cjs/argparser.js").Register & import("cmd-ts/dist/cjs/runner.js").Handling<{
|
|
575
|
+
packageManager: Agent | undefined;
|
|
576
|
+
npm: boolean | undefined;
|
|
577
|
+
pnpm: boolean | undefined;
|
|
578
|
+
yarn: boolean | undefined;
|
|
579
|
+
bun: boolean | undefined;
|
|
580
|
+
}, {
|
|
581
|
+
packageManager: Agent | undefined;
|
|
582
|
+
npm: boolean | undefined;
|
|
583
|
+
pnpm: boolean | undefined;
|
|
584
|
+
yarn: boolean | undefined;
|
|
585
|
+
bun: boolean | undefined;
|
|
586
|
+
}> & {
|
|
587
|
+
run(context: import("cmd-ts/dist/cjs/argparser.js").ParseContext): Promise<import("cmd-ts/dist/cjs/argparser.js").ParsingResult<{
|
|
588
|
+
packageManager: Agent | undefined;
|
|
589
|
+
npm: boolean | undefined;
|
|
590
|
+
pnpm: boolean | undefined;
|
|
591
|
+
yarn: boolean | undefined;
|
|
592
|
+
bun: boolean | undefined;
|
|
593
|
+
}>>;
|
|
594
|
+
} & Partial<import("cmd-ts/dist/cjs/helpdoc.js").Versioned & import("cmd-ts/dist/cjs/helpdoc.js").Descriptive & import("cmd-ts/dist/cjs/helpdoc.js").Aliased>;
|
|
595
|
+
//#endregion
|
|
596
|
+
//#region processors/constants.d.ts
|
|
597
|
+
declare const PROCESSOR_APPS: readonly ["connect", "switchboard"];
|
|
598
|
+
declare const DEFAULT_RELATIONAL_PROCESSOR_DB_NAME = "relational-db";
|
|
599
|
+
declare const DEFAULT_ANALYTICS_PROCESSOR_DB_NAME = "analytics-db";
|
|
600
|
+
//#endregion
|
|
601
|
+
//#region document-model/signatures.d.ts
|
|
602
|
+
type Signature = [string, string, string, string, string];
|
|
603
|
+
/**
|
|
604
|
+
* A user action signer.
|
|
605
|
+
*/
|
|
606
|
+
type UserActionSigner = {
|
|
607
|
+
address: string;
|
|
608
|
+
networkId: string;
|
|
609
|
+
chainId: number;
|
|
1159
610
|
};
|
|
1160
|
-
type AuthAction = InitializeAuthAction | SetGrantAction | RemoveGrantAction | MoveGrantAction;
|
|
1161
|
-
declare const AUTH_ACTION_TYPES: readonly ["INITIALIZE_AUTH", "SET_GRANT", "REMOVE_GRANT", "MOVE_GRANT"];
|
|
1162
|
-
declare function isAuthAction(action: Action): action is AuthAction;
|
|
1163
|
-
/** Highest known policy version; decide() fails closed above it. */
|
|
1164
|
-
declare const MAX_SUPPORTED_AUTH_VERSION = 1;
|
|
1165
|
-
declare const InitializeAuthActionInputSchema: () => z.ZodObject<{
|
|
1166
|
-
version: z.ZodNumber;
|
|
1167
|
-
grants: z.ZodArray<z.ZodCustom<Grant, Grant>>;
|
|
1168
|
-
}, z.core.$strip>;
|
|
1169
|
-
declare const SetGrantActionInputSchema: () => z.ZodObject<{
|
|
1170
|
-
grant: z.ZodCustom<Grant, Grant>;
|
|
1171
|
-
}, z.core.$strip>;
|
|
1172
|
-
declare const RemoveGrantActionInputSchema: () => z.ZodObject<{
|
|
1173
|
-
id: z.ZodString;
|
|
1174
|
-
}, z.core.$strip>;
|
|
1175
|
-
declare const MoveGrantActionInputSchema: () => z.ZodObject<{
|
|
1176
|
-
id: z.ZodString;
|
|
1177
|
-
index: z.ZodNumber;
|
|
1178
|
-
}, z.core.$strip>;
|
|
1179
|
-
declare const initializeAuth: (input: InitializeAuthActionInput) => InitializeAuthAction;
|
|
1180
|
-
declare const setGrant: (input: SetGrantActionInput) => SetGrantAction;
|
|
1181
|
-
declare const removeGrant: (input: RemoveGrantActionInput) => RemoveGrantAction;
|
|
1182
|
-
declare const moveGrant: (input: MoveGrantActionInput) => MoveGrantAction;
|
|
1183
611
|
/**
|
|
1184
|
-
*
|
|
1185
|
-
* key recorded as the document creator. Returns false
|
|
1186
|
-
* when there is no creator (empty JWK) or no signer key.
|
|
612
|
+
* An app action signer.
|
|
1187
613
|
*/
|
|
1188
|
-
|
|
614
|
+
type AppActionSigner = {
|
|
615
|
+
name: string;
|
|
616
|
+
key: string;
|
|
617
|
+
};
|
|
1189
618
|
/**
|
|
1190
|
-
*
|
|
1191
|
-
* (version 0). The input version is the policy language version and must be an
|
|
1192
|
-
* integer >= 1; 0 is reserved for the uninitialized state. On a signed-header
|
|
1193
|
-
* document it must be signed by the document creator (`header.sig.publicKey`).
|
|
1194
|
-
* A creator-less policy must include a grant permitting execute on the auth
|
|
1195
|
-
* scope, or it would be born locked out.
|
|
619
|
+
* An action signer.
|
|
1196
620
|
*/
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
621
|
+
type ActionSigner = {
|
|
622
|
+
user: UserActionSigner;
|
|
623
|
+
app: AppActionSigner;
|
|
624
|
+
signatures: Signature[];
|
|
625
|
+
};
|
|
1200
626
|
/**
|
|
1201
|
-
*
|
|
1202
|
-
* would leave a creator-less policy with no auth-administration grant.
|
|
627
|
+
* Information to verify the document creator.
|
|
1203
628
|
*/
|
|
1204
|
-
|
|
629
|
+
type PHDocumentSignatureInfo = {
|
|
630
|
+
/**
|
|
631
|
+
* The public key of the document creator.
|
|
632
|
+
**/
|
|
633
|
+
publicKey: JsonWebKey;
|
|
634
|
+
/** The nonce that was appended to the message to create the signature. */
|
|
635
|
+
nonce: string;
|
|
636
|
+
};
|
|
637
|
+
/** Joins a signature's params for transport. Already-joined input passes through. */
|
|
638
|
+
declare function serializeSignature(signature: Signature | string): string;
|
|
1205
639
|
/**
|
|
1206
|
-
*
|
|
1207
|
-
* applicable grant wins), so the relative order of the other grants is kept.
|
|
1208
|
-
* The target index is clamped to the valid range; an unknown id throws.
|
|
640
|
+
* Splits a transported signature back into its params. A tuple passes through.
|
|
1209
641
|
*
|
|
1210
|
-
*
|
|
1211
|
-
*
|
|
1212
|
-
*
|
|
642
|
+
* Short input is padded rather than refused: verification reads the params by
|
|
643
|
+
* position and fails on a wrong one, which says more than a length complaint
|
|
644
|
+
* raised here would.
|
|
1213
645
|
*/
|
|
1214
|
-
declare function
|
|
646
|
+
declare function deserializeSignature(signature: Signature | string): Signature;
|
|
1215
647
|
/**
|
|
1216
|
-
*
|
|
1217
|
-
* dedicated reducer: it is applied by the base reducer instead of the model
|
|
1218
|
-
* reducer, mirroring the document-scope platform handlers. Unknown types are a
|
|
1219
|
-
* no-op, matching the model-reducer default.
|
|
648
|
+
* Configuration for hashing document state in operations.
|
|
1220
649
|
*/
|
|
1221
|
-
|
|
650
|
+
type HashConfig = {
|
|
651
|
+
/** The hashing algorithm to use (e.g., "sha1", "sha256") */
|
|
652
|
+
algorithm: string;
|
|
653
|
+
/** The encoding format for the hash output (e.g., "base64", "hex") */
|
|
654
|
+
encoding: string;
|
|
655
|
+
/** Optional algorithm-specific parameters */
|
|
656
|
+
params?: Record<string, unknown>;
|
|
657
|
+
};
|
|
658
|
+
//#endregion
|
|
659
|
+
//#region document-model/operations.d.ts
|
|
660
|
+
declare function setNameOperation<TDocument extends PHDocument$1>(document: TDocument, input: {
|
|
661
|
+
name: string;
|
|
662
|
+
}): TDocument & {
|
|
663
|
+
header: {
|
|
664
|
+
name: string;
|
|
665
|
+
id: string;
|
|
666
|
+
sig: PHDocumentSignatureInfo;
|
|
667
|
+
documentType: string;
|
|
668
|
+
createdAtUtcIso: string;
|
|
669
|
+
slug: string;
|
|
670
|
+
branch: string;
|
|
671
|
+
revision: {
|
|
672
|
+
[scope: string]: number;
|
|
673
|
+
};
|
|
674
|
+
lastModifiedAtUtcIso: string;
|
|
675
|
+
protocolVersions?: {
|
|
676
|
+
[key: string]: number;
|
|
677
|
+
};
|
|
678
|
+
meta?: PHDocumentMeta;
|
|
679
|
+
};
|
|
680
|
+
};
|
|
681
|
+
declare function setPreferredEditorOperation<TDocument extends PHDocument$1>(document: TDocument, input: {
|
|
682
|
+
preferredEditor: string | null;
|
|
683
|
+
}): TDocument;
|
|
684
|
+
declare function setSlugOperation<TDocument extends PHDocument$1>(document: TDocument, input: {
|
|
685
|
+
slug: string;
|
|
686
|
+
}): TDocument;
|
|
687
|
+
declare function undoOperation<TDocument extends PHDocument$1>(document: TDocument, action: Action, skip: number): {
|
|
688
|
+
document: TDocument;
|
|
689
|
+
action: Action;
|
|
690
|
+
skip: number;
|
|
691
|
+
reuseLastOperationIndex: boolean;
|
|
692
|
+
};
|
|
1222
693
|
/**
|
|
1223
|
-
*
|
|
1224
|
-
*
|
|
694
|
+
* V2 of undoOperation for protocol version 2+.
|
|
695
|
+
* Key differences from undoOperation:
|
|
696
|
+
* - Never reuses operation index (always increments)
|
|
697
|
+
* - Always sets skip=1 (consecutive NOOPs are handled during rebuild/GC)
|
|
698
|
+
* - No complex skip calculation - simpler model where each UNDO is independent
|
|
1225
699
|
*/
|
|
1226
|
-
declare function
|
|
700
|
+
declare function undoOperationV2<TDocument extends PHDocument$1>(document: TDocument, action: Action, skip: number): {
|
|
701
|
+
document: TDocument;
|
|
702
|
+
action: Action;
|
|
703
|
+
skip: number;
|
|
704
|
+
reuseLastOperationIndex: false;
|
|
705
|
+
};
|
|
706
|
+
declare function redoOperation<TDocument extends PHDocument$1>(document: TDocument, action: Action, skip: number): {
|
|
707
|
+
document: TDocument;
|
|
708
|
+
action: Action;
|
|
709
|
+
skip: number;
|
|
710
|
+
reuseLastOperationIndex: boolean;
|
|
711
|
+
};
|
|
1227
712
|
/**
|
|
1228
|
-
*
|
|
713
|
+
* An operation that was applied to a {@link BaseDocument}.
|
|
1229
714
|
*
|
|
1230
|
-
*
|
|
1231
|
-
*
|
|
1232
|
-
* is
|
|
1233
|
-
*
|
|
1234
|
-
*
|
|
1235
|
-
* rule for good), or wipe an existing policy by carrying the default
|
|
1236
|
-
* uninitialized one.
|
|
715
|
+
* @remarks
|
|
716
|
+
* Wraps an action with an index, to be added to the operations history of a Document.
|
|
717
|
+
* The `index` field is used to keep all operations in order and enable replaying the
|
|
718
|
+
* document's history from the beginning. Note that indices and skips are relative to
|
|
719
|
+
* a specific reactor. Example below:
|
|
1237
720
|
*
|
|
1238
|
-
*
|
|
721
|
+
* For (index, skip, ts, action)
|
|
722
|
+
* A - [(0, 0, 1, "A0"), (1, 0, 2, "A1")]
|
|
723
|
+
* B - [(0, 0, 0, "B0"), (1, 0, 3, "B1")]
|
|
724
|
+
* ...
|
|
725
|
+
* B gets A's Operations Scenario:
|
|
726
|
+
* B' - [(0, 0, 0, "B0"), (1, 0, 3, "B1"), (2, 1, 1, "A0"), (3, 0, 2, "A1"), (4, 0, 3, "B1")]
|
|
727
|
+
* Then A needs to end up with:
|
|
728
|
+
* 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")]
|
|
729
|
+
* So that both A and B end up with the stream of actions (action):
|
|
730
|
+
* [("B0"), ("A0"), ("A1"), ("B1")]
|
|
1239
731
|
*
|
|
1240
|
-
*
|
|
1241
|
-
* keeps the policy it has, so a default-state upgrade cannot reset it;
|
|
1242
|
-
* - the document is uninitialized and the snapshot carries a policy: the
|
|
1243
|
-
* policy is installed after the same validation genesis applies, so it
|
|
1244
|
-
* cannot be born locked out;
|
|
1245
|
-
* - both carry a policy: they must agree. A duplicate preserves its source's
|
|
1246
|
-
* policy (see {@link assertAuthPreservedOnDuplicate}), and anything else is
|
|
1247
|
-
* an attempt to replace one policy with another.
|
|
732
|
+
* @typeParam A - The type of the action.
|
|
1248
733
|
*/
|
|
1249
|
-
|
|
1250
|
-
/**
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
734
|
+
type Operation = {
|
|
735
|
+
/**
|
|
736
|
+
* This is a stable id, derived from various document and action properties
|
|
737
|
+
* in deriveOperationId().
|
|
738
|
+
*
|
|
739
|
+
* It _cannot_ be an arbitrary string.
|
|
740
|
+
*
|
|
741
|
+
* It it also not unique per operation, as reshuffled operations will keep'
|
|
742
|
+
* the same id they had before they were reshuffled. This means that the
|
|
743
|
+
* IOperationStore may have multiple operations with the same operation id.
|
|
744
|
+
**/
|
|
745
|
+
id: string;
|
|
746
|
+
/** Position of the operation in the history. This is relative to a specific reactor -- they may not all agree on this value. */
|
|
747
|
+
index: number;
|
|
748
|
+
/** The number of operations skipped with this Operation. This is relative to a specific reactor -- they may not all agree on this value. */
|
|
749
|
+
skip: number;
|
|
750
|
+
/** Timestamp of when the operation was added */
|
|
751
|
+
timestampUtcMs: string;
|
|
752
|
+
/** Hash of the resulting document data after the operation */
|
|
753
|
+
hash: string;
|
|
754
|
+
/** Error message for a failed action */
|
|
755
|
+
error?: string;
|
|
756
|
+
/** The name of the error a reducer threw, e.g. "BookNotStartedError"; not stored. */
|
|
757
|
+
errorName?: string;
|
|
758
|
+
/** The `errorCode` of the error a reducer threw, e.g. "BOOK_NOT_STARTED"; not stored. */
|
|
759
|
+
errorCode?: string;
|
|
760
|
+
/**
|
|
761
|
+
* If authorization rejected the action, this records the reason why.
|
|
762
|
+
*/
|
|
763
|
+
deniedReason?: string;
|
|
764
|
+
/** The resulting state after the operation */
|
|
765
|
+
resultingState?: string;
|
|
766
|
+
/**
|
|
767
|
+
* The action that was applied to the document to produce this operation.
|
|
768
|
+
*/
|
|
769
|
+
action: Action;
|
|
1264
770
|
};
|
|
1265
771
|
/**
|
|
1266
|
-
*
|
|
1267
|
-
*
|
|
1268
|
-
*
|
|
772
|
+
* The operations history of the document by scope.
|
|
773
|
+
*
|
|
774
|
+
* This will be removed in a future release.
|
|
775
|
+
*
|
|
776
|
+
* TODO: Type should be Partial<Record<string, Operation[]>>,
|
|
777
|
+
* but that is a breaking change for codegen + external doc models.
|
|
1269
778
|
*/
|
|
1270
|
-
type
|
|
1271
|
-
/** The executing scope's own state, for `doc.<scope>.*` paths. */
|
|
1272
|
-
scopeState: unknown;
|
|
1273
|
-
/** The action's input, for `action.input.*` paths. Absent for reads. */
|
|
1274
|
-
actionInput?: unknown;
|
|
1275
|
-
};
|
|
1276
|
-
type AuthDecision = "allow" | "deny";
|
|
1277
|
-
/** Why the policy refused a request. */
|
|
1278
|
-
type AuthRefusal = "version-unsupported" | "no-applicable-grant" | "denied-by-grant";
|
|
779
|
+
type DocumentOperations = Record<string, Operation[]>;
|
|
1279
780
|
/**
|
|
1280
|
-
*
|
|
1281
|
-
*
|
|
1282
|
-
* rather than one reason standing for every refusal.
|
|
781
|
+
* What happened to an operation. An operation that is not `applied` still
|
|
782
|
+
* occupies its index but contributes nothing to the document's state.
|
|
1283
783
|
*/
|
|
1284
|
-
type
|
|
1285
|
-
|
|
784
|
+
type OperationOutcome = {
|
|
785
|
+
kind: "applied";
|
|
1286
786
|
} | {
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
787
|
+
kind: "reducer-error";
|
|
788
|
+
message: string;
|
|
789
|
+
name?: string;
|
|
790
|
+
code?: string;
|
|
791
|
+
} | {
|
|
792
|
+
kind: "denied";
|
|
793
|
+
reason: string;
|
|
1290
794
|
};
|
|
1291
795
|
/**
|
|
1292
|
-
*
|
|
1293
|
-
*
|
|
1294
|
-
*
|
|
1295
|
-
* An uninitialized policy (version 0, absent auth state, or a legacy `{}`
|
|
1296
|
-
* auth scope serialized before PHAuthState had a version) leaves the document
|
|
1297
|
-
* open. Once a policy exists the default is deny, and grants stack in order.
|
|
1298
|
-
*
|
|
1299
|
-
* Group principals match only against a supplied groups map (the groups
|
|
1300
|
-
* projection, present when authGroups is on); with no map they never apply.
|
|
1301
|
-
* `where` clauses and { match } principals likewise evaluate only against a
|
|
1302
|
-
* supplied condition context (present when authConditions is on).
|
|
1303
|
-
*/
|
|
1304
|
-
declare function evaluate(auth: PHAuthState | undefined, subject: AuthSubject, request: AuthRequest, groups?: AuthGroups, conditions?: ConditionContext): AuthEvaluation;
|
|
1305
|
-
/**
|
|
1306
|
-
* Evaluates the auth policy for a single request. Pure and deterministic. This
|
|
1307
|
-
* is {@link evaluate} with the reason dropped.
|
|
796
|
+
* Reads an operation's outcome. A denial takes precedence over a reducer
|
|
797
|
+
* error, since a denied operation never reaches its reducer.
|
|
1308
798
|
*/
|
|
1309
|
-
declare function
|
|
799
|
+
declare function operationOutcome(operation: Operation): OperationOutcome;
|
|
800
|
+
type OperationContext = {
|
|
801
|
+
documentId: string;
|
|
802
|
+
documentType: string;
|
|
803
|
+
scope: string;
|
|
804
|
+
branch: string;
|
|
805
|
+
resultingState?: string;
|
|
806
|
+
ordinal: number;
|
|
807
|
+
};
|
|
808
|
+
type OperationWithContext$1 = {
|
|
809
|
+
operation: Operation;
|
|
810
|
+
context: OperationContext;
|
|
811
|
+
};
|
|
812
|
+
//#endregion
|
|
813
|
+
//#region document-model/operation-order.d.ts
|
|
814
|
+
declare function isDocumentAction(action: Action): action is DocumentAction;
|
|
815
|
+
declare function garbageCollect<TOpIndex extends OperationIndex>(sortedOperations: TOpIndex[]): TOpIndex[];
|
|
816
|
+
declare function sortOperations<TOpIndex extends OperationIndex>(operations: TOpIndex[]): TOpIndex[];
|
|
817
|
+
declare function nextSkipNumber(sortedOperations: OperationIndex[]): number;
|
|
818
|
+
//#endregion
|
|
819
|
+
//#region document-model/signature-policy.d.ts
|
|
820
|
+
/** The `protocolVersions` key that fixes a document's signature requirement. */
|
|
821
|
+
declare const SIGNATURE_PROTOCOL = "signature";
|
|
822
|
+
/** `protocolVersions.signature` of a document that requires v2 tuples. */
|
|
823
|
+
declare const SIGNATURE_PROTOCOL_V2 = 2;
|
|
824
|
+
/** `v2-required`: v2 tuples only and a content-addressed id. */
|
|
825
|
+
type SignaturePolicy$1 = "legacy" | "v2-required";
|
|
826
|
+
/** What a new document is created as unless the caller or host says otherwise. */
|
|
827
|
+
declare const DEFAULT_SIGNATURE_POLICY: SignaturePolicy$1;
|
|
828
|
+
declare function isSignaturePolicy(value: unknown): value is SignaturePolicy$1;
|
|
829
|
+
type ProtocolVersions = {
|
|
830
|
+
[protocol: string]: number;
|
|
831
|
+
};
|
|
832
|
+
/** Read from a header, a CREATE_DOCUMENT input or a bare map. */
|
|
833
|
+
declare function signaturePolicyOf(source: {
|
|
834
|
+
protocolVersions?: ProtocolVersions | null;
|
|
835
|
+
} | ProtocolVersions | null | undefined): SignaturePolicy$1;
|
|
836
|
+
/** `protocolVersions` for a new v2-required document, over `base`. */
|
|
837
|
+
declare function v2RequiredProtocolVersions(base?: ProtocolVersions): ProtocolVersions;
|
|
1310
838
|
/**
|
|
1311
|
-
* The
|
|
1312
|
-
*
|
|
1313
|
-
* SET_GRANT the groups named by its one grant; REMOVE_GRANT and MOVE_GRANT
|
|
1314
|
-
* contribute nothing. Total over any input shape, because references are read
|
|
1315
|
-
* from the input as it arrived, including inputs later stored as errors.
|
|
839
|
+
* The policy a create call asks for: `signaturePolicy`, else the `signature`
|
|
840
|
+
* key of its `protocolVersions`, else `fallback`, the host's default.
|
|
1316
841
|
*/
|
|
1317
|
-
declare function
|
|
842
|
+
declare function requestedSignaturePolicy(request: {
|
|
843
|
+
signaturePolicy?: SignaturePolicy$1;
|
|
844
|
+
protocolVersions?: ProtocolVersions;
|
|
845
|
+
} | undefined, fallback: SignaturePolicy$1): SignaturePolicy$1;
|
|
846
|
+
/** `protocolVersions` for a new document under `policy`, over `base`. */
|
|
847
|
+
declare function protocolVersionsFor(policy: SignaturePolicy$1, base?: ProtocolVersions): ProtocolVersions;
|
|
848
|
+
/** What the id of a v2-required document is a hash of. */
|
|
849
|
+
type DocumentIdParams = {
|
|
850
|
+
documentType: string;
|
|
851
|
+
createdAtUtcIso: string;
|
|
852
|
+
nonce: string;
|
|
853
|
+
protocolVersions: ProtocolVersions;
|
|
854
|
+
};
|
|
855
|
+
/** `base64url(sha256(canonicalJson(params)))`, unpadded. */
|
|
856
|
+
declare function deriveDocumentId(params: DocumentIdParams): string;
|
|
857
|
+
/** Whether `id` has the shape `deriveDocumentId` produces. */
|
|
858
|
+
declare function isDerivedDocumentId(id: string): boolean;
|
|
1318
859
|
//#endregion
|
|
1319
|
-
//#region document-model/
|
|
1320
|
-
/** Maximum number of grants in a policy. */
|
|
1321
|
-
declare const MAX_AUTH_GRANTS = 100;
|
|
1322
|
-
/** Maximum nesting depth of a condition tree. */
|
|
1323
|
-
declare const MAX_CONDITION_DEPTH = 10;
|
|
1324
|
-
/** Maximum node count (conditions plus operands) of a condition tree. */
|
|
1325
|
-
declare const MAX_CONDITION_NODES = 100;
|
|
1326
|
-
/** Maximum entries in an execute capability's operation list. */
|
|
1327
|
-
declare const MAX_CAPABILITY_OPERATIONS = 100;
|
|
860
|
+
//#region document-model/state.d.ts
|
|
1328
861
|
/**
|
|
1329
|
-
*
|
|
1330
|
-
* on error operations, so it must be a pure function of the input.
|
|
862
|
+
* Creates a default PHAuthState
|
|
1331
863
|
*/
|
|
1332
|
-
declare
|
|
1333
|
-
readonly grantId: string;
|
|
1334
|
-
constructor(grantId: string, problem: string);
|
|
1335
|
-
}
|
|
1336
|
-
/** Thrown for a `{ group }` principal on a group document: references never chain. */
|
|
1337
|
-
declare class GroupPrincipalNotAllowedError extends Error {
|
|
1338
|
-
readonly grantId: string;
|
|
1339
|
-
constructor(grantId: string);
|
|
1340
|
-
}
|
|
864
|
+
declare function defaultAuthState(): PHAuthState;
|
|
1341
865
|
/**
|
|
1342
|
-
*
|
|
1343
|
-
* permitting execute on the auth scope. Without the creator carve-out no
|
|
1344
|
-
* subject could ever administer such a policy again.
|
|
866
|
+
* Creates a default PHDocumentState
|
|
1345
867
|
*/
|
|
1346
|
-
declare
|
|
1347
|
-
readonly grantId: string;
|
|
1348
|
-
constructor(grantId: string);
|
|
1349
|
-
}
|
|
868
|
+
declare function defaultDocumentState(): PHDocumentState;
|
|
1350
869
|
/**
|
|
1351
|
-
*
|
|
1352
|
-
* permitting execute on the auth scope. Such a policy would be born with no
|
|
1353
|
-
* subject able to administer it.
|
|
870
|
+
* Creates a default PHBaseState with auth and document properties
|
|
1354
871
|
*/
|
|
1355
|
-
declare
|
|
1356
|
-
constructor();
|
|
1357
|
-
}
|
|
1358
|
-
declare function isPlainValue(value: unknown): value is Record<string, unknown>;
|
|
1359
|
-
/** Returns the first v1-rule violation, or null. Pure, total, deterministic. */
|
|
1360
|
-
declare function grantProblem(value: unknown): string | null;
|
|
1361
|
-
declare const GrantSchema: () => z.ZodCustom<Grant, Grant>;
|
|
1362
|
-
/** V1 shape rules plus the group-document group-principal ban. */
|
|
1363
|
-
declare function assertValidGrant(grant: unknown, documentType: string): void;
|
|
872
|
+
declare function defaultBaseState(): PHBaseState;
|
|
1364
873
|
/**
|
|
1365
|
-
*
|
|
1366
|
-
* creator-less policy — that some grant keeps the auth scope administrable.
|
|
874
|
+
* Creates a PHAuthState with the given properties
|
|
1367
875
|
*/
|
|
1368
|
-
declare function
|
|
876
|
+
declare function createAuthState(auth?: Partial<PHAuthState>): PHAuthState;
|
|
1369
877
|
/**
|
|
1370
|
-
*
|
|
1371
|
-
* administration retention. Retention is checked on an append as well as an
|
|
1372
|
-
* in-place replace, because a grant appended after the administration grant can
|
|
1373
|
-
* shadow it (evaluation is last-applicable-grant-wins) and so take
|
|
1374
|
-
* administration away without removing anything.
|
|
878
|
+
* Creates a PHDocumentState with the given properties
|
|
1375
879
|
*/
|
|
1376
|
-
declare function
|
|
880
|
+
declare function createDocumentState(document?: Partial<PHDocumentState>): PHDocumentState;
|
|
1377
881
|
/**
|
|
1378
|
-
*
|
|
1379
|
-
* auth scope; on a signed document the creator carve-out keeps administration
|
|
1380
|
-
* reachable instead. Rejects a change that takes the last such grant away. A
|
|
1381
|
-
* policy already without one is left alone: the change is not what locks it.
|
|
882
|
+
* Creates a PHBaseState with the given auth and document properties
|
|
1382
883
|
*/
|
|
1383
|
-
declare function
|
|
884
|
+
declare function createBaseState(auth?: Partial<PHAuthState>, document?: Partial<PHDocumentState>): PHBaseState;
|
|
1384
885
|
/**
|
|
1385
|
-
*
|
|
1386
|
-
*
|
|
1387
|
-
* false. These are consensus semantics, versioned by `PHAuthState.version`;
|
|
1388
|
-
* changing them requires a new version.
|
|
886
|
+
* Backfills the auth scope to the default for legacy documents serialized with
|
|
887
|
+
* an empty `auth`. Replaces only `state.auth`. Idempotent.
|
|
1389
888
|
*/
|
|
1390
|
-
declare function
|
|
889
|
+
declare function backfillAuthState<TState extends PHBaseState>(state: TState): TState;
|
|
1391
890
|
/**
|
|
1392
|
-
* The
|
|
1393
|
-
* order of first appearance. These are the streams the groups projection reads.
|
|
891
|
+
* The document state of the document.
|
|
1394
892
|
*/
|
|
1395
|
-
|
|
1396
|
-
/**
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
*/
|
|
1403
|
-
|
|
893
|
+
type PHDocumentState = {
|
|
894
|
+
/**
|
|
895
|
+
* The current document model schema version of the document. This is used
|
|
896
|
+
* with the UPGRADE_DOCUMENT operation to specify the DocumentModelModule
|
|
897
|
+
* version to use for reducer execution.
|
|
898
|
+
*/
|
|
899
|
+
version: number;
|
|
900
|
+
/** Hash configuration for operation state verification */
|
|
901
|
+
hash: HashConfig;
|
|
902
|
+
/** True if and only if the document has been deleted */
|
|
903
|
+
isDeleted?: boolean;
|
|
904
|
+
/** The timestamp when the document was deleted, in UTC ISO format */
|
|
905
|
+
deletedAtUtcIso?: string;
|
|
906
|
+
/** Optional: who deleted the document */
|
|
907
|
+
deletedBy?: string;
|
|
908
|
+
/** Optional: reason for deletion */
|
|
909
|
+
deletionReason?: string;
|
|
910
|
+
};
|
|
1404
911
|
/**
|
|
1405
|
-
*
|
|
1406
|
-
* {
|
|
912
|
+
* The document's authorization policy: an ordered, stacked list of grants,
|
|
913
|
+
* where the last matching grant wins. `{ version: 0, grants: [] }` is
|
|
914
|
+
* uninitialized and leaves the document open.
|
|
1407
915
|
*/
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
916
|
+
type PHAuthState = {
|
|
917
|
+
/**
|
|
918
|
+
* Policy language version. 0 is the uninitialized state; INITIALIZE_AUTH
|
|
919
|
+
* sets an integer >= 1.
|
|
920
|
+
*/
|
|
921
|
+
version: number;
|
|
922
|
+
grants: Grant[];
|
|
923
|
+
/**
|
|
924
|
+
* The did:key of the auth-policy creator, captured from the INITIALIZE_AUTH
|
|
925
|
+
* signer. The creator may always administer the auth scope, so a grant policy
|
|
926
|
+
* can never lock administration out of itself. Absent for an unsigned genesis.
|
|
927
|
+
*/
|
|
928
|
+
creator?: string;
|
|
1415
929
|
};
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
/**
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
930
|
+
type Grant = {
|
|
931
|
+
/** Stable id. */
|
|
932
|
+
id: string;
|
|
933
|
+
description: string;
|
|
934
|
+
effect: "allow" | "deny";
|
|
935
|
+
principal: Principal;
|
|
936
|
+
capability: Capability;
|
|
937
|
+
/**
|
|
938
|
+
* The grant applies only when this condition holds. Until conditions are
|
|
939
|
+
* evaluated, a grant carrying one never applies.
|
|
940
|
+
*/
|
|
941
|
+
where?: Condition;
|
|
942
|
+
};
|
|
943
|
+
type Principal = {
|
|
944
|
+
anyone: true;
|
|
945
|
+
} | {
|
|
946
|
+
address: string;
|
|
947
|
+
} | {
|
|
948
|
+
group: string;
|
|
949
|
+
} | {
|
|
950
|
+
match: Condition;
|
|
1429
951
|
};
|
|
1430
952
|
/**
|
|
1431
|
-
*
|
|
1432
|
-
*
|
|
953
|
+
* The folded global state of a PHGroup (powerhouse/reactor-group) document,
|
|
954
|
+
* narrowed to what auth evaluation reads. Membership is matched
|
|
955
|
+
* case-insensitively against the subject's address.
|
|
1433
956
|
*/
|
|
1434
|
-
type
|
|
1435
|
-
|
|
1436
|
-
type FeatureCapability = {
|
|
1437
|
-
kind: "feature";
|
|
1438
|
-
name: string;
|
|
1439
|
-
baseline: readonly number[];
|
|
1440
|
-
supported(flags: PeerCapabilityFlags): readonly number[];
|
|
1441
|
-
};
|
|
1442
|
-
type PeerCapability = ProtocolCapability | FeatureCapability;
|
|
1443
|
-
/** A purged document's protocol; never preferred, so creation never selects it. */
|
|
1444
|
-
declare const DOCUMENT_PURGE_PROTOCOL = "document-purge";
|
|
1445
|
-
/** A peer that takes refusals of polled purge markers on the poll. */
|
|
1446
|
-
declare const MARKER_REFUSAL_FEATURE = "marker-refusal";
|
|
1447
|
-
declare const PEER_CAPABILITIES: readonly PeerCapability[];
|
|
1448
|
-
/** `base-reducer`'s preference with no reactor flags, which shared never holds. */
|
|
1449
|
-
declare const FLAGLESS_BASE_REDUCER_VERSION: number;
|
|
1450
|
-
/** `base` plus `extra`; an extra replaces a base entry of the same name. */
|
|
1451
|
-
declare function mergePeerCapabilities(base: readonly PeerCapability[], extra: readonly PeerCapability[]): PeerCapability[];
|
|
1452
|
-
declare const PEER_MANIFEST_FORMAT = 1;
|
|
1453
|
-
type Supports = {
|
|
1454
|
-
protocols: {
|
|
1455
|
-
[protocol: string]: readonly number[];
|
|
1456
|
-
};
|
|
1457
|
-
features: {
|
|
1458
|
-
[feature: string]: readonly number[];
|
|
1459
|
-
};
|
|
957
|
+
type PHGroupState = {
|
|
958
|
+
members: string[];
|
|
1460
959
|
};
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
960
|
+
/**
|
|
961
|
+
* Folded group states keyed by group document id, as the groups projection
|
|
962
|
+
* provides them. A group id a policy names but the map does not hold fails
|
|
963
|
+
* closed: the principal does not match.
|
|
964
|
+
*/
|
|
965
|
+
type AuthGroups = Record<string, PHGroupState>;
|
|
966
|
+
type Capability = {
|
|
967
|
+
can: "read";
|
|
968
|
+
scope?: string;
|
|
969
|
+
} | {
|
|
970
|
+
can: "execute";
|
|
971
|
+
scope?: string;
|
|
972
|
+
operation?: string[];
|
|
1469
973
|
};
|
|
1470
|
-
/** What this reactor supports, for every capability it registers. */
|
|
1471
|
-
declare function localSupports(capabilities: readonly PeerCapability[], flags: PeerCapabilityFlags): Supports;
|
|
1472
|
-
/** What a peer that announces nothing supports. */
|
|
1473
|
-
declare function legacySupports(capabilities: readonly PeerCapability[]): Supports;
|
|
1474
|
-
declare function manifestRevision(supports: Supports, sequence?: number): string;
|
|
1475
|
-
declare function localPeerManifest(capabilities: readonly PeerCapability[], flags: PeerCapabilityFlags, appKey?: string, sequence?: number): PeerManifest;
|
|
1476
|
-
/** A manifest sent before the one already held; silence carries no sequence. */
|
|
1477
|
-
declare function isOlderManifest(next: PeerManifest | null, held: PeerManifest | null | undefined): boolean;
|
|
1478
|
-
/** A peer's manifest, or the baselines for a peer that announced none. */
|
|
1479
|
-
declare function peerSupports(manifest: PeerManifest | null, capabilities: readonly PeerCapability[]): Supports;
|
|
1480
974
|
/**
|
|
1481
|
-
*
|
|
1482
|
-
*
|
|
975
|
+
* Boolean condition language for grants: deterministic, total, and
|
|
976
|
+
* JSON-serializable, versioned by `PHAuthState.version`. Defined now but not
|
|
977
|
+
* yet evaluated or enforced.
|
|
1483
978
|
*/
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
979
|
+
type Condition = {
|
|
980
|
+
eq: [Operand, Operand];
|
|
981
|
+
} | {
|
|
982
|
+
ne: [Operand, Operand];
|
|
983
|
+
} | {
|
|
984
|
+
in: [Operand, Operand[]];
|
|
985
|
+
} | {
|
|
986
|
+
notIn: [Operand, Operand[]];
|
|
987
|
+
} | {
|
|
988
|
+
lt: [Operand, Operand];
|
|
989
|
+
} | {
|
|
990
|
+
lte: [Operand, Operand];
|
|
991
|
+
} | {
|
|
992
|
+
gt: [Operand, Operand];
|
|
993
|
+
} | {
|
|
994
|
+
gte: [Operand, Operand];
|
|
995
|
+
} | {
|
|
996
|
+
exists: Operand;
|
|
997
|
+
} | {
|
|
998
|
+
and: Condition[];
|
|
999
|
+
} | {
|
|
1000
|
+
or: Condition[];
|
|
1001
|
+
} | {
|
|
1002
|
+
not: Condition;
|
|
1490
1003
|
};
|
|
1491
|
-
/** Only keys this reactor registers are judged; an absent key agrees. */
|
|
1492
|
-
declare function holdReason(peer: Supports, versions: {
|
|
1493
|
-
readonly [protocol: string]: number;
|
|
1494
|
-
}, capabilities: readonly PeerCapability[]): HoldReason | undefined;
|
|
1495
|
-
/** Whether a peer runs every version this reactor does, so nothing is held. */
|
|
1496
|
-
declare function coversLocal(peer: Supports, local: Supports, capabilities: readonly PeerCapability[]): boolean;
|
|
1497
1004
|
/**
|
|
1498
|
-
*
|
|
1499
|
-
*
|
|
1500
|
-
* lowest local one. `requested` wins over what is selected.
|
|
1005
|
+
* A condition operand: `attr` is a dotted path into the decision context
|
|
1006
|
+
* (e.g. "doc.global.status", "subject.address"); `lit` is a constant value.
|
|
1501
1007
|
*/
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
requested?: {
|
|
1507
|
-
readonly [protocol: string]: number;
|
|
1508
|
-
};
|
|
1509
|
-
}): {
|
|
1510
|
-
[protocol: string]: number;
|
|
1008
|
+
type Operand = {
|
|
1009
|
+
attr: string;
|
|
1010
|
+
} | {
|
|
1011
|
+
lit: string | number | boolean | null;
|
|
1511
1012
|
};
|
|
1512
1013
|
/**
|
|
1513
|
-
*
|
|
1514
|
-
* negotiated protocol drops to the highest supported version at or below it,
|
|
1515
|
-
* or takes its baseline when absent; another known protocol must be
|
|
1516
|
-
* supported; an unknown one passes, as refusalFor admits it.
|
|
1014
|
+
* The base state of the document.
|
|
1517
1015
|
*/
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1016
|
+
type PHBaseState = {
|
|
1017
|
+
/** Carries authentication information. */
|
|
1018
|
+
auth: PHAuthState;
|
|
1019
|
+
/** Carries information about the document. */
|
|
1020
|
+
document: PHDocumentState;
|
|
1522
1021
|
};
|
|
1022
|
+
declare function defaultGlobalState(): DocumentModelGlobalState;
|
|
1023
|
+
declare function defaultLocalState(): DocumentModelLocalState;
|
|
1024
|
+
declare function defaultPHState(): DocumentModelPHState;
|
|
1025
|
+
declare function createGlobalState(state?: Partial<DocumentModelGlobalState>): DocumentModelGlobalState;
|
|
1026
|
+
declare function createLocalState(state?: Partial<DocumentModelLocalState>): DocumentModelLocalState;
|
|
1027
|
+
declare function createState(baseState?: Partial<PHBaseState>, globalState?: Partial<DocumentModelGlobalState>, localState?: Partial<DocumentModelLocalState>): DocumentModelPHState;
|
|
1523
1028
|
//#endregion
|
|
1524
|
-
//#region document-model/
|
|
1525
|
-
|
|
1526
|
-
type
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
"noop-chain": true;
|
|
1530
|
-
retraction: true;
|
|
1531
|
-
}
|
|
1532
|
-
/** What UNDO and REDO become. */
|
|
1533
|
-
type UndoModel = keyof UndoModelValues;
|
|
1534
|
-
interface SkipMeaningValues {
|
|
1535
|
-
"undo-or-rewind": true;
|
|
1536
|
-
rewind: true;
|
|
1537
|
-
}
|
|
1538
|
-
/** Whether a stored skip can be an undo, or is only a replica's rewind. */
|
|
1539
|
-
type SkipMeaning = keyof SkipMeaningValues;
|
|
1540
|
-
interface TieOrderValues {
|
|
1541
|
-
"rank-locale": true;
|
|
1542
|
-
canonical: true;
|
|
1543
|
-
}
|
|
1544
|
-
/** How same-timestamp actions are ordered. */
|
|
1545
|
-
type TieOrder = keyof TieOrderValues;
|
|
1546
|
-
interface SynthesizedIdFormValues {
|
|
1547
|
-
hashed: true;
|
|
1548
|
-
none: true;
|
|
1549
|
-
}
|
|
1550
|
-
/** How a synthesized row's action id derives from its source's; "none" synthesizes nothing. */
|
|
1551
|
-
type SynthesizedIdForm = keyof SynthesizedIdFormValues;
|
|
1552
|
-
interface ReplayHashValues {
|
|
1553
|
-
sender: true;
|
|
1554
|
-
receiver: true;
|
|
1555
|
-
}
|
|
1556
|
-
/** Whose state hash a received row keeps. */
|
|
1557
|
-
type ReplayHash = keyof ReplayHashValues;
|
|
1558
|
-
interface DerivationModelValues {
|
|
1559
|
-
replay: true;
|
|
1560
|
-
"retraction-rule": true;
|
|
1561
|
-
}
|
|
1562
|
-
/** How a scope's state derives from its rows. */
|
|
1563
|
-
type DerivationModel = keyof DerivationModelValues;
|
|
1564
|
-
interface ReducerContractValues {
|
|
1565
|
-
any: true;
|
|
1566
|
-
"state-reducer": true;
|
|
1567
|
-
}
|
|
1568
|
-
/** Which registered reducers a version runs. */
|
|
1569
|
-
type ReducerContract = keyof ReducerContractValues;
|
|
1570
|
-
interface GatingFlagValues {
|
|
1571
|
-
undoV3: true;
|
|
1572
|
-
}
|
|
1573
|
-
/** A reactor feature flag a version runs only under. */
|
|
1574
|
-
type GatingFlag = keyof GatingFlagValues;
|
|
1575
|
-
type BaseReducerCapabilities = {
|
|
1576
|
-
readonly version: BaseReducerVersion;
|
|
1577
|
-
readonly undo: UndoModel;
|
|
1578
|
-
/** "retraction-rule" derives every scope outside RULE_EXEMPT_SCOPES by the rule. */
|
|
1579
|
-
readonly derivation: DerivationModel;
|
|
1580
|
-
readonly skip: SkipMeaning;
|
|
1581
|
-
readonly tieOrder: TieOrder;
|
|
1582
|
-
readonly synthesizedId: SynthesizedIdForm;
|
|
1583
|
-
readonly replayHash: ReplayHash;
|
|
1584
|
-
/** "state-reducer" runs only models whose every registered reducer createReducer tagged. */
|
|
1585
|
-
readonly reducerContract: ReducerContract;
|
|
1586
|
-
/** The flag this version runs only under; null runs always. */
|
|
1587
|
-
readonly gatedBy: GatingFlag | null;
|
|
1029
|
+
//#region document-model/documents.d.ts
|
|
1030
|
+
/** Meta information about the document. */
|
|
1031
|
+
type PHDocumentMeta = {
|
|
1032
|
+
/** The preferred editor for the document. */
|
|
1033
|
+
preferredEditor?: string;
|
|
1588
1034
|
};
|
|
1589
|
-
/** The versions a reactor running `flags` supports. */
|
|
1590
|
-
declare function baseReducerVersionsFor(flags: PeerCapabilityFlags): BaseReducerVersion[];
|
|
1591
|
-
/** Flags under which this build runs every version it knows. */
|
|
1592
|
-
declare const FLAGS_FOR_EVERY_VERSION: { readonly [F in GatingFlag]: true; };
|
|
1593
|
-
/** Scopes the retraction rule never derives. */
|
|
1594
|
-
declare const RULE_EXEMPT_SCOPES: ReadonlySet<string>;
|
|
1595
|
-
declare function assertNever(value: never, what: string): never;
|
|
1596
|
-
declare function isBaseReducerVersion(value: unknown): value is BaseReducerVersion;
|
|
1597
|
-
declare function capabilitiesOf(version: BaseReducerVersion): BaseReducerCapabilities;
|
|
1598
|
-
/** Throws on a missing version: defaulting one would replay through the wrong reducer. */
|
|
1599
|
-
declare function baseReducerVersion(header: PHDocumentHeader): BaseReducerVersion;
|
|
1600
|
-
/** Throws on a missing or unknown version. */
|
|
1601
|
-
declare function baseReducerCapabilities(header: PHDocumentHeader): BaseReducerCapabilities;
|
|
1602
|
-
/** Undefined only for a header without a version; throws on an unknown one. */
|
|
1603
|
-
declare function optionalBaseReducerCapabilities(header: PHDocumentHeader): BaseReducerCapabilities | undefined;
|
|
1604
|
-
/** Undefined when `versions` names no known base-reducer version. */
|
|
1605
|
-
declare function capabilitiesFor(versions: ProtocolVersions | undefined): BaseReducerCapabilities | undefined;
|
|
1606
|
-
/** From CREATE_DOCUMENT input; undefined when it names no known version. */
|
|
1607
|
-
declare function createdCapabilities(input: Partial<CreateDocumentActionInput> | undefined): BaseReducerCapabilities | undefined;
|
|
1608
1035
|
/**
|
|
1609
|
-
*
|
|
1610
|
-
* and the other protocol owners, an axis is read only through these or through
|
|
1611
|
-
* an exhaustive switch.
|
|
1036
|
+
* The header of a document.
|
|
1612
1037
|
*/
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1038
|
+
type PHDocumentHeader = {
|
|
1039
|
+
/**
|
|
1040
|
+
* The id of the document.
|
|
1041
|
+
*
|
|
1042
|
+
* This is a Ed25519 signature and is immutable.
|
|
1043
|
+
**/
|
|
1044
|
+
id: string;
|
|
1045
|
+
/**
|
|
1046
|
+
* Information to verify the document creator.
|
|
1047
|
+
*
|
|
1048
|
+
* This is immutable.
|
|
1049
|
+
**/
|
|
1050
|
+
sig: PHDocumentSignatureInfo;
|
|
1051
|
+
/**
|
|
1052
|
+
* The type of the document.
|
|
1053
|
+
*
|
|
1054
|
+
* This is used as part of the signature payload and thus, cannot be changed
|
|
1055
|
+
* after the document header has been created.
|
|
1056
|
+
**/
|
|
1057
|
+
documentType: string;
|
|
1058
|
+
/**
|
|
1059
|
+
* The timestamp of the creation date of the document, in UTC ISO format.
|
|
1060
|
+
*
|
|
1061
|
+
* This is used as part of the signature payload and thus, cannot be changed
|
|
1062
|
+
* after the document header has been created.
|
|
1063
|
+
**/
|
|
1064
|
+
createdAtUtcIso: string;
|
|
1065
|
+
/** The slug of the document. */
|
|
1066
|
+
slug: string;
|
|
1067
|
+
/** The name of the document. */
|
|
1068
|
+
name: string;
|
|
1069
|
+
/** The branch of this document. */
|
|
1070
|
+
branch: string;
|
|
1071
|
+
/**
|
|
1072
|
+
* The revision of each scope of the document. This object is updated every
|
|
1073
|
+
* time any _other_ scope is updated.
|
|
1074
|
+
*/
|
|
1075
|
+
revision: {
|
|
1076
|
+
[scope: string]: number;
|
|
1629
1077
|
};
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1078
|
+
/**
|
|
1079
|
+
* The timestamp of the last change in the document, in UTC ISO format.
|
|
1080
|
+
**/
|
|
1081
|
+
lastModifiedAtUtcIso: string;
|
|
1082
|
+
/**
|
|
1083
|
+
* This is a map from protocol name to version. A protocol can be any set of
|
|
1084
|
+
* rules that are applied to the document.
|
|
1085
|
+
*
|
|
1086
|
+
* Examples of protocols include:
|
|
1087
|
+
*
|
|
1088
|
+
* - "base-reducer"
|
|
1089
|
+
*/
|
|
1090
|
+
protocolVersions?: {
|
|
1091
|
+
[key: string]: number;
|
|
1633
1092
|
};
|
|
1093
|
+
/** Meta information about the document. */
|
|
1094
|
+
meta?: PHDocumentMeta;
|
|
1634
1095
|
};
|
|
1635
|
-
/**
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1096
|
+
/**
|
|
1097
|
+
* The base type of a document model.
|
|
1098
|
+
*
|
|
1099
|
+
* @remarks
|
|
1100
|
+
* This type is extended by all Document models.
|
|
1101
|
+
*
|
|
1102
|
+
* @typeParam TState - The type of the document state.
|
|
1103
|
+
*/
|
|
1104
|
+
type PHDocument$1<TState extends PHBaseState = PHBaseState> = {
|
|
1105
|
+
/** The header of the document. */
|
|
1106
|
+
header: PHDocumentHeader;
|
|
1107
|
+
/** The document model specific state. */
|
|
1108
|
+
state: TState;
|
|
1109
|
+
/**
|
|
1110
|
+
* The initial state of the document, enabling replaying operations.
|
|
1111
|
+
*
|
|
1112
|
+
* This will be removed in a future release.
|
|
1113
|
+
*/
|
|
1114
|
+
initialState: TState;
|
|
1115
|
+
/**
|
|
1116
|
+
* The operations history of the document.
|
|
1117
|
+
*
|
|
1118
|
+
* Only documents built by reducers carry it. Documents read from a reactor,
|
|
1119
|
+
* such as an editor's `document` in Connect, have an empty array per scope;
|
|
1120
|
+
* read their history with `useDocumentOperations(document.header.id, scope)`
|
|
1121
|
+
* and their operation count with `header.revision[scope]`.
|
|
1122
|
+
*
|
|
1123
|
+
* This will be removed in a future release.
|
|
1124
|
+
*/
|
|
1125
|
+
operations: DocumentOperations;
|
|
1126
|
+
/**
|
|
1127
|
+
* A list of undone operations
|
|
1128
|
+
*
|
|
1129
|
+
* This will be removed in a future release.
|
|
1130
|
+
*/
|
|
1131
|
+
clipboard: Operation[];
|
|
1132
|
+
};
|
|
1133
|
+
declare function isNoopOperation<TOp extends {
|
|
1134
|
+
type: string;
|
|
1135
|
+
skip: number;
|
|
1136
|
+
hash: string;
|
|
1137
|
+
}>(op: Partial<TOp>): boolean;
|
|
1138
|
+
declare function isUndoRedo(action: Action): action is UndoRedoAction;
|
|
1139
|
+
declare function isUndo(action: Action): action is UndoAction;
|
|
1140
|
+
/**
|
|
1141
|
+
* Creates a new document. When `documentType` is given the header is stamped
|
|
1142
|
+
* with it and the document-scope operations are seeded. Without
|
|
1143
|
+
* `protocolVersions` the document is v2-required and takes a derived id; with
|
|
1144
|
+
* them it is v2-required only if they say so (see {@link protocolVersionsFor}).
|
|
1145
|
+
*/
|
|
1146
|
+
declare function baseCreateDocument<TState extends PHBaseState = PHBaseState>(createState: CreateState<TState>, initialState?: Partial<TState>, documentType?: string, protocolVersions?: ProtocolVersions): PHDocument$1<TState>;
|
|
1147
|
+
/**
|
|
1148
|
+
* `document`, not yet created, under a fresh header for `policy`. A legacy
|
|
1149
|
+
* header takes `id` when given; a v2-required one ignores `id` and derives its
|
|
1150
|
+
* own, so a caller that needs a fixed id must ask for legacy.
|
|
1151
|
+
* `protocolVersions` are merged over the document's. Name, slug, branch and
|
|
1152
|
+
* meta carry over. A document already under `policy` is returned as is unless
|
|
1153
|
+
* a legacy `id` or `protocolVersions` are given.
|
|
1154
|
+
*/
|
|
1155
|
+
declare function withSignaturePolicy<TDocument extends PHDocument$1>(document: TDocument, policy: SignaturePolicy$1, options?: {
|
|
1156
|
+
id?: string;
|
|
1157
|
+
protocolVersions?: ProtocolVersions;
|
|
1158
|
+
}): TDocument;
|
|
1159
|
+
declare function hashDocumentStateForScope(document: {
|
|
1160
|
+
state: {
|
|
1161
|
+
[key: string]: unknown;
|
|
1162
|
+
};
|
|
1163
|
+
}, scope?: string): string;
|
|
1164
|
+
declare function readOnly<T>(value: T): Readonly<T>;
|
|
1165
|
+
/**
|
|
1166
|
+
* Maps skipped operations in an array of operations.
|
|
1167
|
+
* Skipped operations are operations that are ignored during processing.
|
|
1168
|
+
* @param operations - The array of operations to map.
|
|
1169
|
+
* @param skippedHeadOperations - The number of operations to skip at the head of the array of operations.
|
|
1170
|
+
* @returns An array of mapped operations with ignore flag indicating if the operation is skipped.
|
|
1171
|
+
* @throws Error if the operation index is invalid and there are missing operations.
|
|
1172
|
+
*/
|
|
1173
|
+
declare function mapSkippedOperations(operations: Operation[], skippedHeadOperations?: number): MappedOperation[];
|
|
1174
|
+
/**
|
|
1175
|
+
* V2 version of mapSkippedOperations for protocol version 2+.
|
|
1176
|
+
* In V2, all NOOPs have skip=1 and consecutive NOOPs form chains.
|
|
1177
|
+
* N consecutive NOOPs at any point skip N preceding content operations.
|
|
1178
|
+
*
|
|
1179
|
+
* Algorithm: Process from end to start
|
|
1180
|
+
* - When hitting a NOOP: increment chain length, mark as ignored
|
|
1181
|
+
* - When hitting a non-NOOP:
|
|
1182
|
+
* - If chain > 0: decrement chain, mark as ignored (this op was undone)
|
|
1183
|
+
* - If chain == 0: mark as not ignored (apply this op)
|
|
1184
|
+
*/
|
|
1185
|
+
declare function mapSkippedOperationsV2(operations: Operation[]): MappedOperation[];
|
|
1186
|
+
/**
|
|
1187
|
+
* V2 garbage collect that returns only operations that should be applied for state.
|
|
1188
|
+
* Uses the V2 model where consecutive NOOPs form chains.
|
|
1189
|
+
* Unlike V1 garbageCollect, this preserves ALL operations but marks which to apply.
|
|
1190
|
+
*/
|
|
1191
|
+
declare function garbageCollectV2<TOpIndex extends OperationIndex>(sortedOperations: TOpIndex[]): TOpIndex[];
|
|
1192
|
+
declare function sortMappedOperations(operations: DocumentOperationsIgnoreMap): MappedOperation[];
|
|
1193
|
+
/**
|
|
1194
|
+
* Records an operation in the history without applying it, which is what a
|
|
1195
|
+
* denied operation needs: it occupies its index and contributes no state.
|
|
1196
|
+
*
|
|
1197
|
+
* The scope defaults to the action's own, and is passed explicitly by a rebuild
|
|
1198
|
+
* that is walking one stream and does not want to trust the action's copy.
|
|
1199
|
+
*/
|
|
1200
|
+
declare function appendWithoutApplying<TState extends PHBaseState>(document: PHDocument$1<TState>, operation: Operation, scope?: string): PHDocument$1<TState>;
|
|
1201
|
+
/** The state reducer base-reducer 3 derives with; throws when `reducer` wraps none. */
|
|
1202
|
+
declare function requireStateReducer<TState extends PHBaseState = PHBaseState>(reducer: Reducer<TState>, documentType: string, version?: number): StateReducer<TState>;
|
|
1203
|
+
/** Rejects the index gaps the reducer rejects when it appends a replayed row. */
|
|
1204
|
+
declare function assertReplayIndices(operations: readonly Operation[]): void;
|
|
1205
|
+
declare function appendRows<TState extends PHBaseState>(document: PHDocument$1<TState>, scope: string, rows: readonly Operation[]): PHDocument$1<TState>;
|
|
1206
|
+
declare function replayDocument<TState extends PHBaseState = PHBaseState>(initialState: TState, operations: DocumentOperations, reducer: Reducer<TState>, header: PHDocumentHeader, dispatch?: SignalDispatch, skipHeaderOperations?: SkipHeaderOperations, options?: ReplayDocumentOptions): PHDocument$1<TState>;
|
|
1207
|
+
declare function parseResultingState<TState>(state: string | null | undefined): TState;
|
|
1208
|
+
declare enum IntegrityIssueType {
|
|
1209
|
+
UNEXPECTED_INDEX = "UNEXPECTED_INDEX"
|
|
1210
|
+
}
|
|
1211
|
+
declare enum IntegrityIssueSubType {
|
|
1212
|
+
DUPLICATED_INDEX = "DUPLICATED_INDEX",
|
|
1213
|
+
MISSING_INDEX = "MISSING_INDEX"
|
|
1214
|
+
}
|
|
1215
|
+
type IntegrityIssue = {
|
|
1216
|
+
operation: OperationIndex;
|
|
1217
|
+
issue: IntegrityIssueType;
|
|
1218
|
+
category: IntegrityIssueSubType;
|
|
1219
|
+
message: string;
|
|
1220
|
+
};
|
|
1221
|
+
type Reshuffle = (startIndex: OperationIndex, opsA: Operation[], opsB: Operation[]) => Operation[];
|
|
1222
|
+
declare function checkCleanedOperationsIntegrity(sortedOperations: OperationIndex[]): IntegrityIssue[];
|
|
1223
|
+
declare function addUndo(sortedOperations: Operation[]): Operation[];
|
|
1224
|
+
declare function reshuffleByTimestamp<TOp extends OperationIndex>(startIndex: OperationIndex, opsA: TOp[], opsB: TOp[]): TOp[];
|
|
1225
|
+
declare function reshuffleByTimestampAndIndex<TOp extends OperationIndex>(startIndex: OperationIndex, opsA: TOp[], opsB: TOp[]): TOp[];
|
|
1226
|
+
declare function operationsAreEqual<TOp extends {
|
|
1227
|
+
index: number;
|
|
1228
|
+
skip: number;
|
|
1229
|
+
type?: string;
|
|
1230
|
+
scope?: string;
|
|
1231
|
+
input?: unknown;
|
|
1232
|
+
}>(op1: TOp, op2: TOp): boolean;
|
|
1233
|
+
declare function attachBranch(trunk: Operation[], newBranch: Operation[]): [Operation[], Operation[]];
|
|
1234
|
+
declare function precedes(op1: OperationIndex, op2: OperationIndex): boolean;
|
|
1235
|
+
declare function split(sortedTargetOperations: Operation[], sortedMergeOperations: Operation[]): [Operation[], Operation[], Operation[]];
|
|
1236
|
+
declare function merge(sortedTargetOperations: Operation[], sortedMergeOperations: Operation[], reshuffle: Reshuffle): Operation[];
|
|
1237
|
+
declare function checkOperationsIntegrity(operations: Operation[]): IntegrityIssue[];
|
|
1238
|
+
declare function groupOperationsByScope(operations: Operation[]): Partial<Record<string, Operation[]>>;
|
|
1239
|
+
type PrepareOperationsResult = {
|
|
1240
|
+
validOperations: Operation[];
|
|
1241
|
+
invalidOperations: Operation[];
|
|
1242
|
+
duplicatedOperations: Operation[];
|
|
1243
|
+
integrityIssues: IntegrityIssue[];
|
|
1244
|
+
};
|
|
1245
|
+
declare function prepareOperations(operationsHistory: Operation[], newOperations: Operation[]): PrepareOperationsResult;
|
|
1246
|
+
declare function removeExistingOperations(newOperations: Operation[], operationsHistory: Operation[]): Operation[];
|
|
1247
|
+
/**
|
|
1248
|
+
* Skips header operations and returns the remaining operations.
|
|
1249
|
+
*
|
|
1250
|
+
* @param operations - The array of operations.
|
|
1251
|
+
* @param skipHeaderOperation - The skip header operation index.
|
|
1252
|
+
* @returns The remaining operations after skipping header operations.
|
|
1253
|
+
*/
|
|
1254
|
+
declare function skipHeaderOperations(operations: Operation[], skipHeaderOperation: SkipHeaderOperationIndex): Operation[];
|
|
1255
|
+
declare function garbageCollectDocumentOperations(documentOperations: DocumentOperations): DocumentOperations;
|
|
1256
|
+
/**
|
|
1257
|
+
* Filters out duplicated operations from the target operations array based on their IDs.
|
|
1258
|
+
* If an operation has an ID, it is considered duplicated if there is another operation in the source operations array with the same ID.
|
|
1259
|
+
* If an operation does not have an ID, it is considered unique and will not be filtered out.
|
|
1260
|
+
* @param targetOperations - The array of target operations to filter.
|
|
1261
|
+
* @param sourceOperations - The array of source operations to compare against.
|
|
1262
|
+
* @returns An array of operations with duplicates filtered out.
|
|
1263
|
+
*/
|
|
1264
|
+
declare function filterDuplicatedOperations<T extends {
|
|
1265
|
+
id?: string | number;
|
|
1266
|
+
}>(targetOperations: T[], sourceOperations: T[]): T[];
|
|
1267
|
+
declare function filterDocumentOperationsResultingState(documentOperations?: DocumentOperations): {
|
|
1268
|
+
[x: string]: Operation[] | {
|
|
1269
|
+
id: string;
|
|
1270
|
+
index: number;
|
|
1271
|
+
skip: number;
|
|
1272
|
+
timestampUtcMs: string;
|
|
1273
|
+
hash: string;
|
|
1274
|
+
error?: string;
|
|
1275
|
+
errorName?: string;
|
|
1276
|
+
errorCode?: string;
|
|
1277
|
+
deniedReason?: string;
|
|
1278
|
+
action: Action;
|
|
1279
|
+
}[];
|
|
1280
|
+
};
|
|
1281
|
+
/**
|
|
1282
|
+
* Calculates the difference between two arrays of operations.
|
|
1283
|
+
* Returns an array of operations that are present in `clearedOperationsA` but not in `clearedOperationsB`.
|
|
1284
|
+
*
|
|
1285
|
+
* @template TOp - The type of the operations.
|
|
1286
|
+
* @param {TOp[]} clearedOperationsA - The first array of operations.
|
|
1287
|
+
* @param {TOp[]} clearedOperationsB - The second array of operations.
|
|
1288
|
+
* @returns {TOp[]} - The difference between the two arrays of operations.
|
|
1289
|
+
*/
|
|
1290
|
+
declare function diffOperations<TOp extends OperationIndex>(clearedOperationsA: TOp[], clearedOperationsB: TOp[]): TOp[];
|
|
1291
|
+
declare function getDocumentLastModified(document: PHDocument$1): string;
|
|
1292
|
+
/** `revision` with a 0 for each scope of `state` it lacks; auth is not a model scope, so it is left out. */
|
|
1293
|
+
declare function withScopeRevisions(revision: PHDocumentHeader["revision"], state: object): PHDocumentHeader["revision"];
|
|
1294
|
+
/**
|
|
1295
|
+
* Updates the document header with the latest revision number and
|
|
1296
|
+
* date of last modification.
|
|
1297
|
+
*
|
|
1298
|
+
* @param document The current state of the document.
|
|
1299
|
+
* @param scope The scope of the operation.
|
|
1300
|
+
* @param lastModifiedTimestamp Optional timestamp to use directly, avoiding a scan of all operations.
|
|
1301
|
+
* @returns The updated document state.
|
|
1302
|
+
*/
|
|
1303
|
+
declare function updateHeaderRevision(document: PHDocument$1, scope: string, lastModifiedTimestamp?: string): PHDocument$1;
|
|
1304
|
+
//#endregion
|
|
1305
|
+
//#region document-model/actions.d.ts
|
|
1306
|
+
/**
|
|
1307
|
+
* Cancels the last `count` operations.
|
|
1308
|
+
*
|
|
1309
|
+
* @param count - Number of operations to cancel
|
|
1310
|
+
* @category Actions
|
|
1311
|
+
*/
|
|
1312
|
+
declare const undo: (count?: number, scope?: string) => UndoAction;
|
|
1313
|
+
/**
|
|
1314
|
+
* Cancels the last `count` {@link undo | UNDO} operations.
|
|
1315
|
+
*
|
|
1316
|
+
* @param count - Number of UNDO operations to cancel
|
|
1317
|
+
* @category Actions
|
|
1318
|
+
*/
|
|
1319
|
+
declare const redo: (count?: number, scope?: string) => RedoAction;
|
|
1320
|
+
declare const noop: (scope?: string) => NOOPAction;
|
|
1321
|
+
/**
|
|
1322
|
+
* Retracts the action with id `target` on base-reducer 3.
|
|
1323
|
+
*
|
|
1324
|
+
* @category Actions
|
|
1325
|
+
*/
|
|
1326
|
+
declare const retract: (target: string, scope?: string) => RetractAction;
|
|
1327
|
+
/**
|
|
1328
|
+
* Helper function to be used by action creators.
|
|
1329
|
+
*
|
|
1330
|
+
* @remarks
|
|
1331
|
+
* Creates an action with the given type and input properties. The input
|
|
1332
|
+
* properties default to an empty object.
|
|
1333
|
+
*
|
|
1334
|
+
* @typeParam A - Type of the action to be returned.
|
|
1335
|
+
*
|
|
1336
|
+
* @param type - The type of the action.
|
|
1337
|
+
* @param input - The input properties of the action.
|
|
1338
|
+
* @param _attachments - Deprecated and ignored. Retained so action creators
|
|
1339
|
+
* generated before the attachment-system removal keep their 5-argument shape.
|
|
1340
|
+
* @param validator - The validator to use for the input properties.
|
|
1341
|
+
* @param scope - The scope of the action, can either be 'global' or 'local'.
|
|
1342
|
+
*
|
|
1343
|
+
* @throws Error if the type is empty or not a string.
|
|
1344
|
+
*
|
|
1345
|
+
* @returns The new action.
|
|
1346
|
+
*/
|
|
1347
|
+
declare function createAction<TAction extends Action>(type: TAction["type"], input?: TAction["input"], _attachments?: unknown, validator?: () => {
|
|
1348
|
+
parse(v: unknown): TAction["input"];
|
|
1349
|
+
}, scope?: Action["scope"]): TAction;
|
|
1350
|
+
/**
|
|
1351
|
+
* This function should be used instead of { ...action } to ensure
|
|
1352
|
+
* that extra properties are not included in the action.
|
|
1353
|
+
*/
|
|
1354
|
+
declare const actionFromAction: (action: Action) => Action;
|
|
1355
|
+
declare const operationFromAction: (action: Action, index: number, skip: number, context: OperationContext) => Operation;
|
|
1356
|
+
declare const operationFromOperation: (operation: Operation, index: number, skip: number, context: OperationContext) => Operation;
|
|
1357
|
+
declare const operationWithContext: (operation: Operation, context: ActionContext) => Operation;
|
|
1358
|
+
declare const actionContext: () => ActionContext;
|
|
1359
|
+
declare const actionSigner: (user: UserActionSigner, app: AppActionSigner, signatures?: Signature[]) => ActionSigner;
|
|
1360
|
+
declare function buildOperationSignature(context: ActionSignatureContext, signMethod: ActionSigningHandler): Promise<Signature>;
|
|
1361
|
+
/** @deprecated Emits a legacy SHA-1 tuple; sign through `ISigner.signAction`. */
|
|
1362
|
+
declare function buildSignedAction<TState extends PHBaseState = PHBaseState>(action: Action, reducer: Reducer<TState>, document: PHDocument$1<TState>, signer: ActionSigner, signHandler: ActionSigningHandler): Promise<Operation>;
|
|
1363
|
+
/** @deprecated Use `verifyActionSignature` from `@powerhousedao/reactor`. */
|
|
1364
|
+
declare function verifyOperationSignature(signature: Signature, signer: Omit<ActionSigner, "signatures">, verifyHandler: ActionVerificationHandler): Promise<boolean>;
|
|
1365
|
+
/**
|
|
1366
|
+
* Changes the name of the document.
|
|
1367
|
+
*
|
|
1368
|
+
* @param name - The name to be set in the document.
|
|
1369
|
+
* @category Actions
|
|
1370
|
+
*/
|
|
1371
|
+
declare const setName: (name: string | {
|
|
1372
|
+
name: string;
|
|
1373
|
+
}) => SetNameAction;
|
|
1374
|
+
/**
|
|
1375
|
+
* Changes the preferred editor recorded in the document header meta.
|
|
1376
|
+
*
|
|
1377
|
+
* Passing `null` clears the preferred editor.
|
|
1378
|
+
*
|
|
1379
|
+
* @category Actions
|
|
1380
|
+
*/
|
|
1381
|
+
declare const setPreferredEditor: (input: string | null | {
|
|
1382
|
+
preferredEditor: string | null;
|
|
1383
|
+
}) => SetPreferredEditorAction;
|
|
1384
|
+
/**
|
|
1385
|
+
* Gives the document a slug, its name on the reactor that serves it. The last
|
|
1386
|
+
* document to claim a slug holds it.
|
|
1387
|
+
*
|
|
1388
|
+
* @category Actions
|
|
1389
|
+
*/
|
|
1390
|
+
declare const setSlug: (slug: string) => SetSlugAction;
|
|
1391
|
+
declare const setModelName: (input: SetModelNameInput) => SetModelNameAction;
|
|
1392
|
+
declare const setModelId: (input: SetModelIdInput) => SetModelIdAction;
|
|
1393
|
+
declare const setModelExtension: (input: SetModelExtensionInput) => SetModelExtensionAction;
|
|
1394
|
+
declare const setModelDescription: (input: SetModelDescriptionInput) => SetModelDescriptionAction;
|
|
1395
|
+
declare const setAuthorName: (input: SetAuthorNameInput) => SetAuthorNameAction;
|
|
1396
|
+
declare const setAuthorWebsite: (input: SetAuthorWebsiteInput) => SetAuthorWebsiteAction;
|
|
1397
|
+
declare const addModule: (input: AddModuleInput) => AddModuleAction;
|
|
1398
|
+
declare const setModuleName: (input: SetModuleNameInput) => SetModuleNameAction;
|
|
1399
|
+
declare const setModuleDescription: (input: SetModuleDescriptionInput) => SetModuleDescriptionAction;
|
|
1400
|
+
declare const deleteModule: (input: DeleteModuleInput) => DeleteModuleAction;
|
|
1401
|
+
declare const reorderModules: (input: ReorderModulesInput) => ReorderModulesAction;
|
|
1402
|
+
declare const addOperation: (input: AddOperationInput) => AddOperationAction;
|
|
1403
|
+
declare const setOperationName: (input: SetOperationNameInput) => SetOperationNameAction;
|
|
1404
|
+
declare const setOperationScope: (input: SetOperationScopeInput) => SetOperationScopeAction;
|
|
1405
|
+
declare const setOperationSchema: (input: SetOperationSchemaInput) => SetOperationSchemaAction;
|
|
1406
|
+
declare const setOperationDescription: (input: SetOperationDescriptionInput) => SetOperationDescriptionAction;
|
|
1407
|
+
declare const setOperationTemplate: (input: SetOperationTemplateInput) => SetOperationTemplateAction;
|
|
1408
|
+
declare const setOperationReducer: (input: SetOperationReducerInput) => SetOperationReducerAction;
|
|
1409
|
+
declare const moveOperation: (input: MoveOperationInput) => MoveOperationAction;
|
|
1410
|
+
declare const deleteOperation: (input: DeleteOperationInput) => DeleteOperationAction;
|
|
1411
|
+
declare const reorderModuleOperations: (input: ReorderModuleOperationsInput) => ReorderModuleOperationsAction;
|
|
1412
|
+
declare const addOperationError: (input: AddOperationErrorInput) => AddOperationErrorAction;
|
|
1413
|
+
declare const setOperationErrorCode: (input: SetOperationErrorCodeInput) => SetOperationErrorCodeAction;
|
|
1414
|
+
declare const setOperationErrorName: (input: SetOperationErrorNameInput) => SetOperationErrorNameAction;
|
|
1415
|
+
declare const setOperationErrorDescription: (input: SetOperationErrorDescriptionInput) => SetOperationErrorDescriptionAction;
|
|
1416
|
+
declare const setOperationErrorTemplate: (input: SetOperationErrorTemplateInput) => SetOperationErrorTemplateAction;
|
|
1417
|
+
declare const deleteOperationError: (input: DeleteOperationErrorInput) => DeleteOperationErrorAction;
|
|
1418
|
+
declare const reorderOperationErrors: (input: ReorderOperationErrorsInput) => ReorderOperationErrorsAction;
|
|
1419
|
+
declare const addOperationExample: (input: AddOperationExampleInput) => AddOperationExampleAction;
|
|
1420
|
+
declare const updateOperationExample: (input: UpdateOperationExampleInput) => UpdateOperationExampleAction;
|
|
1421
|
+
declare const deleteOperationExample: (input: DeleteOperationExampleInput) => DeleteOperationExampleAction;
|
|
1422
|
+
declare const reorderOperationExamples: (input: ReorderOperationExamplesInput) => ReorderOperationExamplesAction;
|
|
1423
|
+
declare const operationExampleCreators: {
|
|
1424
|
+
addOperationExample: typeof addOperationExample;
|
|
1425
|
+
updateOperationExample: typeof updateOperationExample;
|
|
1426
|
+
deleteOperationExample: typeof deleteOperationExample;
|
|
1427
|
+
reorderOperationExamples: typeof reorderOperationExamples;
|
|
1428
|
+
};
|
|
1429
|
+
declare const setStateSchema: (input: SetStateSchemaInput) => SetStateSchemaAction;
|
|
1430
|
+
declare const setInitialState: (input: SetInitialStateInput) => SetInitialStateAction;
|
|
1431
|
+
declare const addStateExample: (input: AddStateExampleInput) => AddStateExampleAction;
|
|
1432
|
+
declare const updateStateExample: (input: UpdateStateExampleInput) => UpdateStateExampleAction;
|
|
1433
|
+
declare const deleteStateExample: (input: DeleteStateExampleInput) => DeleteStateExampleAction;
|
|
1434
|
+
declare const reorderStateExamples: (input: ReorderStateExamplesInput) => ReorderStateExamplesAction;
|
|
1435
|
+
declare const addChangeLogItem: (input: AddChangeLogItemInput) => AddChangeLogItemAction;
|
|
1436
|
+
declare const updateChangeLogItem: (input: UpdateChangeLogItemInput) => UpdateChangeLogItemAction;
|
|
1437
|
+
declare const deleteChangeLogItem: (input: DeleteChangeLogItemInput) => DeleteChangeLogItemAction;
|
|
1438
|
+
declare const reorderChangeLogItems: (input: ReorderChangeLogItemsInput) => ReorderChangeLogItemsAction;
|
|
1439
|
+
declare const releaseNewVersion: () => ReleaseNewVersionAction;
|
|
1440
|
+
declare const baseActions: {
|
|
1441
|
+
setName: typeof setName;
|
|
1442
|
+
setPreferredEditor: typeof setPreferredEditor;
|
|
1443
|
+
setSlug: typeof setSlug;
|
|
1444
|
+
undo: typeof undo;
|
|
1445
|
+
redo: typeof redo;
|
|
1446
|
+
noop: typeof noop;
|
|
1447
|
+
};
|
|
1448
|
+
declare const documentModelActions: {
|
|
1449
|
+
setModelName: typeof setModelName;
|
|
1450
|
+
setModelId: typeof setModelId;
|
|
1451
|
+
setModelExtension: typeof setModelExtension;
|
|
1452
|
+
setModelDescription: typeof setModelDescription;
|
|
1453
|
+
setAuthorName: typeof setAuthorName;
|
|
1454
|
+
setAuthorWebsite: typeof setAuthorWebsite;
|
|
1455
|
+
addModule: typeof addModule;
|
|
1456
|
+
setModuleName: typeof setModuleName;
|
|
1457
|
+
setModuleDescription: typeof setModuleDescription;
|
|
1458
|
+
deleteModule: typeof deleteModule;
|
|
1459
|
+
reorderModules: typeof reorderModules;
|
|
1460
|
+
addOperation: typeof addOperation;
|
|
1461
|
+
setOperationName: typeof setOperationName;
|
|
1462
|
+
setOperationScope: typeof setOperationScope;
|
|
1463
|
+
setOperationSchema: typeof setOperationSchema;
|
|
1464
|
+
setOperationDescription: typeof setOperationDescription;
|
|
1465
|
+
setOperationTemplate: typeof setOperationTemplate;
|
|
1466
|
+
setOperationReducer: typeof setOperationReducer;
|
|
1467
|
+
moveOperation: typeof moveOperation;
|
|
1468
|
+
deleteOperation: typeof deleteOperation;
|
|
1469
|
+
reorderModuleOperations: typeof reorderModuleOperations;
|
|
1470
|
+
addOperationError: typeof addOperationError;
|
|
1471
|
+
setOperationErrorCode: typeof setOperationErrorCode;
|
|
1472
|
+
setOperationErrorName: typeof setOperationErrorName;
|
|
1473
|
+
setOperationErrorDescription: typeof setOperationErrorDescription;
|
|
1474
|
+
setOperationErrorTemplate: typeof setOperationErrorTemplate;
|
|
1475
|
+
deleteOperationError: typeof deleteOperationError;
|
|
1476
|
+
reorderOperationErrors: typeof reorderOperationErrors;
|
|
1477
|
+
addOperationExample: typeof addOperationExample;
|
|
1478
|
+
updateOperationExample: typeof updateOperationExample;
|
|
1479
|
+
deleteOperationExample: typeof deleteOperationExample;
|
|
1480
|
+
reorderOperationExamples: typeof reorderOperationExamples;
|
|
1481
|
+
setStateSchema: typeof setStateSchema;
|
|
1482
|
+
setInitialState: typeof setInitialState;
|
|
1483
|
+
addStateExample: typeof addStateExample;
|
|
1484
|
+
updateStateExample: typeof updateStateExample;
|
|
1485
|
+
deleteStateExample: typeof deleteStateExample;
|
|
1486
|
+
reorderStateExamples: typeof reorderStateExamples;
|
|
1487
|
+
addChangeLogItem: typeof addChangeLogItem;
|
|
1488
|
+
updateChangeLogItem: typeof updateChangeLogItem;
|
|
1489
|
+
deleteChangeLogItem: typeof deleteChangeLogItem;
|
|
1490
|
+
reorderChangeLogItems: typeof reorderChangeLogItems;
|
|
1491
|
+
releaseNewVersion: typeof releaseNewVersion;
|
|
1665
1492
|
};
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1493
|
+
declare const actions: {
|
|
1494
|
+
setName: typeof setName;
|
|
1495
|
+
setPreferredEditor: typeof setPreferredEditor;
|
|
1496
|
+
setSlug: typeof setSlug;
|
|
1497
|
+
undo: typeof undo;
|
|
1498
|
+
redo: typeof redo;
|
|
1499
|
+
noop: typeof noop;
|
|
1500
|
+
setModelName: typeof setModelName;
|
|
1501
|
+
setModelId: typeof setModelId;
|
|
1502
|
+
setModelExtension: typeof setModelExtension;
|
|
1503
|
+
setModelDescription: typeof setModelDescription;
|
|
1504
|
+
setAuthorName: typeof setAuthorName;
|
|
1505
|
+
setAuthorWebsite: typeof setAuthorWebsite;
|
|
1506
|
+
addModule: typeof addModule;
|
|
1507
|
+
setModuleName: typeof setModuleName;
|
|
1508
|
+
setModuleDescription: typeof setModuleDescription;
|
|
1509
|
+
deleteModule: typeof deleteModule;
|
|
1510
|
+
reorderModules: typeof reorderModules;
|
|
1511
|
+
addOperation: typeof addOperation;
|
|
1512
|
+
setOperationName: typeof setOperationName;
|
|
1513
|
+
setOperationScope: typeof setOperationScope;
|
|
1514
|
+
setOperationSchema: typeof setOperationSchema;
|
|
1515
|
+
setOperationDescription: typeof setOperationDescription;
|
|
1516
|
+
setOperationTemplate: typeof setOperationTemplate;
|
|
1517
|
+
setOperationReducer: typeof setOperationReducer;
|
|
1518
|
+
moveOperation: typeof moveOperation;
|
|
1519
|
+
deleteOperation: typeof deleteOperation;
|
|
1520
|
+
reorderModuleOperations: typeof reorderModuleOperations;
|
|
1521
|
+
addOperationError: typeof addOperationError;
|
|
1522
|
+
setOperationErrorCode: typeof setOperationErrorCode;
|
|
1523
|
+
setOperationErrorName: typeof setOperationErrorName;
|
|
1524
|
+
setOperationErrorDescription: typeof setOperationErrorDescription;
|
|
1525
|
+
setOperationErrorTemplate: typeof setOperationErrorTemplate;
|
|
1526
|
+
deleteOperationError: typeof deleteOperationError;
|
|
1527
|
+
reorderOperationErrors: typeof reorderOperationErrors;
|
|
1528
|
+
addOperationExample: typeof addOperationExample;
|
|
1529
|
+
updateOperationExample: typeof updateOperationExample;
|
|
1530
|
+
deleteOperationExample: typeof deleteOperationExample;
|
|
1531
|
+
reorderOperationExamples: typeof reorderOperationExamples;
|
|
1532
|
+
setStateSchema: typeof setStateSchema;
|
|
1533
|
+
setInitialState: typeof setInitialState;
|
|
1534
|
+
addStateExample: typeof addStateExample;
|
|
1535
|
+
updateStateExample: typeof updateStateExample;
|
|
1536
|
+
deleteStateExample: typeof deleteStateExample;
|
|
1537
|
+
reorderStateExamples: typeof reorderStateExamples;
|
|
1538
|
+
addChangeLogItem: typeof addChangeLogItem;
|
|
1539
|
+
updateChangeLogItem: typeof updateChangeLogItem;
|
|
1540
|
+
deleteChangeLogItem: typeof deleteChangeLogItem;
|
|
1541
|
+
reorderChangeLogItems: typeof reorderChangeLogItems;
|
|
1542
|
+
releaseNewVersion: typeof releaseNewVersion;
|
|
1684
1543
|
};
|
|
1685
1544
|
/**
|
|
1686
|
-
*
|
|
1687
|
-
* An unregistered type cannot be checked, so it takes the highest version
|
|
1688
|
-
* that needs no tagged reducer.
|
|
1545
|
+
* The context of an action.
|
|
1689
1546
|
*/
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1547
|
+
type ActionContext = {
|
|
1548
|
+
/** The index of the previous operation, showing intended ordering. */
|
|
1549
|
+
prevOpIndex?: number;
|
|
1550
|
+
/** The hash of the previous operation, showing intended state. */
|
|
1551
|
+
prevOpHash?: string;
|
|
1552
|
+
/** A nonce, to cover specific signing attacks and to prevent replay attacks from no-ops. */
|
|
1553
|
+
nonce?: string;
|
|
1554
|
+
/** The signer of the action. */
|
|
1555
|
+
signer?: ActionSigner;
|
|
1556
|
+
};
|
|
1699
1557
|
/**
|
|
1700
|
-
*
|
|
1701
|
-
* any character outside the alphabet.
|
|
1558
|
+
* Defines the basic structure of an action.
|
|
1702
1559
|
*/
|
|
1703
|
-
|
|
1704
|
-
/**
|
|
1705
|
-
|
|
1706
|
-
/**
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
readonly specifier: `./${string}`;
|
|
1717
|
-
readonly exportPath?: readonly string[];
|
|
1718
|
-
};
|
|
1719
|
-
type DefinitionDiagnosticSeverity = "error" | "warning";
|
|
1720
|
-
type DefinitionDiagnosticPhase = "configuration" | "import" | "definition" | "composition" | "authorization" | "typecheck" | "package" | "replay";
|
|
1721
|
-
type DefinitionKind = "document-model" | "subgraph" | "scalar" | "package";
|
|
1722
|
-
type DefinitionRef = {
|
|
1723
|
-
readonly kind: DefinitionKind;
|
|
1724
|
-
readonly key: string;
|
|
1725
|
-
readonly version?: number;
|
|
1726
|
-
};
|
|
1727
|
-
type DefinitionPath = readonly (string | number)[];
|
|
1728
|
-
type DefinitionRelatedLocation = {
|
|
1729
|
-
readonly source?: DefinitionSource;
|
|
1730
|
-
readonly path: DefinitionPath;
|
|
1731
|
-
readonly message: string;
|
|
1732
|
-
};
|
|
1733
|
-
type DefinitionDiagnostic = {
|
|
1734
|
-
readonly code: `PH-${string}`;
|
|
1735
|
-
readonly severity: DefinitionDiagnosticSeverity;
|
|
1736
|
-
readonly phase: DefinitionDiagnosticPhase;
|
|
1737
|
-
readonly source?: DefinitionSource;
|
|
1738
|
-
readonly definition?: DefinitionRef;
|
|
1739
|
-
readonly path: DefinitionPath;
|
|
1740
|
-
readonly message: string;
|
|
1741
|
-
readonly expected?: string;
|
|
1742
|
-
readonly received?: string;
|
|
1743
|
-
readonly repair: string;
|
|
1744
|
-
readonly related?: readonly DefinitionRelatedLocation[];
|
|
1745
|
-
};
|
|
1746
|
-
type GraphQLNameNode = {
|
|
1747
|
-
readonly kind: "Name";
|
|
1748
|
-
readonly value: string;
|
|
1749
|
-
};
|
|
1750
|
-
type GraphQLNamedTypeNode = {
|
|
1751
|
-
readonly kind: "NamedType";
|
|
1752
|
-
readonly name: GraphQLNameNode;
|
|
1753
|
-
};
|
|
1754
|
-
type GraphQLListTypeNode = {
|
|
1755
|
-
readonly kind: "ListType";
|
|
1756
|
-
readonly type: GraphQLTypeNode;
|
|
1757
|
-
};
|
|
1758
|
-
type GraphQLNonNullTypeNode = {
|
|
1759
|
-
readonly kind: "NonNullType";
|
|
1760
|
-
readonly type: GraphQLNamedTypeNode | GraphQLListTypeNode;
|
|
1761
|
-
};
|
|
1762
|
-
type GraphQLTypeNode = GraphQLNamedTypeNode | GraphQLListTypeNode | GraphQLNonNullTypeNode;
|
|
1763
|
-
type GraphQLStringValueNode = {
|
|
1764
|
-
readonly kind: "StringValue";
|
|
1765
|
-
readonly value: string;
|
|
1766
|
-
readonly block?: boolean;
|
|
1767
|
-
};
|
|
1768
|
-
type GraphQLConstValueNode = {
|
|
1769
|
-
readonly kind: "IntValue";
|
|
1770
|
-
readonly value: string;
|
|
1771
|
-
} | {
|
|
1772
|
-
readonly kind: "FloatValue";
|
|
1773
|
-
readonly value: string;
|
|
1774
|
-
} | GraphQLStringValueNode | {
|
|
1775
|
-
readonly kind: "BooleanValue";
|
|
1776
|
-
readonly value: boolean;
|
|
1777
|
-
} | {
|
|
1778
|
-
readonly kind: "NullValue";
|
|
1779
|
-
} | {
|
|
1780
|
-
readonly kind: "EnumValue";
|
|
1781
|
-
readonly value: string;
|
|
1782
|
-
} | {
|
|
1783
|
-
readonly kind: "ListValue";
|
|
1784
|
-
readonly values: readonly GraphQLConstValueNode[];
|
|
1785
|
-
} | {
|
|
1786
|
-
readonly kind: "ObjectValue";
|
|
1787
|
-
readonly fields: readonly GraphQLObjectFieldNode[];
|
|
1788
|
-
};
|
|
1789
|
-
type GraphQLObjectFieldNode = {
|
|
1790
|
-
readonly kind: "ObjectField";
|
|
1791
|
-
readonly name: GraphQLNameNode;
|
|
1792
|
-
readonly value: GraphQLConstValueNode;
|
|
1793
|
-
};
|
|
1794
|
-
type GraphQLArgumentNode = {
|
|
1795
|
-
readonly kind: "Argument";
|
|
1796
|
-
readonly name: GraphQLNameNode;
|
|
1797
|
-
readonly value: GraphQLConstValueNode;
|
|
1798
|
-
};
|
|
1799
|
-
type GraphQLDirectiveNode = {
|
|
1800
|
-
readonly kind: "Directive";
|
|
1801
|
-
readonly name: GraphQLNameNode;
|
|
1802
|
-
readonly arguments: readonly GraphQLArgumentNode[];
|
|
1803
|
-
};
|
|
1804
|
-
type GraphQLInputValueDefinitionNode = {
|
|
1805
|
-
readonly kind: "InputValueDefinition";
|
|
1806
|
-
readonly description?: GraphQLStringValueNode;
|
|
1807
|
-
readonly name: GraphQLNameNode;
|
|
1808
|
-
readonly type: GraphQLTypeNode;
|
|
1809
|
-
readonly defaultValue?: GraphQLConstValueNode;
|
|
1810
|
-
readonly directives: readonly GraphQLDirectiveNode[];
|
|
1811
|
-
};
|
|
1812
|
-
type GraphQLFieldDefinitionNode = {
|
|
1813
|
-
readonly kind: "FieldDefinition";
|
|
1814
|
-
readonly description?: GraphQLStringValueNode;
|
|
1815
|
-
readonly name: GraphQLNameNode;
|
|
1816
|
-
readonly arguments: readonly GraphQLInputValueDefinitionNode[];
|
|
1817
|
-
readonly type: GraphQLTypeNode;
|
|
1818
|
-
readonly directives: readonly GraphQLDirectiveNode[];
|
|
1560
|
+
type Action = {
|
|
1561
|
+
/** The id of the action. This is distinct from the operation id. */
|
|
1562
|
+
id: string;
|
|
1563
|
+
/** The name of the action. */
|
|
1564
|
+
type: string;
|
|
1565
|
+
/** The timestamp of the action. */
|
|
1566
|
+
timestampUtcMs: string;
|
|
1567
|
+
/** The payload of the action. */
|
|
1568
|
+
input: unknown;
|
|
1569
|
+
/** The scope of the action */
|
|
1570
|
+
scope: string;
|
|
1571
|
+
/** The context of the action. */
|
|
1572
|
+
context?: ActionContext;
|
|
1819
1573
|
};
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1574
|
+
//#endregion
|
|
1575
|
+
//#region document-model/action-signature.d.ts
|
|
1576
|
+
declare const ACTION_SIGNATURE_V2_PREFIX = "v2:";
|
|
1577
|
+
/** The log an operation is stored in, which a v2 tuple is bound to. */
|
|
1578
|
+
type ActionSigningTarget = {
|
|
1579
|
+
documentId: string;
|
|
1580
|
+
branch: string;
|
|
1825
1581
|
};
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1582
|
+
/** Who a v2 tuple attributes the action to; both halves are in the preimage. */
|
|
1583
|
+
type ActionSignerIdentity = {
|
|
1584
|
+
user: UserActionSigner;
|
|
1585
|
+
app: AppActionSigner;
|
|
1830
1586
|
};
|
|
1831
|
-
|
|
1832
|
-
|
|
1587
|
+
/** A value that would not survive a JSON store round trip unchanged. */
|
|
1588
|
+
declare class CanonicalJsonError extends Error {
|
|
1589
|
+
constructor(path: string, detail: string);
|
|
1590
|
+
}
|
|
1591
|
+
/** Sorted-key JSON, as the state hash encodes; drops `undefined` properties. */
|
|
1592
|
+
declare function canonicalJson(value: unknown, label?: string): string;
|
|
1593
|
+
/** Actions the reactor reduces itself, onto the document scope. */
|
|
1594
|
+
declare const DOCUMENT_SCOPE_ACTION_TYPES: ReadonlySet<string>;
|
|
1595
|
+
/** Where a document-scope action writes: `sourceId` or `documentId`. */
|
|
1596
|
+
declare function targetDocumentId(action: {
|
|
1597
|
+
type: string;
|
|
1598
|
+
input: unknown;
|
|
1599
|
+
}, fallback: string): string;
|
|
1600
|
+
/** The log an action submitted to a job on `documentId` is stored in. */
|
|
1601
|
+
declare function actionSigningTarget(action: {
|
|
1602
|
+
type: string;
|
|
1603
|
+
input: unknown;
|
|
1604
|
+
}, documentId: string, branch: string): ActionSigningTarget;
|
|
1605
|
+
/** The identity a signer writes into `context.signer`, and signs over. */
|
|
1606
|
+
declare function actionSignerIdentity(signer: {
|
|
1607
|
+
user?: UserActionSigner;
|
|
1608
|
+
app?: AppActionSigner;
|
|
1609
|
+
}): ActionSignerIdentity;
|
|
1610
|
+
/** The v2 preimage; throws `CanonicalJsonError` on an unsignable action. */
|
|
1611
|
+
declare function actionPreimageV2(action: Action, target: ActionSigningTarget, signer: ActionSignerIdentity): string;
|
|
1612
|
+
/** `"v2:" + base64url(sha256(preimage))`, unpadded. */
|
|
1613
|
+
declare function hashActionV2(action: Action, target: ActionSigningTarget, signer: ActionSignerIdentity): Promise<string>;
|
|
1614
|
+
/** Signs `action` as a v2 tuple; the message layout is the legacy one. */
|
|
1615
|
+
declare function signActionV2(params: {
|
|
1616
|
+
action: Action;
|
|
1617
|
+
target: ActionSigningTarget;
|
|
1618
|
+
signer: ActionSignerIdentity;
|
|
1619
|
+
sign: ActionSigningHandler;
|
|
1620
|
+
previousStateHash?: string;
|
|
1621
|
+
}): Promise<Signature>;
|
|
1622
|
+
/** Element [2] carries the v2 prefix, whether or not it is well formed. */
|
|
1623
|
+
declare function isV2ActionHash(hash: string): boolean;
|
|
1624
|
+
/** The strict shape of a v2 tuple, apart from what its hash covers. */
|
|
1625
|
+
declare function v2TupleProblem(tuple: Signature): string | undefined;
|
|
1626
|
+
//#endregion
|
|
1627
|
+
//#region document-model/action-transport.d.ts
|
|
1628
|
+
/**
|
|
1629
|
+
* An action's signer, as the wire declares it: signatures joined into strings,
|
|
1630
|
+
* because GraphQL declares them as a list of strings rather than of lists.
|
|
1631
|
+
*/
|
|
1632
|
+
type TransportSigner = {
|
|
1633
|
+
user?: {
|
|
1634
|
+
address: string;
|
|
1635
|
+
networkId: string;
|
|
1636
|
+
chainId: number;
|
|
1637
|
+
};
|
|
1638
|
+
app?: {
|
|
1639
|
+
name: string;
|
|
1640
|
+
key: string;
|
|
1641
|
+
};
|
|
1642
|
+
signatures: string[];
|
|
1833
1643
|
};
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1644
|
+
/** An action's context, as the wire declares it. */
|
|
1645
|
+
type TransportActionContext = {
|
|
1646
|
+
prevOpIndex?: number;
|
|
1647
|
+
prevOpHash?: string;
|
|
1648
|
+
nonce?: string;
|
|
1649
|
+
signer?: TransportSigner;
|
|
1838
1650
|
};
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1651
|
+
/** An action projected onto exactly the fields the wire declares. */
|
|
1652
|
+
type TransportAction = {
|
|
1653
|
+
id: string;
|
|
1654
|
+
type: string;
|
|
1655
|
+
timestampUtcMs: string;
|
|
1656
|
+
/**
|
|
1657
|
+
* Non-nullable, because the wire declares it so. An action's own type says
|
|
1658
|
+
* `unknown`, which admits the absent input an action creator called without
|
|
1659
|
+
* one produces - {@link toTransportAction} refuses that rather than passing
|
|
1660
|
+
* it on.
|
|
1661
|
+
*/
|
|
1662
|
+
input: NonNullable<unknown>;
|
|
1663
|
+
scope: string;
|
|
1664
|
+
context?: TransportActionContext;
|
|
1843
1665
|
};
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1666
|
+
/**
|
|
1667
|
+
* Projects an action onto the fields the GraphQL `ActionInput` declares.
|
|
1668
|
+
*
|
|
1669
|
+
* A projection rather than a spread, because an input object rejects a field it
|
|
1670
|
+
* does not declare, and that refusal takes the whole request with it. An action
|
|
1671
|
+
* read back out of storage can carry fields the type no longer has - a legacy
|
|
1672
|
+
* `attachments` array, or the operation fields left behind by a signing helper
|
|
1673
|
+
* that returns an operation - and any one of them would sink an otherwise valid
|
|
1674
|
+
* submission.
|
|
1675
|
+
*
|
|
1676
|
+
* Only fields the action actually carries are emitted, so an unsigned action
|
|
1677
|
+
* sends no context at all rather than a context full of nulls.
|
|
1678
|
+
*/
|
|
1679
|
+
declare function toTransportAction(action: Action): TransportAction;
|
|
1680
|
+
//#endregion
|
|
1681
|
+
//#region document-model/auth.d.ts
|
|
1682
|
+
type InitializeAuthActionInput = {
|
|
1683
|
+
version: number;
|
|
1684
|
+
grants: Grant[];
|
|
1847
1685
|
};
|
|
1848
|
-
type
|
|
1849
|
-
|
|
1850
|
-
readonly values: readonly GraphQLEnumValueDefinitionNode[];
|
|
1686
|
+
type SetGrantActionInput = {
|
|
1687
|
+
grant: Grant;
|
|
1851
1688
|
};
|
|
1852
|
-
type
|
|
1853
|
-
|
|
1854
|
-
readonly fields: readonly GraphQLInputValueDefinitionNode[];
|
|
1689
|
+
type RemoveGrantActionInput = {
|
|
1690
|
+
id: string;
|
|
1855
1691
|
};
|
|
1856
|
-
type
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1692
|
+
type MoveGrantActionInput = {
|
|
1693
|
+
id: string;
|
|
1694
|
+
/** Target index in the grant list; clamped to the valid range. */
|
|
1695
|
+
index: number;
|
|
1860
1696
|
};
|
|
1861
|
-
type
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
readonly directives: readonly GraphQLDirectiveNode[];
|
|
1865
|
-
readonly operationTypes: readonly GraphQLOperationTypeDefinitionNode[];
|
|
1697
|
+
type InitializeAuthAction = Action & {
|
|
1698
|
+
type: "INITIALIZE_AUTH";
|
|
1699
|
+
input: InitializeAuthActionInput;
|
|
1866
1700
|
};
|
|
1867
|
-
type
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
readonly name: GraphQLNameNode;
|
|
1871
|
-
readonly arguments: readonly GraphQLInputValueDefinitionNode[];
|
|
1872
|
-
readonly repeatable: boolean;
|
|
1873
|
-
readonly locations: readonly GraphQLNameNode[];
|
|
1701
|
+
type SetGrantAction = Action & {
|
|
1702
|
+
type: "SET_GRANT";
|
|
1703
|
+
input: SetGrantActionInput;
|
|
1874
1704
|
};
|
|
1875
|
-
type
|
|
1876
|
-
type
|
|
1877
|
-
|
|
1878
|
-
}) | (Omit<GraphQLScalarTypeDefinitionNode, "kind" | "description"> & {
|
|
1879
|
-
readonly kind: "ScalarTypeExtension";
|
|
1880
|
-
}) | (Omit<GraphQLObjectTypeDefinitionNode, "kind" | "description"> & {
|
|
1881
|
-
readonly kind: "ObjectTypeExtension";
|
|
1882
|
-
}) | (Omit<GraphQLInterfaceTypeDefinitionNode, "kind" | "description"> & {
|
|
1883
|
-
readonly kind: "InterfaceTypeExtension";
|
|
1884
|
-
}) | (Omit<GraphQLUnionTypeDefinitionNode, "kind" | "description"> & {
|
|
1885
|
-
readonly kind: "UnionTypeExtension";
|
|
1886
|
-
}) | (Omit<GraphQLEnumTypeDefinitionNode, "kind" | "description"> & {
|
|
1887
|
-
readonly kind: "EnumTypeExtension";
|
|
1888
|
-
}) | (Omit<GraphQLInputObjectTypeDefinitionNode, "kind" | "description"> & {
|
|
1889
|
-
readonly kind: "InputObjectTypeExtension";
|
|
1890
|
-
});
|
|
1891
|
-
type LocationFreeGraphQLDocumentNode = {
|
|
1892
|
-
readonly kind: "Document";
|
|
1893
|
-
readonly definitions: readonly (GraphQLTypeSystemDefinitionNode | GraphQLTypeSystemExtensionNode)[];
|
|
1705
|
+
type RemoveGrantAction = Action & {
|
|
1706
|
+
type: "REMOVE_GRANT";
|
|
1707
|
+
input: RemoveGrantActionInput;
|
|
1894
1708
|
};
|
|
1895
|
-
type
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
readonly preserveDefinitionOrder: true;
|
|
1709
|
+
type MoveGrantAction = Action & {
|
|
1710
|
+
type: "MOVE_GRANT";
|
|
1711
|
+
input: MoveGrantActionInput;
|
|
1899
1712
|
};
|
|
1900
|
-
type
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
/**
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1713
|
+
type AuthAction = InitializeAuthAction | SetGrantAction | RemoveGrantAction | MoveGrantAction;
|
|
1714
|
+
declare const AUTH_ACTION_TYPES: readonly ["INITIALIZE_AUTH", "SET_GRANT", "REMOVE_GRANT", "MOVE_GRANT"];
|
|
1715
|
+
declare function isAuthAction(action: Action): action is AuthAction;
|
|
1716
|
+
/** Highest known policy version; decide() fails closed above it. */
|
|
1717
|
+
declare const MAX_SUPPORTED_AUTH_VERSION = 1;
|
|
1718
|
+
declare const InitializeAuthActionInputSchema: () => z.ZodObject<{
|
|
1719
|
+
version: z.ZodNumber;
|
|
1720
|
+
grants: z.ZodArray<z.ZodCustom<Grant, Grant>>;
|
|
1721
|
+
}, z.core.$strip>;
|
|
1722
|
+
declare const SetGrantActionInputSchema: () => z.ZodObject<{
|
|
1723
|
+
grant: z.ZodCustom<Grant, Grant>;
|
|
1724
|
+
}, z.core.$strip>;
|
|
1725
|
+
declare const RemoveGrantActionInputSchema: () => z.ZodObject<{
|
|
1726
|
+
id: z.ZodString;
|
|
1727
|
+
}, z.core.$strip>;
|
|
1728
|
+
declare const MoveGrantActionInputSchema: () => z.ZodObject<{
|
|
1729
|
+
id: z.ZodString;
|
|
1730
|
+
index: z.ZodNumber;
|
|
1731
|
+
}, z.core.$strip>;
|
|
1732
|
+
declare const initializeAuth: (input: InitializeAuthActionInput) => InitializeAuthAction;
|
|
1733
|
+
declare const setGrant: (input: SetGrantActionInput) => SetGrantAction;
|
|
1734
|
+
declare const removeGrant: (input: RemoveGrantActionInput) => RemoveGrantAction;
|
|
1735
|
+
declare const moveGrant: (input: MoveGrantActionInput) => MoveGrantAction;
|
|
1912
1736
|
/**
|
|
1913
|
-
*
|
|
1914
|
-
*
|
|
1737
|
+
* True when `signerKey` (an ActionSigner app key, a did:key) identifies the same
|
|
1738
|
+
* key recorded as the document creator. Returns false
|
|
1739
|
+
* when there is no creator (empty JWK) or no signer key.
|
|
1740
|
+
*/
|
|
1741
|
+
declare function isDocumentCreator(creatorKey: JsonWebKey | undefined, signerKey: string | undefined): boolean;
|
|
1742
|
+
/**
|
|
1743
|
+
* Sets the initial policy. Valid only while the auth scope is uninitialized
|
|
1744
|
+
* (version 0). The input version is the policy language version and must be an
|
|
1745
|
+
* integer >= 1; 0 is reserved for the uninitialized state. On a signed-header
|
|
1746
|
+
* document it must be signed by the document creator (`header.sig.publicKey`).
|
|
1747
|
+
* A creator-less policy must include a grant permitting execute on the auth
|
|
1748
|
+
* scope, or it would be born locked out.
|
|
1749
|
+
*/
|
|
1750
|
+
declare function applyInitializeAuthAction<TState extends PHBaseState>(document: PHDocument$1<TState>, action: InitializeAuthAction): PHDocument$1<TState>;
|
|
1751
|
+
/** Upserts a grant by id: replaces in place if present, otherwise appends. */
|
|
1752
|
+
declare function applySetGrantAction<TState extends PHBaseState>(document: PHDocument$1<TState>, action: SetGrantAction): PHDocument$1<TState>;
|
|
1753
|
+
/**
|
|
1754
|
+
* Removes a grant by id; throws if the id is not present or if the removal
|
|
1755
|
+
* would leave a creator-less policy with no auth-administration grant.
|
|
1756
|
+
*/
|
|
1757
|
+
declare function applyRemoveGrantAction<TState extends PHBaseState>(document: PHDocument$1<TState>, action: RemoveGrantAction): PHDocument$1<TState>;
|
|
1758
|
+
/**
|
|
1759
|
+
* Moves a grant by id to a new index. Order is load-bearing (the last
|
|
1760
|
+
* applicable grant wins), so the relative order of the other grants is kept.
|
|
1761
|
+
* The target index is clamped to the valid range; an unknown id throws.
|
|
1762
|
+
*
|
|
1763
|
+
* Order alone decides which grant wins, so a move can take administration away
|
|
1764
|
+
* without changing the list's contents. It carries the same retention rule as
|
|
1765
|
+
* the two mutation paths.
|
|
1766
|
+
*/
|
|
1767
|
+
declare function applyMoveGrantAction<TState extends PHBaseState>(document: PHDocument$1<TState>, action: MoveGrantAction): PHDocument$1<TState>;
|
|
1768
|
+
/**
|
|
1769
|
+
* Dispatches an auth-scope action to its handler. This is the auth scope's
|
|
1770
|
+
* dedicated reducer: it is applied by the base reducer instead of the model
|
|
1771
|
+
* reducer, mirroring the document-scope platform handlers. Unknown types are a
|
|
1772
|
+
* no-op, matching the model-reducer default.
|
|
1773
|
+
*/
|
|
1774
|
+
declare function applyAuthAction<TState extends PHBaseState>(document: PHDocument$1<TState>, action: Action): PHDocument$1<TState>;
|
|
1775
|
+
/**
|
|
1776
|
+
* Because only creators can initialize auth scopes, we must verify that either
|
|
1777
|
+
* the document has no auth or the version and creator match.
|
|
1778
|
+
*/
|
|
1779
|
+
declare function assertAuthPreservedOnDuplicate(documentId: string, source: PHAuthState | undefined, duplicated: PHAuthState | undefined): void;
|
|
1780
|
+
/**
|
|
1781
|
+
* The auth scope a state snapshot may install, given the policy already there.
|
|
1782
|
+
*
|
|
1783
|
+
* `applyAuthAction` is the validated door onto `state.auth`, but a whole-state
|
|
1784
|
+
* snapshot (UPGRADE_DOCUMENT's `initialState`) replaces the scope wholesale and
|
|
1785
|
+
* is authorized as a `document`-scope write. Without this, a subject holding
|
|
1786
|
+
* `execute` on `document` and no auth grant at all can install a policy of its
|
|
1787
|
+
* choosing, name itself `creator` (which exempts the policy from the retention
|
|
1788
|
+
* rule for good), or wipe an existing policy by carrying the default
|
|
1789
|
+
* uninitialized one.
|
|
1790
|
+
*
|
|
1791
|
+
* Three cases:
|
|
1792
|
+
*
|
|
1793
|
+
* - the snapshot carries no policy, or an uninitialized one: the document
|
|
1794
|
+
* keeps the policy it has, so a default-state upgrade cannot reset it;
|
|
1795
|
+
* - the document is uninitialized and the snapshot carries a policy: the
|
|
1796
|
+
* policy is installed after the same validation genesis applies, so it
|
|
1797
|
+
* cannot be born locked out;
|
|
1798
|
+
* - both carry a policy: they must agree. A duplicate preserves its source's
|
|
1799
|
+
* policy (see {@link assertAuthPreservedOnDuplicate}), and anything else is
|
|
1800
|
+
* an attempt to replace one policy with another.
|
|
1915
1801
|
*/
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
readonly description: string;
|
|
1926
|
-
readonly coercion: {
|
|
1927
|
-
readonly source: "derived" | "explicit";
|
|
1928
|
-
};
|
|
1929
|
-
readonly coercionProfile: ScalarValidationProfile;
|
|
1930
|
-
};
|
|
1931
|
-
type ScalarTypeReferenceDefinition = {
|
|
1932
|
-
readonly kind: "scalar";
|
|
1933
|
-
/**
|
|
1934
|
-
* A `ScalarName`, or a package scalar that the enclosing definition's
|
|
1935
|
-
* `scalars` list declares.
|
|
1936
|
-
*/
|
|
1937
|
-
readonly name: string;
|
|
1938
|
-
readonly required: boolean;
|
|
1939
|
-
};
|
|
1940
|
-
type NamedTypeReferenceDefinition = {
|
|
1941
|
-
readonly kind: "named";
|
|
1942
|
-
readonly name: string;
|
|
1943
|
-
readonly required: boolean;
|
|
1944
|
-
};
|
|
1945
|
-
type ListTypeReferenceDefinition = {
|
|
1946
|
-
readonly kind: "list";
|
|
1947
|
-
readonly required: boolean;
|
|
1948
|
-
readonly item: TypeReferenceDefinition;
|
|
1802
|
+
declare function resolveSnapshotAuth(documentId: string, documentType: string, current: PHAuthState | undefined, incoming: PHAuthState | undefined): PHAuthState;
|
|
1803
|
+
/** UNDO and REDO are rejected on the auth scope. */
|
|
1804
|
+
declare function assertAuthScopeActionAllowed(action: Action): void;
|
|
1805
|
+
type AuthVerb = "read" | "execute";
|
|
1806
|
+
type AuthRequest = {
|
|
1807
|
+
verb: AuthVerb;
|
|
1808
|
+
scope: string;
|
|
1809
|
+
/** For execute: the operation (action type) being attempted. Omitted for reads. */
|
|
1810
|
+
operation?: string;
|
|
1949
1811
|
};
|
|
1950
|
-
type
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
readonly value: JsonValue;
|
|
1956
|
-
}[];
|
|
1812
|
+
type AuthSubject = {
|
|
1813
|
+
/** Verified signer address; undefined for an anonymous subject. */
|
|
1814
|
+
address?: string;
|
|
1815
|
+
/** The signer's app key (a did:key), used to match the document creator. */
|
|
1816
|
+
key?: string;
|
|
1957
1817
|
};
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1818
|
+
/**
|
|
1819
|
+
* What condition attr paths resolve against, beyond the subject. Supplied
|
|
1820
|
+
* only while authConditions enforcement is on: with no context a grant
|
|
1821
|
+
* carrying `where` or a { match } principal never applies.
|
|
1822
|
+
*/
|
|
1823
|
+
type ConditionContext = {
|
|
1824
|
+
/** The executing scope's own state, for `doc.<scope>.*` paths. */
|
|
1825
|
+
scopeState: unknown;
|
|
1826
|
+
/** The action's input, for `action.input.*` paths. Absent for reads. */
|
|
1827
|
+
actionInput?: unknown;
|
|
1966
1828
|
};
|
|
1967
|
-
type
|
|
1968
|
-
|
|
1829
|
+
type AuthDecision = "allow" | "deny";
|
|
1830
|
+
/** Why the policy refused a request. */
|
|
1831
|
+
type AuthRefusal = "version-unsupported" | "no-applicable-grant" | "denied-by-grant";
|
|
1832
|
+
/**
|
|
1833
|
+
* A decision together with why it refused. A refusal names which of the
|
|
1834
|
+
* policy's rules produced it, so an operation records the reason it was refused
|
|
1835
|
+
* rather than one reason standing for every refusal.
|
|
1836
|
+
*/
|
|
1837
|
+
type AuthEvaluation = {
|
|
1838
|
+
decision: "allow";
|
|
1969
1839
|
} | {
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
readonly name: string;
|
|
1974
|
-
readonly description: string | null;
|
|
1975
|
-
readonly deprecated: string | null;
|
|
1976
|
-
readonly directives?: readonly DirectiveUseDefinition[];
|
|
1977
|
-
};
|
|
1978
|
-
type EnumTypeDefinition = {
|
|
1979
|
-
readonly kind: "enum";
|
|
1980
|
-
readonly name: string;
|
|
1981
|
-
readonly description: string | null;
|
|
1982
|
-
readonly values: readonly EnumValueDefinition[];
|
|
1983
|
-
};
|
|
1984
|
-
type ObjectTypeDefinition = {
|
|
1985
|
-
readonly kind: "object";
|
|
1986
|
-
readonly name: string;
|
|
1987
|
-
readonly description: string | null;
|
|
1988
|
-
readonly implements?: readonly string[];
|
|
1989
|
-
readonly fields: readonly FieldDefinition[];
|
|
1990
|
-
};
|
|
1991
|
-
type InterfaceTypeDefinition = {
|
|
1992
|
-
readonly kind: "interface";
|
|
1993
|
-
readonly name: string;
|
|
1994
|
-
readonly description: string | null;
|
|
1995
|
-
readonly implements?: readonly string[];
|
|
1996
|
-
readonly fields: readonly FieldDefinition[];
|
|
1997
|
-
};
|
|
1998
|
-
type InputTypeDefinition = {
|
|
1999
|
-
readonly kind: "input";
|
|
2000
|
-
readonly name: string;
|
|
2001
|
-
readonly description: string | null;
|
|
2002
|
-
readonly unknownKeys: "preserve" | "reject";
|
|
2003
|
-
readonly fields: readonly InputFieldDefinition[];
|
|
1840
|
+
decision: "deny";
|
|
1841
|
+
refusal: AuthRefusal;
|
|
1842
|
+
grantId?: string;
|
|
2004
1843
|
};
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
1844
|
+
/**
|
|
1845
|
+
* Evaluates the auth policy for a single request and reports why it refused.
|
|
1846
|
+
* Pure and deterministic.
|
|
1847
|
+
*
|
|
1848
|
+
* An uninitialized policy (version 0, absent auth state, or a legacy `{}`
|
|
1849
|
+
* auth scope serialized before PHAuthState had a version) leaves the document
|
|
1850
|
+
* open. Once a policy exists the default is deny, and grants stack in order.
|
|
1851
|
+
*
|
|
1852
|
+
* Group principals match only against a supplied groups map (the groups
|
|
1853
|
+
* projection, present when authGroups is on); with no map they never apply.
|
|
1854
|
+
* `where` clauses and { match } principals likewise evaluate only against a
|
|
1855
|
+
* supplied condition context (present when authConditions is on).
|
|
1856
|
+
*/
|
|
1857
|
+
declare function evaluate(auth: PHAuthState | undefined, subject: AuthSubject, request: AuthRequest, groups?: AuthGroups, conditions?: ConditionContext): AuthEvaluation;
|
|
1858
|
+
/**
|
|
1859
|
+
* Evaluates the auth policy for a single request. Pure and deterministic. This
|
|
1860
|
+
* is {@link evaluate} with the reason dropped.
|
|
1861
|
+
*/
|
|
1862
|
+
declare function decide(auth: PHAuthState | undefined, subject: AuthSubject, request: AuthRequest, groups?: AuthGroups, conditions?: ConditionContext): AuthDecision;
|
|
1863
|
+
/**
|
|
1864
|
+
* The group document ids a single auth action's input names with `{ group }`
|
|
1865
|
+
* principals. INITIALIZE_AUTH contributes the groups named across its grants,
|
|
1866
|
+
* SET_GRANT the groups named by its one grant; REMOVE_GRANT and MOVE_GRANT
|
|
1867
|
+
* contribute nothing. Total over any input shape, because references are read
|
|
1868
|
+
* from the input as it arrived, including inputs later stored as errors.
|
|
1869
|
+
*/
|
|
1870
|
+
declare function mentionedGroupIds(action: Action): string[];
|
|
1871
|
+
//#endregion
|
|
1872
|
+
//#region document-model/auth-v1.d.ts
|
|
1873
|
+
/** Maximum number of grants in a policy. */
|
|
1874
|
+
declare const MAX_AUTH_GRANTS = 100;
|
|
1875
|
+
/** Maximum nesting depth of a condition tree. */
|
|
1876
|
+
declare const MAX_CONDITION_DEPTH = 10;
|
|
1877
|
+
/** Maximum node count (conditions plus operands) of a condition tree. */
|
|
1878
|
+
declare const MAX_CONDITION_NODES = 100;
|
|
1879
|
+
/** Maximum entries in an execute capability's operation list. */
|
|
1880
|
+
declare const MAX_CAPABILITY_OPERATIONS = 100;
|
|
1881
|
+
/**
|
|
1882
|
+
* Thrown when a grant violates the v1 validation rules. The message is stored
|
|
1883
|
+
* on error operations, so it must be a pure function of the input.
|
|
1884
|
+
*/
|
|
1885
|
+
declare class InvalidGrantError extends Error {
|
|
1886
|
+
readonly grantId: string;
|
|
1887
|
+
constructor(grantId: string, problem: string);
|
|
1888
|
+
}
|
|
1889
|
+
/** Thrown for a `{ group }` principal on a group document: references never chain. */
|
|
1890
|
+
declare class GroupPrincipalNotAllowedError extends Error {
|
|
1891
|
+
readonly grantId: string;
|
|
1892
|
+
constructor(grantId: string);
|
|
1893
|
+
}
|
|
1894
|
+
/**
|
|
1895
|
+
* Thrown when a change would leave a creator-less policy with no grant
|
|
1896
|
+
* permitting execute on the auth scope. Without the creator carve-out no
|
|
1897
|
+
* subject could ever administer such a policy again.
|
|
1898
|
+
*/
|
|
1899
|
+
declare class AuthAdministrationLockoutError extends Error {
|
|
1900
|
+
readonly grantId: string;
|
|
1901
|
+
constructor(grantId: string);
|
|
1902
|
+
}
|
|
1903
|
+
/**
|
|
1904
|
+
* Thrown when INITIALIZE_AUTH would create a creator-less policy with no grant
|
|
1905
|
+
* permitting execute on the auth scope. Such a policy would be born with no
|
|
1906
|
+
* subject able to administer it.
|
|
1907
|
+
*/
|
|
1908
|
+
declare class AuthAdministrationMissingError extends Error {
|
|
1909
|
+
constructor();
|
|
1910
|
+
}
|
|
1911
|
+
declare function isPlainValue(value: unknown): value is Record<string, unknown>;
|
|
1912
|
+
/** Returns the first v1-rule violation, or null. Pure, total, deterministic. */
|
|
1913
|
+
declare function grantProblem(value: unknown): string | null;
|
|
1914
|
+
declare const GrantSchema: () => z.ZodCustom<Grant, Grant>;
|
|
1915
|
+
/** V1 shape rules plus the group-document group-principal ban. */
|
|
1916
|
+
declare function assertValidGrant(grant: unknown, documentType: string): void;
|
|
1917
|
+
/**
|
|
1918
|
+
* Validates an initial grant list: the count cap, every grant, and — on a
|
|
1919
|
+
* creator-less policy — that some grant keeps the auth scope administrable.
|
|
1920
|
+
*/
|
|
1921
|
+
declare function assertValidInitialGrants(grants: Grant[], documentType: string, creator: string | undefined): void;
|
|
1922
|
+
/**
|
|
1923
|
+
* Validates a grant upsert: the grant itself, the count cap on append, and
|
|
1924
|
+
* administration retention. Retention is checked on an append as well as an
|
|
1925
|
+
* in-place replace, because a grant appended after the administration grant can
|
|
1926
|
+
* shadow it (evaluation is last-applicable-grant-wins) and so take
|
|
1927
|
+
* administration away without removing anything.
|
|
1928
|
+
*/
|
|
1929
|
+
declare function assertValidGrantUpsert(grant: Grant, existing: Grant[], documentType: string, creator: string | undefined): void;
|
|
1930
|
+
/**
|
|
1931
|
+
* A creator-less policy must always retain a grant permitting execute on the
|
|
1932
|
+
* auth scope; on a signed document the creator carve-out keeps administration
|
|
1933
|
+
* reachable instead. Rejects a change that takes the last such grant away. A
|
|
1934
|
+
* policy already without one is left alone: the change is not what locks it.
|
|
1935
|
+
*/
|
|
1936
|
+
declare function assertAuthAdministrationRetained(creator: string | undefined, previous: Grant[], next: Grant[], grantId: string): void;
|
|
1937
|
+
/**
|
|
1938
|
+
* Evaluates a version-1 condition. Deterministic, total, and pure: any input
|
|
1939
|
+
* shape yields a boolean and never throws, and a malformed condition is
|
|
1940
|
+
* false. These are consensus semantics, versioned by `PHAuthState.version`;
|
|
1941
|
+
* changing them requires a new version.
|
|
1942
|
+
*/
|
|
1943
|
+
declare function evaluateCondition(condition: Condition, subject: AuthSubject, request: AuthRequest, conditions: ConditionContext): boolean;
|
|
1944
|
+
/**
|
|
1945
|
+
* The group document ids named by `{ group }` principals in a grant list, in
|
|
1946
|
+
* order of first appearance. These are the streams the groups projection reads.
|
|
1947
|
+
*/
|
|
1948
|
+
declare function referencedGroupIds(grants: Grant[]): string[];
|
|
1949
|
+
/**
|
|
1950
|
+
* Evaluates a v1 grant stack: default deny, last applicable grant wins, and
|
|
1951
|
+
* reports which grant decided it. Group principals match only against a
|
|
1952
|
+
* supplied groups map, and `where` clauses and { match } principals evaluate
|
|
1953
|
+
* only against a supplied condition context; a grant that uses an unsupplied
|
|
1954
|
+
* feature never applies.
|
|
1955
|
+
*/
|
|
1956
|
+
declare function evaluateGrantStack(grants: Grant[], subject: AuthSubject, request: AuthRequest, groups?: AuthGroups, conditions?: ConditionContext): AuthEvaluation;
|
|
1957
|
+
/**
|
|
1958
|
+
* Evaluates a v1 grant stack: default deny, last applicable grant wins. This is
|
|
1959
|
+
* {@link evaluateGrantStack} with the reason dropped.
|
|
1960
|
+
*/
|
|
1961
|
+
declare function evaluateGrants(grants: Grant[], subject: AuthSubject, request: AuthRequest, groups?: AuthGroups, conditions?: ConditionContext): AuthDecision;
|
|
1962
|
+
//#endregion
|
|
1963
|
+
//#region document-model/peer-agreement.d.ts
|
|
1964
|
+
/** The reactor feature flags a capability's support is a function of. */
|
|
1965
|
+
type PeerCapabilityFlags = {
|
|
1966
|
+
readonly undoV3?: boolean;
|
|
1967
|
+
readonly [flag: string]: boolean | undefined;
|
|
2010
1968
|
};
|
|
2011
|
-
|
|
2012
|
-
type
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
1969
|
+
/** A document protocol, named by its `protocolVersions` key. */
|
|
1970
|
+
type ProtocolCapability = {
|
|
1971
|
+
kind: "protocol";
|
|
1972
|
+
name: string;
|
|
1973
|
+
/** What a peer that announces nothing is assumed to support. */
|
|
1974
|
+
baseline: readonly number[];
|
|
1975
|
+
supported(flags: PeerCapabilityFlags): readonly number[];
|
|
1976
|
+
/** The version new documents take when peers agree. Absent: not negotiated. */
|
|
1977
|
+
preferred?(flags: PeerCapabilityFlags): number;
|
|
1978
|
+
/** Who chooses a new document's version, given the creator's preference; absent: "agreed". */
|
|
1979
|
+
selection?: ProtocolSelectionRule | ((preferred: number) => ProtocolSelectionRule);
|
|
1980
|
+
/** A header may omit the key. */
|
|
1981
|
+
optional: boolean;
|
|
2018
1982
|
};
|
|
2019
1983
|
/**
|
|
2020
|
-
*
|
|
1984
|
+
* "agreed": the creator's preference narrowed to what every member supports.
|
|
1985
|
+
* "creator": the creator's preference; a member that cannot run it is held.
|
|
2021
1986
|
*/
|
|
2022
|
-
type
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
1987
|
+
type ProtocolSelectionRule = "agreed" | "creator";
|
|
1988
|
+
/** A feature that changes what a peer sends or expects on the wire. */
|
|
1989
|
+
type FeatureCapability = {
|
|
1990
|
+
kind: "feature";
|
|
1991
|
+
name: string;
|
|
1992
|
+
baseline: readonly number[];
|
|
1993
|
+
supported(flags: PeerCapabilityFlags): readonly number[];
|
|
2027
1994
|
};
|
|
2028
|
-
type
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
1995
|
+
type PeerCapability = ProtocolCapability | FeatureCapability;
|
|
1996
|
+
/** A purged document's protocol; never preferred, so creation never selects it. */
|
|
1997
|
+
declare const DOCUMENT_PURGE_PROTOCOL = "document-purge";
|
|
1998
|
+
/** A peer that takes refusals of polled purge markers on the poll. */
|
|
1999
|
+
declare const MARKER_REFUSAL_FEATURE = "marker-refusal";
|
|
2000
|
+
declare const PEER_CAPABILITIES: readonly PeerCapability[];
|
|
2001
|
+
/** `base-reducer`'s preference with no reactor flags, which shared never holds. */
|
|
2002
|
+
declare const FLAGLESS_BASE_REDUCER_VERSION: number;
|
|
2003
|
+
/** `base` plus `extra`; an extra replaces a base entry of the same name. */
|
|
2004
|
+
declare function mergePeerCapabilities(base: readonly PeerCapability[], extra: readonly PeerCapability[]): PeerCapability[];
|
|
2005
|
+
declare const PEER_MANIFEST_FORMAT = 1;
|
|
2006
|
+
type Supports = {
|
|
2007
|
+
protocols: {
|
|
2008
|
+
[protocol: string]: readonly number[];
|
|
2009
|
+
};
|
|
2010
|
+
features: {
|
|
2011
|
+
[feature: string]: readonly number[];
|
|
2012
|
+
};
|
|
2033
2013
|
};
|
|
2034
|
-
type
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2014
|
+
type PeerManifest = Supports & {
|
|
2015
|
+
format: 1;
|
|
2016
|
+
/** The signer's did:key, when configured; informational. */
|
|
2017
|
+
appKey?: string;
|
|
2018
|
+
/** Grows with every start of the reactor; a peer ignores an older one. */
|
|
2019
|
+
sequence: number;
|
|
2020
|
+
/** base64url(sha256(canonicalJson(Supports & { sequence }))) */
|
|
2021
|
+
revision: string;
|
|
2038
2022
|
};
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2023
|
+
/** What this reactor supports, for every capability it registers. */
|
|
2024
|
+
declare function localSupports(capabilities: readonly PeerCapability[], flags: PeerCapabilityFlags): Supports;
|
|
2025
|
+
/** What a peer that announces nothing supports. */
|
|
2026
|
+
declare function legacySupports(capabilities: readonly PeerCapability[]): Supports;
|
|
2027
|
+
declare function manifestRevision(supports: Supports, sequence?: number): string;
|
|
2028
|
+
declare function localPeerManifest(capabilities: readonly PeerCapability[], flags: PeerCapabilityFlags, appKey?: string, sequence?: number): PeerManifest;
|
|
2029
|
+
/** A manifest sent before the one already held; silence carries no sequence. */
|
|
2030
|
+
declare function isOlderManifest(next: PeerManifest | null, held: PeerManifest | null | undefined): boolean;
|
|
2031
|
+
/** A peer's manifest, or the baselines for a peer that announced none. */
|
|
2032
|
+
declare function peerSupports(manifest: PeerManifest | null, capabilities: readonly PeerCapability[]): Supports;
|
|
2033
|
+
/**
|
|
2034
|
+
* A manifest as received from a peer, or null when it is not one. Formats only
|
|
2035
|
+
* add fields, so one of an unknown format is read as its two maps.
|
|
2036
|
+
*/
|
|
2037
|
+
declare function readPeerManifest(value: unknown): PeerManifest | null;
|
|
2038
|
+
/** Why a document may not go to a peer. */
|
|
2039
|
+
type HoldReason = {
|
|
2040
|
+
protocol: string;
|
|
2041
|
+
version: number;
|
|
2042
|
+
peerSupports: readonly number[];
|
|
2045
2043
|
};
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
readonly
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2044
|
+
/** Only keys this reactor registers are judged; an absent key agrees. */
|
|
2045
|
+
declare function holdReason(peer: Supports, versions: {
|
|
2046
|
+
readonly [protocol: string]: number;
|
|
2047
|
+
}, capabilities: readonly PeerCapability[]): HoldReason | undefined;
|
|
2048
|
+
/** Whether a peer runs every version this reactor does, so nothing is held. */
|
|
2049
|
+
declare function coversLocal(peer: Supports, local: Supports, capabilities: readonly PeerCapability[]): boolean;
|
|
2050
|
+
/**
|
|
2051
|
+
* protocolVersions for a new document: per negotiated protocol, the highest
|
|
2052
|
+
* version up to the local preference that every member supports, else the
|
|
2053
|
+
* lowest local one. `requested` wins over what is selected.
|
|
2054
|
+
*/
|
|
2055
|
+
declare function selectProtocolVersions(input: {
|
|
2056
|
+
capabilities: readonly PeerCapability[];
|
|
2057
|
+
flags: PeerCapabilityFlags;
|
|
2058
|
+
members: Iterable<Supports>;
|
|
2059
|
+
requested?: {
|
|
2060
|
+
readonly [protocol: string]: number;
|
|
2053
2061
|
};
|
|
2062
|
+
}): {
|
|
2063
|
+
[protocol: string]: number;
|
|
2054
2064
|
};
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
readonly
|
|
2063
|
-
}
|
|
2064
|
-
|
|
2065
|
-
readonly id: string;
|
|
2066
|
-
readonly key: string;
|
|
2067
|
-
readonly name: string | null;
|
|
2068
|
-
readonly description: string | null;
|
|
2069
|
-
readonly actionType: string;
|
|
2070
|
-
readonly creatorKey: string;
|
|
2071
|
-
readonly scope: "global" | "local";
|
|
2072
|
-
readonly input: InputTypeDefinition | null;
|
|
2073
|
-
readonly errors: readonly CompiledErrorDefinition[];
|
|
2074
|
-
readonly examples: readonly DefinitionExample[];
|
|
2075
|
-
readonly template: string | null;
|
|
2076
|
-
readonly reducer: string | null;
|
|
2077
|
-
};
|
|
2078
|
-
type DocumentModelModuleDefinition = {
|
|
2079
|
-
readonly id: string;
|
|
2080
|
-
readonly key: string;
|
|
2081
|
-
readonly name: string;
|
|
2082
|
-
readonly description: string | null;
|
|
2083
|
-
readonly operations: readonly DocumentModelOperationDefinition[];
|
|
2065
|
+
/**
|
|
2066
|
+
* Another reactor's selection for a new document, within `supports`: a
|
|
2067
|
+
* negotiated protocol drops to the highest supported version at or below it,
|
|
2068
|
+
* or takes its baseline when absent; another known protocol must be
|
|
2069
|
+
* supported; an unknown one passes, as refusalFor admits it.
|
|
2070
|
+
*/
|
|
2071
|
+
declare function capSelection(selected: {
|
|
2072
|
+
readonly [protocol: string]: number;
|
|
2073
|
+
} | undefined, capabilities: readonly PeerCapability[], supports: Supports): {
|
|
2074
|
+
[protocol: string]: number;
|
|
2084
2075
|
};
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2076
|
+
//#endregion
|
|
2077
|
+
//#region document-model/base-reducer-protocol.d.ts
|
|
2078
|
+
declare const BASE_REDUCER_VERSIONS: readonly [1, 2, 3];
|
|
2079
|
+
type BaseReducerVersion = (typeof BASE_REDUCER_VERSIONS)[number];
|
|
2080
|
+
interface UndoModelValues {
|
|
2081
|
+
skip: true;
|
|
2082
|
+
"noop-chain": true;
|
|
2083
|
+
retraction: true;
|
|
2084
|
+
}
|
|
2085
|
+
/** What UNDO and REDO become. */
|
|
2086
|
+
type UndoModel = keyof UndoModelValues;
|
|
2087
|
+
interface SkipMeaningValues {
|
|
2088
|
+
"undo-or-rewind": true;
|
|
2089
|
+
rewind: true;
|
|
2090
|
+
}
|
|
2091
|
+
/** Whether a stored skip can be an undo, or is only a replica's rewind. */
|
|
2092
|
+
type SkipMeaning = keyof SkipMeaningValues;
|
|
2093
|
+
interface TieOrderValues {
|
|
2094
|
+
"rank-locale": true;
|
|
2095
|
+
canonical: true;
|
|
2096
|
+
}
|
|
2097
|
+
/** How same-timestamp actions are ordered. */
|
|
2098
|
+
type TieOrder = keyof TieOrderValues;
|
|
2099
|
+
interface SynthesizedIdFormValues {
|
|
2100
|
+
hashed: true;
|
|
2101
|
+
none: true;
|
|
2102
|
+
}
|
|
2103
|
+
/** How a synthesized row's action id derives from its source's; "none" synthesizes nothing. */
|
|
2104
|
+
type SynthesizedIdForm = keyof SynthesizedIdFormValues;
|
|
2105
|
+
interface ReplayHashValues {
|
|
2106
|
+
sender: true;
|
|
2107
|
+
receiver: true;
|
|
2108
|
+
}
|
|
2109
|
+
/** Whose state hash a received row keeps. */
|
|
2110
|
+
type ReplayHash = keyof ReplayHashValues;
|
|
2111
|
+
interface DerivationModelValues {
|
|
2112
|
+
replay: true;
|
|
2113
|
+
"retraction-rule": true;
|
|
2114
|
+
}
|
|
2115
|
+
/** How a scope's state derives from its rows. */
|
|
2116
|
+
type DerivationModel = keyof DerivationModelValues;
|
|
2117
|
+
interface ReducerContractValues {
|
|
2118
|
+
any: true;
|
|
2119
|
+
"state-reducer": true;
|
|
2120
|
+
}
|
|
2121
|
+
/** Which registered reducers a version runs. */
|
|
2122
|
+
type ReducerContract = keyof ReducerContractValues;
|
|
2123
|
+
interface GatingFlagValues {
|
|
2124
|
+
undoV3: true;
|
|
2125
|
+
}
|
|
2126
|
+
/** A reactor feature flag a version runs only under. */
|
|
2127
|
+
type GatingFlag = keyof GatingFlagValues;
|
|
2128
|
+
type BaseReducerCapabilities = {
|
|
2129
|
+
readonly version: BaseReducerVersion;
|
|
2130
|
+
readonly undo: UndoModel;
|
|
2131
|
+
/** "retraction-rule" derives every scope outside RULE_EXEMPT_SCOPES by the rule. */
|
|
2132
|
+
readonly derivation: DerivationModel;
|
|
2133
|
+
readonly skip: SkipMeaning;
|
|
2134
|
+
readonly tieOrder: TieOrder;
|
|
2135
|
+
readonly synthesizedId: SynthesizedIdForm;
|
|
2136
|
+
readonly replayHash: ReplayHash;
|
|
2137
|
+
/** "state-reducer" runs only models whose every registered reducer createReducer tagged. */
|
|
2138
|
+
readonly reducerContract: ReducerContract;
|
|
2139
|
+
/** The flag this version runs only under; null runs always. */
|
|
2140
|
+
readonly gatedBy: GatingFlag | null;
|
|
2096
2141
|
};
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2142
|
+
/** The versions a reactor running `flags` supports. */
|
|
2143
|
+
declare function baseReducerVersionsFor(flags: PeerCapabilityFlags): BaseReducerVersion[];
|
|
2144
|
+
/** Flags under which this build runs every version it knows. */
|
|
2145
|
+
declare const FLAGS_FOR_EVERY_VERSION: { readonly [F in GatingFlag]: true; };
|
|
2146
|
+
/** Scopes the retraction rule never derives. */
|
|
2147
|
+
declare const RULE_EXEMPT_SCOPES: ReadonlySet<string>;
|
|
2148
|
+
declare function assertNever(value: never, what: string): never;
|
|
2149
|
+
declare function isBaseReducerVersion(value: unknown): value is BaseReducerVersion;
|
|
2150
|
+
declare function capabilitiesOf(version: BaseReducerVersion): BaseReducerCapabilities;
|
|
2151
|
+
/**
|
|
2152
|
+
* The version `versions` runs as: a known number as itself, a number this
|
|
2153
|
+
* build does not know as `highest`, undefined without a number.
|
|
2154
|
+
*/
|
|
2155
|
+
declare function resolveBaseReducerVersion(versions: ProtocolVersions | undefined, highest?: BaseReducerVersion): BaseReducerVersion | undefined;
|
|
2156
|
+
/** Throws on a missing version: defaulting one would replay through the wrong reducer. */
|
|
2157
|
+
declare function baseReducerVersion(header: PHDocumentHeader): BaseReducerVersion;
|
|
2158
|
+
/** Throws on a missing or unknown version. */
|
|
2159
|
+
declare function baseReducerCapabilities(header: PHDocumentHeader): BaseReducerCapabilities;
|
|
2160
|
+
/** Undefined only for a header without a version; throws on an unknown one. */
|
|
2161
|
+
declare function optionalBaseReducerCapabilities(header: PHDocumentHeader): BaseReducerCapabilities | undefined;
|
|
2162
|
+
/** Undefined when `versions` names no known base-reducer version. */
|
|
2163
|
+
declare function capabilitiesFor(versions: ProtocolVersions | undefined): BaseReducerCapabilities | undefined;
|
|
2164
|
+
/** From CREATE_DOCUMENT input; undefined when it names no known version. */
|
|
2165
|
+
declare function createdCapabilities(input: Partial<CreateDocumentActionInput> | undefined): BaseReducerCapabilities | undefined;
|
|
2166
|
+
/**
|
|
2167
|
+
* Every decision a consumer may take on a capability axis. Outside this module
|
|
2168
|
+
* and the other protocol owners, an axis is read only through these or through
|
|
2169
|
+
* an exhaustive switch.
|
|
2170
|
+
*/
|
|
2171
|
+
declare const CAPABILITY_DECISIONS: {
|
|
2172
|
+
readonly usesRetractionRule: {
|
|
2173
|
+
replay: false;
|
|
2174
|
+
"retraction-rule": true;
|
|
2104
2175
|
};
|
|
2105
|
-
readonly
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
readonly name: string;
|
|
2109
|
-
readonly description: string;
|
|
2110
|
-
readonly extension: string;
|
|
2111
|
-
readonly author: {
|
|
2112
|
-
readonly name: string;
|
|
2113
|
-
readonly website: string | null;
|
|
2114
|
-
};
|
|
2176
|
+
readonly needsTaggedModel: {
|
|
2177
|
+
any: false;
|
|
2178
|
+
"state-reducer": true;
|
|
2115
2179
|
};
|
|
2116
|
-
readonly
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
type DefinitionSourcesConfig = {
|
|
2120
|
-
readonly formatVersion: 1;
|
|
2121
|
-
} & ({
|
|
2122
|
-
readonly mode: "code-first";
|
|
2123
|
-
readonly entries: readonly DefinitionSource[];
|
|
2124
|
-
} | {
|
|
2125
|
-
readonly mode: "schema-first";
|
|
2126
|
-
readonly entries?: never;
|
|
2127
|
-
});
|
|
2128
|
-
type DefinitionCheckRequest = {
|
|
2129
|
-
readonly formatVersion: 1;
|
|
2130
|
-
readonly profile: DefinitionCheckProfile;
|
|
2131
|
-
readonly warningsAsErrors?: boolean;
|
|
2132
|
-
} & ({
|
|
2133
|
-
readonly sourceMode: "code-first";
|
|
2134
|
-
readonly sourceOrigin: "config" | "cli" | "request";
|
|
2135
|
-
readonly sources: readonly [DefinitionSource, ...DefinitionSource[]];
|
|
2136
|
-
} | {
|
|
2137
|
-
readonly sourceMode: "schema-first";
|
|
2138
|
-
readonly sourceOrigin: "config";
|
|
2139
|
-
readonly sources?: never;
|
|
2140
|
-
});
|
|
2141
|
-
type DefinitionCompatibilitySelection = {
|
|
2142
|
-
readonly identity: "derived-v1" | "explicit-schema-first";
|
|
2143
|
-
readonly serialization: "canonical-v1" | "explicit-schema-first";
|
|
2144
|
-
readonly paths: {
|
|
2145
|
-
readonly ids: readonly string[];
|
|
2146
|
-
readonly names: readonly string[];
|
|
2147
|
-
readonly serialization: readonly string[];
|
|
2180
|
+
readonly sortsJobsCanonically: {
|
|
2181
|
+
"rank-locale": false;
|
|
2182
|
+
canonical: true;
|
|
2148
2183
|
};
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
readonly formatVersion: 1;
|
|
2153
|
-
readonly profile: DefinitionCheckProfile;
|
|
2154
|
-
readonly sourceSet: {
|
|
2155
|
-
readonly mode: "code-first" | "schema-first";
|
|
2156
|
-
readonly origin: "config" | "cli" | "request";
|
|
2157
|
-
readonly digest: Sha256Digest;
|
|
2158
|
-
readonly sources: readonly DefinitionSource[];
|
|
2184
|
+
readonly conflictWindowMovesEveryRow: {
|
|
2185
|
+
"rank-locale": false;
|
|
2186
|
+
canonical: true;
|
|
2159
2187
|
};
|
|
2160
|
-
readonly
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
readonly compatibility?: DefinitionCompatibilitySelection;
|
|
2164
|
-
})[];
|
|
2165
|
-
readonly diagnostics: readonly DefinitionDiagnostic[];
|
|
2166
|
-
readonly summary: {
|
|
2167
|
-
readonly errors: number;
|
|
2168
|
-
readonly warnings: number;
|
|
2188
|
+
readonly skipMayUndo: {
|
|
2189
|
+
"undo-or-rewind": true;
|
|
2190
|
+
rewind: false;
|
|
2169
2191
|
};
|
|
2170
|
-
}
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2192
|
+
};
|
|
2193
|
+
/** Whether the version derives scopes by the retraction rule; a versionless header does not. */
|
|
2194
|
+
declare function usesRetractionRule(caps: BaseReducerCapabilities | undefined): boolean;
|
|
2195
|
+
/** Whether the retraction rule derives `scope`. */
|
|
2196
|
+
declare function derivesByRule(caps: BaseReducerCapabilities | undefined, scope: string): boolean;
|
|
2197
|
+
/** Whether the retraction rule derives `scope` of the document `header` heads. */
|
|
2198
|
+
declare function documentDerivesByRule(header: PHDocumentHeader, scope: string): boolean;
|
|
2199
|
+
/** Whether the version runs only models whose every reducer is tagged. */
|
|
2200
|
+
declare function needsTaggedModel(caps: BaseReducerCapabilities | undefined): boolean;
|
|
2201
|
+
/** How same-timestamp actions are ordered; a versionless header ranks and compares by locale. */
|
|
2202
|
+
declare function tieOrderOf(caps: BaseReducerCapabilities | undefined): TieOrder;
|
|
2203
|
+
/** Whether a job's actions are stored in canonical order rather than as submitted. */
|
|
2204
|
+
declare function sortsJobsCanonically(caps: BaseReducerCapabilities | undefined): boolean;
|
|
2205
|
+
/** Whether every conflicting row of a load moves, rather than only those past the predecessor bound. */
|
|
2206
|
+
declare function conflictWindowMovesEveryRow(caps: BaseReducerCapabilities | undefined): boolean;
|
|
2207
|
+
/** Whether a stored skip may be an undo, not only a replica's rewind. */
|
|
2208
|
+
declare function skipMayUndo(caps: BaseReducerCapabilities | undefined): boolean;
|
|
2209
|
+
/** Whether a stored skip in `scope` is a rewind the reducer applies. */
|
|
2210
|
+
declare function appliesRewind(caps: BaseReducerCapabilities, scope: string): boolean;
|
|
2211
|
+
/** Whether a submitted RETRACT is this version's undo. */
|
|
2212
|
+
declare function acceptsSubmittedRetract(caps: BaseReducerCapabilities): boolean;
|
|
2213
|
+
/** Whether a submitted UNDO or REDO is this version's undo; on retraction a client submits RETRACT. */
|
|
2214
|
+
declare function acceptsSubmittedUndoRedo(caps: BaseReducerCapabilities): boolean;
|
|
2215
|
+
/** Whether every registered version of `documentType` runs under `caps`; undefined when none is. */
|
|
2216
|
+
declare function modelRunsBaseReducer(caps: BaseReducerCapabilities, documentType: string, modules: readonly DocumentModelModule[]): boolean | undefined;
|
|
2217
|
+
type ProtocolSupport = Supports["protocols"];
|
|
2218
|
+
type ProtocolRefusal = {
|
|
2219
|
+
protocol: string;
|
|
2220
|
+
version: number;
|
|
2221
|
+
/** Set when the version is supported but this model cannot run it. */
|
|
2222
|
+
documentType?: string;
|
|
2223
|
+
};
|
|
2224
|
+
/** Why `versions` cannot run here; unregistered protocols and types are admitted. */
|
|
2225
|
+
declare function refusalFor(documentType: string | undefined, versions: ProtocolVersions | undefined, support: ProtocolSupport, modules: readonly DocumentModelModule[]): ProtocolRefusal | undefined;
|
|
2226
|
+
//#endregion
|
|
2227
|
+
//#region document-model/constants.d.ts
|
|
2228
|
+
declare const documentModelFileExtension: "phdm";
|
|
2229
|
+
declare const documentModelInitialLocalState: DocumentModelLocalState;
|
|
2230
|
+
declare const documentModelInitialGlobalState: DocumentModelGlobalState;
|
|
2231
|
+
declare const documentModelGlobalState: DocumentModelGlobalState;
|
|
2232
|
+
declare const HASH_ALGORITHM_SHA1 = "sha1";
|
|
2233
|
+
declare const HASH_ALGORITHM_SHA256 = "sha256";
|
|
2234
|
+
declare const HASH_ALGORITHM_SHA512 = "sha512";
|
|
2235
|
+
declare const HASH_ENCODING_BASE64 = "base64";
|
|
2236
|
+
declare const HASH_ENCODING_HEX = "hex";
|
|
2237
|
+
//#endregion
|
|
2238
|
+
//#region document-model/create-base-reducer.d.ts
|
|
2239
|
+
type CreateBaseReducerLogger = {
|
|
2240
|
+
debug: (message: string, ...replacements: unknown[]) => void;
|
|
2241
|
+
warn: (message: string, ...replacements: unknown[]) => void;
|
|
2242
|
+
};
|
|
2178
2243
|
/**
|
|
2179
|
-
*
|
|
2244
|
+
* Steps a selected base-reducer down to the highest version the model runs.
|
|
2245
|
+
* An unregistered type cannot be checked, so it takes the highest version
|
|
2246
|
+
* that needs no tagged reducer.
|
|
2180
2247
|
*/
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2248
|
+
declare function fitCreateBaseReducer(selected: ProtocolVersions, documentType: string | undefined, modules: readonly DocumentModelModule[], logger: CreateBaseReducerLogger): ProtocolVersions;
|
|
2249
|
+
//#endregion
|
|
2250
|
+
//#region document-model/crypto.d.ts
|
|
2251
|
+
declare const hashBrowser: (data: string | Uint8Array | ArrayBufferView | DataView, algorithm?: string, encoding?: string, _params?: Record<string, unknown>) => string;
|
|
2252
|
+
declare function getUnixTimestamp(date: Date | string): string;
|
|
2253
|
+
declare function buildOperationSignatureParams({ documentId, signer, action, previousStateHash }: ActionSignatureContext): [string, string, string, string];
|
|
2254
|
+
declare function buildOperationSignatureMessage(params: [string, string, string, string]): Uint8Array;
|
|
2255
|
+
declare function ab2hex(ab: ArrayBuffer | ArrayBufferView): string;
|
|
2256
|
+
declare function hex2ab(hex: string): Uint8Array<ArrayBuffer>;
|
|
2186
2257
|
/**
|
|
2187
|
-
*
|
|
2258
|
+
* Decodes a base58btc (Bitcoin/IPFS alphabet) string to bytes. Returns null on
|
|
2259
|
+
* any character outside the alphabet.
|
|
2188
2260
|
*/
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
readonly key: string;
|
|
2195
|
-
readonly fieldName: string;
|
|
2196
|
-
readonly description: string | null;
|
|
2197
|
-
readonly deprecated: string | null;
|
|
2198
|
-
readonly args: readonly InputFieldDefinition[];
|
|
2199
|
-
readonly returns: TypeReferenceDefinition;
|
|
2200
|
-
readonly access: SubgraphEntryAccess;
|
|
2201
|
-
};
|
|
2202
|
-
type SubgraphEntryDefinition = ({
|
|
2203
|
-
readonly kind: "query";
|
|
2204
|
-
} & SubgraphRootEntryBase) | ({
|
|
2205
|
-
readonly kind: "mutation";
|
|
2206
|
-
} & SubgraphRootEntryBase) | ({
|
|
2207
|
-
readonly kind: "subscription";
|
|
2208
|
-
} & SubgraphRootEntryBase) | {
|
|
2209
|
-
readonly kind: "computed-field";
|
|
2210
|
-
readonly typeName: string;
|
|
2211
|
-
readonly fieldName: string;
|
|
2212
|
-
readonly access: SubgraphEntryAccess;
|
|
2213
|
-
} | {
|
|
2214
|
-
readonly kind: "resolve-type";
|
|
2215
|
-
readonly typeName: string;
|
|
2216
|
-
readonly access: SubgraphEntryAccess;
|
|
2217
|
-
} | {
|
|
2218
|
-
readonly kind: "is-type-of";
|
|
2219
|
-
readonly typeName: string;
|
|
2220
|
-
readonly access: SubgraphEntryAccess;
|
|
2221
|
-
};
|
|
2222
|
-
/** A subgraph may also reference the internal scalars the host declares. */
|
|
2223
|
-
type SubgraphScalarReferenceDefinition = (CatalogScalarImplementationReference<CatalogScalarName> & {
|
|
2224
|
-
readonly graphQLProfile: "legacy-graphql-default-v1";
|
|
2225
|
-
}) | {
|
|
2226
|
-
readonly name: string;
|
|
2227
|
-
readonly implementation: `package#${string}`;
|
|
2228
|
-
readonly graphQLProfile: "declared-coercion-v1";
|
|
2229
|
-
readonly definition: StoredScalarDefinition;
|
|
2230
|
-
};
|
|
2231
|
-
type SubgraphDefinitionBase = {
|
|
2232
|
-
readonly kind: "powerhouse.subgraph";
|
|
2233
|
-
readonly formatVersion: 1;
|
|
2234
|
-
/** The instance and route segment name, not a new global identity. */
|
|
2235
|
-
readonly name: string;
|
|
2236
|
-
readonly compositionPolicy: "host-current";
|
|
2237
|
-
readonly federationProfile: "host-current";
|
|
2238
|
-
};
|
|
2239
|
-
type SubgraphDefinition = SubgraphDefinitionBase & ({
|
|
2240
|
-
readonly schemaKind: "typed";
|
|
2241
|
-
readonly hasSubscriptions: boolean;
|
|
2242
|
-
readonly types: readonly NamedGraphQLTypeDefinition[];
|
|
2243
|
-
readonly entries: readonly SubgraphEntryDefinition[];
|
|
2244
|
-
readonly scalars: readonly SubgraphScalarReferenceDefinition[];
|
|
2245
|
-
/**
|
|
2246
|
-
* Every emitted definition name appears once, including roots and
|
|
2247
|
-
* scalars. This order preserves the authored schema's print order.
|
|
2248
|
-
*/
|
|
2249
|
-
readonly definitionOrder: readonly string[];
|
|
2250
|
-
} | {
|
|
2251
|
-
readonly schemaKind: "graphql-ast-compat";
|
|
2252
|
-
/**
|
|
2253
|
-
* `null` records runtime `undefined`. Both `null` and `false` disable
|
|
2254
|
-
* subscriptions, but compatibility must preserve their distinct values.
|
|
2255
|
-
*/
|
|
2256
|
-
readonly hasSubscriptions: boolean | null;
|
|
2257
|
-
readonly document: LocationFreeGraphQLDocumentNode;
|
|
2258
|
-
readonly resolverCoordinates: readonly ResolverCoordinateDefinition[];
|
|
2259
|
-
readonly access: "manual";
|
|
2260
|
-
});
|
|
2261
|
+
declare function base58Decode(input: string): Uint8Array | null;
|
|
2262
|
+
/** Encodes bytes as unpadded base64url. */
|
|
2263
|
+
declare function bytesToBase64Url(bytes: Uint8Array): string;
|
|
2264
|
+
/** Decodes a base64url string to bytes (portable across node, browsers, workers). */
|
|
2265
|
+
declare function base64UrlToBytes(input: string): Uint8Array;
|
|
2261
2266
|
//#endregion
|
|
2262
2267
|
//#region document-model/create-document.d.ts
|
|
2263
2268
|
declare function createDocumentAction(input: CreateDocumentActionInput): Action;
|
|
@@ -2399,6 +2404,13 @@ declare class NoUndoRedoTargetError extends Error {
|
|
|
2399
2404
|
constructor(actionType: "UNDO" | "REDO", scope: string);
|
|
2400
2405
|
static isError(error: unknown): error is NoUndoRedoTargetError;
|
|
2401
2406
|
}
|
|
2407
|
+
/** A loaded UNDO row; base-reducer 1 and 2 store an undo as a NOOP. */
|
|
2408
|
+
declare class UndoOperationRefusedError extends Error {
|
|
2409
|
+
readonly documentId: string;
|
|
2410
|
+
readonly scope: string;
|
|
2411
|
+
constructor(documentId: string, scope: string);
|
|
2412
|
+
static isError(error: unknown): error is UndoOperationRefusedError;
|
|
2413
|
+
}
|
|
2402
2414
|
/**
|
|
2403
2415
|
* Error thrown when attempting to downgrade a document version.
|
|
2404
2416
|
*/
|
|
@@ -2806,7 +2818,10 @@ type UndoRedoAvailability = {
|
|
|
2806
2818
|
canUndo: boolean;
|
|
2807
2819
|
canRedo: boolean;
|
|
2808
2820
|
};
|
|
2809
|
-
/**
|
|
2821
|
+
/**
|
|
2822
|
+
* An older host serves no header versions; CREATE_DOCUMENT carries them. A
|
|
2823
|
+
* number this build does not know runs as the highest it runs.
|
|
2824
|
+
*/
|
|
2810
2825
|
declare function undoCapabilitiesOf(header: PHDocumentHeader, createInput?: Partial<CreateDocumentActionInput>): BaseReducerCapabilities | undefined;
|
|
2811
2826
|
/** Whether undo resolves a target before it can be planned. */
|
|
2812
2827
|
declare function undoNeedsTargets(caps: BaseReducerCapabilities): boolean;
|
|
@@ -2814,8 +2829,12 @@ declare function undoNeedsTargets(caps: BaseReducerCapabilities): boolean;
|
|
|
2814
2829
|
declare function undoRedoActions(caps: BaseReducerCapabilities, type: "UNDO" | "REDO", scope: string, targets: UndoRedoTargets | undefined): Action[];
|
|
2815
2830
|
/** Below the retraction model reads serve no clipboard: undo is approximate. */
|
|
2816
2831
|
declare function undoRedoAvailabilityOf(caps: BaseReducerCapabilities, targets: UndoRedoTargets | undefined, revision: number, readable: boolean): UndoRedoAvailability;
|
|
2817
|
-
/**
|
|
2818
|
-
|
|
2832
|
+
/**
|
|
2833
|
+
* Runs `run` after every earlier call with the same key has settled. A caller
|
|
2834
|
+
* whose `signal` aborts stops waiting and rejects with its reason; the key
|
|
2835
|
+
* stays held until the earlier calls settle.
|
|
2836
|
+
*/
|
|
2837
|
+
declare function serializeByKey<T>(chains: Map<string, Promise<unknown>>, key: string, run: () => Promise<T>, signal?: AbortSignal): Promise<T>;
|
|
2819
2838
|
//#endregion
|
|
2820
2839
|
//#region document-model/retraction.d.ts
|
|
2821
2840
|
/** Base-reducer 3: the rows left once each reshuffle rewind removes what it covers. */
|
|
@@ -5578,8 +5597,9 @@ type PHConnectOpenPanel = z.infer<typeof connectOpenPanelSchema>;
|
|
|
5578
5597
|
type PHReactorClientMode = z.infer<typeof connectReactorClientModeSchema>;
|
|
5579
5598
|
/** Served `instance`: the authored fields plus the derived `reactorClient`. */
|
|
5580
5599
|
type PHConnectInstance = z.infer<typeof connectRuntimeInstanceSchema>;
|
|
5581
|
-
/**
|
|
5582
|
-
* with or the two compute different replay outcomes.
|
|
5600
|
+
/** The four enforcement flags each imply their predecessors, and must match
|
|
5601
|
+
* the fleet Connect syncs with or the two compute different replay outcomes.
|
|
5602
|
+
* `undoV3` has no prerequisites and is negotiated with peers. */
|
|
5583
5603
|
type PHConnectReactorFeatureFlags = z.infer<typeof connectReactorFeatureFlagsSchema>;
|
|
5584
5604
|
type PHConnectReactor = z.infer<typeof connectReactorSchema>;
|
|
5585
5605
|
type PHConnectPwaUrlPattern = z.infer<typeof connectPwaUrlPatternSchema>;
|
|
@@ -5681,8 +5701,10 @@ type PowerhouseConfig = {
|
|
|
5681
5701
|
};
|
|
5682
5702
|
packageRegistryUrl?: string;
|
|
5683
5703
|
connect?: PHConnectRuntimeConfig;
|
|
5704
|
+
/** @experimental The modules that declare code-first definitions, or an explicit schema-first selection. */
|
|
5705
|
+
definitionSources?: DefinitionSourcesConfig;
|
|
5684
5706
|
};
|
|
5685
5707
|
//#endregion
|
|
5686
|
-
export { PackageManagerArgs as $, setOperationErrorCode as $_, SignalType as $a, ModuleSchema as $c, UnsupportedDocumentModelVersionError as $d, GraphQLDirectiveDefinitionNode as $f, hashActionV2 as $g, isPlainValue as $h, SetAuthorNameInput as $i, UndoSchema as $l, createdCapabilities as $m, MakeEmpty as $n, ProcessorDispatchCreateResult as $o, ab2hex as $p, MutationUpdateStateExampleArgs as $r, assertOperationErrorIdUnique as $s, DeleteOperationInput as $t, CreateProtocolVersionsOptions as $u, skipHeaderOperations as $v, setPreferredEditorOperation as $y, PHConnectPwaRuntimeCaching as A, operationFromAction as A_, SetOperationNameInput as Aa, UndoRedoBatch as Ac, replayDocumentVersioned as Ad, DefinitionDiagnostic as Af, decide as Ag, localSupports as Ah, ReorderModulesAction as Ai, SetNameActionInputSchema as Al, RULE_EXEMPT_SCOPES as Am, DocumentOperationsIgnoreMap as An, createNamespacedDb as Ao, NamedGraphQLTypeDefinition as Ap, MutationSetAuthorNameArgs as Ar, RouteContext as As, ConfigEntry as At, undoRedoActions as Au, filterDocumentOperationsResultingState as Av, ProtocolVersions as Ay, PHConnectRuntimeDefaultDriveRemote as B, reorderStateExamples as B_, SetPreferredEditorActionInput as Ba, ConfigEntrySchema as Bc, AuthAlreadyInitializedError as Bd, DirectiveUseDefinition as Bf, TransportAction as Bg, InvalidGrantError as Bh, RetractActionInput as Bi, SetOperationScopeInputSchema as Bl, TieOrderValues as Bm, IAction as Bn, IRelationalDb as Bo, ScalarTypeReferenceDefinition as Bp, MutationSetOperationDescriptionArgs as Br, WebhookHashAlgorithm as Bs, DeleteChangeLogItemAction as Bt, documentModelVersioningReducer as Bu, mapSkippedOperations as Bv, v2RequiredProtocolVersions as By, PHConnectOpenPanel as C, deleteOperationError as C_, SetOperationErrorDescriptionAction as Ca, compareActionIds as Cc, isDocumentZip as Cd, CatalogScalarReferenceDefinition as Cf, applyAuthAction as Cg, Supports as Ch, ReleaseNewVersionAction as Ci, SetInitialStateInputSchema as Cl, DerivationModel as Cm, DocumentModelOperationOperations as Cn, CodegenState as Co, InterfaceTypeDefinition as Cp, MutationRedoArgs as Cr, IWebhookEndpoints as Cs, AddRelationshipActionInput as Ct, undoTarget as Cu, appendWithoutApplying as Cv, defaultBaseState as Cy, PHConnectPwaFileHandler as D, moveOperation as D_, SetOperationErrorTemplateAction as Da, legacyIdOrder as Dc, zipEntries as Dd, DefinitionCheckRequest as Df, applySetGrantAction as Dg, isOlderManifest as Dh, ReorderChangeLogItemsInput as Di, SetModelNameInputSchema as Dl, GatingFlagValues as Dm, DocumentModelUtils as Dn, SETTLED_CODEGEN_STATES as Do, ListTypeReferenceDefinition as Dp, MutationReorderOperationErrorsArgs as Dr, RouteAuth as Ds, AssertIsStateOfType as Dt, serializeByKey as Du, checkCleanedOperationsIntegrity as Dv, defaultPHState as Dy, PHConnectPwaCacheStrategy as E, documentModelActions as E_, SetOperationErrorNameInput as Ea, idOrderFor as Ec, writeFileBrowser as Ed, DefinitionCheckReport as Ef, applyRemoveGrantAction as Eg, holdReason as Eh, ReorderChangeLogItemsAction as Ei, SetModelIdInputSchema as El, GatingFlag as Em, DocumentModelStateOperations as En, PackageLoadFailure as Eo, JsonValue as Ep, MutationReorderModulesArgs as Er, RouteActor as Es, AssertIsDocumentOfType as Et, UndoRedoTargets as Eu, baseCreateDocument as Ev, defaultLocalState as Ey, PHConnectRenown as F, reorderChangeLogItems as F_, SetOperationScopeAction as Fa, AddOperationExampleInputSchema as Fc, applyUpgradeDocumentAction as Fd, DefinitionPath as Ff, mentionedGroupIds as Fg, selectProtocolVersions as Fh, ReorderOperationExamplesInput as Fi, SetOperationErrorNameInputSchema as Fl, SkipMeaning as Fm, EditorProps as Fn, relationalDbToQueryBuilder as Fo, PowerhouseScalarName as Fp, MutationSetModelIdArgs as Fr, RouteTransport as Fs, CreateChildDocumentSignal as Ft, documentModelOperationExampleReducer as Fu, groupOperationsByScope as Fv, isDerivedDocumentId as Fy, PHLength as G, setModelDescription as G_, SetStateSchemaInput as Ga, DeleteOperationExampleInputSchema as Gc, GrantNotFoundError as Gd, DocumentScalarReferenceDefinition as Gf, ActionSignerIdentity as Gg, assertAuthAdministrationRetained as Gh, SchemaNOOPAction as Gi, SetSlugActionSchema as Gl, appliesRewind as Gm, ISignalResult as Gn, RelationalDbProcessorClass as Go, StoredScalarDefinition as Gp, MutationSetOperationNameArgs as Gr, WebhookSignatureEncoding as Gs, DeleteDocumentActionInput as Gt, updateDocument as Gu, precedes as Gv, DocumentOperations as Gy, PHEdges as H, setAuthorName as H_, SetSlugAction as Ha, DeleteChangeLogItemInputSchema as Hc, AuthPolicyNotPreservedError as Hd, DocumentModelModuleDefinition as Hf, TransportSigner as Hg, MAX_CAPABILITY_OPERATIONS as Hh, SaveToFile as Hi, SetPreferredEditorActionInputSchema as Hl, UndoModelValues as Hm, IDocument as Hn, IRelationalQueryBuilder as Ho, SchemaFirstGraphQLDocumentCompatibility as Hp, MutationSetOperationErrorDescriptionArgs as Hr, WebhookReply as Hs, DeleteChildDocumentInput as Ht, createReducer as Hu, merge as Hv, isDocumentAction as Hy, PHConnectRenownAdapters as I, reorderModuleOperations as I_, SetOperationScopeInput as Ia, AddOperationInputSchema as Ic, computeUpgradeTransitions as Id, DefinitionRef as If, moveGrant as Ig, AuthAdministrationLockoutError as Ih, ReorderStateExamplesAction as Ii, SetOperationErrorTemplateInputSchema as Il, SkipMeaningValues as Im, Exact as In, DOCUMENT_ID_COLUMNS as Io, ResolverCoordinateDefinition as Ip, MutationSetModelNameArgs as Ir, RouteUser as Is, CreateDocument as It, documentModelOperationReducer as Iu, hashDocumentStateForScope as Iv, isSignaturePolicy as Iy, PHReactorRenown as J, setModelName as J_, Set_Slug as Ja, DocumentActionSchema as Jc, InvalidActionInputZodError as Jd, EnumValueDefinition as Jf, DOCUMENT_SCOPE_ACTION_TYPES as Jg, assertValidInitialGrants as Jh, SchemaSetPreferredEditorAction as Ji, Set_PreferredEditorSchema as Jl, baseReducerVersion as Jm, InputMaybe as Jn, IProcessorHostModuleBase as Jo, SubgraphEntryAccess as Jp, MutationSetOperationTemplateArgs as Jr, deletedDocumentId as Js, DeleteOperationAction as Jt, PurgeMarkerOperation as Ju, removeExistingOperations as Jv, OperationOutcome as Jy, PHPackageProvider as K, setModelExtension as K_, Set_Name as Ka, DeleteOperationInputSchema as Kc, HashMismatchError as Kd, EmptyLocalStateDefinition as Kf, ActionSigningTarget as Kg, assertValidGrant as Kh, SchemaRedoAction as Ki, SetStateSchemaInputSchema as Kl, assertNever as Km, ISigner as Kn, IProcessor as Ko, SubgraphDefinition as Kp, MutationSetOperationReducerArgs as Kr, WebhookSpec as Ks, DeleteModuleAction as Kt, stateReducerOf as Ku, prepareOperations as Kv, Operation as Ky, PHConnectRouterSettings as L, reorderModules as L_, SetOperationTemplateAction as La, AddStateExampleInputSchema as Lc, latestVersionOf as Ld, DefinitionRelatedLocation as Lf, removeGrant as Lg, AuthAdministrationMissingError as Lh, ReorderStateExamplesInput as Li, SetOperationNameInputSchema as Ll, SynthesizedIdForm as Lm, FileInput as Ln, ExtractProcessorSchemaOrSelf as Lo, ScalarGraphQLProfile as Lp, MutationSetModuleDescriptionArgs as Lr, ScopedRouteHandle as Ls, CreateDocumentAction as Lt, documentModelReducer as Lu, isNoopOperation as Lv, protocolVersionsFor as Ly, PHConnectReactor as M, operationWithContext as M_, SetOperationReducerInput as Ma, AddChangeLogItemInputSchema as Mc, UpgradeReducer as Md, DefinitionDiagnosticSeverity as Mf, initializeAuth as Mg, mergePeerCapabilities as Mh, ReorderOperationErrorsAction as Mi, SetOperationDescriptionInputSchema as Ml, ReducerContractValues as Mm, ENSInfo as Mn, createRelationalDb as Mo, NonEmptyStateDefinition as Mp, MutationSetInitialStateArgs as Mr, RouteMethod as Ms, CopyChildDocumentInput as Mt, documentModelHeaderReducer as Mu, garbageCollectDocumentOperations as Mv, SIGNATURE_PROTOCOL_V2 as My, PHConnectReactorFeatureFlags as N, redo as N_, SetOperationSchemaAction as Na, AddModuleInputSchema as Nc, UpgradeTransition as Nd, DefinitionExample as Nf, isAuthAction as Ng, peerSupports as Nh, ReorderOperationErrorsInput as Ni, SetOperationErrorCodeInputSchema as Nl, ReplayHash as Nm, EditorDispatch as Nn, hashNamespace as No, ObjectTypeDefinition as Np, MutationSetModelDescriptionArgs as Nr, RouteOptions as Ns, CopyChildDocumentSignal as Nt, documentModelModuleReducer as Nu, garbageCollectV2 as Nv, SignaturePolicy$1 as Ny, PHConnectPwaIcon as O, noop as O_, SetOperationErrorTemplateInput as Oa, synthesizedActionId as Oc, VersionedReducers as Od, DefinitionCheckSkipReason as Of, assertAuthPreservedOnDuplicate as Og, legacySupports as Oh, ReorderModuleOperationsAction as Oi, SetModuleDescriptionInputSchema as Ol, ProtocolRefusal as Om, DocumentModelVersioningAction as On, getCodegenStatusRegistry as Oo, LocationFreeGraphQLDocumentNode as Op, MutationReorderOperationExamplesArgs as Or, RouteAuthorizer as Os, Author as Ot, undoCapabilitiesOf as Ou, checkOperationsIntegrity as Ov, DEFAULT_SIGNATURE_POLICY as Oy, PHConnectRemoteBackend as P, releaseNewVersion as P_, SetOperationSchemaInput as Pa, AddOperationErrorInputSchema as Pc, applyDeleteDocumentAction as Pd, DefinitionKind as Pf, isDocumentCreator as Pg, readPeerManifest as Ph, ReorderOperationExamplesAction as Pi, SetOperationErrorDescriptionInputSchema as Pl, ReplayHashValues as Pm, EditorModule as Pn, namespaceSchemaOf as Po, PackageScalarReferenceDefinition as Pp, MutationSetModelExtensionArgs as Pr, RouteSpec as Ps, CreateChildDocumentInput as Pt, documentModelOperationErrorReducer as Pu, getDocumentLastModified as Pv, deriveDocumentId as Py, PHSchemedImage as Q, setOperationDescription as Q_, SignalResults as Qa, ManifestSchema as Qc, SubmittedUndoRefusedError as Qd, GraphQLConstValueNode as Qf, canonicalJson as Qg, grantProblem as Qh, SetAuthorNameAction as Qi, UndoActionSchema as Ql, conflictWindowMovesEveryRow as Qm, LoadFromInput as Qn, ProcessorDeletePropagation as Qo, UnionTypeDefinition as Qp, MutationUpdateOperationExampleArgs as Qr, assertModuleIdUnique as Qs, DeleteOperationExampleInput as Qt, purgedProtocolVersions as Qu, reshuffleByTimestampAndIndex as Qv, setNameOperation as Qy, PHConnectRuntimeConfig as R, reorderOperationErrors as R_, SetOperationTemplateInput as Ra, AuthorSchema as Rc, withProtocolVersions as Rd, DefinitionSource as Rf, resolveSnapshotAuth as Rg, GrantSchema as Rh, ReplayDocumentOptions as Ri, SetOperationReducerInputSchema as Rl, SynthesizedIdFormValues as Rm, GetDocumentOptions as Rn, HashAlgorithms as Ro, ScalarName as Rp, MutationSetModuleNameArgs as Rr, WebhookEndpointInfo as Rs, CreateDocumentActionInput as Rt, documentModelStateReducer as Ru, isUndo as Rv, requestedSignaturePolicy as Ry, PHConnectLoader as S, deleteOperation as S_, SetOperationErrorCodeInput as Sa, UNDO_GROUP_MARK as Sc, getFileBrowser as Sd, CatalogScalarName as Sf, SetGrantActionInputSchema as Sg, ProtocolSelectionRule as Sh, RejectedAction as Si, SetAuthorWebsiteInputSchema as Sl, CAPABILITY_DECISIONS as Sm, DocumentModelOperationExampleOperations as Sn, ValidationError as So, InputTypeDefinition as Sp, MutationMoveOperationArgs as Sr, IHttpScope as Ss, AddRelationshipAction as St, undoRedoTargetsOf as Su, appendRows as Sv, defaultAuthState as Sy, PHConnectPwa as T, deleteStateExample as T_, SetOperationErrorNameAction as Ta, groupedActionId as Tc, readFileBrowser as Td, DefinitionCheckProfile as Tf, applyMoveGrantAction as Tg, coversLocal as Th, RemoveRelationshipActionInput as Ti, SetModelExtensionInputSchema as Tl, FLAGS_FOR_EVERY_VERSION as Tm, DocumentModelStateAction as Tn, CodegenStatusRegistry as To, JsonPrimitive as Tp, MutationReorderModuleOperationsArgs as Tr, NodeRouteSpec as Ts, AddStateExampleInput as Tt, UndoRedoAvailability as Tu, attachBranch as Tv, defaultGlobalState as Ty, PHImageRef as U, setAuthorWebsite as U_, SetSlugActionInput as Ua, DeleteModuleInputSchema as Uc, DowngradeNotSupportedError as Ud, DocumentModelOperationDefinition as Uf, toTransportAction as Ug, MAX_CONDITION_DEPTH as Uh, SaveToFileHandle as Ui, SetPreferredEditorActionSchema as Ul, acceptsSubmittedRetract as Um, IOperation as Un, IRelationalQueryMethods as Uo, Sha256Digest as Up, MutationSetOperationErrorNameArgs as Ur, WebhookRequest as Us, DeleteChildDocumentSignal as Ut, processUndoRedo as Uu, operationsAreEqual as Uv, nextSkipNumber as Uy, PHConnectSentry as V, retract as V_, SetPreferredEditorOperation as Va, ConfigEntryTypeSchema as Vc, AuthInitializerNotCreatorError as Vd, DocumentModelDefinition as Vf, TransportActionContext as Vg, MAX_AUTH_GRANTS as Vh, RevisionsFilter as Vi, SetOperationTemplateInputSchema as Vl, UndoModel as Vm, ID as Vn, IRelationalDbProcessor as Vo, ScalarValidationProfile as Vp, MutationSetOperationErrorCodeArgs as Vr, WebhookPolicy as Vs, DeleteChangeLogItemInput as Vt, baseReducer as Vu, mapSkippedOperationsV2 as Vv, garbageCollect as Vy, PHKeyframeRule as W, setInitialState as W_, SetStateSchemaAction as Wa, DeleteOperationErrorInputSchema as Wc, FileSystemError as Wd, DocumentModelSpecificationDefinition as Wf, ACTION_SIGNATURE_V2_PREFIX as Wg, MAX_CONDITION_NODES as Wh, Scalars as Wi, SetSlugActionInputSchema as Wl, acceptsSubmittedUndoRedo as Wm, ISignal as Wn, RelationalDbProcessor as Wo, StateDefinition as Wp, MutationSetOperationErrorTemplateArgs as Wr, WebhookScheme as Ws, DeleteDocumentAction as Wt, replayOperations as Wu, parseResultingState as Wv, sortOperations as Wy, PHRenownRainbowAdapterConfig as X, setModuleName as X_, SignalDispatch as Xa, DocumentModelInputSchema as Xc, MissingStateReducerError as Xd, GraphQLArgumentNode as Xf, actionSignerIdentity as Xg, evaluateGrantStack as Xh, SchemaUndoAction as Xi, StateSchema as Xl, capabilitiesFor as Xm, IsStateOfType as Xn, ProcessorApp as Xo, SubgraphScalarReferenceDefinition as Xp, MutationUndoArgs as Xr, RESERVED_OPERATION_NAMES as Xs, DeleteOperationErrorInput as Xt, purgeDocumentAction as Xu, requireStateReducer as Xv, operationOutcome as Xy, PHRenownPrivyAdapterConfig as Y, setModuleDescription as Y_, Signal as Ya, DocumentModelGlobalStateSchema as Yc, InvalidAuthVersionError as Yd, FieldDefinition as Yf, actionPreimageV2 as Yg, evaluateCondition as Yh, SchemaSetSlugAction as Yi, Set_SlugSchema as Yl, baseReducerVersionsFor as Ym, IsDocumentOfType as Yn, IProcessorManager as Yo, SubgraphEntryDefinition as Yp, MutationSetStateSchemaArgs as Yr, OPERATION_NAME_PATTERN as Ys, DeleteOperationErrorAction as Yt, isPurgeMarker as Yu, replayDocument as Yv, OperationWithContext$1 as Yy, PHSchemedColor as Z, setName as Z_, SignalResult as Za, DocumentSpecificationSchema as Zc, NoUndoRedoTargetError as Zd, GraphQLBuiltInScalarName as Zf, actionSigningTarget as Zg, evaluateGrants as Zh, ScopeState as Zi, UndoActionInputSchema as Zl, capabilitiesOf as Zm, LoadFromFile as Zn, ProcessorApps as Zo, TypeReferenceDefinition as Zp, MutationUpdateChangeLogItemInputArgs as Zr, ReservedOperationName as Zs, DeleteOperationExampleAction as Zt, purgeMarkerOperation as Zu, reshuffleByTimestamp as Zv, redoOperation as Zy, PHConnectDriveSections as _, buildOperationSignature as __, SetNameActionInput as _a, generateId as _c, createMinimalZip as _d, createDocumentAction as _f, RemoveGrantAction as _g, PEER_MANIFEST_FORMAT as _h, Redo as _i, ReorderOperationExamplesInputSchema as _l, documentModelInitialGlobalState as _m, DocumentModelModuleOperations as _n, UpdateStateExampleAction as _o, GraphQLTypeNode as _p, MutationDeleteModuleArgs as _r, ProcessorTimingPath as _s, AddOperationErrorAction as _t, reduceOne as _u, IntegrityIssueType as _v, createBaseState as _y, PHBackground as a, ActionContext as a_, SetModelDescriptionInput as aa, HashConfig as ab, findOperationOrThrow as ac, createPresignedHeader as ad, DocumentModelHeaderSchema as af, AuthRefusal as ag, optionalBaseReducerCapabilities as ah, PartialRecord as ai, PieceModulesSchema as al, getUnixTimestamp as am, DocumentDispatch$1 as an, StateReducer as ao, GraphQLInputValueDefinitionNode as ap, MinimalBackupData as ar, ProcessorPhase as as, ServiceActions as at, OnThrow as au, setOperationSchema as av, AuthGroups as ay, PHConnectHome as b, deleteChangeLogItem as b_, SetOperationDescriptionInput as ba, IdOrder as bc, documentModelSaveToFileHandle as bd, documentFromCreation as bf, SetGrantAction as bg, PeerManifest as bh, Reducer as bi, ScopeStateSchema as bl, BaseReducerCapabilities as bm, DocumentModelOperationErrorOperations as bn, UpgradeDocumentActionInput as bo, GraphQLUnionTypeDefinitionNode as bp, MutationDeleteOperationExampleArgs as br, TrackedProcessor as bs, AddOperationExampleInput as bt, retractionTarget as bu, PHDocumentMeta as bv, createLocalState as by, PHConnectAi as c, actionSigner as c_, SetModelIdAction as ca, UserActionSigner as cb, isValidOperationNameFormat as cc, createVerificationSigner as cd, assertIsDocumentModelDocument as cf, AuthVerb as cg, sortsJobsCanonically as ch, PhAiToolAnnotations as ci, PublisherSchema as cl, CreateBaseReducerLogger as cm, DocumentModelDocumentModelModule as cn, UndoAction as co, GraphQLNameNode as cp, MoveOperationInput as cr, ProcessorRerunOptions as cs, ActionSignatureContext as ct, TailBase as cu, setPreferredEditor as cv, Grant as cy, PHConnectCollection as d, addModule as d_, SetModelNameInput as da, DEFAULT_ANALYTICS_PROCESSOR_DB_NAME as db, validateModuleOperation as dc, validateHeader as dd, isDocumentModelState as df, InitializeAuthActionInput as dg, DOCUMENT_PURGE_PROTOCOL as dh, PieceModule as di, RedoActionSchema as dl, HASH_ALGORITHM_SHA256 as dm, DocumentModelHeaderOperations as dn, UpdateChangeLogItemAction as do, GraphQLObjectFieldNode as dp, MutationAddModuleArgs as dr, ProcessorTimingBatch as ds, Actions as dt, advanceUndoTargets as du, undo as dv, PHBaseState as dy, isV2ActionHash as e_, SetAuthorWebsiteAction as ea, setSlugOperation as eb, assertOperationExampleIdUnique as ec, NewDocumentHeaderOptions as ed, documentModelDocumentType as ef, referencedGroupIds as eg, derivesByRule as eh, NOOPAction as ei, MoveOperationInputSchema as el, base58Decode as em, DeleteStateExampleAction as en, SignatureVerificationHandler as eo, GraphQLDirectiveNode as ep, MakeMaybe as er, ProcessorDispatchResult as es, ParsedCmdResult as et, UpdateChangeLogItemInputSchema as eu, setOperationErrorDescription as ev, sortMappedOperations as ey, PHConnectCompositionEntry as f, addOperation as f_, SetModuleDescriptionAction as fa, DEFAULT_RELATIONAL_PROCESSOR_DB_NAME as fb, validateModules as fc, verify as fd, AUTH_DENIED_BY_GRANT_REASON as ff, InitializeAuthActionInputSchema as fg, FLAGLESS_BASE_REDUCER_VERSION as fh, PowerhouseModule as fi, RedoSchema as fl, HASH_ALGORITHM_SHA512 as fm, DocumentModelInput as fn, UpdateChangeLogItemInput as fo, GraphQLObjectTypeDefinitionNode as fp, MutationAddOperationArgs as fr, ProcessorTimingCounters as fs, AddChangeLogItemAction as ft, appliedOperations as fu, updateChangeLogItem as fv, PHDocumentState as fy, PHConnectDriveSection as g, baseActions as g_, SetNameAction as ga, deriveOperationId as gc, baseSaveToFileHandle as gd, isDenied as gf, MoveGrantActionInputSchema as gg, PEER_CAPABILITIES as gh, Query as gi, ReorderOperationErrorsInputSchema as gl, documentModelGlobalState as gm, DocumentModelModuleAction as gn, UpdateRelationshipActionInput as go, GraphQLStringValueNode as gp, MutationDeleteChangeLogItemInputArgs as gr, ProcessorTimingLevel as gs, AddOperationAction as gt, redoTarget as gu, IntegrityIssueSubType as gv, createAuthState as gy, PHConnectDefaultDriveRemote as h, addStateExample as h_, SetModuleNameInput as ha, validateStateSchemaName as hc, baseLoadFromInputVersioned as hd, DOCUMENT_DELETED_REASON as hf, MoveGrantActionInput as hg, MARKER_REFUSAL_FEATURE as hh, PurgeDocumentActionInput as hi, ReorderModulesInputSchema as hl, documentModelFileExtension as hm, DocumentModelModule as hn, UpdateRelationshipAction as ho, GraphQLSchemaDefinitionNode as hp, MutationAddStateExampleArgs as hr, ProcessorTimingLastRun as hs, AddModuleInput as ht, positionalOperations as hu, verifyOperationSignature as hv, backfillAuthState as hy, LogLevels as i, Action as i_, SetModelDescriptionAction as ia, AppActionSigner as ib, findOperationExampleOrThrow as ic, createCopyHeader as id, BaseDocumentStateSchema as if, AuthEvaluation as ig, needsTaggedModel as ih, OperationsByScope as ii, PieceModuleSchema as il, bytesToBase64Url as im, DocumentAction as in, State as io, GraphQLInputObjectTypeDefinitionNode as ip, Maybe as ir, ProcessorHostInfo as is, ServiceAction as it, isDefinedNonNullAny as iu, setOperationReducer as iv, withSignaturePolicy as iy, PHConnectPwaUrlPattern as j, operationFromOperation as j_, SetOperationReducerAction as ja, undoRedoBatch as jc, UpgradeManifest as jd, DefinitionDiagnosticPhase as jf, evaluate as jg, manifestRevision as jh, ReorderModulesInput as ji, SetNameActionSchema as jl, ReducerContract as jm, DocumentSpecification as jn, createNamespacedQueryBuilder as jo, NamedTypeReferenceDefinition as jp, MutationSetAuthorWebsiteArgs as jr, RouteHandler as js, ConfigEntryType as jt, undoRedoAvailabilityOf as ju, filterDuplicatedOperations as jv, SIGNATURE_PROTOCOL as jy, PHConnectPwaManifest as k, operationExampleCreators as k_, SetOperationNameAction as ka, undoGroupOfId as kc, VersionedReplayConfig as kd, DefinitionCompatibilitySelection as kf, assertAuthScopeActionAllowed as kg, localPeerManifest as kh, ReorderModuleOperationsInput as ki, SetModuleNameInputSchema as kl, ProtocolSupport as km, DocumentModelVersioningOperations as kn, isSettledCodegenState as ko, MaterializedStateDefinition as kp, MutationReorderStateExamplesArgs as kr, RouteBody as ks, CodeExample as kt, undoNeedsTargets as ku, diffOperations as kv, DocumentIdParams as ky, PHConnectApp as l, actions as l_, SetModelIdInput as la, deserializeSignature as lb, validateInitialState as lc, hasDerivedDocumentId as ld, assertIsDocumentModelState as lf, ConditionContext as lg, tieOrderOf as lh, PhAiToolContext as li, PwaConfigSchema as ll, fitCreateBaseReducer as lm, DocumentModelGlobalState as ln, UndoActionInput as lo, GraphQLNamedTypeNode as lp, Mutation as lr, ProcessorStatus as ls, ActionSigningHandler as lt, UndoTargetsBase as lu, setSlug as lv, Operand as ly, PHConnectDefaultDriveLocal as m, addOperationExample as m_, SetModuleNameAction as ma, validateOperations as mc, baseLoadFromInput as md, AUTH_VERSION_UNSUPPORTED_REASON as mf, MoveGrantAction as mg, HoldReason as mh, PurgeDocumentAction as mi, ReorderModuleOperationsInputSchema as ml, HASH_ENCODING_HEX as mm, DocumentModelLocalState as mn, UpdateOperationExampleInput as mo, GraphQLScalarTypeDefinitionNode as mp, MutationAddOperationExampleArgs as mr, ProcessorTimingHorizon as ms, AddModuleAction as mt, deriveScopeVersioned as mu, updateStateExample as mv, Principal as my, DrivePreserveStrategy as n, targetDocumentId as n_, SetInitialStateAction as na, undoOperationV2 as nb, findModuleOrThrow as nc, headNewDocument as nd, groupMembershipActionTypes as nf, AuthAction as ng, isBaseReducerVersion as nh, OperationIndex as ni, OperationScopeSchema as nl, buildOperationSignatureMessage as nm, DeriveScope as nn, SkipHeaderOperationIndex as no, GraphQLEnumValueDefinitionNode as np, Manifest as nr, ProcessorFactoryBuilder as ns, PowerhouseConfig as nt, UpdateStateExampleInputSchema as nu, setOperationErrorTemplate as nv, updateHeaderRevision as ny, PHBackgroundLayer as o, actionContext as o_, SetModelExtensionAction as oa, PHDocumentSignatureInfo as ob, getAllOperationNames as oc, createSignedHeader as od, DocumentModelPHStateSchema as of, AuthRequest as og, refusalFor as oh, PartialState as oi, PowerhouseModuleSchema as ol, hashBrowser as om, DocumentModelAction as on, SubgraphModule as oo, GraphQLInterfaceTypeDefinitionNode as op, ModuleSpecification as or, ProcessorQueueDepth as os, DEFAULT_REGISTRY_URL as ot, ReducerFor as ou, setOperationScope as ov, Capability as oy, PHConnectDefaultDrive as p, addOperationError as p_, SetModuleDescriptionInput as pa, PROCESSOR_APPS as pb, validateOperationName as pc, BulkArchiveEntry as pd, AUTH_NO_GRANT_REASON as pf, MAX_SUPPORTED_AUTH_VERSION as pg, FeatureCapability as ph, Publisher as pi, ReorderChangeLogItemsInputSchema as pl, HASH_ENCODING_BASE64 as pm, DocumentModelLib as pn, UpdateOperationExampleAction as po, GraphQLOperationTypeDefinitionNode as pp, MutationAddOperationErrorArgs as pr, ProcessorTimingDocumentType as ps, AddChangeLogItemInput as pt, deriveScope as pu, updateOperationExample as pv, PHGroupState as py, PHReactorClientMode as q, setModelId as q_, Set_PreferredEditor as qa, DeleteStateExampleInputSchema as qc, InvalidActionInputError as qd, EnumTypeDefinition as qf, CanonicalJsonError as qg, assertValidGrantUpsert as qh, SchemaSetNameAction as qi, Set_NameSchema as ql, baseReducerCapabilities as qm, Incremental as qn, IProcessorDispatch as qo, SubgraphDefinitionBase as qp, MutationSetOperationSchemaArgs as qr, WebhookVerification as qs, DeleteModuleInput as qt, PURGE_DOCUMENT as qu, readOnly as qv, OperationContext as qy, LogLevel as r, v2TupleProblem as r_, SetInitialStateInput as ra, ActionSigner as rb, findOperationErrorOrThrow as rc, selectDocumentModelModule as rd, BaseDocumentHeaderSchema as rf, AuthDecision as rg, modelRunsBaseReducer as rh, OperationSpecification as ri, OperationSpecificationSchema as rl, buildOperationSignatureParams as rm, DispatchOutcome as rn, SkipHeaderOperations as ro, GraphQLFieldDefinitionNode as rp, MappedOperation as rr, ProcessorFilter as rs, PowerhousePackage as rt, definedNonNullAnySchema as ru, setOperationName as rv, withScopeRevisions as ry, PHBackgroundLayers as s, actionFromAction as s_, SetModelExtensionInput as sa, Signature as sb, isReservedOperationName as sc, createSignedHeaderForSigner as sd, DocumentModelSchema as sf, AuthSubject as sg, skipMayUndo as sh, PhAiChatImage as si, PowerhouseModulesSchema as sl, hex2ab as sm, DocumentModelDocument as sn, Undo as so, GraphQLListTypeNode as sp, MoveOperationAction as sr, ProcessorRecord as ss, ActionErrorCallback as st, ScopeVersions as su, setOperationTemplate as sv, Condition as sy, DrivePreserveStrategies as t, signActionV2 as t_, SetAuthorWebsiteInput as ta, undoOperation as tb, assertOperationIdUnique as tc, createVersionsOf as td, groupDocumentType as tf, AUTH_ACTION_TYPES as tg, documentDerivesByRule as th, OperationErrorSpecification as ti, OperationErrorSchema as tl, base64UrlToBytes as tm, DeleteStateExampleInput as tn, SigningParameters as to, GraphQLEnumTypeDefinitionNode as tp, MakeOptional as tr, ProcessorFactory as ts, PathValidation as tt, UpdateOperationExampleInputSchema as tu, setOperationErrorName as tv, split as ty, PHConnectBranding as u, addChangeLogItem as u_, SetModelNameAction as ua, serializeSignature as ub, validateModule as uc, sign as ud, isDocumentModelDocument as uf, InitializeAuthAction as ug, usesRetractionRule as uh, PhAiToolDescriptor as ui, RedoActionInputSchema as ul, HASH_ALGORITHM_SHA1 as um, DocumentModelHeaderAction as un, UndoRedoAction as uo, GraphQLNonNullTypeNode as up, MutationAddChangeLogItemInputArgs as ur, ProcessorTiming as us, ActionVerificationHandler as ut, actionReferences as uu, setStateSchema as uv, PHAuthState as uy, PHConnectDrives as v, buildSignedAction as v_, SetNameOperation as va, generateMock as vc, createZip as vd, creationActions as vf, RemoveGrantActionInput as vg, PeerCapability as vh, RedoAction as vi, ReorderStateExamplesInputSchema as vl, documentModelInitialLocalState as vm, DocumentModelOperationAction as vn, UpdateStateExampleInput as vo, GraphQLTypeSystemDefinitionNode as vp, MutationDeleteOperationArgs as vr, ProcessorTimingRun as vs, AddOperationErrorInput as vt, retractedActionIds as vu, PHDocument$1 as vv, createDocumentState as vy, PHConnectPackages as w, deleteOperationExample as w_, SetOperationErrorDescriptionInput as wa, compareCanonical as wc, parseBulkArchive as wd, CompiledErrorDefinition as wf, applyInitializeAuthAction as wg, capSelection as wh, RemoveRelationshipAction as wi, SetModelDescriptionInputSchema as wl, DerivationModelValues as wm, DocumentModelPHState as wn, CodegenStatus as wo, InternalScalarName as wp, MutationReorderChangeLogItemsInputArgs as wr, IWebhookScope as ws, AddStateExampleAction as wt, undoTargetsBase as wu, assertReplayIndices as wv, defaultDocumentState as wy, PHConnectInstance as x, deleteModule as x_, SetOperationErrorCodeAction as xa, LEGACY_UNDO_GROUP_PREFIX as xc, fetchFileBrowser as xd, upgradeDocumentAction as xf, SetGrantActionInput as xg, ProtocolCapability as xh, ReducerOptions as xi, SetAuthorNameInputSchema as xl, BaseReducerVersion as xm, DocumentModelOperationExampleAction as xn, User as xo, InputFieldDefinition as xp, MutationDeleteStateExampleArgs as xr, AuthorizerResult as xs, AddOperationInput as xt, tailAppliesIncrementally as xu, addUndo as xv, createState as xy, PHConnectExplorerIcons as y, createAction as y_, SetOperationDescriptionAction as ya, CanonicalKey as yc, documentModelLoadFromInput as yd, creationState as yf, RemoveGrantActionInputSchema as yg, PeerCapabilityFlags as yh, RedoActionInput as yi, RetractActionInputSchema as yl, BASE_REDUCER_VERSIONS as ym, DocumentModelOperationErrorAction as yn, UpgradeDocumentAction as yo, GraphQLTypeSystemExtensionNode as yp, MutationDeleteOperationErrorArgs as yr, ReplayStateMode as ys, AddOperationExampleAction as yt, retractionRewrites as yu, PHDocumentHeader as yv, createGlobalState as yy, PHConnectRuntimeDefaultDrive as z, reorderOperationExamples as z_, SetPreferredEditorAction as za, CodeExampleSchema as zc, AuthActionNotAllowedError as zd, DefinitionSourcesConfig as zf, setGrant as zg, GroupPrincipalNotAllowedError as zh, RetractAction as zi, SetOperationSchemaInputSchema as zl, TieOrder as zm, HostedEditorProps as zn, IBaseRelationalDb as zo, ScalarRepresentation as zp, MutationSetNameArgs as zr, WebhookField as zs, CreateState as zt, documentModelStateSchemaReducer as zu, isUndoRedo as zv, signaturePolicyOf as zy };
|
|
5708
|
+
export { PackageManagerArgs as $, DEFAULT_SIGNATURE_POLICY as $_, SignalType as $a, ModuleSchema as $c, UndoOperationRefusedError as $d, ProtocolSupport as $f, checkOperationsIntegrity as $g, noop as $h, SetAuthorNameInput as $i, UndoSchema as $l, assertAuthPreservedOnDuplicate as $m, MakeEmpty as $n, ProcessorDispatchCreateResult as $o, legacySupports as $p, MutationUpdateStateExampleArgs as $r, assertOperationErrorIdUnique as $s, DeleteOperationInput as $t, CreateProtocolVersionsOptions as $u, DefinitionRef as $v, ResolverCoordinateDefinition as $y, PHConnectPwaRuntimeCaching as A, AuthGroups as A_, SetOperationNameInput as Aa, UndoRedoBatch as Ac, replayDocumentVersioned as Ad, hashBrowser as Af, setOperationSchema as Ag, ActionContext as Ah, ReorderModulesAction as Ai, SetNameActionInputSchema as Al, AuthRefusal as Am, DocumentOperationsIgnoreMap as An, createNamespacedDb as Ao, refusalFor as Ap, MutationSetAuthorNameArgs as Ar, RouteContext as As, ConfigEntry as At, undoRedoActions as Au, HashConfig as Av, GraphQLOperationTypeDefinitionNode as Ay, PHConnectRuntimeDefaultDriveRemote as B, backfillAuthState as B_, SetPreferredEditorActionInput as Ba, ConfigEntrySchema as Bc, AuthAlreadyInitializedError as Bd, documentModelGlobalState as Bf, verifyOperationSignature as Bg, addStateExample as Bh, RetractActionInput as Bi, SetOperationScopeInputSchema as Bl, MoveGrantActionInput as Bm, IAction as Bn, IRelationalDb as Bo, MARKER_REFUSAL_FEATURE as Bp, MutationSetOperationDescriptionArgs as Br, WebhookHashAlgorithm as Bs, DeleteChangeLogItemAction as Bt, documentModelVersioningReducer as Bu, CatalogScalarReferenceDefinition as Bv, InterfaceTypeDefinition as By, PHConnectOpenPanel as C, reshuffleByTimestampAndIndex as C_, SetOperationErrorDescriptionAction as Ca, compareActionIds as Cc, isDocumentZip as Cd, ab2hex as Cf, setOperationDescription as Cg, canonicalJson as Ch, ReleaseNewVersionAction as Ci, SetInitialStateInputSchema as Cl, grantProblem as Cm, DocumentModelOperationOperations as Cn, CodegenState as Co, createdCapabilities as Cp, MutationRedoArgs as Cr, IWebhookEndpoints as Cs, AddRelationshipActionInput as Ct, undoTarget as Cu, setNameOperation as Cv, GraphQLInterfaceTypeDefinitionNode as Cy, PHConnectPwaFileHandler as D, updateHeaderRevision as D_, SetOperationErrorTemplateAction as Da, legacyIdOrder as Dc, zipEntries as Dd, buildOperationSignatureParams as Df, setOperationErrorTemplate as Dg, targetDocumentId as Dh, ReorderChangeLogItemsInput as Di, SetModelNameInputSchema as Dl, AuthAction as Dm, DocumentModelUtils as Dn, SETTLED_CODEGEN_STATES as Do, modelRunsBaseReducer as Dp, MutationReorderOperationErrorsArgs as Dr, RouteAuth as Ds, AssertIsStateOfType as Dt, serializeByKey as Du, undoOperationV2 as Dv, GraphQLNonNullTypeNode as Dy, PHConnectPwaCacheStrategy as E, split as E_, SetOperationErrorNameInput as Ea, idOrderFor as Ec, writeFileBrowser as Ed, buildOperationSignatureMessage as Ef, setOperationErrorName as Eg, signActionV2 as Eh, ReorderChangeLogItemsAction as Ei, SetModelIdInputSchema as El, AUTH_ACTION_TYPES as Em, DocumentModelStateOperations as En, PackageLoadFailure as Eo, isBaseReducerVersion as Ep, MutationReorderModulesArgs as Er, RouteActor as Es, AssertIsDocumentOfType as Et, UndoRedoTargets as Eu, undoOperation as Ev, GraphQLNamedTypeNode as Ey, PHConnectRenown as F, PHAuthState as F_, SetOperationScopeAction as Fa, AddOperationExampleInputSchema as Fc, applyUpgradeDocumentAction as Fd, HASH_ALGORITHM_SHA256 as Ff, setStateSchema as Fg, addChangeLogItem as Fh, ReorderOperationExamplesInput as Fi, SetOperationErrorNameInputSchema as Fl, InitializeAuthAction as Fm, EditorProps as Fn, relationalDbToQueryBuilder as Fo, usesRetractionRule as Fp, MutationSetModelIdArgs as Fr, RouteTransport as Fs, CreateChildDocumentSignal as Ft, documentModelOperationExampleReducer as Fu, serializeSignature as Fv, GraphQLTypeSystemDefinitionNode as Fy, PHLength as G, createLocalState as G_, SetStateSchemaInput as Ga, DeleteOperationExampleInputSchema as Gc, GrantNotFoundError as Gd, BaseReducerVersion as Gf, PHDocumentMeta as Gg, deleteChangeLogItem as Gh, SchemaNOOPAction as Gi, SetSlugActionSchema as Gl, SetGrantAction as Gm, ISignalResult as Gn, RelationalDbProcessorClass as Go, PeerManifest as Gp, MutationSetOperationNameArgs as Gr, WebhookSignatureEncoding as Gs, DeleteDocumentActionInput as Gt, updateDocument as Gu, DefinitionCheckSkipReason as Gv, LocationFreeGraphQLDocumentNode as Gy, PHEdges as H, createBaseState as H_, SetSlugAction as Ha, DeleteChangeLogItemInputSchema as Hc, AuthPolicyNotPreservedError as Hd, documentModelInitialLocalState as Hf, IntegrityIssueType as Hg, buildOperationSignature as Hh, SaveToFile as Hi, SetPreferredEditorActionInputSchema as Hl, RemoveGrantAction as Hm, IDocument as Hn, IRelationalQueryBuilder as Ho, PEER_MANIFEST_FORMAT as Hp, MutationSetOperationErrorDescriptionArgs as Hr, WebhookReply as Hs, DeleteChildDocumentInput as Ht, createReducer as Hu, DefinitionCheckProfile as Hv, JsonPrimitive as Hy, PHConnectRenownAdapters as I, PHBaseState as I_, SetOperationScopeInput as Ia, AddOperationInputSchema as Ic, computeUpgradeTransitions as Id, HASH_ALGORITHM_SHA512 as If, undo as Ig, addModule as Ih, ReorderStateExamplesAction as Ii, SetOperationErrorTemplateInputSchema as Il, InitializeAuthActionInput as Im, Exact as In, DOCUMENT_ID_COLUMNS as Io, DOCUMENT_PURGE_PROTOCOL as Ip, MutationSetModelNameArgs as Ir, RouteUser as Is, CreateDocument as It, documentModelOperationReducer as Iu, DEFAULT_ANALYTICS_PROCESSOR_DB_NAME as Iv, GraphQLTypeSystemExtensionNode as Iy, PHReactorRenown as J, defaultBaseState as J_, Set_Slug as Ja, DocumentActionSchema as Jc, InvalidActionInputZodError as Jd, DerivationModelValues as Jf, appendWithoutApplying as Jg, deleteOperationError as Jh, SchemaSetPreferredEditorAction as Ji, Set_PreferredEditorSchema as Jl, applyAuthAction as Jm, InputMaybe as Jn, IProcessorHostModuleBase as Jo, Supports as Jp, MutationSetOperationTemplateArgs as Jr, deletedDocumentId as Js, DeleteOperationAction as Jt, PurgeMarkerOperation as Ju, DefinitionDiagnosticPhase as Jv, NamedTypeReferenceDefinition as Jy, PHPackageProvider as K, createState as K_, Set_Name as Ka, DeleteOperationInputSchema as Kc, HashMismatchError as Kd, CAPABILITY_DECISIONS as Kf, addUndo as Kg, deleteModule as Kh, SchemaRedoAction as Ki, SetStateSchemaInputSchema as Kl, SetGrantActionInput as Km, ISigner as Kn, IProcessor as Ko, ProtocolCapability as Kp, MutationSetOperationReducerArgs as Kr, WebhookSpec as Ks, DeleteModuleAction as Kt, stateReducerOf as Ku, DefinitionCompatibilitySelection as Kv, MaterializedStateDefinition as Ky, PHConnectRouterSettings as L, PHDocumentState as L_, SetOperationTemplateAction as La, AddStateExampleInputSchema as Lc, latestVersionOf as Ld, HASH_ENCODING_BASE64 as Lf, updateChangeLogItem as Lg, addOperation as Lh, ReorderStateExamplesInput as Li, SetOperationNameInputSchema as Ll, InitializeAuthActionInputSchema as Lm, FileInput as Ln, ExtractProcessorSchemaOrSelf as Lo, FLAGLESS_BASE_REDUCER_VERSION as Lp, MutationSetModuleDescriptionArgs as Lr, ScopedRouteHandle as Ls, CreateDocumentAction as Lt, documentModelReducer as Lu, DEFAULT_RELATIONAL_PROCESSOR_DB_NAME as Lv, GraphQLUnionTypeDefinitionNode as Ly, PHConnectReactor as M, Condition as M_, SetOperationReducerInput as Ma, AddChangeLogItemInputSchema as Mc, UpgradeReducer as Md, CreateBaseReducerLogger as Mf, setOperationTemplate as Mg, actionFromAction as Mh, ReorderOperationErrorsAction as Mi, SetOperationDescriptionInputSchema as Ml, AuthSubject as Mm, ENSInfo as Mn, createRelationalDb as Mo, skipMayUndo as Mp, MutationSetInitialStateArgs as Mr, RouteMethod as Ms, CopyChildDocumentInput as Mt, documentModelHeaderReducer as Mu, Signature as Mv, GraphQLSchemaDefinitionNode as My, PHConnectReactorFeatureFlags as N, Grant as N_, SetOperationSchemaAction as Na, AddModuleInputSchema as Nc, UpgradeTransition as Nd, fitCreateBaseReducer as Nf, setPreferredEditor as Ng, actionSigner as Nh, ReorderOperationErrorsInput as Ni, SetOperationErrorCodeInputSchema as Nl, AuthVerb as Nm, EditorDispatch as Nn, hashNamespace as No, sortsJobsCanonically as Np, MutationSetModelDescriptionArgs as Nr, RouteOptions as Ns, CopyChildDocumentSignal as Nt, documentModelModuleReducer as Nu, UserActionSigner as Nv, GraphQLStringValueNode as Ny, PHConnectPwaIcon as O, withScopeRevisions as O_, SetOperationErrorTemplateInput as Oa, synthesizedActionId as Oc, VersionedReducers as Od, bytesToBase64Url as Of, setOperationName as Og, v2TupleProblem as Oh, ReorderModuleOperationsAction as Oi, SetModuleDescriptionInputSchema as Ol, AuthDecision as Om, DocumentModelVersioningAction as On, getCodegenStatusRegistry as Oo, needsTaggedModel as Op, MutationReorderOperationExamplesArgs as Or, RouteAuthorizer as Os, Author as Ot, undoCapabilitiesOf as Ou, ActionSigner as Ov, GraphQLObjectFieldNode as Oy, PHConnectRemoteBackend as P, Operand as P_, SetOperationSchemaInput as Pa, AddOperationErrorInputSchema as Pc, applyDeleteDocumentAction as Pd, HASH_ALGORITHM_SHA1 as Pf, setSlug as Pg, actions as Ph, ReorderOperationExamplesAction as Pi, SetOperationErrorDescriptionInputSchema as Pl, ConditionContext as Pm, EditorModule as Pn, namespaceSchemaOf as Po, tieOrderOf as Pp, MutationSetModelExtensionArgs as Pr, RouteSpec as Ps, CreateChildDocumentInput as Pt, documentModelOperationErrorReducer as Pu, deserializeSignature as Pv, GraphQLTypeNode as Py, PHSchemedImage as Q, defaultPHState as Q_, SignalResults as Qa, ManifestSchema as Qc, SubmittedUndoRefusedError as Qd, ProtocolRefusal as Qf, checkCleanedOperationsIntegrity as Qg, moveOperation as Qh, SetAuthorNameAction as Qi, UndoActionSchema as Ql, applySetGrantAction as Qm, LoadFromInput as Qn, ProcessorDeletePropagation as Qo, isOlderManifest as Qp, MutationUpdateOperationExampleArgs as Qr, assertModuleIdUnique as Qs, DeleteOperationExampleInput as Qt, purgedProtocolVersions as Qu, DefinitionPath as Qv, PowerhouseScalarName as Qy, PHConnectRuntimeConfig as R, PHGroupState as R_, SetOperationTemplateInput as Ra, AuthorSchema as Rc, withProtocolVersions as Rd, HASH_ENCODING_HEX as Rf, updateOperationExample as Rg, addOperationError as Rh, ReplayDocumentOptions as Ri, SetOperationReducerInputSchema as Rl, MAX_SUPPORTED_AUTH_VERSION as Rm, GetDocumentOptions as Rn, HashAlgorithms as Ro, FeatureCapability as Rp, MutationSetModuleNameArgs as Rr, WebhookEndpointInfo as Rs, CreateDocumentActionInput as Rt, documentModelStateReducer as Ru, PROCESSOR_APPS as Rv, InputFieldDefinition as Ry, PHConnectLoader as S, reshuffleByTimestamp as S_, SetOperationErrorCodeInput as Sa, UNDO_GROUP_MARK as Sc, getFileBrowser as Sd, upgradeDocumentAction as Sf, setName as Sg, actionSigningTarget as Sh, RejectedAction as Si, SetAuthorWebsiteInputSchema as Sl, evaluateGrants as Sm, DocumentModelOperationExampleOperations as Sn, ValidationError as So, conflictWindowMovesEveryRow as Sp, MutationMoveOperationArgs as Sr, IHttpScope as Ss, AddRelationshipAction as St, undoRedoTargetsOf as Su, redoOperation as Sv, GraphQLInputValueDefinitionNode as Sy, PHConnectPwa as T, sortMappedOperations as T_, SetOperationErrorNameAction as Ta, groupedActionId as Tc, readFileBrowser as Td, base64UrlToBytes as Tf, setOperationErrorDescription as Tg, isV2ActionHash as Th, RemoveRelationshipActionInput as Ti, SetModelExtensionInputSchema as Tl, referencedGroupIds as Tm, DocumentModelStateAction as Tn, CodegenStatusRegistry as To, documentDerivesByRule as Tp, MutationReorderModuleOperationsArgs as Tr, NodeRouteSpec as Ts, AddStateExampleInput as Tt, UndoRedoAvailability as Tu, setSlugOperation as Tv, GraphQLNameNode as Ty, PHImageRef as U, createDocumentState as U_, SetSlugActionInput as Ua, DeleteModuleInputSchema as Uc, DowngradeNotSupportedError as Ud, BASE_REDUCER_VERSIONS as Uf, PHDocument$1 as Ug, buildSignedAction as Uh, SaveToFileHandle as Ui, SetPreferredEditorActionSchema as Ul, RemoveGrantActionInput as Um, IOperation as Un, IRelationalQueryMethods as Uo, PeerCapability as Up, MutationSetOperationErrorNameArgs as Ur, WebhookRequest as Us, DeleteChildDocumentSignal as Ut, processUndoRedo as Uu, DefinitionCheckReport as Uv, JsonValue as Uy, PHConnectSentry as V, createAuthState as V_, SetPreferredEditorOperation as Va, ConfigEntryTypeSchema as Vc, AuthInitializerNotCreatorError as Vd, documentModelInitialGlobalState as Vf, IntegrityIssueSubType as Vg, baseActions as Vh, RevisionsFilter as Vi, SetOperationTemplateInputSchema as Vl, MoveGrantActionInputSchema as Vm, ID as Vn, IRelationalDbProcessor as Vo, PEER_CAPABILITIES as Vp, MutationSetOperationErrorCodeArgs as Vr, WebhookPolicy as Vs, DeleteChangeLogItemInput as Vt, baseReducer as Vu, CompiledErrorDefinition as Vv, InternalScalarName as Vy, PHKeyframeRule as W, createGlobalState as W_, SetStateSchemaAction as Wa, DeleteOperationErrorInputSchema as Wc, FileSystemError as Wd, BaseReducerCapabilities as Wf, PHDocumentHeader as Wg, createAction as Wh, Scalars as Wi, SetSlugActionInputSchema as Wl, RemoveGrantActionInputSchema as Wm, ISignal as Wn, RelationalDbProcessor as Wo, PeerCapabilityFlags as Wp, MutationSetOperationErrorTemplateArgs as Wr, WebhookScheme as Ws, DeleteDocumentAction as Wt, replayOperations as Wu, DefinitionCheckRequest as Wv, ListTypeReferenceDefinition as Wy, PHRenownRainbowAdapterConfig as X, defaultGlobalState as X_, SignalDispatch as Xa, DocumentModelInputSchema as Xc, MissingStateReducerError as Xd, GatingFlag as Xf, attachBranch as Xg, deleteStateExample as Xh, SchemaUndoAction as Xi, StateSchema as Xl, applyMoveGrantAction as Xm, IsStateOfType as Xn, ProcessorApp as Xo, coversLocal as Xp, MutationUndoArgs as Xr, RESERVED_OPERATION_NAMES as Xs, DeleteOperationErrorInput as Xt, purgeDocumentAction as Xu, DefinitionExample as Xv, ObjectTypeDefinition as Xy, PHRenownPrivyAdapterConfig as Y, defaultDocumentState as Y_, Signal as Ya, DocumentModelGlobalStateSchema as Yc, InvalidAuthVersionError as Yd, FLAGS_FOR_EVERY_VERSION as Yf, assertReplayIndices as Yg, deleteOperationExample as Yh, SchemaSetSlugAction as Yi, Set_SlugSchema as Yl, applyInitializeAuthAction as Ym, IsDocumentOfType as Yn, IProcessorManager as Yo, capSelection as Yp, MutationSetStateSchemaArgs as Yr, OPERATION_NAME_PATTERN as Ys, DeleteOperationErrorAction as Yt, isPurgeMarker as Yu, DefinitionDiagnosticSeverity as Yv, NonEmptyStateDefinition as Yy, PHSchemedColor as Z, defaultLocalState as Z_, SignalResult as Za, DocumentSpecificationSchema as Zc, NoUndoRedoTargetError as Zd, GatingFlagValues as Zf, baseCreateDocument as Zg, documentModelActions as Zh, ScopeState as Zi, UndoActionInputSchema as Zl, applyRemoveGrantAction as Zm, LoadFromFile as Zn, ProcessorApps as Zo, holdReason as Zp, MutationUpdateChangeLogItemInputArgs as Zr, ReservedOperationName as Zs, DeleteOperationExampleAction as Zt, purgeMarkerOperation as Zu, DefinitionKind as Zv, PackageScalarReferenceDefinition as Zy, PHConnectDriveSections as _, prepareOperations as __, SetNameActionInput as _a, generateId as _c, createMinimalZip as _d, isDenied as _f, setModelExtension as _g, ActionSigningTarget as _h, Redo as _i, ReorderOperationExamplesInputSchema as _l, assertValidGrant as _m, DocumentModelModuleOperations as _n, UpdateStateExampleAction as _o, baseReducerCapabilities as _p, MutationDeleteModuleArgs as _r, ProcessorTimingPath as _s, AddOperationErrorAction as _t, reduceOne as _u, Operation as _v, GraphQLDirectiveNode as _y, PHBackground as a, getDocumentLastModified as a_, SetModelDescriptionInput as aa, SchemaFirstGraphQLDocumentCompatibility as ab, findOperationOrThrow as ac, createPresignedHeader as ad, BaseDocumentStateSchema as af, releaseNewVersion as ag, isDocumentCreator as ah, PartialRecord as ai, PieceModulesSchema as al, readPeerManifest as am, DocumentDispatch$1 as an, StateReducer as ao, SkipMeaning as ap, MinimalBackupData as ar, ProcessorPhase as as, ServiceActions as at, OnThrow as au, deriveDocumentId as av, DocumentModelModuleDefinition as ay, PHConnectHome as b, replayDocument as b_, SetOperationDescriptionInput as ba, IdOrder as bc, documentModelSaveToFileHandle as bd, creationState as bf, setModuleDescription as bg, actionPreimageV2 as bh, Reducer as bi, ScopeStateSchema as bl, evaluateCondition as bm, DocumentModelOperationErrorOperations as bn, UpgradeDocumentActionInput as bo, capabilitiesFor as bp, MutationDeleteOperationExampleArgs as br, TrackedProcessor as bs, AddOperationExampleInput as bt, retractionTarget as bu, OperationWithContext$1 as bv, GraphQLFieldDefinitionNode as by, PHConnectAi as c, isNoopOperation as c_, SetModelIdAction as ca, StoredScalarDefinition as cb, isValidOperationNameFormat as cc, createVerificationSigner as cd, DocumentModelSchema as cf, reorderModules as cg, removeGrant as ch, PhAiToolAnnotations as ci, PublisherSchema as cl, AuthAdministrationMissingError as cm, DocumentModelDocumentModelModule as cn, UndoAction as co, SynthesizedIdFormValues as cp, MoveOperationInput as cr, ProcessorRerunOptions as cs, ActionSignatureContext as ct, TailBase as cu, protocolVersionsFor as cv, DocumentScalarReferenceDefinition as cy, PHConnectCollection as d, mapSkippedOperations as d_, SetModelNameInput as da, SubgraphEntryAccess as db, validateModuleOperation as dc, validateHeader as dd, isDocumentModelDocument as df, reorderStateExamples as dg, TransportAction as dh, PieceModule as di, RedoActionSchema as dl, InvalidGrantError as dm, DocumentModelHeaderOperations as dn, UpdateChangeLogItemAction as do, UndoModel as dp, MutationAddModuleArgs as dr, ProcessorTimingBatch as ds, Actions as dt, advanceUndoTargets as du, v2RequiredProtocolVersions as dv, EnumValueDefinition as dy, diffOperations as e_, SetAuthorWebsiteAction as ea, ScalarGraphQLProfile as eb, assertOperationExampleIdUnique as ec, NewDocumentHeaderOptions as ed, UnsupportedDocumentModelVersionError as ef, operationExampleCreators as eg, assertAuthScopeActionAllowed as eh, NOOPAction as ei, MoveOperationInputSchema as el, localPeerManifest as em, DeleteStateExampleAction as en, SignatureVerificationHandler as eo, RULE_EXEMPT_SCOPES as ep, MakeMaybe as er, ProcessorDispatchResult as es, ParsedCmdResult as et, UpdateChangeLogItemInputSchema as eu, DocumentIdParams as ev, DefinitionRelatedLocation as ey, PHConnectCompositionEntry as f, mapSkippedOperationsV2 as f_, SetModuleDescriptionAction as fa, SubgraphEntryDefinition as fb, validateModules as fc, verify as fd, isDocumentModelState as ff, retract as fg, TransportActionContext as fh, PowerhouseModule as fi, RedoSchema as fl, MAX_AUTH_GRANTS as fm, DocumentModelInput as fn, UpdateChangeLogItemInput as fo, UndoModelValues as fp, MutationAddOperationArgs as fr, ProcessorTimingCounters as fs, AddChangeLogItemAction as ft, appliedOperations as fu, garbageCollect as fv, FieldDefinition as fy, PHConnectDriveSection as g, precedes as g_, SetNameAction as ga, deriveOperationId as gc, baseSaveToFileHandle as gd, DOCUMENT_DELETED_REASON as gf, setModelDescription as gg, ActionSignerIdentity as gh, Query as gi, ReorderOperationErrorsInputSchema as gl, assertAuthAdministrationRetained as gm, DocumentModelModuleAction as gn, UpdateRelationshipActionInput as go, assertNever as gp, MutationDeleteChangeLogItemInputArgs as gr, ProcessorTimingLevel as gs, AddOperationAction as gt, redoTarget as gu, DocumentOperations as gv, GraphQLDirectiveDefinitionNode as gy, PHConnectDefaultDriveRemote as h, parseResultingState as h_, SetModuleNameInput as ha, UnionTypeDefinition as hb, validateStateSchemaName as hc, baseLoadFromInputVersioned as hd, AUTH_VERSION_UNSUPPORTED_REASON as hf, setInitialState as hg, ACTION_SIGNATURE_V2_PREFIX as hh, PurgeDocumentActionInput as hi, ReorderModulesInputSchema as hl, MAX_CONDITION_NODES as hm, DocumentModelModule as hn, UpdateRelationshipAction as ho, appliesRewind as hp, MutationAddStateExampleArgs as hr, ProcessorTimingLastRun as hs, AddModuleInput as ht, positionalOperations as hu, sortOperations as hv, GraphQLConstValueNode as hy, LogLevels as i, garbageCollectV2 as i_, SetModelDescriptionAction as ia, ScalarValidationProfile as ib, findOperationExampleOrThrow as ic, createCopyHeader as id, BaseDocumentHeaderSchema as if, redo as ig, isAuthAction as ih, OperationsByScope as ii, PieceModuleSchema as il, peerSupports as im, DocumentAction as in, State as io, ReplayHashValues as ip, Maybe as ir, ProcessorHostInfo as is, ServiceAction as it, isDefinedNonNullAny as iu, SignaturePolicy$1 as iv, DocumentModelDefinition as iy, PHConnectPwaUrlPattern as j, Capability as j_, SetOperationReducerAction as ja, undoRedoBatch as jc, UpgradeManifest as jd, hex2ab as jf, setOperationScope as jg, actionContext as jh, ReorderModulesInput as ji, SetNameActionSchema as jl, AuthRequest as jm, DocumentSpecification as jn, createNamespacedQueryBuilder as jo, resolveBaseReducerVersion as jp, MutationSetAuthorWebsiteArgs as jr, RouteHandler as js, ConfigEntryType as jt, undoRedoAvailabilityOf as ju, PHDocumentSignatureInfo as jv, GraphQLScalarTypeDefinitionNode as jy, PHConnectPwaManifest as k, withSignaturePolicy as k_, SetOperationNameAction as ka, undoGroupOfId as kc, VersionedReplayConfig as kd, getUnixTimestamp as kf, setOperationReducer as kg, Action as kh, ReorderModuleOperationsInput as ki, SetModuleNameInputSchema as kl, AuthEvaluation as km, DocumentModelVersioningOperations as kn, isSettledCodegenState as ko, optionalBaseReducerCapabilities as kp, MutationReorderStateExamplesArgs as kr, RouteBody as ks, CodeExample as kt, undoNeedsTargets as ku, AppActionSigner as kv, GraphQLObjectTypeDefinitionNode as ky, PHConnectApp as l, isUndo as l_, SetModelIdInput as la, SubgraphDefinition as lb, validateInitialState as lc, hasDerivedDocumentId as ld, assertIsDocumentModelDocument as lf, reorderOperationErrors as lg, resolveSnapshotAuth as lh, PhAiToolContext as li, PwaConfigSchema as ll, GrantSchema as lm, DocumentModelGlobalState as ln, UndoActionInput as lo, TieOrder as lp, Mutation as lr, ProcessorStatus as ls, ActionSigningHandler as lt, UndoTargetsBase as lu, requestedSignaturePolicy as lv, EmptyLocalStateDefinition as ly, PHConnectDefaultDriveLocal as m, operationsAreEqual as m_, SetModuleNameAction as ma, TypeReferenceDefinition as mb, validateOperations as mc, baseLoadFromInput as md, AUTH_NO_GRANT_REASON as mf, setAuthorWebsite as mg, toTransportAction as mh, PurgeDocumentAction as mi, ReorderModuleOperationsInputSchema as ml, MAX_CONDITION_DEPTH as mm, DocumentModelLocalState as mn, UpdateOperationExampleInput as mo, acceptsSubmittedUndoRedo as mp, MutationAddOperationExampleArgs as mr, ProcessorTimingHorizon as ms, AddModuleAction as mt, deriveScopeVersioned as mu, nextSkipNumber as mv, GraphQLBuiltInScalarName as my, DrivePreserveStrategy as n, filterDuplicatedOperations as n_, SetInitialStateAction as na, ScalarRepresentation as nb, findModuleOrThrow as nc, headNewDocument as nd, groupDocumentType as nf, operationFromOperation as ng, evaluate as nh, OperationIndex as ni, OperationScopeSchema as nl, manifestRevision as nm, DeriveScope as nn, SkipHeaderOperationIndex as no, ReducerContractValues as np, Manifest as nr, ProcessorFactoryBuilder as ns, PowerhouseConfig as nt, UpdateStateExampleInputSchema as nu, SIGNATURE_PROTOCOL as nv, DefinitionSourcesConfig as ny, PHBackgroundLayer as o, groupOperationsByScope as o_, SetModelExtensionAction as oa, Sha256Digest as ob, getAllOperationNames as oc, createSignedHeader as od, DocumentModelHeaderSchema as of, reorderChangeLogItems as og, mentionedGroupIds as oh, PartialState as oi, PowerhouseModuleSchema as ol, selectProtocolVersions as om, DocumentModelAction as on, SubgraphModule as oo, SkipMeaningValues as op, ModuleSpecification as or, ProcessorQueueDepth as os, DEFAULT_REGISTRY_URL as ot, ReducerFor as ou, isDerivedDocumentId as ov, DocumentModelOperationDefinition as oy, PHConnectDefaultDrive as p, merge as p_, SetModuleDescriptionInput as pa, SubgraphScalarReferenceDefinition as pb, validateOperationName as pc, BulkArchiveEntry as pd, AUTH_DENIED_BY_GRANT_REASON as pf, setAuthorName as pg, TransportSigner as ph, Publisher as pi, ReorderChangeLogItemsInputSchema as pl, MAX_CAPABILITY_OPERATIONS as pm, DocumentModelLib as pn, UpdateOperationExampleAction as po, acceptsSubmittedRetract as pp, MutationAddOperationErrorArgs as pr, ProcessorTimingDocumentType as ps, AddChangeLogItemInput as pt, deriveScope as pu, isDocumentAction as pv, GraphQLArgumentNode as py, PHReactorClientMode as q, defaultAuthState as q_, Set_PreferredEditor as qa, DeleteStateExampleInputSchema as qc, InvalidActionInputError as qd, DerivationModel as qf, appendRows as qg, deleteOperation as qh, SchemaSetNameAction as qi, Set_NameSchema as ql, SetGrantActionInputSchema as qm, Incremental as qn, IProcessorDispatch as qo, ProtocolSelectionRule as qp, MutationSetOperationSchemaArgs as qr, WebhookVerification as qs, DeleteModuleInput as qt, PURGE_DOCUMENT as qu, DefinitionDiagnostic as qv, NamedGraphQLTypeDefinition as qy, LogLevel as r, garbageCollectDocumentOperations as r_, SetInitialStateInput as ra, ScalarTypeReferenceDefinition as rb, findOperationErrorOrThrow as rc, selectDocumentModelModule as rd, groupMembershipActionTypes as rf, operationWithContext as rg, initializeAuth as rh, OperationSpecification as ri, OperationSpecificationSchema as rl, mergePeerCapabilities as rm, DispatchOutcome as rn, SkipHeaderOperations as ro, ReplayHash as rp, MappedOperation as rr, ProcessorFilter as rs, PowerhousePackage as rt, definedNonNullAnySchema as ru, SIGNATURE_PROTOCOL_V2 as rv, DirectiveUseDefinition as ry, PHBackgroundLayers as s, hashDocumentStateForScope as s_, SetModelExtensionInput as sa, StateDefinition as sb, isReservedOperationName as sc, createSignedHeaderForSigner as sd, DocumentModelPHStateSchema as sf, reorderModuleOperations as sg, moveGrant as sh, PhAiChatImage as si, PowerhouseModulesSchema as sl, AuthAdministrationLockoutError as sm, DocumentModelDocument as sn, Undo as so, SynthesizedIdForm as sp, MoveOperationAction as sr, ProcessorRecord as ss, ActionErrorCallback as st, ScopeVersions as su, isSignaturePolicy as sv, DocumentModelSpecificationDefinition as sy, DrivePreserveStrategies as t, filterDocumentOperationsResultingState as t_, SetAuthorWebsiteInput as ta, ScalarName as tb, assertOperationIdUnique as tc, createVersionsOf as td, documentModelDocumentType as tf, operationFromAction as tg, decide as th, OperationErrorSpecification as ti, OperationErrorSchema as tl, localSupports as tm, DeleteStateExampleInput as tn, SigningParameters as to, ReducerContract as tp, MakeOptional as tr, ProcessorFactory as ts, PathValidation as tt, UpdateOperationExampleInputSchema as tu, ProtocolVersions as tv, DefinitionSource as ty, PHConnectBranding as u, isUndoRedo as u_, SetModelNameAction as ua, SubgraphDefinitionBase as ub, validateModule as uc, sign as ud, assertIsDocumentModelState as uf, reorderOperationExamples as ug, setGrant as uh, PhAiToolDescriptor as ui, RedoActionInputSchema as ul, GroupPrincipalNotAllowedError as um, DocumentModelHeaderAction as un, UndoRedoAction as uo, TieOrderValues as up, MutationAddChangeLogItemInputArgs as ur, ProcessorTiming as us, ActionVerificationHandler as ut, actionReferences as uu, signaturePolicyOf as uv, EnumTypeDefinition as uy, PHConnectDrives as v, readOnly as v_, SetNameOperation as va, generateMock as vc, createZip as vd, createDocumentAction as vf, setModelId as vg, CanonicalJsonError as vh, RedoAction as vi, ReorderStateExamplesInputSchema as vl, assertValidGrantUpsert as vm, DocumentModelOperationAction as vn, UpdateStateExampleInput as vo, baseReducerVersion as vp, MutationDeleteOperationArgs as vr, ProcessorTimingRun as vs, AddOperationErrorInput as vt, retractedActionIds as vu, OperationContext as vv, GraphQLEnumTypeDefinitionNode as vy, PHConnectPackages as w, skipHeaderOperations as w_, SetOperationErrorDescriptionInput as wa, compareCanonical as wc, parseBulkArchive as wd, base58Decode as wf, setOperationErrorCode as wg, hashActionV2 as wh, RemoveRelationshipAction as wi, SetModelDescriptionInputSchema as wl, isPlainValue as wm, DocumentModelPHState as wn, CodegenStatus as wo, derivesByRule as wp, MutationReorderChangeLogItemsInputArgs as wr, IWebhookScope as ws, AddStateExampleAction as wt, undoTargetsBase as wu, setPreferredEditorOperation as wv, GraphQLListTypeNode as wy, PHConnectInstance as x, requireStateReducer as x_, SetOperationErrorCodeAction as xa, LEGACY_UNDO_GROUP_PREFIX as xc, fetchFileBrowser as xd, documentFromCreation as xf, setModuleName as xg, actionSignerIdentity as xh, ReducerOptions as xi, SetAuthorNameInputSchema as xl, evaluateGrantStack as xm, DocumentModelOperationExampleAction as xn, User as xo, capabilitiesOf as xp, MutationDeleteStateExampleArgs as xr, AuthorizerResult as xs, AddOperationInput as xt, tailAppliesIncrementally as xu, operationOutcome as xv, GraphQLInputObjectTypeDefinitionNode as xy, PHConnectExplorerIcons as y, removeExistingOperations as y_, SetOperationDescriptionAction as ya, CanonicalKey as yc, documentModelLoadFromInput as yd, creationActions as yf, setModelName as yg, DOCUMENT_SCOPE_ACTION_TYPES as yh, RedoActionInput as yi, RetractActionInputSchema as yl, assertValidInitialGrants as ym, DocumentModelOperationErrorAction as yn, UpgradeDocumentAction as yo, baseReducerVersionsFor as yp, MutationDeleteOperationErrorArgs as yr, ReplayStateMode as ys, AddOperationExampleAction as yt, retractionRewrites as yu, OperationOutcome as yv, GraphQLEnumValueDefinitionNode as yy, PHConnectRuntimeDefaultDrive as z, Principal as z_, SetPreferredEditorAction as za, CodeExampleSchema as zc, AuthActionNotAllowedError as zd, documentModelFileExtension as zf, updateStateExample as zg, addOperationExample as zh, RetractAction as zi, SetOperationSchemaInputSchema as zl, MoveGrantAction as zm, HostedEditorProps as zn, IBaseRelationalDb as zo, HoldReason as zp, MutationSetNameArgs as zr, WebhookField as zs, CreateState as zt, documentModelStateSchemaReducer as zu, CatalogScalarName as zv, InputTypeDefinition as zy };
|
|
5687
5709
|
export {};
|
|
5688
|
-
//# sourceMappingURL=types-
|
|
5710
|
+
//# sourceMappingURL=types-Dp2OWq1-.d.ts.map
|