@powerhousedao/reactor-api 6.2.3-dev.4 → 6.2.3-dev.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +7 -2
  2. package/dist/{adapter-gateway-apollo-CxJNBVyD.mjs → adapter-gateway-apollo-B54G_cXT.mjs} +15 -13
  3. package/dist/{adapter-gateway-apollo-CxJNBVyD.mjs.map → adapter-gateway-apollo-B54G_cXT.mjs.map} +1 -1
  4. package/dist/{adapter-gateway-apollo-DowrX6E_.mjs → adapter-gateway-apollo-D2DNlPY0.mjs} +3 -3
  5. package/dist/{adapter-gateway-mercurius-CZVy88Za.mjs → adapter-gateway-mercurius-rbKlwF9m.mjs} +4 -4
  6. package/dist/{adapter-gateway-mercurius-CZVy88Za.mjs.map → adapter-gateway-mercurius-rbKlwF9m.mjs.map} +1 -1
  7. package/dist/{adapter-gateway-stitching-CaZjvRzx.mjs → adapter-gateway-stitching-Dzv10u8D.mjs} +15 -10
  8. package/dist/{adapter-gateway-stitching-CaZjvRzx.mjs.map → adapter-gateway-stitching-Dzv10u8D.mjs.map} +1 -1
  9. package/dist/{adapter-http-express-B39rPhqH.mjs → adapter-http-express-CWqziB1p.mjs} +7 -7
  10. package/dist/adapter-http-express-CWqziB1p.mjs.map +1 -0
  11. package/dist/{adapter-http-fastify-BwXO6rqE.mjs → adapter-http-fastify-CYZQ6FFv.mjs} +10 -9
  12. package/dist/adapter-http-fastify-CYZQ6FFv.mjs.map +1 -0
  13. package/dist/index.d.mts +1315 -602
  14. package/dist/index.d.mts.map +1 -1
  15. package/dist/index.mjs +2309 -517
  16. package/dist/index.mjs.map +1 -1
  17. package/dist/{utils-XWVecaNn.mjs → pieces-DRY6haAO.mjs} +177 -9
  18. package/dist/pieces-DRY6haAO.mjs.map +1 -0
  19. package/dist/rolldown-runtime-8H4AJuhK.mjs +16 -0
  20. package/dist/run-node-handler-CQjyjOuN.mjs +52 -0
  21. package/dist/run-node-handler-CQjyjOuN.mjs.map +1 -0
  22. package/dist/src/packages/https-hooks.d.mts +4 -4
  23. package/dist/src/packages/https-hooks.d.mts.map +1 -1
  24. package/dist/src/packages/https-hooks.mjs +2 -2
  25. package/dist/src/packages/https-hooks.mjs.map +1 -1
  26. package/dist/src/packages/vite-loader.d.mts +19 -9
  27. package/dist/src/packages/vite-loader.d.mts.map +1 -1
  28. package/dist/src/packages/vite-loader.mjs +114 -46
  29. package/dist/src/packages/vite-loader.mjs.map +1 -1
  30. package/dist/{types-DcYyNcHJ.d.mts → types-DlTiz6AA.d.mts} +27 -4
  31. package/dist/types-DlTiz6AA.d.mts.map +1 -0
  32. package/dist/{websocket-DncAB9XK.mjs → websocket-_SH5aBcy.mjs} +3 -3
  33. package/dist/{websocket-DncAB9XK.mjs.map → websocket-_SH5aBcy.mjs.map} +1 -1
  34. package/package.json +19 -18
  35. package/dist/adapter-http-express-B39rPhqH.mjs.map +0 -1
  36. package/dist/adapter-http-fastify-BwXO6rqE.mjs.map +0 -1
  37. package/dist/path-normalize-BOQwY9wR.mjs +0 -23
  38. package/dist/path-normalize-BOQwY9wR.mjs.map +0 -1
  39. package/dist/types-DcYyNcHJ.d.mts.map +0 -1
  40. package/dist/utils-XWVecaNn.mjs.map +0 -1
package/dist/index.d.mts CHANGED
@@ -1,15 +1,14 @@
1
- import { i as IPackageManagerOptions, n as IPackageLoaderOptions, r as IPackageManager, s as PackageManagerResult, t as IPackageLoader } from "./types-DcYyNcHJ.mjs";
1
+ import { a as IPackagePieceSource, c as PackageManagerResult, i as IPackageManagerOptions, l as PackagePiece, n as IPackageLoaderOptions, r as IPackageManager, t as IPackageLoader, u as PackagePieceEntry } from "./types-DlTiz6AA.mjs";
2
2
  import { IAnalyticsStore } from "@powerhousedao/analytics-engine-core";
3
3
  import { AnalyticsModel } from "@powerhousedao/analytics-engine-graphql";
4
- import * as graphql from "graphql";
5
- import { DocumentNode, GraphQLResolveInfo, GraphQLScalarType, GraphQLScalarTypeConfig, GraphQLSchema } from "graphql";
6
- import { AttachmentRef, IDocumentModelLoader, IDocumentModelRegistry, IDriveClient, IReactorClient, IReactorProcessorHostModuleBase, IRelationalDb, ISyncManager, InProcessReactorClientModule, ParsedDriveUrl, ProcessorFactoryBuilder as ProcessorFactoryBuilder$1, SyncScopeGate, driveIdFromUrl, parseDriveUrl } from "@powerhousedao/reactor";
4
+ import { DocumentNode, GraphQLError, GraphQLResolveInfo, GraphQLScalarType, GraphQLScalarTypeConfig, GraphQLSchema } from "graphql";
5
+ import { AttachmentRef, DocumentModelSource, IDocumentModelLoader, IDocumentModelRegistry, IDriveClient, IReactorClient, IReactorProcessorHostModuleBase, IRelationalDb, ISyncManager, InProcessReactorClientModule, ParsedDriveUrl, ProcessorFactoryBuilder as ProcessorFactoryBuilder$1, SyncScopeGate, driveIdFromUrl, parseDriveUrl } from "@powerhousedao/reactor";
6
+ import { AuthSubject, DocumentModelGlobalState as DocumentModelGlobalState$1, DocumentModelModule, Operation, PHDocument, UpgradeManifest } from "@powerhousedao/shared/document-model";
7
7
  import { ILogger } from "document-model";
8
8
  import { GraphQLResolverMap, GraphQLSchemaModule } from "@apollo/subgraph";
9
- import { AuthSubject, DocumentModelGlobalState as DocumentModelGlobalState$1, DocumentModelModule, Operation, PHDocument, UpgradeManifest } from "@powerhousedao/shared/document-model";
10
9
  import * as z$1 from "zod";
11
10
  import { DocumentDriveDocument, DocumentDriveGlobalState } from "@powerhousedao/shared/document-drive";
12
- import { AttachmentBuildResult, AttachmentReferenceIndexBuildResult, IAttachmentReferenceReader, IAttachmentReferenceWriter } from "@powerhousedao/reactor-attachments";
11
+ import { AttachmentBuildResult, AttachmentDownloadOptions, AttachmentDownloadTarget, AttachmentDownloadTargetOptions, AttachmentHeader, AttachmentReferenceIndexBuildResult, AttachmentResponse, AttachmentStatOptions, IAttachmentReferenceReader, IAttachmentReferenceWriter, IAttachmentService, IAttachmentUpload, ReserveAttachmentOptions } from "@powerhousedao/reactor-attachments";
13
12
  import { IAttachmentClient } from "@powerhousedao/reactor-attachments/client";
14
13
  import { WebSocketServer } from "ws";
15
14
  import { AuthorizerResult, IHttpScope, IRelationalDb as IRelationalDb$1, IWebhookEndpoints, IWebhookScope, NodeRouteSpec, ProcessorApp, ProcessorFactory, RouteActor, RouteAuth, RouteAuthorizer, RouteBody, RouteContext, RouteHandler, RouteMethod, RouteOptions, RouteSpec, RouteTransport, RouteUser, RouteUser as RouteUser$1, ScopedRouteHandle, WebhookEndpointInfo, WebhookField, WebhookHashAlgorithm, WebhookPolicy, WebhookReply, WebhookRequest, WebhookScheme, WebhookSignatureEncoding, WebhookSpec, WebhookVerification } from "@powerhousedao/shared/processors";
