@powerhousedao/shared 6.2.3-dev.34 → 6.2.3-dev.35
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/index.d.mts +1 -1
- package/dist/clis/args/{service-BBx5GDTc.d.mts → service-CHjY5epu.d.mts} +3 -3
- package/dist/clis/args/{service-BBx5GDTc.d.mts.map → service-CHjY5epu.d.mts.map} +1 -1
- package/dist/clis/args/service.d.mts +1 -1
- package/dist/clis/build-pieces.d.mts +1 -1
- package/dist/clis/constants.d.mts +1 -1
- package/dist/clis/index.d.mts +2 -2
- package/dist/clis/index.d.mts.map +1 -1
- package/dist/clis/{types-nzer4WIr.d.mts → types-DM26OWlT.d.mts} +2 -2
- package/dist/clis/{types-nzer4WIr.d.mts.map → types-DM26OWlT.d.mts.map} +1 -1
- package/dist/{config-loader-C6dZB_iX.js → config-loader-CXhzL512.js} +7 -2
- package/dist/{config-loader-C6dZB_iX.js.map → config-loader-CXhzL512.js.map} +1 -1
- package/dist/connect/config-loader.d.ts +2 -1
- package/dist/connect/config-loader.d.ts.map +1 -1
- package/dist/connect/config-loader.js +2 -2
- package/dist/connect/index.d.ts +3 -3
- package/dist/connect/index.js +2 -2
- package/dist/document-drive/index.d.ts +3 -4
- package/dist/document-drive/index.d.ts.map +1 -1
- package/dist/document-model/index.d.ts +2 -3
- package/dist/document-model/index.js +7 -322
- package/dist/document-model/index.js.map +1 -1
- package/dist/{index-5gwOhPG5.d.ts → index-DdXp-CVw.d.ts} +2 -2
- package/dist/{index-5gwOhPG5.d.ts.map → index-DdXp-CVw.d.ts.map} +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/processors/index.d.ts +2 -2
- package/dist/processors/index.js +58 -3
- package/dist/processors/index.js.map +1 -1
- package/dist/purge-v06m_oGz.js +381 -0
- package/dist/purge-v06m_oGz.js.map +1 -0
- package/dist/registry/index.d.ts +3 -3
- package/dist/registry/index.js +10 -1
- package/dist/registry/index.js.map +1 -1
- package/dist/registry/manifest-slim.d.ts +2 -2
- package/dist/{types-CI3ren9F.d.ts → types-B11NGQOQ.d.ts} +20 -12
- package/dist/types-B11NGQOQ.d.ts.map +1 -0
- package/dist/{types-CmeoQg_J.d.ts → types-CFbd2nan.d.ts} +1489 -468
- package/dist/types-CFbd2nan.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/index-D6833Siv.d.ts +0 -939
- package/dist/index-D6833Siv.d.ts.map +0 -1
- package/dist/types-CI3ren9F.d.ts.map +0 -1
- package/dist/types-CmeoQg_J.d.ts.map +0 -1
package/dist/index-D6833Siv.d.ts
DELETED
|
@@ -1,939 +0,0 @@
|
|
|
1
|
-
import { Bu as PHBaseState, Ca as SkipHeaderOperations, Cn as ISigner, Ha as ValidationError, In as MinimalBackupData, Iu as Condition, Jr as ReducerOptions, Kl as PHDocument, Kt as DocumentModelLocalState, Ln as ModuleSpecification, Lu as Grant, Mr as OperationErrorSpecification, Pc as Action, Pr as OperationSpecification, Pu as AuthGroups, Qt as DocumentModelOperationErrorOperations, Ta as StateReducer, U as ActionSignatureContext, Ua as UpgradeManifest, Ut as DocumentModelHeaderOperations, Vt as DocumentModelGlobalState, Yt as DocumentModelModuleOperations, _d as Operation, ad as ProtocolVersions, cd as SignaturePolicy, en as DocumentModelOperationExampleOperations, ga as SignalDispatch, gd as DocumentOperations, hn as FileInput, in as DocumentModelStateOperations, kn as LoadFromInput, ln as DocumentSpecification, lt as Author, nn as DocumentModelPHState, pi as SaveToFileHandle, ql as PHDocumentHeader, qr as Reducer, sn as DocumentModelVersioningOperations, tn as DocumentModelOperationOperations, ui as ReplayDocumentOptions, ut as CodeExample, vd as OperationContext, xa as SigningParameters, zt as DocumentModelDocument, zu as PHAuthState } from "./types-CmeoQg_J.js";
|
|
2
|
-
import "./utils-BrKxCmKx.js";
|
|
3
|
-
import { ZodIssue, z } from "zod";
|
|
4
|
-
//#region document-model/action-transport.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* An action's signer, as the wire declares it: signatures joined into strings,
|
|
7
|
-
* because GraphQL declares them as a list of strings rather than of lists.
|
|
8
|
-
*/
|
|
9
|
-
type TransportSigner = {
|
|
10
|
-
user?: {
|
|
11
|
-
address: string;
|
|
12
|
-
networkId: string;
|
|
13
|
-
chainId: number;
|
|
14
|
-
};
|
|
15
|
-
app?: {
|
|
16
|
-
name: string;
|
|
17
|
-
key: string;
|
|
18
|
-
};
|
|
19
|
-
signatures: string[];
|
|
20
|
-
};
|
|
21
|
-
/** An action's context, as the wire declares it. */
|
|
22
|
-
type TransportActionContext = {
|
|
23
|
-
prevOpIndex?: number;
|
|
24
|
-
prevOpHash?: string;
|
|
25
|
-
nonce?: string;
|
|
26
|
-
signer?: TransportSigner;
|
|
27
|
-
};
|
|
28
|
-
/** An action projected onto exactly the fields the wire declares. */
|
|
29
|
-
type TransportAction = {
|
|
30
|
-
id: string;
|
|
31
|
-
type: string;
|
|
32
|
-
timestampUtcMs: string;
|
|
33
|
-
/**
|
|
34
|
-
* Non-nullable, because the wire declares it so. An action's own type says
|
|
35
|
-
* `unknown`, which admits the absent input an action creator called without
|
|
36
|
-
* one produces - {@link toTransportAction} refuses that rather than passing
|
|
37
|
-
* it on.
|
|
38
|
-
*/
|
|
39
|
-
input: NonNullable<unknown>;
|
|
40
|
-
scope: string;
|
|
41
|
-
context?: TransportActionContext;
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* Projects an action onto the fields the GraphQL `ActionInput` declares.
|
|
45
|
-
*
|
|
46
|
-
* A projection rather than a spread, because an input object rejects a field it
|
|
47
|
-
* does not declare, and that refusal takes the whole request with it. An action
|
|
48
|
-
* read back out of storage can carry fields the type no longer has - a legacy
|
|
49
|
-
* `attachments` array, or the operation fields left behind by a signing helper
|
|
50
|
-
* that returns an operation - and any one of them would sink an otherwise valid
|
|
51
|
-
* submission.
|
|
52
|
-
*
|
|
53
|
-
* Only fields the action actually carries are emitted, so an unsigned action
|
|
54
|
-
* sends no context at all rather than a context full of nulls.
|
|
55
|
-
*/
|
|
56
|
-
declare function toTransportAction(action: Action): TransportAction;
|
|
57
|
-
//#endregion
|
|
58
|
-
//#region document-model/auth.d.ts
|
|
59
|
-
type InitializeAuthActionInput = {
|
|
60
|
-
version: number;
|
|
61
|
-
grants: Grant[];
|
|
62
|
-
};
|
|
63
|
-
type SetGrantActionInput = {
|
|
64
|
-
grant: Grant;
|
|
65
|
-
};
|
|
66
|
-
type RemoveGrantActionInput = {
|
|
67
|
-
id: string;
|
|
68
|
-
};
|
|
69
|
-
type MoveGrantActionInput = {
|
|
70
|
-
id: string;
|
|
71
|
-
/** Target index in the grant list; clamped to the valid range. */
|
|
72
|
-
index: number;
|
|
73
|
-
};
|
|
74
|
-
type InitializeAuthAction = Action & {
|
|
75
|
-
type: "INITIALIZE_AUTH";
|
|
76
|
-
input: InitializeAuthActionInput;
|
|
77
|
-
};
|
|
78
|
-
type SetGrantAction = Action & {
|
|
79
|
-
type: "SET_GRANT";
|
|
80
|
-
input: SetGrantActionInput;
|
|
81
|
-
};
|
|
82
|
-
type RemoveGrantAction = Action & {
|
|
83
|
-
type: "REMOVE_GRANT";
|
|
84
|
-
input: RemoveGrantActionInput;
|
|
85
|
-
};
|
|
86
|
-
type MoveGrantAction = Action & {
|
|
87
|
-
type: "MOVE_GRANT";
|
|
88
|
-
input: MoveGrantActionInput;
|
|
89
|
-
};
|
|
90
|
-
type AuthAction = InitializeAuthAction | SetGrantAction | RemoveGrantAction | MoveGrantAction;
|
|
91
|
-
declare const AUTH_ACTION_TYPES: readonly ["INITIALIZE_AUTH", "SET_GRANT", "REMOVE_GRANT", "MOVE_GRANT"];
|
|
92
|
-
declare function isAuthAction(action: Action): action is AuthAction;
|
|
93
|
-
/** Highest known policy version; decide() fails closed above it. */
|
|
94
|
-
declare const MAX_SUPPORTED_AUTH_VERSION = 1;
|
|
95
|
-
declare const InitializeAuthActionInputSchema: () => z.ZodObject<{
|
|
96
|
-
version: z.ZodNumber;
|
|
97
|
-
grants: z.ZodArray<z.ZodCustom<Grant, Grant>>;
|
|
98
|
-
}, z.core.$strip>;
|
|
99
|
-
declare const SetGrantActionInputSchema: () => z.ZodObject<{
|
|
100
|
-
grant: z.ZodCustom<Grant, Grant>;
|
|
101
|
-
}, z.core.$strip>;
|
|
102
|
-
declare const RemoveGrantActionInputSchema: () => z.ZodObject<{
|
|
103
|
-
id: z.ZodString;
|
|
104
|
-
}, z.core.$strip>;
|
|
105
|
-
declare const MoveGrantActionInputSchema: () => z.ZodObject<{
|
|
106
|
-
id: z.ZodString;
|
|
107
|
-
index: z.ZodNumber;
|
|
108
|
-
}, z.core.$strip>;
|
|
109
|
-
declare const initializeAuth: (input: InitializeAuthActionInput) => InitializeAuthAction;
|
|
110
|
-
declare const setGrant: (input: SetGrantActionInput) => SetGrantAction;
|
|
111
|
-
declare const removeGrant: (input: RemoveGrantActionInput) => RemoveGrantAction;
|
|
112
|
-
declare const moveGrant: (input: MoveGrantActionInput) => MoveGrantAction;
|
|
113
|
-
/**
|
|
114
|
-
* True when `signerKey` (an ActionSigner app key, a did:key) identifies the same
|
|
115
|
-
* key recorded as the document creator. Returns false
|
|
116
|
-
* when there is no creator (empty JWK) or no signer key.
|
|
117
|
-
*/
|
|
118
|
-
declare function isDocumentCreator(creatorKey: JsonWebKey | undefined, signerKey: string | undefined): boolean;
|
|
119
|
-
/**
|
|
120
|
-
* Sets the initial policy. Valid only while the auth scope is uninitialized
|
|
121
|
-
* (version 0). The input version is the policy language version and must be an
|
|
122
|
-
* integer >= 1; 0 is reserved for the uninitialized state. On a signed-header
|
|
123
|
-
* document it must be signed by the document creator (`header.sig.publicKey`).
|
|
124
|
-
* A creator-less policy must include a grant permitting execute on the auth
|
|
125
|
-
* scope, or it would be born locked out.
|
|
126
|
-
*/
|
|
127
|
-
declare function applyInitializeAuthAction<TState extends PHBaseState>(document: PHDocument<TState>, action: InitializeAuthAction): PHDocument<TState>;
|
|
128
|
-
/** Upserts a grant by id: replaces in place if present, otherwise appends. */
|
|
129
|
-
declare function applySetGrantAction<TState extends PHBaseState>(document: PHDocument<TState>, action: SetGrantAction): PHDocument<TState>;
|
|
130
|
-
/**
|
|
131
|
-
* Removes a grant by id; throws if the id is not present or if the removal
|
|
132
|
-
* would leave a creator-less policy with no auth-administration grant.
|
|
133
|
-
*/
|
|
134
|
-
declare function applyRemoveGrantAction<TState extends PHBaseState>(document: PHDocument<TState>, action: RemoveGrantAction): PHDocument<TState>;
|
|
135
|
-
/**
|
|
136
|
-
* Moves a grant by id to a new index. Order is load-bearing (the last
|
|
137
|
-
* applicable grant wins), so the relative order of the other grants is kept.
|
|
138
|
-
* The target index is clamped to the valid range; an unknown id throws.
|
|
139
|
-
*
|
|
140
|
-
* Order alone decides which grant wins, so a move can take administration away
|
|
141
|
-
* without changing the list's contents. It carries the same retention rule as
|
|
142
|
-
* the two mutation paths.
|
|
143
|
-
*/
|
|
144
|
-
declare function applyMoveGrantAction<TState extends PHBaseState>(document: PHDocument<TState>, action: MoveGrantAction): PHDocument<TState>;
|
|
145
|
-
/**
|
|
146
|
-
* Dispatches an auth-scope action to its handler. This is the auth scope's
|
|
147
|
-
* dedicated reducer: it is applied by the base reducer instead of the model
|
|
148
|
-
* reducer, mirroring the document-scope platform handlers. Unknown types are a
|
|
149
|
-
* no-op, matching the model-reducer default.
|
|
150
|
-
*/
|
|
151
|
-
declare function applyAuthAction<TState extends PHBaseState>(document: PHDocument<TState>, action: Action): PHDocument<TState>;
|
|
152
|
-
/**
|
|
153
|
-
* Because only creators can initialize auth scopes, we must verify that either
|
|
154
|
-
* the document has no auth or the version and creator match.
|
|
155
|
-
*/
|
|
156
|
-
declare function assertAuthPreservedOnDuplicate(documentId: string, source: PHAuthState | undefined, duplicated: PHAuthState | undefined): void;
|
|
157
|
-
/**
|
|
158
|
-
* The auth scope a state snapshot may install, given the policy already there.
|
|
159
|
-
*
|
|
160
|
-
* `applyAuthAction` is the validated door onto `state.auth`, but a whole-state
|
|
161
|
-
* snapshot (UPGRADE_DOCUMENT's `initialState`) replaces the scope wholesale and
|
|
162
|
-
* is authorized as a `document`-scope write. Without this, a subject holding
|
|
163
|
-
* `execute` on `document` and no auth grant at all can install a policy of its
|
|
164
|
-
* choosing, name itself `creator` (which exempts the policy from the retention
|
|
165
|
-
* rule for good), or wipe an existing policy by carrying the default
|
|
166
|
-
* uninitialized one.
|
|
167
|
-
*
|
|
168
|
-
* Three cases:
|
|
169
|
-
*
|
|
170
|
-
* - the snapshot carries no policy, or an uninitialized one: the document
|
|
171
|
-
* keeps the policy it has, so a default-state upgrade cannot reset it;
|
|
172
|
-
* - the document is uninitialized and the snapshot carries a policy: the
|
|
173
|
-
* policy is installed after the same validation genesis applies, so it
|
|
174
|
-
* cannot be born locked out;
|
|
175
|
-
* - both carry a policy: they must agree. A duplicate preserves its source's
|
|
176
|
-
* policy (see {@link assertAuthPreservedOnDuplicate}), and anything else is
|
|
177
|
-
* an attempt to replace one policy with another.
|
|
178
|
-
*/
|
|
179
|
-
declare function resolveSnapshotAuth(documentId: string, documentType: string, current: PHAuthState | undefined, incoming: PHAuthState | undefined): PHAuthState;
|
|
180
|
-
/** UNDO and REDO are rejected on the auth scope. */
|
|
181
|
-
declare function assertAuthScopeActionAllowed(action: Action): void;
|
|
182
|
-
type AuthVerb = "read" | "execute";
|
|
183
|
-
type AuthRequest = {
|
|
184
|
-
verb: AuthVerb;
|
|
185
|
-
scope: string;
|
|
186
|
-
/** For execute: the operation (action type) being attempted. Omitted for reads. */
|
|
187
|
-
operation?: string;
|
|
188
|
-
};
|
|
189
|
-
type AuthSubject = {
|
|
190
|
-
/** Verified signer address; undefined for an anonymous subject. */
|
|
191
|
-
address?: string;
|
|
192
|
-
/** The signer's app key (a did:key), used to match the document creator. */
|
|
193
|
-
key?: string;
|
|
194
|
-
};
|
|
195
|
-
/**
|
|
196
|
-
* What condition attr paths resolve against, beyond the subject. Supplied
|
|
197
|
-
* only while authConditions enforcement is on: with no context a grant
|
|
198
|
-
* carrying `where` or a { match } principal never applies.
|
|
199
|
-
*/
|
|
200
|
-
type ConditionContext = {
|
|
201
|
-
/** The executing scope's own state, for `doc.<scope>.*` paths. */
|
|
202
|
-
scopeState: unknown;
|
|
203
|
-
/** The action's input, for `action.input.*` paths. Absent for reads. */
|
|
204
|
-
actionInput?: unknown;
|
|
205
|
-
};
|
|
206
|
-
type AuthDecision = "allow" | "deny";
|
|
207
|
-
/** Why the policy refused a request. */
|
|
208
|
-
type AuthRefusal = "version-unsupported" | "no-applicable-grant" | "denied-by-grant";
|
|
209
|
-
/**
|
|
210
|
-
* A decision together with why it refused. A refusal names which of the
|
|
211
|
-
* policy's rules produced it, so an operation records the reason it was refused
|
|
212
|
-
* rather than one reason standing for every refusal.
|
|
213
|
-
*/
|
|
214
|
-
type AuthEvaluation = {
|
|
215
|
-
decision: "allow";
|
|
216
|
-
} | {
|
|
217
|
-
decision: "deny";
|
|
218
|
-
refusal: AuthRefusal;
|
|
219
|
-
grantId?: string;
|
|
220
|
-
};
|
|
221
|
-
/**
|
|
222
|
-
* Evaluates the auth policy for a single request and reports why it refused.
|
|
223
|
-
* Pure and deterministic.
|
|
224
|
-
*
|
|
225
|
-
* An uninitialized policy (version 0, absent auth state, or a legacy `{}`
|
|
226
|
-
* auth scope serialized before PHAuthState had a version) leaves the document
|
|
227
|
-
* open. Once a policy exists the default is deny, and grants stack in order.
|
|
228
|
-
*
|
|
229
|
-
* Group principals match only against a supplied groups map (the groups
|
|
230
|
-
* projection, present when authGroups is on); with no map they never apply.
|
|
231
|
-
* `where` clauses and { match } principals likewise evaluate only against a
|
|
232
|
-
* supplied condition context (present when authConditions is on).
|
|
233
|
-
*/
|
|
234
|
-
declare function evaluate(auth: PHAuthState | undefined, subject: AuthSubject, request: AuthRequest, groups?: AuthGroups, conditions?: ConditionContext): AuthEvaluation;
|
|
235
|
-
/**
|
|
236
|
-
* Evaluates the auth policy for a single request. Pure and deterministic. This
|
|
237
|
-
* is {@link evaluate} with the reason dropped.
|
|
238
|
-
*/
|
|
239
|
-
declare function decide(auth: PHAuthState | undefined, subject: AuthSubject, request: AuthRequest, groups?: AuthGroups, conditions?: ConditionContext): AuthDecision;
|
|
240
|
-
/**
|
|
241
|
-
* The group document ids a single auth action's input names with `{ group }`
|
|
242
|
-
* principals. INITIALIZE_AUTH contributes the groups named across its grants,
|
|
243
|
-
* SET_GRANT the groups named by its one grant; REMOVE_GRANT and MOVE_GRANT
|
|
244
|
-
* contribute nothing. Total over any input shape, because references are read
|
|
245
|
-
* from the input as it arrived, including inputs later stored as errors.
|
|
246
|
-
*/
|
|
247
|
-
declare function mentionedGroupIds(action: Action): string[];
|
|
248
|
-
//#endregion
|
|
249
|
-
//#region document-model/auth-v1.d.ts
|
|
250
|
-
/** Maximum number of grants in a policy. */
|
|
251
|
-
declare const MAX_AUTH_GRANTS = 100;
|
|
252
|
-
/** Maximum nesting depth of a condition tree. */
|
|
253
|
-
declare const MAX_CONDITION_DEPTH = 10;
|
|
254
|
-
/** Maximum node count (conditions plus operands) of a condition tree. */
|
|
255
|
-
declare const MAX_CONDITION_NODES = 100;
|
|
256
|
-
/** Maximum entries in an execute capability's operation list. */
|
|
257
|
-
declare const MAX_CAPABILITY_OPERATIONS = 100;
|
|
258
|
-
/**
|
|
259
|
-
* Thrown when a grant violates the v1 validation rules. The message is stored
|
|
260
|
-
* on error operations, so it must be a pure function of the input.
|
|
261
|
-
*/
|
|
262
|
-
declare class InvalidGrantError extends Error {
|
|
263
|
-
readonly grantId: string;
|
|
264
|
-
constructor(grantId: string, problem: string);
|
|
265
|
-
}
|
|
266
|
-
/** Thrown for a `{ group }` principal on a group document: references never chain. */
|
|
267
|
-
declare class GroupPrincipalNotAllowedError extends Error {
|
|
268
|
-
readonly grantId: string;
|
|
269
|
-
constructor(grantId: string);
|
|
270
|
-
}
|
|
271
|
-
/**
|
|
272
|
-
* Thrown when a change would leave a creator-less policy with no grant
|
|
273
|
-
* permitting execute on the auth scope. Without the creator carve-out no
|
|
274
|
-
* subject could ever administer such a policy again.
|
|
275
|
-
*/
|
|
276
|
-
declare class AuthAdministrationLockoutError extends Error {
|
|
277
|
-
readonly grantId: string;
|
|
278
|
-
constructor(grantId: string);
|
|
279
|
-
}
|
|
280
|
-
/**
|
|
281
|
-
* Thrown when INITIALIZE_AUTH would create a creator-less policy with no grant
|
|
282
|
-
* permitting execute on the auth scope. Such a policy would be born with no
|
|
283
|
-
* subject able to administer it.
|
|
284
|
-
*/
|
|
285
|
-
declare class AuthAdministrationMissingError extends Error {
|
|
286
|
-
constructor();
|
|
287
|
-
}
|
|
288
|
-
declare function isPlainValue(value: unknown): value is Record<string, unknown>;
|
|
289
|
-
/** Returns the first v1-rule violation, or null. Pure, total, deterministic. */
|
|
290
|
-
declare function grantProblem(value: unknown): string | null;
|
|
291
|
-
declare const GrantSchema: () => z.ZodCustom<Grant, Grant>;
|
|
292
|
-
/** V1 shape rules plus the group-document group-principal ban. */
|
|
293
|
-
declare function assertValidGrant(grant: unknown, documentType: string): void;
|
|
294
|
-
/**
|
|
295
|
-
* Validates an initial grant list: the count cap, every grant, and — on a
|
|
296
|
-
* creator-less policy — that some grant keeps the auth scope administrable.
|
|
297
|
-
*/
|
|
298
|
-
declare function assertValidInitialGrants(grants: Grant[], documentType: string, creator: string | undefined): void;
|
|
299
|
-
/**
|
|
300
|
-
* Validates a grant upsert: the grant itself, the count cap on append, and
|
|
301
|
-
* administration retention. Retention is checked on an append as well as an
|
|
302
|
-
* in-place replace, because a grant appended after the administration grant can
|
|
303
|
-
* shadow it (evaluation is last-applicable-grant-wins) and so take
|
|
304
|
-
* administration away without removing anything.
|
|
305
|
-
*/
|
|
306
|
-
declare function assertValidGrantUpsert(grant: Grant, existing: Grant[], documentType: string, creator: string | undefined): void;
|
|
307
|
-
/**
|
|
308
|
-
* A creator-less policy must always retain a grant permitting execute on the
|
|
309
|
-
* auth scope; on a signed document the creator carve-out keeps administration
|
|
310
|
-
* reachable instead. Rejects a change that takes the last such grant away. A
|
|
311
|
-
* policy already without one is left alone: the change is not what locks it.
|
|
312
|
-
*/
|
|
313
|
-
declare function assertAuthAdministrationRetained(creator: string | undefined, previous: Grant[], next: Grant[], grantId: string): void;
|
|
314
|
-
/**
|
|
315
|
-
* Evaluates a version-1 condition. Deterministic, total, and pure: any input
|
|
316
|
-
* shape yields a boolean and never throws, and a malformed condition is
|
|
317
|
-
* false. These are consensus semantics, versioned by `PHAuthState.version`;
|
|
318
|
-
* changing them requires a new version.
|
|
319
|
-
*/
|
|
320
|
-
declare function evaluateCondition(condition: Condition, subject: AuthSubject, request: AuthRequest, conditions: ConditionContext): boolean;
|
|
321
|
-
/**
|
|
322
|
-
* The group document ids named by `{ group }` principals in a grant list, in
|
|
323
|
-
* order of first appearance. These are the streams the groups projection reads.
|
|
324
|
-
*/
|
|
325
|
-
declare function referencedGroupIds(grants: Grant[]): string[];
|
|
326
|
-
/**
|
|
327
|
-
* Evaluates a v1 grant stack: default deny, last applicable grant wins, and
|
|
328
|
-
* reports which grant decided it. Group principals match only against a
|
|
329
|
-
* supplied groups map, and `where` clauses and { match } principals evaluate
|
|
330
|
-
* only against a supplied condition context; a grant that uses an unsupplied
|
|
331
|
-
* feature never applies.
|
|
332
|
-
*/
|
|
333
|
-
declare function evaluateGrantStack(grants: Grant[], subject: AuthSubject, request: AuthRequest, groups?: AuthGroups, conditions?: ConditionContext): AuthEvaluation;
|
|
334
|
-
/**
|
|
335
|
-
* Evaluates a v1 grant stack: default deny, last applicable grant wins. This is
|
|
336
|
-
* {@link evaluateGrantStack} with the reason dropped.
|
|
337
|
-
*/
|
|
338
|
-
declare function evaluateGrants(grants: Grant[], subject: AuthSubject, request: AuthRequest, groups?: AuthGroups, conditions?: ConditionContext): AuthDecision;
|
|
339
|
-
//#endregion
|
|
340
|
-
//#region document-model/constants.d.ts
|
|
341
|
-
declare const documentModelFileExtension: "phdm";
|
|
342
|
-
declare const documentModelInitialLocalState: DocumentModelLocalState;
|
|
343
|
-
declare const documentModelInitialGlobalState: DocumentModelGlobalState;
|
|
344
|
-
declare const documentModelGlobalState: DocumentModelGlobalState;
|
|
345
|
-
declare const HASH_ALGORITHM_SHA1 = "sha1";
|
|
346
|
-
declare const HASH_ALGORITHM_SHA256 = "sha256";
|
|
347
|
-
declare const HASH_ALGORITHM_SHA512 = "sha512";
|
|
348
|
-
declare const HASH_ENCODING_BASE64 = "base64";
|
|
349
|
-
declare const HASH_ENCODING_HEX = "hex";
|
|
350
|
-
//#endregion
|
|
351
|
-
//#region document-model/crypto.d.ts
|
|
352
|
-
declare const hashBrowser: (data: string | Uint8Array | ArrayBufferView | DataView, algorithm?: string, encoding?: string, _params?: Record<string, unknown>) => string;
|
|
353
|
-
declare function getUnixTimestamp(date: Date | string): string;
|
|
354
|
-
declare function buildOperationSignatureParams({ documentId, signer, action, previousStateHash }: ActionSignatureContext): [string, string, string, string];
|
|
355
|
-
declare function buildOperationSignatureMessage(params: [string, string, string, string]): Uint8Array;
|
|
356
|
-
declare function ab2hex(ab: ArrayBuffer | ArrayBufferView): string;
|
|
357
|
-
declare function hex2ab(hex: string): Uint8Array<ArrayBuffer>;
|
|
358
|
-
/**
|
|
359
|
-
* Decodes a base58btc (Bitcoin/IPFS alphabet) string to bytes. Returns null on
|
|
360
|
-
* any character outside the alphabet.
|
|
361
|
-
*/
|
|
362
|
-
declare function base58Decode(input: string): Uint8Array | null;
|
|
363
|
-
/** Encodes bytes as unpadded base64url. */
|
|
364
|
-
declare function bytesToBase64Url(bytes: Uint8Array): string;
|
|
365
|
-
/** Decodes a base64url string to bytes (portable across node, browsers, workers). */
|
|
366
|
-
declare function base64UrlToBytes(input: string): Uint8Array;
|
|
367
|
-
//#endregion
|
|
368
|
-
//#region document-model/denied.d.ts
|
|
369
|
-
/**
|
|
370
|
-
* True iff authorization rejected the action.
|
|
371
|
-
*/
|
|
372
|
-
declare function isDenied(operation: Operation): boolean;
|
|
373
|
-
/**
|
|
374
|
-
* The closed set of strings persisted as `deniedReason`. Re-evaluation compares
|
|
375
|
-
* them, so they are consensus data: exact strings that embed no grant id,
|
|
376
|
-
* subject or timestamp. Changing one is history-visible.
|
|
377
|
-
*/
|
|
378
|
-
declare const DOCUMENT_DELETED_REASON = "document deleted";
|
|
379
|
-
declare const AUTH_VERSION_UNSUPPORTED_REASON = "auth policy version unsupported";
|
|
380
|
-
declare const AUTH_NO_GRANT_REASON = "no grant permits this operation";
|
|
381
|
-
declare const AUTH_DENIED_BY_GRANT_REASON = "denied by grant";
|
|
382
|
-
//#endregion
|
|
383
|
-
//#region document-model/document-schema.d.ts
|
|
384
|
-
declare const BaseDocumentHeaderSchema: z.ZodObject<{
|
|
385
|
-
id: z.ZodString;
|
|
386
|
-
name: z.ZodString;
|
|
387
|
-
createdAtUtcIso: z.ZodString;
|
|
388
|
-
lastModifiedAtUtcIso: z.ZodString;
|
|
389
|
-
documentType: z.ZodString;
|
|
390
|
-
}, z.core.$strip>;
|
|
391
|
-
declare const BaseDocumentStateSchema: z.ZodObject<{
|
|
392
|
-
global: z.ZodUnknown;
|
|
393
|
-
}, z.core.$strip>;
|
|
394
|
-
/** Schema for validating the header object of a DocumentModel document */
|
|
395
|
-
declare const DocumentModelHeaderSchema: z.ZodObject<{
|
|
396
|
-
id: z.ZodString;
|
|
397
|
-
name: z.ZodString;
|
|
398
|
-
createdAtUtcIso: z.ZodString;
|
|
399
|
-
lastModifiedAtUtcIso: z.ZodString;
|
|
400
|
-
documentType: z.ZodLiteral<"powerhouse/document-model">;
|
|
401
|
-
}, z.core.$strip>;
|
|
402
|
-
/** Schema for validating the state object of a DocumentModel document */
|
|
403
|
-
declare const DocumentModelPHStateSchema: z.ZodObject<{
|
|
404
|
-
global: z.ZodObject<Required<{
|
|
405
|
-
author: z.ZodType<Author, Author, z.core.$ZodTypeInternals<Author, Author>>;
|
|
406
|
-
description: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
407
|
-
extension: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
408
|
-
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
409
|
-
name: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
410
|
-
specifications: z.ZodType<DocumentSpecification[], DocumentSpecification[], z.core.$ZodTypeInternals<DocumentSpecification[], DocumentSpecification[]>>;
|
|
411
|
-
}>, z.core.$strip>;
|
|
412
|
-
}, z.core.$strip>;
|
|
413
|
-
declare const DocumentModelSchema: z.ZodObject<{
|
|
414
|
-
header: z.ZodObject<{
|
|
415
|
-
id: z.ZodString;
|
|
416
|
-
name: z.ZodString;
|
|
417
|
-
createdAtUtcIso: z.ZodString;
|
|
418
|
-
lastModifiedAtUtcIso: z.ZodString;
|
|
419
|
-
documentType: z.ZodLiteral<"powerhouse/document-model">;
|
|
420
|
-
}, z.core.$strip>;
|
|
421
|
-
state: z.ZodObject<{
|
|
422
|
-
global: z.ZodObject<Required<{
|
|
423
|
-
author: z.ZodType<Author, Author, z.core.$ZodTypeInternals<Author, Author>>;
|
|
424
|
-
description: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
425
|
-
extension: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
426
|
-
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
427
|
-
name: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
428
|
-
specifications: z.ZodType<DocumentSpecification[], DocumentSpecification[], z.core.$ZodTypeInternals<DocumentSpecification[], DocumentSpecification[]>>;
|
|
429
|
-
}>, z.core.$strip>;
|
|
430
|
-
}, z.core.$strip>;
|
|
431
|
-
initialState: z.ZodObject<{
|
|
432
|
-
global: z.ZodObject<Required<{
|
|
433
|
-
author: z.ZodType<Author, Author, z.core.$ZodTypeInternals<Author, Author>>;
|
|
434
|
-
description: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
435
|
-
extension: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
436
|
-
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
437
|
-
name: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
438
|
-
specifications: z.ZodType<DocumentSpecification[], DocumentSpecification[], z.core.$ZodTypeInternals<DocumentSpecification[], DocumentSpecification[]>>;
|
|
439
|
-
}>, z.core.$strip>;
|
|
440
|
-
}, z.core.$strip>;
|
|
441
|
-
}, z.core.$strip>;
|
|
442
|
-
/** Simple helper function to check if a state object is a DocumentModel document state object */
|
|
443
|
-
declare function isDocumentModelState(state: unknown): state is DocumentModelPHState;
|
|
444
|
-
/** Simple helper function to assert that a document state object is a DocumentModel document state object */
|
|
445
|
-
declare function assertIsDocumentModelState(state: unknown): asserts state is DocumentModelPHState;
|
|
446
|
-
/** Simple helper function to check if a document is a DocumentModel document */
|
|
447
|
-
declare function isDocumentModelDocument(document: unknown): document is DocumentModelDocument;
|
|
448
|
-
/** Simple helper function to assert that a document is a DocumentModel document */
|
|
449
|
-
declare function assertIsDocumentModelDocument(document: unknown): asserts document is DocumentModelDocument;
|
|
450
|
-
//#endregion
|
|
451
|
-
//#region document-model/document-type.d.ts
|
|
452
|
-
declare const documentModelDocumentType = "powerhouse/document-model";
|
|
453
|
-
declare const groupDocumentType = "powerhouse/reactor-group";
|
|
454
|
-
/**
|
|
455
|
-
* The group-model action types that change membership. The groups projection
|
|
456
|
-
* filters its reads to these, so any other group operation is invisible to a
|
|
457
|
-
* decision. Kept here so the reactor never depends on the group package; a
|
|
458
|
-
* reactor-group test guards against drift.
|
|
459
|
-
*/
|
|
460
|
-
declare const groupMembershipActionTypes: readonly ["ADD_MEMBER", "REMOVE_MEMBER"];
|
|
461
|
-
//#endregion
|
|
462
|
-
//#region document-model/errors.d.ts
|
|
463
|
-
declare const FileSystemError: Error;
|
|
464
|
-
declare class InvalidActionInputError extends Error {
|
|
465
|
-
data: unknown;
|
|
466
|
-
constructor(data: unknown);
|
|
467
|
-
}
|
|
468
|
-
declare class InvalidActionInputZodError extends InvalidActionInputError {
|
|
469
|
-
issues: ZodIssue[];
|
|
470
|
-
constructor(issues: ZodIssue[]);
|
|
471
|
-
}
|
|
472
|
-
/**
|
|
473
|
-
* Error thrown when attempting to downgrade a document version.
|
|
474
|
-
*/
|
|
475
|
-
declare class DowngradeNotSupportedError extends Error {
|
|
476
|
-
readonly documentType: string;
|
|
477
|
-
readonly fromVersion: number;
|
|
478
|
-
readonly toVersion: number;
|
|
479
|
-
constructor(documentType: string, fromVersion: number, toVersion: number);
|
|
480
|
-
}
|
|
481
|
-
/**
|
|
482
|
-
* Thrown when INITIALIZE_AUTH is applied to an already-initialized auth scope.
|
|
483
|
-
* The genesis action is valid only at auth revision zero.
|
|
484
|
-
*/
|
|
485
|
-
declare class AuthAlreadyInitializedError extends Error {
|
|
486
|
-
readonly documentId: string;
|
|
487
|
-
constructor(documentId: string);
|
|
488
|
-
}
|
|
489
|
-
/**
|
|
490
|
-
* Thrown when INITIALIZE_AUTH is not signed by the document creator (its signer
|
|
491
|
-
* does not match `header.sig.publicKey`), so it cannot set the auth policy.
|
|
492
|
-
*/
|
|
493
|
-
declare class AuthInitializerNotCreatorError extends Error {
|
|
494
|
-
readonly documentId: string;
|
|
495
|
-
constructor(documentId: string);
|
|
496
|
-
}
|
|
497
|
-
/**
|
|
498
|
-
* Thrown when INITIALIZE_AUTH carries a version below 1. Version 0 is reserved
|
|
499
|
-
* for the uninitialized auth scope.
|
|
500
|
-
*/
|
|
501
|
-
declare class InvalidAuthVersionError extends Error {
|
|
502
|
-
readonly documentId: string;
|
|
503
|
-
readonly version: number;
|
|
504
|
-
constructor(documentId: string, version: number);
|
|
505
|
-
}
|
|
506
|
-
/** Thrown when a duplicate would lose the source policy's version or creator binding. */
|
|
507
|
-
declare class AuthPolicyNotPreservedError extends Error {
|
|
508
|
-
readonly documentId: string;
|
|
509
|
-
constructor(documentId: string);
|
|
510
|
-
}
|
|
511
|
-
/**
|
|
512
|
-
* Thrown when a grant referenced by REMOVE_GRANT or MOVE_GRANT does not exist.
|
|
513
|
-
*/
|
|
514
|
-
declare class GrantNotFoundError extends Error {
|
|
515
|
-
readonly grantId: string;
|
|
516
|
-
constructor(grantId: string);
|
|
517
|
-
}
|
|
518
|
-
/**
|
|
519
|
-
* Thrown when a disallowed action (UNDO, REDO) targets the auth scope.
|
|
520
|
-
*/
|
|
521
|
-
declare class AuthActionNotAllowedError extends Error {
|
|
522
|
-
readonly actionType: string;
|
|
523
|
-
constructor(actionType: string);
|
|
524
|
-
}
|
|
525
|
-
declare class HashMismatchError extends Error {
|
|
526
|
-
protected _scope: string;
|
|
527
|
-
protected _document: PHDocument;
|
|
528
|
-
protected _operation: Operation;
|
|
529
|
-
constructor(scope: string, document: PHDocument, operation: Operation);
|
|
530
|
-
get document(): PHDocument;
|
|
531
|
-
get scope(): string;
|
|
532
|
-
get operation(): Operation;
|
|
533
|
-
}
|
|
534
|
-
/**
|
|
535
|
-
* Thrown when replay or import requires a document model version that is not
|
|
536
|
-
* registered. Carries the data the UI needs to explain the mismatch.
|
|
537
|
-
*/
|
|
538
|
-
declare class UnsupportedDocumentModelVersionError extends Error {
|
|
539
|
-
readonly documentType: string;
|
|
540
|
-
readonly requiredVersion: number;
|
|
541
|
-
readonly availableVersions: number[];
|
|
542
|
-
constructor(documentType: string, requiredVersion: number, availableVersions: number[]);
|
|
543
|
-
static isError(error: unknown): error is UnsupportedDocumentModelVersionError;
|
|
544
|
-
}
|
|
545
|
-
//#endregion
|
|
546
|
-
//#region document-model/versioned-replay.d.ts
|
|
547
|
-
type VersionedReducers = Record<number, Reducer<PHBaseState>>;
|
|
548
|
-
type VersionedReplayConfig = {
|
|
549
|
-
reducers: VersionedReducers;
|
|
550
|
-
upgradeManifest?: UpgradeManifest<readonly number[]>;
|
|
551
|
-
};
|
|
552
|
-
/**
|
|
553
|
-
* Version-aware document replay. Replays a versioned document through per-version
|
|
554
|
-
* reducers, applying upgrade transitions at segment boundaries.
|
|
555
|
-
*
|
|
556
|
-
* Algorithm (D5):
|
|
557
|
-
* a. Build spine from operations["document"]. Empty spine or no upgrades → legacy fallback.
|
|
558
|
-
* b. Collect UPGRADE_DOCUMENT ops from the spine.
|
|
559
|
-
* c. Seed state from the creation upgrade (fromVersion===0). Missing seed with validated
|
|
560
|
-
* upgrades throws; otherwise falls back to legacy.
|
|
561
|
-
* d. Identify validated upgrades (fromVersion > 0, version increases). Compute per-scope
|
|
562
|
-
* boundaries using revision snapshot (preferred) or timestamp fallback.
|
|
563
|
-
* e. Loop over version segments, replaying each scope's ops through the matching reducer,
|
|
564
|
-
* then applying the upgrade transition before the next segment.
|
|
565
|
-
* f. Set header.revision["document"], verify per-scope hashes against state at op-time
|
|
566
|
-
* (not post-upgrade state) when checkHashes is false, and map timestamps from input.
|
|
567
|
-
*
|
|
568
|
-
* operations must include ALL scopes (document scope is NOT stripped).
|
|
569
|
-
* reuseOperationResultingState is ignored by this function — zip operations never carry
|
|
570
|
-
* resultingState.
|
|
571
|
-
*/
|
|
572
|
-
declare function replayDocumentVersioned<TState extends PHBaseState>(initialState: TState, operations: DocumentOperations, config: VersionedReplayConfig, header: PHDocumentHeader, dispatch?: SignalDispatch, options?: ReplayDocumentOptions): PHDocument<TState>;
|
|
573
|
-
//#endregion
|
|
574
|
-
//#region document-model/files.d.ts
|
|
575
|
-
declare function createZip(document: PHDocument): Promise<Uint8Array>;
|
|
576
|
-
/**
|
|
577
|
-
* Creates a minimal ZIP backup from strand data.
|
|
578
|
-
* Used when the full document is not available (e.g., in onOperations handler).
|
|
579
|
-
* Creates a ZIP with minimal header and empty operations.
|
|
580
|
-
*/
|
|
581
|
-
declare function createMinimalZip(data: MinimalBackupData): Promise<Uint8Array>;
|
|
582
|
-
declare function baseSaveToFileHandle(document: PHDocument, input: FileSystemFileHandle): Promise<void>;
|
|
583
|
-
declare function baseLoadFromInput<TState extends PHBaseState>(input: FileInput, reducer: Reducer<TState>, options?: ReplayDocumentOptions): Promise<PHDocument<TState>>;
|
|
584
|
-
declare function baseLoadFromInputVersioned<TState extends PHBaseState>(input: FileInput, config: VersionedReplayConfig, options?: ReplayDocumentOptions): Promise<PHDocument<TState>>;
|
|
585
|
-
type BulkArchiveEntry = {
|
|
586
|
-
/** "/"-separated zip path of a file entry (no trailing slash). */
|
|
587
|
-
path: string;
|
|
588
|
-
data: Uint8Array;
|
|
589
|
-
};
|
|
590
|
-
/**
|
|
591
|
-
* Whether this zip is a single Powerhouse document: the document's four JSON
|
|
592
|
-
* entries (header/state/current-state/operations) at the archive root. A
|
|
593
|
-
* bulk archive has a folder tree instead. Returns false for any input that
|
|
594
|
-
* is not a readable zip.
|
|
595
|
-
*/
|
|
596
|
-
declare function isDocumentZip(data: Uint8Array): Promise<boolean>;
|
|
597
|
-
/**
|
|
598
|
-
* The file entries of a zip (directory entries excluded). Used for bulk
|
|
599
|
-
* archives; throws when the archive holds no files. Note this does NOT
|
|
600
|
-
* validate that the entries are document zips — pair with isDocumentZip.
|
|
601
|
-
*/
|
|
602
|
-
declare function parseBulkArchive(data: Uint8Array): Promise<BulkArchiveEntry[]>;
|
|
603
|
-
/**
|
|
604
|
-
* Assemble a zip from raw entries. A key ending in "/" with empty data is a
|
|
605
|
-
* directory entry, so an archive's folder structure survives a round-trip.
|
|
606
|
-
*/
|
|
607
|
-
declare function zipEntries(entries: Record<string, Uint8Array>): Promise<Uint8Array>;
|
|
608
|
-
declare const documentModelLoadFromInput: LoadFromInput<DocumentModelPHState>;
|
|
609
|
-
declare const documentModelSaveToFileHandle: SaveToFileHandle;
|
|
610
|
-
declare function writeFileBrowser(path: string, name: string, stream: Uint8Array): Promise<string>;
|
|
611
|
-
declare function readFileBrowser(path: string): void;
|
|
612
|
-
declare function fetchFileBrowser(url: string): Promise<{
|
|
613
|
-
data: Buffer;
|
|
614
|
-
mimeType?: string;
|
|
615
|
-
}>;
|
|
616
|
-
declare const getFileBrowser: (file: string) => Promise<void>;
|
|
617
|
-
//#endregion
|
|
618
|
-
//#region document-model/header.d.ts
|
|
619
|
-
/**
|
|
620
|
-
* Creates a verification-only signer from a public key.
|
|
621
|
-
* This signer can only verify signatures, not sign data.
|
|
622
|
-
*
|
|
623
|
-
* @param pubKey - The public key to use for verification.
|
|
624
|
-
* @returns An ISigner that can only verify signatures.
|
|
625
|
-
*/
|
|
626
|
-
declare function createVerificationSigner(pubKey: JsonWebKey): Promise<ISigner>;
|
|
627
|
-
/**
|
|
628
|
-
* Signs a header. Generally, this is not called directly, but rather through
|
|
629
|
-
* {@link createSignedHeader}.
|
|
630
|
-
*
|
|
631
|
-
* @param parameters - The parameters used to sign the header.
|
|
632
|
-
* @param signer - The signer of the document.
|
|
633
|
-
*
|
|
634
|
-
* @returns The signature of the header.
|
|
635
|
-
*/
|
|
636
|
-
declare const sign: (parameters: SigningParameters, signer: ISigner) => Promise<string>;
|
|
637
|
-
/**
|
|
638
|
-
* Verifies a header signature. Generally, this is not called directly, but
|
|
639
|
-
* rather through {@link validateHeader}.
|
|
640
|
-
*
|
|
641
|
-
* @param parameters - The parameters used to sign the header.
|
|
642
|
-
* @param signature - The signature to verify.
|
|
643
|
-
* @param signer - The signer of the document.
|
|
644
|
-
*/
|
|
645
|
-
declare const verify: (parameters: SigningParameters, signature: string, signer: ISigner) => Promise<void>;
|
|
646
|
-
/**
|
|
647
|
-
* Validates a header signature.
|
|
648
|
-
*/
|
|
649
|
-
declare const validateHeader: (header: PHDocumentHeader) => Promise<void>;
|
|
650
|
-
/**
|
|
651
|
-
* Creates a header that has yet to be signed. This header is not valid, but
|
|
652
|
-
* can be input into {@link createSignedHeader} to create a signed header.
|
|
653
|
-
*
|
|
654
|
-
* With `protocolVersions` requiring v2 signatures the header takes a random
|
|
655
|
-
* nonce and the id {@link deriveDocumentId} gives, so `id` must be omitted.
|
|
656
|
-
*
|
|
657
|
-
* @returns An unsigned header for a document.
|
|
658
|
-
*/
|
|
659
|
-
declare const createPresignedHeader: (id?: string, documentType?: string, protocolVersions?: ProtocolVersions) => PHDocumentHeader;
|
|
660
|
-
/**
|
|
661
|
-
* A header for a copy of a document headed `source`. A copy is v2-required
|
|
662
|
-
* when its source is or when `policy` asks for it, and then takes a derived id;
|
|
663
|
-
* otherwise it takes `id`. It keeps the source's other protocol versions.
|
|
664
|
-
*/
|
|
665
|
-
declare function createCopyHeader(source: Pick<PHDocumentHeader, "documentType" | "protocolVersions">, id?: string, policy?: SignaturePolicy): PHDocumentHeader;
|
|
666
|
-
/** Whether a v2-required `header` carries the id its params derive. */
|
|
667
|
-
declare function hasDerivedDocumentId(header: PHDocumentHeader): boolean;
|
|
668
|
-
/**
|
|
669
|
-
* Creates a new, signed header for a document. This will replace the id of the
|
|
670
|
-
* document.
|
|
671
|
-
*
|
|
672
|
-
* @param unsignedHeader - The unsigned header to created the signed header from.
|
|
673
|
-
* @param signer - The signer of the document.
|
|
674
|
-
*
|
|
675
|
-
* @returns A new signed header for a document. Some fields are mutable and
|
|
676
|
-
* some are not. See the PHDocumentHeader type for more information.
|
|
677
|
-
*/
|
|
678
|
-
declare const createSignedHeader: (unsignedHeader: PHDocumentHeader, documentType: string, signer: ISigner) => Promise<PHDocumentHeader>;
|
|
679
|
-
/**
|
|
680
|
-
* Creates a signed header for a document. The document header requires a signer
|
|
681
|
-
* as the document id is a cryptographic signature.
|
|
682
|
-
*
|
|
683
|
-
* @param documentType - The type of the document.
|
|
684
|
-
* @param signer - The signer of the document.
|
|
685
|
-
*
|
|
686
|
-
* @returns The signed header for a document. Some fields are mutable and
|
|
687
|
-
* some are not. See the PHDocumentHeader type for more information.
|
|
688
|
-
*/
|
|
689
|
-
declare const createSignedHeaderForSigner: (documentType: string, signer: ISigner) => Promise<PHDocumentHeader>;
|
|
690
|
-
//#endregion
|
|
691
|
-
//#region document-model/peer-agreement.d.ts
|
|
692
|
-
/** The reactor feature flags a capability's support is a function of. */
|
|
693
|
-
type PeerCapabilityFlags = {
|
|
694
|
-
readonly [flag: string]: boolean | undefined;
|
|
695
|
-
};
|
|
696
|
-
/** A document protocol, named by its `protocolVersions` key. */
|
|
697
|
-
type ProtocolCapability = {
|
|
698
|
-
kind: "protocol";
|
|
699
|
-
name: string;
|
|
700
|
-
/** What a peer that announces nothing is assumed to support. */
|
|
701
|
-
baseline: readonly number[];
|
|
702
|
-
supported(flags: PeerCapabilityFlags): readonly number[];
|
|
703
|
-
/** The version new documents take when peers agree. Absent: not negotiated. */
|
|
704
|
-
preferred?(flags: PeerCapabilityFlags): number;
|
|
705
|
-
/** A header may omit the key. */
|
|
706
|
-
optional: boolean;
|
|
707
|
-
};
|
|
708
|
-
/** A feature that changes what a peer sends or expects on the wire. */
|
|
709
|
-
type FeatureCapability = {
|
|
710
|
-
kind: "feature";
|
|
711
|
-
name: string;
|
|
712
|
-
baseline: readonly number[];
|
|
713
|
-
supported(flags: PeerCapabilityFlags): readonly number[];
|
|
714
|
-
};
|
|
715
|
-
type PeerCapability = ProtocolCapability | FeatureCapability;
|
|
716
|
-
declare const PEER_CAPABILITIES: readonly PeerCapability[];
|
|
717
|
-
/** `base` plus `extra`; an extra replaces a base entry of the same name. */
|
|
718
|
-
declare function mergePeerCapabilities(base: readonly PeerCapability[], extra: readonly PeerCapability[]): PeerCapability[];
|
|
719
|
-
declare const PEER_MANIFEST_FORMAT = 1;
|
|
720
|
-
type Supports = {
|
|
721
|
-
protocols: {
|
|
722
|
-
[protocol: string]: readonly number[];
|
|
723
|
-
};
|
|
724
|
-
features: {
|
|
725
|
-
[feature: string]: readonly number[];
|
|
726
|
-
};
|
|
727
|
-
};
|
|
728
|
-
type PeerManifest = Supports & {
|
|
729
|
-
format: 1;
|
|
730
|
-
/** The signer's did:key, when configured; informational. */
|
|
731
|
-
appKey?: string;
|
|
732
|
-
/** Grows with every start of the reactor; a peer ignores an older one. */
|
|
733
|
-
sequence: number;
|
|
734
|
-
/** base64url(sha256(canonicalJson(Supports & { sequence }))) */
|
|
735
|
-
revision: string;
|
|
736
|
-
};
|
|
737
|
-
/** What this reactor supports, for every capability it registers. */
|
|
738
|
-
declare function localSupports(capabilities: readonly PeerCapability[], flags: PeerCapabilityFlags): Supports;
|
|
739
|
-
/** What a peer that announces nothing supports. */
|
|
740
|
-
declare function legacySupports(capabilities: readonly PeerCapability[]): Supports;
|
|
741
|
-
declare function manifestRevision(supports: Supports, sequence?: number): string;
|
|
742
|
-
declare function localPeerManifest(capabilities: readonly PeerCapability[], flags: PeerCapabilityFlags, appKey?: string, sequence?: number): PeerManifest;
|
|
743
|
-
/** A manifest sent before the one already held; silence carries no sequence. */
|
|
744
|
-
declare function isOlderManifest(next: PeerManifest | null, held: PeerManifest | null | undefined): boolean;
|
|
745
|
-
/** A peer's manifest, or the baselines for a peer that announced none. */
|
|
746
|
-
declare function peerSupports(manifest: PeerManifest | null, capabilities: readonly PeerCapability[]): Supports;
|
|
747
|
-
/**
|
|
748
|
-
* A manifest as received from a peer, or null when it is not one. Formats only
|
|
749
|
-
* add fields, so one of an unknown format is read as its two maps.
|
|
750
|
-
*/
|
|
751
|
-
declare function readPeerManifest(value: unknown): PeerManifest | null;
|
|
752
|
-
/** Why a document may not go to a peer. */
|
|
753
|
-
type HoldReason = {
|
|
754
|
-
protocol: string;
|
|
755
|
-
version: number;
|
|
756
|
-
peerSupports: readonly number[];
|
|
757
|
-
};
|
|
758
|
-
/** Only keys this reactor registers are judged; an absent key agrees. */
|
|
759
|
-
declare function holdReason(peer: Supports, versions: {
|
|
760
|
-
readonly [protocol: string]: number;
|
|
761
|
-
}, capabilities: readonly PeerCapability[]): HoldReason | undefined;
|
|
762
|
-
/** Whether a peer runs every version this reactor does, so nothing is held. */
|
|
763
|
-
declare function coversLocal(peer: Supports, local: Supports, capabilities: readonly PeerCapability[]): boolean;
|
|
764
|
-
/**
|
|
765
|
-
* protocolVersions for a new document: per negotiated protocol, the highest
|
|
766
|
-
* version up to the local preference that every member supports, else the
|
|
767
|
-
* lowest local one. `requested` wins over what is selected.
|
|
768
|
-
*/
|
|
769
|
-
declare function selectProtocolVersions(input: {
|
|
770
|
-
capabilities: readonly PeerCapability[];
|
|
771
|
-
flags: PeerCapabilityFlags;
|
|
772
|
-
members: Iterable<Supports>;
|
|
773
|
-
requested?: {
|
|
774
|
-
readonly [protocol: string]: number;
|
|
775
|
-
};
|
|
776
|
-
}): {
|
|
777
|
-
[protocol: string]: number;
|
|
778
|
-
};
|
|
779
|
-
//#endregion
|
|
780
|
-
//#region document-model/reducer.d.ts
|
|
781
|
-
declare function replayOperations<TState extends PHBaseState = PHBaseState>(initialState: TState, clearedOperations: DocumentOperations, stateReducer: StateReducer<TState>, header: PHDocumentHeader, dispatch?: SignalDispatch, documentReducer?: typeof baseReducer, skipHeaderOperations?: SkipHeaderOperations, options?: ReplayDocumentOptions): PHDocument<TState>;
|
|
782
|
-
/**
|
|
783
|
-
* Updates the document state based on the provided action.
|
|
784
|
-
*
|
|
785
|
-
* @param state The current state of the document.
|
|
786
|
-
* @param action The action being applied to the document.
|
|
787
|
-
* @param skip The number of operations to skip before applying the action.
|
|
788
|
-
* @param reuseLastOperationIndex Whether to reuse the last operation index (used when a an UNDO operation is performed after an existing one).
|
|
789
|
-
* @param context The operation context for deterministic ID generation.
|
|
790
|
-
* @returns The updated document state.
|
|
791
|
-
*/
|
|
792
|
-
declare function updateDocument<TDocument extends PHDocument>(document: TDocument, action: Action, reuseLastOperationIndex: boolean, skip: number, context: OperationContext, operation?: Operation, skipIndexValidation?: boolean): TDocument;
|
|
793
|
-
/**
|
|
794
|
-
* Processes an UNDO or REDO action.
|
|
795
|
-
*
|
|
796
|
-
* @param document The current state of the document.
|
|
797
|
-
* @param action The action being applied to the document.
|
|
798
|
-
* @param skip The number of operations to skip before applying the action.
|
|
799
|
-
* @returns The updated document, calculated skip value and transformed action (if applied).
|
|
800
|
-
*/
|
|
801
|
-
declare function processUndoRedo<TState extends PHBaseState = PHBaseState>(document: PHDocument<TState>, action: Action, skip: number, protocolVersion?: number): {
|
|
802
|
-
document: PHDocument<TState>;
|
|
803
|
-
action: Action;
|
|
804
|
-
skip: number;
|
|
805
|
-
reuseLastOperationIndex: boolean;
|
|
806
|
-
};
|
|
807
|
-
/**
|
|
808
|
-
* Base document reducer that wraps a custom document reducer and handles
|
|
809
|
-
* document-level actions such as undo, redo, and set name.
|
|
810
|
-
*
|
|
811
|
-
* @template TGlobalState - The type of the state of the custom reducer.
|
|
812
|
-
* @template TAction - The type of the actions of the custom reducer.
|
|
813
|
-
* @param state - The current state of the document.
|
|
814
|
-
* @param action - The action object to apply to the state.
|
|
815
|
-
* @param customReducer - The custom reducer that implements the application logic
|
|
816
|
-
* specific to the document's state.
|
|
817
|
-
* @returns The new state of the document.
|
|
818
|
-
*/
|
|
819
|
-
declare function baseReducer<TState extends PHBaseState = PHBaseState>(document: PHDocument<TState>, action: Action, customReducer: StateReducer<TState>, dispatch?: SignalDispatch, options?: ReducerOptions): PHDocument<TState>;
|
|
820
|
-
/**
|
|
821
|
-
* Helper function to create a document model reducer.
|
|
822
|
-
*
|
|
823
|
-
* @remarks
|
|
824
|
-
* This function creates a new reducer that wraps the provided `reducer` with
|
|
825
|
-
* `documentReducer`, adding support for document actions:
|
|
826
|
-
* - `SET_NAME`
|
|
827
|
-
* - `UNDO`
|
|
828
|
-
* - `REDO`
|
|
829
|
-
*
|
|
830
|
-
* It also updates the document-related attributes on every operation.
|
|
831
|
-
*
|
|
832
|
-
* @param reducer - The custom reducer to wrap.
|
|
833
|
-
* @param documentReducer - The document reducer to use.
|
|
834
|
-
*
|
|
835
|
-
* @returns The new reducer.
|
|
836
|
-
*/
|
|
837
|
-
declare function createReducer<TState extends PHBaseState = PHBaseState>(stateReducer: StateReducer<TState>, documentReducer?: typeof baseReducer): Reducer<TState>;
|
|
838
|
-
//#endregion
|
|
839
|
-
//#region document-model/reducers.d.ts
|
|
840
|
-
declare const documentModelHeaderReducer: DocumentModelHeaderOperations;
|
|
841
|
-
declare const documentModelModuleReducer: DocumentModelModuleOperations;
|
|
842
|
-
declare const documentModelOperationErrorReducer: DocumentModelOperationErrorOperations;
|
|
843
|
-
declare const documentModelOperationExampleReducer: DocumentModelOperationExampleOperations;
|
|
844
|
-
declare const documentModelOperationReducer: DocumentModelOperationOperations;
|
|
845
|
-
declare const documentModelStateSchemaReducer: DocumentModelStateOperations;
|
|
846
|
-
declare const documentModelVersioningReducer: DocumentModelVersioningOperations;
|
|
847
|
-
declare const documentModelStateReducer: StateReducer<DocumentModelPHState>;
|
|
848
|
-
declare const documentModelReducer: Reducer<DocumentModelPHState>;
|
|
849
|
-
//#endregion
|
|
850
|
-
//#region document-model/validation.d.ts
|
|
851
|
-
/**
|
|
852
|
-
* Reserved operation names from base reducer (core/actions.ts).
|
|
853
|
-
* These names cannot be used for custom operations.
|
|
854
|
-
*/
|
|
855
|
-
declare const RESERVED_OPERATION_NAMES: readonly ["UNDO", "REDO", "SET_NAME", "SET_PREFERRED_EDITOR", "NOOP"];
|
|
856
|
-
type ReservedOperationName = (typeof RESERVED_OPERATION_NAMES)[number];
|
|
857
|
-
/**
|
|
858
|
-
* Operation names become the literal action `type` string at runtime and the
|
|
859
|
-
* key for codegen's action union. They must be SCREAMING_SNAKE_CASE so the
|
|
860
|
-
* generated TypeScript is valid.
|
|
861
|
-
*/
|
|
862
|
-
declare const OPERATION_NAME_PATTERN: RegExp;
|
|
863
|
-
declare function isValidOperationNameFormat(name: string): boolean;
|
|
864
|
-
/**
|
|
865
|
-
* Check if name conflicts with base reducer actions (case-insensitive).
|
|
866
|
-
*/
|
|
867
|
-
declare function isReservedOperationName(name: string): boolean;
|
|
868
|
-
/**
|
|
869
|
-
* Get all operation names from all modules in the latest specification.
|
|
870
|
-
* Returns names in uppercase for case-insensitive comparison.
|
|
871
|
-
*/
|
|
872
|
-
declare function getAllOperationNames(state: DocumentModelGlobalState, excludeOperationId?: string): string[];
|
|
873
|
-
/**
|
|
874
|
-
* Validate operation name is not reserved or duplicate. Throws on failure.
|
|
875
|
-
*
|
|
876
|
-
* @param name - The operation name to validate
|
|
877
|
-
* @param state - The document model global state
|
|
878
|
-
* @param excludeOperationId - Optional operation ID to exclude (for rename validation)
|
|
879
|
-
* @throws Error if the name is reserved or a duplicate
|
|
880
|
-
*/
|
|
881
|
-
declare function validateOperationName(name: string, state: DocumentModelGlobalState, excludeOperationId?: string): void;
|
|
882
|
-
declare function validateInitialState(initialState: string, allowEmptyState?: boolean): ValidationError[];
|
|
883
|
-
declare function validateStateSchemaName(schema: string, documentName: string, scope?: string, allowEmptySchema?: boolean): ValidationError[];
|
|
884
|
-
declare function validateModules(modules: ModuleSpecification[]): ValidationError[];
|
|
885
|
-
declare function validateModule(mod: ModuleSpecification): ValidationError[];
|
|
886
|
-
declare function validateModuleOperation(operation: OperationSpecification): ValidationError[];
|
|
887
|
-
/**
|
|
888
|
-
* Find a module in the latest specification by id, or throw. Reducers that
|
|
889
|
-
* mutate-by-id should call this up front so an unknown id fails loudly
|
|
890
|
-
* instead of silently no-opping.
|
|
891
|
-
*/
|
|
892
|
-
declare function findModuleOrThrow(state: DocumentModelGlobalState, moduleId: string): ModuleSpecification;
|
|
893
|
-
/**
|
|
894
|
-
* Find an operation in the latest specification by id, or throw. Same
|
|
895
|
-
* rationale as findModuleOrThrow — reducers that target an operation must
|
|
896
|
-
* fail loudly when the operation doesn't exist.
|
|
897
|
-
*/
|
|
898
|
-
declare function findOperationOrThrow(state: DocumentModelGlobalState, operationId: string): OperationSpecification;
|
|
899
|
-
/**
|
|
900
|
-
* Find an operation error by id across all operations in the latest
|
|
901
|
-
* specification, or throw. Throws on a duplicate id too: setters act on a
|
|
902
|
-
* single error, so an ambiguous id must fail loudly rather than mutate an
|
|
903
|
-
* arbitrary match.
|
|
904
|
-
*/
|
|
905
|
-
declare function findOperationErrorOrThrow(state: DocumentModelGlobalState, errorId: string): OperationErrorSpecification;
|
|
906
|
-
/**
|
|
907
|
-
* Find an operation example (code example) by id across all operations in the
|
|
908
|
-
* latest specification, or throw. Throws on a duplicate id for the same reason
|
|
909
|
-
* as findOperationErrorOrThrow.
|
|
910
|
-
*/
|
|
911
|
-
declare function findOperationExampleOrThrow(state: DocumentModelGlobalState, exampleId: string): CodeExample;
|
|
912
|
-
/**
|
|
913
|
-
* Assert no module in the latest specification already uses `id`. Modules are
|
|
914
|
-
* targeted by id by the setter/delete/reorder reducers, so a duplicate id makes
|
|
915
|
-
* those operations ambiguous.
|
|
916
|
-
*/
|
|
917
|
-
declare function assertModuleIdUnique(state: DocumentModelGlobalState, id: string): void;
|
|
918
|
-
/**
|
|
919
|
-
* Assert no operation in the latest specification already uses `id`. Operations
|
|
920
|
-
* are targeted by id across all modules, so the id must be unique document-wide.
|
|
921
|
-
*/
|
|
922
|
-
declare function assertOperationIdUnique(state: DocumentModelGlobalState, id: string): void;
|
|
923
|
-
/**
|
|
924
|
-
* Assert no operation error in the latest specification already uses `id`.
|
|
925
|
-
* Error ids are targeted document-wide by the setter/delete reducers, so the id
|
|
926
|
-
* must be unique to keep those operations unambiguous.
|
|
927
|
-
*/
|
|
928
|
-
declare function assertOperationErrorIdUnique(state: DocumentModelGlobalState, id: string): void;
|
|
929
|
-
/**
|
|
930
|
-
* Assert no operation example in the latest specification already uses `id`.
|
|
931
|
-
* Example ids are targeted document-wide by the update/delete reducers, so the
|
|
932
|
-
* id must be unique to keep those operations unambiguous.
|
|
933
|
-
*/
|
|
934
|
-
declare function assertOperationExampleIdUnique(state: DocumentModelGlobalState, id: string): void;
|
|
935
|
-
declare function validateOperations(operations: DocumentOperations): ValidationError[];
|
|
936
|
-
//#endregion
|
|
937
|
-
export { peerSupports as $, MAX_SUPPORTED_AUTH_VERSION as $n, AUTH_DENIED_BY_GRANT_REASON as $t, documentModelVersioningReducer as A, MAX_CONDITION_NODES as An, AuthAlreadyInitializedError as At, PeerCapability as B, referencedGroupIds as Bn, UnsupportedDocumentModelVersionError as Bt, documentModelModuleReducer as C, AuthAdministrationMissingError as Cn, removeGrant as Cr, readFileBrowser as Ct, documentModelReducer as D, MAX_AUTH_GRANTS as Dn, TransportActionContext as Dr, VersionedReplayConfig as Dt, documentModelOperationReducer as E, InvalidGrantError as En, TransportAction as Er, VersionedReducers as Et, updateDocument as F, evaluateCondition as Fn, GrantNotFoundError as Ft, coversLocal as G, AuthRefusal as Gn, BaseDocumentStateSchema as Gt, PeerManifest as H, AuthAction as Hn, groupDocumentType as Ht, FeatureCapability as I, evaluateGrantStack as In, HashMismatchError as It, legacySupports as J, AuthVerb as Jn, DocumentModelSchema as Jt, holdReason as K, AuthRequest as Kn, DocumentModelHeaderSchema as Kt, HoldReason as L, evaluateGrants as Ln, InvalidActionInputError as Lt, createReducer as M, assertValidGrant as Mn, AuthPolicyNotPreservedError as Mt, processUndoRedo as N, assertValidGrantUpsert as Nn, DowngradeNotSupportedError as Nt, documentModelStateReducer as O, MAX_CAPABILITY_OPERATIONS as On, TransportSigner as Or, replayDocumentVersioned as Ot, replayOperations as P, assertValidInitialGrants as Pn, FileSystemError as Pt, mergePeerCapabilities as Q, InitializeAuthActionInputSchema as Qn, isDocumentModelState as Qt, PEER_CAPABILITIES as R, grantProblem as Rn, InvalidActionInputZodError as Rt, documentModelHeaderReducer as S, AuthAdministrationLockoutError as Sn, moveGrant as Sr, parseBulkArchive as St, documentModelOperationExampleReducer as T, GroupPrincipalNotAllowedError as Tn, setGrant as Tr, zipEntries as Tt, ProtocolCapability as U, AuthDecision as Un, groupMembershipActionTypes as Ut, PeerCapabilityFlags as V, AUTH_ACTION_TYPES as Vn, documentModelDocumentType as Vt, Supports as W, AuthEvaluation as Wn, BaseDocumentHeaderSchema as Wt, localSupports as X, InitializeAuthAction as Xn, assertIsDocumentModelState as Xt, localPeerManifest as Y, ConditionContext as Yn, assertIsDocumentModelDocument as Yt, manifestRevision as Z, InitializeAuthActionInput as Zn, isDocumentModelDocument as Zt, validateModuleOperation as _, HASH_ENCODING_HEX as _n, evaluate as _r, documentModelLoadFromInput as _t, assertOperationErrorIdUnique as a, base58Decode as an, RemoveGrantActionInputSchema as ar, createSignedHeaderForSigner as at, validateOperations as b, documentModelInitialGlobalState as bn, isDocumentCreator as br, getFileBrowser as bt, findModuleOrThrow as c, buildOperationSignatureParams as cn, SetGrantActionInputSchema as cr, sign as ct, findOperationOrThrow as d, hashBrowser as dn, applyMoveGrantAction as dr, BulkArchiveEntry as dt, AUTH_NO_GRANT_REASON as en, MoveGrantAction as er, readPeerManifest as et, getAllOperationNames as f, hex2ab as fn, applyRemoveGrantAction as fr, baseLoadFromInput as ft, validateModule as g, HASH_ENCODING_BASE64 as gn, decide as gr, createZip as gt, validateInitialState as h, HASH_ALGORITHM_SHA512 as hn, assertAuthScopeActionAllowed as hr, createMinimalZip as ht, assertModuleIdUnique as i, ab2hex as in, RemoveGrantActionInput as ir, createSignedHeader as it, baseReducer as j, assertAuthAdministrationRetained as jn, AuthInitializerNotCreatorError as jt, documentModelStateSchemaReducer as k, MAX_CONDITION_DEPTH as kn, toTransportAction as kr, AuthActionNotAllowedError as kt, findOperationErrorOrThrow as l, bytesToBase64Url as ln, applyAuthAction as lr, validateHeader as lt, isValidOperationNameFormat as m, HASH_ALGORITHM_SHA256 as mn, assertAuthPreservedOnDuplicate as mr, baseSaveToFileHandle as mt, RESERVED_OPERATION_NAMES as n, DOCUMENT_DELETED_REASON as nn, MoveGrantActionInputSchema as nr, createCopyHeader as nt, assertOperationExampleIdUnique as o, base64UrlToBytes as on, SetGrantAction as or, createVerificationSigner as ot, isReservedOperationName as p, HASH_ALGORITHM_SHA1 as pn, applySetGrantAction as pr, baseLoadFromInputVersioned as pt, isOlderManifest as q, AuthSubject as qn, DocumentModelPHStateSchema as qt, ReservedOperationName as r, isDenied as rn, RemoveGrantAction as rr, createPresignedHeader as rt, assertOperationIdUnique as s, buildOperationSignatureMessage as sn, SetGrantActionInput as sr, hasDerivedDocumentId as st, OPERATION_NAME_PATTERN as t, AUTH_VERSION_UNSUPPORTED_REASON as tn, MoveGrantActionInput as tr, selectProtocolVersions as tt, findOperationExampleOrThrow as u, getUnixTimestamp as un, applyInitializeAuthAction as ur, verify as ut, validateModules as v, documentModelFileExtension as vn, initializeAuth as vr, documentModelSaveToFileHandle as vt, documentModelOperationErrorReducer as w, GrantSchema as wn, resolveSnapshotAuth as wr, writeFileBrowser as wt, validateStateSchemaName as x, documentModelInitialLocalState as xn, mentionedGroupIds as xr, isDocumentZip as xt, validateOperationName as y, documentModelGlobalState as yn, isAuthAction as yr, fetchFileBrowser as yt, PEER_MANIFEST_FORMAT as z, isPlainValue as zn, InvalidAuthVersionError as zt };
|
|
938
|
-
export {};
|
|
939
|
-
//# sourceMappingURL=index-D6833Siv.d.ts.map
|