@@ -22,7 +21,6 @@ import { Context as Context$1, GqlDocument as GqlDocument$1, GqlDriveDocument as
22
21
  import { IncomingHttpHeaders } from "http";
23
22
  import { Pool } from "pg";
24
23
  import { PHReactorRenown } from "@powerhousedao/shared/clis";
25
-
26
24
  //#region src/utils/db.d.ts
27
25
  /**
28
26
  * Permission levels for documents:
@@ -30,23 +28,23 @@ import { PHReactorRenown } from "@powerhousedao/shared/clis";
30
28
  * - WRITE: Can push updates and modify the document
31
29
  * - ADMIN: Can manage document permissions and settings
32
30
  */
33
- type DocumentPermissionLevel = "READ" | "WRITE" | "ADMIN";
31
+ export type DocumentPermissionLevel = "READ" | "WRITE" | "ADMIN";
34
32
  /**
35
33
  * Database schema for document permissions
36
34
  */
37
- interface DocumentProtectionTable {
35
+ export interface DocumentProtectionTable {
38
36
  documentId: string;
39
37
  protected: boolean;
40
38
  ownerAddress: string | null;
41
39
  createdAt: Date;
42
40
  updatedAt: Date;
43
41
  }
44
- interface DocumentPermissionDatabase {
42
+ export interface DocumentPermissionDatabase {
45
43
  DocumentPermission: DocumentPermissionTable;
46
44
  OperationUserPermission: OperationUserPermissionTable;
47
45
  DocumentProtection: DocumentProtectionTable;
48
46
  }
49
- interface DocumentPermissionTable {
47
+ export interface DocumentPermissionTable {
50
48
  id: Generated<number>;
51
49
  documentId: string;
52
50
  userAddress: string;
@@ -55,7 +53,7 @@ interface DocumentPermissionTable {
55
53
  createdAt: Date;
56
54
  updatedAt: Date;
57
55
  }
58
- interface OperationUserPermissionTable {
56
+ export interface OperationUserPermissionTable {
59
57
  id: Generated<number>;
60
58
  documentId: string;
61
59
  operationType: string;
@@ -64,7 +62,7 @@ interface OperationUserPermissionTable {
64
62
  createdAt: Date;
65
63
  }
66
64
  type Db = Kysely<any>;
67
- declare const PGLITE_UTC_PARSERS: {
65
+ export declare const PGLITE_UTC_PARSERS: {
68
66
  readonly 1114: (value: string) => Date;
69
67
  };
70
68
  /**
@@ -73,17 +71,17 @@ declare const PGLITE_UTC_PARSERS: {
73
71
  * data dir was created with an older PG major. Wire-compatible with the
74
72
  * current PGLite class for the surface knex-pglite uses.
75
73
  */
76
- type PgliteFactory = (connectionString: string | undefined) => PGlite;
77
- interface DbClient {
74
+ export type PgliteFactory = (connectionString: string | undefined) => PGlite;
75
+ export interface DbClient {
78
76
  db: Db;
79
77
  knex: Knex;
80
78
  pglite: PGlite | undefined;
81
79
  }
82
- declare function getDbClient(connectionString?: string | undefined, pgliteFactory?: PgliteFactory): DbClient;
83
- declare const initAnalyticsStoreSql: string[];
80
+ export declare function getDbClient(connectionString?: string | undefined, pgliteFactory?: PgliteFactory): DbClient;
81
+ export declare const initAnalyticsStoreSql: string[];
84
82
  //#endregion
85
83
  //#region src/services/document-permission.service.d.ts
86
- interface DocumentPermissionEntry {
84
+ export interface DocumentPermissionEntry {
87
85
  documentId: string;
88
86
  userAddress: string;
89
87
  permission: DocumentPermissionLevel;
@@ -91,7 +89,7 @@ interface DocumentPermissionEntry {
91
89
  createdAt: Date;
92
90
  updatedAt: Date;
93
91
  }
94
- interface OperationUserPermissionEntry {
92
+ export interface OperationUserPermissionEntry {
95
93
  documentId: string;
96
94
  operationType: string;
97
95
  userAddress: string;
@@ -102,11 +100,11 @@ interface OperationUserPermissionEntry {
102
100
  * Function type for getting parent document IDs
103
101
  * This is injected to avoid circular dependencies with the reactor client
104
102
  */
105
- type GetParentIdsFn = (documentId: string) => Promise<string[]>;
103
+ export type GetParentIdsFn = (documentId: string) => Promise<string[]>;
106
104
  /**
107
105
  * Configuration for the DocumentPermissionService
108
106
  */
109
- interface DocumentPermissionConfig {
107
+ export interface DocumentPermissionConfig {
110
108
  defaultProtection: boolean;
111
109
  }
112
110
  /**
@@ -120,7 +118,7 @@ interface DocumentPermissionConfig {
120
118
  * Operation permissions:
121
119
  * - Users can be granted permission to execute specific operations
122
120
  */
123
- declare class DocumentPermissionService {
121
+ export declare class DocumentPermissionService {
124
122
  private readonly db;
125
123
  readonly config: DocumentPermissionConfig;
126
124
  constructor(db: Kysely<DocumentPermissionDatabase>, config?: DocumentPermissionConfig);
@@ -148,7 +146,18 @@ declare class DocumentPermissionService {
148
146
  /**
149
147
  * Delete all permissions for a document (used when deleting a document)
150
148
  */
151
- deleteAllDocumentPermissions(documentId: string): Promise<void>;
149
+ deleteAllDocumentPermissions(documentId: string): Promise<{
150
+ DocumentPermission: number;
151
+ OperationUserPermission: number;
152
+ }>;
153
+ /** Delete a document's protection row, which names its owner. */
154
+ deleteDocumentProtection(documentId: string): Promise<number>;
155
+ /** Every row that names the address, for a subject access request. */
156
+ rowsForAddress(address: string): Promise<{
157
+ permissions: DocumentPermissionEntry[];
158
+ operationPermissions: OperationUserPermissionEntry[];
159
+ ownedDocumentIds: string[];
160
+ }>;
152
161
  /**
153
162
  * Grant a user permission to execute an operation on a document
154
163
  */
@@ -230,7 +239,7 @@ type CanonicalDocumentId = string & {
230
239
  * always safe for the data fetch: the canonical id when resolved, or the raw
231
240
  * identifier when the check was skipped for a policy-wide caller.
232
241
  */
233
- declare class AuthorizedDocumentHandle {
242
+ export declare class AuthorizedDocumentHandle {
234
243
  readonly fetchIdentifier: string;
235
244
  readonly isResolved: boolean;
236
245
  private constructor();
@@ -239,12 +248,12 @@ declare class AuthorizedDocumentHandle {
239
248
  /** The verified canonical id; throws when resolution was skipped. */
240
249
  canonicalId(): CanonicalDocumentId;
241
250
  }
242
- declare const AuthorizationPolicy: {
251
+ export declare const AuthorizationPolicy: {
243
252
  readonly OPEN: "OPEN";
244
253
  readonly ADMIN_ONLY: "ADMIN_ONLY";
245
254
  readonly DOCUMENT_PERMISSIONS: "DOCUMENT_PERMISSIONS";
246
255
  };
247
- type AuthorizationPolicy = (typeof AuthorizationPolicy)[keyof typeof AuthorizationPolicy];
256
+ export type AuthorizationPolicy = (typeof AuthorizationPolicy)[keyof typeof AuthorizationPolicy];
248
257
  interface AuthorizationConfig {
249
258
  admins: string[];
250
259
  defaultProtection: boolean;
@@ -288,32 +297,32 @@ interface IAuthorizationService {
288
297
  }
289
298
  //#endregion
290
299
  //#region src/graphql/gateway/types.d.ts
291
- type TlsOptions = {
300
+ export type TlsOptions = {
292
301
  keyPath: string;
293
302
  certPath: string;
294
303
  } | {
295
304
  cert: Buffer | string;
296
305
  key: Buffer | string;
297
306
  } | true;
298
- type GatewayContextFactory<TContext = unknown> = (request: Request) => Promise<TContext>;
307
+ export type GatewayContextFactory<TContext = unknown> = (request: Request) => Promise<TContext>;
299
308
  /** Under graphql-ws this is `ctx.extra`, created once per socket. */
300
- type WsConnection = object;
301
- type WsContextFactory<TContext = unknown> = (connectionParams: Record<string, unknown>, connection: WsConnection) => Promise<TContext>;
302
- type WsConnectHandler = (connectionParams: Record<string, unknown>, connection: WsConnection) => Promise<boolean>;
303
- type WsHandlers<TContext = unknown> = {
309
+ export type WsConnection = object;
310
+ export type WsContextFactory<TContext = unknown> = (connectionParams: Record<string, unknown>, connection: WsConnection) => Promise<TContext>;
311
+ export type WsConnectHandler = (connectionParams: Record<string, unknown>, connection: WsConnection) => Promise<boolean>;
312
+ export type WsHandlers<TContext = unknown> = {
304
313
  onConnect: WsConnectHandler;
305
314
  context: WsContextFactory<TContext>;
306
315
  };
307
316
  /** No authenticated caller resolved, and REQUIRE_AUTHENTICATED_CALLER wants one. */
308
- declare const WS_CLOSE_REASON_AUTHENTICATION_REQUIRED = "authentication-required";
317
+ export declare const WS_CLOSE_REASON_AUTHENTICATION_REQUIRED = "authentication-required";
309
318
  /** A bearer was sent and could not be verified. */
310
- declare const WS_CLOSE_REASON_BEARER_REJECTED = "bearer-rejected";
319
+ export declare const WS_CLOSE_REASON_BEARER_REJECTED = "bearer-rejected";
311
320
  /** Every reason a refusal closes with, for a client matching on the set. */
312
- declare const WS_AUTH_CLOSE_REASONS: readonly ["authentication-required", "bearer-rejected"];
313
- type WsDisposer = {
321
+ export declare const WS_AUTH_CLOSE_REASONS: readonly ["authentication-required", "bearer-rejected"];
322
+ export type WsDisposer = {
314
323
  dispose: () => void | Promise<void>;
315
324
  };
316
- type FetchHandler = (request: Request) => Promise<Response>;
325
+ export type FetchHandler = (request: Request) => Promise<Response>;
317
326
  /**
318
327
  * Handle to a route registered directly on the adapter. Packages hot-reload,
319
328
  * so every registration is reversible; disposing a route that is already gone
@@ -329,7 +338,7 @@ type FetchHandler = (request: Request) => Promise<Response>;
329
338
  * which also carries the public URL the route answers on — at this layer there
330
339
  * is no namespace to build one from and no knowledge of the host's origin.
331
340
  */
332
- interface AdapterRouteHandle {
341
+ export interface AdapterRouteHandle {
333
342
  dispose(): void;
334
343
  }
335
344
  /**
@@ -338,7 +347,7 @@ interface AdapterRouteHandle {
338
347
  * federation adapters treat it as a service to call over HTTP, while the
339
348
  * stitching adapter merges its typeDefs and resolvers in-process.
340
349
  */
341
- type SubgraphDefinition = {
350
+ export type SubgraphDefinition = {
342
351
  name: string;
343
352
  typeDefs: DocumentNode;
344
353
  url: string;
@@ -351,7 +360,7 @@ type SubgraphDefinition = {
351
360
  */
352
361
  resolvers?: Record<string, unknown>;
353
362
  };
354
- interface IGatewayAdapter<TContext = unknown> {
363
+ export interface IGatewayAdapter<TContext = unknown> {
355
364
  /** One-time startup. */
356
365
  start(httpServer: http.Server): Promise<void>;
357
366
  /**
@@ -381,8 +390,8 @@ interface IGatewayAdapter<TContext = unknown> {
381
390
  * Methods a node route may bind. OPTIONS is excluded: the framework's CORS
382
391
  * plugin owns preflight, and a duplicate registration conflicts at startup.
383
392
  */
384
- type HttpMethod = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT";
385
- interface NodeRouteOptions {
393
+ export type HttpMethod = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT";
394
+ export interface NodeRouteOptions {
386
395
  /** Serve sub-paths too, not just an exact path match. */
387
396
  prefix?: boolean;
388
397
  /**
@@ -398,7 +407,7 @@ interface NodeRouteOptions {
398
407
  */
399
408
  rawBody?: boolean;
400
409
  }
401
- interface IHttpAdapter {
410
+ export interface IHttpAdapter {
402
411
  /** Set up CORS and body-parser equivalent middleware. */
403
412
  setupMiddleware(config: {
404
413
  corsOptions?: CorsOptions;
@@ -413,7 +422,8 @@ interface IHttpAdapter {
413
422
  * replaces the previous one (last write wins).
414
423
  */
415
424
  mount(path: string, handler: FetchHandler, options?: {
416
- prefix?: boolean; /** @deprecated Misleading name: this always meant *prefix*, not exact. */
425
+ prefix?: boolean;
426
+ /** @deprecated Misleading name: this always meant *prefix*, not exact. */
417
427
  exact?: boolean;
418
428
  }): AdapterRouteHandle;
419
429
  /**
@@ -423,9 +433,10 @@ interface IHttpAdapter {
423
433
  getRoute(path: string, handler: (request: Request) => Response | Promise<Response>): AdapterRouteHandle;
424
434
  /**
425
435
  * Start listening on the given port. Returns the underlying http.Server
426
- * so callers can attach WebSocket servers.
436
+ * so callers can attach WebSocket servers. Without `host` it binds the
437
+ * wildcard address.
427
438
  */
428
- listen(port: number, tls?: TlsOptions): Promise<http.Server>;
439
+ listen(port: number, tls?: TlsOptions, host?: string): Promise<http.Server>;
429
440
  /**
430
441
  * Mount a raw Connect/Express-compatible middleware function (e.g. Vite dev
431
442
  * server middleware). The implementation is adapter-specific; for Express this
@@ -454,12 +465,12 @@ interface IHttpAdapter {
454
465
  }
455
466
  //#endregion
456
467
  //#region src/services/auth.service.d.ts
457
- type CredentialVerifier = (params: {
468
+ export type CredentialVerifier = (params: {
458
469
  address: string;
459
470
  chainId: number;
460
471
  appId: string;
461
472
  }) => Promise<boolean>;
462
- interface AuthConfig {
473
+ export interface AuthConfig {
463
474
  /**
464
475
  * Whether the authorization policy enforces anything: it selects `ADMIN_ONLY`
465
476
  * over `OPEN`, and it is what `AuthContext.auth_enabled` reports to callers
@@ -492,13 +503,13 @@ interface AuthConfig {
492
503
  * `@powerhousedao/shared/processors` as `RouteUser`, so a route handler and a
493
504
  * resolver agree on it without either package redeclaring it.
494
505
  */
495
- type User = RouteUser$1;
496
- interface AuthContext {
506
+ export type User = RouteUser$1;
507
+ export interface AuthContext {
497
508
  user?: User;
498
509
  admins: string[];
499
510
  auth_enabled: boolean;
500
511
  }
501
- declare class AuthService {
512
+ export declare class AuthService {
502
513
  private readonly config;
503
514
  private readonly credentialCache;
504
515
  constructor(config: AuthConfig);
@@ -577,9 +588,9 @@ interface IWebhookStore {
577
588
  seen(token: string, key: string, ttlSeconds: number): Promise<boolean>;
578
589
  }
579
590
  /** Opaque and unguessable: the URL is a bearer capability held by a third party. */
580
- declare function newWebhookToken(): string;
591
+ export declare function newWebhookToken(): string;
581
592
  /** Relational implementation, over the reactor's own database. */
582
- declare class RelationalWebhookStore implements IWebhookStore {
593
+ export declare class RelationalWebhookStore implements IWebhookStore {
583
594
  #private;
584
595
  private readonly relationalDb;
585
596
  constructor(relationalDb: IRelationalDb$1);
@@ -591,7 +602,7 @@ declare class RelationalWebhookStore implements IWebhookStore {
591
602
  seen(token: string, key: string, ttlSeconds: number): Promise<boolean>;
592
603
  }
593
604
  /** In-memory store, for hosts with no relational database and for tests. */
594
- declare class MemoryWebhookStore implements IWebhookStore {
605
+ export declare class MemoryWebhookStore implements IWebhookStore {
595
606
  #private;
596
607
  init(): Promise<void>;
597
608
  ensure(namespace: string, endpoint: string, ownerKey: string): Promise<WebhookEndpointRow>;
@@ -603,7 +614,7 @@ declare class MemoryWebhookStore implements IWebhookStore {
603
614
  //#endregion
604
615
  //#region src/http/webhook-service.d.ts
605
616
  /** The flat, token-addressed path family. */
606
- declare const WEBHOOK_SEGMENT = "webhooks";
617
+ export declare const WEBHOOK_SEGMENT = "webhooks";
607
618
  interface WebhookServiceOptions {
608
619
  store: IWebhookStore;
609
620
  basePath?: string;
@@ -612,13 +623,9 @@ interface WebhookServiceOptions {
612
623
  }
613
624
  /** One host route for `/webhooks/:token`, dispatching by token. The flat path leaks
614
625
  * neither package nor document; the namespace lives in the token record, which is also what stops one package's token reaching another's handler. */
615
- declare class WebhookService {
626
+ export declare class WebhookService {
616
627
  #private;
617
- constructor({
618
- store,
619
- basePath,
620
- publicUrl
621
- }: WebhookServiceOptions);
628
+ constructor({ store, basePath, publicUrl }: WebhookServiceOptions);
622
629
  /** The scope the endpoint family serves from, handed over once the route service exists;
623
630
  * separate from the constructor only because that service takes this one as an option. */
624
631
  attach(scope: IHttpScope): void;
@@ -637,9 +644,9 @@ declare class WebhookService {
637
644
  //#endregion
638
645
  //#region src/http/route-service.d.ts
639
646
  /** The segment package routes live under, inside the host's base path. */
640
- declare const PACKAGE_ROUTE_SEGMENT = "api";
647
+ export declare const PACKAGE_ROUTE_SEGMENT = "api";
641
648
  /** The namespace core's own subgraphs and services register under. */
642
- declare const CORE_PACKAGE_NAME = "@powerhousedao/reactor-api";
649
+ export declare const CORE_PACKAGE_NAME = "@powerhousedao/reactor-api";
643
650
  interface HttpRouteServiceOptions {
644
651
  httpAdapter: IHttpAdapter;
645
652
  /** Absent on a host with no webhook store; `scope.webhooks` then refuses. */
@@ -656,16 +663,9 @@ interface HttpRouteServiceOptions {
656
663
  }
657
664
  /** Owns the URL space packages serve from, handing each a scope bound to its own namespace. The prefix nests inside
658
665
  * the host's base path (`<basePath>/api`), so core collisions are prevented by URL shape, not a reserved-name list. */
659
- declare class HttpRouteService {
666
+ export declare class HttpRouteService {
660
667
  #private;
661
- constructor({
662
- httpAdapter,
663
- basePath,
664
- authService,
665
- webhooks,
666
- publicUrl,
667
- trustProxy
668
- }: HttpRouteServiceOptions);
668
+ constructor({ httpAdapter, basePath, authService, webhooks, publicUrl, trustProxy }: HttpRouteServiceOptions);
669
669
  /** The absolute path packages are mounted under. */
670
670
  get prefix(): string;
671
671
  /** The scope for a package; idempotent per name, so a reload cannot accumulate namespaces. Throws when two packages
@@ -683,18 +683,18 @@ declare class HttpRouteService {
683
683
  }
684
684
  //#endregion
685
685
  //#region src/http/namespace.d.ts
686
- declare class InvalidNamespaceError extends Error {}
686
+ export declare class InvalidNamespaceError extends Error {}
687
687
  /**
688
688
  * Turns a package name into the path segments it occupies.
689
689
  * `@powerhousedao/workflow` → ["@powerhousedao", "workflow"]
690
690
  * `document-model` → ["document-model"]
691
691
  */
692
- declare function namespaceSegments(packageName: string): string[];
692
+ export declare function namespaceSegments(packageName: string): string[];
693
693
  /**
694
694
  * The path a package's routes hang off, relative to the package prefix.
695
695
  * Scoped names occupy two segments — the addressing unpkg and jsdelivr use.
696
696
  */
697
- declare function namespacePath(packageName: string): string;
697
+ export declare function namespacePath(packageName: string): string;
698
698
  /**
699
699
  * Resolves the npm name a package is routed under from the key the package
700
700
  * manager holds it by. That key is the specifier as configured, which is not
@@ -707,7 +707,7 @@ declare function namespacePath(packageName: string): string;
707
707
  * Deriving a URL segment straight from the key would give a developer's home
708
708
  * directory a route namespace, so the path form is resolved rather than slugged.
709
709
  */
710
- declare function resolvePackageName(key: string, readPackageJsonName?: (dir: string) => string | undefined): string;
710
+ export declare function resolvePackageName(key: string, readPackageJsonName?: (dir: string) => string | undefined): string;
711
711
  /**
712
712
  * A mount path the host named for one of its own route groups.
713
713
  *
@@ -722,7 +722,7 @@ declare function resolvePackageName(key: string, readPackageJsonName?: (dir: str
722
722
  * routes unpredictable relative to each other. Returns the normalized path,
723
723
  * with a leading and no trailing slash.
724
724
  */
725
- declare function assertHostMountPath(path: string): string;
725
+ export declare function assertHostMountPath(path: string): string;
726
726
  //#endregion
727
727
  //#region src/http/webhook-verify.d.ts
728
728
  type VerifyResult = {
@@ -733,20 +733,206 @@ type VerifyResult = {
733
733
  };
734
734
  /** Verifies a delivery against the configured scheme; `raw` must be the exact bytes
735
735
  * received. The reason is for the log only: callers answer a fixed 401, so a probing sender learns nothing from the body. */
736
- declare function verifyWebhook(options: {
736
+ export declare function verifyWebhook(options: {
737
737
  verification: WebhookVerification;
738
738
  headers: Record<string, string>;
739
739
  raw: Buffer;
740
740
  now?: Date;
741
741
  }): VerifyResult;
742
- declare function redactHeaders(headers: Record<string, string>, extra?: string): Record<string, string>;
742
+ export declare function redactHeaders(headers: Record<string, string>, extra?: string): Record<string, string>;
743
743
  /** JSON and form bodies become objects; anything else stays decoded text, so a verified
744
744
  * XML or CSV payload is still reachable downstream. */
745
- declare function parseWebhookBody(raw: Buffer, contentType?: string): unknown;
745
+ export declare function parseWebhookBody(raw: Buffer, contentType?: string): unknown;
746
+ //#endregion
747
+ //#region src/services/canonical-document-id.d.ts
748
+ /**
749
+ * Raised when a caller-supplied identifier cannot be resolved to a canonical
750
+ * document id. Carries no detail on purpose: resolution failures must not act
751
+ * as a document-existence oracle, so consumers map this to their generic
752
+ * fail-closed response.
753
+ */
754
+ export declare class CanonicalDocumentIdResolutionError extends Error {
755
+ constructor();
756
+ }
757
+ export type CanonicalDocumentIdResolver = (identifier: string) => Promise<CanonicalDocumentId>;
758
+ /**
759
+ * The sanctioned string-to-CanonicalDocumentId cast: both the GraphQL layer
760
+ * and server routes must resolve caller identifiers through this helper so
761
+ * decision and data layers always agree on the subject document.
762
+ */
763
+ export declare function createCanonicalDocumentIdResolver(client: Pick<IReactorClient, "resolveIdOrSlug">): CanonicalDocumentIdResolver;
764
+ //#endregion
765
+ //#region src/services/attachment-access.service.d.ts
766
+ /**
767
+ * Whether the active Reactor composition hosts the attachment-reference
768
+ * projection. Reported by the client initializer: the built-in stack always
769
+ * registers it, while a caller-provided Reactor may lack the live
770
+ * registration capability. Consumers of reference evidence must fail closed
771
+ * when it is unavailable.
772
+ */
773
+ export type AttachmentReferenceProjectionCapability = {
774
+ status: "available";
775
+ } | {
776
+ status: "unavailable";
777
+ reason: "live-read-model-registration-unsupported" | "in-process-reactor-module-unavailable" | "initializer-did-not-report";
778
+ };
779
+ /**
780
+ * Outcome of an attachment read authorization. `denied` intentionally covers
781
+ * both an unreadable document and an absent document/ref relationship so the
782
+ * route layer cannot leak which check failed. `projection-unavailable` means
783
+ * the reference index is not being maintained in this composition; it is
784
+ * returned before any document-authorization or reference lookup runs.
785
+ */
786
+ export type AttachmentAccessResult = {
787
+ kind: "allowed";
788
+ documentId: CanonicalDocumentId;
789
+ ref: AttachmentRef;
790
+ } | {
791
+ kind: "denied";
792
+ } | {
793
+ kind: "projection-unavailable";
794
+ };
795
+ export interface AttachmentAccessRequest {
796
+ documentId: string;
797
+ attachmentRef: string;
798
+ userAddress?: string;
799
+ /**
800
+ * The `did:key` of the app instance whose token authenticated the caller.
801
+ * A policy subject is an address AND a key — a grant can name either, and a
802
+ * document's creator is recorded by key — so a decision made from the address
803
+ * alone answers a narrower question than the one being asked.
804
+ */
805
+ appKey?: string;
806
+ }
807
+ /** The reactor's read gate, as the attachment facade consults it. */
808
+ export type AttachmentReadGate = Pick<IReactorClient, "isServed" | "get">;
809
+ /**
810
+ * Which scopes of a document a subject may read, asked by document id.
811
+ *
812
+ * Structural on purpose: the composition that has a policy model to enforce
813
+ * supplies `SyncScopeGate`, and one that does not supplies nothing at all.
814
+ */
815
+ export interface IDocumentScopeGate {
816
+ scopePredicateById(documentId: string, subject: {
817
+ address?: string;
818
+ key?: string;
819
+ }, branch: string, signal?: AbortSignal): Promise<(scope: string) => boolean>;
820
+ }
821
+ export type AttachmentCallerResult = {
822
+ kind: "admitted";
823
+ } | {
824
+ kind: "unauthenticated";
825
+ };
826
+ export interface AttachmentCallerRequest {
827
+ intent: "read" | "write";
828
+ userAddress?: string;
829
+ appKey?: string;
830
+ }
831
+ export interface IAttachmentAccessService {
832
+ canReadAttachment(request: AttachmentAccessRequest): Promise<AttachmentAccessResult>;
833
+ /** Whether this caller may use attachments at all, before any document decides. */
834
+ admitCaller(request: AttachmentCallerRequest): Promise<AttachmentCallerResult>;
835
+ }
836
+ export interface AttachmentAccessServiceOptions {
837
+ /** Refuse writes from a caller with no address. Default `true`. */
838
+ refuseAnonymousWrites?: boolean;
839
+ /** Refuse reads from a caller with no address. Default `false`. */
840
+ refuseAnonymousReads?: boolean;
841
+ }
842
+ /**
843
+ * Composes document authorization with the projected document/ref
844
+ * relationship. Order is fixed: validate ref, resolve the canonical document
845
+ * id, decide the read, check the reactor's read gate serves the document, then
846
+ * check the reference index and that the subject may read a scope whose
847
+ * operations reference the attachment. A denied document never reaches the
848
+ * reference reader, and the facade never touches attachment metadata, storage
849
+ * backends, or presigners.
850
+ *
851
+ * The named document decides alone: an attachment several documents reference
852
+ * is readable through each of them on that document's own terms.
853
+ *
854
+ * The read is decided by the document's own policy when this composition has a
855
+ * model to enforce it with, and by the host's permission tables when it does
856
+ * not. That is not a preference between two equivalent answers: a host running
857
+ * document policies keeps no rows in the permission tables, so asking them
858
+ * about such a document returns whatever the host-wide policy says — under
859
+ * `OPEN`, `true`, for everyone. Serving bytes on that answer hands the file to
860
+ * anyone who learns its hash, which the document's own state may well have told
861
+ * them. Both are kept because they are the two halves of one rule: an
862
+ * attachment is readable by whoever may read the document that references it,
863
+ * and each composition can only express that in its own terms. The caller
864
+ * decision mirrors the routes' `requireAuth`.
865
+ */
866
+ export declare class AttachmentAccessService implements IAttachmentAccessService {
867
+ private readonly resolveCanonicalId;
868
+ private readonly authorization;
869
+ private readonly references;
870
+ private readonly projection;
871
+ private readonly readGate;
872
+ /**
873
+ * Absent below auth enforcement, where there is no policy model to
874
+ * evaluate; the host's permission tables decide alone, exactly as before.
875
+ */
876
+ private readonly scopeGate?;
877
+ private readonly options;
878
+ constructor(resolveCanonicalId: CanonicalDocumentIdResolver, authorization: IAuthorizationService, references: IAttachmentReferenceReader, projection: AttachmentReferenceProjectionCapability, readGate: AttachmentReadGate,
879
+ /**
880
+ * Absent below auth enforcement, where there is no policy model to
881
+ * evaluate; the host's permission tables decide alone, exactly as before.
882
+ */
883
+ scopeGate?: IDocumentScopeGate | undefined, options?: AttachmentAccessServiceOptions);
884
+ admitCaller(request: AttachmentCallerRequest): Promise<AttachmentCallerResult>;
885
+ canReadAttachment(request: AttachmentAccessRequest): Promise<AttachmentAccessResult>;
886
+ /**
887
+ * Whether the caller may read the state the reference lives in.
888
+ *
889
+ * A failure here is rethrown rather than turned into a denial. A read side
890
+ * that is down must not read as a policy: a denial nobody can distinguish
891
+ * from a refusal is one nobody investigates, and the route answers 500 for a
892
+ * reason.
893
+ */
894
+ private canReadDocument;
895
+ }
896
+ //#endregion
897
+ //#region src/services/authorized-attachment.service.d.ts
898
+ /** The reference index is not maintained in this composition. */
899
+ export declare class AttachmentAccessUnavailable extends Error {
900
+ constructor();
901
+ }
902
+ /** The access decision itself failed; the cause is logged, not surfaced. */
903
+ export declare class AttachmentAccessFailed extends Error {
904
+ constructor(cause: unknown);
905
+ }
906
+ /** An `IAttachmentService` whose reads and writes are decided for one subject. */
907
+ export declare class AuthorizedAttachmentService implements IAttachmentService {
908
+ private readonly inner;
909
+ private readonly access;
910
+ private readonly subject;
911
+ private readonly logger;
912
+ constructor(inner: IAttachmentService, access: IAttachmentAccessService, subject: AuthSubject, logger: ILogger);
913
+ /** Hash-first only: an upload-first handle can send after it expires. */
914
+ reserve(options: ReserveAttachmentOptions): Promise<IAttachmentUpload>;
915
+ stat(ref: AttachmentRef, options?: AttachmentStatOptions): Promise<AttachmentHeader>;
916
+ get(ref: AttachmentRef, options?: AbortSignal | AttachmentDownloadOptions): Promise<AttachmentResponse>;
917
+ getDownloadTarget(ref: AttachmentRef, options: AttachmentDownloadTargetOptions): Promise<AttachmentDownloadTarget>;
918
+ private decideRead;
919
+ private admit;
920
+ private accessFailed;
921
+ }
922
+ export interface IAttachmentClientProvider {
923
+ forSubject(subject: AuthSubject): IAttachmentClient;
924
+ }
925
+ export declare class AttachmentClientProvider implements IAttachmentClientProvider {
926
+ private readonly service;
927
+ private readonly access;
928
+ private readonly logger;
929
+ constructor(service: IAttachmentService, access: IAttachmentAccessService, logger: ILogger);
930
+ forSubject(subject: AuthSubject): IAttachmentClient;
931
+ }
746
932
  //#endregion
747
933
  //#region src/graphql/types.d.ts
748
- type SubgraphClass = typeof BaseSubgraph;
749
- type Context = {
934
+ export type SubgraphClass = typeof BaseSubgraph;
935
+ export type Context = {
750
936
  driveId?: string;
751
937
  document?: PHDocument;
752
938
  headers: IncomingHttpHeaders;
@@ -754,11 +940,12 @@ type Context = {
754
940
  user?: {
755
941
  address: string;
756
942
  chainId: number;
757
- networkId: string; /** The did:key of the app instance that issued this request's token. */
943
+ networkId: string;
944
+ /** The did:key of the app instance that issued this request's token. */
758
945
  appKey: string;
759
946
  };
760
947
  };
761
- type ISubgraph = {
948
+ export type ISubgraph = {
762
949
  name: string;
763
950
  /**
764
951
  * @deprecated The GraphQL manager mounts every subgraph under its own base
@@ -776,7 +963,7 @@ type ISubgraph = {
776
963
  onSetup?: () => Promise<void>;
777
964
  onDisconnect?: () => Promise<void>;
778
965
  };
779
- type SubgraphArgs = {
966
+ export type SubgraphArgs = {
780
967
  reactorClient: IReactorClient;
781
968
  /**
782
969
  * The subgraph's package's slice of the HTTP surface, for serving REST
@@ -796,6 +983,11 @@ type SubgraphArgs = {
796
983
  * to the host's permission tables alone.
797
984
  */
798
985
  syncServingGate?: SyncScopeGate;
986
+ /**
987
+ * Attachments as the request's caller may use them. Bind per request with
988
+ * `BaseSubgraph.attachmentsFor(ctx)`.
989
+ */
990
+ attachments?: IAttachmentClientProvider;
799
991
  /**
800
992
  * The host's base path, injected by the GraphQL manager when it constructs
801
993
  * a subgraph. Subgraph code may read it, but routing ignores it: every
@@ -803,7 +995,7 @@ type SubgraphArgs = {
803
995
  */
804
996
  path?: string;
805
997
  };
806
- type GqlSigner = {
998
+ export type GqlSigner = {
807
999
  user: {
808
1000
  address: string;
809
1001
  networkId: string;
@@ -815,19 +1007,19 @@ type GqlSigner = {
815
1007
  };
816
1008
  signatures: string[];
817
1009
  };
818
- type GqlOperationContext = {
1010
+ export type GqlOperationContext = {
819
1011
  signer: GqlSigner | undefined;
820
1012
  };
821
- type GqlSignerUser = {
1013
+ export type GqlSignerUser = {
822
1014
  address: string;
823
1015
  networkId: string;
824
1016
  chainId: number;
825
1017
  };
826
- type GqlSignerApp = {
1018
+ export type GqlSignerApp = {
827
1019
  name: string;
828
1020
  key: string;
829
1021
  };
830
- type GqlOperation = {
1022
+ export type GqlOperation = {
831
1023
  id: string;
832
1024
  type: string;
833
1025
  index: number;
@@ -838,7 +1030,7 @@ type GqlOperation = {
838
1030
  error: string | undefined;
839
1031
  context: GqlOperationContext;
840
1032
  };
841
- type GqlDocument = {
1033
+ export type GqlDocument = {
842
1034
  __typename?: string;
843
1035
  id: string;
844
1036
  name: string;
@@ -851,7 +1043,7 @@ type GqlDocument = {
851
1043
  state: unknown;
852
1044
  initialState: unknown;
853
1045
  };
854
- type GqlDriveDocument = GqlDocument & {
1046
+ export type GqlDriveDocument = GqlDocument & {
855
1047
  meta: {
856
1048
  preferredEditor?: string;
857
1049
  };
@@ -861,7 +1053,12 @@ type GqlDriveDocument = GqlDocument & {
861
1053
  };
862
1054
  //#endregion
863
1055
  //#region src/graphql/base-subgraph.d.ts
864
- declare class BaseSubgraph implements ISubgraph$1 {
1056
+ /**
1057
+ * The subject a request reads as: its address and the app key its token
1058
+ * carries. Anonymous is an empty subject, never the host's signer.
1059
+ */
1060
+ export declare function callerSubject(user: Context["user"]): AuthSubject;
1061
+ export declare class BaseSubgraph implements ISubgraph$1 {
865
1062
  #private;
866
1063
  name: string;
867
1064
  path: string;
@@ -877,6 +1074,12 @@ declare class BaseSubgraph implements ISubgraph$1 {
877
1074
  authorizationService: IAuthorizationService;
878
1075
  syncServingGate?: SyncScopeGate;
879
1076
  constructor(args: SubgraphArgs$1);
1077
+ /**
1078
+ * An attachment client bound to this request's caller, memoized per request.
1079
+ *
1080
+ * @throws Error when the host provides no attachment client to subgraphs.
1081
+ */
1082
+ attachmentsFor(ctx: Context): IAttachmentClient;
880
1083
  onSetup(): Promise<void>;
881
1084
  onDisconnect(): Promise<void>;
882
1085
  /**
@@ -913,6 +1116,8 @@ declare class BaseSubgraph implements ISubgraph$1 {
913
1116
  * carries the same key. Anonymous callers supply neither.
914
1117
  */
915
1118
  protected viewSubject(ctx: Context): AuthSubject;
1119
+ /** Whether a listing would serve the document to the caller; fails closed. */
1120
+ protected servesDocument(documentId: string, ctx: Context): Promise<boolean>;
916
1121
  /**
917
1122
  * Asserts read access, resolving a slug first. Returns a handle whose
918
1123
  * `fetchIdentifier` the caller reuses for the data fetch; a denial throws.
@@ -931,16 +1136,24 @@ declare class BaseSubgraph implements ISubgraph$1 {
931
1136
  }
932
1137
  //#endregion
933
1138
  //#region src/graphql/analytics-subgraph.d.ts
934
- declare class AnalyticsSubgraph extends BaseSubgraph {
1139
+ export declare class AnalyticsSubgraph extends BaseSubgraph {
1140
+ #private;
935
1141
  analyticsStore: IAnalyticsStore;
936
1142
  analyticsModel: AnalyticsModel;
937
1143
  name: string;
938
- typeDefs: graphql.DocumentNode;
1144
+ typeDefs: import("graphql").DocumentNode;
1145
+ /**
1146
+ * Every analytics field hangs off `Query.analytics`, so gating it gates them
1147
+ * all. Series are aggregates a processor built from many documents and carry
1148
+ * no document to decide on, so only a caller with policy-wide read (anyone
1149
+ * under OPEN, an admin otherwise) may read them.
1150
+ */
939
1151
  resolvers: GraphQLResolverMap<Context$1>;
940
1152
  constructor(args: SubgraphArgs$1);
941
1153
  }
942
- //#endregion
943
- //#region src/graphql/auth/resolvers.d.ts
1154
+ declare namespace resolvers_d_exports {
1155
+ export { DocumentAccessInfo, DocumentProtectionInfo, OperationPermissionsInfo, OperationUserPermission, canExecuteOperation, documentAccess, documentProtection, grantDocumentPermission, grantOperationPermission, operationPermissions, revokeDocumentPermission, revokeOperationPermission, setDocumentProtection, transferDocumentOwnership, userDocumentPermissions };
1156
+ }
944
1157
  type DocumentAccessInfo = {
945
1158
  documentId: string;
946
1159
  permissions: Array<{
@@ -952,6 +1165,33 @@ type DocumentAccessInfo = {
952
1165
  updatedAt: Date;
953
1166
  }>;
954
1167
  };
1168
+ declare function documentAccess(service: DocumentPermissionService, authorizationService: IAuthorizationService, args: {
1169
+ documentId: CanonicalDocumentId;
1170
+ }, userAddress: string | undefined): Promise<DocumentAccessInfo>;
1171
+ declare function userDocumentPermissions(service: DocumentPermissionService, userAddress: string): Promise<Array<{
1172
+ documentId: string;
1173
+ userAddress: string;
1174
+ permission: DocumentPermissionLevel;
1175
+ grantedBy: string;
1176
+ createdAt: Date;
1177
+ updatedAt: Date;
1178
+ }>>;
1179
+ declare function grantDocumentPermission(service: DocumentPermissionService, authorizationService: IAuthorizationService, args: {
1180
+ documentId: CanonicalDocumentId;
1181
+ userAddress: string;
1182
+ permission: DocumentPermissionLevel;
1183
+ }, grantedByAddress: string | undefined): Promise<{
1184
+ documentId: string;
1185
+ userAddress: string;
1186
+ permission: DocumentPermissionLevel;
1187
+ grantedBy: string;
1188
+ createdAt: Date;
1189
+ updatedAt: Date;
1190
+ }>;
1191
+ declare function revokeDocumentPermission(service: DocumentPermissionService, authorizationService: IAuthorizationService, args: {
1192
+ documentId: CanonicalDocumentId;
1193
+ userAddress: string;
1194
+ }, revokedByAddress: string | undefined): Promise<boolean>;
955
1195
  type OperationUserPermission = {
956
1196
  documentId: string;
957
1197
  operationType: string;
@@ -964,13 +1204,46 @@ type OperationPermissionsInfo = {
964
1204
  operationType: string;
965
1205
  userPermissions: OperationUserPermission[];
966
1206
  };
1207
+ declare function operationPermissions(service: DocumentPermissionService, authorizationService: IAuthorizationService, args: {
1208
+ documentId: CanonicalDocumentId;
1209
+ operationType: string;
1210
+ }, userAddress: string | undefined): Promise<OperationPermissionsInfo>;
1211
+ declare function canExecuteOperation(authorizationService: IAuthorizationService, args: {
1212
+ documentId: CanonicalDocumentId;
1213
+ operationType: string;
1214
+ }, userAddress: string | undefined): Promise<boolean>;
1215
+ declare function grantOperationPermission(service: DocumentPermissionService, authorizationService: IAuthorizationService, args: {
1216
+ documentId: CanonicalDocumentId;
1217
+ operationType: string;
1218
+ userAddress: string;
1219
+ }, grantedByAddress: string | undefined): Promise<OperationUserPermission>;
1220
+ declare function revokeOperationPermission(service: DocumentPermissionService, authorizationService: IAuthorizationService, args: {
1221
+ documentId: CanonicalDocumentId;
1222
+ operationType: string;
1223
+ userAddress: string;
1224
+ }, revokedByAddress: string | undefined): Promise<boolean>;
967
1225
  type DocumentProtectionInfo = {
968
1226
  documentId: string;
969
1227
  protected: boolean;
970
1228
  ownerAddress: string | null;
971
1229
  };
1230
+ declare function documentProtection(service: DocumentPermissionService, authorizationService: IAuthorizationService, args: {
1231
+ documentId: CanonicalDocumentId;
1232
+ }, userAddress: string | undefined): Promise<DocumentProtectionInfo>;
1233
+ declare function setDocumentProtection(service: DocumentPermissionService, authorizationService: IAuthorizationService, args: {
1234
+ documentId: CanonicalDocumentId;
1235
+ protected: boolean;
1236
+ }, userAddress: string | undefined): Promise<DocumentProtectionInfo>;
1237
+ declare function transferDocumentOwnership(service: DocumentPermissionService, authorizationService: IAuthorizationService, args: {
1238
+ documentId: CanonicalDocumentId;
1239
+ newOwnerAddress: string;
1240
+ }, userAddress: string | undefined): Promise<DocumentProtectionInfo>;
972
1241
  //#endregion
973
1242
  //#region src/graphql/auth/subgraph.d.ts
1243
+ type DocumentArgs = {
1244
+ documentIdOrSlug?: string | null;
1245
+ documentId?: string | null;
1246
+ };
974
1247
  /**
975
1248
  * Auth Subgraph - handles all document permission and authorization operations
976
1249
  *
@@ -980,17 +1253,16 @@ type DocumentProtectionInfo = {
980
1253
  * - Document protection and ownership
981
1254
  * - Operation-level permissions (fine-grained operation control)
982
1255
  */
983
- declare class AuthSubgraph extends BaseSubgraph {
1256
+ export declare class AuthSubgraph extends BaseSubgraph {
1257
+ #private;
984
1258
  private logger;
985
1259
  constructor(args: SubgraphArgs);
986
1260
  name: string;
987
1261
  hasSubscriptions: boolean;
988
- typeDefs: graphql.DocumentNode;
1262
+ typeDefs: import("graphql").DocumentNode;
989
1263
  resolvers: {
990
1264
  Query: {
991
- documentAccess: (_parent: unknown, args: {
992
- documentId: string;
993
- }, ctx: {
1265
+ documentAccess: (_parent: unknown, args: DocumentArgs, ctx: {
994
1266
  user?: {
995
1267
  address: string;
996
1268
  };
@@ -1007,49 +1279,42 @@ declare class AuthSubgraph extends BaseSubgraph {
1007
1279
  createdAt: Date;
1008
1280
  updatedAt: Date;
1009
1281
  }[]>;
1010
- operationPermissions: (_parent: unknown, args: {
1011
- documentId: string;
1282
+ operationPermissions: (_parent: unknown, args: DocumentArgs & {
1012
1283
  operationType: string;
1013
1284
  }, ctx: {
1014
1285
  user?: {
1015
1286
  address: string;
1016
1287
  };
1017
1288
  }) => Promise<OperationPermissionsInfo>;
1018
- canExecuteOperation: (_parent: unknown, args: {
1019
- documentId: string;
1289
+ canExecuteOperation: (_parent: unknown, args: DocumentArgs & {
1020
1290
  operationType: string;
1021
1291
  }, ctx: {
1022
1292
  user?: {
1023
1293
  address: string;
1024
1294
  };
1025
1295
  }) => Promise<boolean>;
1026
- documentProtection: (_parent: unknown, args: {
1027
- documentId: string;
1028
- }, ctx: {
1296
+ documentProtection: (_parent: unknown, args: DocumentArgs, ctx: {
1029
1297
  user?: {
1030
1298
  address: string;
1031
1299
  };
1032
1300
  }) => Promise<DocumentProtectionInfo>;
1033
1301
  };
1034
1302
  Mutation: {
1035
- setDocumentProtection: (_parent: unknown, args: {
1036
- documentId: string;
1303
+ setDocumentProtection: (_parent: unknown, args: DocumentArgs & {
1037
1304
  protected: boolean;
1038
1305
  }, ctx: {
1039
1306
  user?: {
1040
1307
  address: string;
1041
1308
  };
1042
1309
  }) => Promise<DocumentProtectionInfo>;
1043
- transferDocumentOwnership: (_parent: unknown, args: {
1044
- documentId: string;
1310
+ transferDocumentOwnership: (_parent: unknown, args: DocumentArgs & {
1045
1311
  newOwnerAddress: string;
1046
1312
  }, ctx: {
1047
1313
  user?: {
1048
1314
  address: string;
1049
1315
  };
1050
1316
  }) => Promise<DocumentProtectionInfo>;
1051
- grantDocumentPermission: (_parent: unknown, args: {
1052
- documentId: string;
1317
+ grantDocumentPermission: (_parent: unknown, args: DocumentArgs & {
1053
1318
  userAddress: string;
1054
1319
  permission: string;
1055
1320
  }, ctx: {
@@ -1064,16 +1329,14 @@ declare class AuthSubgraph extends BaseSubgraph {
1064
1329
  createdAt: Date;
1065
1330
  updatedAt: Date;
1066
1331
  }>;
1067
- revokeDocumentPermission: (_parent: unknown, args: {
1068
- documentId: string;
1332
+ revokeDocumentPermission: (_parent: unknown, args: DocumentArgs & {
1069
1333
  userAddress: string;
1070
1334
  }, ctx: {
1071
1335
  user?: {
1072
1336
  address: string;
1073
1337
  };
1074
1338
  }) => Promise<boolean>;
1075
- grantOperationPermission: (_parent: unknown, args: {
1076
- documentId: string;
1339
+ grantOperationPermission: (_parent: unknown, args: DocumentArgs & {
1077
1340
  operationType: string;
1078
1341
  userAddress: string;
1079
1342
  }, ctx: {
@@ -1081,8 +1344,7 @@ declare class AuthSubgraph extends BaseSubgraph {
1081
1344
  address: string;
1082
1345
  };
1083
1346
  }) => Promise<OperationUserPermission>;
1084
- revokeOperationPermission: (_parent: unknown, args: {
1085
- documentId: string;
1347
+ revokeOperationPermission: (_parent: unknown, args: DocumentArgs & {
1086
1348
  operationType: string;
1087
1349
  userAddress: string;
1088
1350
  }, ctx: {
@@ -1096,19 +1358,19 @@ declare class AuthSubgraph extends BaseSubgraph {
1096
1358
  }
1097
1359
  //#endregion
1098
1360
  //#region src/graphql/gateway/auth-middleware.d.ts
1099
- type AuthFetchMiddleware = (handler: FetchHandler) => FetchHandler;
1361
+ export type AuthFetchMiddleware = (handler: FetchHandler) => FetchHandler;
1100
1362
  /** Internal — only `graphql-manager.ts` should call this. */
1101
- declare function getAuthContext(request: globalThis.Request): AuthContext | undefined;
1102
- declare function createAuthFetchMiddleware(authService: AuthService): AuthFetchMiddleware;
1363
+ export declare function getAuthContext(request: globalThis.Request): AuthContext | undefined;
1364
+ export declare function createAuthFetchMiddleware(authService: AuthService): AuthFetchMiddleware;
1103
1365
  //#endregion
1104
1366
  //#region src/graphql/gateway/factory.d.ts
1105
- type GatewayAdapterType = "apollo" | "mercurius" | "stitching";
1106
- type HttpAdapterType = "express" | "fastify";
1107
- declare function createGatewayAdapter(type: GatewayAdapterType, logger: ILogger): Promise<IGatewayAdapter<Context>>;
1108
- type HttpAdapterSetup = {
1367
+ export type GatewayAdapterType = "apollo" | "mercurius" | "stitching";
1368
+ export type HttpAdapterType = "express" | "fastify";
1369
+ export declare function createGatewayAdapter(type: GatewayAdapterType, logger: ILogger): Promise<IGatewayAdapter<Context>>;
1370
+ export type HttpAdapterSetup = {
1109
1371
  adapter: IHttpAdapter;
1110
1372
  };
1111
- declare function createHttpAdapter(type: HttpAdapterType): Promise<HttpAdapterSetup>;
1373
+ export declare function createHttpAdapter(type: HttpAdapterType): Promise<HttpAdapterSetup>;
1112
1374
  //#endregion
1113
1375
  //#region src/graphql/gateway/drive-ownership-cache.d.ts
1114
1376
  /**
@@ -1136,33 +1398,43 @@ declare class DriveOwnershipCache {
1136
1398
  type RequireAuthFetchMiddleware = (handler: FetchHandler) => FetchHandler;
1137
1399
  //#endregion
1138
1400
  //#region src/graphql/graphql-manager.d.ts
1139
- type GraphqlManagerFeatureFlags = {
1401
+ export type GraphqlManagerFeatureFlags = {
1140
1402
  enableDocumentModelSubgraphs?: boolean;
1141
1403
  };
1142
- declare function createWsAuthHandlers(opts: {
1143
- authService?: AuthService; /** Whether anonymous callers are refused; read at call time, not at build time. */
1404
+ /** Dependencies and settings for a {@link GraphQLManager}. */
1405
+ export type GraphQLManagerOptions = {
1406
+ path: string;
1407
+ httpServer: http.Server;
1408
+ wsServer: WebSocketServer;
1409
+ reactorClient: IReactorClient;
1410
+ relationalDb: IRelationalDb;
1411
+ analyticsStore: IAnalyticsStore;
1412
+ syncManager: ISyncManager;
1413
+ logger: ILogger;
1414
+ httpAdapter: IHttpAdapter;
1415
+ gatewayAdapter: IGatewayAdapter<Context$1>;
1416
+ authService?: AuthService;
1417
+ documentPermissionService?: DocumentPermissionService;
1418
+ /** Defaults to every flag on. */
1419
+ featureFlags?: GraphqlManagerFeatureFlags;
1420
+ /** Defaults to 4001. */
1421
+ port?: number;
1422
+ authorizationService: IAuthorizationService;
1423
+ /** Resolvers dispatch to it for reactor-drive parents. */
1424
+ reactorDriveClient?: IDriveClient;
1425
+ syncServingGate?: SyncScopeGate;
1426
+ httpRoutes?: HttpRouteService;
1427
+ attachments?: IAttachmentClientProvider;
1428
+ };
1429
+ export declare function createWsAuthHandlers(opts: {
1430
+ authService?: AuthService;
1431
+ /** Whether anonymous callers are refused; read at call time, not at build time. */
1144
1432
  requireAuthenticatedCaller: () => boolean;
1145
1433
  logger: ILogger;
1146
1434
  buildContext: (connectionParams: Record<string, unknown>, user?: User) => Context$1;
1147
1435
  }): WsHandlers<Context$1>;
1148
- declare class GraphQLManager {
1436
+ export declare class GraphQLManager {
1149
1437
  #private;
1150
- private readonly path;
1151
- private readonly httpServer;
1152
- private readonly wsServer;
1153
- private readonly reactorClient;
1154
- private readonly relationalDb;
1155
- private readonly analyticsStore;
1156
- private readonly syncManager;
1157
- private readonly logger;
1158
- private readonly httpAdapter;
1159
- private readonly gatewayAdapter;
1160
- private readonly authService?;
1161
- private readonly documentPermissionService?;
1162
- private readonly featureFlags;
1163
- private readonly port;
1164
- private readonly syncServingGate?;
1165
- private readonly httpRoutes?;
1166
1438
  private initialized;
1167
1439
  private coreSubgraphsMap;
1168
1440
  private contextFields;
@@ -1174,8 +1446,8 @@ declare class GraphQLManager {
1174
1446
  private readonly subgraphHandlerCache;
1175
1447
  /** subgraphPath → the http adapter handle of its mounted route. */
1176
1448
  private readonly subgraphRouteHandles;
1177
- /** Handle of the currently mounted supergraph SSE route, if any. */
1178
- private sseRouteHandle;
1449
+ /** Mounted SSE routes, keyed by path: the supergraph's and each subgraph's. */
1450
+ private readonly sseRouteHandles;
1179
1451
  /**
1180
1452
  * Package name → the subgraph instances registered from it, keyed by
1181
1453
  * subgraph name. Tracks the package association so that removed packages
@@ -1189,7 +1461,24 @@ declare class GraphQLManager {
1189
1461
  */
1190
1462
  readonly reactorDriveClient?: IDriveClient;
1191
1463
  private readonly authorizationService;
1192
- constructor(path: string, httpServer: http.Server, wsServer: WebSocketServer, reactorClient: IReactorClient, relationalDb: IRelationalDb, analyticsStore: IAnalyticsStore, syncManager: ISyncManager, logger: ILogger, httpAdapter: IHttpAdapter, gatewayAdapter: IGatewayAdapter<Context$1>, authService?: AuthService | undefined, documentPermissionService?: DocumentPermissionService | undefined, featureFlags?: GraphqlManagerFeatureFlags, port?: number, authorizationService?: IAuthorizationService, reactorDriveClient?: IDriveClient, syncServingGate?: SyncScopeGate | undefined, httpRoutes?: HttpRouteService | undefined);
1464
+ private readonly path;
1465
+ private readonly httpServer;
1466
+ private readonly wsServer;
1467
+ private readonly reactorClient;
1468
+ private readonly relationalDb;
1469
+ private readonly analyticsStore;
1470
+ private readonly syncManager;
1471
+ private readonly logger;
1472
+ private readonly httpAdapter;
1473
+ private readonly gatewayAdapter;
1474
+ private readonly authService?;
1475
+ private readonly documentPermissionService?;
1476
+ private readonly featureFlags;
1477
+ private readonly port;
1478
+ private readonly syncServingGate?;
1479
+ private readonly httpRoutes?;
1480
+ private readonly attachments?;
1481
+ constructor(options: GraphQLManagerOptions);
1193
1482
  init(coreSubgraphs: SubgraphClass$1[], authMiddleware?: AuthFetchMiddleware, requireAuthMiddleware?: RequireAuthFetchMiddleware): Promise<void>;
1194
1483
  /**
1195
1484
  * Regenerate document model subgraphs when models are dynamically loaded.
@@ -1256,21 +1545,21 @@ declare class GraphQLManager {
1256
1545
  }
1257
1546
  //#endregion
1258
1547
  //#region src/services/package-storage.d.ts
1259
- interface InstalledPackageInfo {
1548
+ export interface InstalledPackageInfo {
1260
1549
  name: string;
1261
1550
  version?: string;
1262
1551
  registryUrl: string;
1263
1552
  installedAt: Date;
1264
1553
  documentTypes: string[];
1265
1554
  }
1266
- interface IPackageStorage {
1555
+ export interface IPackageStorage {
1267
1556
  get(name: string): Promise<InstalledPackageInfo | undefined>;
1268
1557
  getAll(): Promise<InstalledPackageInfo[]>;
1269
1558
  set(name: string, info: InstalledPackageInfo): Promise<void>;
1270
1559
  delete(name: string): Promise<boolean>;
1271
1560
  has(name: string): Promise<boolean>;
1272
1561
  }
1273
- declare class InMemoryPackageStorage implements IPackageStorage {
1562
+ export declare class InMemoryPackageStorage implements IPackageStorage {
1274
1563
  private packages;
1275
1564
  get(name: string): Promise<InstalledPackageInfo | undefined>;
1276
1565
  getAll(): Promise<InstalledPackageInfo[]>;
@@ -1279,101 +1568,48 @@ declare class InMemoryPackageStorage implements IPackageStorage {
1279
1568
  has(name: string): Promise<boolean>;
1280
1569
  }
1281
1570
  //#endregion
1282
- //#region src/services/canonical-document-id.d.ts
1283
- /**
1284
- * Raised when a caller-supplied identifier cannot be resolved to a canonical
1285
- * document id. Carries no detail on purpose: resolution failures must not act
1286
- * as a document-existence oracle, so consumers map this to their generic
1287
- * fail-closed response.
1288
- */
1289
- declare class CanonicalDocumentIdResolutionError extends Error {
1290
- constructor();
1291
- }
1292
- type CanonicalDocumentIdResolver = (identifier: string) => Promise<CanonicalDocumentId>;
1293
- /**
1294
- * The sanctioned string-to-CanonicalDocumentId cast: both the GraphQL layer
1295
- * and server routes must resolve caller identifiers through this helper so
1296
- * decision and data layers always agree on the subject document.
1297
- */
1298
- declare function createCanonicalDocumentIdResolver(client: Pick<IReactorClient, "resolveIdOrSlug">): CanonicalDocumentIdResolver;
1299
- //#endregion
1300
- //#region src/services/attachment-access.service.d.ts
1301
- /**
1302
- * Whether the active Reactor composition hosts the attachment-reference
1303
- * projection. Reported by the client initializer: the built-in stack always
1304
- * registers it, while a caller-provided Reactor may lack the live
1305
- * registration capability. Consumers of reference evidence must fail closed
1306
- * when it is unavailable.
1307
- */
1308
- type AttachmentReferenceProjectionCapability = {
1309
- status: "available";
1310
- } | {
1311
- status: "unavailable";
1312
- reason: "live-read-model-registration-unsupported" | "in-process-reactor-module-unavailable" | "initializer-did-not-report";
1313
- };
1314
- /**
1315
- * Outcome of an attachment read authorization. `denied` intentionally covers
1316
- * both an unreadable document and an absent document/ref relationship so the
1317
- * route layer cannot leak which check failed. `projection-unavailable` means
1318
- * the reference index is not being maintained in this composition; it is
1319
- * returned before any document-authorization or reference lookup runs.
1320
- */
1321
- type AttachmentAccessResult = {
1322
- kind: "allowed";
1323
- documentId: CanonicalDocumentId;
1324
- ref: AttachmentRef;
1325
- } | {
1326
- kind: "denied";
1327
- } | {
1328
- kind: "projection-unavailable";
1329
- };
1330
- interface AttachmentAccessRequest {
1331
- documentId: string;
1332
- attachmentRef: string;
1333
- userAddress?: string;
1334
- }
1335
- interface IAttachmentAccessService {
1336
- canReadAttachment(request: AttachmentAccessRequest): Promise<AttachmentAccessResult>;
1337
- }
1338
- /**
1339
- * Composes document authorization with the projected document/ref
1340
- * relationship. Order is fixed: validate ref, resolve the canonical document
1341
- * id, check `canRead`, then check the reference index. A denied document
1342
- * never reaches the reference reader, and the facade never touches
1343
- * attachment metadata, storage backends, or presigners.
1344
- */
1345
- declare class AttachmentAccessService implements IAttachmentAccessService {
1346
- private readonly resolveCanonicalId;
1347
- private readonly authorization;
1348
- private readonly references;
1349
- private readonly projection;
1350
- constructor(resolveCanonicalId: CanonicalDocumentIdResolver, authorization: IAuthorizationService, references: IAttachmentReferenceReader, projection: AttachmentReferenceProjectionCapability);
1351
- canReadAttachment(request: AttachmentAccessRequest): Promise<AttachmentAccessResult>;
1352
- }
1353
- //#endregion
1354
1571
  //#region src/types.d.ts
1355
1572
  /**
1356
1573
  * Module hosts pass to processor factories: the reactor-level module plus the
1357
1574
  * attachment client, which shared and reactor cannot name.
1358
1575
  */
1359
- interface IProcessorHostModule extends IReactorProcessorHostModuleBase {
1576
+ export interface IProcessorHostModule extends IReactorProcessorHostModuleBase {
1360
1577
  attachments: IAttachmentClient;
1361
1578
  }
1362
1579
  /** @deprecated Use `IProcessorHostModule`. */
1363
- type IReactorProcessorHostModule = IProcessorHostModule;
1364
- type ReadinessGate = {
1580
+ export type IReactorProcessorHostModule = IProcessorHostModule;
1581
+ export type ReadinessGate = {
1365
1582
  isReady: () => boolean;
1366
1583
  markReady: () => void;
1367
1584
  };
1368
- type API = {
1369
- httpAdapter: IHttpAdapter; /** Hands each package a namespaced slice of the HTTP surface. */
1585
+ export type API = {
1586
+ httpAdapter: IHttpAdapter;
1587
+ /** Hands each package a namespaced slice of the HTTP surface. */
1370
1588
  httpRoutes: HttpRouteService;
1371
1589
  graphqlManager: GraphQLManager$1;
1372
1590
  packages: IPackageManager;
1373
1591
  attachments: AttachmentBuildResult;
1374
- attachmentReferenceIndex: AttachmentReferenceIndexBuildResult; /** Document-authorized attachment read decisions; see AttachmentAccessService. */
1592
+ attachmentReferenceIndex: AttachmentReferenceIndexBuildResult;
1593
+ /** Document-authorized attachment read decisions; see AttachmentAccessService. */
1375
1594
  attachmentAccess: IAttachmentAccessService;
1595
+ /** Caller-bound attachment clients for subgraphs the host constructs itself. */
1596
+ attachmentClientProvider: IAttachmentClientProvider;
1376
1597
  authService: AuthService | undefined;
1598
+ /**
1599
+ * Whether this deployment refuses anonymous callers
1600
+ * (`REQUIRE_AUTHENTICATED_CALLER`). Carried here because routes mounted
1601
+ * straight on the HTTP adapter never pass the GraphQL fetch chain, so its
1602
+ * require-auth middleware cannot reach them: a host-composed route reads the
1603
+ * resolved value from the API rather than the environment, so one variable
1604
+ * cannot end up half applied.
1605
+ */
1606
+ requireAuthenticatedCaller: boolean;
1607
+ /** The service the subgraphs decide with, for a component the host composes
1608
+ * after boot: it must authorize with this one, not one of its own. */
1609
+ authorizationService: IAuthorizationService;
1610
+ /** The read-model relational store, for the same host-composed component:
1611
+ * its tables belong in this database and nothing else hands one over. */
1612
+ relationalDb: IRelationalDb$1;
1377
1613
  /**
1378
1614
  * Releases resources owned by the API: shuts down the GraphQL gateway,
1379
1615
  * closes WebSocket and HTTP servers, destroys knex pools, and closes any
@@ -1383,25 +1619,75 @@ type API = {
1383
1619
  */
1384
1620
  dispose: () => Promise<void>;
1385
1621
  };
1386
- type ReactorModule = {
1622
+ export type ReactorModule = {
1387
1623
  analyticsStore: IAnalyticsStore;
1388
1624
  relationalDb: IRelationalDb$1;
1389
1625
  };
1390
1626
  /** @deprecated Use `ProcessorFactory`. */
1391
- type ProcessorDriveFactory = ProcessorFactory;
1627
+ export type ProcessorDriveFactory = ProcessorFactory;
1392
1628
  /** Builds a per-drive factory from the host module (e.g. vetra `processorFactory`). */
1393
- type ProcessorFactoryBuilder = ProcessorFactoryBuilder$1<IProcessorHostModule>;
1629
+ export type ProcessorFactoryBuilder = ProcessorFactoryBuilder$1<IProcessorHostModule>;
1394
1630
  /** Multiple initializers per package name (e.g. Switchboard `processors` option). */
1395
- type Processor = ProcessorFactoryBuilder[];
1631
+ export type Processor = ProcessorFactoryBuilder[];
1632
+ //#endregion
1633
+ //#region src/packages/registry-cache.d.ts
1634
+ /** Entry files a registry package's node build is served from, CDN-relative. */
1635
+ declare const PACKAGE_ENTRIES: {
1636
+ readonly documentModels: "node/document-models/index.mjs";
1637
+ readonly subgraphs: "node/subgraphs/index.mjs";
1638
+ readonly processors: "node/processors/index.mjs";
1639
+ };
1640
+ type PackageEntryKind = keyof typeof PACKAGE_ENTRIES;
1641
+ type CachedRegistryPackage = {
1642
+ name: string;
1643
+ version: string;
1644
+ dir: string;
1645
+ /** Absolute entry files inside `dir`, for the entries the package serves. */
1646
+ entries: Partial<Record<PackageEntryKind, string>>;
1647
+ source: "cache" | "download";
1648
+ };
1649
+ type RegistryPackageCacheOptions = {
1650
+ registryUrl: string;
1651
+ cacheDir?: string;
1652
+ logger?: ILogger;
1653
+ fetchTimeoutMs?: number;
1654
+ };
1655
+ declare class RegistryPackageCache {
1656
+ readonly cacheDir: string;
1657
+ private readonly registryUrl;
1658
+ private readonly logger;
1659
+ private readonly fetchTimeoutMs;
1660
+ private readonly inFlight;
1661
+ private readonly verified;
1662
+ constructor(options: RegistryPackageCacheOptions);
1663
+ /** Base URL every file of `name@version` is fetched under. */
1664
+ baseUrl(name: string, version: string): string;
1665
+ entryDir(name: string, version: string): string;
1666
+ /** Complete cached versions of `name`, newest-agnostic. */
1667
+ cachedVersions(name: string): Promise<string[]>;
1668
+ ensurePackage(name: string, version: string): Promise<CachedRegistryPackage>;
1669
+ private resolveEntry;
1670
+ /** The manifest when every listed file is present and hashes to it. */
1671
+ private verify;
1672
+ private discard;
1673
+ private fill;
1674
+ private download;
1675
+ private dependenciesOf;
1676
+ private fetchBounded;
1677
+ private linkBareImports;
1678
+ }
1396
1679
  //#endregion
1397
1680
  //#region src/packages/http-loader.d.ts
1398
- interface HttpPackageLoaderOptions {
1681
+ export interface HttpPackageLoaderOptions {
1399
1682
  registryUrl: string;
1683
+ /** Where document-model graphs are cached; `<cwd>/.ph/registry-packages` by default. */
1684
+ cacheDir?: string;
1400
1685
  }
1401
- interface HttpPackageLoaderLogger {
1686
+ export interface HttpPackageLoaderLogger {
1402
1687
  info: (msg: string) => void;
1403
1688
  error: (msg: string, err: unknown) => void;
1404
1689
  }
1690
+ export declare function piecesBaseUrl(registryUrl: string, packageName: string, version: string): string;
1405
1691
  type SubgraphsExport = Record<string, SubgraphClass$1>;
1406
1692
  /**
1407
1693
  * Extract subgraph classes from the imported subgraphs/index.mjs module shape.
@@ -1413,7 +1699,7 @@ type SubgraphsExport = Record<string, SubgraphClass$1>;
1413
1699
  *
1414
1700
  * Exported for direct unit testing against synthetic module shapes.
1415
1701
  */
1416
- declare function extractSubgraphsFromModule(module: Record<string, SubgraphsExport>): SubgraphClass$1[];
1702
+ export declare function extractSubgraphsFromModule(module: Record<string, SubgraphsExport>): SubgraphClass$1[];
1417
1703
  /**
1418
1704
  * Loads document models, subgraphs, and processors from an HTTP registry.
1419
1705
  * Uses Node.js module loader hooks to import directly from HTTP URLs.
@@ -1422,11 +1708,13 @@ declare function extractSubgraphsFromModule(module: Record<string, SubgraphsExpo
1422
1708
  * import { register } from "node:module";
1423
1709
  * register("@powerhousedao/reactor-api/https-hooks", import.meta.url);
1424
1710
  */
1425
- declare class HttpPackageLoader implements IPackageLoader {
1711
+ export declare class HttpPackageLoader implements IPackageLoader {
1426
1712
  private readonly registryUrl;
1427
1713
  private readonly logger;
1428
1714
  readonly name = "HttpPackageLoader";
1429
1715
  readonly documentModelLoader: HttpDocumentModelLoader;
1716
+ readonly cache: RegistryPackageCache;
1717
+ private readonly versions;
1430
1718
  constructor(options: HttpPackageLoaderOptions);
1431
1719
  /**
1432
1720
  * Load document models from a package in the HTTP registry.
@@ -1436,33 +1724,42 @@ declare class HttpPackageLoader implements IPackageLoader {
1436
1724
  * Parse a package specifier like "@scope/pkg@tag" into name and optional tag.
1437
1725
  */
1438
1726
  private parsePackageSpec;
1727
+ resolveVersion(packageSpec: string): Promise<string | undefined>;
1728
+ private lookUpVersion;
1729
+ /** Caches the pinned version of `packageSpec` on disk. */
1730
+ cachePackage(packageSpec: string): Promise<CachedRegistryPackage>;
1731
+ /** One entry module of the package, plus the cached file it came from. */
1732
+ importEntry(packageSpec: string, kind: PackageEntryKind): Promise<{
1733
+ module: Record<string, unknown>;
1734
+ filePath?: string;
1735
+ }>;
1736
+ importDocumentModels(packageSpec: string): Promise<{
1737
+ module: Record<string, unknown>;
1738
+ filePath?: string;
1739
+ }>;
1439
1740
  loadDocumentModels(packageSpec: string): Promise<DocumentModelModule[]>;
1440
1741
  loadUpgradeManifests(packageSpec: string): Promise<UpgradeManifest<readonly number[]>[]>;
1441
1742
  loadSubgraphs(packageSpec: string): Promise<SubgraphClass$1[]>;
1442
1743
  loadProcessors(packageSpec: string): Promise<ProcessorFactoryBuilder | null>;
1744
+ loadPieces(packageSpec: string): Promise<PackagePieceEntry[]>;
1443
1745
  /**
1444
1746
  * Load document models from multiple packages.
1445
1747
  * Continues loading even if some packages fail.
1446
1748
  */
1447
1749
  loadPackages(packageNames: string[], logger?: HttpPackageLoaderLogger): Promise<DocumentModelModule[]>;
1448
- private isValidPackageName;
1750
+ packageVersion(packageSpec: string): Promise<string | undefined>;
1449
1751
  }
1450
- /**
1451
- * Returns live modules (host-only sources): dynamically loaded models are
1452
- * registered on the host registry but never reach executor worker threads.
1453
- * Making them worker-executable means returning an importable source here
1454
- * (the CDN URL as a package specifier, given process-wide https hooks).
1455
- */
1456
- declare class HttpDocumentModelLoader implements IDocumentModelLoader {
1752
+ export declare class HttpDocumentModelLoader implements IDocumentModelLoader {
1457
1753
  private readonly loader;
1458
1754
  private readonly logger;
1459
1755
  private readonly documentTypeCache;
1460
1756
  private readonly packageModulesCache;
1757
+ private readonly packageFileCache;
1461
1758
  private onModelLoaded?;
1462
1759
  constructor(loader: HttpPackageLoader);
1463
1760
  setOnModelLoaded(callback: (model: DocumentModelModule) => void): void;
1464
1761
  clearCache(): void;
1465
- load(documentType: string): Promise<DocumentModelModule>;
1762
+ load(documentType: string): Promise<DocumentModelSource>;
1466
1763
  private findPackageByDocumentType;
1467
1764
  getLoadedPackages(): string[];
1468
1765
  getPackageModules(packageName: string): DocumentModelModule[] | undefined;
@@ -1470,18 +1767,18 @@ declare class HttpDocumentModelLoader implements IDocumentModelLoader {
1470
1767
  }
1471
1768
  //#endregion
1472
1769
  //#region src/services/package-management.service.d.ts
1473
- interface InstallPackageResult {
1770
+ export interface InstallPackageResult {
1474
1771
  package: InstalledPackageInfo;
1475
1772
  documentModelsLoaded: number;
1476
1773
  }
1477
- interface PackageManagementServiceOptions {
1774
+ export interface PackageManagementServiceOptions {
1478
1775
  storage?: IPackageStorage;
1479
1776
  defaultRegistryUrl?: string;
1480
1777
  httpLoader?: HttpPackageLoader;
1481
1778
  documentModelRegistry?: IDocumentModelRegistry;
1482
1779
  packageManager?: IPackageManager;
1483
1780
  }
1484
- declare class PackageManagementService {
1781
+ export declare class PackageManagementService {
1485
1782
  private readonly storage;
1486
1783
  private readonly defaultRegistryUrl?;
1487
1784
  private readonly httpLoader?;
@@ -1504,13 +1801,13 @@ declare class PackageManagementService {
1504
1801
  interface PackagesSubgraphArgs extends SubgraphArgs {
1505
1802
  packageManagementService: PackageManagementService;
1506
1803
  }
1507
- declare class PackagesSubgraph extends BaseSubgraph {
1804
+ export declare class PackagesSubgraph extends BaseSubgraph {
1508
1805
  private logger;
1509
1806
  private packageManagementService;
1510
1807
  constructor(args: PackagesSubgraphArgs);
1511
1808
  name: string;
1512
1809
  hasSubscriptions: boolean;
1513
- typeDefs: graphql.DocumentNode;
1810
+ typeDefs: import("graphql").DocumentNode;
1514
1811
  resolvers: {
1515
1812
  Query: {
1516
1813
  Packages: () => {};
@@ -1566,7 +1863,7 @@ declare class PackagesSubgraph extends BaseSubgraph {
1566
1863
  * `{ document, variables, headers? }` with `variables` and `headers`
1567
1864
  * already JSON-stringified.
1568
1865
  */
1569
- interface ExplorerUrlState {
1866
+ export interface ExplorerUrlState {
1570
1867
  /** The GraphQL query to prefill in GraphiQL. */
1571
1868
  query: string;
1572
1869
  /** JSON-stringified variables, as stored in the payload. */
@@ -1578,24 +1875,24 @@ interface ExplorerUrlState {
1578
1875
  * Decodes an `explorerURLState` URL parameter. Returns `null` for anything
1579
1876
  * that is not a valid lz-compressed payload with a non-empty `document`.
1580
1877
  */
1581
- declare function decodeExplorerUrlState(encoded: string): ExplorerUrlState | null;
1582
- declare function renderGraphqlPlayground(url: string, query?: string, headers?: Record<string, string>, variables?: string): string;
1878
+ export declare function decodeExplorerUrlState(encoded: string): ExplorerUrlState | null;
1879
+ export declare function renderGraphqlPlayground(url: string, query?: string, headers?: Record<string, string>, variables?: string): string;
1583
1880
  //#endregion
1584
1881
  //#region src/graphql/reactor/gen/graphql.d.ts
1585
- type Maybe<T> = T | null | undefined;
1586
- type InputMaybe<T> = T | null | undefined;
1587
- type Exact<T extends {
1882
+ export type Maybe<T> = T | null | undefined;
1883
+ export type InputMaybe<T> = T | null | undefined;
1884
+ export type Exact<T extends {
1588
1885
  [key: string]: unknown;
1589
- }> = { [K in keyof T]: T[K] };
1590
- type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
1591
- type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
1592
- type MakeEmpty<T extends {
1886
+ }> = { [K in keyof T]: T[K]; };
1887
+ export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]>; };
1888
+ export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]>; };
1889
+ export type MakeEmpty<T extends {
1593
1890
  [key: string]: unknown;
1594
- }, K extends keyof T> = { [_ in K]?: never };
1595
- type Incremental<T> = T | { [P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never };
1596
- type RequireFields<T, K extends keyof T> = Omit<T, K> & { [P in K]-?: NonNullable<T[P]> };
1891
+ }, K extends keyof T> = { [_ in K]?: never; };
1892
+ export type Incremental<T> = T | { [P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never; };
1893
+ export type RequireFields<T, K extends keyof T> = Omit<T, K> & { [P in K]-?: NonNullable<T[P]>; };
1597
1894
  /** All built-in and custom scalars, mapped to their actual values */
1598
- type Scalars = {
1895
+ export type Scalars = {
1599
1896
  ID: {
1600
1897
  input: string;
1601
1898
  output: string;
@@ -1625,7 +1922,7 @@ type Scalars = {
1625
1922
  output: NonNullable<unknown>;
1626
1923
  };
1627
1924
  };
1628
- type Action = {
1925
+ export type Action = {
1629
1926
  readonly context?: Maybe<ActionContext>;
1630
1927
  readonly id: Scalars["String"]["output"];
1631
1928
  readonly input: Scalars["JSONObject"]["output"];
@@ -1640,12 +1937,12 @@ type Action = {
1640
1937
  * filled-in form carries that form's input. Omitting it predicts the verdict an
1641
1938
  * empty input earns, not the verdict the filled-in form will get.
1642
1939
  */
1643
- type ActionCandidateInput = {
1940
+ export type ActionCandidateInput = {
1644
1941
  readonly input?: InputMaybe<Scalars["JSONObject"]["input"]>;
1645
1942
  readonly scope: Scalars["String"]["input"];
1646
1943
  readonly type: Scalars["String"]["input"];
1647
1944
  };
1648
- type ActionContext = {
1945
+ export type ActionContext = {
1649
1946
  readonly signer?: Maybe<ReactorSigner>;
1650
1947
  };
1651
1948
  /**
@@ -1660,9 +1957,12 @@ type ActionContext = {
1660
1957
  * against. They are recorded rather than enforced; a signature is verified from
1661
1958
  * the params carried in its own tuple, which do not include them.
1662
1959
  */
1663
- type ActionContextInput = {
1664
- /** Covers replay of an operation that would otherwise be a no-op. */readonly nonce?: InputMaybe<Scalars["String"]["input"]>; /** The hash of the state the action applies to. */
1665
- readonly prevOpHash?: InputMaybe<Scalars["String"]["input"]>; /** The index of the last operation in the scope the action applies to. */
1960
+ export type ActionContextInput = {
1961
+ /** Covers replay of an operation that would otherwise be a no-op. */
1962
+ readonly nonce?: InputMaybe<Scalars["String"]["input"]>;
1963
+ /** The hash of the state the action applies to. */
1964
+ readonly prevOpHash?: InputMaybe<Scalars["String"]["input"]>;
1965
+ /** The index of the last operation in the scope the action applies to. */
1666
1966
  readonly prevOpIndex?: InputMaybe<Scalars["Int"]["input"]>;
1667
1967
  readonly signer?: InputMaybe<ReactorSignerInput>;
1668
1968
  };
@@ -1670,7 +1970,7 @@ type ActionContextInput = {
1670
1970
  * One candidate's predicted verdict. `reason` carries the refusal a DENY is
1671
1971
  * recorded with, and is null on an ALLOW.
1672
1972
  */
1673
- type ActionEvaluation = {
1973
+ export type ActionEvaluation = {
1674
1974
  readonly decision: AuthDecision;
1675
1975
  readonly reason?: Maybe<Scalars["String"]["output"]>;
1676
1976
  };
@@ -1683,14 +1983,14 @@ type ActionEvaluation = {
1683
1983
  * another. Over no candidates every aggregate is false: nothing is allowed and
1684
1984
  * nothing is denied.
1685
1985
  */
1686
- type ActionEvaluations = {
1986
+ export type ActionEvaluations = {
1687
1987
  readonly allAllowed: Scalars["Boolean"]["output"];
1688
1988
  readonly allDenied: Scalars["Boolean"]["output"];
1689
1989
  readonly anyAllowed: Scalars["Boolean"]["output"];
1690
1990
  readonly anyDenied: Scalars["Boolean"]["output"];
1691
1991
  readonly evaluations: ReadonlyArray<ActionEvaluation>;
1692
1992
  };
1693
- type ActionInput = {
1993
+ export type ActionInput = {
1694
1994
  readonly context?: InputMaybe<ActionContextInput>;
1695
1995
  readonly id: Scalars["String"]["input"];
1696
1996
  readonly input: Scalars["JSONObject"]["input"];
@@ -1698,17 +1998,17 @@ type ActionInput = {
1698
1998
  readonly timestampUtcMs: Scalars["String"]["input"];
1699
1999
  readonly type: Scalars["String"]["input"];
1700
2000
  };
1701
- declare enum AuthDecision {
2001
+ export declare enum AuthDecision {
1702
2002
  Allow = "ALLOW",
1703
2003
  Deny = "DENY"
1704
2004
  }
1705
- type ChannelMeta = {
2005
+ export type ChannelMeta = {
1706
2006
  readonly id: Scalars["String"]["output"];
1707
2007
  };
1708
- type ChannelMetaInput = {
2008
+ export type ChannelMetaInput = {
1709
2009
  readonly id: Scalars["String"]["input"];
1710
2010
  };
1711
- type DeadLetterInfo = {
2011
+ export type DeadLetterInfo = {
1712
2012
  readonly branch: Scalars["String"]["output"];
1713
2013
  readonly documentId: Scalars["String"]["output"];
1714
2014
  readonly error: Scalars["String"]["output"];
@@ -1722,16 +2022,16 @@ type DeadLetterInfo = {
1722
2022
  readonly operationCount: Scalars["Int"]["output"];
1723
2023
  readonly scopes: ReadonlyArray<Scalars["String"]["output"]>;
1724
2024
  };
1725
- type DocumentChangeContext = {
2025
+ export type DocumentChangeContext = {
1726
2026
  readonly childId?: Maybe<Scalars["String"]["output"]>;
1727
2027
  readonly parentId?: Maybe<Scalars["String"]["output"]>;
1728
2028
  };
1729
- type DocumentChangeEvent = {
2029
+ export type DocumentChangeEvent = {
1730
2030
  readonly context?: Maybe<DocumentChangeContext>;
1731
2031
  readonly documents: ReadonlyArray<PhDocument>;
1732
2032
  readonly type: DocumentChangeType;
1733
2033
  };
1734
- declare enum DocumentChangeType {
2034
+ export declare enum DocumentChangeType {
1735
2035
  ChildAdded = "CHILD_ADDED",
1736
2036
  ChildRemoved = "CHILD_REMOVED",
1737
2037
  Created = "CREATED",
@@ -1740,21 +2040,20 @@ declare enum DocumentChangeType {
1740
2040
  ParentRemoved = "PARENT_REMOVED",
1741
2041
  Updated = "UPDATED"
1742
2042
  }
1743
- type DocumentModelGlobalState = {
2043
+ export type DocumentModelGlobalState = {
1744
2044
  readonly id: Scalars["String"]["output"];
1745
2045
  readonly name: Scalars["String"]["output"];
1746
2046
  readonly namespace?: Maybe<Scalars["String"]["output"]>;
1747
2047
  readonly specification: Scalars["JSONObject"]["output"];
1748
2048
  readonly version?: Maybe<Scalars["String"]["output"]>;
1749
2049
  };
1750
- type DocumentModelResultPage = {
2050
+ export type DocumentModelResultPage = {
1751
2051
  readonly cursor?: Maybe<Scalars["String"]["output"]>;
1752
2052
  readonly hasNextPage: Scalars["Boolean"]["output"];
1753
2053
  readonly hasPreviousPage: Scalars["Boolean"]["output"];
1754
2054
  readonly items: ReadonlyArray<DocumentModelGlobalState>;
1755
- readonly totalCount: Scalars["Int"]["output"];
1756
2055
  };
1757
- type DocumentOperationsFilterInput = {
2056
+ export type DocumentOperationsFilterInput = {
1758
2057
  readonly actionTypes?: InputMaybe<ReadonlyArray<Scalars["String"]["input"]>>;
1759
2058
  readonly branch?: InputMaybe<Scalars["String"]["input"]>;
1760
2059
  readonly scopes?: InputMaybe<ReadonlyArray<Scalars["String"]["input"]>>;
@@ -1762,17 +2061,36 @@ type DocumentOperationsFilterInput = {
1762
2061
  readonly timestampFrom?: InputMaybe<Scalars["String"]["input"]>;
1763
2062
  readonly timestampTo?: InputMaybe<Scalars["String"]["input"]>;
1764
2063
  };
1765
- type DocumentWithChildren = {
2064
+ export type DocumentRelationship = {
2065
+ readonly createdAt: Scalars["DateTime"]["output"];
2066
+ readonly metadata?: Maybe<Scalars["JSONObject"]["output"]>;
2067
+ readonly relationshipType: Scalars["String"]["output"];
2068
+ readonly sourceId: Scalars["String"]["output"];
2069
+ readonly targetId: Scalars["String"]["output"];
2070
+ readonly updatedAt: Scalars["DateTime"]["output"];
2071
+ };
2072
+ export type DocumentRelationshipResultPage = {
2073
+ readonly cursor?: Maybe<Scalars["String"]["output"]>;
2074
+ readonly hasNextPage: Scalars["Boolean"]["output"];
2075
+ readonly hasPreviousPage: Scalars["Boolean"]["output"];
2076
+ readonly items: ReadonlyArray<DocumentRelationship>;
2077
+ };
2078
+ export type DocumentWithChildren = {
1766
2079
  readonly childIds: ReadonlyArray<Scalars["String"]["output"]>;
1767
2080
  readonly document: PhDocument;
1768
2081
  };
1769
- type JobChangeEvent = {
2082
+ export type JobChangeEvent = {
1770
2083
  readonly error?: Maybe<Scalars["String"]["output"]>;
1771
2084
  readonly jobId: Scalars["String"]["output"];
1772
- readonly result: Scalars["JSONObject"]["output"];
2085
+ /**
2086
+ * What the job produced, once it has produced anything. Nullable for the same
2087
+ * reason as `JobInfo.result`: a job that has not written yet has produced
2088
+ * nothing, and an empty object would claim otherwise.
2089
+ */
2090
+ readonly result?: Maybe<Scalars["JSONObject"]["output"]>;
1773
2091
  readonly status: Scalars["String"]["output"];
1774
2092
  };
1775
- type JobInfo = {
2093
+ export type JobInfo = {
1776
2094
  readonly completedAt?: Maybe<Scalars["DateTime"]["output"]>;
1777
2095
  readonly createdAt: Scalars["DateTime"]["output"];
1778
2096
  readonly error?: Maybe<Scalars["String"]["output"]>;
@@ -1784,11 +2102,11 @@ type JobInfo = {
1784
2102
  readonly result?: Maybe<Scalars["JSONObject"]["output"]>;
1785
2103
  readonly status: Scalars["String"]["output"];
1786
2104
  };
1787
- type MoveRelationshipResult = {
2105
+ export type MoveRelationshipResult = {
1788
2106
  readonly source: PhDocument;
1789
2107
  readonly target: PhDocument;
1790
2108
  };
1791
- type Mutation = {
2109
+ export type Mutation = {
1792
2110
  readonly addRelationship: PhDocument;
1793
2111
  readonly createDocument: PhDocument;
1794
2112
  readonly createEmptyDocument: PhDocument;
@@ -1816,101 +2134,130 @@ type Mutation = {
1816
2134
  * ask for; `result` is null until the job produces one.
1817
2135
  */
1818
2136
  readonly executeAsync: JobInfo;
1819
- readonly moveRelationship: MoveRelationshipResult; /** @deprecated Use execute. Actions here are untyped, so a malformed one is refused by a hand-written check rather than by the schema, and `view.scopes` is accepted but ignored. */
1820
- readonly mutateDocument: PhDocument; /** @deprecated Use executeAsync, which is typed and returns the job rather than only its id. */
2137
+ readonly moveRelationship: MoveRelationshipResult;
2138
+ /** @deprecated Use execute. Actions here are untyped, so a malformed one is refused by a hand-written check rather than by the schema, and `view.scopes` is accepted but ignored. */
2139
+ readonly mutateDocument: PhDocument;
2140
+ /** @deprecated Use executeAsync, which is typed and returns the job rather than only its id. */
1821
2141
  readonly mutateDocumentAsync: Scalars["String"]["output"];
1822
2142
  readonly pushSyncEnvelopes: Scalars["Boolean"]["output"];
1823
2143
  readonly removeRelationship: PhDocument;
1824
2144
  readonly renameDocument: PhDocument;
1825
2145
  readonly setPreferredEditor: PhDocument;
1826
2146
  readonly touchChannel: TouchChannelResult;
2147
+ readonly updateRelationship: PhDocument;
1827
2148
  };
1828
- type MutationAddRelationshipArgs = {
2149
+ export type MutationAddRelationshipArgs = {
1829
2150
  branch?: InputMaybe<Scalars["String"]["input"]>;
2151
+ metadata?: InputMaybe<Scalars["JSONObject"]["input"]>;
1830
2152
  relationshipType: Scalars["String"]["input"];
1831
- sourceIdentifier: Scalars["String"]["input"];
1832
- targetIdentifier: Scalars["String"]["input"];
2153
+ sourceIdOrSlug?: InputMaybe<Scalars["String"]["input"]>;
2154
+ sourceIdentifier?: InputMaybe<Scalars["String"]["input"]>;
2155
+ targetIdOrSlug?: InputMaybe<Scalars["String"]["input"]>;
2156
+ targetIdentifier?: InputMaybe<Scalars["String"]["input"]>;
1833
2157
  };
1834
- type MutationCreateDocumentArgs = {
2158
+ export type MutationCreateDocumentArgs = {
1835
2159
  document: Scalars["JSONObject"]["input"];
2160
+ parentIdOrSlug?: InputMaybe<Scalars["String"]["input"]>;
1836
2161
  parentIdentifier?: InputMaybe<Scalars["String"]["input"]>;
1837
2162
  };
1838
- type MutationCreateEmptyDocumentArgs = {
2163
+ export type MutationCreateEmptyDocumentArgs = {
1839
2164
  documentType: Scalars["String"]["input"];
2165
+ parentIdOrSlug?: InputMaybe<Scalars["String"]["input"]>;
1840
2166
  parentIdentifier?: InputMaybe<Scalars["String"]["input"]>;
1841
2167
  };
1842
- type MutationDeleteDocumentArgs = {
1843
- identifier: Scalars["String"]["input"];
2168
+ export type MutationDeleteDocumentArgs = {
2169
+ idOrSlug?: InputMaybe<Scalars["String"]["input"]>;
2170
+ identifier?: InputMaybe<Scalars["String"]["input"]>;
1844
2171
  propagate?: InputMaybe<PropagationMode>;
1845
2172
  };
1846
- type MutationDeleteDocumentsArgs = {
1847
- identifiers: ReadonlyArray<Scalars["String"]["input"]>;
2173
+ export type MutationDeleteDocumentsArgs = {
2174
+ identifiers?: InputMaybe<ReadonlyArray<Scalars["String"]["input"]>>;
2175
+ idsOrSlugs?: InputMaybe<ReadonlyArray<Scalars["String"]["input"]>>;
1848
2176
  propagate?: InputMaybe<PropagationMode>;
1849
2177
  };
1850
- type MutationExecuteArgs = {
2178
+ export type MutationExecuteArgs = {
1851
2179
  actions: ReadonlyArray<ActionInput>;
1852
2180
  branch?: InputMaybe<Scalars["String"]["input"]>;
1853
- documentIdentifier: Scalars["String"]["input"];
2181
+ documentIdOrSlug?: InputMaybe<Scalars["String"]["input"]>;
2182
+ documentIdentifier?: InputMaybe<Scalars["String"]["input"]>;
1854
2183
  };
1855
- type MutationExecuteAsyncArgs = {
2184
+ export type MutationExecuteAsyncArgs = {
1856
2185
  actions: ReadonlyArray<ActionInput>;
1857
2186
  branch?: InputMaybe<Scalars["String"]["input"]>;
1858
- documentIdentifier: Scalars["String"]["input"];
2187
+ documentIdOrSlug?: InputMaybe<Scalars["String"]["input"]>;
2188
+ documentIdentifier?: InputMaybe<Scalars["String"]["input"]>;
1859
2189
  };
1860
- type MutationMoveRelationshipArgs = {
2190
+ export type MutationMoveRelationshipArgs = {
1861
2191
  branch?: InputMaybe<Scalars["String"]["input"]>;
1862
2192
  relationshipType: Scalars["String"]["input"];
1863
- sourceParentIdentifier: Scalars["String"]["input"];
1864
- targetIdentifier: Scalars["String"]["input"];
1865
- targetParentIdentifier: Scalars["String"]["input"];
1866
- };
1867
- type MutationMutateDocumentArgs = {
2193
+ sourceParentIdOrSlug?: InputMaybe<Scalars["String"]["input"]>;
2194
+ sourceParentIdentifier?: InputMaybe<Scalars["String"]["input"]>;
2195
+ targetIdOrSlug?: InputMaybe<Scalars["String"]["input"]>;
2196
+ targetIdentifier?: InputMaybe<Scalars["String"]["input"]>;
2197
+ targetParentIdOrSlug?: InputMaybe<Scalars["String"]["input"]>;
2198
+ targetParentIdentifier?: InputMaybe<Scalars["String"]["input"]>;
2199
+ };
2200
+ export type MutationMutateDocumentArgs = {
1868
2201
  actions: ReadonlyArray<Scalars["JSONObject"]["input"]>;
1869
2202
  documentIdentifier: Scalars["String"]["input"];
1870
2203
  view?: InputMaybe<ViewFilterInput>;
1871
2204
  };
1872
- type MutationMutateDocumentAsyncArgs = {
2205
+ export type MutationMutateDocumentAsyncArgs = {
1873
2206
  actions: ReadonlyArray<Scalars["JSONObject"]["input"]>;
1874
2207
  documentIdentifier: Scalars["String"]["input"];
1875
2208
  view?: InputMaybe<ViewFilterInput>;
1876
2209
  };
1877
- type MutationPushSyncEnvelopesArgs = {
2210
+ export type MutationPushSyncEnvelopesArgs = {
1878
2211
  envelopes: ReadonlyArray<SyncEnvelopeInput>;
2212
+ peerManifestRevision?: InputMaybe<Scalars["String"]["input"]>;
1879
2213
  };
1880
- type MutationRemoveRelationshipArgs = {
2214
+ export type MutationRemoveRelationshipArgs = {
1881
2215
  branch?: InputMaybe<Scalars["String"]["input"]>;
1882
2216
  relationshipType: Scalars["String"]["input"];
1883
- sourceIdentifier: Scalars["String"]["input"];
1884
- targetIdentifier: Scalars["String"]["input"];
2217
+ sourceIdOrSlug?: InputMaybe<Scalars["String"]["input"]>;
2218
+ sourceIdentifier?: InputMaybe<Scalars["String"]["input"]>;
2219
+ targetIdOrSlug?: InputMaybe<Scalars["String"]["input"]>;
2220
+ targetIdentifier?: InputMaybe<Scalars["String"]["input"]>;
1885
2221
  };
1886
- type MutationRenameDocumentArgs = {
2222
+ export type MutationRenameDocumentArgs = {
1887
2223
  branch?: InputMaybe<Scalars["String"]["input"]>;
1888
- documentIdentifier: Scalars["String"]["input"];
2224
+ documentIdOrSlug?: InputMaybe<Scalars["String"]["input"]>;
2225
+ documentIdentifier?: InputMaybe<Scalars["String"]["input"]>;
1889
2226
  name: Scalars["String"]["input"];
1890
2227
  };
1891
- type MutationSetPreferredEditorArgs = {
2228
+ export type MutationSetPreferredEditorArgs = {
1892
2229
  branch?: InputMaybe<Scalars["String"]["input"]>;
1893
- documentIdentifier: Scalars["String"]["input"];
2230
+ documentIdOrSlug?: InputMaybe<Scalars["String"]["input"]>;
2231
+ documentIdentifier?: InputMaybe<Scalars["String"]["input"]>;
1894
2232
  preferredEditor?: InputMaybe<Scalars["String"]["input"]>;
1895
2233
  };
1896
- type MutationTouchChannelArgs = {
2234
+ export type MutationTouchChannelArgs = {
1897
2235
  input: TouchChannelInput;
1898
2236
  };
1899
- type OperationContext = {
2237
+ export type MutationUpdateRelationshipArgs = {
2238
+ branch?: InputMaybe<Scalars["String"]["input"]>;
2239
+ metadata?: InputMaybe<Scalars["JSONObject"]["input"]>;
2240
+ relationshipType: Scalars["String"]["input"];
2241
+ sourceIdOrSlug?: InputMaybe<Scalars["String"]["input"]>;
2242
+ sourceIdentifier?: InputMaybe<Scalars["String"]["input"]>;
2243
+ targetIdOrSlug?: InputMaybe<Scalars["String"]["input"]>;
2244
+ targetIdentifier?: InputMaybe<Scalars["String"]["input"]>;
2245
+ };
2246
+ export type OperationContext = {
1900
2247
  readonly branch: Scalars["String"]["output"];
1901
2248
  readonly documentId: Scalars["String"]["output"];
1902
2249
  readonly documentType: Scalars["String"]["output"];
1903
2250
  readonly ordinal: Scalars["Int"]["output"];
1904
2251
  readonly scope: Scalars["String"]["output"];
1905
2252
  };
1906
- type OperationContextInput = {
2253
+ export type OperationContextInput = {
1907
2254
  readonly branch: Scalars["String"]["input"];
1908
2255
  readonly documentId: Scalars["String"]["input"];
1909
2256
  readonly documentType: Scalars["String"]["input"];
1910
2257
  readonly ordinal: Scalars["Int"]["input"];
1911
2258
  readonly scope: Scalars["String"]["input"];
1912
2259
  };
1913
- type OperationInput = {
2260
+ export type OperationInput = {
1914
2261
  readonly action: ActionInput;
1915
2262
  readonly deniedReason?: InputMaybe<Scalars["String"]["input"]>;
1916
2263
  readonly error?: InputMaybe<Scalars["String"]["input"]>;
@@ -1920,24 +2267,26 @@ type OperationInput = {
1920
2267
  readonly skip: Scalars["Int"]["input"];
1921
2268
  readonly timestampUtcMs: Scalars["String"]["input"];
1922
2269
  };
1923
- type OperationWithContext = {
2270
+ export type OperationWithContext = {
1924
2271
  readonly context: OperationContext;
1925
2272
  readonly operation: ReactorOperation;
1926
2273
  };
1927
- type OperationWithContextInput = {
2274
+ export type OperationWithContextInput = {
1928
2275
  readonly context: OperationContextInput;
1929
2276
  readonly operation: OperationInput;
1930
2277
  };
1931
- type OperationsFilterInput = {
2278
+ export type OperationsFilterInput = {
1932
2279
  readonly actionTypes?: InputMaybe<ReadonlyArray<Scalars["String"]["input"]>>;
1933
2280
  readonly branch?: InputMaybe<Scalars["String"]["input"]>;
1934
- readonly documentId: Scalars["String"]["input"];
2281
+ /** @deprecated Use documentIdOrSlug. */
2282
+ readonly documentId?: InputMaybe<Scalars["String"]["input"]>;
2283
+ readonly documentIdOrSlug?: InputMaybe<Scalars["String"]["input"]>;
1935
2284
  readonly scopes?: InputMaybe<ReadonlyArray<Scalars["String"]["input"]>>;
1936
2285
  readonly sinceRevision?: InputMaybe<Scalars["Int"]["input"]>;
1937
2286
  readonly timestampFrom?: InputMaybe<Scalars["String"]["input"]>;
1938
2287
  readonly timestampTo?: InputMaybe<Scalars["String"]["input"]>;
1939
2288
  };
1940
- type PhDocument = {
2289
+ export type PhDocument = {
1941
2290
  readonly createdAtUtcIso: Scalars["DateTime"]["output"];
1942
2291
  readonly documentType: Scalars["String"]["output"];
1943
2292
  readonly id: Scalars["String"]["output"];
@@ -1949,37 +2298,56 @@ type PhDocument = {
1949
2298
  readonly slug?: Maybe<Scalars["String"]["output"]>;
1950
2299
  readonly state: Scalars["JSONObject"]["output"];
1951
2300
  };
1952
- type PhDocumentOperationsArgs = {
2301
+ export type PhDocumentOperationsArgs = {
1953
2302
  filter?: InputMaybe<DocumentOperationsFilterInput>;
1954
2303
  paging?: InputMaybe<PagingInput>;
1955
2304
  };
1956
- type PhDocumentResultPage = {
2305
+ export type PhDocumentResultPage = {
1957
2306
  readonly cursor?: Maybe<Scalars["String"]["output"]>;
1958
2307
  readonly hasNextPage: Scalars["Boolean"]["output"];
1959
2308
  readonly hasPreviousPage: Scalars["Boolean"]["output"];
1960
2309
  readonly items: ReadonlyArray<PhDocument>;
1961
- readonly totalCount: Scalars["Int"]["output"];
1962
2310
  };
1963
- type PagingInput = {
2311
+ export type PagingInput = {
1964
2312
  readonly cursor?: InputMaybe<Scalars["String"]["input"]>;
1965
2313
  readonly limit?: InputMaybe<Scalars["Int"]["input"]>;
1966
2314
  readonly offset?: InputMaybe<Scalars["Int"]["input"]>;
1967
2315
  };
1968
- type PollSyncEnvelopesResult = {
2316
+ export type PeerAgreement = {
2317
+ readonly collectionId: Scalars["String"]["output"];
2318
+ readonly limitedBy: ReadonlyArray<PeerAgreementLimit>;
2319
+ readonly local: Scalars["JSONObject"]["output"];
2320
+ readonly members: ReadonlyArray<PeerAgreementMember>;
2321
+ };
2322
+ export type PeerAgreementLimit = {
2323
+ readonly protocol: Scalars["String"]["output"];
2324
+ readonly remoteNames: ReadonlyArray<Scalars["String"]["output"]>;
2325
+ };
2326
+ export type PeerAgreementMember = {
2327
+ readonly announced: Scalars["Boolean"]["output"];
2328
+ readonly features: Scalars["JSONObject"]["output"];
2329
+ readonly protocols: Scalars["JSONObject"]["output"];
2330
+ readonly remoteName: Scalars["String"]["output"];
2331
+ };
2332
+ export type PollSyncEnvelopesResult = {
1969
2333
  readonly ackOrdinal: Scalars["Int"]["output"];
1970
2334
  readonly deadLetters: ReadonlyArray<DeadLetterInfo>;
1971
2335
  readonly envelopes: ReadonlyArray<SyncEnvelope>;
1972
2336
  readonly hasMore: Scalars["Boolean"]["output"];
2337
+ readonly manifestRevision?: Maybe<Scalars["String"]["output"]>;
2338
+ readonly peerManifestRevision?: Maybe<Scalars["String"]["output"]>;
1973
2339
  };
1974
- declare enum PropagationMode {
2340
+ export declare enum PropagationMode {
1975
2341
  Cascade = "CASCADE",
1976
2342
  Orphan = "ORPHAN"
1977
2343
  }
1978
- type Query = {
2344
+ export type Query = {
1979
2345
  readonly document?: Maybe<DocumentWithChildren>;
2346
+ readonly documentIncomingRelationshipEdges: DocumentRelationshipResultPage;
1980
2347
  readonly documentIncomingRelationships: PhDocumentResultPage;
1981
2348
  readonly documentModels: DocumentModelResultPage;
1982
2349
  readonly documentOperations: ReactorOperationResultPage;
2350
+ readonly documentOutgoingRelationshipEdges: DocumentRelationshipResultPage;
1983
2351
  readonly documentOutgoingRelationships: PhDocumentResultPage;
1984
2352
  /**
1985
2353
  * Predicts whether the calling subject would be admitted to execute each of a
@@ -2011,6 +2379,7 @@ type Query = {
2011
2379
  readonly evaluateActions: ActionEvaluations;
2012
2380
  readonly findDocuments: PhDocumentResultPage;
2013
2381
  readonly jobStatus?: Maybe<JobInfo>;
2382
+ readonly peerAgreement: PeerAgreement;
2014
2383
  /**
2015
2384
  * Polls for sync envelopes from a channel.
2016
2385
  *
@@ -2023,50 +2392,78 @@ type Query = {
2023
2392
  * would stop receiving those too.
2024
2393
  */
2025
2394
  readonly pollSyncEnvelopes: PollSyncEnvelopesResult;
2395
+ readonly syncHolds: ReadonlyArray<SyncHold>;
2026
2396
  };
2027
- type QueryDocumentArgs = {
2028
- identifier: Scalars["String"]["input"];
2397
+ export type QueryDocumentArgs = {
2398
+ idOrSlug?: InputMaybe<Scalars["String"]["input"]>;
2399
+ identifier?: InputMaybe<Scalars["String"]["input"]>;
2029
2400
  view?: InputMaybe<ViewFilterInput>;
2030
2401
  };
2031
- type QueryDocumentIncomingRelationshipsArgs = {
2402
+ export type QueryDocumentIncomingRelationshipEdgesArgs = {
2403
+ paging?: InputMaybe<PagingInput>;
2404
+ relationshipType?: InputMaybe<Scalars["String"]["input"]>;
2405
+ targetIdOrSlug?: InputMaybe<Scalars["String"]["input"]>;
2406
+ targetIdentifier?: InputMaybe<Scalars["String"]["input"]>;
2407
+ view?: InputMaybe<ViewFilterInput>;
2408
+ };
2409
+ export type QueryDocumentIncomingRelationshipsArgs = {
2032
2410
  paging?: InputMaybe<PagingInput>;
2033
2411
  relationshipType: Scalars["String"]["input"];
2034
- targetIdentifier: Scalars["String"]["input"];
2412
+ targetIdOrSlug?: InputMaybe<Scalars["String"]["input"]>;
2413
+ targetIdentifier?: InputMaybe<Scalars["String"]["input"]>;
2035
2414
  view?: InputMaybe<ViewFilterInput>;
2036
2415
  };
2037
- type QueryDocumentModelsArgs = {
2416
+ export type QueryDocumentModelsArgs = {
2038
2417
  namespace?: InputMaybe<Scalars["String"]["input"]>;
2039
2418
  paging?: InputMaybe<PagingInput>;
2040
2419
  };
2041
- type QueryDocumentOperationsArgs = {
2420
+ export type QueryDocumentOperationsArgs = {
2042
2421
  filter: OperationsFilterInput;
2043
2422
  paging?: InputMaybe<PagingInput>;
2044
2423
  };
2045
- type QueryDocumentOutgoingRelationshipsArgs = {
2424
+ export type QueryDocumentOutgoingRelationshipEdgesArgs = {
2425
+ paging?: InputMaybe<PagingInput>;
2426
+ relationshipType?: InputMaybe<Scalars["String"]["input"]>;
2427
+ sourceIdOrSlug?: InputMaybe<Scalars["String"]["input"]>;
2428
+ sourceIdentifier?: InputMaybe<Scalars["String"]["input"]>;
2429
+ view?: InputMaybe<ViewFilterInput>;
2430
+ };
2431
+ export type QueryDocumentOutgoingRelationshipsArgs = {
2046
2432
  paging?: InputMaybe<PagingInput>;
2047
2433
  relationshipType: Scalars["String"]["input"];
2048
- sourceIdentifier: Scalars["String"]["input"];
2434
+ sourceIdOrSlug?: InputMaybe<Scalars["String"]["input"]>;
2435
+ sourceIdentifier?: InputMaybe<Scalars["String"]["input"]>;
2049
2436
  view?: InputMaybe<ViewFilterInput>;
2050
2437
  };
2051
- type QueryEvaluateActionsArgs = {
2438
+ export type QueryEvaluateActionsArgs = {
2052
2439
  branch?: InputMaybe<Scalars["String"]["input"]>;
2053
2440
  candidates: ReadonlyArray<ActionCandidateInput>;
2054
- documentIdentifier: Scalars["String"]["input"];
2441
+ documentIdOrSlug?: InputMaybe<Scalars["String"]["input"]>;
2442
+ documentIdentifier?: InputMaybe<Scalars["String"]["input"]>;
2055
2443
  };
2056
- type QueryFindDocumentsArgs = {
2444
+ export type QueryFindDocumentsArgs = {
2057
2445
  paging?: InputMaybe<PagingInput>;
2058
2446
  search?: InputMaybe<SearchFilterInput>;
2059
2447
  view?: InputMaybe<ViewFilterInput>;
2060
2448
  };
2061
- type QueryJobStatusArgs = {
2449
+ export type QueryJobStatusArgs = {
2062
2450
  jobId: Scalars["String"]["input"];
2063
2451
  };
2064
- type QueryPollSyncEnvelopesArgs = {
2452
+ export type QueryPeerAgreementArgs = {
2453
+ collectionId: Scalars["String"]["input"];
2454
+ };
2455
+ export type QueryPollSyncEnvelopesArgs = {
2065
2456
  channelId: Scalars["String"]["input"];
2457
+ manifestRevision?: InputMaybe<Scalars["String"]["input"]>;
2066
2458
  outboxAck: Scalars["Int"]["input"];
2067
2459
  outboxLatest: Scalars["Int"]["input"];
2460
+ refusals?: InputMaybe<ReadonlyArray<SyncRefusalInput>>;
2068
2461
  };
2069
- type ReactorOperation = {
2462
+ export type QuerySyncHoldsArgs = {
2463
+ documentId?: InputMaybe<Scalars["String"]["input"]>;
2464
+ remoteName?: InputMaybe<Scalars["String"]["input"]>;
2465
+ };
2466
+ export type ReactorOperation = {
2070
2467
  readonly action: Action;
2071
2468
  readonly deniedReason?: Maybe<Scalars["String"]["output"]>;
2072
2469
  readonly error?: Maybe<Scalars["String"]["output"]>;
@@ -2076,77 +2473,77 @@ type ReactorOperation = {
2076
2473
  readonly skip: Scalars["Int"]["output"];
2077
2474
  readonly timestampUtcMs: Scalars["String"]["output"];
2078
2475
  };
2079
- type ReactorOperationResultPage = {
2476
+ export type ReactorOperationResultPage = {
2080
2477
  readonly cursor?: Maybe<Scalars["String"]["output"]>;
2081
2478
  readonly hasNextPage: Scalars["Boolean"]["output"];
2082
2479
  readonly hasPreviousPage: Scalars["Boolean"]["output"];
2083
2480
  readonly items: ReadonlyArray<ReactorOperation>;
2084
- readonly totalCount: Scalars["Int"]["output"];
2085
2481
  };
2086
- type ReactorSigner = {
2482
+ export type ReactorSigner = {
2087
2483
  readonly app?: Maybe<ReactorSignerApp>;
2088
2484
  readonly signatures: ReadonlyArray<Scalars["String"]["output"]>;
2089
2485
  readonly user?: Maybe<ReactorSignerUser>;
2090
2486
  };
2091
- type ReactorSignerApp = {
2487
+ export type ReactorSignerApp = {
2092
2488
  readonly key: Scalars["String"]["output"];
2093
2489
  readonly name: Scalars["String"]["output"];
2094
2490
  };
2095
- type ReactorSignerAppInput = {
2491
+ export type ReactorSignerAppInput = {
2096
2492
  readonly key: Scalars["String"]["input"];
2097
2493
  readonly name: Scalars["String"]["input"];
2098
2494
  };
2099
- type ReactorSignerInput = {
2495
+ export type ReactorSignerInput = {
2100
2496
  readonly app?: InputMaybe<ReactorSignerAppInput>;
2101
2497
  readonly signatures: ReadonlyArray<Scalars["String"]["input"]>;
2102
2498
  readonly user?: InputMaybe<ReactorSignerUserInput>;
2103
2499
  };
2104
- type ReactorSignerUser = {
2500
+ export type ReactorSignerUser = {
2105
2501
  readonly address: Scalars["String"]["output"];
2106
2502
  readonly chainId: Scalars["Int"]["output"];
2107
2503
  readonly networkId: Scalars["String"]["output"];
2108
2504
  };
2109
- type ReactorSignerUserInput = {
2505
+ export type ReactorSignerUserInput = {
2110
2506
  readonly address: Scalars["String"]["input"];
2111
2507
  readonly chainId: Scalars["Int"]["input"];
2112
2508
  readonly networkId: Scalars["String"]["input"];
2113
2509
  };
2114
- type RemoteCursor = {
2510
+ export type RemoteCursor = {
2115
2511
  readonly cursorOrdinal: Scalars["Int"]["output"];
2116
2512
  readonly lastSyncedAtUtcMs?: Maybe<Scalars["String"]["output"]>;
2117
2513
  readonly remoteName: Scalars["String"]["output"];
2118
2514
  };
2119
- type RemoteCursorInput = {
2515
+ export type RemoteCursorInput = {
2120
2516
  readonly cursorOrdinal: Scalars["Int"]["input"];
2121
2517
  readonly lastSyncedAtUtcMs?: InputMaybe<Scalars["String"]["input"]>;
2122
2518
  readonly remoteName: Scalars["String"]["input"];
2123
2519
  };
2124
- type RemoteFilterInput = {
2520
+ export type RemoteFilterInput = {
2125
2521
  readonly branch: Scalars["String"]["input"];
2126
2522
  readonly documentId: ReadonlyArray<Scalars["String"]["input"]>;
2127
2523
  readonly scope: ReadonlyArray<Scalars["String"]["input"]>;
2128
2524
  };
2129
- type Revision = {
2525
+ export type Revision = {
2130
2526
  readonly revision: Scalars["Int"]["output"];
2131
2527
  readonly scope: Scalars["String"]["output"];
2132
2528
  };
2133
- type SearchFilterInput = {
2529
+ export type SearchFilterInput = {
2530
+ /** @deprecated Ignored. Filter by type or parentId. */
2134
2531
  readonly identifiers?: InputMaybe<ReadonlyArray<Scalars["String"]["input"]>>;
2135
2532
  readonly parentId?: InputMaybe<Scalars["String"]["input"]>;
2136
2533
  readonly type?: InputMaybe<Scalars["String"]["input"]>;
2137
2534
  };
2138
- type Subscription = {
2535
+ export type Subscription = {
2139
2536
  readonly documentChanges: DocumentChangeEvent;
2140
2537
  readonly jobChanges: JobChangeEvent;
2141
2538
  };
2142
- type SubscriptionDocumentChangesArgs = {
2539
+ export type SubscriptionDocumentChangesArgs = {
2143
2540
  search?: InputMaybe<SearchFilterInput>;
2144
2541
  view?: InputMaybe<ViewFilterInput>;
2145
2542
  };
2146
- type SubscriptionJobChangesArgs = {
2543
+ export type SubscriptionJobChangesArgs = {
2147
2544
  jobId: Scalars["String"]["input"];
2148
2545
  };
2149
- type SyncEnvelope = {
2546
+ export type SyncEnvelope = {
2150
2547
  readonly channelMeta: ChannelMeta;
2151
2548
  readonly cursor?: Maybe<RemoteCursor>;
2152
2549
  readonly dependsOn?: Maybe<ReadonlyArray<Scalars["String"]["output"]>>;
@@ -2154,7 +2551,7 @@ type SyncEnvelope = {
2154
2551
  readonly operations?: Maybe<ReadonlyArray<OperationWithContext>>;
2155
2552
  readonly type: SyncEnvelopeType;
2156
2553
  };
2157
- type SyncEnvelopeInput = {
2554
+ export type SyncEnvelopeInput = {
2158
2555
  readonly channelMeta: ChannelMetaInput;
2159
2556
  readonly cursor?: InputMaybe<RemoteCursorInput>;
2160
2557
  readonly dependsOn?: InputMaybe<ReadonlyArray<Scalars["String"]["input"]>>;
@@ -2162,26 +2559,45 @@ type SyncEnvelopeInput = {
2162
2559
  readonly operations?: InputMaybe<ReadonlyArray<OperationWithContextInput>>;
2163
2560
  readonly type: SyncEnvelopeType;
2164
2561
  };
2165
- declare enum SyncEnvelopeType {
2562
+ export declare enum SyncEnvelopeType {
2166
2563
  Ack = "ACK",
2167
2564
  Operations = "OPERATIONS"
2168
2565
  }
2169
- type TouchChannelInput = {
2566
+ export type SyncHold = {
2567
+ readonly branch: Scalars["String"]["output"];
2568
+ readonly documentId: Scalars["String"]["output"];
2569
+ readonly heldAtUtcMs: Scalars["String"]["output"];
2570
+ readonly reason: SyncHoldReason;
2571
+ readonly remoteName: Scalars["String"]["output"];
2572
+ };
2573
+ export type SyncHoldReason = {
2574
+ readonly peerSupports: ReadonlyArray<Scalars["Int"]["output"]>;
2575
+ readonly protocol: Scalars["String"]["output"];
2576
+ readonly version: Scalars["Int"]["output"];
2577
+ };
2578
+ export type SyncRefusalInput = {
2579
+ readonly branch: Scalars["String"]["input"];
2580
+ readonly documentId: Scalars["String"]["input"];
2581
+ readonly kind?: InputMaybe<Scalars["String"]["input"]>;
2582
+ };
2583
+ export type TouchChannelInput = {
2170
2584
  readonly collectionId: Scalars["String"]["input"];
2171
2585
  readonly filter: RemoteFilterInput;
2172
2586
  readonly id: Scalars["String"]["input"];
2587
+ readonly manifest?: InputMaybe<Scalars["JSONObject"]["input"]>;
2173
2588
  readonly name: Scalars["String"]["input"];
2174
2589
  readonly sinceTimestampUtcMs: Scalars["String"]["input"];
2175
2590
  };
2176
- type TouchChannelResult = {
2591
+ export type TouchChannelResult = {
2177
2592
  readonly ackOrdinal: Scalars["Int"]["output"];
2593
+ readonly manifest?: Maybe<Scalars["JSONObject"]["output"]>;
2178
2594
  readonly success: Scalars["Boolean"]["output"];
2179
2595
  };
2180
- type ViewFilterInput = {
2596
+ export type ViewFilterInput = {
2181
2597
  readonly branch?: InputMaybe<Scalars["String"]["input"]>;
2182
2598
  readonly scopes?: InputMaybe<ReadonlyArray<Scalars["String"]["input"]>>;
2183
2599
  };
2184
- type PhDocumentFieldsFragment = {
2600
+ export type PhDocumentFieldsFragment = {
2185
2601
  readonly id: string;
2186
2602
  readonly slug?: string | null | undefined;
2187
2603
  readonly name: string;
@@ -2194,13 +2610,20 @@ type PhDocumentFieldsFragment = {
2194
2610
  readonly revision: number;
2195
2611
  }>;
2196
2612
  };
2197
- type GetDocumentModelsQueryVariables = Exact<{
2613
+ export type DocumentRelationshipFieldsFragment = {
2614
+ readonly sourceId: string;
2615
+ readonly targetId: string;
2616
+ readonly relationshipType: string;
2617
+ readonly metadata?: NonNullable<unknown> | null | undefined;
2618
+ readonly createdAt: string | Date;
2619
+ readonly updatedAt: string | Date;
2620
+ };
2621
+ export type GetDocumentModelsQueryVariables = Exact<{
2198
2622
  namespace?: InputMaybe<Scalars["String"]["input"]>;
2199
2623
  paging?: InputMaybe<PagingInput>;
2200
2624
  }>;
2201
- type GetDocumentModelsQuery = {
2625
+ export type GetDocumentModelsQuery = {
2202
2626
  readonly documentModels: {
2203
- readonly totalCount: number;
2204
2627
  readonly hasNextPage: boolean;
2205
2628
  readonly hasPreviousPage: boolean;
2206
2629
  readonly cursor?: string | null | undefined;
@@ -2213,11 +2636,11 @@ type GetDocumentModelsQuery = {
2213
2636
  }>;
2214
2637
  };
2215
2638
  };
2216
- type GetDocumentQueryVariables = Exact<{
2639
+ export type GetDocumentQueryVariables = Exact<{
2217
2640
  identifier: Scalars["String"]["input"];
2218
2641
  view?: InputMaybe<ViewFilterInput>;
2219
2642
  }>;
2220
- type GetDocumentQuery = {
2643
+ export type GetDocumentQuery = {
2221
2644
  readonly document?: {
2222
2645
  readonly childIds: ReadonlyArray<string>;
2223
2646
  readonly document: {
@@ -2235,13 +2658,13 @@ type GetDocumentQuery = {
2235
2658
  };
2236
2659
  } | null | undefined;
2237
2660
  };
2238
- type GetDocumentWithOperationsQueryVariables = Exact<{
2661
+ export type GetDocumentWithOperationsQueryVariables = Exact<{
2239
2662
  identifier: Scalars["String"]["input"];
2240
2663
  view?: InputMaybe<ViewFilterInput>;
2241
2664
  operationsFilter?: InputMaybe<DocumentOperationsFilterInput>;
2242
2665
  operationsPaging?: InputMaybe<PagingInput>;
2243
2666
  }>;
2244
- type GetDocumentWithOperationsQuery = {
2667
+ export type GetDocumentWithOperationsQuery = {
2245
2668
  readonly document?: {
2246
2669
  readonly childIds: ReadonlyArray<string>;
2247
2670
  readonly document: {
@@ -2253,7 +2676,6 @@ type GetDocumentWithOperationsQuery = {
2253
2676
  readonly createdAtUtcIso: string | Date;
2254
2677
  readonly lastModifiedAtUtcIso: string | Date;
2255
2678
  readonly operations?: {
2256
- readonly totalCount: number;
2257
2679
  readonly hasNextPage: boolean;
2258
2680
  readonly hasPreviousPage: boolean;
2259
2681
  readonly cursor?: string | null | undefined;
@@ -2295,15 +2717,14 @@ type GetDocumentWithOperationsQuery = {
2295
2717
  };
2296
2718
  } | null | undefined;
2297
2719
  };
2298
- type GetDocumentOutgoingRelationshipsQueryVariables = Exact<{
2720
+ export type GetDocumentOutgoingRelationshipsQueryVariables = Exact<{
2299
2721
  sourceIdentifier: Scalars["String"]["input"];
2300
2722
  relationshipType: Scalars["String"]["input"];
2301
2723
  view?: InputMaybe<ViewFilterInput>;
2302
2724
  paging?: InputMaybe<PagingInput>;
2303
2725
  }>;
2304
- type GetDocumentOutgoingRelationshipsQuery = {
2726
+ export type GetDocumentOutgoingRelationshipsQuery = {
2305
2727
  readonly documentOutgoingRelationships: {
2306
- readonly totalCount: number;
2307
2728
  readonly hasNextPage: boolean;
2308
2729
  readonly hasPreviousPage: boolean;
2309
2730
  readonly cursor?: string | null | undefined;
@@ -2322,15 +2743,14 @@ type GetDocumentOutgoingRelationshipsQuery = {
2322
2743
  }>;
2323
2744
  };
2324
2745
  };
2325
- type GetDocumentIncomingRelationshipsQueryVariables = Exact<{
2746
+ export type GetDocumentIncomingRelationshipsQueryVariables = Exact<{
2326
2747
  targetIdentifier: Scalars["String"]["input"];
2327
2748
  relationshipType: Scalars["String"]["input"];
2328
2749
  view?: InputMaybe<ViewFilterInput>;
2329
2750
  paging?: InputMaybe<PagingInput>;
2330
2751
  }>;
2331
- type GetDocumentIncomingRelationshipsQuery = {
2752
+ export type GetDocumentIncomingRelationshipsQuery = {
2332
2753
  readonly documentIncomingRelationships: {
2333
- readonly totalCount: number;
2334
2754
  readonly hasNextPage: boolean;
2335
2755
  readonly hasPreviousPage: boolean;
2336
2756
  readonly cursor?: string | null | undefined;
@@ -2349,14 +2769,55 @@ type GetDocumentIncomingRelationshipsQuery = {
2349
2769
  }>;
2350
2770
  };
2351
2771
  };
2352
- type FindDocumentsQueryVariables = Exact<{
2772
+ export type GetDocumentOutgoingRelationshipEdgesQueryVariables = Exact<{
2773
+ sourceIdentifier: Scalars["String"]["input"];
2774
+ relationshipType?: InputMaybe<Scalars["String"]["input"]>;
2775
+ view?: InputMaybe<ViewFilterInput>;
2776
+ paging?: InputMaybe<PagingInput>;
2777
+ }>;
2778
+ export type GetDocumentOutgoingRelationshipEdgesQuery = {
2779
+ readonly documentOutgoingRelationshipEdges: {
2780
+ readonly hasNextPage: boolean;
2781
+ readonly hasPreviousPage: boolean;
2782
+ readonly cursor?: string | null | undefined;
2783
+ readonly items: ReadonlyArray<{
2784
+ readonly sourceId: string;
2785
+ readonly targetId: string;
2786
+ readonly relationshipType: string;
2787
+ readonly metadata?: NonNullable<unknown> | null | undefined;
2788
+ readonly createdAt: string | Date;
2789
+ readonly updatedAt: string | Date;
2790
+ }>;
2791
+ };
2792
+ };
2793
+ export type GetDocumentIncomingRelationshipEdgesQueryVariables = Exact<{
2794
+ targetIdentifier: Scalars["String"]["input"];
2795
+ relationshipType?: InputMaybe<Scalars["String"]["input"]>;
2796
+ view?: InputMaybe<ViewFilterInput>;
2797
+ paging?: InputMaybe<PagingInput>;
2798
+ }>;
2799
+ export type GetDocumentIncomingRelationshipEdgesQuery = {
2800
+ readonly documentIncomingRelationshipEdges: {
2801
+ readonly hasNextPage: boolean;
2802
+ readonly hasPreviousPage: boolean;
2803
+ readonly cursor?: string | null | undefined;
2804
+ readonly items: ReadonlyArray<{
2805
+ readonly sourceId: string;
2806
+ readonly targetId: string;
2807
+ readonly relationshipType: string;
2808
+ readonly metadata?: NonNullable<unknown> | null | undefined;
2809
+ readonly createdAt: string | Date;
2810
+ readonly updatedAt: string | Date;
2811
+ }>;
2812
+ };
2813
+ };
2814
+ export type FindDocumentsQueryVariables = Exact<{
2353
2815
  search?: InputMaybe<SearchFilterInput>;
2354
2816
  view?: InputMaybe<ViewFilterInput>;
2355
2817
  paging?: InputMaybe<PagingInput>;
2356
2818
  }>;
2357
- type FindDocumentsQuery = {
2819
+ export type FindDocumentsQuery = {
2358
2820
  readonly findDocuments: {
2359
- readonly totalCount: number;
2360
2821
  readonly hasNextPage: boolean;
2361
2822
  readonly hasPreviousPage: boolean;
2362
2823
  readonly cursor?: string | null | undefined;
@@ -2375,13 +2836,12 @@ type FindDocumentsQuery = {
2375
2836
  }>;
2376
2837
  };
2377
2838
  };
2378
- type GetDocumentOperationsQueryVariables = Exact<{
2839
+ export type GetDocumentOperationsQueryVariables = Exact<{
2379
2840
  filter: OperationsFilterInput;
2380
2841
  paging?: InputMaybe<PagingInput>;
2381
2842
  }>;
2382
- type GetDocumentOperationsQuery = {
2843
+ export type GetDocumentOperationsQuery = {
2383
2844
  readonly documentOperations: {
2384
- readonly totalCount: number;
2385
2845
  readonly hasNextPage: boolean;
2386
2846
  readonly hasPreviousPage: boolean;
2387
2847
  readonly cursor?: string | null | undefined;
@@ -2417,10 +2877,10 @@ type GetDocumentOperationsQuery = {
2417
2877
  }>;
2418
2878
  };
2419
2879
  };
2420
- type GetJobStatusQueryVariables = Exact<{
2880
+ export type GetJobStatusQueryVariables = Exact<{
2421
2881
  jobId: Scalars["String"]["input"];
2422
2882
  }>;
2423
- type GetJobStatusQuery = {
2883
+ export type GetJobStatusQuery = {
2424
2884
  readonly jobStatus?: {
2425
2885
  readonly id: string;
2426
2886
  readonly status: string;
@@ -2430,12 +2890,12 @@ type GetJobStatusQuery = {
2430
2890
  readonly completedAt?: string | Date | null | undefined;
2431
2891
  } | null | undefined;
2432
2892
  };
2433
- type EvaluateActionsQueryVariables = Exact<{
2893
+ export type EvaluateActionsQueryVariables = Exact<{
2434
2894
  documentIdentifier: Scalars["String"]["input"];
2435
2895
  branch?: InputMaybe<Scalars["String"]["input"]>;
2436
2896
  candidates: ReadonlyArray<ActionCandidateInput>;
2437
2897
  }>;
2438
- type EvaluateActionsQuery = {
2898
+ export type EvaluateActionsQuery = {
2439
2899
  readonly evaluateActions: {
2440
2900
  readonly allAllowed: boolean;
2441
2901
  readonly anyAllowed: boolean;
@@ -2447,11 +2907,11 @@ type EvaluateActionsQuery = {
2447
2907
  }>;
2448
2908
  };
2449
2909
  };
2450
- type CreateDocumentMutationVariables = Exact<{
2910
+ export type CreateDocumentMutationVariables = Exact<{
2451
2911
  document: Scalars["JSONObject"]["input"];
2452
2912
  parentIdentifier?: InputMaybe<Scalars["String"]["input"]>;
2453
2913
  }>;
2454
- type CreateDocumentMutation = {
2914
+ export type CreateDocumentMutation = {
2455
2915
  readonly createDocument: {
2456
2916
  readonly id: string;
2457
2917
  readonly slug?: string | null | undefined;
@@ -2466,11 +2926,11 @@ type CreateDocumentMutation = {
2466
2926
  }>;
2467
2927
  };
2468
2928
  };
2469
- type CreateEmptyDocumentMutationVariables = Exact<{
2929
+ export type CreateEmptyDocumentMutationVariables = Exact<{
2470
2930
  documentType: Scalars["String"]["input"];
2471
2931
  parentIdentifier?: InputMaybe<Scalars["String"]["input"]>;
2472
2932
  }>;
2473
- type CreateEmptyDocumentMutation = {
2933
+ export type CreateEmptyDocumentMutation = {
2474
2934
  readonly createEmptyDocument: {
2475
2935
  readonly id: string;
2476
2936
  readonly slug?: string | null | undefined;
@@ -2485,12 +2945,12 @@ type CreateEmptyDocumentMutation = {
2485
2945
  }>;
2486
2946
  };
2487
2947
  };
2488
- type MutateDocumentMutationVariables = Exact<{
2948
+ export type MutateDocumentMutationVariables = Exact<{
2489
2949
  documentIdentifier: Scalars["String"]["input"];
2490
2950
  actions: ReadonlyArray<ActionInput>;
2491
2951
  branch?: InputMaybe<Scalars["String"]["input"]>;
2492
2952
  }>;
2493
- type MutateDocumentMutation = {
2953
+ export type MutateDocumentMutation = {
2494
2954
  readonly mutateDocument: {
2495
2955
  readonly id: string;
2496
2956
  readonly slug?: string | null | undefined;
@@ -2505,12 +2965,12 @@ type MutateDocumentMutation = {
2505
2965
  }>;
2506
2966
  };
2507
2967
  };
2508
- type MutateDocumentAsyncMutationVariables = Exact<{
2968
+ export type MutateDocumentAsyncMutationVariables = Exact<{
2509
2969
  documentIdentifier: Scalars["String"]["input"];
2510
2970
  actions: ReadonlyArray<ActionInput>;
2511
2971
  branch?: InputMaybe<Scalars["String"]["input"]>;
2512
2972
  }>;
2513
- type MutateDocumentAsyncMutation = {
2973
+ export type MutateDocumentAsyncMutation = {
2514
2974
  readonly mutateDocumentAsync: {
2515
2975
  readonly id: string;
2516
2976
  readonly status: string;
@@ -2520,12 +2980,12 @@ type MutateDocumentAsyncMutation = {
2520
2980
  readonly completedAt?: string | Date | null | undefined;
2521
2981
  };
2522
2982
  };
2523
- type RenameDocumentMutationVariables = Exact<{
2983
+ export type RenameDocumentMutationVariables = Exact<{
2524
2984
  documentIdentifier: Scalars["String"]["input"];
2525
2985
  name: Scalars["String"]["input"];
2526
2986
  branch?: InputMaybe<Scalars["String"]["input"]>;
2527
2987
  }>;
2528
- type RenameDocumentMutation = {
2988
+ export type RenameDocumentMutation = {
2529
2989
  readonly renameDocument: {
2530
2990
  readonly id: string;
2531
2991
  readonly slug?: string | null | undefined;
@@ -2540,12 +3000,12 @@ type RenameDocumentMutation = {
2540
3000
  }>;
2541
3001
  };
2542
3002
  };
2543
- type SetPreferredEditorMutationVariables = Exact<{
3003
+ export type SetPreferredEditorMutationVariables = Exact<{
2544
3004
  documentIdentifier: Scalars["String"]["input"];
2545
3005
  preferredEditor?: InputMaybe<Scalars["String"]["input"]>;
2546
3006
  branch?: InputMaybe<Scalars["String"]["input"]>;
2547
3007
  }>;
2548
- type SetPreferredEditorMutation = {
3008
+ export type SetPreferredEditorMutation = {
2549
3009
  readonly setPreferredEditor: {
2550
3010
  readonly id: string;
2551
3011
  readonly slug?: string | null | undefined;
@@ -2560,13 +3020,14 @@ type SetPreferredEditorMutation = {
2560
3020
  }>;
2561
3021
  };
2562
3022
  };
2563
- type AddRelationshipMutationVariables = Exact<{
3023
+ export type AddRelationshipMutationVariables = Exact<{
2564
3024
  sourceIdentifier: Scalars["String"]["input"];
2565
3025
  targetIdentifier: Scalars["String"]["input"];
2566
3026
  relationshipType: Scalars["String"]["input"];
3027
+ metadata?: InputMaybe<Scalars["JSONObject"]["input"]>;
2567
3028
  branch?: InputMaybe<Scalars["String"]["input"]>;
2568
3029
  }>;
2569
- type AddRelationshipMutation = {
3030
+ export type AddRelationshipMutation = {
2570
3031
  readonly addRelationship: {
2571
3032
  readonly id: string;
2572
3033
  readonly slug?: string | null | undefined;
@@ -2581,13 +3042,35 @@ type AddRelationshipMutation = {
2581
3042
  }>;
2582
3043
  };
2583
3044
  };
2584
- type RemoveRelationshipMutationVariables = Exact<{
3045
+ export type UpdateRelationshipMutationVariables = Exact<{
3046
+ sourceIdentifier: Scalars["String"]["input"];
3047
+ targetIdentifier: Scalars["String"]["input"];
3048
+ relationshipType: Scalars["String"]["input"];
3049
+ metadata?: InputMaybe<Scalars["JSONObject"]["input"]>;
3050
+ branch?: InputMaybe<Scalars["String"]["input"]>;
3051
+ }>;
3052
+ export type UpdateRelationshipMutation = {
3053
+ readonly updateRelationship: {
3054
+ readonly id: string;
3055
+ readonly slug?: string | null | undefined;
3056
+ readonly name: string;
3057
+ readonly documentType: string;
3058
+ readonly state: NonNullable<unknown>;
3059
+ readonly createdAtUtcIso: string | Date;
3060
+ readonly lastModifiedAtUtcIso: string | Date;
3061
+ readonly revisionsList: ReadonlyArray<{
3062
+ readonly scope: string;
3063
+ readonly revision: number;
3064
+ }>;
3065
+ };
3066
+ };
3067
+ export type RemoveRelationshipMutationVariables = Exact<{
2585
3068
  sourceIdentifier: Scalars["String"]["input"];
2586
3069
  targetIdentifier: Scalars["String"]["input"];
2587
3070
  relationshipType: Scalars["String"]["input"];
2588
3071
  branch?: InputMaybe<Scalars["String"]["input"]>;
2589
3072
  }>;
2590
- type RemoveRelationshipMutation = {
3073
+ export type RemoveRelationshipMutation = {
2591
3074
  readonly removeRelationship: {
2592
3075
  readonly id: string;
2593
3076
  readonly slug?: string | null | undefined;
@@ -2602,14 +3085,14 @@ type RemoveRelationshipMutation = {
2602
3085
  }>;
2603
3086
  };
2604
3087
  };
2605
- type MoveRelationshipMutationVariables = Exact<{
3088
+ export type MoveRelationshipMutationVariables = Exact<{
2606
3089
  sourceParentIdentifier: Scalars["String"]["input"];
2607
3090
  targetParentIdentifier: Scalars["String"]["input"];
2608
3091
  targetIdentifier: Scalars["String"]["input"];
2609
3092
  relationshipType: Scalars["String"]["input"];
2610
3093
  branch?: InputMaybe<Scalars["String"]["input"]>;
2611
3094
  }>;
2612
- type MoveRelationshipMutation = {
3095
+ export type MoveRelationshipMutation = {
2613
3096
  readonly moveRelationship: {
2614
3097
  readonly source: {
2615
3098
  readonly id: string;
@@ -2639,25 +3122,25 @@ type MoveRelationshipMutation = {
2639
3122
  };
2640
3123
  };
2641
3124
  };
2642
- type DeleteDocumentMutationVariables = Exact<{
3125
+ export type DeleteDocumentMutationVariables = Exact<{
2643
3126
  identifier: Scalars["String"]["input"];
2644
3127
  propagate?: InputMaybe<PropagationMode>;
2645
3128
  }>;
2646
- type DeleteDocumentMutation = {
3129
+ export type DeleteDocumentMutation = {
2647
3130
  readonly deleteDocument: boolean;
2648
3131
  };
2649
- type DeleteDocumentsMutationVariables = Exact<{
3132
+ export type DeleteDocumentsMutationVariables = Exact<{
2650
3133
  identifiers: ReadonlyArray<Scalars["String"]["input"]>;
2651
3134
  propagate?: InputMaybe<PropagationMode>;
2652
3135
  }>;
2653
- type DeleteDocumentsMutation = {
3136
+ export type DeleteDocumentsMutation = {
2654
3137
  readonly deleteDocuments: boolean;
2655
3138
  };
2656
- type DocumentChangesSubscriptionVariables = Exact<{
3139
+ export type DocumentChangesSubscriptionVariables = Exact<{
2657
3140
  search?: InputMaybe<SearchFilterInput>;
2658
3141
  view?: InputMaybe<ViewFilterInput>;
2659
3142
  }>;
2660
- type DocumentChangesSubscription = {
3143
+ export type DocumentChangesSubscription = {
2661
3144
  readonly documentChanges: {
2662
3145
  readonly type: DocumentChangeType;
2663
3146
  readonly documents: ReadonlyArray<{
@@ -2679,26 +3162,30 @@ type DocumentChangesSubscription = {
2679
3162
  } | null | undefined;
2680
3163
  };
2681
3164
  };
2682
- type JobChangesSubscriptionVariables = Exact<{
3165
+ export type JobChangesSubscriptionVariables = Exact<{
2683
3166
  jobId: Scalars["String"]["input"];
2684
3167
  }>;
2685
- type JobChangesSubscription = {
3168
+ export type JobChangesSubscription = {
2686
3169
  readonly jobChanges: {
2687
3170
  readonly jobId: string;
2688
3171
  readonly status: string;
2689
- readonly result: NonNullable<unknown>;
3172
+ readonly result?: NonNullable<unknown> | null | undefined;
2690
3173
  readonly error?: string | null | undefined;
2691
3174
  };
2692
3175
  };
2693
- type PollSyncEnvelopesQueryVariables = Exact<{
3176
+ export type PollSyncEnvelopesQueryVariables = Exact<{
2694
3177
  channelId: Scalars["String"]["input"];
2695
3178
  outboxAck: Scalars["Int"]["input"];
2696
3179
  outboxLatest: Scalars["Int"]["input"];
3180
+ manifestRevision?: InputMaybe<Scalars["String"]["input"]>;
3181
+ refusals?: InputMaybe<ReadonlyArray<SyncRefusalInput>>;
2697
3182
  }>;
2698
- type PollSyncEnvelopesQuery = {
3183
+ export type PollSyncEnvelopesQuery = {
2699
3184
  readonly pollSyncEnvelopes: {
2700
3185
  readonly ackOrdinal: number;
2701
3186
  readonly hasMore: boolean;
3187
+ readonly manifestRevision?: string | null | undefined;
3188
+ readonly peerManifestRevision?: string | null | undefined;
2702
3189
  readonly envelopes: ReadonlyArray<{
2703
3190
  readonly type: SyncEnvelopeType;
2704
3191
  readonly key?: string | null | undefined;
@@ -2757,47 +3244,49 @@ type PollSyncEnvelopesQuery = {
2757
3244
  }>;
2758
3245
  };
2759
3246
  };
2760
- type TouchChannelMutationVariables = Exact<{
3247
+ export type TouchChannelMutationVariables = Exact<{
2761
3248
  input: TouchChannelInput;
2762
3249
  }>;
2763
- type TouchChannelMutation = {
3250
+ export type TouchChannelMutation = {
2764
3251
  readonly touchChannel: {
2765
3252
  readonly success: boolean;
2766
3253
  readonly ackOrdinal: number;
3254
+ readonly manifest?: NonNullable<unknown> | null | undefined;
2767
3255
  };
2768
3256
  };
2769
- type PushSyncEnvelopesMutationVariables = Exact<{
3257
+ export type PushSyncEnvelopesMutationVariables = Exact<{
2770
3258
  envelopes: ReadonlyArray<SyncEnvelopeInput>;
3259
+ peerManifestRevision?: InputMaybe<Scalars["String"]["input"]>;
2771
3260
  }>;
2772
- type PushSyncEnvelopesMutation = {
3261
+ export type PushSyncEnvelopesMutation = {
2773
3262
  readonly pushSyncEnvelopes: boolean;
2774
3263
  };
2775
- type WithIndex<TObject> = TObject & Record<string, any>;
2776
- type ResolversObject<TObject> = WithIndex<TObject>;
2777
- type ResolverTypeWrapper<T> = Promise<T> | T;
2778
- type ResolverWithResolve<TResult, TParent, TContext, TArgs> = {
3264
+ export type WithIndex<TObject> = TObject & Record<string, any>;
3265
+ export type ResolversObject<TObject> = WithIndex<TObject>;
3266
+ export type ResolverTypeWrapper<T> = Promise<T> | T;
3267
+ export type ResolverWithResolve<TResult, TParent, TContext, TArgs> = {
2779
3268
  resolve: ResolverFn<TResult, TParent, TContext, TArgs>;
2780
3269
  };
2781
- type Resolver<TResult, TParent = Record<PropertyKey, never>, TContext = Record<PropertyKey, never>, TArgs = Record<PropertyKey, never>> = ResolverFn<TResult, TParent, TContext, TArgs> | ResolverWithResolve<TResult, TParent, TContext, TArgs>;
2782
- type ResolverFn<TResult, TParent, TContext, TArgs> = (parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => Promise<TResult> | TResult;
2783
- type SubscriptionSubscribeFn<TResult, TParent, TContext, TArgs> = (parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => AsyncIterable<TResult> | Promise<AsyncIterable<TResult>>;
2784
- type SubscriptionResolveFn<TResult, TParent, TContext, TArgs> = (parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => TResult | Promise<TResult>;
2785
- interface SubscriptionSubscriberObject<TResult, TKey extends string, TParent, TContext, TArgs> {
2786
- subscribe: SubscriptionSubscribeFn<{ [key in TKey]: TResult }, TParent, TContext, TArgs>;
2787
- resolve?: SubscriptionResolveFn<TResult, { [key in TKey]: TResult }, TContext, TArgs>;
3270
+ export type Resolver<TResult, TParent = Record<PropertyKey, never>, TContext = Record<PropertyKey, never>, TArgs = Record<PropertyKey, never>> = ResolverFn<TResult, TParent, TContext, TArgs> | ResolverWithResolve<TResult, TParent, TContext, TArgs>;
3271
+ export type ResolverFn<TResult, TParent, TContext, TArgs> = (parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => Promise<TResult> | TResult;
3272
+ export type SubscriptionSubscribeFn<TResult, TParent, TContext, TArgs> = (parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => AsyncIterable<TResult> | Promise<AsyncIterable<TResult>>;
3273
+ export type SubscriptionResolveFn<TResult, TParent, TContext, TArgs> = (parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => TResult | Promise<TResult>;
3274
+ export interface SubscriptionSubscriberObject<TResult, TKey extends string, TParent, TContext, TArgs> {
3275
+ subscribe: SubscriptionSubscribeFn<{ [key in TKey]: TResult; }, TParent, TContext, TArgs>;
3276
+ resolve?: SubscriptionResolveFn<TResult, { [key in TKey]: TResult; }, TContext, TArgs>;
2788
3277
  }
2789
- interface SubscriptionResolverObject<TResult, TParent, TContext, TArgs> {
3278
+ export interface SubscriptionResolverObject<TResult, TParent, TContext, TArgs> {
2790
3279
  subscribe: SubscriptionSubscribeFn<any, TParent, TContext, TArgs>;
2791
3280
  resolve: SubscriptionResolveFn<TResult, any, TContext, TArgs>;
2792
3281
  }
2793
- type SubscriptionObject<TResult, TKey extends string, TParent, TContext, TArgs> = SubscriptionSubscriberObject<TResult, TKey, TParent, TContext, TArgs> | SubscriptionResolverObject<TResult, TParent, TContext, TArgs>;
2794
- type SubscriptionResolver<TResult, TKey extends string, TParent = Record<PropertyKey, never>, TContext = Record<PropertyKey, never>, TArgs = Record<PropertyKey, never>> = ((...args: any[]) => SubscriptionObject<TResult, TKey, TParent, TContext, TArgs>) | SubscriptionObject<TResult, TKey, TParent, TContext, TArgs>;
2795
- type TypeResolveFn<TTypes, TParent = Record<PropertyKey, never>, TContext = Record<PropertyKey, never>> = (parent: TParent, context: TContext, info: GraphQLResolveInfo) => Maybe<TTypes> | Promise<Maybe<TTypes>>;
2796
- type IsTypeOfResolverFn<T = Record<PropertyKey, never>, TContext = Record<PropertyKey, never>> = (obj: T, context: TContext, info: GraphQLResolveInfo) => boolean | Promise<boolean>;
2797
- type NextResolverFn<T> = () => Promise<T>;
2798
- type DirectiveResolverFn<TResult = Record<PropertyKey, never>, TParent = Record<PropertyKey, never>, TContext = Record<PropertyKey, never>, TArgs = Record<PropertyKey, never>> = (next: NextResolverFn<TResult>, parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => TResult | Promise<TResult>;
3282
+ export type SubscriptionObject<TResult, TKey extends string, TParent, TContext, TArgs> = SubscriptionSubscriberObject<TResult, TKey, TParent, TContext, TArgs> | SubscriptionResolverObject<TResult, TParent, TContext, TArgs>;
3283
+ export type SubscriptionResolver<TResult, TKey extends string, TParent = Record<PropertyKey, never>, TContext = Record<PropertyKey, never>, TArgs = Record<PropertyKey, never>> = ((...args: any[]) => SubscriptionObject<TResult, TKey, TParent, TContext, TArgs>) | SubscriptionObject<TResult, TKey, TParent, TContext, TArgs>;
3284
+ export type TypeResolveFn<TTypes, TParent = Record<PropertyKey, never>, TContext = Record<PropertyKey, never>> = (parent: TParent, context: TContext, info: GraphQLResolveInfo) => Maybe<TTypes> | Promise<Maybe<TTypes>>;
3285
+ export type IsTypeOfResolverFn<T = Record<PropertyKey, never>, TContext = Record<PropertyKey, never>> = (obj: T, context: TContext, info: GraphQLResolveInfo) => boolean | Promise<boolean>;
3286
+ export type NextResolverFn<T> = () => Promise<T>;
3287
+ export type DirectiveResolverFn<TResult = Record<PropertyKey, never>, TParent = Record<PropertyKey, never>, TContext = Record<PropertyKey, never>, TArgs = Record<PropertyKey, never>> = (next: NextResolverFn<TResult>, parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => TResult | Promise<TResult>;
2799
3288
  /** Mapping between all available schema types and the resolvers types */
2800
- type ResolversTypes = ResolversObject<{
3289
+ export type ResolversTypes = ResolversObject<{
2801
3290
  Action: ResolverTypeWrapper<Action>;
2802
3291
  ActionCandidateInput: ActionCandidateInput;
2803
3292
  ActionContext: ResolverTypeWrapper<ActionContext>;
@@ -2817,6 +3306,8 @@ type ResolversTypes = ResolversObject<{
2817
3306
  DocumentModelGlobalState: ResolverTypeWrapper<DocumentModelGlobalState>;
2818
3307
  DocumentModelResultPage: ResolverTypeWrapper<DocumentModelResultPage>;
2819
3308
  DocumentOperationsFilterInput: DocumentOperationsFilterInput;
3309
+ DocumentRelationship: ResolverTypeWrapper<DocumentRelationship>;
3310
+ DocumentRelationshipResultPage: ResolverTypeWrapper<DocumentRelationshipResultPage>;
2820
3311
  DocumentWithChildren: ResolverTypeWrapper<DocumentWithChildren>;
2821
3312
  Int: ResolverTypeWrapper<Scalars["Int"]["output"]>;
2822
3313
  JSONObject: ResolverTypeWrapper<Scalars["JSONObject"]["output"]>;
@@ -2833,6 +3324,9 @@ type ResolversTypes = ResolversObject<{
2833
3324
  PHDocument: ResolverTypeWrapper<PhDocument>;
2834
3325
  PHDocumentResultPage: ResolverTypeWrapper<PhDocumentResultPage>;
2835
3326
  PagingInput: PagingInput;
3327
+ PeerAgreement: ResolverTypeWrapper<PeerAgreement>;
3328
+ PeerAgreementLimit: ResolverTypeWrapper<PeerAgreementLimit>;
3329
+ PeerAgreementMember: ResolverTypeWrapper<PeerAgreementMember>;
2836
3330
  PollSyncEnvelopesResult: ResolverTypeWrapper<PollSyncEnvelopesResult>;
2837
3331
  PropagationMode: PropagationMode;
2838
3332
  Query: ResolverTypeWrapper<Record<PropertyKey, never>>;
@@ -2854,12 +3348,15 @@ type ResolversTypes = ResolversObject<{
2854
3348
  SyncEnvelope: ResolverTypeWrapper<SyncEnvelope>;
2855
3349
  SyncEnvelopeInput: SyncEnvelopeInput;
2856
3350
  SyncEnvelopeType: SyncEnvelopeType;
3351
+ SyncHold: ResolverTypeWrapper<SyncHold>;
3352
+ SyncHoldReason: ResolverTypeWrapper<SyncHoldReason>;
3353
+ SyncRefusalInput: SyncRefusalInput;
2857
3354
  TouchChannelInput: TouchChannelInput;
2858
3355
  TouchChannelResult: ResolverTypeWrapper<TouchChannelResult>;
2859
3356
  ViewFilterInput: ViewFilterInput;
2860
3357
  }>;
2861
3358
  /** Mapping between all available schema types and the resolvers parents */
2862
- type ResolversParentTypes = ResolversObject<{
3359
+ export type ResolversParentTypes = ResolversObject<{
2863
3360
  Action: Action;
2864
3361
  ActionCandidateInput: ActionCandidateInput;
2865
3362
  ActionContext: ActionContext;
@@ -2877,6 +3374,8 @@ type ResolversParentTypes = ResolversObject<{
2877
3374
  DocumentModelGlobalState: DocumentModelGlobalState;
2878
3375
  DocumentModelResultPage: DocumentModelResultPage;
2879
3376
  DocumentOperationsFilterInput: DocumentOperationsFilterInput;
3377
+ DocumentRelationship: DocumentRelationship;
3378
+ DocumentRelationshipResultPage: DocumentRelationshipResultPage;
2880
3379
  DocumentWithChildren: DocumentWithChildren;
2881
3380
  Int: Scalars["Int"]["output"];
2882
3381
  JSONObject: Scalars["JSONObject"]["output"];
@@ -2893,6 +3392,9 @@ type ResolversParentTypes = ResolversObject<{
2893
3392
  PHDocument: PhDocument;
2894
3393
  PHDocumentResultPage: PhDocumentResultPage;
2895
3394
  PagingInput: PagingInput;
3395
+ PeerAgreement: PeerAgreement;
3396
+ PeerAgreementLimit: PeerAgreementLimit;
3397
+ PeerAgreementMember: PeerAgreementMember;
2896
3398
  PollSyncEnvelopesResult: PollSyncEnvelopesResult;
2897
3399
  Query: Record<PropertyKey, never>;
2898
3400
  ReactorOperation: ReactorOperation;
@@ -2912,11 +3414,14 @@ type ResolversParentTypes = ResolversObject<{
2912
3414
  Subscription: Record<PropertyKey, never>;
2913
3415
  SyncEnvelope: SyncEnvelope;
2914
3416
  SyncEnvelopeInput: SyncEnvelopeInput;
3417
+ SyncHold: SyncHold;
3418
+ SyncHoldReason: SyncHoldReason;
3419
+ SyncRefusalInput: SyncRefusalInput;
2915
3420
  TouchChannelInput: TouchChannelInput;
2916
3421
  TouchChannelResult: TouchChannelResult;
2917
3422
  ViewFilterInput: ViewFilterInput;
2918
3423
  }>;
2919
- type ActionResolvers<ContextType = Context, ParentType extends ResolversParentTypes["Action"] = ResolversParentTypes["Action"]> = ResolversObject<{
3424
+ export type ActionResolvers<ContextType = Context, ParentType extends ResolversParentTypes["Action"] = ResolversParentTypes["Action"]> = ResolversObject<{
2920
3425
  context?: Resolver<Maybe<ResolversTypes["ActionContext"]>, ParentType, ContextType>;
2921
3426
  id?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
2922
3427
  input?: Resolver<ResolversTypes["JSONObject"], ParentType, ContextType>;
@@ -2924,27 +3429,27 @@ type ActionResolvers<ContextType = Context, ParentType extends ResolversParentTy
2924
3429
  timestampUtcMs?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
2925
3430
  type?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
2926
3431
  }>;
2927
- type ActionContextResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ActionContext"] = ResolversParentTypes["ActionContext"]> = ResolversObject<{
3432
+ export type ActionContextResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ActionContext"] = ResolversParentTypes["ActionContext"]> = ResolversObject<{
2928
3433
  signer?: Resolver<Maybe<ResolversTypes["ReactorSigner"]>, ParentType, ContextType>;
2929
3434
  }>;
2930
- type ActionEvaluationResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ActionEvaluation"] = ResolversParentTypes["ActionEvaluation"]> = ResolversObject<{
3435
+ export type ActionEvaluationResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ActionEvaluation"] = ResolversParentTypes["ActionEvaluation"]> = ResolversObject<{
2931
3436
  decision?: Resolver<ResolversTypes["AuthDecision"], ParentType, ContextType>;
2932
3437
  reason?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
2933
3438
  }>;
2934
- type ActionEvaluationsResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ActionEvaluations"] = ResolversParentTypes["ActionEvaluations"]> = ResolversObject<{
3439
+ export type ActionEvaluationsResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ActionEvaluations"] = ResolversParentTypes["ActionEvaluations"]> = ResolversObject<{
2935
3440
  allAllowed?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
2936
3441
  allDenied?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
2937
3442
  anyAllowed?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
2938
3443
  anyDenied?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
2939
3444
  evaluations?: Resolver<ReadonlyArray<ResolversTypes["ActionEvaluation"]>, ParentType, ContextType>;
2940
3445
  }>;
2941
- type ChannelMetaResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ChannelMeta"] = ResolversParentTypes["ChannelMeta"]> = ResolversObject<{
3446
+ export type ChannelMetaResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ChannelMeta"] = ResolversParentTypes["ChannelMeta"]> = ResolversObject<{
2942
3447
  id?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
2943
3448
  }>;
2944
- interface DateTimeScalarConfig extends GraphQLScalarTypeConfig<ResolversTypes["DateTime"], any> {
3449
+ export interface DateTimeScalarConfig extends GraphQLScalarTypeConfig<ResolversTypes["DateTime"], any> {
2945
3450
  name: "DateTime";
2946
3451
  }
2947
- type DeadLetterInfoResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DeadLetterInfo"] = ResolversParentTypes["DeadLetterInfo"]> = ResolversObject<{
3452
+ export type DeadLetterInfoResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DeadLetterInfo"] = ResolversParentTypes["DeadLetterInfo"]> = ResolversObject<{
2948
3453
  branch?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
2949
3454
  documentId?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
2950
3455
  error?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
@@ -2953,43 +3458,56 @@ type DeadLetterInfoResolvers<ContextType = Context, ParentType extends Resolvers
2953
3458
  operationCount?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
2954
3459
  scopes?: Resolver<ReadonlyArray<ResolversTypes["String"]>, ParentType, ContextType>;
2955
3460
  }>;
2956
- type DocumentChangeContextResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DocumentChangeContext"] = ResolversParentTypes["DocumentChangeContext"]> = ResolversObject<{
3461
+ export type DocumentChangeContextResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DocumentChangeContext"] = ResolversParentTypes["DocumentChangeContext"]> = ResolversObject<{
2957
3462
  childId?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
2958
3463
  parentId?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
2959
3464
  }>;
2960
- type DocumentChangeEventResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DocumentChangeEvent"] = ResolversParentTypes["DocumentChangeEvent"]> = ResolversObject<{
3465
+ export type DocumentChangeEventResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DocumentChangeEvent"] = ResolversParentTypes["DocumentChangeEvent"]> = ResolversObject<{
2961
3466
  context?: Resolver<Maybe<ResolversTypes["DocumentChangeContext"]>, ParentType, ContextType>;
2962
3467
  documents?: Resolver<ReadonlyArray<ResolversTypes["PHDocument"]>, ParentType, ContextType>;
2963
3468
  type?: Resolver<ResolversTypes["DocumentChangeType"], ParentType, ContextType>;
2964
3469
  }>;
2965
- type DocumentModelGlobalStateResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DocumentModelGlobalState"] = ResolversParentTypes["DocumentModelGlobalState"]> = ResolversObject<{
3470
+ export type DocumentModelGlobalStateResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DocumentModelGlobalState"] = ResolversParentTypes["DocumentModelGlobalState"]> = ResolversObject<{
2966
3471
  id?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
2967
3472
  name?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
2968
3473
  namespace?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
2969
3474
  specification?: Resolver<ResolversTypes["JSONObject"], ParentType, ContextType>;
2970
3475
  version?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
2971
3476
  }>;
2972
- type DocumentModelResultPageResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DocumentModelResultPage"] = ResolversParentTypes["DocumentModelResultPage"]> = ResolversObject<{
3477
+ export type DocumentModelResultPageResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DocumentModelResultPage"] = ResolversParentTypes["DocumentModelResultPage"]> = ResolversObject<{
2973
3478
  cursor?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
2974
3479
  hasNextPage?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
2975
3480
  hasPreviousPage?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
2976
3481
  items?: Resolver<ReadonlyArray<ResolversTypes["DocumentModelGlobalState"]>, ParentType, ContextType>;
2977
- totalCount?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
2978
3482
  }>;
2979
- type DocumentWithChildrenResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DocumentWithChildren"] = ResolversParentTypes["DocumentWithChildren"]> = ResolversObject<{
3483
+ export type DocumentRelationshipResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DocumentRelationship"] = ResolversParentTypes["DocumentRelationship"]> = ResolversObject<{
3484
+ createdAt?: Resolver<ResolversTypes["DateTime"], ParentType, ContextType>;
3485
+ metadata?: Resolver<Maybe<ResolversTypes["JSONObject"]>, ParentType, ContextType>;
3486
+ relationshipType?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3487
+ sourceId?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3488
+ targetId?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3489
+ updatedAt?: Resolver<ResolversTypes["DateTime"], ParentType, ContextType>;
3490
+ }>;
3491
+ export type DocumentRelationshipResultPageResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DocumentRelationshipResultPage"] = ResolversParentTypes["DocumentRelationshipResultPage"]> = ResolversObject<{
3492
+ cursor?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
3493
+ hasNextPage?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
3494
+ hasPreviousPage?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
3495
+ items?: Resolver<ReadonlyArray<ResolversTypes["DocumentRelationship"]>, ParentType, ContextType>;
3496
+ }>;
3497
+ export type DocumentWithChildrenResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DocumentWithChildren"] = ResolversParentTypes["DocumentWithChildren"]> = ResolversObject<{
2980
3498
  childIds?: Resolver<ReadonlyArray<ResolversTypes["String"]>, ParentType, ContextType>;
2981
3499
  document?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType>;
2982
3500
  }>;
2983
- interface JsonObjectScalarConfig extends GraphQLScalarTypeConfig<ResolversTypes["JSONObject"], any> {
3501
+ export interface JsonObjectScalarConfig extends GraphQLScalarTypeConfig<ResolversTypes["JSONObject"], any> {
2984
3502
  name: "JSONObject";
2985
3503
  }
2986
- type JobChangeEventResolvers<ContextType = Context, ParentType extends ResolversParentTypes["JobChangeEvent"] = ResolversParentTypes["JobChangeEvent"]> = ResolversObject<{
3504
+ export type JobChangeEventResolvers<ContextType = Context, ParentType extends ResolversParentTypes["JobChangeEvent"] = ResolversParentTypes["JobChangeEvent"]> = ResolversObject<{
2987
3505
  error?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
2988
3506
  jobId?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
2989
- result?: Resolver<ResolversTypes["JSONObject"], ParentType, ContextType>;
3507
+ result?: Resolver<Maybe<ResolversTypes["JSONObject"]>, ParentType, ContextType>;
2990
3508
  status?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
2991
3509
  }>;
2992
- type JobInfoResolvers<ContextType = Context, ParentType extends ResolversParentTypes["JobInfo"] = ResolversParentTypes["JobInfo"]> = ResolversObject<{
3510
+ export type JobInfoResolvers<ContextType = Context, ParentType extends ResolversParentTypes["JobInfo"] = ResolversParentTypes["JobInfo"]> = ResolversObject<{
2993
3511
  completedAt?: Resolver<Maybe<ResolversTypes["DateTime"]>, ParentType, ContextType>;
2994
3512
  createdAt?: Resolver<ResolversTypes["DateTime"], ParentType, ContextType>;
2995
3513
  error?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
@@ -2997,39 +3515,40 @@ type JobInfoResolvers<ContextType = Context, ParentType extends ResolversParentT
2997
3515
  result?: Resolver<Maybe<ResolversTypes["JSONObject"]>, ParentType, ContextType>;
2998
3516
  status?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
2999
3517
  }>;
3000
- type MoveRelationshipResultResolvers<ContextType = Context, ParentType extends ResolversParentTypes["MoveRelationshipResult"] = ResolversParentTypes["MoveRelationshipResult"]> = ResolversObject<{
3518
+ export type MoveRelationshipResultResolvers<ContextType = Context, ParentType extends ResolversParentTypes["MoveRelationshipResult"] = ResolversParentTypes["MoveRelationshipResult"]> = ResolversObject<{
3001
3519
  source?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType>;
3002
3520
  target?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType>;
3003
3521
  }>;
3004
- type MutationResolvers<ContextType = Context, ParentType extends ResolversParentTypes["Mutation"] = ResolversParentTypes["Mutation"]> = ResolversObject<{
3005
- addRelationship?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType, RequireFields<MutationAddRelationshipArgs, "relationshipType" | "sourceIdentifier" | "targetIdentifier">>;
3522
+ export type MutationResolvers<ContextType = Context, ParentType extends ResolversParentTypes["Mutation"] = ResolversParentTypes["Mutation"]> = ResolversObject<{
3523
+ addRelationship?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType, RequireFields<MutationAddRelationshipArgs, "relationshipType">>;
3006
3524
  createDocument?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType, RequireFields<MutationCreateDocumentArgs, "document">>;
3007
3525
  createEmptyDocument?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType, RequireFields<MutationCreateEmptyDocumentArgs, "documentType">>;
3008
- deleteDocument?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType, RequireFields<MutationDeleteDocumentArgs, "identifier">>;
3009
- deleteDocuments?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType, RequireFields<MutationDeleteDocumentsArgs, "identifiers">>;
3010
- execute?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType, RequireFields<MutationExecuteArgs, "actions" | "documentIdentifier">>;
3011
- executeAsync?: Resolver<ResolversTypes["JobInfo"], ParentType, ContextType, RequireFields<MutationExecuteAsyncArgs, "actions" | "documentIdentifier">>;
3012
- moveRelationship?: Resolver<ResolversTypes["MoveRelationshipResult"], ParentType, ContextType, RequireFields<MutationMoveRelationshipArgs, "relationshipType" | "sourceParentIdentifier" | "targetIdentifier" | "targetParentIdentifier">>;
3526
+ deleteDocument?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType, Partial<MutationDeleteDocumentArgs>>;
3527
+ deleteDocuments?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType, Partial<MutationDeleteDocumentsArgs>>;
3528
+ execute?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType, RequireFields<MutationExecuteArgs, "actions">>;
3529
+ executeAsync?: Resolver<ResolversTypes["JobInfo"], ParentType, ContextType, RequireFields<MutationExecuteAsyncArgs, "actions">>;
3530
+ moveRelationship?: Resolver<ResolversTypes["MoveRelationshipResult"], ParentType, ContextType, RequireFields<MutationMoveRelationshipArgs, "relationshipType">>;
3013
3531
  mutateDocument?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType, RequireFields<MutationMutateDocumentArgs, "actions" | "documentIdentifier">>;
3014
3532
  mutateDocumentAsync?: Resolver<ResolversTypes["String"], ParentType, ContextType, RequireFields<MutationMutateDocumentAsyncArgs, "actions" | "documentIdentifier">>;
3015
3533
  pushSyncEnvelopes?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType, RequireFields<MutationPushSyncEnvelopesArgs, "envelopes">>;
3016
- removeRelationship?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType, RequireFields<MutationRemoveRelationshipArgs, "relationshipType" | "sourceIdentifier" | "targetIdentifier">>;
3017
- renameDocument?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType, RequireFields<MutationRenameDocumentArgs, "documentIdentifier" | "name">>;
3018
- setPreferredEditor?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType, RequireFields<MutationSetPreferredEditorArgs, "documentIdentifier">>;
3534
+ removeRelationship?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType, RequireFields<MutationRemoveRelationshipArgs, "relationshipType">>;
3535
+ renameDocument?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType, RequireFields<MutationRenameDocumentArgs, "name">>;
3536
+ setPreferredEditor?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType, Partial<MutationSetPreferredEditorArgs>>;
3019
3537
  touchChannel?: Resolver<ResolversTypes["TouchChannelResult"], ParentType, ContextType, RequireFields<MutationTouchChannelArgs, "input">>;
3538
+ updateRelationship?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType, RequireFields<MutationUpdateRelationshipArgs, "relationshipType">>;
3020
3539
  }>;
3021
- type OperationContextResolvers<ContextType = Context, ParentType extends ResolversParentTypes["OperationContext"] = ResolversParentTypes["OperationContext"]> = ResolversObject<{
3540
+ export type OperationContextResolvers<ContextType = Context, ParentType extends ResolversParentTypes["OperationContext"] = ResolversParentTypes["OperationContext"]> = ResolversObject<{
3022
3541
  branch?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3023
3542
  documentId?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3024
3543
  documentType?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3025
3544
  ordinal?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
3026
3545
  scope?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3027
3546
  }>;
3028
- type OperationWithContextResolvers<ContextType = Context, ParentType extends ResolversParentTypes["OperationWithContext"] = ResolversParentTypes["OperationWithContext"]> = ResolversObject<{
3547
+ export type OperationWithContextResolvers<ContextType = Context, ParentType extends ResolversParentTypes["OperationWithContext"] = ResolversParentTypes["OperationWithContext"]> = ResolversObject<{
3029
3548
  context?: Resolver<ResolversTypes["OperationContext"], ParentType, ContextType>;
3030
3549
  operation?: Resolver<ResolversTypes["ReactorOperation"], ParentType, ContextType>;
3031
3550
  }>;
3032
- type PhDocumentResolvers<ContextType = Context, ParentType extends ResolversParentTypes["PHDocument"] = ResolversParentTypes["PHDocument"]> = ResolversObject<{
3551
+ export type PhDocumentResolvers<ContextType = Context, ParentType extends ResolversParentTypes["PHDocument"] = ResolversParentTypes["PHDocument"]> = ResolversObject<{
3033
3552
  createdAtUtcIso?: Resolver<ResolversTypes["DateTime"], ParentType, ContextType>;
3034
3553
  documentType?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3035
3554
  id?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
@@ -3041,31 +3560,52 @@ type PhDocumentResolvers<ContextType = Context, ParentType extends ResolversPare
3041
3560
  slug?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
3042
3561
  state?: Resolver<ResolversTypes["JSONObject"], ParentType, ContextType>;
3043
3562
  }>;
3044
- type PhDocumentResultPageResolvers<ContextType = Context, ParentType extends ResolversParentTypes["PHDocumentResultPage"] = ResolversParentTypes["PHDocumentResultPage"]> = ResolversObject<{
3563
+ export type PhDocumentResultPageResolvers<ContextType = Context, ParentType extends ResolversParentTypes["PHDocumentResultPage"] = ResolversParentTypes["PHDocumentResultPage"]> = ResolversObject<{
3045
3564
  cursor?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
3046
3565
  hasNextPage?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
3047
3566
  hasPreviousPage?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
3048
3567
  items?: Resolver<ReadonlyArray<ResolversTypes["PHDocument"]>, ParentType, ContextType>;
3049
- totalCount?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
3050
3568
  }>;
3051
- type PollSyncEnvelopesResultResolvers<ContextType = Context, ParentType extends ResolversParentTypes["PollSyncEnvelopesResult"] = ResolversParentTypes["PollSyncEnvelopesResult"]> = ResolversObject<{
3569
+ export type PeerAgreementResolvers<ContextType = Context, ParentType extends ResolversParentTypes["PeerAgreement"] = ResolversParentTypes["PeerAgreement"]> = ResolversObject<{
3570
+ collectionId?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3571
+ limitedBy?: Resolver<ReadonlyArray<ResolversTypes["PeerAgreementLimit"]>, ParentType, ContextType>;
3572
+ local?: Resolver<ResolversTypes["JSONObject"], ParentType, ContextType>;
3573
+ members?: Resolver<ReadonlyArray<ResolversTypes["PeerAgreementMember"]>, ParentType, ContextType>;
3574
+ }>;
3575
+ export type PeerAgreementLimitResolvers<ContextType = Context, ParentType extends ResolversParentTypes["PeerAgreementLimit"] = ResolversParentTypes["PeerAgreementLimit"]> = ResolversObject<{
3576
+ protocol?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3577
+ remoteNames?: Resolver<ReadonlyArray<ResolversTypes["String"]>, ParentType, ContextType>;
3578
+ }>;
3579
+ export type PeerAgreementMemberResolvers<ContextType = Context, ParentType extends ResolversParentTypes["PeerAgreementMember"] = ResolversParentTypes["PeerAgreementMember"]> = ResolversObject<{
3580
+ announced?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
3581
+ features?: Resolver<ResolversTypes["JSONObject"], ParentType, ContextType>;
3582
+ protocols?: Resolver<ResolversTypes["JSONObject"], ParentType, ContextType>;
3583
+ remoteName?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3584
+ }>;
3585
+ export type PollSyncEnvelopesResultResolvers<ContextType = Context, ParentType extends ResolversParentTypes["PollSyncEnvelopesResult"] = ResolversParentTypes["PollSyncEnvelopesResult"]> = ResolversObject<{
3052
3586
  ackOrdinal?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
3053
3587
  deadLetters?: Resolver<ReadonlyArray<ResolversTypes["DeadLetterInfo"]>, ParentType, ContextType>;
3054
3588
  envelopes?: Resolver<ReadonlyArray<ResolversTypes["SyncEnvelope"]>, ParentType, ContextType>;
3055
3589
  hasMore?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
3590
+ manifestRevision?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
3591
+ peerManifestRevision?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
3056
3592
  }>;
3057
- type QueryResolvers<ContextType = Context, ParentType extends ResolversParentTypes["Query"] = ResolversParentTypes["Query"]> = ResolversObject<{
3058
- document?: Resolver<Maybe<ResolversTypes["DocumentWithChildren"]>, ParentType, ContextType, RequireFields<QueryDocumentArgs, "identifier">>;
3059
- documentIncomingRelationships?: Resolver<ResolversTypes["PHDocumentResultPage"], ParentType, ContextType, RequireFields<QueryDocumentIncomingRelationshipsArgs, "relationshipType" | "targetIdentifier">>;
3593
+ export type QueryResolvers<ContextType = Context, ParentType extends ResolversParentTypes["Query"] = ResolversParentTypes["Query"]> = ResolversObject<{
3594
+ document?: Resolver<Maybe<ResolversTypes["DocumentWithChildren"]>, ParentType, ContextType, Partial<QueryDocumentArgs>>;
3595
+ documentIncomingRelationshipEdges?: Resolver<ResolversTypes["DocumentRelationshipResultPage"], ParentType, ContextType, Partial<QueryDocumentIncomingRelationshipEdgesArgs>>;
3596
+ documentIncomingRelationships?: Resolver<ResolversTypes["PHDocumentResultPage"], ParentType, ContextType, RequireFields<QueryDocumentIncomingRelationshipsArgs, "relationshipType">>;
3060
3597
  documentModels?: Resolver<ResolversTypes["DocumentModelResultPage"], ParentType, ContextType, Partial<QueryDocumentModelsArgs>>;
3061
3598
  documentOperations?: Resolver<ResolversTypes["ReactorOperationResultPage"], ParentType, ContextType, RequireFields<QueryDocumentOperationsArgs, "filter">>;
3062
- documentOutgoingRelationships?: Resolver<ResolversTypes["PHDocumentResultPage"], ParentType, ContextType, RequireFields<QueryDocumentOutgoingRelationshipsArgs, "relationshipType" | "sourceIdentifier">>;
3063
- evaluateActions?: Resolver<ResolversTypes["ActionEvaluations"], ParentType, ContextType, RequireFields<QueryEvaluateActionsArgs, "candidates" | "documentIdentifier">>;
3599
+ documentOutgoingRelationshipEdges?: Resolver<ResolversTypes["DocumentRelationshipResultPage"], ParentType, ContextType, Partial<QueryDocumentOutgoingRelationshipEdgesArgs>>;
3600
+ documentOutgoingRelationships?: Resolver<ResolversTypes["PHDocumentResultPage"], ParentType, ContextType, RequireFields<QueryDocumentOutgoingRelationshipsArgs, "relationshipType">>;
3601
+ evaluateActions?: Resolver<ResolversTypes["ActionEvaluations"], ParentType, ContextType, RequireFields<QueryEvaluateActionsArgs, "candidates">>;
3064
3602
  findDocuments?: Resolver<ResolversTypes["PHDocumentResultPage"], ParentType, ContextType, Partial<QueryFindDocumentsArgs>>;
3065
3603
  jobStatus?: Resolver<Maybe<ResolversTypes["JobInfo"]>, ParentType, ContextType, RequireFields<QueryJobStatusArgs, "jobId">>;
3604
+ peerAgreement?: Resolver<ResolversTypes["PeerAgreement"], ParentType, ContextType, RequireFields<QueryPeerAgreementArgs, "collectionId">>;
3066
3605
  pollSyncEnvelopes?: Resolver<ResolversTypes["PollSyncEnvelopesResult"], ParentType, ContextType, RequireFields<QueryPollSyncEnvelopesArgs, "channelId" | "outboxAck" | "outboxLatest">>;
3606
+ syncHolds?: Resolver<ReadonlyArray<ResolversTypes["SyncHold"]>, ParentType, ContextType, Partial<QuerySyncHoldsArgs>>;
3067
3607
  }>;
3068
- type ReactorOperationResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ReactorOperation"] = ResolversParentTypes["ReactorOperation"]> = ResolversObject<{
3608
+ export type ReactorOperationResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ReactorOperation"] = ResolversParentTypes["ReactorOperation"]> = ResolversObject<{
3069
3609
  action?: Resolver<ResolversTypes["Action"], ParentType, ContextType>;
3070
3610
  deniedReason?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
3071
3611
  error?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
@@ -3075,41 +3615,40 @@ type ReactorOperationResolvers<ContextType = Context, ParentType extends Resolve
3075
3615
  skip?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
3076
3616
  timestampUtcMs?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3077
3617
  }>;
3078
- type ReactorOperationResultPageResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ReactorOperationResultPage"] = ResolversParentTypes["ReactorOperationResultPage"]> = ResolversObject<{
3618
+ export type ReactorOperationResultPageResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ReactorOperationResultPage"] = ResolversParentTypes["ReactorOperationResultPage"]> = ResolversObject<{
3079
3619
  cursor?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
3080
3620
  hasNextPage?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
3081
3621
  hasPreviousPage?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
3082
3622
  items?: Resolver<ReadonlyArray<ResolversTypes["ReactorOperation"]>, ParentType, ContextType>;
3083
- totalCount?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
3084
3623
  }>;
3085
- type ReactorSignerResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ReactorSigner"] = ResolversParentTypes["ReactorSigner"]> = ResolversObject<{
3624
+ export type ReactorSignerResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ReactorSigner"] = ResolversParentTypes["ReactorSigner"]> = ResolversObject<{
3086
3625
  app?: Resolver<Maybe<ResolversTypes["ReactorSignerApp"]>, ParentType, ContextType>;
3087
3626
  signatures?: Resolver<ReadonlyArray<ResolversTypes["String"]>, ParentType, ContextType>;
3088
3627
  user?: Resolver<Maybe<ResolversTypes["ReactorSignerUser"]>, ParentType, ContextType>;
3089
3628
  }>;
3090
- type ReactorSignerAppResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ReactorSignerApp"] = ResolversParentTypes["ReactorSignerApp"]> = ResolversObject<{
3629
+ export type ReactorSignerAppResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ReactorSignerApp"] = ResolversParentTypes["ReactorSignerApp"]> = ResolversObject<{
3091
3630
  key?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3092
3631
  name?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3093
3632
  }>;
3094
- type ReactorSignerUserResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ReactorSignerUser"] = ResolversParentTypes["ReactorSignerUser"]> = ResolversObject<{
3633
+ export type ReactorSignerUserResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ReactorSignerUser"] = ResolversParentTypes["ReactorSignerUser"]> = ResolversObject<{
3095
3634
  address?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3096
3635
  chainId?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
3097
3636
  networkId?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3098
3637
  }>;
3099
- type RemoteCursorResolvers<ContextType = Context, ParentType extends ResolversParentTypes["RemoteCursor"] = ResolversParentTypes["RemoteCursor"]> = ResolversObject<{
3638
+ export type RemoteCursorResolvers<ContextType = Context, ParentType extends ResolversParentTypes["RemoteCursor"] = ResolversParentTypes["RemoteCursor"]> = ResolversObject<{
3100
3639
  cursorOrdinal?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
3101
3640
  lastSyncedAtUtcMs?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
3102
3641
  remoteName?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3103
3642
  }>;
3104
- type RevisionResolvers<ContextType = Context, ParentType extends ResolversParentTypes["Revision"] = ResolversParentTypes["Revision"]> = ResolversObject<{
3643
+ export type RevisionResolvers<ContextType = Context, ParentType extends ResolversParentTypes["Revision"] = ResolversParentTypes["Revision"]> = ResolversObject<{
3105
3644
  revision?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
3106
3645
  scope?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3107
3646
  }>;
3108
- type SubscriptionResolvers<ContextType = Context, ParentType extends ResolversParentTypes["Subscription"] = ResolversParentTypes["Subscription"]> = ResolversObject<{
3647
+ export type SubscriptionResolvers<ContextType = Context, ParentType extends ResolversParentTypes["Subscription"] = ResolversParentTypes["Subscription"]> = ResolversObject<{
3109
3648
  documentChanges?: SubscriptionResolver<ResolversTypes["DocumentChangeEvent"], "documentChanges", ParentType, ContextType, Partial<SubscriptionDocumentChangesArgs>>;
3110
3649
  jobChanges?: SubscriptionResolver<ResolversTypes["JobChangeEvent"], "jobChanges", ParentType, ContextType, RequireFields<SubscriptionJobChangesArgs, "jobId">>;
3111
3650
  }>;
3112
- type SyncEnvelopeResolvers<ContextType = Context, ParentType extends ResolversParentTypes["SyncEnvelope"] = ResolversParentTypes["SyncEnvelope"]> = ResolversObject<{
3651
+ export type SyncEnvelopeResolvers<ContextType = Context, ParentType extends ResolversParentTypes["SyncEnvelope"] = ResolversParentTypes["SyncEnvelope"]> = ResolversObject<{
3113
3652
  channelMeta?: Resolver<ResolversTypes["ChannelMeta"], ParentType, ContextType>;
3114
3653
  cursor?: Resolver<Maybe<ResolversTypes["RemoteCursor"]>, ParentType, ContextType>;
3115
3654
  dependsOn?: Resolver<Maybe<ReadonlyArray<ResolversTypes["String"]>>, ParentType, ContextType>;
@@ -3117,11 +3656,24 @@ type SyncEnvelopeResolvers<ContextType = Context, ParentType extends ResolversPa
3117
3656
  operations?: Resolver<Maybe<ReadonlyArray<ResolversTypes["OperationWithContext"]>>, ParentType, ContextType>;
3118
3657
  type?: Resolver<ResolversTypes["SyncEnvelopeType"], ParentType, ContextType>;
3119
3658
  }>;
3120
- type TouchChannelResultResolvers<ContextType = Context, ParentType extends ResolversParentTypes["TouchChannelResult"] = ResolversParentTypes["TouchChannelResult"]> = ResolversObject<{
3659
+ export type SyncHoldResolvers<ContextType = Context, ParentType extends ResolversParentTypes["SyncHold"] = ResolversParentTypes["SyncHold"]> = ResolversObject<{
3660
+ branch?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3661
+ documentId?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3662
+ heldAtUtcMs?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3663
+ reason?: Resolver<ResolversTypes["SyncHoldReason"], ParentType, ContextType>;
3664
+ remoteName?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3665
+ }>;
3666
+ export type SyncHoldReasonResolvers<ContextType = Context, ParentType extends ResolversParentTypes["SyncHoldReason"] = ResolversParentTypes["SyncHoldReason"]> = ResolversObject<{
3667
+ peerSupports?: Resolver<ReadonlyArray<ResolversTypes["Int"]>, ParentType, ContextType>;
3668
+ protocol?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3669
+ version?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
3670
+ }>;
3671
+ export type TouchChannelResultResolvers<ContextType = Context, ParentType extends ResolversParentTypes["TouchChannelResult"] = ResolversParentTypes["TouchChannelResult"]> = ResolversObject<{
3121
3672
  ackOrdinal?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
3673
+ manifest?: Resolver<Maybe<ResolversTypes["JSONObject"]>, ParentType, ContextType>;
3122
3674
  success?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
3123
3675
  }>;
3124
- type Resolvers<ContextType = Context> = ResolversObject<{
3676
+ export type Resolvers<ContextType = Context> = ResolversObject<{
3125
3677
  Action?: ActionResolvers<ContextType>;
3126
3678
  ActionContext?: ActionContextResolvers<ContextType>;
3127
3679
  ActionEvaluation?: ActionEvaluationResolvers<ContextType>;
@@ -3133,6 +3685,8 @@ type Resolvers<ContextType = Context> = ResolversObject<{
3133
3685
  DocumentChangeEvent?: DocumentChangeEventResolvers<ContextType>;
3134
3686
  DocumentModelGlobalState?: DocumentModelGlobalStateResolvers<ContextType>;
3135
3687
  DocumentModelResultPage?: DocumentModelResultPageResolvers<ContextType>;
3688
+ DocumentRelationship?: DocumentRelationshipResolvers<ContextType>;
3689
+ DocumentRelationshipResultPage?: DocumentRelationshipResultPageResolvers<ContextType>;
3136
3690
  DocumentWithChildren?: DocumentWithChildrenResolvers<ContextType>;
3137
3691
  JSONObject?: GraphQLScalarType;
3138
3692
  JobChangeEvent?: JobChangeEventResolvers<ContextType>;
@@ -3143,6 +3697,9 @@ type Resolvers<ContextType = Context> = ResolversObject<{
3143
3697
  OperationWithContext?: OperationWithContextResolvers<ContextType>;
3144
3698
  PHDocument?: PhDocumentResolvers<ContextType>;
3145
3699
  PHDocumentResultPage?: PhDocumentResultPageResolvers<ContextType>;
3700
+ PeerAgreement?: PeerAgreementResolvers<ContextType>;
3701
+ PeerAgreementLimit?: PeerAgreementLimitResolvers<ContextType>;
3702
+ PeerAgreementMember?: PeerAgreementMemberResolvers<ContextType>;
3146
3703
  PollSyncEnvelopesResult?: PollSyncEnvelopesResultResolvers<ContextType>;
3147
3704
  Query?: QueryResolvers<ContextType>;
3148
3705
  ReactorOperation?: ReactorOperationResolvers<ContextType>;
@@ -3154,68 +3711,77 @@ type Resolvers<ContextType = Context> = ResolversObject<{
3154
3711
  Revision?: RevisionResolvers<ContextType>;
3155
3712
  Subscription?: SubscriptionResolvers<ContextType>;
3156
3713
  SyncEnvelope?: SyncEnvelopeResolvers<ContextType>;
3714
+ SyncHold?: SyncHoldResolvers<ContextType>;
3715
+ SyncHoldReason?: SyncHoldReasonResolvers<ContextType>;
3157
3716
  TouchChannelResult?: TouchChannelResultResolvers<ContextType>;
3158
3717
  }>;
3159
- type Properties<T> = Required<{ [K in keyof T]: z$1.ZodType<T[K]> }>;
3718
+ type Properties<T> = Required<{ [K in keyof T]: z$1.ZodType<T[K]>; }>;
3160
3719
  type definedNonNullAny = {};
3161
- declare const isDefinedNonNullAny: (v: any) => v is definedNonNullAny;
3162
- declare const definedNonNullAnySchema: z$1.ZodAny & z$1.ZodType<definedNonNullAny, any, z$1.core.$ZodTypeInternals<definedNonNullAny, any>>;
3163
- declare const AuthDecisionSchema: z$1.ZodEnum<typeof AuthDecision>;
3164
- declare const DocumentChangeTypeSchema: z$1.ZodEnum<typeof DocumentChangeType>;
3165
- declare const PropagationModeSchema: z$1.ZodEnum<typeof PropagationMode>;
3166
- declare const SyncEnvelopeTypeSchema: z$1.ZodEnum<typeof SyncEnvelopeType>;
3167
- declare function ActionCandidateInputSchema(): z$1.ZodObject<Properties<ActionCandidateInput>>;
3168
- declare function ActionContextInputSchema(): z$1.ZodObject<Properties<ActionContextInput>>;
3169
- declare function ActionInputSchema(): z$1.ZodObject<Properties<ActionInput>>;
3170
- declare function ChannelMetaInputSchema(): z$1.ZodObject<Properties<ChannelMetaInput>>;
3171
- declare function DocumentOperationsFilterInputSchema(): z$1.ZodObject<Properties<DocumentOperationsFilterInput>>;
3172
- declare function OperationContextInputSchema(): z$1.ZodObject<Properties<OperationContextInput>>;
3173
- declare function OperationInputSchema(): z$1.ZodObject<Properties<OperationInput>>;
3174
- declare function OperationWithContextInputSchema(): z$1.ZodObject<Properties<OperationWithContextInput>>;
3175
- declare function OperationsFilterInputSchema(): z$1.ZodObject<Properties<OperationsFilterInput>>;
3176
- declare function PagingInputSchema(): z$1.ZodObject<Properties<PagingInput>>;
3177
- declare function ReactorSignerAppInputSchema(): z$1.ZodObject<Properties<ReactorSignerAppInput>>;
3178
- declare function ReactorSignerInputSchema(): z$1.ZodObject<Properties<ReactorSignerInput>>;
3179
- declare function ReactorSignerUserInputSchema(): z$1.ZodObject<Properties<ReactorSignerUserInput>>;
3180
- declare function RemoteCursorInputSchema(): z$1.ZodObject<Properties<RemoteCursorInput>>;
3181
- declare function RemoteFilterInputSchema(): z$1.ZodObject<Properties<RemoteFilterInput>>;
3182
- declare function SearchFilterInputSchema(): z$1.ZodObject<Properties<SearchFilterInput>>;
3183
- declare function SyncEnvelopeInputSchema(): z$1.ZodObject<Properties<SyncEnvelopeInput>>;
3184
- declare function TouchChannelInputSchema(): z$1.ZodObject<Properties<TouchChannelInput>>;
3185
- declare function ViewFilterInputSchema(): z$1.ZodObject<Properties<ViewFilterInput>>;
3186
- declare const PhDocumentFieldsFragmentDoc: DocumentNode;
3187
- declare const GetDocumentModelsDocument: DocumentNode;
3188
- declare const GetDocumentDocument: DocumentNode;
3189
- declare const GetDocumentWithOperationsDocument: DocumentNode;
3190
- declare const GetDocumentOutgoingRelationshipsDocument: DocumentNode;
3191
- declare const GetDocumentIncomingRelationshipsDocument: DocumentNode;
3192
- declare const FindDocumentsDocument: DocumentNode;
3193
- declare const GetDocumentOperationsDocument: DocumentNode;
3194
- declare const GetJobStatusDocument: DocumentNode;
3195
- declare const EvaluateActionsDocument: DocumentNode;
3196
- declare const CreateDocumentDocument: DocumentNode;
3197
- declare const CreateEmptyDocumentDocument: DocumentNode;
3198
- declare const MutateDocumentDocument: DocumentNode;
3199
- declare const MutateDocumentAsyncDocument: DocumentNode;
3200
- declare const RenameDocumentDocument: DocumentNode;
3201
- declare const SetPreferredEditorDocument: DocumentNode;
3202
- declare const AddRelationshipDocument: DocumentNode;
3203
- declare const RemoveRelationshipDocument: DocumentNode;
3204
- declare const MoveRelationshipDocument: DocumentNode;
3205
- declare const DeleteDocumentDocument: DocumentNode;
3206
- declare const DeleteDocumentsDocument: DocumentNode;
3207
- declare const DocumentChangesDocument: DocumentNode;
3208
- declare const JobChangesDocument: DocumentNode;
3209
- declare const PollSyncEnvelopesDocument: DocumentNode;
3210
- declare const TouchChannelDocument: DocumentNode;
3211
- declare const PushSyncEnvelopesDocument: DocumentNode;
3212
- type Requester<C = {}> = <R, V>(doc: DocumentNode, vars?: V, options?: C) => Promise<R> | AsyncIterable<R>;
3213
- declare function getSdk<C>(requester: Requester<C>): {
3720
+ export declare const isDefinedNonNullAny: (v: any) => v is definedNonNullAny;
3721
+ export declare const definedNonNullAnySchema: z$1.ZodAny & z$1.ZodType<definedNonNullAny, any, z$1.core.$ZodTypeInternals<definedNonNullAny, any>>;
3722
+ export declare const AuthDecisionSchema: z$1.ZodEnum<typeof AuthDecision>;
3723
+ export declare const DocumentChangeTypeSchema: z$1.ZodEnum<typeof DocumentChangeType>;
3724
+ export declare const PropagationModeSchema: z$1.ZodEnum<typeof PropagationMode>;
3725
+ export declare const SyncEnvelopeTypeSchema: z$1.ZodEnum<typeof SyncEnvelopeType>;
3726
+ export declare function ActionCandidateInputSchema(): z$1.ZodObject<Properties<ActionCandidateInput>>;
3727
+ export declare function ActionContextInputSchema(): z$1.ZodObject<Properties<ActionContextInput>>;
3728
+ export declare function ActionInputSchema(): z$1.ZodObject<Properties<ActionInput>>;
3729
+ export declare function ChannelMetaInputSchema(): z$1.ZodObject<Properties<ChannelMetaInput>>;
3730
+ export declare function DocumentOperationsFilterInputSchema(): z$1.ZodObject<Properties<DocumentOperationsFilterInput>>;
3731
+ export declare function OperationContextInputSchema(): z$1.ZodObject<Properties<OperationContextInput>>;
3732
+ export declare function OperationInputSchema(): z$1.ZodObject<Properties<OperationInput>>;
3733
+ export declare function OperationWithContextInputSchema(): z$1.ZodObject<Properties<OperationWithContextInput>>;
3734
+ export declare function OperationsFilterInputSchema(): z$1.ZodObject<Properties<OperationsFilterInput>>;
3735
+ export declare function PagingInputSchema(): z$1.ZodObject<Properties<PagingInput>>;
3736
+ export declare function ReactorSignerAppInputSchema(): z$1.ZodObject<Properties<ReactorSignerAppInput>>;
3737
+ export declare function ReactorSignerInputSchema(): z$1.ZodObject<Properties<ReactorSignerInput>>;
3738
+ export declare function ReactorSignerUserInputSchema(): z$1.ZodObject<Properties<ReactorSignerUserInput>>;
3739
+ export declare function RemoteCursorInputSchema(): z$1.ZodObject<Properties<RemoteCursorInput>>;
3740
+ export declare function RemoteFilterInputSchema(): z$1.ZodObject<Properties<RemoteFilterInput>>;
3741
+ export declare function SearchFilterInputSchema(): z$1.ZodObject<Properties<SearchFilterInput>>;
3742
+ export declare function SyncEnvelopeInputSchema(): z$1.ZodObject<Properties<SyncEnvelopeInput>>;
3743
+ export declare function SyncRefusalInputSchema(): z$1.ZodObject<Properties<SyncRefusalInput>>;
3744
+ export declare function TouchChannelInputSchema(): z$1.ZodObject<Properties<TouchChannelInput>>;
3745
+ export declare function ViewFilterInputSchema(): z$1.ZodObject<Properties<ViewFilterInput>>;
3746
+ export declare const PhDocumentFieldsFragmentDoc: DocumentNode;
3747
+ export declare const DocumentRelationshipFieldsFragmentDoc: DocumentNode;
3748
+ export declare const GetDocumentModelsDocument: DocumentNode;
3749
+ export declare const GetDocumentDocument: DocumentNode;
3750
+ export declare const GetDocumentWithOperationsDocument: DocumentNode;
3751
+ export declare const GetDocumentOutgoingRelationshipsDocument: DocumentNode;
3752
+ export declare const GetDocumentIncomingRelationshipsDocument: DocumentNode;
3753
+ export declare const GetDocumentOutgoingRelationshipEdgesDocument: DocumentNode;
3754
+ export declare const GetDocumentIncomingRelationshipEdgesDocument: DocumentNode;
3755
+ export declare const FindDocumentsDocument: DocumentNode;
3756
+ export declare const GetDocumentOperationsDocument: DocumentNode;
3757
+ export declare const GetJobStatusDocument: DocumentNode;
3758
+ export declare const EvaluateActionsDocument: DocumentNode;
3759
+ export declare const CreateDocumentDocument: DocumentNode;
3760
+ export declare const CreateEmptyDocumentDocument: DocumentNode;
3761
+ export declare const MutateDocumentDocument: DocumentNode;
3762
+ export declare const MutateDocumentAsyncDocument: DocumentNode;
3763
+ export declare const RenameDocumentDocument: DocumentNode;
3764
+ export declare const SetPreferredEditorDocument: DocumentNode;
3765
+ export declare const AddRelationshipDocument: DocumentNode;
3766
+ export declare const UpdateRelationshipDocument: DocumentNode;
3767
+ export declare const RemoveRelationshipDocument: DocumentNode;
3768
+ export declare const MoveRelationshipDocument: DocumentNode;
3769
+ export declare const DeleteDocumentDocument: DocumentNode;
3770
+ export declare const DeleteDocumentsDocument: DocumentNode;
3771
+ export declare const DocumentChangesDocument: DocumentNode;
3772
+ export declare const JobChangesDocument: DocumentNode;
3773
+ export declare const PollSyncEnvelopesDocument: DocumentNode;
3774
+ export declare const TouchChannelDocument: DocumentNode;
3775
+ export declare const PushSyncEnvelopesDocument: DocumentNode;
3776
+ export type Requester<C = {}> = <R, V>(doc: DocumentNode, vars?: V, options?: C) => Promise<R> | AsyncIterable<R>;
3777
+ export declare function getSdk<C>(requester: Requester<C>): {
3214
3778
  GetDocumentModels(variables?: GetDocumentModelsQueryVariables, options?: C): Promise<GetDocumentModelsQuery>;
3215
3779
  GetDocument(variables: GetDocumentQueryVariables, options?: C): Promise<GetDocumentQuery>;
3216
3780
  GetDocumentWithOperations(variables: GetDocumentWithOperationsQueryVariables, options?: C): Promise<GetDocumentWithOperationsQuery>;
3217
3781
  GetDocumentOutgoingRelationships(variables: GetDocumentOutgoingRelationshipsQueryVariables, options?: C): Promise<GetDocumentOutgoingRelationshipsQuery>;
3218
3782
  GetDocumentIncomingRelationships(variables: GetDocumentIncomingRelationshipsQueryVariables, options?: C): Promise<GetDocumentIncomingRelationshipsQuery>;
3783
+ GetDocumentOutgoingRelationshipEdges(variables: GetDocumentOutgoingRelationshipEdgesQueryVariables, options?: C): Promise<GetDocumentOutgoingRelationshipEdgesQuery>;
3784
+ GetDocumentIncomingRelationshipEdges(variables: GetDocumentIncomingRelationshipEdgesQueryVariables, options?: C): Promise<GetDocumentIncomingRelationshipEdgesQuery>;
3219
3785
  FindDocuments(variables?: FindDocumentsQueryVariables, options?: C): Promise<FindDocumentsQuery>;
3220
3786
  GetDocumentOperations(variables: GetDocumentOperationsQueryVariables, options?: C): Promise<GetDocumentOperationsQuery>;
3221
3787
  GetJobStatus(variables: GetJobStatusQueryVariables, options?: C): Promise<GetJobStatusQuery>;
@@ -3227,6 +3793,7 @@ declare function getSdk<C>(requester: Requester<C>): {
3227
3793
  RenameDocument(variables: RenameDocumentMutationVariables, options?: C): Promise<RenameDocumentMutation>;
3228
3794
  SetPreferredEditor(variables: SetPreferredEditorMutationVariables, options?: C): Promise<SetPreferredEditorMutation>;
3229
3795
  AddRelationship(variables: AddRelationshipMutationVariables, options?: C): Promise<AddRelationshipMutation>;
3796
+ UpdateRelationship(variables: UpdateRelationshipMutationVariables, options?: C): Promise<UpdateRelationshipMutation>;
3230
3797
  RemoveRelationship(variables: RemoveRelationshipMutationVariables, options?: C): Promise<RemoveRelationshipMutation>;
3231
3798
  MoveRelationship(variables: MoveRelationshipMutationVariables, options?: C): Promise<MoveRelationshipMutation>;
3232
3799
  DeleteDocument(variables: DeleteDocumentMutationVariables, options?: C): Promise<DeleteDocumentMutation>;
@@ -3237,13 +3804,13 @@ declare function getSdk<C>(requester: Requester<C>): {
3237
3804
  TouchChannel(variables: TouchChannelMutationVariables, options?: C): Promise<TouchChannelMutation>;
3238
3805
  PushSyncEnvelopes(variables: PushSyncEnvelopesMutationVariables, options?: C): Promise<PushSyncEnvelopesMutation>;
3239
3806
  };
3240
- type Sdk = ReturnType<typeof getSdk>;
3807
+ export type Sdk = ReturnType<typeof getSdk>;
3241
3808
  //#endregion
3242
3809
  //#region src/graphql/reactor/requester.d.ts
3243
3810
  type FetchLike = (input: URL | string, init: RequestInit) => Promise<Response>;
3244
3811
  //#endregion
3245
3812
  //#region src/graphql/reactor/factory.d.ts
3246
- declare function createReactorGraphQLClient(url: string, fetchImpl?: FetchLike, headers?: Record<string, string>): {
3813
+ export declare function createReactorGraphQLClient(url: string, fetchImpl?: FetchLike, headers?: Record<string, string>): {
3247
3814
  GetDocumentModels(variables?: Exact<{
3248
3815
  namespace?: InputMaybe<Scalars["String"]["input"]>;
3249
3816
  paging?: InputMaybe<PagingInput>;
@@ -3270,6 +3837,18 @@ declare function createReactorGraphQLClient(url: string, fetchImpl?: FetchLike,
3270
3837
  view?: InputMaybe<ViewFilterInput>;
3271
3838
  paging?: InputMaybe<PagingInput>;
3272
3839
  }>, options?: {} | undefined): Promise<GetDocumentIncomingRelationshipsQuery>;
3840
+ GetDocumentOutgoingRelationshipEdges(variables: Exact<{
3841
+ sourceIdentifier: Scalars["String"]["input"];
3842
+ relationshipType?: InputMaybe<Scalars["String"]["input"]>;
3843
+ view?: InputMaybe<ViewFilterInput>;
3844
+ paging?: InputMaybe<PagingInput>;
3845
+ }>, options?: {} | undefined): Promise<GetDocumentOutgoingRelationshipEdgesQuery>;
3846
+ GetDocumentIncomingRelationshipEdges(variables: Exact<{
3847
+ targetIdentifier: Scalars["String"]["input"];
3848
+ relationshipType?: InputMaybe<Scalars["String"]["input"]>;
3849
+ view?: InputMaybe<ViewFilterInput>;
3850
+ paging?: InputMaybe<PagingInput>;
3851
+ }>, options?: {} | undefined): Promise<GetDocumentIncomingRelationshipEdgesQuery>;
3273
3852
  FindDocuments(variables?: Exact<{
3274
3853
  search?: InputMaybe<SearchFilterInput>;
3275
3854
  view?: InputMaybe<ViewFilterInput>;
@@ -3319,8 +3898,16 @@ declare function createReactorGraphQLClient(url: string, fetchImpl?: FetchLike,
3319
3898
  sourceIdentifier: Scalars["String"]["input"];
3320
3899
  targetIdentifier: Scalars["String"]["input"];
3321
3900
  relationshipType: Scalars["String"]["input"];
3901
+ metadata?: InputMaybe<Scalars["JSONObject"]["input"]>;
3322
3902
  branch?: InputMaybe<Scalars["String"]["input"]>;
3323
3903
  }>, options?: {} | undefined): Promise<AddRelationshipMutation>;
3904
+ UpdateRelationship(variables: Exact<{
3905
+ sourceIdentifier: Scalars["String"]["input"];
3906
+ targetIdentifier: Scalars["String"]["input"];
3907
+ relationshipType: Scalars["String"]["input"];
3908
+ metadata?: InputMaybe<Scalars["JSONObject"]["input"]>;
3909
+ branch?: InputMaybe<Scalars["String"]["input"]>;
3910
+ }>, options?: {} | undefined): Promise<UpdateRelationshipMutation>;
3324
3911
  RemoveRelationship(variables: Exact<{
3325
3912
  sourceIdentifier: Scalars["String"]["input"];
3326
3913
  targetIdentifier: Scalars["String"]["input"];
@@ -3353,40 +3940,59 @@ declare function createReactorGraphQLClient(url: string, fetchImpl?: FetchLike,
3353
3940
  channelId: Scalars["String"]["input"];
3354
3941
  outboxAck: Scalars["Int"]["input"];
3355
3942
  outboxLatest: Scalars["Int"]["input"];
3943
+ manifestRevision?: InputMaybe<Scalars["String"]["input"]>;
3944
+ refusals?: InputMaybe<ReadonlyArray<SyncRefusalInput>>;
3356
3945
  }>, options?: {} | undefined): Promise<PollSyncEnvelopesQuery>;
3357
3946
  TouchChannel(variables: Exact<{
3358
3947
  input: TouchChannelInput;
3359
3948
  }>, options?: {} | undefined): Promise<TouchChannelMutation>;
3360
3949
  PushSyncEnvelopes(variables: Exact<{
3361
3950
  envelopes: ReadonlyArray<SyncEnvelopeInput>;
3951
+ peerManifestRevision?: InputMaybe<Scalars["String"]["input"]>;
3362
3952
  }>, options?: {} | undefined): Promise<PushSyncEnvelopesMutation>;
3363
3953
  };
3364
3954
  //#endregion
3365
3955
  //#region src/graphql/reactor/subgraph.d.ts
3366
- declare class ReactorSubgraph extends BaseSubgraph {
3956
+ export declare class ReactorSubgraph extends BaseSubgraph {
3367
3957
  #private;
3368
3958
  private logger;
3369
3959
  constructor(args: SubgraphArgs);
3370
3960
  name: string;
3371
3961
  hasSubscriptions: boolean;
3962
+ private get documentChanges();
3372
3963
  /**
3373
3964
  * Check operation-level permissions for an array of actions.
3374
3965
  * Delegates to base assertCanExecuteOperation for each action.
3375
3966
  */
3376
3967
  private assertCanExecuteOperations;
3377
- typeDefs: graphql.DocumentNode;
3968
+ /**
3969
+ * Drops the relationship edges whose far-end document the caller cannot read.
3970
+ *
3971
+ * An edge names two documents, so returning it discloses the far end's id. The
3972
+ * document-shaped relationship queries already withhold far-end documents the
3973
+ * caller cannot read; the edge-shaped queries have to withhold the same ones,
3974
+ * or they become a way to enumerate around that check. Supreme admins read
3975
+ * everything, so the per-edge check is skipped for them.
3976
+ *
3977
+ * The cursor describes where to resume in the underlying unfiltered stream,
3978
+ * so it is left as it came. A filtered page is therefore often shorter than
3979
+ * the requested limit, and that is the stream continuing rather than a sign
3980
+ * it ended.
3981
+ */
3982
+ private filterRelationshipEdges;
3983
+ typeDefs: import("graphql").DocumentNode;
3378
3984
  resolvers: Resolvers;
3379
3985
  onSetup(): Promise<void>;
3380
3986
  }
3381
3987
  //#endregion
3382
3988
  //#region src/graphql/system/env/index.d.ts
3383
- declare const ADMIN_USERS: string[];
3989
+ export declare const ADMIN_USERS: string[];
3384
3990
  //#endregion
3385
3991
  //#region src/graphql/system/subgraph.d.ts
3386
- declare class SystemSubgraph extends BaseSubgraph {
3992
+ export declare class SystemSubgraph extends BaseSubgraph {
3387
3993
  name: string;
3388
3994
  hasSubscriptions: boolean;
3389
- typeDefs: graphql.DocumentNode;
3995
+ typeDefs: import("graphql").DocumentNode;
3390
3996
  resolvers: {
3391
3997
  Query: {
3392
3998
  system: () => {
@@ -3399,28 +4005,85 @@ declare class SystemSubgraph extends BaseSubgraph {
3399
4005
  }
3400
4006
  //#endregion
3401
4007
  //#region src/graphql/system/version.d.ts
3402
- declare function getVersion(): string;
3403
- declare function getGitHash(): string;
3404
- declare function getGitUrl(): string | null;
4008
+ export declare function getVersion(): string;
4009
+ export declare function getGitHash(): string;
4010
+ export declare function getGitUrl(): string | null;
3405
4011
  //#endregion
3406
4012
  //#region src/graphql/utils.d.ts
3407
- declare function isSubgraphClass(candidate: unknown): candidate is SubgraphClass$1;
3408
- declare function buildGraphqlOperations(operations: Operation[], skip: number, first: number): GqlOperation$1[];
3409
- declare function buildGraphqlOperation(operation: Operation): GqlOperation$1;
3410
- declare function buildGraphQlDocument(doc: PHDocument): GqlDocument$1;
3411
- declare function buildGraphQlDriveDocument(doc: DocumentDriveDocument): GqlDriveDocument$1;
4013
+ export declare function isSubgraphClass(candidate: unknown): candidate is SubgraphClass$1;
4014
+ export declare function buildGraphqlOperations(operations: Operation[], skip: number, first: number): GqlOperation$1[];
4015
+ export declare function buildGraphqlOperation(operation: Operation): GqlOperation$1;
4016
+ export declare function buildGraphQlDocument(doc: PHDocument): GqlDocument$1;
4017
+ export declare function buildGraphQlDriveDocument(doc: DocumentDriveDocument): GqlDriveDocument$1;
4018
+ //#endregion
4019
+ //#region src/graphql/errors.d.ts
4020
+ /** Caller (authenticated or anonymous) lacks permission for the document. */
4021
+ export declare class ForbiddenError extends GraphQLError {
4022
+ constructor(detail?: string);
4023
+ }
4024
+ /** Anonymous caller on an action that requires logging in. */
4025
+ export declare class AuthenticationRequiredError extends GraphQLError {
4026
+ constructor(detail?: string);
4027
+ }
4028
+ /**
4029
+ * The reactor holds no decision model, so no authorization preflight can be
4030
+ * answered.
4031
+ *
4032
+ * Distinct from a denial, and deliberately so: a caller that cannot get a
4033
+ * prediction should render its controls as it did before it asked and let the
4034
+ * submit path refuse. Reading this as a denial would disable every control on a
4035
+ * switchboard running without authEnforcement. The code is what a client
4036
+ * branches on, since the message is not a contract.
4037
+ */
4038
+ export declare class AuthEvaluationUnsupportedError extends GraphQLError {
4039
+ constructor();
4040
+ }
4041
+ /**
4042
+ * A stored operation cannot be represented in the schema, so it is reported
4043
+ * rather than served.
4044
+ *
4045
+ * The schema declares an action's id, type, timestamp, input and scope
4046
+ * non-null; an operation written before the API rejected an action without an
4047
+ * id violates that. Left to the executor, the missing value nullifies the
4048
+ * action, which bubbles up through the non-null chain until it nullifies the
4049
+ * envelope's whole operation list, and the caller receives a partial response
4050
+ * beside "Cannot return null for non-nullable field Action.id" - which says
4051
+ * nothing about which operation, and which a sync client can only read as a
4052
+ * permanent GraphQL rejection, stopping its poll timer for good.
4053
+ *
4054
+ * Thrown instead, with a code that says the failure is worth polling through:
4055
+ * the document holding the operation needs repairing, but the channel serves
4056
+ * every other document, and a peer that stopped polling would stop receiving
4057
+ * those too. The code is what a client branches on, since the message is not a
4058
+ * contract.
4059
+ */
4060
+ export declare class MalformedStoredOperationError extends GraphQLError {
4061
+ constructor(detail: string);
4062
+ }
4063
+ /**
4064
+ * The marker refusals a poll carried were not recorded, so the poll fails.
4065
+ * The code is recoverable: the client keeps polling and reports them again.
4066
+ */
4067
+ export declare class RefusalNotRecordedError extends GraphQLError {
4068
+ constructor(cause: unknown);
4069
+ }
3412
4070
  //#endregion
3413
4071
  //#region src/packages/import-loader.d.ts
3414
4072
  /**
3415
4073
  * This class is used to load packages using the import keyword.
3416
4074
  */
3417
- declare class ImportPackageLoader implements IPackageLoader {
4075
+ export declare class ImportPackageLoader implements IPackageLoader {
4076
+ private readonly hostDir;
3418
4077
  private readonly logger;
3419
4078
  readonly name = "ImportPackageLoader";
4079
+ constructor(hostDir?: string);
4080
+ private readonly reportedUnbuilt;
3420
4081
  loadDocumentModels(identifier: string): Promise<DocumentModelModule[]>;
3421
4082
  loadUpgradeManifests(identifier: string): Promise<UpgradeManifest<readonly number[]>[]>;
3422
4083
  loadSubgraphs(identifier: string): Promise<SubgraphClass$1[]>;
3423
4084
  loadProcessors(identifier: string): Promise<ProcessorFactoryBuilder | null>;
4085
+ loadPieces(identifier: string): Promise<PackagePieceEntry[]>;
4086
+ private reportUnbuilt;
3424
4087
  }
3425
4088
  //#endregion
3426
4089
  //#region src/packages/package-manager.d.ts
@@ -3436,10 +4099,10 @@ declare class ImportPackageLoader implements IPackageLoader {
3436
4099
  * either bare (`'pkg'`) or as a subpath (`'pkg/subgraphs'`), since loaders
3437
4100
  * import sub-entries like `${pkg}/subgraphs` / `${pkg}/document-models`.
3438
4101
  */
3439
- declare function isExpectedLoaderMiss(error: unknown, pkg: string): boolean;
3440
- declare function getUniqueDocumentModels(...documentModels: readonly (readonly DocumentModelModule<any>[])[]): DocumentModelModule[];
3441
- declare function getUniqueUpgradeManifests(...upgradeManifests: readonly (readonly UpgradeManifest<readonly number[]>[])[]): UpgradeManifest<readonly number[]>[];
3442
- declare class PackageManager implements IPackageManager {
4102
+ export declare function isExpectedLoaderMiss(error: unknown, pkg: string, subPath?: string): boolean;
4103
+ export declare function getUniqueDocumentModels(...documentModels: readonly (readonly DocumentModelModule<any>[])[]): DocumentModelModule[];
4104
+ export declare function getUniqueUpgradeManifests(...upgradeManifests: readonly (readonly UpgradeManifest<readonly number[]>[])[]): UpgradeManifest<readonly number[]>[];
4105
+ export declare class PackageManager implements IPackageManager {
3443
4106
  protected options: IPackageManagerOptions;
3444
4107
  private readonly logger;
3445
4108
  private loaders;
@@ -3447,6 +4110,7 @@ declare class PackageManager implements IPackageManager {
3447
4110
  private upgradeManifestsMap;
3448
4111
  private subgraphsMap;
3449
4112
  private processorMap;
4113
+ private piecesMap;
3450
4114
  private configWatcher;
3451
4115
  private debouncedUpdateCallbacks;
3452
4116
  private eventEmitter;
@@ -3459,10 +4123,12 @@ declare class PackageManager implements IPackageManager {
3459
4123
  private loadUpgradeManifests;
3460
4124
  private loadSubgraphs;
3461
4125
  private loadProcessors;
4126
+ private loadPieces;
3462
4127
  private maybeWarnAllLoadersFailed;
3463
4128
  private updateDocumentModelsForPackage;
3464
4129
  private updateSubgraphsForPackage;
3465
4130
  private updateProcessorsForPackage;
4131
+ private updatePiecesForPackage;
3466
4132
  /** Debounced per key so repeated subscribePackages calls reuse one timer. */
3467
4133
  private getDebouncedUpdateCallback;
3468
4134
  private subscribePackages;
@@ -3472,6 +4138,9 @@ declare class PackageManager implements IPackageManager {
3472
4138
  private updatePackagesMap;
3473
4139
  private updateSubgraphsMap;
3474
4140
  private updateProcessorsMap;
4141
+ private updatePiecesMap;
4142
+ /** The pieces every loaded package ships, keyed by the package. */
4143
+ getPieces(): Map<string, PackagePieceEntry[]>;
3475
4144
  /**
3476
4145
  * Remove `pkg` from all package maps and emit the change events, tearing
3477
4146
  * down everything the package registered (subgraphs, processors, document
@@ -3482,28 +4151,29 @@ declare class PackageManager implements IPackageManager {
3482
4151
  onDocumentModelsChange(handler: (documentModels: Record<string, DocumentModelModule[]>) => void): void;
3483
4152
  onSubgraphsChange(handler: (subgraphs: Map<string, SubgraphClass$1[]>) => void): void;
3484
4153
  onProcessorsChange(handler: (processors: Map<string, Processor$1>) => void): void;
4154
+ onPiecesChange(handler: (pieces: Map<string, PackagePieceEntry[]>) => void): void;
3485
4155
  }
3486
4156
  //#endregion
3487
4157
  //#region src/services/renown-config.d.ts
3488
4158
  /** Where the credential check reads from: a remote Renown or Switchboard
3489
4159
  * instance, or this switchboard's own renown read model. */
3490
- type RenownSource = NonNullable<PHReactorRenown["source"]>;
4160
+ export type RenownSource = NonNullable<PHReactorRenown["source"]>;
3491
4161
  /** The `auth.renown` config block: which Renown instance to authenticate
3492
4162
  * against, before env overrides are applied. */
3493
- type RenownConfig = PHReactorRenown;
4163
+ export type RenownConfig = PHReactorRenown;
3494
4164
  /** Resolved renown coordinates. `url` also drives this reactor's own identity,
3495
4165
  * so it stays meaningful when `source` is "self". */
3496
- type ResolvedRenownConfig = {
4166
+ export type ResolvedRenownConfig = {
3497
4167
  source: RenownSource;
3498
4168
  url: string | undefined;
3499
4169
  switchboardUrl: string | undefined;
3500
4170
  };
3501
4171
  /** Reading credentials from this reactor's own read model needs a host-supplied
3502
4172
  * verifier: core has no idea which subgraph serves that read model. */
3503
- declare function assertCredentialVerifierForSource(source: RenownSource, hasVerifier: boolean): void;
4173
+ export declare function assertCredentialVerifierForSource(source: RenownSource, hasVerifier: boolean): void;
3504
4174
  /** Resolve `auth.renown`; RENOWN_SOURCE / RENOWN_URL / SWITCHBOARD_URL win
3505
4175
  * over the config file, which wins over the SDK defaults. */
3506
- declare function resolveRenownConfig(configured: RenownConfig | undefined, env: NodeJS.ProcessEnv, logger: ILogger): ResolvedRenownConfig;
4176
+ export declare function resolveRenownConfig(configured: RenownConfig | undefined, env: NodeJS.ProcessEnv, logger: ILogger): ResolvedRenownConfig;
3507
4177
  //#endregion
3508
4178
  //#region src/server.d.ts
3509
4179
  type Options = {
@@ -3529,6 +4199,19 @@ type Options = {
3529
4199
  * request. Off by default; `REQUIRE_AUTHENTICATED_CALLER` overrides.
3530
4200
  * Requires identity resolution to be on — refused at boot without it. */
3531
4201
  requireAuthenticatedCaller?: boolean;
4202
+ /** Mounted paths that stay reachable anonymously while
4203
+ * `requireAuthenticatedCaller` is on, for a flow that runs before
4204
+ * sign-in. Matched against the request's pathname in full, never as a
4205
+ * prefix. `REQUIRE_AUTHENTICATED_CALLER_EXEMPT_PATHS` overrides, as a
4206
+ * comma-separated list. Each entry is a hole in the floor: only ever name
4207
+ * a path serving operations that are safe without a caller. */
4208
+ requireAuthenticatedCallerExemptPaths?: string[];
4209
+ /** Decide an attachment read with the referencing document's own policy
4210
+ * instead of the host permission tables. Off by default;
4211
+ * `ATTACHMENT_READS_FOLLOW_DOCUMENT_POLICY` overrides. Requires auth
4212
+ * enforcement, which is what supplies the model — refused at boot
4213
+ * without it. */
4214
+ attachmentReadsFollowDocumentPolicy?: boolean;
3532
4215
  };
3533
4216
  /** Renown coordinates the host already resolved, used verbatim instead of
3534
4217
  * resolving `auth.renown` and the env again (which would warn twice). */
@@ -3566,13 +4249,13 @@ type ProcessorInitializer = ProcessorFactoryBuilder;
3566
4249
  * Doc-perms require auth: with auth off no `user` is ever resolved, so every
3567
4250
  * authorization check fails closed. Refuse to boot rather than run broken.
3568
4251
  */
3569
- declare function assertAuthRequiredForDocumentPermissions(authEnabled: boolean, documentPermissionsRequested: boolean): void;
4252
+ export declare function assertAuthRequiredForDocumentPermissions(authEnabled: boolean, documentPermissionsRequested: boolean): void;
3570
4253
  /**
3571
4254
  * Refuses SKIP_CREDENTIAL_VERIFICATION at boot outside tests or an explicit
3572
4255
  * opt-in: it removes the only binding between a token's claimed address and its
3573
4256
  * signing key. Fail-closed — unset NODE_ENV counts as production.
3574
4257
  */
3575
- declare function assertSkipCredentialVerificationAllowed(resolvesCallerIdentity: boolean, skipCredentialVerification: boolean, env: NodeJS.ProcessEnv): void;
4258
+ export declare function assertSkipCredentialVerificationAllowed(resolvesCallerIdentity: boolean, skipCredentialVerification: boolean, env: NodeJS.ProcessEnv): void;
3576
4259
  /**
3577
4260
  * Requiring an authenticated caller requires identity resolution to exist at
3578
4261
  * all: with neither AUTH_ENABLED nor RESOLVE_CALLER_IDENTITY the middleware
@@ -3580,14 +4263,22 @@ declare function assertSkipCredentialVerificationAllowed(resolvesCallerIdentity:
3580
4263
  * require-authenticated-caller middleware would reject every caller —
3581
4264
  * authenticated ones included. Refuse to boot rather than run broken.
3582
4265
  */
3583
- declare function assertRequireAuthenticatedCallerAllowed(requireAuthenticatedCaller: boolean, resolvesCallerIdentity: boolean): void;
4266
+ export declare function assertRequireAuthenticatedCallerAllowed(requireAuthenticatedCaller: boolean, resolvesCallerIdentity: boolean, exemptPaths?: readonly string[]): void;
4267
+ /**
4268
+ * Deciding an attachment read by the document's policy needs a policy model to
4269
+ * decide with, and that is what auth enforcement supplies. Without one there is
4270
+ * nothing to consult, so the setting would silently leave the permission tables
4271
+ * in charge — configuration that describes a protection the server is not
4272
+ * applying, which is worse than no configuration at all. Refuse instead.
4273
+ */
4274
+ export declare function assertAttachmentPolicyReadsAllowed(attachmentReadsFollowDocumentPolicy: boolean, hasDecisionModel: boolean): void;
3584
4275
  /**
3585
4276
  * The GraphiQL explorer page's mount prefix. `path.posix.join` normalizes the
3586
4277
  * join with `basePath` — a naive template literal would produce `//explorer`
3587
4278
  * for the default `/` basePath, which express compiles into a route that only
3588
4279
  * matches `//explorer`, leaving `GET /explorer` a 404.
3589
4280
  */
3590
- declare function getExplorerPrefix(basePath: string): string;
4281
+ export declare function getExplorerPrefix(basePath: string): string;
3591
4282
  /**
3592
4283
  * Initializes and starts the API server using an initializer function.
3593
4284
  * This function first loads packages to get document models, then calls the initializer function
@@ -3603,47 +4294,68 @@ declare function getExplorerPrefix(basePath: string): string;
3603
4294
  * alongside the reactor module so resolvers can dispatch reactor-drive parent
3604
4295
  * ops to it; legacy switchboards omit it.
3605
4296
  */
3606
- interface ClientInitializerResult {
4297
+ export interface ClientInitializerResult {
3607
4298
  module: InProcessReactorClientModule;
3608
4299
  reactorDriveClient?: IDriveClient;
3609
4300
  attachmentReferenceProjection?: AttachmentReferenceProjectionCapability;
3610
4301
  }
3611
- interface ClientInitializerDependencies {
4302
+ export interface ClientInitializerDependencies {
3612
4303
  attachmentReferenceWriter: IAttachmentReferenceWriter;
3613
4304
  /** Upgrade manifests exported by the loaded packages, one per type. */
3614
4305
  upgradeManifests: UpgradeManifest<readonly number[]>[];
3615
4306
  }
3616
- declare function initializeAndStartAPI(clientInitializer: (documentModels: DocumentModelModule[], dependencies: ClientInitializerDependencies) => Promise<ClientInitializerResult>, options: Options, processorApp: ProcessorApp): Promise<API & {
4307
+ export declare function initializeAndStartAPI(clientInitializer: (documentModels: DocumentModelModule[], dependencies: ClientInitializerDependencies) => Promise<ClientInitializerResult>, options: Options, processorApp: ProcessorApp): Promise<API & {
3617
4308
  client: IReactorClient;
3618
4309
  syncManager: ISyncManager;
3619
4310
  documentModelRegistry: IDocumentModelRegistry;
3620
4311
  readiness: ReadinessGate;
3621
4312
  attachmentReferenceProjection: AttachmentReferenceProjectionCapability;
3622
4313
  packageManager: PackageManager;
4314
+ /** Set under DOCUMENT_PERMISSIONS; the privacy add-on erases through it. */
4315
+ documentPermissionService: DocumentPermissionService | undefined;
3623
4316
  }>;
3624
4317
  //#endregion
3625
4318
  //#region src/services/renown-credential-verifier.d.ts
3626
- interface RenownCredentialVerifierConfig {
4319
+ export interface RenownCredentialVerifierConfig {
3627
4320
  renownUrl?: string;
3628
4321
  switchboardUrl?: string;
3629
4322
  }
3630
- declare function createRenownCredentialVerifier(config?: RenownCredentialVerifierConfig): Promise<CredentialVerifier>;
4323
+ export declare function createRenownCredentialVerifier(config?: RenownCredentialVerifierConfig): Promise<CredentialVerifier>;
4324
+ //#endregion
4325
+ //#region src/services/privacy-permissions.d.ts
4326
+ /** One permission row naming an address, as reactor-privacy discloses it. */
4327
+ export type PrivacyPermissionRow = {
4328
+ table: string;
4329
+ column: string;
4330
+ documentId: string | null;
4331
+ detail?: Record<string, unknown>;
4332
+ };
4333
+ /**
4334
+ * reactor-privacy's permission lookup and eraser, over this host's
4335
+ * DocumentPermissionService. Typed structurally on the privacy side.
4336
+ */
4337
+ export declare class PrivacyPermissionAdapter {
4338
+ private readonly service;
4339
+ constructor(service: DocumentPermissionService);
4340
+ rowsForAddress(address: string): Promise<PrivacyPermissionRow[]>;
4341
+ erasePermissions(documentId: string): Promise<Record<string, number>>;
4342
+ }
3631
4343
  //#endregion
3632
4344
  //#region src/utils/create-schema.d.ts
3633
- declare const buildSubgraphSchemaModule: (documentModels: DocumentModelModule[], resolvers: GraphQLResolverMap<Context$1>, typeDefs: DocumentNode) => GraphQLSchemaModule;
3634
- declare const createSchema: (documentModels: DocumentModelModule[], resolvers: GraphQLResolverMap<Context$1>, typeDefs: DocumentNode) => graphql.GraphQLSchema;
4345
+ export declare const buildSubgraphSchemaModule: (documentModels: DocumentModelModule[], resolvers: GraphQLResolverMap<Context$1>, typeDefs: DocumentNode) => GraphQLSchemaModule;
4346
+ export declare const createSchema: (documentModels: DocumentModelModule[], resolvers: GraphQLResolverMap<Context$1>, typeDefs: DocumentNode) => import("graphql").GraphQLSchema;
3635
4347
  /**
3636
4348
  * Create a merged GraphQL schema from multiple subgraph modules.
3637
4349
  * Uses buildSubgraphSchema's array overload to combine type definitions
3638
4350
  * and resolvers from multiple subgraphs into a single executable schema.
3639
4351
  */
3640
- declare const createMergedSchema: (modules: GraphQLSchemaModule[]) => graphql.GraphQLSchema;
3641
- declare function getDocumentModelSchemaName(documentModel: DocumentModelGlobalState$1): string;
3642
- declare const getDocumentModelTypeDefs: (documentModels: DocumentModelModule[], typeDefs: DocumentNode) => DocumentNode;
4352
+ export declare const createMergedSchema: (modules: GraphQLSchemaModule[]) => import("graphql").GraphQLSchema;
4353
+ export declare function getDocumentModelSchemaName(documentModel: DocumentModelGlobalState$1): string;
4354
+ export declare const getDocumentModelTypeDefs: (documentModels: DocumentModelModule[], typeDefs: DocumentNode) => DocumentNode;
3643
4355
  /**
3644
4356
  * Options for generating document model GraphQL schemas.
3645
4357
  */
3646
- interface DocumentModelSchemaOptions {
4358
+ export interface DocumentModelSchemaOptions {
3647
4359
  /**
3648
4360
  * When true, generates new API patterns:
3649
4361
  * - Mutations return full document objects (MutationResult type)
@@ -3660,7 +4372,8 @@ interface DocumentModelSchemaOptions {
3660
4372
  * @param options - Schema generation options
3661
4373
  * @returns GraphQL DocumentNode
3662
4374
  */
3663
- declare function generateDocumentModelSchema(documentModel: DocumentModelGlobalState$1, options?: DocumentModelSchemaOptions): DocumentNode;
4375
+ export declare function generateDocumentModelSchema(documentModel: DocumentModelGlobalState$1, options?: DocumentModelSchemaOptions): DocumentNode;
3664
4376
  //#endregion
3665
- export { ADMIN_USERS, API, Action, ActionCandidateInput, ActionCandidateInputSchema, ActionContext, ActionContextInput, ActionContextInputSchema, ActionContextResolvers, ActionEvaluation, ActionEvaluationResolvers, ActionEvaluations, ActionEvaluationsResolvers, ActionInput, ActionInputSchema, ActionResolvers, AdapterRouteHandle, AddRelationshipDocument, AddRelationshipMutation, AddRelationshipMutationVariables, AnalyticsSubgraph, AttachmentAccessRequest, AttachmentAccessResult, AttachmentAccessService, type AttachmentReferenceProjectionCapability, AuthConfig, AuthContext, AuthDecision, AuthDecisionSchema, AuthFetchMiddleware, AuthService, AuthSubgraph, type AuthorizationConfig, AuthorizationPolicy, AuthorizedDocumentHandle, type AuthorizerResult, BaseSubgraph, CORE_PACKAGE_NAME, type CanonicalDocumentId, CanonicalDocumentIdResolutionError, CanonicalDocumentIdResolver, ChannelMeta, ChannelMetaInput, ChannelMetaInputSchema, ChannelMetaResolvers, ClientInitializerDependencies, ClientInitializerResult, Context, CreateDocumentDocument, CreateDocumentMutation, CreateDocumentMutationVariables, CreateEmptyDocumentDocument, CreateEmptyDocumentMutation, CreateEmptyDocumentMutationVariables, CredentialVerifier, DateTimeScalarConfig, DbClient, DeadLetterInfo, DeadLetterInfoResolvers, DeleteDocumentDocument, DeleteDocumentMutation, DeleteDocumentMutationVariables, DeleteDocumentsDocument, DeleteDocumentsMutation, DeleteDocumentsMutationVariables, DirectiveResolverFn, DocumentChangeContext, DocumentChangeContextResolvers, DocumentChangeEvent, DocumentChangeEventResolvers, DocumentChangeType, DocumentChangeTypeSchema, DocumentChangesDocument, DocumentChangesSubscription, DocumentChangesSubscriptionVariables, DocumentModelGlobalState, DocumentModelGlobalStateResolvers, DocumentModelResultPage, DocumentModelResultPageResolvers, DocumentModelSchemaOptions, DocumentOperationsFilterInput, DocumentOperationsFilterInputSchema, DocumentPermissionConfig, DocumentPermissionDatabase, DocumentPermissionEntry, DocumentPermissionLevel, DocumentPermissionService, DocumentPermissionTable, DocumentProtectionTable, DocumentWithChildren, DocumentWithChildrenResolvers, EvaluateActionsDocument, EvaluateActionsQuery, EvaluateActionsQueryVariables, Exact, ExplorerUrlState, FetchHandler, FindDocumentsDocument, FindDocumentsQuery, FindDocumentsQueryVariables, GatewayAdapterType, GatewayContextFactory, GetDocumentDocument, GetDocumentIncomingRelationshipsDocument, GetDocumentIncomingRelationshipsQuery, GetDocumentIncomingRelationshipsQueryVariables, GetDocumentModelsDocument, GetDocumentModelsQuery, GetDocumentModelsQueryVariables, GetDocumentOperationsDocument, GetDocumentOperationsQuery, GetDocumentOperationsQueryVariables, GetDocumentOutgoingRelationshipsDocument, GetDocumentOutgoingRelationshipsQuery, GetDocumentOutgoingRelationshipsQueryVariables, GetDocumentQuery, GetDocumentQueryVariables, GetDocumentWithOperationsDocument, GetDocumentWithOperationsQuery, GetDocumentWithOperationsQueryVariables, GetJobStatusDocument, GetJobStatusQuery, GetJobStatusQueryVariables, GetParentIdsFn, GqlDocument, GqlDriveDocument, GqlOperation, GqlOperationContext, GqlSigner, GqlSignerApp, GqlSignerUser, GraphQLManager, GraphqlManagerFeatureFlags, HttpAdapterSetup, HttpAdapterType, HttpDocumentModelLoader, HttpMethod, HttpPackageLoader, HttpPackageLoaderLogger, HttpPackageLoaderOptions, HttpRouteService, type HttpRouteServiceOptions, IAttachmentAccessService, type IAuthorizationService, IGatewayAdapter, IHttpAdapter, type IHttpScope, type IPackageLoader, type IPackageLoaderOptions, IPackageStorage, IProcessorHostModule, IReactorProcessorHostModule, ISubgraph, type IWebhookEndpoints, type IWebhookScope, type IWebhookStore, ImportPackageLoader, InMemoryPackageStorage, Incremental, InputMaybe, InstallPackageResult, InstalledPackageInfo, InvalidNamespaceError, IsTypeOfResolverFn, JobChangeEvent, JobChangeEventResolvers, JobChangesDocument, JobChangesSubscription, JobChangesSubscriptionVariables, JobInfo, JobInfoResolvers, JsonObjectScalarConfig, MakeEmpty, MakeMaybe, MakeOptional, Maybe, MemoryWebhookStore, MoveRelationshipDocument, MoveRelationshipMutation, MoveRelationshipMutationVariables, MoveRelationshipResult, MoveRelationshipResultResolvers, MutateDocumentAsyncDocument, MutateDocumentAsyncMutation, MutateDocumentAsyncMutationVariables, MutateDocumentDocument, MutateDocumentMutation, MutateDocumentMutationVariables, Mutation, MutationAddRelationshipArgs, MutationCreateDocumentArgs, MutationCreateEmptyDocumentArgs, MutationDeleteDocumentArgs, MutationDeleteDocumentsArgs, MutationExecuteArgs, MutationExecuteAsyncArgs, MutationMoveRelationshipArgs, MutationMutateDocumentArgs, MutationMutateDocumentAsyncArgs, MutationPushSyncEnvelopesArgs, MutationRemoveRelationshipArgs, MutationRenameDocumentArgs, MutationResolvers, MutationSetPreferredEditorArgs, MutationTouchChannelArgs, NextResolverFn, NodeRouteOptions, type NodeRouteSpec, OperationContext, OperationContextInput, OperationContextInputSchema, OperationContextResolvers, OperationInput, OperationInputSchema, OperationUserPermissionEntry, OperationUserPermissionTable, OperationWithContext, OperationWithContextInput, OperationWithContextInputSchema, OperationWithContextResolvers, OperationsFilterInput, OperationsFilterInputSchema, PACKAGE_ROUTE_SEGMENT, PGLITE_UTC_PARSERS, PackageManagementService, PackageManagementServiceOptions, PackageManager, PackagesSubgraph, type PackagesSubgraphArgs, PagingInput, PagingInputSchema, type ParsedDriveUrl, PgliteFactory, PhDocument, PhDocumentFieldsFragment, PhDocumentFieldsFragmentDoc, PhDocumentOperationsArgs, PhDocumentResolvers, PhDocumentResultPage, PhDocumentResultPageResolvers, PollSyncEnvelopesDocument, PollSyncEnvelopesQuery, PollSyncEnvelopesQueryVariables, PollSyncEnvelopesResult, PollSyncEnvelopesResultResolvers, Processor, ProcessorDriveFactory, ProcessorFactoryBuilder, PropagationMode, PropagationModeSchema, PushSyncEnvelopesDocument, PushSyncEnvelopesMutation, PushSyncEnvelopesMutationVariables, Query, QueryDocumentArgs, QueryDocumentIncomingRelationshipsArgs, QueryDocumentModelsArgs, QueryDocumentOperationsArgs, QueryDocumentOutgoingRelationshipsArgs, QueryEvaluateActionsArgs, QueryFindDocumentsArgs, QueryJobStatusArgs, QueryPollSyncEnvelopesArgs, QueryResolvers, ReactorModule, ReactorOperation, ReactorOperationResolvers, ReactorOperationResultPage, ReactorOperationResultPageResolvers, ReactorSigner, ReactorSignerApp, ReactorSignerAppInput, ReactorSignerAppInputSchema, ReactorSignerAppResolvers, ReactorSignerInput, ReactorSignerInputSchema, ReactorSignerResolvers, ReactorSignerUser, ReactorSignerUserInput, ReactorSignerUserInputSchema, ReactorSignerUserResolvers, ReactorSubgraph, ReadinessGate, RelationalWebhookStore, RemoteCursor, RemoteCursorInput, RemoteCursorInputSchema, RemoteCursorResolvers, RemoteFilterInput, RemoteFilterInputSchema, RemoveRelationshipDocument, RemoveRelationshipMutation, RemoveRelationshipMutationVariables, RenameDocumentDocument, RenameDocumentMutation, RenameDocumentMutationVariables, RenownConfig, RenownCredentialVerifierConfig, RenownSource, Requester, RequireFields, ResolvedRenownConfig, Resolver, ResolverFn, ResolverTypeWrapper, ResolverWithResolve, Resolvers, ResolversObject, ResolversParentTypes, ResolversTypes, Revision, RevisionResolvers, type RouteActor, type RouteAuth, type RouteAuthorizer, type RouteBody, type RouteContext, type RouteHandler, type RouteMethod, type RouteOptions, type RouteSpec, type RouteTransport, type RouteUser, Scalars, type ScopedRouteHandle, Sdk, SearchFilterInput, SearchFilterInputSchema, SetPreferredEditorDocument, SetPreferredEditorMutation, SetPreferredEditorMutationVariables, SubgraphArgs, SubgraphClass, SubgraphDefinition, Subscription, SubscriptionDocumentChangesArgs, SubscriptionJobChangesArgs, SubscriptionObject, SubscriptionResolveFn, SubscriptionResolver, SubscriptionResolverObject, SubscriptionResolvers, SubscriptionSubscribeFn, SubscriptionSubscriberObject, SyncEnvelope, SyncEnvelopeInput, SyncEnvelopeInputSchema, SyncEnvelopeResolvers, SyncEnvelopeType, SyncEnvelopeTypeSchema, SystemSubgraph, TlsOptions, TouchChannelDocument, TouchChannelInput, TouchChannelInputSchema, TouchChannelMutation, TouchChannelMutationVariables, TouchChannelResult, TouchChannelResultResolvers, TypeResolveFn, User, ViewFilterInput, ViewFilterInputSchema, WEBHOOK_SEGMENT, WS_AUTH_CLOSE_REASONS, WS_CLOSE_REASON_AUTHENTICATION_REQUIRED, WS_CLOSE_REASON_BEARER_REJECTED, type WebhookEndpointInfo, type WebhookEndpointRow, type WebhookField, type WebhookHashAlgorithm, type WebhookPolicy, type WebhookReply, type WebhookRequest, type WebhookScheme, WebhookService, type WebhookSignatureEncoding, type WebhookSpec, type WebhookVerification, WithIndex, WsConnectHandler, WsConnection, WsContextFactory, WsDisposer, WsHandlers, assertAuthRequiredForDocumentPermissions, assertCredentialVerifierForSource, assertHostMountPath, assertRequireAuthenticatedCallerAllowed, assertSkipCredentialVerificationAllowed, buildGraphQlDocument, buildGraphQlDriveDocument, buildGraphqlOperation, buildGraphqlOperations, buildSubgraphSchemaModule, createAuthFetchMiddleware, createCanonicalDocumentIdResolver, createGatewayAdapter, createHttpAdapter, createMergedSchema, createReactorGraphQLClient, createRenownCredentialVerifier, createSchema, createWsAuthHandlers, decodeExplorerUrlState, definedNonNullAnySchema, driveIdFromUrl, extractSubgraphsFromModule, generateDocumentModelSchema, getAuthContext, getDbClient, getDocumentModelSchemaName, getDocumentModelTypeDefs, getExplorerPrefix, getGitHash, getGitUrl, getSdk, getUniqueDocumentModels, getUniqueUpgradeManifests, getVersion, initAnalyticsStoreSql, initializeAndStartAPI, isDefinedNonNullAny, isExpectedLoaderMiss, isSubgraphClass, namespacePath, namespaceSegments, newWebhookToken, parseDriveUrl, parseWebhookBody, redactHeaders, renderGraphqlPlayground, resolvePackageName, resolveRenownConfig, verifyWebhook };
4377
+ export { type AuthorizationConfig, type AuthorizerResult, type CanonicalDocumentId, type HttpRouteServiceOptions, type IAuthorizationService, type IHttpScope, type IPackageLoader, type IPackageLoaderOptions, type IPackagePieceSource, type IWebhookEndpoints, type IWebhookScope, type IWebhookStore, type NodeRouteSpec, type PackagePiece, type PackagePieceEntry, type PackagesSubgraphArgs, type ParsedDriveUrl, type RouteActor, type RouteAuth, type RouteAuthorizer, type RouteBody, type RouteContext, type RouteHandler, type RouteMethod, type RouteOptions, type RouteSpec, type RouteTransport, type RouteUser, type ScopedRouteHandle, type WebhookEndpointInfo, type WebhookEndpointRow, type WebhookField, type WebhookHashAlgorithm, type WebhookPolicy, type WebhookReply, type WebhookRequest, type WebhookScheme, type WebhookSignatureEncoding, type WebhookSpec, type WebhookVerification, driveIdFromUrl, parseDriveUrl };
4378
+ export {};
3666
4379
  //# sourceMappingURL=index.d.mts.map