@powerhousedao/reactor-api 6.2.3-dev.3 → 6.2.3-dev.30

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 (42) hide show
  1. package/dist/{adapter-gateway-apollo-Cn9E96GF.mjs → adapter-gateway-apollo-B54G_cXT.mjs} +18 -17
  2. package/dist/adapter-gateway-apollo-B54G_cXT.mjs.map +1 -0
  3. package/dist/{adapter-gateway-apollo-C_RdohOv.mjs → adapter-gateway-apollo-D2DNlPY0.mjs} +3 -3
  4. package/dist/{adapter-gateway-mercurius-CjaUcMgX.mjs → adapter-gateway-mercurius-rbKlwF9m.mjs} +7 -6
  5. package/dist/adapter-gateway-mercurius-rbKlwF9m.mjs.map +1 -0
  6. package/dist/{adapter-gateway-stitching-HmWjRMhm.mjs → adapter-gateway-stitching-Dzv10u8D.mjs} +18 -14
  7. package/dist/adapter-gateway-stitching-Dzv10u8D.mjs.map +1 -0
  8. package/dist/{adapter-http-express-B39rPhqH.mjs → adapter-http-express-CWqziB1p.mjs} +7 -7
  9. package/dist/adapter-http-express-CWqziB1p.mjs.map +1 -0
  10. package/dist/{adapter-http-fastify-BwXO6rqE.mjs → adapter-http-fastify-CYZQ6FFv.mjs} +10 -9
  11. package/dist/adapter-http-fastify-CYZQ6FFv.mjs.map +1 -0
  12. package/dist/index.d.mts +863 -453
  13. package/dist/index.d.mts.map +1 -1
  14. package/dist/index.mjs +1000 -258
  15. package/dist/index.mjs.map +1 -1
  16. package/dist/{utils-XWVecaNn.mjs → pieces-BzaJGkRl.mjs} +130 -9
  17. package/dist/pieces-BzaJGkRl.mjs.map +1 -0
  18. package/dist/rolldown-runtime-8H4AJuhK.mjs +16 -0
  19. package/dist/run-node-handler-CQjyjOuN.mjs +52 -0
  20. package/dist/run-node-handler-CQjyjOuN.mjs.map +1 -0
  21. package/dist/src/packages/https-hooks.d.mts +4 -4
  22. package/dist/src/packages/https-hooks.d.mts.map +1 -1
  23. package/dist/src/packages/https-hooks.mjs +2 -2
  24. package/dist/src/packages/https-hooks.mjs.map +1 -1
  25. package/dist/src/packages/vite-loader.d.mts +10 -6
  26. package/dist/src/packages/vite-loader.d.mts.map +1 -1
  27. package/dist/src/packages/vite-loader.mjs +71 -9
  28. package/dist/src/packages/vite-loader.mjs.map +1 -1
  29. package/dist/{types-DcYyNcHJ.d.mts → types-D4Qnqo_D.d.mts} +26 -3
  30. package/dist/types-D4Qnqo_D.d.mts.map +1 -0
  31. package/dist/{websocket-DncAB9XK.mjs → websocket-_SH5aBcy.mjs} +3 -3
  32. package/dist/{websocket-DncAB9XK.mjs.map → websocket-_SH5aBcy.mjs.map} +1 -1
  33. package/package.json +18 -18
  34. package/dist/adapter-gateway-apollo-Cn9E96GF.mjs.map +0 -1
  35. package/dist/adapter-gateway-mercurius-CjaUcMgX.mjs.map +0 -1
  36. package/dist/adapter-gateway-stitching-HmWjRMhm.mjs.map +0 -1
  37. package/dist/adapter-http-express-B39rPhqH.mjs.map +0 -1
  38. package/dist/adapter-http-fastify-BwXO6rqE.mjs.map +0 -1
  39. package/dist/path-normalize-BOQwY9wR.mjs +0 -23
  40. package/dist/path-normalize-BOQwY9wR.mjs.map +0 -1
  41. package/dist/types-DcYyNcHJ.d.mts.map +0 -1
  42. package/dist/utils-XWVecaNn.mjs.map +0 -1
package/dist/index.d.mts CHANGED
@@ -1,8 +1,7 @@
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-D4Qnqo_D.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";
4
+ import { DocumentNode, GraphQLError, GraphQLResolveInfo, GraphQLScalarType, GraphQLScalarTypeConfig, GraphQLSchema } from "graphql";
6
5
  import { AttachmentRef, IDocumentModelLoader, IDocumentModelRegistry, IDriveClient, IReactorClient, IReactorProcessorHostModuleBase, IRelationalDb, ISyncManager, InProcessReactorClientModule, ParsedDriveUrl, ProcessorFactoryBuilder as ProcessorFactoryBuilder$1, SyncScopeGate, driveIdFromUrl, parseDriveUrl } from "@powerhousedao/reactor";
7
6
  import { ILogger } from "document-model";
8
7
  import { GraphQLResolverMap, GraphQLSchemaModule } from "@apollo/subgraph";
@@ -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);
@@ -230,7 +228,7 @@ type CanonicalDocumentId = string & {
230
228
  * always safe for the data fetch: the canonical id when resolved, or the raw
231
229
  * identifier when the check was skipped for a policy-wide caller.
232
230
  */
233
- declare class AuthorizedDocumentHandle {
231
+ export declare class AuthorizedDocumentHandle {
234
232
  readonly fetchIdentifier: string;
235
233
  readonly isResolved: boolean;
236
234
  private constructor();
@@ -239,12 +237,12 @@ declare class AuthorizedDocumentHandle {
239
237
  /** The verified canonical id; throws when resolution was skipped. */
240
238
  canonicalId(): CanonicalDocumentId;
241
239
  }
242
- declare const AuthorizationPolicy: {
240
+ export declare const AuthorizationPolicy: {
243
241
  readonly OPEN: "OPEN";
244
242
  readonly ADMIN_ONLY: "ADMIN_ONLY";
245
243
  readonly DOCUMENT_PERMISSIONS: "DOCUMENT_PERMISSIONS";
246
244
  };
247
- type AuthorizationPolicy = (typeof AuthorizationPolicy)[keyof typeof AuthorizationPolicy];
245
+ export type AuthorizationPolicy = (typeof AuthorizationPolicy)[keyof typeof AuthorizationPolicy];
248
246
  interface AuthorizationConfig {
249
247
  admins: string[];
250
248
  defaultProtection: boolean;
@@ -288,19 +286,32 @@ interface IAuthorizationService {
288
286
  }
289
287
  //#endregion
290
288
  //#region src/graphql/gateway/types.d.ts
291
- type TlsOptions = {
289
+ export type TlsOptions = {
292
290
  keyPath: string;
293
291
  certPath: string;
294
292
  } | {
295
293
  cert: Buffer | string;
296
294
  key: Buffer | string;
297
295
  } | true;
298
- type GatewayContextFactory<TContext = unknown> = (request: Request) => Promise<TContext>;
299
- type WsContextFactory<TContext = unknown> = (connectionParams: Record<string, unknown>) => Promise<TContext>;
300
- type WsDisposer = {
296
+ export type GatewayContextFactory<TContext = unknown> = (request: Request) => Promise<TContext>;
297
+ /** Under graphql-ws this is `ctx.extra`, created once per socket. */
298
+ export type WsConnection = object;
299
+ export type WsContextFactory<TContext = unknown> = (connectionParams: Record<string, unknown>, connection: WsConnection) => Promise<TContext>;
300
+ export type WsConnectHandler = (connectionParams: Record<string, unknown>, connection: WsConnection) => Promise<boolean>;
301
+ export type WsHandlers<TContext = unknown> = {
302
+ onConnect: WsConnectHandler;
303
+ context: WsContextFactory<TContext>;
304
+ };
305
+ /** No authenticated caller resolved, and REQUIRE_AUTHENTICATED_CALLER wants one. */
306
+ export declare const WS_CLOSE_REASON_AUTHENTICATION_REQUIRED = "authentication-required";
307
+ /** A bearer was sent and could not be verified. */
308
+ export declare const WS_CLOSE_REASON_BEARER_REJECTED = "bearer-rejected";
309
+ /** Every reason a refusal closes with, for a client matching on the set. */
310
+ export declare const WS_AUTH_CLOSE_REASONS: readonly ["authentication-required", "bearer-rejected"];
311
+ export type WsDisposer = {
301
312
  dispose: () => void | Promise<void>;
302
313
  };
303
- type FetchHandler = (request: Request) => Promise<Response>;
314
+ export type FetchHandler = (request: Request) => Promise<Response>;
304
315
  /**
305
316
  * Handle to a route registered directly on the adapter. Packages hot-reload,
306
317
  * so every registration is reversible; disposing a route that is already gone
@@ -316,7 +327,7 @@ type FetchHandler = (request: Request) => Promise<Response>;
316
327
  * which also carries the public URL the route answers on — at this layer there
317
328
  * is no namespace to build one from and no knowledge of the host's origin.
318
329
  */
319
- interface AdapterRouteHandle {
330
+ export interface AdapterRouteHandle {
320
331
  dispose(): void;
321
332
  }
322
333
  /**
@@ -325,7 +336,7 @@ interface AdapterRouteHandle {
325
336
  * federation adapters treat it as a service to call over HTTP, while the
326
337
  * stitching adapter merges its typeDefs and resolvers in-process.
327
338
  */
328
- type SubgraphDefinition = {
339
+ export type SubgraphDefinition = {
329
340
  name: string;
330
341
  typeDefs: DocumentNode;
331
342
  url: string;
@@ -338,7 +349,7 @@ type SubgraphDefinition = {
338
349
  */
339
350
  resolvers?: Record<string, unknown>;
340
351
  };
341
- interface IGatewayAdapter<TContext = unknown> {
352
+ export interface IGatewayAdapter<TContext = unknown> {
342
353
  /** One-time startup. */
343
354
  start(httpServer: http.Server): Promise<void>;
344
355
  /**
@@ -360,16 +371,16 @@ interface IGatewayAdapter<TContext = unknown> {
360
371
  * been called yet, or after stop().
361
372
  */
362
373
  updateSupergraph(): Promise<void>;
363
- /** Attach WebSocket subscriptions. Returns a disposer. */
364
- attachWebSocket(wsServer: WebSocketServer, schema: GraphQLSchema, contextFactory: WsContextFactory<TContext>): WsDisposer;
374
+ /** Without `onConnect`, refusing would mean throwing: an unretryable 4500. */
375
+ attachWebSocket(wsServer: WebSocketServer, schema: GraphQLSchema, handlers: WsHandlers<TContext>): WsDisposer;
365
376
  stop(): Promise<void>;
366
377
  }
367
378
  /**
368
379
  * Methods a node route may bind. OPTIONS is excluded: the framework's CORS
369
380
  * plugin owns preflight, and a duplicate registration conflicts at startup.
370
381
  */
371
- type HttpMethod = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT";
372
- interface NodeRouteOptions {
382
+ export type HttpMethod = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT";
383
+ export interface NodeRouteOptions {
373
384
  /** Serve sub-paths too, not just an exact path match. */
374
385
  prefix?: boolean;
375
386
  /**
@@ -385,7 +396,7 @@ interface NodeRouteOptions {
385
396
  */
386
397
  rawBody?: boolean;
387
398
  }
388
- interface IHttpAdapter {
399
+ export interface IHttpAdapter {
389
400
  /** Set up CORS and body-parser equivalent middleware. */
390
401
  setupMiddleware(config: {
391
402
  corsOptions?: CorsOptions;
@@ -400,7 +411,8 @@ interface IHttpAdapter {
400
411
  * replaces the previous one (last write wins).
401
412
  */
402
413
  mount(path: string, handler: FetchHandler, options?: {
403
- prefix?: boolean; /** @deprecated Misleading name: this always meant *prefix*, not exact. */
414
+ prefix?: boolean;
415
+ /** @deprecated Misleading name: this always meant *prefix*, not exact. */
404
416
  exact?: boolean;
405
417
  }): AdapterRouteHandle;
406
418
  /**
@@ -410,9 +422,10 @@ interface IHttpAdapter {
410
422
  getRoute(path: string, handler: (request: Request) => Response | Promise<Response>): AdapterRouteHandle;
411
423
  /**
412
424
  * Start listening on the given port. Returns the underlying http.Server
413
- * so callers can attach WebSocket servers.
425
+ * so callers can attach WebSocket servers. Without `host` it binds the
426
+ * wildcard address.
414
427
  */
415
- listen(port: number, tls?: TlsOptions): Promise<http.Server>;
428
+ listen(port: number, tls?: TlsOptions, host?: string): Promise<http.Server>;
416
429
  /**
417
430
  * Mount a raw Connect/Express-compatible middleware function (e.g. Vite dev
418
431
  * server middleware). The implementation is adapter-specific; for Express this
@@ -441,12 +454,12 @@ interface IHttpAdapter {
441
454
  }
442
455
  //#endregion
443
456
  //#region src/services/auth.service.d.ts
444
- type CredentialVerifier = (params: {
457
+ export type CredentialVerifier = (params: {
445
458
  address: string;
446
459
  chainId: number;
447
460
  appId: string;
448
461
  }) => Promise<boolean>;
449
- interface AuthConfig {
462
+ export interface AuthConfig {
450
463
  /**
451
464
  * Whether the authorization policy enforces anything: it selects `ADMIN_ONLY`
452
465
  * over `OPEN`, and it is what `AuthContext.auth_enabled` reports to callers
@@ -479,13 +492,13 @@ interface AuthConfig {
479
492
  * `@powerhousedao/shared/processors` as `RouteUser`, so a route handler and a
480
493
  * resolver agree on it without either package redeclaring it.
481
494
  */
482
- type User = RouteUser$1;
483
- interface AuthContext {
495
+ export type User = RouteUser$1;
496
+ export interface AuthContext {
484
497
  user?: User;
485
498
  admins: string[];
486
499
  auth_enabled: boolean;
487
500
  }
488
- declare class AuthService {
501
+ export declare class AuthService {
489
502
  private readonly config;
490
503
  private readonly credentialCache;
491
504
  constructor(config: AuthConfig);
@@ -502,6 +515,7 @@ declare class AuthService {
502
515
  * middleware that must enforce authentication on every request.
503
516
  */
504
517
  verifyBearer(authorization: string | undefined): Promise<AuthContext | globalThis.Response>;
518
+ /** Throws only for a bearer that is present and unusable, as HTTP 401s it. */
505
519
  authenticateWebSocketConnection(connectionParams: Record<string, unknown>): Promise<User | null>;
506
520
  /**
507
521
  * Verify the auth bearer token
@@ -563,9 +577,9 @@ interface IWebhookStore {
563
577
  seen(token: string, key: string, ttlSeconds: number): Promise<boolean>;
564
578
  }
565
579
  /** Opaque and unguessable: the URL is a bearer capability held by a third party. */
566
- declare function newWebhookToken(): string;
580
+ export declare function newWebhookToken(): string;
567
581
  /** Relational implementation, over the reactor's own database. */
568
- declare class RelationalWebhookStore implements IWebhookStore {
582
+ export declare class RelationalWebhookStore implements IWebhookStore {
569
583
  #private;
570
584
  private readonly relationalDb;
571
585
  constructor(relationalDb: IRelationalDb$1);
@@ -577,7 +591,7 @@ declare class RelationalWebhookStore implements IWebhookStore {
577
591
  seen(token: string, key: string, ttlSeconds: number): Promise<boolean>;
578
592
  }
579
593
  /** In-memory store, for hosts with no relational database and for tests. */
580
- declare class MemoryWebhookStore implements IWebhookStore {
594
+ export declare class MemoryWebhookStore implements IWebhookStore {
581
595
  #private;
582
596
  init(): Promise<void>;
583
597
  ensure(namespace: string, endpoint: string, ownerKey: string): Promise<WebhookEndpointRow>;
@@ -589,7 +603,7 @@ declare class MemoryWebhookStore implements IWebhookStore {
589
603
  //#endregion
590
604
  //#region src/http/webhook-service.d.ts
591
605
  /** The flat, token-addressed path family. */
592
- declare const WEBHOOK_SEGMENT = "webhooks";
606
+ export declare const WEBHOOK_SEGMENT = "webhooks";
593
607
  interface WebhookServiceOptions {
594
608
  store: IWebhookStore;
595
609
  basePath?: string;
@@ -598,13 +612,9 @@ interface WebhookServiceOptions {
598
612
  }
599
613
  /** One host route for `/webhooks/:token`, dispatching by token. The flat path leaks
600
614
  * neither package nor document; the namespace lives in the token record, which is also what stops one package's token reaching another's handler. */
601
- declare class WebhookService {
615
+ export declare class WebhookService {
602
616
  #private;
603
- constructor({
604
- store,
605
- basePath,
606
- publicUrl
607
- }: WebhookServiceOptions);
617
+ constructor({ store, basePath, publicUrl }: WebhookServiceOptions);
608
618
  /** The scope the endpoint family serves from, handed over once the route service exists;
609
619
  * separate from the constructor only because that service takes this one as an option. */
610
620
  attach(scope: IHttpScope): void;
@@ -623,9 +633,9 @@ declare class WebhookService {
623
633
  //#endregion
624
634
  //#region src/http/route-service.d.ts
625
635
  /** The segment package routes live under, inside the host's base path. */
626
- declare const PACKAGE_ROUTE_SEGMENT = "api";
636
+ export declare const PACKAGE_ROUTE_SEGMENT = "api";
627
637
  /** The namespace core's own subgraphs and services register under. */
628
- declare const CORE_PACKAGE_NAME = "@powerhousedao/reactor-api";
638
+ export declare const CORE_PACKAGE_NAME = "@powerhousedao/reactor-api";
629
639
  interface HttpRouteServiceOptions {
630
640
  httpAdapter: IHttpAdapter;
631
641
  /** Absent on a host with no webhook store; `scope.webhooks` then refuses. */
@@ -642,16 +652,9 @@ interface HttpRouteServiceOptions {
642
652
  }
643
653
  /** Owns the URL space packages serve from, handing each a scope bound to its own namespace. The prefix nests inside
644
654
  * the host's base path (`<basePath>/api`), so core collisions are prevented by URL shape, not a reserved-name list. */
645
- declare class HttpRouteService {
655
+ export declare class HttpRouteService {
646
656
  #private;
647
- constructor({
648
- httpAdapter,
649
- basePath,
650
- authService,
651
- webhooks,
652
- publicUrl,
653
- trustProxy
654
- }: HttpRouteServiceOptions);
657
+ constructor({ httpAdapter, basePath, authService, webhooks, publicUrl, trustProxy }: HttpRouteServiceOptions);
655
658
  /** The absolute path packages are mounted under. */
656
659
  get prefix(): string;
657
660
  /** The scope for a package; idempotent per name, so a reload cannot accumulate namespaces. Throws when two packages
@@ -669,18 +672,18 @@ declare class HttpRouteService {
669
672
  }
670
673
  //#endregion
671
674
  //#region src/http/namespace.d.ts
672
- declare class InvalidNamespaceError extends Error {}
675
+ export declare class InvalidNamespaceError extends Error {}
673
676
  /**
674
677
  * Turns a package name into the path segments it occupies.
675
678
  * `@powerhousedao/workflow` → ["@powerhousedao", "workflow"]
676
679
  * `document-model` → ["document-model"]
677
680
  */
678
- declare function namespaceSegments(packageName: string): string[];
681
+ export declare function namespaceSegments(packageName: string): string[];
679
682
  /**
680
683
  * The path a package's routes hang off, relative to the package prefix.
681
684
  * Scoped names occupy two segments — the addressing unpkg and jsdelivr use.
682
685
  */
683
- declare function namespacePath(packageName: string): string;
686
+ export declare function namespacePath(packageName: string): string;
684
687
  /**
685
688
  * Resolves the npm name a package is routed under from the key the package
686
689
  * manager holds it by. That key is the specifier as configured, which is not
@@ -693,7 +696,7 @@ declare function namespacePath(packageName: string): string;
693
696
  * Deriving a URL segment straight from the key would give a developer's home
694
697
  * directory a route namespace, so the path form is resolved rather than slugged.
695
698
  */
696
- declare function resolvePackageName(key: string, readPackageJsonName?: (dir: string) => string | undefined): string;
699
+ export declare function resolvePackageName(key: string, readPackageJsonName?: (dir: string) => string | undefined): string;
697
700
  /**
698
701
  * A mount path the host named for one of its own route groups.
699
702
  *
@@ -708,7 +711,7 @@ declare function resolvePackageName(key: string, readPackageJsonName?: (dir: str
708
711
  * routes unpredictable relative to each other. Returns the normalized path,
709
712
  * with a leading and no trailing slash.
710
713
  */
711
- declare function assertHostMountPath(path: string): string;
714
+ export declare function assertHostMountPath(path: string): string;
712
715
  //#endregion
713
716
  //#region src/http/webhook-verify.d.ts
714
717
  type VerifyResult = {
@@ -719,20 +722,20 @@ type VerifyResult = {
719
722
  };
720
723
  /** Verifies a delivery against the configured scheme; `raw` must be the exact bytes
721
724
  * received. The reason is for the log only: callers answer a fixed 401, so a probing sender learns nothing from the body. */
722
- declare function verifyWebhook(options: {
725
+ export declare function verifyWebhook(options: {
723
726
  verification: WebhookVerification;
724
727
  headers: Record<string, string>;
725
728
  raw: Buffer;
726
729
  now?: Date;
727
730
  }): VerifyResult;
728
- declare function redactHeaders(headers: Record<string, string>, extra?: string): Record<string, string>;
731
+ export declare function redactHeaders(headers: Record<string, string>, extra?: string): Record<string, string>;
729
732
  /** JSON and form bodies become objects; anything else stays decoded text, so a verified
730
733
  * XML or CSV payload is still reachable downstream. */
731
- declare function parseWebhookBody(raw: Buffer, contentType?: string): unknown;
734
+ export declare function parseWebhookBody(raw: Buffer, contentType?: string): unknown;
732
735
  //#endregion
733
736
  //#region src/graphql/types.d.ts
734
- type SubgraphClass = typeof BaseSubgraph;
735
- type Context = {
737
+ export type SubgraphClass = typeof BaseSubgraph;
738
+ export type Context = {
736
739
  driveId?: string;
737
740
  document?: PHDocument;
738
741
  headers: IncomingHttpHeaders;
@@ -740,11 +743,12 @@ type Context = {
740
743
  user?: {
741
744
  address: string;
742
745
  chainId: number;
743
- networkId: string; /** The did:key of the app instance that issued this request's token. */
746
+ networkId: string;
747
+ /** The did:key of the app instance that issued this request's token. */
744
748
  appKey: string;
745
749
  };
746
750
  };
747
- type ISubgraph = {
751
+ export type ISubgraph = {
748
752
  name: string;
749
753
  /**
750
754
  * @deprecated The GraphQL manager mounts every subgraph under its own base
@@ -762,7 +766,7 @@ type ISubgraph = {
762
766
  onSetup?: () => Promise<void>;
763
767
  onDisconnect?: () => Promise<void>;
764
768
  };
765
- type SubgraphArgs = {
769
+ export type SubgraphArgs = {
766
770
  reactorClient: IReactorClient;
767
771
  /**
768
772
  * The subgraph's package's slice of the HTTP surface, for serving REST
@@ -789,7 +793,7 @@ type SubgraphArgs = {
789
793
  */
790
794
  path?: string;
791
795
  };
792
- type GqlSigner = {
796
+ export type GqlSigner = {
793
797
  user: {
794
798
  address: string;
795
799
  networkId: string;
@@ -801,19 +805,19 @@ type GqlSigner = {
801
805
  };
802
806
  signatures: string[];
803
807
  };
804
- type GqlOperationContext = {
808
+ export type GqlOperationContext = {
805
809
  signer: GqlSigner | undefined;
806
810
  };
807
- type GqlSignerUser = {
811
+ export type GqlSignerUser = {
808
812
  address: string;
809
813
  networkId: string;
810
814
  chainId: number;
811
815
  };
812
- type GqlSignerApp = {
816
+ export type GqlSignerApp = {
813
817
  name: string;
814
818
  key: string;
815
819
  };
816
- type GqlOperation = {
820
+ export type GqlOperation = {
817
821
  id: string;
818
822
  type: string;
819
823
  index: number;
@@ -824,7 +828,7 @@ type GqlOperation = {
824
828
  error: string | undefined;
825
829
  context: GqlOperationContext;
826
830
  };
827
- type GqlDocument = {
831
+ export type GqlDocument = {
828
832
  __typename?: string;
829
833
  id: string;
830
834
  name: string;
@@ -837,7 +841,7 @@ type GqlDocument = {
837
841
  state: unknown;
838
842
  initialState: unknown;
839
843
  };
840
- type GqlDriveDocument = GqlDocument & {
844
+ export type GqlDriveDocument = GqlDocument & {
841
845
  meta: {
842
846
  preferredEditor?: string;
843
847
  };
@@ -847,7 +851,12 @@ type GqlDriveDocument = GqlDocument & {
847
851
  };
848
852
  //#endregion
849
853
  //#region src/graphql/base-subgraph.d.ts
850
- declare class BaseSubgraph implements ISubgraph$1 {
854
+ /**
855
+ * The subject a request reads as: its address and the app key its token
856
+ * carries. Anonymous is an empty subject, never the host's signer.
857
+ */
858
+ export declare function callerSubject(user: Context["user"]): AuthSubject;
859
+ export declare class BaseSubgraph implements ISubgraph$1 {
851
860
  #private;
852
861
  name: string;
853
862
  path: string;
@@ -899,6 +908,8 @@ declare class BaseSubgraph implements ISubgraph$1 {
899
908
  * carries the same key. Anonymous callers supply neither.
900
909
  */
901
910
  protected viewSubject(ctx: Context): AuthSubject;
911
+ /** Whether a listing would serve the document to the caller; fails closed. */
912
+ protected servesDocument(documentId: string, ctx: Context): Promise<boolean>;
902
913
  /**
903
914
  * Asserts read access, resolving a slug first. Returns a handle whose
904
915
  * `fetchIdentifier` the caller reuses for the data fetch; a denial throws.
@@ -917,16 +928,24 @@ declare class BaseSubgraph implements ISubgraph$1 {
917
928
  }
918
929
  //#endregion
919
930
  //#region src/graphql/analytics-subgraph.d.ts
920
- declare class AnalyticsSubgraph extends BaseSubgraph {
931
+ export declare class AnalyticsSubgraph extends BaseSubgraph {
932
+ #private;
921
933
  analyticsStore: IAnalyticsStore;
922
934
  analyticsModel: AnalyticsModel;
923
935
  name: string;
924
- typeDefs: graphql.DocumentNode;
936
+ typeDefs: import("graphql").DocumentNode;
937
+ /**
938
+ * Every analytics field hangs off `Query.analytics`, so gating it gates them
939
+ * all. Series are aggregates a processor built from many documents and carry
940
+ * no document to decide on, so only a caller with policy-wide read (anyone
941
+ * under OPEN, an admin otherwise) may read them.
942
+ */
925
943
  resolvers: GraphQLResolverMap<Context$1>;
926
944
  constructor(args: SubgraphArgs$1);
927
945
  }
928
- //#endregion
929
- //#region src/graphql/auth/resolvers.d.ts
946
+ declare namespace resolvers_d_exports {
947
+ export { DocumentAccessInfo, DocumentProtectionInfo, OperationPermissionsInfo, OperationUserPermission, canExecuteOperation, documentAccess, documentProtection, grantDocumentPermission, grantOperationPermission, operationPermissions, revokeDocumentPermission, revokeOperationPermission, setDocumentProtection, transferDocumentOwnership, userDocumentPermissions };
948
+ }
930
949
  type DocumentAccessInfo = {
931
950
  documentId: string;
932
951
  permissions: Array<{
@@ -938,6 +957,33 @@ type DocumentAccessInfo = {
938
957
  updatedAt: Date;
939
958
  }>;
940
959
  };
960
+ declare function documentAccess(service: DocumentPermissionService, authorizationService: IAuthorizationService, args: {
961
+ documentId: CanonicalDocumentId;
962
+ }, userAddress: string | undefined): Promise<DocumentAccessInfo>;
963
+ declare function userDocumentPermissions(service: DocumentPermissionService, userAddress: string): Promise<Array<{
964
+ documentId: string;
965
+ userAddress: string;
966
+ permission: DocumentPermissionLevel;
967
+ grantedBy: string;
968
+ createdAt: Date;
969
+ updatedAt: Date;
970
+ }>>;
971
+ declare function grantDocumentPermission(service: DocumentPermissionService, authorizationService: IAuthorizationService, args: {
972
+ documentId: CanonicalDocumentId;
973
+ userAddress: string;
974
+ permission: DocumentPermissionLevel;
975
+ }, grantedByAddress: string | undefined): Promise<{
976
+ documentId: string;
977
+ userAddress: string;
978
+ permission: DocumentPermissionLevel;
979
+ grantedBy: string;
980
+ createdAt: Date;
981
+ updatedAt: Date;
982
+ }>;
983
+ declare function revokeDocumentPermission(service: DocumentPermissionService, authorizationService: IAuthorizationService, args: {
984
+ documentId: CanonicalDocumentId;
985
+ userAddress: string;
986
+ }, revokedByAddress: string | undefined): Promise<boolean>;
941
987
  type OperationUserPermission = {
942
988
  documentId: string;
943
989
  operationType: string;
@@ -950,11 +996,40 @@ type OperationPermissionsInfo = {
950
996
  operationType: string;
951
997
  userPermissions: OperationUserPermission[];
952
998
  };
999
+ declare function operationPermissions(service: DocumentPermissionService, authorizationService: IAuthorizationService, args: {
1000
+ documentId: CanonicalDocumentId;
1001
+ operationType: string;
1002
+ }, userAddress: string | undefined): Promise<OperationPermissionsInfo>;
1003
+ declare function canExecuteOperation(authorizationService: IAuthorizationService, args: {
1004
+ documentId: CanonicalDocumentId;
1005
+ operationType: string;
1006
+ }, userAddress: string | undefined): Promise<boolean>;
1007
+ declare function grantOperationPermission(service: DocumentPermissionService, authorizationService: IAuthorizationService, args: {
1008
+ documentId: CanonicalDocumentId;
1009
+ operationType: string;
1010
+ userAddress: string;
1011
+ }, grantedByAddress: string | undefined): Promise<OperationUserPermission>;
1012
+ declare function revokeOperationPermission(service: DocumentPermissionService, authorizationService: IAuthorizationService, args: {
1013
+ documentId: CanonicalDocumentId;
1014
+ operationType: string;
1015
+ userAddress: string;
1016
+ }, revokedByAddress: string | undefined): Promise<boolean>;
953
1017
  type DocumentProtectionInfo = {
954
1018
  documentId: string;
955
1019
  protected: boolean;
956
1020
  ownerAddress: string | null;
957
1021
  };
1022
+ declare function documentProtection(service: DocumentPermissionService, authorizationService: IAuthorizationService, args: {
1023
+ documentId: CanonicalDocumentId;
1024
+ }, userAddress: string | undefined): Promise<DocumentProtectionInfo>;
1025
+ declare function setDocumentProtection(service: DocumentPermissionService, authorizationService: IAuthorizationService, args: {
1026
+ documentId: CanonicalDocumentId;
1027
+ protected: boolean;
1028
+ }, userAddress: string | undefined): Promise<DocumentProtectionInfo>;
1029
+ declare function transferDocumentOwnership(service: DocumentPermissionService, authorizationService: IAuthorizationService, args: {
1030
+ documentId: CanonicalDocumentId;
1031
+ newOwnerAddress: string;
1032
+ }, userAddress: string | undefined): Promise<DocumentProtectionInfo>;
958
1033
  //#endregion
959
1034
  //#region src/graphql/auth/subgraph.d.ts
960
1035
  /**
@@ -966,12 +1041,12 @@ type DocumentProtectionInfo = {
966
1041
  * - Document protection and ownership
967
1042
  * - Operation-level permissions (fine-grained operation control)
968
1043
  */
969
- declare class AuthSubgraph extends BaseSubgraph {
1044
+ export declare class AuthSubgraph extends BaseSubgraph {
970
1045
  private logger;
971
1046
  constructor(args: SubgraphArgs);
972
1047
  name: string;
973
1048
  hasSubscriptions: boolean;
974
- typeDefs: graphql.DocumentNode;
1049
+ typeDefs: import("graphql").DocumentNode;
975
1050
  resolvers: {
976
1051
  Query: {
977
1052
  documentAccess: (_parent: unknown, args: {
@@ -1082,19 +1157,19 @@ declare class AuthSubgraph extends BaseSubgraph {
1082
1157
  }
1083
1158
  //#endregion
1084
1159
  //#region src/graphql/gateway/auth-middleware.d.ts
1085
- type AuthFetchMiddleware = (handler: FetchHandler) => FetchHandler;
1160
+ export type AuthFetchMiddleware = (handler: FetchHandler) => FetchHandler;
1086
1161
  /** Internal — only `graphql-manager.ts` should call this. */
1087
- declare function getAuthContext(request: globalThis.Request): AuthContext | undefined;
1088
- declare function createAuthFetchMiddleware(authService: AuthService): AuthFetchMiddleware;
1162
+ export declare function getAuthContext(request: globalThis.Request): AuthContext | undefined;
1163
+ export declare function createAuthFetchMiddleware(authService: AuthService): AuthFetchMiddleware;
1089
1164
  //#endregion
1090
1165
  //#region src/graphql/gateway/factory.d.ts
1091
- type GatewayAdapterType = "apollo" | "mercurius" | "stitching";
1092
- type HttpAdapterType = "express" | "fastify";
1093
- declare function createGatewayAdapter(type: GatewayAdapterType, logger: ILogger): Promise<IGatewayAdapter<Context>>;
1094
- type HttpAdapterSetup = {
1166
+ export type GatewayAdapterType = "apollo" | "mercurius" | "stitching";
1167
+ export type HttpAdapterType = "express" | "fastify";
1168
+ export declare function createGatewayAdapter(type: GatewayAdapterType, logger: ILogger): Promise<IGatewayAdapter<Context>>;
1169
+ export type HttpAdapterSetup = {
1095
1170
  adapter: IHttpAdapter;
1096
1171
  };
1097
- declare function createHttpAdapter(type: HttpAdapterType): Promise<HttpAdapterSetup>;
1172
+ export declare function createHttpAdapter(type: HttpAdapterType): Promise<HttpAdapterSetup>;
1098
1173
  //#endregion
1099
1174
  //#region src/graphql/gateway/drive-ownership-cache.d.ts
1100
1175
  /**
@@ -1122,10 +1197,17 @@ declare class DriveOwnershipCache {
1122
1197
  type RequireAuthFetchMiddleware = (handler: FetchHandler) => FetchHandler;
1123
1198
  //#endregion
1124
1199
  //#region src/graphql/graphql-manager.d.ts
1125
- type GraphqlManagerFeatureFlags = {
1200
+ export type GraphqlManagerFeatureFlags = {
1126
1201
  enableDocumentModelSubgraphs?: boolean;
1127
1202
  };
1128
- declare class GraphQLManager {
1203
+ export declare function createWsAuthHandlers(opts: {
1204
+ authService?: AuthService;
1205
+ /** Whether anonymous callers are refused; read at call time, not at build time. */
1206
+ requireAuthenticatedCaller: () => boolean;
1207
+ logger: ILogger;
1208
+ buildContext: (connectionParams: Record<string, unknown>, user?: User) => Context$1;
1209
+ }): WsHandlers<Context$1>;
1210
+ export declare class GraphQLManager {
1129
1211
  #private;
1130
1212
  private readonly path;
1131
1213
  private readonly httpServer;
@@ -1154,8 +1236,8 @@ declare class GraphQLManager {
1154
1236
  private readonly subgraphHandlerCache;
1155
1237
  /** subgraphPath → the http adapter handle of its mounted route. */
1156
1238
  private readonly subgraphRouteHandles;
1157
- /** Handle of the currently mounted supergraph SSE route, if any. */
1158
- private sseRouteHandle;
1239
+ /** Mounted SSE routes, keyed by path: the supergraph's and each subgraph's. */
1240
+ private readonly sseRouteHandles;
1159
1241
  /**
1160
1242
  * Package name → the subgraph instances registered from it, keyed by
1161
1243
  * subgraph name. Tracks the package association so that removed packages
@@ -1236,21 +1318,21 @@ declare class GraphQLManager {
1236
1318
  }
1237
1319
  //#endregion
1238
1320
  //#region src/services/package-storage.d.ts
1239
- interface InstalledPackageInfo {
1321
+ export interface InstalledPackageInfo {
1240
1322
  name: string;
1241
1323
  version?: string;
1242
1324
  registryUrl: string;
1243
1325
  installedAt: Date;
1244
1326
  documentTypes: string[];
1245
1327
  }
1246
- interface IPackageStorage {
1328
+ export interface IPackageStorage {
1247
1329
  get(name: string): Promise<InstalledPackageInfo | undefined>;
1248
1330
  getAll(): Promise<InstalledPackageInfo[]>;
1249
1331
  set(name: string, info: InstalledPackageInfo): Promise<void>;
1250
1332
  delete(name: string): Promise<boolean>;
1251
1333
  has(name: string): Promise<boolean>;
1252
1334
  }
1253
- declare class InMemoryPackageStorage implements IPackageStorage {
1335
+ export declare class InMemoryPackageStorage implements IPackageStorage {
1254
1336
  private packages;
1255
1337
  get(name: string): Promise<InstalledPackageInfo | undefined>;
1256
1338
  getAll(): Promise<InstalledPackageInfo[]>;
@@ -1266,16 +1348,16 @@ declare class InMemoryPackageStorage implements IPackageStorage {
1266
1348
  * as a document-existence oracle, so consumers map this to their generic
1267
1349
  * fail-closed response.
1268
1350
  */
1269
- declare class CanonicalDocumentIdResolutionError extends Error {
1351
+ export declare class CanonicalDocumentIdResolutionError extends Error {
1270
1352
  constructor();
1271
1353
  }
1272
- type CanonicalDocumentIdResolver = (identifier: string) => Promise<CanonicalDocumentId>;
1354
+ export type CanonicalDocumentIdResolver = (identifier: string) => Promise<CanonicalDocumentId>;
1273
1355
  /**
1274
1356
  * The sanctioned string-to-CanonicalDocumentId cast: both the GraphQL layer
1275
1357
  * and server routes must resolve caller identifiers through this helper so
1276
1358
  * decision and data layers always agree on the subject document.
1277
1359
  */
1278
- declare function createCanonicalDocumentIdResolver(client: Pick<IReactorClient, "resolveIdOrSlug">): CanonicalDocumentIdResolver;
1360
+ export declare function createCanonicalDocumentIdResolver(client: Pick<IReactorClient, "resolveIdOrSlug">): CanonicalDocumentIdResolver;
1279
1361
  //#endregion
1280
1362
  //#region src/services/attachment-access.service.d.ts
1281
1363
  /**
@@ -1285,7 +1367,7 @@ declare function createCanonicalDocumentIdResolver(client: Pick<IReactorClient,
1285
1367
  * registration capability. Consumers of reference evidence must fail closed
1286
1368
  * when it is unavailable.
1287
1369
  */
1288
- type AttachmentReferenceProjectionCapability = {
1370
+ export type AttachmentReferenceProjectionCapability = {
1289
1371
  status: "available";
1290
1372
  } | {
1291
1373
  status: "unavailable";
@@ -1298,7 +1380,7 @@ type AttachmentReferenceProjectionCapability = {
1298
1380
  * the reference index is not being maintained in this composition; it is
1299
1381
  * returned before any document-authorization or reference lookup runs.
1300
1382
  */
1301
- type AttachmentAccessResult = {
1383
+ export type AttachmentAccessResult = {
1302
1384
  kind: "allowed";
1303
1385
  documentId: CanonicalDocumentId;
1304
1386
  ref: AttachmentRef;
@@ -1307,28 +1389,85 @@ type AttachmentAccessResult = {
1307
1389
  } | {
1308
1390
  kind: "projection-unavailable";
1309
1391
  };
1310
- interface AttachmentAccessRequest {
1392
+ export interface AttachmentAccessRequest {
1311
1393
  documentId: string;
1312
1394
  attachmentRef: string;
1313
1395
  userAddress?: string;
1396
+ /**
1397
+ * The `did:key` of the app instance whose token authenticated the caller.
1398
+ * A policy subject is an address AND a key — a grant can name either, and a
1399
+ * document's creator is recorded by key — so a decision made from the address
1400
+ * alone answers a narrower question than the one being asked.
1401
+ */
1402
+ appKey?: string;
1403
+ }
1404
+ /** The reactor's read gate, as the attachment facade consults it. */
1405
+ export type AttachmentReadGate = Pick<IReactorClient, "isServed" | "get">;
1406
+ /**
1407
+ * Which scopes of a document a subject may read, asked by document id.
1408
+ *
1409
+ * Structural on purpose: the composition that has a policy model to enforce
1410
+ * supplies `SyncScopeGate`, and one that does not supplies nothing at all.
1411
+ */
1412
+ export interface IDocumentScopeGate {
1413
+ scopePredicateById(documentId: string, subject: {
1414
+ address?: string;
1415
+ key?: string;
1416
+ }, branch: string, signal?: AbortSignal): Promise<(scope: string) => boolean>;
1314
1417
  }
1315
- interface IAttachmentAccessService {
1418
+ export interface IAttachmentAccessService {
1316
1419
  canReadAttachment(request: AttachmentAccessRequest): Promise<AttachmentAccessResult>;
1317
1420
  }
1318
1421
  /**
1319
1422
  * Composes document authorization with the projected document/ref
1320
1423
  * relationship. Order is fixed: validate ref, resolve the canonical document
1321
- * id, check `canRead`, then check the reference index. A denied document
1322
- * never reaches the reference reader, and the facade never touches
1323
- * attachment metadata, storage backends, or presigners.
1424
+ * id, decide the read, check the reactor's read gate serves the document, then
1425
+ * check the reference index and that the subject may read a scope whose
1426
+ * operations reference the attachment. A denied document never reaches the
1427
+ * reference reader, and the facade never touches attachment metadata, storage
1428
+ * backends, or presigners.
1429
+ *
1430
+ * The named document decides alone: an attachment several documents reference
1431
+ * is readable through each of them on that document's own terms.
1432
+ *
1433
+ * The read is decided by the document's own policy when this composition has a
1434
+ * model to enforce it with, and by the host's permission tables when it does
1435
+ * not. That is not a preference between two equivalent answers: a host running
1436
+ * document policies keeps no rows in the permission tables, so asking them
1437
+ * about such a document returns whatever the host-wide policy says — under
1438
+ * `OPEN`, `true`, for everyone. Serving bytes on that answer hands the file to
1439
+ * anyone who learns its hash, which the document's own state may well have told
1440
+ * them. Both are kept because they are the two halves of one rule: an
1441
+ * attachment is readable by whoever may read the document that references it,
1442
+ * and each composition can only express that in its own terms.
1324
1443
  */
1325
- declare class AttachmentAccessService implements IAttachmentAccessService {
1444
+ export declare class AttachmentAccessService implements IAttachmentAccessService {
1326
1445
  private readonly resolveCanonicalId;
1327
1446
  private readonly authorization;
1328
1447
  private readonly references;
1329
1448
  private readonly projection;
1330
- constructor(resolveCanonicalId: CanonicalDocumentIdResolver, authorization: IAuthorizationService, references: IAttachmentReferenceReader, projection: AttachmentReferenceProjectionCapability);
1449
+ private readonly readGate;
1450
+ /**
1451
+ * Absent below auth enforcement, where there is no policy model to
1452
+ * evaluate; the host's permission tables decide alone, exactly as before.
1453
+ */
1454
+ private readonly scopeGate?;
1455
+ constructor(resolveCanonicalId: CanonicalDocumentIdResolver, authorization: IAuthorizationService, references: IAttachmentReferenceReader, projection: AttachmentReferenceProjectionCapability, readGate: AttachmentReadGate,
1456
+ /**
1457
+ * Absent below auth enforcement, where there is no policy model to
1458
+ * evaluate; the host's permission tables decide alone, exactly as before.
1459
+ */
1460
+ scopeGate?: IDocumentScopeGate | undefined);
1331
1461
  canReadAttachment(request: AttachmentAccessRequest): Promise<AttachmentAccessResult>;
1462
+ /**
1463
+ * Whether the caller may read the state the reference lives in.
1464
+ *
1465
+ * A failure here is rethrown rather than turned into a denial. A read side
1466
+ * that is down must not read as a policy: a denial nobody can distinguish
1467
+ * from a refusal is one nobody investigates, and the route answers 500 for a
1468
+ * reason.
1469
+ */
1470
+ private canReadDocument;
1332
1471
  }
1333
1472
  //#endregion
1334
1473
  //#region src/types.d.ts
@@ -1336,24 +1475,41 @@ declare class AttachmentAccessService implements IAttachmentAccessService {
1336
1475
  * Module hosts pass to processor factories: the reactor-level module plus the
1337
1476
  * attachment client, which shared and reactor cannot name.
1338
1477
  */
1339
- interface IProcessorHostModule extends IReactorProcessorHostModuleBase {
1478
+ export interface IProcessorHostModule extends IReactorProcessorHostModuleBase {
1340
1479
  attachments: IAttachmentClient;
1341
1480
  }
1342
1481
  /** @deprecated Use `IProcessorHostModule`. */
1343
- type IReactorProcessorHostModule = IProcessorHostModule;
1344
- type ReadinessGate = {
1482
+ export type IReactorProcessorHostModule = IProcessorHostModule;
1483
+ export type ReadinessGate = {
1345
1484
  isReady: () => boolean;
1346
1485
  markReady: () => void;
1347
1486
  };
1348
- type API = {
1349
- httpAdapter: IHttpAdapter; /** Hands each package a namespaced slice of the HTTP surface. */
1487
+ export type API = {
1488
+ httpAdapter: IHttpAdapter;
1489
+ /** Hands each package a namespaced slice of the HTTP surface. */
1350
1490
  httpRoutes: HttpRouteService;
1351
1491
  graphqlManager: GraphQLManager$1;
1352
1492
  packages: IPackageManager;
1353
1493
  attachments: AttachmentBuildResult;
1354
- attachmentReferenceIndex: AttachmentReferenceIndexBuildResult; /** Document-authorized attachment read decisions; see AttachmentAccessService. */
1494
+ attachmentReferenceIndex: AttachmentReferenceIndexBuildResult;
1495
+ /** Document-authorized attachment read decisions; see AttachmentAccessService. */
1355
1496
  attachmentAccess: IAttachmentAccessService;
1356
1497
  authService: AuthService | undefined;
1498
+ /**
1499
+ * Whether this deployment refuses anonymous callers
1500
+ * (`REQUIRE_AUTHENTICATED_CALLER`). Carried here because routes mounted
1501
+ * straight on the HTTP adapter never pass the GraphQL fetch chain, so its
1502
+ * require-auth middleware cannot reach them: a host-composed route reads the
1503
+ * resolved value from the API rather than the environment, so one variable
1504
+ * cannot end up half applied.
1505
+ */
1506
+ requireAuthenticatedCaller: boolean;
1507
+ /** The service the subgraphs decide with, for a component the host composes
1508
+ * after boot: it must authorize with this one, not one of its own. */
1509
+ authorizationService: IAuthorizationService;
1510
+ /** The read-model relational store, for the same host-composed component:
1511
+ * its tables belong in this database and nothing else hands one over. */
1512
+ relationalDb: IRelationalDb$1;
1357
1513
  /**
1358
1514
  * Releases resources owned by the API: shuts down the GraphQL gateway,
1359
1515
  * closes WebSocket and HTTP servers, destroys knex pools, and closes any
@@ -1363,22 +1519,22 @@ type API = {
1363
1519
  */
1364
1520
  dispose: () => Promise<void>;
1365
1521
  };
1366
- type ReactorModule = {
1522
+ export type ReactorModule = {
1367
1523
  analyticsStore: IAnalyticsStore;
1368
1524
  relationalDb: IRelationalDb$1;
1369
1525
  };
1370
1526
  /** @deprecated Use `ProcessorFactory`. */
1371
- type ProcessorDriveFactory = ProcessorFactory;
1527
+ export type ProcessorDriveFactory = ProcessorFactory;
1372
1528
  /** Builds a per-drive factory from the host module (e.g. vetra `processorFactory`). */
1373
- type ProcessorFactoryBuilder = ProcessorFactoryBuilder$1<IProcessorHostModule>;
1529
+ export type ProcessorFactoryBuilder = ProcessorFactoryBuilder$1<IProcessorHostModule>;
1374
1530
  /** Multiple initializers per package name (e.g. Switchboard `processors` option). */
1375
- type Processor = ProcessorFactoryBuilder[];
1531
+ export type Processor = ProcessorFactoryBuilder[];
1376
1532
  //#endregion
1377
1533
  //#region src/packages/http-loader.d.ts
1378
- interface HttpPackageLoaderOptions {
1534
+ export interface HttpPackageLoaderOptions {
1379
1535
  registryUrl: string;
1380
1536
  }
1381
- interface HttpPackageLoaderLogger {
1537
+ export interface HttpPackageLoaderLogger {
1382
1538
  info: (msg: string) => void;
1383
1539
  error: (msg: string, err: unknown) => void;
1384
1540
  }
@@ -1393,7 +1549,7 @@ type SubgraphsExport = Record<string, SubgraphClass$1>;
1393
1549
  *
1394
1550
  * Exported for direct unit testing against synthetic module shapes.
1395
1551
  */
1396
- declare function extractSubgraphsFromModule(module: Record<string, SubgraphsExport>): SubgraphClass$1[];
1552
+ export declare function extractSubgraphsFromModule(module: Record<string, SubgraphsExport>): SubgraphClass$1[];
1397
1553
  /**
1398
1554
  * Loads document models, subgraphs, and processors from an HTTP registry.
1399
1555
  * Uses Node.js module loader hooks to import directly from HTTP URLs.
@@ -1402,7 +1558,7 @@ declare function extractSubgraphsFromModule(module: Record<string, SubgraphsExpo
1402
1558
  * import { register } from "node:module";
1403
1559
  * register("@powerhousedao/reactor-api/https-hooks", import.meta.url);
1404
1560
  */
1405
- declare class HttpPackageLoader implements IPackageLoader {
1561
+ export declare class HttpPackageLoader implements IPackageLoader {
1406
1562
  private readonly registryUrl;
1407
1563
  private readonly logger;
1408
1564
  readonly name = "HttpPackageLoader";
@@ -1420,6 +1576,7 @@ declare class HttpPackageLoader implements IPackageLoader {
1420
1576
  loadUpgradeManifests(packageSpec: string): Promise<UpgradeManifest<readonly number[]>[]>;
1421
1577
  loadSubgraphs(packageSpec: string): Promise<SubgraphClass$1[]>;
1422
1578
  loadProcessors(packageSpec: string): Promise<ProcessorFactoryBuilder | null>;
1579
+ loadPieces(packageSpec: string): Promise<PackagePieceEntry[]>;
1423
1580
  /**
1424
1581
  * Load document models from multiple packages.
1425
1582
  * Continues loading even if some packages fail.
@@ -1433,7 +1590,7 @@ declare class HttpPackageLoader implements IPackageLoader {
1433
1590
  * Making them worker-executable means returning an importable source here
1434
1591
  * (the CDN URL as a package specifier, given process-wide https hooks).
1435
1592
  */
1436
- declare class HttpDocumentModelLoader implements IDocumentModelLoader {
1593
+ export declare class HttpDocumentModelLoader implements IDocumentModelLoader {
1437
1594
  private readonly loader;
1438
1595
  private readonly logger;
1439
1596
  private readonly documentTypeCache;
@@ -1450,18 +1607,18 @@ declare class HttpDocumentModelLoader implements IDocumentModelLoader {
1450
1607
  }
1451
1608
  //#endregion
1452
1609
  //#region src/services/package-management.service.d.ts
1453
- interface InstallPackageResult {
1610
+ export interface InstallPackageResult {
1454
1611
  package: InstalledPackageInfo;
1455
1612
  documentModelsLoaded: number;
1456
1613
  }
1457
- interface PackageManagementServiceOptions {
1614
+ export interface PackageManagementServiceOptions {
1458
1615
  storage?: IPackageStorage;
1459
1616
  defaultRegistryUrl?: string;
1460
1617
  httpLoader?: HttpPackageLoader;
1461
1618
  documentModelRegistry?: IDocumentModelRegistry;
1462
1619
  packageManager?: IPackageManager;
1463
1620
  }
1464
- declare class PackageManagementService {
1621
+ export declare class PackageManagementService {
1465
1622
  private readonly storage;
1466
1623
  private readonly defaultRegistryUrl?;
1467
1624
  private readonly httpLoader?;
@@ -1484,13 +1641,13 @@ declare class PackageManagementService {
1484
1641
  interface PackagesSubgraphArgs extends SubgraphArgs {
1485
1642
  packageManagementService: PackageManagementService;
1486
1643
  }
1487
- declare class PackagesSubgraph extends BaseSubgraph {
1644
+ export declare class PackagesSubgraph extends BaseSubgraph {
1488
1645
  private logger;
1489
1646
  private packageManagementService;
1490
1647
  constructor(args: PackagesSubgraphArgs);
1491
1648
  name: string;
1492
1649
  hasSubscriptions: boolean;
1493
- typeDefs: graphql.DocumentNode;
1650
+ typeDefs: import("graphql").DocumentNode;
1494
1651
  resolvers: {
1495
1652
  Query: {
1496
1653
  Packages: () => {};
@@ -1546,7 +1703,7 @@ declare class PackagesSubgraph extends BaseSubgraph {
1546
1703
  * `{ document, variables, headers? }` with `variables` and `headers`
1547
1704
  * already JSON-stringified.
1548
1705
  */
1549
- interface ExplorerUrlState {
1706
+ export interface ExplorerUrlState {
1550
1707
  /** The GraphQL query to prefill in GraphiQL. */
1551
1708
  query: string;
1552
1709
  /** JSON-stringified variables, as stored in the payload. */
@@ -1558,24 +1715,24 @@ interface ExplorerUrlState {
1558
1715
  * Decodes an `explorerURLState` URL parameter. Returns `null` for anything
1559
1716
  * that is not a valid lz-compressed payload with a non-empty `document`.
1560
1717
  */
1561
- declare function decodeExplorerUrlState(encoded: string): ExplorerUrlState | null;
1562
- declare function renderGraphqlPlayground(url: string, query?: string, headers?: Record<string, string>, variables?: string): string;
1718
+ export declare function decodeExplorerUrlState(encoded: string): ExplorerUrlState | null;
1719
+ export declare function renderGraphqlPlayground(url: string, query?: string, headers?: Record<string, string>, variables?: string): string;
1563
1720
  //#endregion
1564
1721
  //#region src/graphql/reactor/gen/graphql.d.ts
1565
- type Maybe<T> = T | null | undefined;
1566
- type InputMaybe<T> = T | null | undefined;
1567
- type Exact<T extends {
1722
+ export type Maybe<T> = T | null | undefined;
1723
+ export type InputMaybe<T> = T | null | undefined;
1724
+ export type Exact<T extends {
1568
1725
  [key: string]: unknown;
1569
- }> = { [K in keyof T]: T[K] };
1570
- type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
1571
- type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
1572
- type MakeEmpty<T extends {
1726
+ }> = { [K in keyof T]: T[K]; };
1727
+ export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]>; };
1728
+ export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]>; };
1729
+ export type MakeEmpty<T extends {
1573
1730
  [key: string]: unknown;
1574
- }, K extends keyof T> = { [_ in K]?: never };
1575
- type Incremental<T> = T | { [P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never };
1576
- type RequireFields<T, K extends keyof T> = Omit<T, K> & { [P in K]-?: NonNullable<T[P]> };
1731
+ }, K extends keyof T> = { [_ in K]?: never; };
1732
+ export type Incremental<T> = T | { [P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never; };
1733
+ export type RequireFields<T, K extends keyof T> = Omit<T, K> & { [P in K]-?: NonNullable<T[P]>; };
1577
1734
  /** All built-in and custom scalars, mapped to their actual values */
1578
- type Scalars = {
1735
+ export type Scalars = {
1579
1736
  ID: {
1580
1737
  input: string;
1581
1738
  output: string;
@@ -1605,7 +1762,7 @@ type Scalars = {
1605
1762
  output: NonNullable<unknown>;
1606
1763
  };
1607
1764
  };
1608
- type Action = {
1765
+ export type Action = {
1609
1766
  readonly context?: Maybe<ActionContext>;
1610
1767
  readonly id: Scalars["String"]["output"];
1611
1768
  readonly input: Scalars["JSONObject"]["output"];
@@ -1620,12 +1777,12 @@ type Action = {
1620
1777
  * filled-in form carries that form's input. Omitting it predicts the verdict an
1621
1778
  * empty input earns, not the verdict the filled-in form will get.
1622
1779
  */
1623
- type ActionCandidateInput = {
1780
+ export type ActionCandidateInput = {
1624
1781
  readonly input?: InputMaybe<Scalars["JSONObject"]["input"]>;
1625
1782
  readonly scope: Scalars["String"]["input"];
1626
1783
  readonly type: Scalars["String"]["input"];
1627
1784
  };
1628
- type ActionContext = {
1785
+ export type ActionContext = {
1629
1786
  readonly signer?: Maybe<ReactorSigner>;
1630
1787
  };
1631
1788
  /**
@@ -1640,9 +1797,12 @@ type ActionContext = {
1640
1797
  * against. They are recorded rather than enforced; a signature is verified from
1641
1798
  * the params carried in its own tuple, which do not include them.
1642
1799
  */
1643
- type ActionContextInput = {
1644
- /** 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. */
1645
- readonly prevOpHash?: InputMaybe<Scalars["String"]["input"]>; /** The index of the last operation in the scope the action applies to. */
1800
+ export type ActionContextInput = {
1801
+ /** Covers replay of an operation that would otherwise be a no-op. */
1802
+ readonly nonce?: InputMaybe<Scalars["String"]["input"]>;
1803
+ /** The hash of the state the action applies to. */
1804
+ readonly prevOpHash?: InputMaybe<Scalars["String"]["input"]>;
1805
+ /** The index of the last operation in the scope the action applies to. */
1646
1806
  readonly prevOpIndex?: InputMaybe<Scalars["Int"]["input"]>;
1647
1807
  readonly signer?: InputMaybe<ReactorSignerInput>;
1648
1808
  };
@@ -1650,7 +1810,7 @@ type ActionContextInput = {
1650
1810
  * One candidate's predicted verdict. `reason` carries the refusal a DENY is
1651
1811
  * recorded with, and is null on an ALLOW.
1652
1812
  */
1653
- type ActionEvaluation = {
1813
+ export type ActionEvaluation = {
1654
1814
  readonly decision: AuthDecision;
1655
1815
  readonly reason?: Maybe<Scalars["String"]["output"]>;
1656
1816
  };
@@ -1663,14 +1823,14 @@ type ActionEvaluation = {
1663
1823
  * another. Over no candidates every aggregate is false: nothing is allowed and
1664
1824
  * nothing is denied.
1665
1825
  */
1666
- type ActionEvaluations = {
1826
+ export type ActionEvaluations = {
1667
1827
  readonly allAllowed: Scalars["Boolean"]["output"];
1668
1828
  readonly allDenied: Scalars["Boolean"]["output"];
1669
1829
  readonly anyAllowed: Scalars["Boolean"]["output"];
1670
1830
  readonly anyDenied: Scalars["Boolean"]["output"];
1671
1831
  readonly evaluations: ReadonlyArray<ActionEvaluation>;
1672
1832
  };
1673
- type ActionInput = {
1833
+ export type ActionInput = {
1674
1834
  readonly context?: InputMaybe<ActionContextInput>;
1675
1835
  readonly id: Scalars["String"]["input"];
1676
1836
  readonly input: Scalars["JSONObject"]["input"];
@@ -1678,17 +1838,17 @@ type ActionInput = {
1678
1838
  readonly timestampUtcMs: Scalars["String"]["input"];
1679
1839
  readonly type: Scalars["String"]["input"];
1680
1840
  };
1681
- declare enum AuthDecision {
1841
+ export declare enum AuthDecision {
1682
1842
  Allow = "ALLOW",
1683
1843
  Deny = "DENY"
1684
1844
  }
1685
- type ChannelMeta = {
1845
+ export type ChannelMeta = {
1686
1846
  readonly id: Scalars["String"]["output"];
1687
1847
  };
1688
- type ChannelMetaInput = {
1848
+ export type ChannelMetaInput = {
1689
1849
  readonly id: Scalars["String"]["input"];
1690
1850
  };
1691
- type DeadLetterInfo = {
1851
+ export type DeadLetterInfo = {
1692
1852
  readonly branch: Scalars["String"]["output"];
1693
1853
  readonly documentId: Scalars["String"]["output"];
1694
1854
  readonly error: Scalars["String"]["output"];
@@ -1702,16 +1862,16 @@ type DeadLetterInfo = {
1702
1862
  readonly operationCount: Scalars["Int"]["output"];
1703
1863
  readonly scopes: ReadonlyArray<Scalars["String"]["output"]>;
1704
1864
  };
1705
- type DocumentChangeContext = {
1865
+ export type DocumentChangeContext = {
1706
1866
  readonly childId?: Maybe<Scalars["String"]["output"]>;
1707
1867
  readonly parentId?: Maybe<Scalars["String"]["output"]>;
1708
1868
  };
1709
- type DocumentChangeEvent = {
1869
+ export type DocumentChangeEvent = {
1710
1870
  readonly context?: Maybe<DocumentChangeContext>;
1711
1871
  readonly documents: ReadonlyArray<PhDocument>;
1712
1872
  readonly type: DocumentChangeType;
1713
1873
  };
1714
- declare enum DocumentChangeType {
1874
+ export declare enum DocumentChangeType {
1715
1875
  ChildAdded = "CHILD_ADDED",
1716
1876
  ChildRemoved = "CHILD_REMOVED",
1717
1877
  Created = "CREATED",
@@ -1720,21 +1880,20 @@ declare enum DocumentChangeType {
1720
1880
  ParentRemoved = "PARENT_REMOVED",
1721
1881
  Updated = "UPDATED"
1722
1882
  }
1723
- type DocumentModelGlobalState = {
1883
+ export type DocumentModelGlobalState = {
1724
1884
  readonly id: Scalars["String"]["output"];
1725
1885
  readonly name: Scalars["String"]["output"];
1726
1886
  readonly namespace?: Maybe<Scalars["String"]["output"]>;
1727
1887
  readonly specification: Scalars["JSONObject"]["output"];
1728
1888
  readonly version?: Maybe<Scalars["String"]["output"]>;
1729
1889
  };
1730
- type DocumentModelResultPage = {
1890
+ export type DocumentModelResultPage = {
1731
1891
  readonly cursor?: Maybe<Scalars["String"]["output"]>;
1732
1892
  readonly hasNextPage: Scalars["Boolean"]["output"];
1733
1893
  readonly hasPreviousPage: Scalars["Boolean"]["output"];
1734
1894
  readonly items: ReadonlyArray<DocumentModelGlobalState>;
1735
- readonly totalCount: Scalars["Int"]["output"];
1736
1895
  };
1737
- type DocumentOperationsFilterInput = {
1896
+ export type DocumentOperationsFilterInput = {
1738
1897
  readonly actionTypes?: InputMaybe<ReadonlyArray<Scalars["String"]["input"]>>;
1739
1898
  readonly branch?: InputMaybe<Scalars["String"]["input"]>;
1740
1899
  readonly scopes?: InputMaybe<ReadonlyArray<Scalars["String"]["input"]>>;
@@ -1742,17 +1901,36 @@ type DocumentOperationsFilterInput = {
1742
1901
  readonly timestampFrom?: InputMaybe<Scalars["String"]["input"]>;
1743
1902
  readonly timestampTo?: InputMaybe<Scalars["String"]["input"]>;
1744
1903
  };
1745
- type DocumentWithChildren = {
1904
+ export type DocumentRelationship = {
1905
+ readonly createdAt: Scalars["DateTime"]["output"];
1906
+ readonly metadata?: Maybe<Scalars["JSONObject"]["output"]>;
1907
+ readonly relationshipType: Scalars["String"]["output"];
1908
+ readonly sourceId: Scalars["String"]["output"];
1909
+ readonly targetId: Scalars["String"]["output"];
1910
+ readonly updatedAt: Scalars["DateTime"]["output"];
1911
+ };
1912
+ export type DocumentRelationshipResultPage = {
1913
+ readonly cursor?: Maybe<Scalars["String"]["output"]>;
1914
+ readonly hasNextPage: Scalars["Boolean"]["output"];
1915
+ readonly hasPreviousPage: Scalars["Boolean"]["output"];
1916
+ readonly items: ReadonlyArray<DocumentRelationship>;
1917
+ };
1918
+ export type DocumentWithChildren = {
1746
1919
  readonly childIds: ReadonlyArray<Scalars["String"]["output"]>;
1747
1920
  readonly document: PhDocument;
1748
1921
  };
1749
- type JobChangeEvent = {
1922
+ export type JobChangeEvent = {
1750
1923
  readonly error?: Maybe<Scalars["String"]["output"]>;
1751
1924
  readonly jobId: Scalars["String"]["output"];
1752
- readonly result: Scalars["JSONObject"]["output"];
1925
+ /**
1926
+ * What the job produced, once it has produced anything. Nullable for the same
1927
+ * reason as `JobInfo.result`: a job that has not written yet has produced
1928
+ * nothing, and an empty object would claim otherwise.
1929
+ */
1930
+ readonly result?: Maybe<Scalars["JSONObject"]["output"]>;
1753
1931
  readonly status: Scalars["String"]["output"];
1754
1932
  };
1755
- type JobInfo = {
1933
+ export type JobInfo = {
1756
1934
  readonly completedAt?: Maybe<Scalars["DateTime"]["output"]>;
1757
1935
  readonly createdAt: Scalars["DateTime"]["output"];
1758
1936
  readonly error?: Maybe<Scalars["String"]["output"]>;
@@ -1764,11 +1942,11 @@ type JobInfo = {
1764
1942
  readonly result?: Maybe<Scalars["JSONObject"]["output"]>;
1765
1943
  readonly status: Scalars["String"]["output"];
1766
1944
  };
1767
- type MoveRelationshipResult = {
1945
+ export type MoveRelationshipResult = {
1768
1946
  readonly source: PhDocument;
1769
1947
  readonly target: PhDocument;
1770
1948
  };
1771
- type Mutation = {
1949
+ export type Mutation = {
1772
1950
  readonly addRelationship: PhDocument;
1773
1951
  readonly createDocument: PhDocument;
1774
1952
  readonly createEmptyDocument: PhDocument;
@@ -1796,101 +1974,112 @@ type Mutation = {
1796
1974
  * ask for; `result` is null until the job produces one.
1797
1975
  */
1798
1976
  readonly executeAsync: JobInfo;
1799
- 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. */
1800
- readonly mutateDocument: PhDocument; /** @deprecated Use executeAsync, which is typed and returns the job rather than only its id. */
1977
+ readonly moveRelationship: MoveRelationshipResult;
1978
+ /** @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. */
1979
+ readonly mutateDocument: PhDocument;
1980
+ /** @deprecated Use executeAsync, which is typed and returns the job rather than only its id. */
1801
1981
  readonly mutateDocumentAsync: Scalars["String"]["output"];
1802
1982
  readonly pushSyncEnvelopes: Scalars["Boolean"]["output"];
1803
1983
  readonly removeRelationship: PhDocument;
1804
1984
  readonly renameDocument: PhDocument;
1805
1985
  readonly setPreferredEditor: PhDocument;
1806
1986
  readonly touchChannel: TouchChannelResult;
1987
+ readonly updateRelationship: PhDocument;
1807
1988
  };
1808
- type MutationAddRelationshipArgs = {
1989
+ export type MutationAddRelationshipArgs = {
1809
1990
  branch?: InputMaybe<Scalars["String"]["input"]>;
1991
+ metadata?: InputMaybe<Scalars["JSONObject"]["input"]>;
1810
1992
  relationshipType: Scalars["String"]["input"];
1811
1993
  sourceIdentifier: Scalars["String"]["input"];
1812
1994
  targetIdentifier: Scalars["String"]["input"];
1813
1995
  };
1814
- type MutationCreateDocumentArgs = {
1996
+ export type MutationCreateDocumentArgs = {
1815
1997
  document: Scalars["JSONObject"]["input"];
1816
1998
  parentIdentifier?: InputMaybe<Scalars["String"]["input"]>;
1817
1999
  };
1818
- type MutationCreateEmptyDocumentArgs = {
2000
+ export type MutationCreateEmptyDocumentArgs = {
1819
2001
  documentType: Scalars["String"]["input"];
1820
2002
  parentIdentifier?: InputMaybe<Scalars["String"]["input"]>;
1821
2003
  };
1822
- type MutationDeleteDocumentArgs = {
2004
+ export type MutationDeleteDocumentArgs = {
1823
2005
  identifier: Scalars["String"]["input"];
1824
2006
  propagate?: InputMaybe<PropagationMode>;
1825
2007
  };
1826
- type MutationDeleteDocumentsArgs = {
2008
+ export type MutationDeleteDocumentsArgs = {
1827
2009
  identifiers: ReadonlyArray<Scalars["String"]["input"]>;
1828
2010
  propagate?: InputMaybe<PropagationMode>;
1829
2011
  };
1830
- type MutationExecuteArgs = {
2012
+ export type MutationExecuteArgs = {
1831
2013
  actions: ReadonlyArray<ActionInput>;
1832
2014
  branch?: InputMaybe<Scalars["String"]["input"]>;
1833
2015
  documentIdentifier: Scalars["String"]["input"];
1834
2016
  };
1835
- type MutationExecuteAsyncArgs = {
2017
+ export type MutationExecuteAsyncArgs = {
1836
2018
  actions: ReadonlyArray<ActionInput>;
1837
2019
  branch?: InputMaybe<Scalars["String"]["input"]>;
1838
2020
  documentIdentifier: Scalars["String"]["input"];
1839
2021
  };
1840
- type MutationMoveRelationshipArgs = {
2022
+ export type MutationMoveRelationshipArgs = {
1841
2023
  branch?: InputMaybe<Scalars["String"]["input"]>;
1842
2024
  relationshipType: Scalars["String"]["input"];
1843
2025
  sourceParentIdentifier: Scalars["String"]["input"];
1844
2026
  targetIdentifier: Scalars["String"]["input"];
1845
2027
  targetParentIdentifier: Scalars["String"]["input"];
1846
2028
  };
1847
- type MutationMutateDocumentArgs = {
2029
+ export type MutationMutateDocumentArgs = {
1848
2030
  actions: ReadonlyArray<Scalars["JSONObject"]["input"]>;
1849
2031
  documentIdentifier: Scalars["String"]["input"];
1850
2032
  view?: InputMaybe<ViewFilterInput>;
1851
2033
  };
1852
- type MutationMutateDocumentAsyncArgs = {
2034
+ export type MutationMutateDocumentAsyncArgs = {
1853
2035
  actions: ReadonlyArray<Scalars["JSONObject"]["input"]>;
1854
2036
  documentIdentifier: Scalars["String"]["input"];
1855
2037
  view?: InputMaybe<ViewFilterInput>;
1856
2038
  };
1857
- type MutationPushSyncEnvelopesArgs = {
2039
+ export type MutationPushSyncEnvelopesArgs = {
1858
2040
  envelopes: ReadonlyArray<SyncEnvelopeInput>;
1859
2041
  };
1860
- type MutationRemoveRelationshipArgs = {
2042
+ export type MutationRemoveRelationshipArgs = {
1861
2043
  branch?: InputMaybe<Scalars["String"]["input"]>;
1862
2044
  relationshipType: Scalars["String"]["input"];
1863
2045
  sourceIdentifier: Scalars["String"]["input"];
1864
2046
  targetIdentifier: Scalars["String"]["input"];
1865
2047
  };
1866
- type MutationRenameDocumentArgs = {
2048
+ export type MutationRenameDocumentArgs = {
1867
2049
  branch?: InputMaybe<Scalars["String"]["input"]>;
1868
2050
  documentIdentifier: Scalars["String"]["input"];
1869
2051
  name: Scalars["String"]["input"];
1870
2052
  };
1871
- type MutationSetPreferredEditorArgs = {
2053
+ export type MutationSetPreferredEditorArgs = {
1872
2054
  branch?: InputMaybe<Scalars["String"]["input"]>;
1873
2055
  documentIdentifier: Scalars["String"]["input"];
1874
2056
  preferredEditor?: InputMaybe<Scalars["String"]["input"]>;
1875
2057
  };
1876
- type MutationTouchChannelArgs = {
2058
+ export type MutationTouchChannelArgs = {
1877
2059
  input: TouchChannelInput;
1878
2060
  };
1879
- type OperationContext = {
2061
+ export type MutationUpdateRelationshipArgs = {
2062
+ branch?: InputMaybe<Scalars["String"]["input"]>;
2063
+ metadata?: InputMaybe<Scalars["JSONObject"]["input"]>;
2064
+ relationshipType: Scalars["String"]["input"];
2065
+ sourceIdentifier: Scalars["String"]["input"];
2066
+ targetIdentifier: Scalars["String"]["input"];
2067
+ };
2068
+ export type OperationContext = {
1880
2069
  readonly branch: Scalars["String"]["output"];
1881
2070
  readonly documentId: Scalars["String"]["output"];
1882
2071
  readonly documentType: Scalars["String"]["output"];
1883
2072
  readonly ordinal: Scalars["Int"]["output"];
1884
2073
  readonly scope: Scalars["String"]["output"];
1885
2074
  };
1886
- type OperationContextInput = {
2075
+ export type OperationContextInput = {
1887
2076
  readonly branch: Scalars["String"]["input"];
1888
2077
  readonly documentId: Scalars["String"]["input"];
1889
2078
  readonly documentType: Scalars["String"]["input"];
1890
2079
  readonly ordinal: Scalars["Int"]["input"];
1891
2080
  readonly scope: Scalars["String"]["input"];
1892
2081
  };
1893
- type OperationInput = {
2082
+ export type OperationInput = {
1894
2083
  readonly action: ActionInput;
1895
2084
  readonly deniedReason?: InputMaybe<Scalars["String"]["input"]>;
1896
2085
  readonly error?: InputMaybe<Scalars["String"]["input"]>;
@@ -1900,15 +2089,15 @@ type OperationInput = {
1900
2089
  readonly skip: Scalars["Int"]["input"];
1901
2090
  readonly timestampUtcMs: Scalars["String"]["input"];
1902
2091
  };
1903
- type OperationWithContext = {
2092
+ export type OperationWithContext = {
1904
2093
  readonly context: OperationContext;
1905
2094
  readonly operation: ReactorOperation;
1906
2095
  };
1907
- type OperationWithContextInput = {
2096
+ export type OperationWithContextInput = {
1908
2097
  readonly context: OperationContextInput;
1909
2098
  readonly operation: OperationInput;
1910
2099
  };
1911
- type OperationsFilterInput = {
2100
+ export type OperationsFilterInput = {
1912
2101
  readonly actionTypes?: InputMaybe<ReadonlyArray<Scalars["String"]["input"]>>;
1913
2102
  readonly branch?: InputMaybe<Scalars["String"]["input"]>;
1914
2103
  readonly documentId: Scalars["String"]["input"];
@@ -1917,7 +2106,7 @@ type OperationsFilterInput = {
1917
2106
  readonly timestampFrom?: InputMaybe<Scalars["String"]["input"]>;
1918
2107
  readonly timestampTo?: InputMaybe<Scalars["String"]["input"]>;
1919
2108
  };
1920
- type PhDocument = {
2109
+ export type PhDocument = {
1921
2110
  readonly createdAtUtcIso: Scalars["DateTime"]["output"];
1922
2111
  readonly documentType: Scalars["String"]["output"];
1923
2112
  readonly id: Scalars["String"]["output"];
@@ -1929,37 +2118,38 @@ type PhDocument = {
1929
2118
  readonly slug?: Maybe<Scalars["String"]["output"]>;
1930
2119
  readonly state: Scalars["JSONObject"]["output"];
1931
2120
  };
1932
- type PhDocumentOperationsArgs = {
2121
+ export type PhDocumentOperationsArgs = {
1933
2122
  filter?: InputMaybe<DocumentOperationsFilterInput>;
1934
2123
  paging?: InputMaybe<PagingInput>;
1935
2124
  };
1936
- type PhDocumentResultPage = {
2125
+ export type PhDocumentResultPage = {
1937
2126
  readonly cursor?: Maybe<Scalars["String"]["output"]>;
1938
2127
  readonly hasNextPage: Scalars["Boolean"]["output"];
1939
2128
  readonly hasPreviousPage: Scalars["Boolean"]["output"];
1940
2129
  readonly items: ReadonlyArray<PhDocument>;
1941
- readonly totalCount: Scalars["Int"]["output"];
1942
2130
  };
1943
- type PagingInput = {
2131
+ export type PagingInput = {
1944
2132
  readonly cursor?: InputMaybe<Scalars["String"]["input"]>;
1945
2133
  readonly limit?: InputMaybe<Scalars["Int"]["input"]>;
1946
2134
  readonly offset?: InputMaybe<Scalars["Int"]["input"]>;
1947
2135
  };
1948
- type PollSyncEnvelopesResult = {
2136
+ export type PollSyncEnvelopesResult = {
1949
2137
  readonly ackOrdinal: Scalars["Int"]["output"];
1950
2138
  readonly deadLetters: ReadonlyArray<DeadLetterInfo>;
1951
2139
  readonly envelopes: ReadonlyArray<SyncEnvelope>;
1952
2140
  readonly hasMore: Scalars["Boolean"]["output"];
1953
2141
  };
1954
- declare enum PropagationMode {
2142
+ export declare enum PropagationMode {
1955
2143
  Cascade = "CASCADE",
1956
2144
  Orphan = "ORPHAN"
1957
2145
  }
1958
- type Query = {
2146
+ export type Query = {
1959
2147
  readonly document?: Maybe<DocumentWithChildren>;
2148
+ readonly documentIncomingRelationshipEdges: DocumentRelationshipResultPage;
1960
2149
  readonly documentIncomingRelationships: PhDocumentResultPage;
1961
2150
  readonly documentModels: DocumentModelResultPage;
1962
2151
  readonly documentOperations: ReactorOperationResultPage;
2152
+ readonly documentOutgoingRelationshipEdges: DocumentRelationshipResultPage;
1963
2153
  readonly documentOutgoingRelationships: PhDocumentResultPage;
1964
2154
  /**
1965
2155
  * Predicts whether the calling subject would be admitted to execute each of a
@@ -2004,49 +2194,61 @@ type Query = {
2004
2194
  */
2005
2195
  readonly pollSyncEnvelopes: PollSyncEnvelopesResult;
2006
2196
  };
2007
- type QueryDocumentArgs = {
2197
+ export type QueryDocumentArgs = {
2008
2198
  identifier: Scalars["String"]["input"];
2009
2199
  view?: InputMaybe<ViewFilterInput>;
2010
2200
  };
2011
- type QueryDocumentIncomingRelationshipsArgs = {
2201
+ export type QueryDocumentIncomingRelationshipEdgesArgs = {
2202
+ paging?: InputMaybe<PagingInput>;
2203
+ relationshipType?: InputMaybe<Scalars["String"]["input"]>;
2204
+ targetIdentifier: Scalars["String"]["input"];
2205
+ view?: InputMaybe<ViewFilterInput>;
2206
+ };
2207
+ export type QueryDocumentIncomingRelationshipsArgs = {
2012
2208
  paging?: InputMaybe<PagingInput>;
2013
2209
  relationshipType: Scalars["String"]["input"];
2014
2210
  targetIdentifier: Scalars["String"]["input"];
2015
2211
  view?: InputMaybe<ViewFilterInput>;
2016
2212
  };
2017
- type QueryDocumentModelsArgs = {
2213
+ export type QueryDocumentModelsArgs = {
2018
2214
  namespace?: InputMaybe<Scalars["String"]["input"]>;
2019
2215
  paging?: InputMaybe<PagingInput>;
2020
2216
  };
2021
- type QueryDocumentOperationsArgs = {
2217
+ export type QueryDocumentOperationsArgs = {
2022
2218
  filter: OperationsFilterInput;
2023
2219
  paging?: InputMaybe<PagingInput>;
2024
2220
  };
2025
- type QueryDocumentOutgoingRelationshipsArgs = {
2221
+ export type QueryDocumentOutgoingRelationshipEdgesArgs = {
2222
+ paging?: InputMaybe<PagingInput>;
2223
+ relationshipType?: InputMaybe<Scalars["String"]["input"]>;
2224
+ sourceIdentifier: Scalars["String"]["input"];
2225
+ view?: InputMaybe<ViewFilterInput>;
2226
+ };
2227
+ export type QueryDocumentOutgoingRelationshipsArgs = {
2026
2228
  paging?: InputMaybe<PagingInput>;
2027
2229
  relationshipType: Scalars["String"]["input"];
2028
2230
  sourceIdentifier: Scalars["String"]["input"];
2029
2231
  view?: InputMaybe<ViewFilterInput>;
2030
2232
  };
2031
- type QueryEvaluateActionsArgs = {
2233
+ export type QueryEvaluateActionsArgs = {
2032
2234
  branch?: InputMaybe<Scalars["String"]["input"]>;
2033
2235
  candidates: ReadonlyArray<ActionCandidateInput>;
2034
2236
  documentIdentifier: Scalars["String"]["input"];
2035
2237
  };
2036
- type QueryFindDocumentsArgs = {
2238
+ export type QueryFindDocumentsArgs = {
2037
2239
  paging?: InputMaybe<PagingInput>;
2038
2240
  search?: InputMaybe<SearchFilterInput>;
2039
2241
  view?: InputMaybe<ViewFilterInput>;
2040
2242
  };
2041
- type QueryJobStatusArgs = {
2243
+ export type QueryJobStatusArgs = {
2042
2244
  jobId: Scalars["String"]["input"];
2043
2245
  };
2044
- type QueryPollSyncEnvelopesArgs = {
2246
+ export type QueryPollSyncEnvelopesArgs = {
2045
2247
  channelId: Scalars["String"]["input"];
2046
2248
  outboxAck: Scalars["Int"]["input"];
2047
2249
  outboxLatest: Scalars["Int"]["input"];
2048
2250
  };
2049
- type ReactorOperation = {
2251
+ export type ReactorOperation = {
2050
2252
  readonly action: Action;
2051
2253
  readonly deniedReason?: Maybe<Scalars["String"]["output"]>;
2052
2254
  readonly error?: Maybe<Scalars["String"]["output"]>;
@@ -2056,77 +2258,76 @@ type ReactorOperation = {
2056
2258
  readonly skip: Scalars["Int"]["output"];
2057
2259
  readonly timestampUtcMs: Scalars["String"]["output"];
2058
2260
  };
2059
- type ReactorOperationResultPage = {
2261
+ export type ReactorOperationResultPage = {
2060
2262
  readonly cursor?: Maybe<Scalars["String"]["output"]>;
2061
2263
  readonly hasNextPage: Scalars["Boolean"]["output"];
2062
2264
  readonly hasPreviousPage: Scalars["Boolean"]["output"];
2063
2265
  readonly items: ReadonlyArray<ReactorOperation>;
2064
- readonly totalCount: Scalars["Int"]["output"];
2065
2266
  };
2066
- type ReactorSigner = {
2267
+ export type ReactorSigner = {
2067
2268
  readonly app?: Maybe<ReactorSignerApp>;
2068
2269
  readonly signatures: ReadonlyArray<Scalars["String"]["output"]>;
2069
2270
  readonly user?: Maybe<ReactorSignerUser>;
2070
2271
  };
2071
- type ReactorSignerApp = {
2272
+ export type ReactorSignerApp = {
2072
2273
  readonly key: Scalars["String"]["output"];
2073
2274
  readonly name: Scalars["String"]["output"];
2074
2275
  };
2075
- type ReactorSignerAppInput = {
2276
+ export type ReactorSignerAppInput = {
2076
2277
  readonly key: Scalars["String"]["input"];
2077
2278
  readonly name: Scalars["String"]["input"];
2078
2279
  };
2079
- type ReactorSignerInput = {
2280
+ export type ReactorSignerInput = {
2080
2281
  readonly app?: InputMaybe<ReactorSignerAppInput>;
2081
2282
  readonly signatures: ReadonlyArray<Scalars["String"]["input"]>;
2082
2283
  readonly user?: InputMaybe<ReactorSignerUserInput>;
2083
2284
  };
2084
- type ReactorSignerUser = {
2285
+ export type ReactorSignerUser = {
2085
2286
  readonly address: Scalars["String"]["output"];
2086
2287
  readonly chainId: Scalars["Int"]["output"];
2087
2288
  readonly networkId: Scalars["String"]["output"];
2088
2289
  };
2089
- type ReactorSignerUserInput = {
2290
+ export type ReactorSignerUserInput = {
2090
2291
  readonly address: Scalars["String"]["input"];
2091
2292
  readonly chainId: Scalars["Int"]["input"];
2092
2293
  readonly networkId: Scalars["String"]["input"];
2093
2294
  };
2094
- type RemoteCursor = {
2295
+ export type RemoteCursor = {
2095
2296
  readonly cursorOrdinal: Scalars["Int"]["output"];
2096
2297
  readonly lastSyncedAtUtcMs?: Maybe<Scalars["String"]["output"]>;
2097
2298
  readonly remoteName: Scalars["String"]["output"];
2098
2299
  };
2099
- type RemoteCursorInput = {
2300
+ export type RemoteCursorInput = {
2100
2301
  readonly cursorOrdinal: Scalars["Int"]["input"];
2101
2302
  readonly lastSyncedAtUtcMs?: InputMaybe<Scalars["String"]["input"]>;
2102
2303
  readonly remoteName: Scalars["String"]["input"];
2103
2304
  };
2104
- type RemoteFilterInput = {
2305
+ export type RemoteFilterInput = {
2105
2306
  readonly branch: Scalars["String"]["input"];
2106
2307
  readonly documentId: ReadonlyArray<Scalars["String"]["input"]>;
2107
2308
  readonly scope: ReadonlyArray<Scalars["String"]["input"]>;
2108
2309
  };
2109
- type Revision = {
2310
+ export type Revision = {
2110
2311
  readonly revision: Scalars["Int"]["output"];
2111
2312
  readonly scope: Scalars["String"]["output"];
2112
2313
  };
2113
- type SearchFilterInput = {
2314
+ export type SearchFilterInput = {
2114
2315
  readonly identifiers?: InputMaybe<ReadonlyArray<Scalars["String"]["input"]>>;
2115
2316
  readonly parentId?: InputMaybe<Scalars["String"]["input"]>;
2116
2317
  readonly type?: InputMaybe<Scalars["String"]["input"]>;
2117
2318
  };
2118
- type Subscription = {
2319
+ export type Subscription = {
2119
2320
  readonly documentChanges: DocumentChangeEvent;
2120
2321
  readonly jobChanges: JobChangeEvent;
2121
2322
  };
2122
- type SubscriptionDocumentChangesArgs = {
2323
+ export type SubscriptionDocumentChangesArgs = {
2123
2324
  search?: InputMaybe<SearchFilterInput>;
2124
2325
  view?: InputMaybe<ViewFilterInput>;
2125
2326
  };
2126
- type SubscriptionJobChangesArgs = {
2327
+ export type SubscriptionJobChangesArgs = {
2127
2328
  jobId: Scalars["String"]["input"];
2128
2329
  };
2129
- type SyncEnvelope = {
2330
+ export type SyncEnvelope = {
2130
2331
  readonly channelMeta: ChannelMeta;
2131
2332
  readonly cursor?: Maybe<RemoteCursor>;
2132
2333
  readonly dependsOn?: Maybe<ReadonlyArray<Scalars["String"]["output"]>>;
@@ -2134,7 +2335,7 @@ type SyncEnvelope = {
2134
2335
  readonly operations?: Maybe<ReadonlyArray<OperationWithContext>>;
2135
2336
  readonly type: SyncEnvelopeType;
2136
2337
  };
2137
- type SyncEnvelopeInput = {
2338
+ export type SyncEnvelopeInput = {
2138
2339
  readonly channelMeta: ChannelMetaInput;
2139
2340
  readonly cursor?: InputMaybe<RemoteCursorInput>;
2140
2341
  readonly dependsOn?: InputMaybe<ReadonlyArray<Scalars["String"]["input"]>>;
@@ -2142,26 +2343,26 @@ type SyncEnvelopeInput = {
2142
2343
  readonly operations?: InputMaybe<ReadonlyArray<OperationWithContextInput>>;
2143
2344
  readonly type: SyncEnvelopeType;
2144
2345
  };
2145
- declare enum SyncEnvelopeType {
2346
+ export declare enum SyncEnvelopeType {
2146
2347
  Ack = "ACK",
2147
2348
  Operations = "OPERATIONS"
2148
2349
  }
2149
- type TouchChannelInput = {
2350
+ export type TouchChannelInput = {
2150
2351
  readonly collectionId: Scalars["String"]["input"];
2151
2352
  readonly filter: RemoteFilterInput;
2152
2353
  readonly id: Scalars["String"]["input"];
2153
2354
  readonly name: Scalars["String"]["input"];
2154
2355
  readonly sinceTimestampUtcMs: Scalars["String"]["input"];
2155
2356
  };
2156
- type TouchChannelResult = {
2357
+ export type TouchChannelResult = {
2157
2358
  readonly ackOrdinal: Scalars["Int"]["output"];
2158
2359
  readonly success: Scalars["Boolean"]["output"];
2159
2360
  };
2160
- type ViewFilterInput = {
2361
+ export type ViewFilterInput = {
2161
2362
  readonly branch?: InputMaybe<Scalars["String"]["input"]>;
2162
2363
  readonly scopes?: InputMaybe<ReadonlyArray<Scalars["String"]["input"]>>;
2163
2364
  };
2164
- type PhDocumentFieldsFragment = {
2365
+ export type PhDocumentFieldsFragment = {
2165
2366
  readonly id: string;
2166
2367
  readonly slug?: string | null | undefined;
2167
2368
  readonly name: string;
@@ -2174,13 +2375,20 @@ type PhDocumentFieldsFragment = {
2174
2375
  readonly revision: number;
2175
2376
  }>;
2176
2377
  };
2177
- type GetDocumentModelsQueryVariables = Exact<{
2378
+ export type DocumentRelationshipFieldsFragment = {
2379
+ readonly sourceId: string;
2380
+ readonly targetId: string;
2381
+ readonly relationshipType: string;
2382
+ readonly metadata?: NonNullable<unknown> | null | undefined;
2383
+ readonly createdAt: string | Date;
2384
+ readonly updatedAt: string | Date;
2385
+ };
2386
+ export type GetDocumentModelsQueryVariables = Exact<{
2178
2387
  namespace?: InputMaybe<Scalars["String"]["input"]>;
2179
2388
  paging?: InputMaybe<PagingInput>;
2180
2389
  }>;
2181
- type GetDocumentModelsQuery = {
2390
+ export type GetDocumentModelsQuery = {
2182
2391
  readonly documentModels: {
2183
- readonly totalCount: number;
2184
2392
  readonly hasNextPage: boolean;
2185
2393
  readonly hasPreviousPage: boolean;
2186
2394
  readonly cursor?: string | null | undefined;
@@ -2193,11 +2401,11 @@ type GetDocumentModelsQuery = {
2193
2401
  }>;
2194
2402
  };
2195
2403
  };
2196
- type GetDocumentQueryVariables = Exact<{
2404
+ export type GetDocumentQueryVariables = Exact<{
2197
2405
  identifier: Scalars["String"]["input"];
2198
2406
  view?: InputMaybe<ViewFilterInput>;
2199
2407
  }>;
2200
- type GetDocumentQuery = {
2408
+ export type GetDocumentQuery = {
2201
2409
  readonly document?: {
2202
2410
  readonly childIds: ReadonlyArray<string>;
2203
2411
  readonly document: {
@@ -2215,13 +2423,13 @@ type GetDocumentQuery = {
2215
2423
  };
2216
2424
  } | null | undefined;
2217
2425
  };
2218
- type GetDocumentWithOperationsQueryVariables = Exact<{
2426
+ export type GetDocumentWithOperationsQueryVariables = Exact<{
2219
2427
  identifier: Scalars["String"]["input"];
2220
2428
  view?: InputMaybe<ViewFilterInput>;
2221
2429
  operationsFilter?: InputMaybe<DocumentOperationsFilterInput>;
2222
2430
  operationsPaging?: InputMaybe<PagingInput>;
2223
2431
  }>;
2224
- type GetDocumentWithOperationsQuery = {
2432
+ export type GetDocumentWithOperationsQuery = {
2225
2433
  readonly document?: {
2226
2434
  readonly childIds: ReadonlyArray<string>;
2227
2435
  readonly document: {
@@ -2233,7 +2441,6 @@ type GetDocumentWithOperationsQuery = {
2233
2441
  readonly createdAtUtcIso: string | Date;
2234
2442
  readonly lastModifiedAtUtcIso: string | Date;
2235
2443
  readonly operations?: {
2236
- readonly totalCount: number;
2237
2444
  readonly hasNextPage: boolean;
2238
2445
  readonly hasPreviousPage: boolean;
2239
2446
  readonly cursor?: string | null | undefined;
@@ -2275,15 +2482,14 @@ type GetDocumentWithOperationsQuery = {
2275
2482
  };
2276
2483
  } | null | undefined;
2277
2484
  };
2278
- type GetDocumentOutgoingRelationshipsQueryVariables = Exact<{
2485
+ export type GetDocumentOutgoingRelationshipsQueryVariables = Exact<{
2279
2486
  sourceIdentifier: Scalars["String"]["input"];
2280
2487
  relationshipType: Scalars["String"]["input"];
2281
2488
  view?: InputMaybe<ViewFilterInput>;
2282
2489
  paging?: InputMaybe<PagingInput>;
2283
2490
  }>;
2284
- type GetDocumentOutgoingRelationshipsQuery = {
2491
+ export type GetDocumentOutgoingRelationshipsQuery = {
2285
2492
  readonly documentOutgoingRelationships: {
2286
- readonly totalCount: number;
2287
2493
  readonly hasNextPage: boolean;
2288
2494
  readonly hasPreviousPage: boolean;
2289
2495
  readonly cursor?: string | null | undefined;
@@ -2302,15 +2508,14 @@ type GetDocumentOutgoingRelationshipsQuery = {
2302
2508
  }>;
2303
2509
  };
2304
2510
  };
2305
- type GetDocumentIncomingRelationshipsQueryVariables = Exact<{
2511
+ export type GetDocumentIncomingRelationshipsQueryVariables = Exact<{
2306
2512
  targetIdentifier: Scalars["String"]["input"];
2307
2513
  relationshipType: Scalars["String"]["input"];
2308
2514
  view?: InputMaybe<ViewFilterInput>;
2309
2515
  paging?: InputMaybe<PagingInput>;
2310
2516
  }>;
2311
- type GetDocumentIncomingRelationshipsQuery = {
2517
+ export type GetDocumentIncomingRelationshipsQuery = {
2312
2518
  readonly documentIncomingRelationships: {
2313
- readonly totalCount: number;
2314
2519
  readonly hasNextPage: boolean;
2315
2520
  readonly hasPreviousPage: boolean;
2316
2521
  readonly cursor?: string | null | undefined;
@@ -2329,14 +2534,55 @@ type GetDocumentIncomingRelationshipsQuery = {
2329
2534
  }>;
2330
2535
  };
2331
2536
  };
2332
- type FindDocumentsQueryVariables = Exact<{
2537
+ export type GetDocumentOutgoingRelationshipEdgesQueryVariables = Exact<{
2538
+ sourceIdentifier: Scalars["String"]["input"];
2539
+ relationshipType?: InputMaybe<Scalars["String"]["input"]>;
2540
+ view?: InputMaybe<ViewFilterInput>;
2541
+ paging?: InputMaybe<PagingInput>;
2542
+ }>;
2543
+ export type GetDocumentOutgoingRelationshipEdgesQuery = {
2544
+ readonly documentOutgoingRelationshipEdges: {
2545
+ readonly hasNextPage: boolean;
2546
+ readonly hasPreviousPage: boolean;
2547
+ readonly cursor?: string | null | undefined;
2548
+ readonly items: ReadonlyArray<{
2549
+ readonly sourceId: string;
2550
+ readonly targetId: string;
2551
+ readonly relationshipType: string;
2552
+ readonly metadata?: NonNullable<unknown> | null | undefined;
2553
+ readonly createdAt: string | Date;
2554
+ readonly updatedAt: string | Date;
2555
+ }>;
2556
+ };
2557
+ };
2558
+ export type GetDocumentIncomingRelationshipEdgesQueryVariables = Exact<{
2559
+ targetIdentifier: Scalars["String"]["input"];
2560
+ relationshipType?: InputMaybe<Scalars["String"]["input"]>;
2561
+ view?: InputMaybe<ViewFilterInput>;
2562
+ paging?: InputMaybe<PagingInput>;
2563
+ }>;
2564
+ export type GetDocumentIncomingRelationshipEdgesQuery = {
2565
+ readonly documentIncomingRelationshipEdges: {
2566
+ readonly hasNextPage: boolean;
2567
+ readonly hasPreviousPage: boolean;
2568
+ readonly cursor?: string | null | undefined;
2569
+ readonly items: ReadonlyArray<{
2570
+ readonly sourceId: string;
2571
+ readonly targetId: string;
2572
+ readonly relationshipType: string;
2573
+ readonly metadata?: NonNullable<unknown> | null | undefined;
2574
+ readonly createdAt: string | Date;
2575
+ readonly updatedAt: string | Date;
2576
+ }>;
2577
+ };
2578
+ };
2579
+ export type FindDocumentsQueryVariables = Exact<{
2333
2580
  search?: InputMaybe<SearchFilterInput>;
2334
2581
  view?: InputMaybe<ViewFilterInput>;
2335
2582
  paging?: InputMaybe<PagingInput>;
2336
2583
  }>;
2337
- type FindDocumentsQuery = {
2584
+ export type FindDocumentsQuery = {
2338
2585
  readonly findDocuments: {
2339
- readonly totalCount: number;
2340
2586
  readonly hasNextPage: boolean;
2341
2587
  readonly hasPreviousPage: boolean;
2342
2588
  readonly cursor?: string | null | undefined;
@@ -2355,13 +2601,12 @@ type FindDocumentsQuery = {
2355
2601
  }>;
2356
2602
  };
2357
2603
  };
2358
- type GetDocumentOperationsQueryVariables = Exact<{
2604
+ export type GetDocumentOperationsQueryVariables = Exact<{
2359
2605
  filter: OperationsFilterInput;
2360
2606
  paging?: InputMaybe<PagingInput>;
2361
2607
  }>;
2362
- type GetDocumentOperationsQuery = {
2608
+ export type GetDocumentOperationsQuery = {
2363
2609
  readonly documentOperations: {
2364
- readonly totalCount: number;
2365
2610
  readonly hasNextPage: boolean;
2366
2611
  readonly hasPreviousPage: boolean;
2367
2612
  readonly cursor?: string | null | undefined;
@@ -2397,10 +2642,10 @@ type GetDocumentOperationsQuery = {
2397
2642
  }>;
2398
2643
  };
2399
2644
  };
2400
- type GetJobStatusQueryVariables = Exact<{
2645
+ export type GetJobStatusQueryVariables = Exact<{
2401
2646
  jobId: Scalars["String"]["input"];
2402
2647
  }>;
2403
- type GetJobStatusQuery = {
2648
+ export type GetJobStatusQuery = {
2404
2649
  readonly jobStatus?: {
2405
2650
  readonly id: string;
2406
2651
  readonly status: string;
@@ -2410,12 +2655,12 @@ type GetJobStatusQuery = {
2410
2655
  readonly completedAt?: string | Date | null | undefined;
2411
2656
  } | null | undefined;
2412
2657
  };
2413
- type EvaluateActionsQueryVariables = Exact<{
2658
+ export type EvaluateActionsQueryVariables = Exact<{
2414
2659
  documentIdentifier: Scalars["String"]["input"];
2415
2660
  branch?: InputMaybe<Scalars["String"]["input"]>;
2416
2661
  candidates: ReadonlyArray<ActionCandidateInput>;
2417
2662
  }>;
2418
- type EvaluateActionsQuery = {
2663
+ export type EvaluateActionsQuery = {
2419
2664
  readonly evaluateActions: {
2420
2665
  readonly allAllowed: boolean;
2421
2666
  readonly anyAllowed: boolean;
@@ -2427,11 +2672,11 @@ type EvaluateActionsQuery = {
2427
2672
  }>;
2428
2673
  };
2429
2674
  };
2430
- type CreateDocumentMutationVariables = Exact<{
2675
+ export type CreateDocumentMutationVariables = Exact<{
2431
2676
  document: Scalars["JSONObject"]["input"];
2432
2677
  parentIdentifier?: InputMaybe<Scalars["String"]["input"]>;
2433
2678
  }>;
2434
- type CreateDocumentMutation = {
2679
+ export type CreateDocumentMutation = {
2435
2680
  readonly createDocument: {
2436
2681
  readonly id: string;
2437
2682
  readonly slug?: string | null | undefined;
@@ -2446,11 +2691,11 @@ type CreateDocumentMutation = {
2446
2691
  }>;
2447
2692
  };
2448
2693
  };
2449
- type CreateEmptyDocumentMutationVariables = Exact<{
2694
+ export type CreateEmptyDocumentMutationVariables = Exact<{
2450
2695
  documentType: Scalars["String"]["input"];
2451
2696
  parentIdentifier?: InputMaybe<Scalars["String"]["input"]>;
2452
2697
  }>;
2453
- type CreateEmptyDocumentMutation = {
2698
+ export type CreateEmptyDocumentMutation = {
2454
2699
  readonly createEmptyDocument: {
2455
2700
  readonly id: string;
2456
2701
  readonly slug?: string | null | undefined;
@@ -2465,12 +2710,12 @@ type CreateEmptyDocumentMutation = {
2465
2710
  }>;
2466
2711
  };
2467
2712
  };
2468
- type MutateDocumentMutationVariables = Exact<{
2713
+ export type MutateDocumentMutationVariables = Exact<{
2469
2714
  documentIdentifier: Scalars["String"]["input"];
2470
2715
  actions: ReadonlyArray<ActionInput>;
2471
2716
  branch?: InputMaybe<Scalars["String"]["input"]>;
2472
2717
  }>;
2473
- type MutateDocumentMutation = {
2718
+ export type MutateDocumentMutation = {
2474
2719
  readonly mutateDocument: {
2475
2720
  readonly id: string;
2476
2721
  readonly slug?: string | null | undefined;
@@ -2485,12 +2730,12 @@ type MutateDocumentMutation = {
2485
2730
  }>;
2486
2731
  };
2487
2732
  };
2488
- type MutateDocumentAsyncMutationVariables = Exact<{
2733
+ export type MutateDocumentAsyncMutationVariables = Exact<{
2489
2734
  documentIdentifier: Scalars["String"]["input"];
2490
2735
  actions: ReadonlyArray<ActionInput>;
2491
2736
  branch?: InputMaybe<Scalars["String"]["input"]>;
2492
2737
  }>;
2493
- type MutateDocumentAsyncMutation = {
2738
+ export type MutateDocumentAsyncMutation = {
2494
2739
  readonly mutateDocumentAsync: {
2495
2740
  readonly id: string;
2496
2741
  readonly status: string;
@@ -2500,12 +2745,12 @@ type MutateDocumentAsyncMutation = {
2500
2745
  readonly completedAt?: string | Date | null | undefined;
2501
2746
  };
2502
2747
  };
2503
- type RenameDocumentMutationVariables = Exact<{
2748
+ export type RenameDocumentMutationVariables = Exact<{
2504
2749
  documentIdentifier: Scalars["String"]["input"];
2505
2750
  name: Scalars["String"]["input"];
2506
2751
  branch?: InputMaybe<Scalars["String"]["input"]>;
2507
2752
  }>;
2508
- type RenameDocumentMutation = {
2753
+ export type RenameDocumentMutation = {
2509
2754
  readonly renameDocument: {
2510
2755
  readonly id: string;
2511
2756
  readonly slug?: string | null | undefined;
@@ -2520,12 +2765,12 @@ type RenameDocumentMutation = {
2520
2765
  }>;
2521
2766
  };
2522
2767
  };
2523
- type SetPreferredEditorMutationVariables = Exact<{
2768
+ export type SetPreferredEditorMutationVariables = Exact<{
2524
2769
  documentIdentifier: Scalars["String"]["input"];
2525
2770
  preferredEditor?: InputMaybe<Scalars["String"]["input"]>;
2526
2771
  branch?: InputMaybe<Scalars["String"]["input"]>;
2527
2772
  }>;
2528
- type SetPreferredEditorMutation = {
2773
+ export type SetPreferredEditorMutation = {
2529
2774
  readonly setPreferredEditor: {
2530
2775
  readonly id: string;
2531
2776
  readonly slug?: string | null | undefined;
@@ -2540,13 +2785,14 @@ type SetPreferredEditorMutation = {
2540
2785
  }>;
2541
2786
  };
2542
2787
  };
2543
- type AddRelationshipMutationVariables = Exact<{
2788
+ export type AddRelationshipMutationVariables = Exact<{
2544
2789
  sourceIdentifier: Scalars["String"]["input"];
2545
2790
  targetIdentifier: Scalars["String"]["input"];
2546
2791
  relationshipType: Scalars["String"]["input"];
2792
+ metadata?: InputMaybe<Scalars["JSONObject"]["input"]>;
2547
2793
  branch?: InputMaybe<Scalars["String"]["input"]>;
2548
2794
  }>;
2549
- type AddRelationshipMutation = {
2795
+ export type AddRelationshipMutation = {
2550
2796
  readonly addRelationship: {
2551
2797
  readonly id: string;
2552
2798
  readonly slug?: string | null | undefined;
@@ -2561,13 +2807,35 @@ type AddRelationshipMutation = {
2561
2807
  }>;
2562
2808
  };
2563
2809
  };
2564
- type RemoveRelationshipMutationVariables = Exact<{
2810
+ export type UpdateRelationshipMutationVariables = Exact<{
2565
2811
  sourceIdentifier: Scalars["String"]["input"];
2566
2812
  targetIdentifier: Scalars["String"]["input"];
2567
2813
  relationshipType: Scalars["String"]["input"];
2814
+ metadata?: InputMaybe<Scalars["JSONObject"]["input"]>;
2568
2815
  branch?: InputMaybe<Scalars["String"]["input"]>;
2569
2816
  }>;
2570
- type RemoveRelationshipMutation = {
2817
+ export type UpdateRelationshipMutation = {
2818
+ readonly updateRelationship: {
2819
+ readonly id: string;
2820
+ readonly slug?: string | null | undefined;
2821
+ readonly name: string;
2822
+ readonly documentType: string;
2823
+ readonly state: NonNullable<unknown>;
2824
+ readonly createdAtUtcIso: string | Date;
2825
+ readonly lastModifiedAtUtcIso: string | Date;
2826
+ readonly revisionsList: ReadonlyArray<{
2827
+ readonly scope: string;
2828
+ readonly revision: number;
2829
+ }>;
2830
+ };
2831
+ };
2832
+ export type RemoveRelationshipMutationVariables = Exact<{
2833
+ sourceIdentifier: Scalars["String"]["input"];
2834
+ targetIdentifier: Scalars["String"]["input"];
2835
+ relationshipType: Scalars["String"]["input"];
2836
+ branch?: InputMaybe<Scalars["String"]["input"]>;
2837
+ }>;
2838
+ export type RemoveRelationshipMutation = {
2571
2839
  readonly removeRelationship: {
2572
2840
  readonly id: string;
2573
2841
  readonly slug?: string | null | undefined;
@@ -2582,14 +2850,14 @@ type RemoveRelationshipMutation = {
2582
2850
  }>;
2583
2851
  };
2584
2852
  };
2585
- type MoveRelationshipMutationVariables = Exact<{
2853
+ export type MoveRelationshipMutationVariables = Exact<{
2586
2854
  sourceParentIdentifier: Scalars["String"]["input"];
2587
2855
  targetParentIdentifier: Scalars["String"]["input"];
2588
2856
  targetIdentifier: Scalars["String"]["input"];
2589
2857
  relationshipType: Scalars["String"]["input"];
2590
2858
  branch?: InputMaybe<Scalars["String"]["input"]>;
2591
2859
  }>;
2592
- type MoveRelationshipMutation = {
2860
+ export type MoveRelationshipMutation = {
2593
2861
  readonly moveRelationship: {
2594
2862
  readonly source: {
2595
2863
  readonly id: string;
@@ -2619,25 +2887,25 @@ type MoveRelationshipMutation = {
2619
2887
  };
2620
2888
  };
2621
2889
  };
2622
- type DeleteDocumentMutationVariables = Exact<{
2890
+ export type DeleteDocumentMutationVariables = Exact<{
2623
2891
  identifier: Scalars["String"]["input"];
2624
2892
  propagate?: InputMaybe<PropagationMode>;
2625
2893
  }>;
2626
- type DeleteDocumentMutation = {
2894
+ export type DeleteDocumentMutation = {
2627
2895
  readonly deleteDocument: boolean;
2628
2896
  };
2629
- type DeleteDocumentsMutationVariables = Exact<{
2897
+ export type DeleteDocumentsMutationVariables = Exact<{
2630
2898
  identifiers: ReadonlyArray<Scalars["String"]["input"]>;
2631
2899
  propagate?: InputMaybe<PropagationMode>;
2632
2900
  }>;
2633
- type DeleteDocumentsMutation = {
2901
+ export type DeleteDocumentsMutation = {
2634
2902
  readonly deleteDocuments: boolean;
2635
2903
  };
2636
- type DocumentChangesSubscriptionVariables = Exact<{
2904
+ export type DocumentChangesSubscriptionVariables = Exact<{
2637
2905
  search?: InputMaybe<SearchFilterInput>;
2638
2906
  view?: InputMaybe<ViewFilterInput>;
2639
2907
  }>;
2640
- type DocumentChangesSubscription = {
2908
+ export type DocumentChangesSubscription = {
2641
2909
  readonly documentChanges: {
2642
2910
  readonly type: DocumentChangeType;
2643
2911
  readonly documents: ReadonlyArray<{
@@ -2659,23 +2927,23 @@ type DocumentChangesSubscription = {
2659
2927
  } | null | undefined;
2660
2928
  };
2661
2929
  };
2662
- type JobChangesSubscriptionVariables = Exact<{
2930
+ export type JobChangesSubscriptionVariables = Exact<{
2663
2931
  jobId: Scalars["String"]["input"];
2664
2932
  }>;
2665
- type JobChangesSubscription = {
2933
+ export type JobChangesSubscription = {
2666
2934
  readonly jobChanges: {
2667
2935
  readonly jobId: string;
2668
2936
  readonly status: string;
2669
- readonly result: NonNullable<unknown>;
2937
+ readonly result?: NonNullable<unknown> | null | undefined;
2670
2938
  readonly error?: string | null | undefined;
2671
2939
  };
2672
2940
  };
2673
- type PollSyncEnvelopesQueryVariables = Exact<{
2941
+ export type PollSyncEnvelopesQueryVariables = Exact<{
2674
2942
  channelId: Scalars["String"]["input"];
2675
2943
  outboxAck: Scalars["Int"]["input"];
2676
2944
  outboxLatest: Scalars["Int"]["input"];
2677
2945
  }>;
2678
- type PollSyncEnvelopesQuery = {
2946
+ export type PollSyncEnvelopesQuery = {
2679
2947
  readonly pollSyncEnvelopes: {
2680
2948
  readonly ackOrdinal: number;
2681
2949
  readonly hasMore: boolean;
@@ -2737,47 +3005,47 @@ type PollSyncEnvelopesQuery = {
2737
3005
  }>;
2738
3006
  };
2739
3007
  };
2740
- type TouchChannelMutationVariables = Exact<{
3008
+ export type TouchChannelMutationVariables = Exact<{
2741
3009
  input: TouchChannelInput;
2742
3010
  }>;
2743
- type TouchChannelMutation = {
3011
+ export type TouchChannelMutation = {
2744
3012
  readonly touchChannel: {
2745
3013
  readonly success: boolean;
2746
3014
  readonly ackOrdinal: number;
2747
3015
  };
2748
3016
  };
2749
- type PushSyncEnvelopesMutationVariables = Exact<{
3017
+ export type PushSyncEnvelopesMutationVariables = Exact<{
2750
3018
  envelopes: ReadonlyArray<SyncEnvelopeInput>;
2751
3019
  }>;
2752
- type PushSyncEnvelopesMutation = {
3020
+ export type PushSyncEnvelopesMutation = {
2753
3021
  readonly pushSyncEnvelopes: boolean;
2754
3022
  };
2755
- type WithIndex<TObject> = TObject & Record<string, any>;
2756
- type ResolversObject<TObject> = WithIndex<TObject>;
2757
- type ResolverTypeWrapper<T> = Promise<T> | T;
2758
- type ResolverWithResolve<TResult, TParent, TContext, TArgs> = {
3023
+ export type WithIndex<TObject> = TObject & Record<string, any>;
3024
+ export type ResolversObject<TObject> = WithIndex<TObject>;
3025
+ export type ResolverTypeWrapper<T> = Promise<T> | T;
3026
+ export type ResolverWithResolve<TResult, TParent, TContext, TArgs> = {
2759
3027
  resolve: ResolverFn<TResult, TParent, TContext, TArgs>;
2760
3028
  };
2761
- 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>;
2762
- type ResolverFn<TResult, TParent, TContext, TArgs> = (parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => Promise<TResult> | TResult;
2763
- type SubscriptionSubscribeFn<TResult, TParent, TContext, TArgs> = (parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => AsyncIterable<TResult> | Promise<AsyncIterable<TResult>>;
2764
- type SubscriptionResolveFn<TResult, TParent, TContext, TArgs> = (parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => TResult | Promise<TResult>;
2765
- interface SubscriptionSubscriberObject<TResult, TKey extends string, TParent, TContext, TArgs> {
2766
- subscribe: SubscriptionSubscribeFn<{ [key in TKey]: TResult }, TParent, TContext, TArgs>;
2767
- resolve?: SubscriptionResolveFn<TResult, { [key in TKey]: TResult }, TContext, TArgs>;
3029
+ 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>;
3030
+ export type ResolverFn<TResult, TParent, TContext, TArgs> = (parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => Promise<TResult> | TResult;
3031
+ export type SubscriptionSubscribeFn<TResult, TParent, TContext, TArgs> = (parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => AsyncIterable<TResult> | Promise<AsyncIterable<TResult>>;
3032
+ export type SubscriptionResolveFn<TResult, TParent, TContext, TArgs> = (parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => TResult | Promise<TResult>;
3033
+ export interface SubscriptionSubscriberObject<TResult, TKey extends string, TParent, TContext, TArgs> {
3034
+ subscribe: SubscriptionSubscribeFn<{ [key in TKey]: TResult; }, TParent, TContext, TArgs>;
3035
+ resolve?: SubscriptionResolveFn<TResult, { [key in TKey]: TResult; }, TContext, TArgs>;
2768
3036
  }
2769
- interface SubscriptionResolverObject<TResult, TParent, TContext, TArgs> {
3037
+ export interface SubscriptionResolverObject<TResult, TParent, TContext, TArgs> {
2770
3038
  subscribe: SubscriptionSubscribeFn<any, TParent, TContext, TArgs>;
2771
3039
  resolve: SubscriptionResolveFn<TResult, any, TContext, TArgs>;
2772
3040
  }
2773
- type SubscriptionObject<TResult, TKey extends string, TParent, TContext, TArgs> = SubscriptionSubscriberObject<TResult, TKey, TParent, TContext, TArgs> | SubscriptionResolverObject<TResult, TParent, TContext, TArgs>;
2774
- 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>;
2775
- type TypeResolveFn<TTypes, TParent = Record<PropertyKey, never>, TContext = Record<PropertyKey, never>> = (parent: TParent, context: TContext, info: GraphQLResolveInfo) => Maybe<TTypes> | Promise<Maybe<TTypes>>;
2776
- type IsTypeOfResolverFn<T = Record<PropertyKey, never>, TContext = Record<PropertyKey, never>> = (obj: T, context: TContext, info: GraphQLResolveInfo) => boolean | Promise<boolean>;
2777
- type NextResolverFn<T> = () => Promise<T>;
2778
- 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>;
3041
+ export type SubscriptionObject<TResult, TKey extends string, TParent, TContext, TArgs> = SubscriptionSubscriberObject<TResult, TKey, TParent, TContext, TArgs> | SubscriptionResolverObject<TResult, TParent, TContext, TArgs>;
3042
+ 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>;
3043
+ export type TypeResolveFn<TTypes, TParent = Record<PropertyKey, never>, TContext = Record<PropertyKey, never>> = (parent: TParent, context: TContext, info: GraphQLResolveInfo) => Maybe<TTypes> | Promise<Maybe<TTypes>>;
3044
+ export type IsTypeOfResolverFn<T = Record<PropertyKey, never>, TContext = Record<PropertyKey, never>> = (obj: T, context: TContext, info: GraphQLResolveInfo) => boolean | Promise<boolean>;
3045
+ export type NextResolverFn<T> = () => Promise<T>;
3046
+ 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>;
2779
3047
  /** Mapping between all available schema types and the resolvers types */
2780
- type ResolversTypes = ResolversObject<{
3048
+ export type ResolversTypes = ResolversObject<{
2781
3049
  Action: ResolverTypeWrapper<Action>;
2782
3050
  ActionCandidateInput: ActionCandidateInput;
2783
3051
  ActionContext: ResolverTypeWrapper<ActionContext>;
@@ -2797,6 +3065,8 @@ type ResolversTypes = ResolversObject<{
2797
3065
  DocumentModelGlobalState: ResolverTypeWrapper<DocumentModelGlobalState>;
2798
3066
  DocumentModelResultPage: ResolverTypeWrapper<DocumentModelResultPage>;
2799
3067
  DocumentOperationsFilterInput: DocumentOperationsFilterInput;
3068
+ DocumentRelationship: ResolverTypeWrapper<DocumentRelationship>;
3069
+ DocumentRelationshipResultPage: ResolverTypeWrapper<DocumentRelationshipResultPage>;
2800
3070
  DocumentWithChildren: ResolverTypeWrapper<DocumentWithChildren>;
2801
3071
  Int: ResolverTypeWrapper<Scalars["Int"]["output"]>;
2802
3072
  JSONObject: ResolverTypeWrapper<Scalars["JSONObject"]["output"]>;
@@ -2839,7 +3109,7 @@ type ResolversTypes = ResolversObject<{
2839
3109
  ViewFilterInput: ViewFilterInput;
2840
3110
  }>;
2841
3111
  /** Mapping between all available schema types and the resolvers parents */
2842
- type ResolversParentTypes = ResolversObject<{
3112
+ export type ResolversParentTypes = ResolversObject<{
2843
3113
  Action: Action;
2844
3114
  ActionCandidateInput: ActionCandidateInput;
2845
3115
  ActionContext: ActionContext;
@@ -2857,6 +3127,8 @@ type ResolversParentTypes = ResolversObject<{
2857
3127
  DocumentModelGlobalState: DocumentModelGlobalState;
2858
3128
  DocumentModelResultPage: DocumentModelResultPage;
2859
3129
  DocumentOperationsFilterInput: DocumentOperationsFilterInput;
3130
+ DocumentRelationship: DocumentRelationship;
3131
+ DocumentRelationshipResultPage: DocumentRelationshipResultPage;
2860
3132
  DocumentWithChildren: DocumentWithChildren;
2861
3133
  Int: Scalars["Int"]["output"];
2862
3134
  JSONObject: Scalars["JSONObject"]["output"];
@@ -2896,7 +3168,7 @@ type ResolversParentTypes = ResolversObject<{
2896
3168
  TouchChannelResult: TouchChannelResult;
2897
3169
  ViewFilterInput: ViewFilterInput;
2898
3170
  }>;
2899
- type ActionResolvers<ContextType = Context, ParentType extends ResolversParentTypes["Action"] = ResolversParentTypes["Action"]> = ResolversObject<{
3171
+ export type ActionResolvers<ContextType = Context, ParentType extends ResolversParentTypes["Action"] = ResolversParentTypes["Action"]> = ResolversObject<{
2900
3172
  context?: Resolver<Maybe<ResolversTypes["ActionContext"]>, ParentType, ContextType>;
2901
3173
  id?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
2902
3174
  input?: Resolver<ResolversTypes["JSONObject"], ParentType, ContextType>;
@@ -2904,27 +3176,27 @@ type ActionResolvers<ContextType = Context, ParentType extends ResolversParentTy
2904
3176
  timestampUtcMs?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
2905
3177
  type?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
2906
3178
  }>;
2907
- type ActionContextResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ActionContext"] = ResolversParentTypes["ActionContext"]> = ResolversObject<{
3179
+ export type ActionContextResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ActionContext"] = ResolversParentTypes["ActionContext"]> = ResolversObject<{
2908
3180
  signer?: Resolver<Maybe<ResolversTypes["ReactorSigner"]>, ParentType, ContextType>;
2909
3181
  }>;
2910
- type ActionEvaluationResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ActionEvaluation"] = ResolversParentTypes["ActionEvaluation"]> = ResolversObject<{
3182
+ export type ActionEvaluationResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ActionEvaluation"] = ResolversParentTypes["ActionEvaluation"]> = ResolversObject<{
2911
3183
  decision?: Resolver<ResolversTypes["AuthDecision"], ParentType, ContextType>;
2912
3184
  reason?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
2913
3185
  }>;
2914
- type ActionEvaluationsResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ActionEvaluations"] = ResolversParentTypes["ActionEvaluations"]> = ResolversObject<{
3186
+ export type ActionEvaluationsResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ActionEvaluations"] = ResolversParentTypes["ActionEvaluations"]> = ResolversObject<{
2915
3187
  allAllowed?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
2916
3188
  allDenied?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
2917
3189
  anyAllowed?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
2918
3190
  anyDenied?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
2919
3191
  evaluations?: Resolver<ReadonlyArray<ResolversTypes["ActionEvaluation"]>, ParentType, ContextType>;
2920
3192
  }>;
2921
- type ChannelMetaResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ChannelMeta"] = ResolversParentTypes["ChannelMeta"]> = ResolversObject<{
3193
+ export type ChannelMetaResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ChannelMeta"] = ResolversParentTypes["ChannelMeta"]> = ResolversObject<{
2922
3194
  id?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
2923
3195
  }>;
2924
- interface DateTimeScalarConfig extends GraphQLScalarTypeConfig<ResolversTypes["DateTime"], any> {
3196
+ export interface DateTimeScalarConfig extends GraphQLScalarTypeConfig<ResolversTypes["DateTime"], any> {
2925
3197
  name: "DateTime";
2926
3198
  }
2927
- type DeadLetterInfoResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DeadLetterInfo"] = ResolversParentTypes["DeadLetterInfo"]> = ResolversObject<{
3199
+ export type DeadLetterInfoResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DeadLetterInfo"] = ResolversParentTypes["DeadLetterInfo"]> = ResolversObject<{
2928
3200
  branch?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
2929
3201
  documentId?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
2930
3202
  error?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
@@ -2933,43 +3205,56 @@ type DeadLetterInfoResolvers<ContextType = Context, ParentType extends Resolvers
2933
3205
  operationCount?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
2934
3206
  scopes?: Resolver<ReadonlyArray<ResolversTypes["String"]>, ParentType, ContextType>;
2935
3207
  }>;
2936
- type DocumentChangeContextResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DocumentChangeContext"] = ResolversParentTypes["DocumentChangeContext"]> = ResolversObject<{
3208
+ export type DocumentChangeContextResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DocumentChangeContext"] = ResolversParentTypes["DocumentChangeContext"]> = ResolversObject<{
2937
3209
  childId?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
2938
3210
  parentId?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
2939
3211
  }>;
2940
- type DocumentChangeEventResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DocumentChangeEvent"] = ResolversParentTypes["DocumentChangeEvent"]> = ResolversObject<{
3212
+ export type DocumentChangeEventResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DocumentChangeEvent"] = ResolversParentTypes["DocumentChangeEvent"]> = ResolversObject<{
2941
3213
  context?: Resolver<Maybe<ResolversTypes["DocumentChangeContext"]>, ParentType, ContextType>;
2942
3214
  documents?: Resolver<ReadonlyArray<ResolversTypes["PHDocument"]>, ParentType, ContextType>;
2943
3215
  type?: Resolver<ResolversTypes["DocumentChangeType"], ParentType, ContextType>;
2944
3216
  }>;
2945
- type DocumentModelGlobalStateResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DocumentModelGlobalState"] = ResolversParentTypes["DocumentModelGlobalState"]> = ResolversObject<{
3217
+ export type DocumentModelGlobalStateResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DocumentModelGlobalState"] = ResolversParentTypes["DocumentModelGlobalState"]> = ResolversObject<{
2946
3218
  id?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
2947
3219
  name?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
2948
3220
  namespace?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
2949
3221
  specification?: Resolver<ResolversTypes["JSONObject"], ParentType, ContextType>;
2950
3222
  version?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
2951
3223
  }>;
2952
- type DocumentModelResultPageResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DocumentModelResultPage"] = ResolversParentTypes["DocumentModelResultPage"]> = ResolversObject<{
3224
+ export type DocumentModelResultPageResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DocumentModelResultPage"] = ResolversParentTypes["DocumentModelResultPage"]> = ResolversObject<{
2953
3225
  cursor?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
2954
3226
  hasNextPage?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
2955
3227
  hasPreviousPage?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
2956
3228
  items?: Resolver<ReadonlyArray<ResolversTypes["DocumentModelGlobalState"]>, ParentType, ContextType>;
2957
- totalCount?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
2958
3229
  }>;
2959
- type DocumentWithChildrenResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DocumentWithChildren"] = ResolversParentTypes["DocumentWithChildren"]> = ResolversObject<{
3230
+ export type DocumentRelationshipResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DocumentRelationship"] = ResolversParentTypes["DocumentRelationship"]> = ResolversObject<{
3231
+ createdAt?: Resolver<ResolversTypes["DateTime"], ParentType, ContextType>;
3232
+ metadata?: Resolver<Maybe<ResolversTypes["JSONObject"]>, ParentType, ContextType>;
3233
+ relationshipType?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3234
+ sourceId?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3235
+ targetId?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3236
+ updatedAt?: Resolver<ResolversTypes["DateTime"], ParentType, ContextType>;
3237
+ }>;
3238
+ export type DocumentRelationshipResultPageResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DocumentRelationshipResultPage"] = ResolversParentTypes["DocumentRelationshipResultPage"]> = ResolversObject<{
3239
+ cursor?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
3240
+ hasNextPage?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
3241
+ hasPreviousPage?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
3242
+ items?: Resolver<ReadonlyArray<ResolversTypes["DocumentRelationship"]>, ParentType, ContextType>;
3243
+ }>;
3244
+ export type DocumentWithChildrenResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DocumentWithChildren"] = ResolversParentTypes["DocumentWithChildren"]> = ResolversObject<{
2960
3245
  childIds?: Resolver<ReadonlyArray<ResolversTypes["String"]>, ParentType, ContextType>;
2961
3246
  document?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType>;
2962
3247
  }>;
2963
- interface JsonObjectScalarConfig extends GraphQLScalarTypeConfig<ResolversTypes["JSONObject"], any> {
3248
+ export interface JsonObjectScalarConfig extends GraphQLScalarTypeConfig<ResolversTypes["JSONObject"], any> {
2964
3249
  name: "JSONObject";
2965
3250
  }
2966
- type JobChangeEventResolvers<ContextType = Context, ParentType extends ResolversParentTypes["JobChangeEvent"] = ResolversParentTypes["JobChangeEvent"]> = ResolversObject<{
3251
+ export type JobChangeEventResolvers<ContextType = Context, ParentType extends ResolversParentTypes["JobChangeEvent"] = ResolversParentTypes["JobChangeEvent"]> = ResolversObject<{
2967
3252
  error?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
2968
3253
  jobId?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
2969
- result?: Resolver<ResolversTypes["JSONObject"], ParentType, ContextType>;
3254
+ result?: Resolver<Maybe<ResolversTypes["JSONObject"]>, ParentType, ContextType>;
2970
3255
  status?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
2971
3256
  }>;
2972
- type JobInfoResolvers<ContextType = Context, ParentType extends ResolversParentTypes["JobInfo"] = ResolversParentTypes["JobInfo"]> = ResolversObject<{
3257
+ export type JobInfoResolvers<ContextType = Context, ParentType extends ResolversParentTypes["JobInfo"] = ResolversParentTypes["JobInfo"]> = ResolversObject<{
2973
3258
  completedAt?: Resolver<Maybe<ResolversTypes["DateTime"]>, ParentType, ContextType>;
2974
3259
  createdAt?: Resolver<ResolversTypes["DateTime"], ParentType, ContextType>;
2975
3260
  error?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
@@ -2977,11 +3262,11 @@ type JobInfoResolvers<ContextType = Context, ParentType extends ResolversParentT
2977
3262
  result?: Resolver<Maybe<ResolversTypes["JSONObject"]>, ParentType, ContextType>;
2978
3263
  status?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
2979
3264
  }>;
2980
- type MoveRelationshipResultResolvers<ContextType = Context, ParentType extends ResolversParentTypes["MoveRelationshipResult"] = ResolversParentTypes["MoveRelationshipResult"]> = ResolversObject<{
3265
+ export type MoveRelationshipResultResolvers<ContextType = Context, ParentType extends ResolversParentTypes["MoveRelationshipResult"] = ResolversParentTypes["MoveRelationshipResult"]> = ResolversObject<{
2981
3266
  source?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType>;
2982
3267
  target?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType>;
2983
3268
  }>;
2984
- type MutationResolvers<ContextType = Context, ParentType extends ResolversParentTypes["Mutation"] = ResolversParentTypes["Mutation"]> = ResolversObject<{
3269
+ export type MutationResolvers<ContextType = Context, ParentType extends ResolversParentTypes["Mutation"] = ResolversParentTypes["Mutation"]> = ResolversObject<{
2985
3270
  addRelationship?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType, RequireFields<MutationAddRelationshipArgs, "relationshipType" | "sourceIdentifier" | "targetIdentifier">>;
2986
3271
  createDocument?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType, RequireFields<MutationCreateDocumentArgs, "document">>;
2987
3272
  createEmptyDocument?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType, RequireFields<MutationCreateEmptyDocumentArgs, "documentType">>;
@@ -2997,19 +3282,20 @@ type MutationResolvers<ContextType = Context, ParentType extends ResolversParent
2997
3282
  renameDocument?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType, RequireFields<MutationRenameDocumentArgs, "documentIdentifier" | "name">>;
2998
3283
  setPreferredEditor?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType, RequireFields<MutationSetPreferredEditorArgs, "documentIdentifier">>;
2999
3284
  touchChannel?: Resolver<ResolversTypes["TouchChannelResult"], ParentType, ContextType, RequireFields<MutationTouchChannelArgs, "input">>;
3285
+ updateRelationship?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType, RequireFields<MutationUpdateRelationshipArgs, "relationshipType" | "sourceIdentifier" | "targetIdentifier">>;
3000
3286
  }>;
3001
- type OperationContextResolvers<ContextType = Context, ParentType extends ResolversParentTypes["OperationContext"] = ResolversParentTypes["OperationContext"]> = ResolversObject<{
3287
+ export type OperationContextResolvers<ContextType = Context, ParentType extends ResolversParentTypes["OperationContext"] = ResolversParentTypes["OperationContext"]> = ResolversObject<{
3002
3288
  branch?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3003
3289
  documentId?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3004
3290
  documentType?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3005
3291
  ordinal?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
3006
3292
  scope?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3007
3293
  }>;
3008
- type OperationWithContextResolvers<ContextType = Context, ParentType extends ResolversParentTypes["OperationWithContext"] = ResolversParentTypes["OperationWithContext"]> = ResolversObject<{
3294
+ export type OperationWithContextResolvers<ContextType = Context, ParentType extends ResolversParentTypes["OperationWithContext"] = ResolversParentTypes["OperationWithContext"]> = ResolversObject<{
3009
3295
  context?: Resolver<ResolversTypes["OperationContext"], ParentType, ContextType>;
3010
3296
  operation?: Resolver<ResolversTypes["ReactorOperation"], ParentType, ContextType>;
3011
3297
  }>;
3012
- type PhDocumentResolvers<ContextType = Context, ParentType extends ResolversParentTypes["PHDocument"] = ResolversParentTypes["PHDocument"]> = ResolversObject<{
3298
+ export type PhDocumentResolvers<ContextType = Context, ParentType extends ResolversParentTypes["PHDocument"] = ResolversParentTypes["PHDocument"]> = ResolversObject<{
3013
3299
  createdAtUtcIso?: Resolver<ResolversTypes["DateTime"], ParentType, ContextType>;
3014
3300
  documentType?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3015
3301
  id?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
@@ -3021,31 +3307,32 @@ type PhDocumentResolvers<ContextType = Context, ParentType extends ResolversPare
3021
3307
  slug?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
3022
3308
  state?: Resolver<ResolversTypes["JSONObject"], ParentType, ContextType>;
3023
3309
  }>;
3024
- type PhDocumentResultPageResolvers<ContextType = Context, ParentType extends ResolversParentTypes["PHDocumentResultPage"] = ResolversParentTypes["PHDocumentResultPage"]> = ResolversObject<{
3310
+ export type PhDocumentResultPageResolvers<ContextType = Context, ParentType extends ResolversParentTypes["PHDocumentResultPage"] = ResolversParentTypes["PHDocumentResultPage"]> = ResolversObject<{
3025
3311
  cursor?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
3026
3312
  hasNextPage?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
3027
3313
  hasPreviousPage?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
3028
3314
  items?: Resolver<ReadonlyArray<ResolversTypes["PHDocument"]>, ParentType, ContextType>;
3029
- totalCount?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
3030
3315
  }>;
3031
- type PollSyncEnvelopesResultResolvers<ContextType = Context, ParentType extends ResolversParentTypes["PollSyncEnvelopesResult"] = ResolversParentTypes["PollSyncEnvelopesResult"]> = ResolversObject<{
3316
+ export type PollSyncEnvelopesResultResolvers<ContextType = Context, ParentType extends ResolversParentTypes["PollSyncEnvelopesResult"] = ResolversParentTypes["PollSyncEnvelopesResult"]> = ResolversObject<{
3032
3317
  ackOrdinal?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
3033
3318
  deadLetters?: Resolver<ReadonlyArray<ResolversTypes["DeadLetterInfo"]>, ParentType, ContextType>;
3034
3319
  envelopes?: Resolver<ReadonlyArray<ResolversTypes["SyncEnvelope"]>, ParentType, ContextType>;
3035
3320
  hasMore?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
3036
3321
  }>;
3037
- type QueryResolvers<ContextType = Context, ParentType extends ResolversParentTypes["Query"] = ResolversParentTypes["Query"]> = ResolversObject<{
3322
+ export type QueryResolvers<ContextType = Context, ParentType extends ResolversParentTypes["Query"] = ResolversParentTypes["Query"]> = ResolversObject<{
3038
3323
  document?: Resolver<Maybe<ResolversTypes["DocumentWithChildren"]>, ParentType, ContextType, RequireFields<QueryDocumentArgs, "identifier">>;
3324
+ documentIncomingRelationshipEdges?: Resolver<ResolversTypes["DocumentRelationshipResultPage"], ParentType, ContextType, RequireFields<QueryDocumentIncomingRelationshipEdgesArgs, "targetIdentifier">>;
3039
3325
  documentIncomingRelationships?: Resolver<ResolversTypes["PHDocumentResultPage"], ParentType, ContextType, RequireFields<QueryDocumentIncomingRelationshipsArgs, "relationshipType" | "targetIdentifier">>;
3040
3326
  documentModels?: Resolver<ResolversTypes["DocumentModelResultPage"], ParentType, ContextType, Partial<QueryDocumentModelsArgs>>;
3041
3327
  documentOperations?: Resolver<ResolversTypes["ReactorOperationResultPage"], ParentType, ContextType, RequireFields<QueryDocumentOperationsArgs, "filter">>;
3328
+ documentOutgoingRelationshipEdges?: Resolver<ResolversTypes["DocumentRelationshipResultPage"], ParentType, ContextType, RequireFields<QueryDocumentOutgoingRelationshipEdgesArgs, "sourceIdentifier">>;
3042
3329
  documentOutgoingRelationships?: Resolver<ResolversTypes["PHDocumentResultPage"], ParentType, ContextType, RequireFields<QueryDocumentOutgoingRelationshipsArgs, "relationshipType" | "sourceIdentifier">>;
3043
3330
  evaluateActions?: Resolver<ResolversTypes["ActionEvaluations"], ParentType, ContextType, RequireFields<QueryEvaluateActionsArgs, "candidates" | "documentIdentifier">>;
3044
3331
  findDocuments?: Resolver<ResolversTypes["PHDocumentResultPage"], ParentType, ContextType, Partial<QueryFindDocumentsArgs>>;
3045
3332
  jobStatus?: Resolver<Maybe<ResolversTypes["JobInfo"]>, ParentType, ContextType, RequireFields<QueryJobStatusArgs, "jobId">>;
3046
3333
  pollSyncEnvelopes?: Resolver<ResolversTypes["PollSyncEnvelopesResult"], ParentType, ContextType, RequireFields<QueryPollSyncEnvelopesArgs, "channelId" | "outboxAck" | "outboxLatest">>;
3047
3334
  }>;
3048
- type ReactorOperationResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ReactorOperation"] = ResolversParentTypes["ReactorOperation"]> = ResolversObject<{
3335
+ export type ReactorOperationResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ReactorOperation"] = ResolversParentTypes["ReactorOperation"]> = ResolversObject<{
3049
3336
  action?: Resolver<ResolversTypes["Action"], ParentType, ContextType>;
3050
3337
  deniedReason?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
3051
3338
  error?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
@@ -3055,41 +3342,40 @@ type ReactorOperationResolvers<ContextType = Context, ParentType extends Resolve
3055
3342
  skip?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
3056
3343
  timestampUtcMs?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3057
3344
  }>;
3058
- type ReactorOperationResultPageResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ReactorOperationResultPage"] = ResolversParentTypes["ReactorOperationResultPage"]> = ResolversObject<{
3345
+ export type ReactorOperationResultPageResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ReactorOperationResultPage"] = ResolversParentTypes["ReactorOperationResultPage"]> = ResolversObject<{
3059
3346
  cursor?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
3060
3347
  hasNextPage?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
3061
3348
  hasPreviousPage?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
3062
3349
  items?: Resolver<ReadonlyArray<ResolversTypes["ReactorOperation"]>, ParentType, ContextType>;
3063
- totalCount?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
3064
3350
  }>;
3065
- type ReactorSignerResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ReactorSigner"] = ResolversParentTypes["ReactorSigner"]> = ResolversObject<{
3351
+ export type ReactorSignerResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ReactorSigner"] = ResolversParentTypes["ReactorSigner"]> = ResolversObject<{
3066
3352
  app?: Resolver<Maybe<ResolversTypes["ReactorSignerApp"]>, ParentType, ContextType>;
3067
3353
  signatures?: Resolver<ReadonlyArray<ResolversTypes["String"]>, ParentType, ContextType>;
3068
3354
  user?: Resolver<Maybe<ResolversTypes["ReactorSignerUser"]>, ParentType, ContextType>;
3069
3355
  }>;
3070
- type ReactorSignerAppResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ReactorSignerApp"] = ResolversParentTypes["ReactorSignerApp"]> = ResolversObject<{
3356
+ export type ReactorSignerAppResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ReactorSignerApp"] = ResolversParentTypes["ReactorSignerApp"]> = ResolversObject<{
3071
3357
  key?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3072
3358
  name?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3073
3359
  }>;
3074
- type ReactorSignerUserResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ReactorSignerUser"] = ResolversParentTypes["ReactorSignerUser"]> = ResolversObject<{
3360
+ export type ReactorSignerUserResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ReactorSignerUser"] = ResolversParentTypes["ReactorSignerUser"]> = ResolversObject<{
3075
3361
  address?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3076
3362
  chainId?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
3077
3363
  networkId?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3078
3364
  }>;
3079
- type RemoteCursorResolvers<ContextType = Context, ParentType extends ResolversParentTypes["RemoteCursor"] = ResolversParentTypes["RemoteCursor"]> = ResolversObject<{
3365
+ export type RemoteCursorResolvers<ContextType = Context, ParentType extends ResolversParentTypes["RemoteCursor"] = ResolversParentTypes["RemoteCursor"]> = ResolversObject<{
3080
3366
  cursorOrdinal?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
3081
3367
  lastSyncedAtUtcMs?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
3082
3368
  remoteName?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3083
3369
  }>;
3084
- type RevisionResolvers<ContextType = Context, ParentType extends ResolversParentTypes["Revision"] = ResolversParentTypes["Revision"]> = ResolversObject<{
3370
+ export type RevisionResolvers<ContextType = Context, ParentType extends ResolversParentTypes["Revision"] = ResolversParentTypes["Revision"]> = ResolversObject<{
3085
3371
  revision?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
3086
3372
  scope?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
3087
3373
  }>;
3088
- type SubscriptionResolvers<ContextType = Context, ParentType extends ResolversParentTypes["Subscription"] = ResolversParentTypes["Subscription"]> = ResolversObject<{
3374
+ export type SubscriptionResolvers<ContextType = Context, ParentType extends ResolversParentTypes["Subscription"] = ResolversParentTypes["Subscription"]> = ResolversObject<{
3089
3375
  documentChanges?: SubscriptionResolver<ResolversTypes["DocumentChangeEvent"], "documentChanges", ParentType, ContextType, Partial<SubscriptionDocumentChangesArgs>>;
3090
3376
  jobChanges?: SubscriptionResolver<ResolversTypes["JobChangeEvent"], "jobChanges", ParentType, ContextType, RequireFields<SubscriptionJobChangesArgs, "jobId">>;
3091
3377
  }>;
3092
- type SyncEnvelopeResolvers<ContextType = Context, ParentType extends ResolversParentTypes["SyncEnvelope"] = ResolversParentTypes["SyncEnvelope"]> = ResolversObject<{
3378
+ export type SyncEnvelopeResolvers<ContextType = Context, ParentType extends ResolversParentTypes["SyncEnvelope"] = ResolversParentTypes["SyncEnvelope"]> = ResolversObject<{
3093
3379
  channelMeta?: Resolver<ResolversTypes["ChannelMeta"], ParentType, ContextType>;
3094
3380
  cursor?: Resolver<Maybe<ResolversTypes["RemoteCursor"]>, ParentType, ContextType>;
3095
3381
  dependsOn?: Resolver<Maybe<ReadonlyArray<ResolversTypes["String"]>>, ParentType, ContextType>;
@@ -3097,11 +3383,11 @@ type SyncEnvelopeResolvers<ContextType = Context, ParentType extends ResolversPa
3097
3383
  operations?: Resolver<Maybe<ReadonlyArray<ResolversTypes["OperationWithContext"]>>, ParentType, ContextType>;
3098
3384
  type?: Resolver<ResolversTypes["SyncEnvelopeType"], ParentType, ContextType>;
3099
3385
  }>;
3100
- type TouchChannelResultResolvers<ContextType = Context, ParentType extends ResolversParentTypes["TouchChannelResult"] = ResolversParentTypes["TouchChannelResult"]> = ResolversObject<{
3386
+ export type TouchChannelResultResolvers<ContextType = Context, ParentType extends ResolversParentTypes["TouchChannelResult"] = ResolversParentTypes["TouchChannelResult"]> = ResolversObject<{
3101
3387
  ackOrdinal?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
3102
3388
  success?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
3103
3389
  }>;
3104
- type Resolvers<ContextType = Context> = ResolversObject<{
3390
+ export type Resolvers<ContextType = Context> = ResolversObject<{
3105
3391
  Action?: ActionResolvers<ContextType>;
3106
3392
  ActionContext?: ActionContextResolvers<ContextType>;
3107
3393
  ActionEvaluation?: ActionEvaluationResolvers<ContextType>;
@@ -3113,6 +3399,8 @@ type Resolvers<ContextType = Context> = ResolversObject<{
3113
3399
  DocumentChangeEvent?: DocumentChangeEventResolvers<ContextType>;
3114
3400
  DocumentModelGlobalState?: DocumentModelGlobalStateResolvers<ContextType>;
3115
3401
  DocumentModelResultPage?: DocumentModelResultPageResolvers<ContextType>;
3402
+ DocumentRelationship?: DocumentRelationshipResolvers<ContextType>;
3403
+ DocumentRelationshipResultPage?: DocumentRelationshipResultPageResolvers<ContextType>;
3116
3404
  DocumentWithChildren?: DocumentWithChildrenResolvers<ContextType>;
3117
3405
  JSONObject?: GraphQLScalarType;
3118
3406
  JobChangeEvent?: JobChangeEventResolvers<ContextType>;
@@ -3136,66 +3424,72 @@ type Resolvers<ContextType = Context> = ResolversObject<{
3136
3424
  SyncEnvelope?: SyncEnvelopeResolvers<ContextType>;
3137
3425
  TouchChannelResult?: TouchChannelResultResolvers<ContextType>;
3138
3426
  }>;
3139
- type Properties<T> = Required<{ [K in keyof T]: z$1.ZodType<T[K]> }>;
3427
+ type Properties<T> = Required<{ [K in keyof T]: z$1.ZodType<T[K]>; }>;
3140
3428
  type definedNonNullAny = {};
3141
- declare const isDefinedNonNullAny: (v: any) => v is definedNonNullAny;
3142
- declare const definedNonNullAnySchema: z$1.ZodAny & z$1.ZodType<definedNonNullAny, any, z$1.core.$ZodTypeInternals<definedNonNullAny, any>>;
3143
- declare const AuthDecisionSchema: z$1.ZodEnum<typeof AuthDecision>;
3144
- declare const DocumentChangeTypeSchema: z$1.ZodEnum<typeof DocumentChangeType>;
3145
- declare const PropagationModeSchema: z$1.ZodEnum<typeof PropagationMode>;
3146
- declare const SyncEnvelopeTypeSchema: z$1.ZodEnum<typeof SyncEnvelopeType>;
3147
- declare function ActionCandidateInputSchema(): z$1.ZodObject<Properties<ActionCandidateInput>>;
3148
- declare function ActionContextInputSchema(): z$1.ZodObject<Properties<ActionContextInput>>;
3149
- declare function ActionInputSchema(): z$1.ZodObject<Properties<ActionInput>>;
3150
- declare function ChannelMetaInputSchema(): z$1.ZodObject<Properties<ChannelMetaInput>>;
3151
- declare function DocumentOperationsFilterInputSchema(): z$1.ZodObject<Properties<DocumentOperationsFilterInput>>;
3152
- declare function OperationContextInputSchema(): z$1.ZodObject<Properties<OperationContextInput>>;
3153
- declare function OperationInputSchema(): z$1.ZodObject<Properties<OperationInput>>;
3154
- declare function OperationWithContextInputSchema(): z$1.ZodObject<Properties<OperationWithContextInput>>;
3155
- declare function OperationsFilterInputSchema(): z$1.ZodObject<Properties<OperationsFilterInput>>;
3156
- declare function PagingInputSchema(): z$1.ZodObject<Properties<PagingInput>>;
3157
- declare function ReactorSignerAppInputSchema(): z$1.ZodObject<Properties<ReactorSignerAppInput>>;
3158
- declare function ReactorSignerInputSchema(): z$1.ZodObject<Properties<ReactorSignerInput>>;
3159
- declare function ReactorSignerUserInputSchema(): z$1.ZodObject<Properties<ReactorSignerUserInput>>;
3160
- declare function RemoteCursorInputSchema(): z$1.ZodObject<Properties<RemoteCursorInput>>;
3161
- declare function RemoteFilterInputSchema(): z$1.ZodObject<Properties<RemoteFilterInput>>;
3162
- declare function SearchFilterInputSchema(): z$1.ZodObject<Properties<SearchFilterInput>>;
3163
- declare function SyncEnvelopeInputSchema(): z$1.ZodObject<Properties<SyncEnvelopeInput>>;
3164
- declare function TouchChannelInputSchema(): z$1.ZodObject<Properties<TouchChannelInput>>;
3165
- declare function ViewFilterInputSchema(): z$1.ZodObject<Properties<ViewFilterInput>>;
3166
- declare const PhDocumentFieldsFragmentDoc: DocumentNode;
3167
- declare const GetDocumentModelsDocument: DocumentNode;
3168
- declare const GetDocumentDocument: DocumentNode;
3169
- declare const GetDocumentWithOperationsDocument: DocumentNode;
3170
- declare const GetDocumentOutgoingRelationshipsDocument: DocumentNode;
3171
- declare const GetDocumentIncomingRelationshipsDocument: DocumentNode;
3172
- declare const FindDocumentsDocument: DocumentNode;
3173
- declare const GetDocumentOperationsDocument: DocumentNode;
3174
- declare const GetJobStatusDocument: DocumentNode;
3175
- declare const EvaluateActionsDocument: DocumentNode;
3176
- declare const CreateDocumentDocument: DocumentNode;
3177
- declare const CreateEmptyDocumentDocument: DocumentNode;
3178
- declare const MutateDocumentDocument: DocumentNode;
3179
- declare const MutateDocumentAsyncDocument: DocumentNode;
3180
- declare const RenameDocumentDocument: DocumentNode;
3181
- declare const SetPreferredEditorDocument: DocumentNode;
3182
- declare const AddRelationshipDocument: DocumentNode;
3183
- declare const RemoveRelationshipDocument: DocumentNode;
3184
- declare const MoveRelationshipDocument: DocumentNode;
3185
- declare const DeleteDocumentDocument: DocumentNode;
3186
- declare const DeleteDocumentsDocument: DocumentNode;
3187
- declare const DocumentChangesDocument: DocumentNode;
3188
- declare const JobChangesDocument: DocumentNode;
3189
- declare const PollSyncEnvelopesDocument: DocumentNode;
3190
- declare const TouchChannelDocument: DocumentNode;
3191
- declare const PushSyncEnvelopesDocument: DocumentNode;
3192
- type Requester<C = {}> = <R, V>(doc: DocumentNode, vars?: V, options?: C) => Promise<R> | AsyncIterable<R>;
3193
- declare function getSdk<C>(requester: Requester<C>): {
3429
+ export declare const isDefinedNonNullAny: (v: any) => v is definedNonNullAny;
3430
+ export declare const definedNonNullAnySchema: z$1.ZodAny & z$1.ZodType<definedNonNullAny, any, z$1.core.$ZodTypeInternals<definedNonNullAny, any>>;
3431
+ export declare const AuthDecisionSchema: z$1.ZodEnum<typeof AuthDecision>;
3432
+ export declare const DocumentChangeTypeSchema: z$1.ZodEnum<typeof DocumentChangeType>;
3433
+ export declare const PropagationModeSchema: z$1.ZodEnum<typeof PropagationMode>;
3434
+ export declare const SyncEnvelopeTypeSchema: z$1.ZodEnum<typeof SyncEnvelopeType>;
3435
+ export declare function ActionCandidateInputSchema(): z$1.ZodObject<Properties<ActionCandidateInput>>;
3436
+ export declare function ActionContextInputSchema(): z$1.ZodObject<Properties<ActionContextInput>>;
3437
+ export declare function ActionInputSchema(): z$1.ZodObject<Properties<ActionInput>>;
3438
+ export declare function ChannelMetaInputSchema(): z$1.ZodObject<Properties<ChannelMetaInput>>;
3439
+ export declare function DocumentOperationsFilterInputSchema(): z$1.ZodObject<Properties<DocumentOperationsFilterInput>>;
3440
+ export declare function OperationContextInputSchema(): z$1.ZodObject<Properties<OperationContextInput>>;
3441
+ export declare function OperationInputSchema(): z$1.ZodObject<Properties<OperationInput>>;
3442
+ export declare function OperationWithContextInputSchema(): z$1.ZodObject<Properties<OperationWithContextInput>>;
3443
+ export declare function OperationsFilterInputSchema(): z$1.ZodObject<Properties<OperationsFilterInput>>;
3444
+ export declare function PagingInputSchema(): z$1.ZodObject<Properties<PagingInput>>;
3445
+ export declare function ReactorSignerAppInputSchema(): z$1.ZodObject<Properties<ReactorSignerAppInput>>;
3446
+ export declare function ReactorSignerInputSchema(): z$1.ZodObject<Properties<ReactorSignerInput>>;
3447
+ export declare function ReactorSignerUserInputSchema(): z$1.ZodObject<Properties<ReactorSignerUserInput>>;
3448
+ export declare function RemoteCursorInputSchema(): z$1.ZodObject<Properties<RemoteCursorInput>>;
3449
+ export declare function RemoteFilterInputSchema(): z$1.ZodObject<Properties<RemoteFilterInput>>;
3450
+ export declare function SearchFilterInputSchema(): z$1.ZodObject<Properties<SearchFilterInput>>;
3451
+ export declare function SyncEnvelopeInputSchema(): z$1.ZodObject<Properties<SyncEnvelopeInput>>;
3452
+ export declare function TouchChannelInputSchema(): z$1.ZodObject<Properties<TouchChannelInput>>;
3453
+ export declare function ViewFilterInputSchema(): z$1.ZodObject<Properties<ViewFilterInput>>;
3454
+ export declare const PhDocumentFieldsFragmentDoc: DocumentNode;
3455
+ export declare const DocumentRelationshipFieldsFragmentDoc: DocumentNode;
3456
+ export declare const GetDocumentModelsDocument: DocumentNode;
3457
+ export declare const GetDocumentDocument: DocumentNode;
3458
+ export declare const GetDocumentWithOperationsDocument: DocumentNode;
3459
+ export declare const GetDocumentOutgoingRelationshipsDocument: DocumentNode;
3460
+ export declare const GetDocumentIncomingRelationshipsDocument: DocumentNode;
3461
+ export declare const GetDocumentOutgoingRelationshipEdgesDocument: DocumentNode;
3462
+ export declare const GetDocumentIncomingRelationshipEdgesDocument: DocumentNode;
3463
+ export declare const FindDocumentsDocument: DocumentNode;
3464
+ export declare const GetDocumentOperationsDocument: DocumentNode;
3465
+ export declare const GetJobStatusDocument: DocumentNode;
3466
+ export declare const EvaluateActionsDocument: DocumentNode;
3467
+ export declare const CreateDocumentDocument: DocumentNode;
3468
+ export declare const CreateEmptyDocumentDocument: DocumentNode;
3469
+ export declare const MutateDocumentDocument: DocumentNode;
3470
+ export declare const MutateDocumentAsyncDocument: DocumentNode;
3471
+ export declare const RenameDocumentDocument: DocumentNode;
3472
+ export declare const SetPreferredEditorDocument: DocumentNode;
3473
+ export declare const AddRelationshipDocument: DocumentNode;
3474
+ export declare const UpdateRelationshipDocument: DocumentNode;
3475
+ export declare const RemoveRelationshipDocument: DocumentNode;
3476
+ export declare const MoveRelationshipDocument: DocumentNode;
3477
+ export declare const DeleteDocumentDocument: DocumentNode;
3478
+ export declare const DeleteDocumentsDocument: DocumentNode;
3479
+ export declare const DocumentChangesDocument: DocumentNode;
3480
+ export declare const JobChangesDocument: DocumentNode;
3481
+ export declare const PollSyncEnvelopesDocument: DocumentNode;
3482
+ export declare const TouchChannelDocument: DocumentNode;
3483
+ export declare const PushSyncEnvelopesDocument: DocumentNode;
3484
+ export type Requester<C = {}> = <R, V>(doc: DocumentNode, vars?: V, options?: C) => Promise<R> | AsyncIterable<R>;
3485
+ export declare function getSdk<C>(requester: Requester<C>): {
3194
3486
  GetDocumentModels(variables?: GetDocumentModelsQueryVariables, options?: C): Promise<GetDocumentModelsQuery>;
3195
3487
  GetDocument(variables: GetDocumentQueryVariables, options?: C): Promise<GetDocumentQuery>;
3196
3488
  GetDocumentWithOperations(variables: GetDocumentWithOperationsQueryVariables, options?: C): Promise<GetDocumentWithOperationsQuery>;
3197
3489
  GetDocumentOutgoingRelationships(variables: GetDocumentOutgoingRelationshipsQueryVariables, options?: C): Promise<GetDocumentOutgoingRelationshipsQuery>;
3198
3490
  GetDocumentIncomingRelationships(variables: GetDocumentIncomingRelationshipsQueryVariables, options?: C): Promise<GetDocumentIncomingRelationshipsQuery>;
3491
+ GetDocumentOutgoingRelationshipEdges(variables: GetDocumentOutgoingRelationshipEdgesQueryVariables, options?: C): Promise<GetDocumentOutgoingRelationshipEdgesQuery>;
3492
+ GetDocumentIncomingRelationshipEdges(variables: GetDocumentIncomingRelationshipEdgesQueryVariables, options?: C): Promise<GetDocumentIncomingRelationshipEdgesQuery>;
3199
3493
  FindDocuments(variables?: FindDocumentsQueryVariables, options?: C): Promise<FindDocumentsQuery>;
3200
3494
  GetDocumentOperations(variables: GetDocumentOperationsQueryVariables, options?: C): Promise<GetDocumentOperationsQuery>;
3201
3495
  GetJobStatus(variables: GetJobStatusQueryVariables, options?: C): Promise<GetJobStatusQuery>;
@@ -3207,6 +3501,7 @@ declare function getSdk<C>(requester: Requester<C>): {
3207
3501
  RenameDocument(variables: RenameDocumentMutationVariables, options?: C): Promise<RenameDocumentMutation>;
3208
3502
  SetPreferredEditor(variables: SetPreferredEditorMutationVariables, options?: C): Promise<SetPreferredEditorMutation>;
3209
3503
  AddRelationship(variables: AddRelationshipMutationVariables, options?: C): Promise<AddRelationshipMutation>;
3504
+ UpdateRelationship(variables: UpdateRelationshipMutationVariables, options?: C): Promise<UpdateRelationshipMutation>;
3210
3505
  RemoveRelationship(variables: RemoveRelationshipMutationVariables, options?: C): Promise<RemoveRelationshipMutation>;
3211
3506
  MoveRelationship(variables: MoveRelationshipMutationVariables, options?: C): Promise<MoveRelationshipMutation>;
3212
3507
  DeleteDocument(variables: DeleteDocumentMutationVariables, options?: C): Promise<DeleteDocumentMutation>;
@@ -3217,13 +3512,13 @@ declare function getSdk<C>(requester: Requester<C>): {
3217
3512
  TouchChannel(variables: TouchChannelMutationVariables, options?: C): Promise<TouchChannelMutation>;
3218
3513
  PushSyncEnvelopes(variables: PushSyncEnvelopesMutationVariables, options?: C): Promise<PushSyncEnvelopesMutation>;
3219
3514
  };
3220
- type Sdk = ReturnType<typeof getSdk>;
3515
+ export type Sdk = ReturnType<typeof getSdk>;
3221
3516
  //#endregion
3222
3517
  //#region src/graphql/reactor/requester.d.ts
3223
3518
  type FetchLike = (input: URL | string, init: RequestInit) => Promise<Response>;
3224
3519
  //#endregion
3225
3520
  //#region src/graphql/reactor/factory.d.ts
3226
- declare function createReactorGraphQLClient(url: string, fetchImpl?: FetchLike, headers?: Record<string, string>): {
3521
+ export declare function createReactorGraphQLClient(url: string, fetchImpl?: FetchLike, headers?: Record<string, string>): {
3227
3522
  GetDocumentModels(variables?: Exact<{
3228
3523
  namespace?: InputMaybe<Scalars["String"]["input"]>;
3229
3524
  paging?: InputMaybe<PagingInput>;
@@ -3250,6 +3545,18 @@ declare function createReactorGraphQLClient(url: string, fetchImpl?: FetchLike,
3250
3545
  view?: InputMaybe<ViewFilterInput>;
3251
3546
  paging?: InputMaybe<PagingInput>;
3252
3547
  }>, options?: {} | undefined): Promise<GetDocumentIncomingRelationshipsQuery>;
3548
+ GetDocumentOutgoingRelationshipEdges(variables: Exact<{
3549
+ sourceIdentifier: Scalars["String"]["input"];
3550
+ relationshipType?: InputMaybe<Scalars["String"]["input"]>;
3551
+ view?: InputMaybe<ViewFilterInput>;
3552
+ paging?: InputMaybe<PagingInput>;
3553
+ }>, options?: {} | undefined): Promise<GetDocumentOutgoingRelationshipEdgesQuery>;
3554
+ GetDocumentIncomingRelationshipEdges(variables: Exact<{
3555
+ targetIdentifier: Scalars["String"]["input"];
3556
+ relationshipType?: InputMaybe<Scalars["String"]["input"]>;
3557
+ view?: InputMaybe<ViewFilterInput>;
3558
+ paging?: InputMaybe<PagingInput>;
3559
+ }>, options?: {} | undefined): Promise<GetDocumentIncomingRelationshipEdgesQuery>;
3253
3560
  FindDocuments(variables?: Exact<{
3254
3561
  search?: InputMaybe<SearchFilterInput>;
3255
3562
  view?: InputMaybe<ViewFilterInput>;
@@ -3299,8 +3606,16 @@ declare function createReactorGraphQLClient(url: string, fetchImpl?: FetchLike,
3299
3606
  sourceIdentifier: Scalars["String"]["input"];
3300
3607
  targetIdentifier: Scalars["String"]["input"];
3301
3608
  relationshipType: Scalars["String"]["input"];
3609
+ metadata?: InputMaybe<Scalars["JSONObject"]["input"]>;
3302
3610
  branch?: InputMaybe<Scalars["String"]["input"]>;
3303
3611
  }>, options?: {} | undefined): Promise<AddRelationshipMutation>;
3612
+ UpdateRelationship(variables: Exact<{
3613
+ sourceIdentifier: Scalars["String"]["input"];
3614
+ targetIdentifier: Scalars["String"]["input"];
3615
+ relationshipType: Scalars["String"]["input"];
3616
+ metadata?: InputMaybe<Scalars["JSONObject"]["input"]>;
3617
+ branch?: InputMaybe<Scalars["String"]["input"]>;
3618
+ }>, options?: {} | undefined): Promise<UpdateRelationshipMutation>;
3304
3619
  RemoveRelationship(variables: Exact<{
3305
3620
  sourceIdentifier: Scalars["String"]["input"];
3306
3621
  targetIdentifier: Scalars["String"]["input"];
@@ -3343,30 +3658,46 @@ declare function createReactorGraphQLClient(url: string, fetchImpl?: FetchLike,
3343
3658
  };
3344
3659
  //#endregion
3345
3660
  //#region src/graphql/reactor/subgraph.d.ts
3346
- declare class ReactorSubgraph extends BaseSubgraph {
3661
+ export declare class ReactorSubgraph extends BaseSubgraph {
3347
3662
  #private;
3348
3663
  private logger;
3349
3664
  constructor(args: SubgraphArgs);
3350
3665
  name: string;
3351
3666
  hasSubscriptions: boolean;
3667
+ private get documentChanges();
3352
3668
  /**
3353
3669
  * Check operation-level permissions for an array of actions.
3354
3670
  * Delegates to base assertCanExecuteOperation for each action.
3355
3671
  */
3356
3672
  private assertCanExecuteOperations;
3357
- typeDefs: graphql.DocumentNode;
3673
+ /**
3674
+ * Drops the relationship edges whose far-end document the caller cannot read.
3675
+ *
3676
+ * An edge names two documents, so returning it discloses the far end's id. The
3677
+ * document-shaped relationship queries already withhold far-end documents the
3678
+ * caller cannot read; the edge-shaped queries have to withhold the same ones,
3679
+ * or they become a way to enumerate around that check. Supreme admins read
3680
+ * everything, so the per-edge check is skipped for them.
3681
+ *
3682
+ * The cursor describes where to resume in the underlying unfiltered stream,
3683
+ * so it is left as it came. A filtered page is therefore often shorter than
3684
+ * the requested limit, and that is the stream continuing rather than a sign
3685
+ * it ended.
3686
+ */
3687
+ private filterRelationshipEdges;
3688
+ typeDefs: import("graphql").DocumentNode;
3358
3689
  resolvers: Resolvers;
3359
3690
  onSetup(): Promise<void>;
3360
3691
  }
3361
3692
  //#endregion
3362
3693
  //#region src/graphql/system/env/index.d.ts
3363
- declare const ADMIN_USERS: string[];
3694
+ export declare const ADMIN_USERS: string[];
3364
3695
  //#endregion
3365
3696
  //#region src/graphql/system/subgraph.d.ts
3366
- declare class SystemSubgraph extends BaseSubgraph {
3697
+ export declare class SystemSubgraph extends BaseSubgraph {
3367
3698
  name: string;
3368
3699
  hasSubscriptions: boolean;
3369
- typeDefs: graphql.DocumentNode;
3700
+ typeDefs: import("graphql").DocumentNode;
3370
3701
  resolvers: {
3371
3702
  Query: {
3372
3703
  system: () => {
@@ -3379,28 +3710,78 @@ declare class SystemSubgraph extends BaseSubgraph {
3379
3710
  }
3380
3711
  //#endregion
3381
3712
  //#region src/graphql/system/version.d.ts
3382
- declare function getVersion(): string;
3383
- declare function getGitHash(): string;
3384
- declare function getGitUrl(): string | null;
3713
+ export declare function getVersion(): string;
3714
+ export declare function getGitHash(): string;
3715
+ export declare function getGitUrl(): string | null;
3385
3716
  //#endregion
3386
3717
  //#region src/graphql/utils.d.ts
3387
- declare function isSubgraphClass(candidate: unknown): candidate is SubgraphClass$1;
3388
- declare function buildGraphqlOperations(operations: Operation[], skip: number, first: number): GqlOperation$1[];
3389
- declare function buildGraphqlOperation(operation: Operation): GqlOperation$1;
3390
- declare function buildGraphQlDocument(doc: PHDocument): GqlDocument$1;
3391
- declare function buildGraphQlDriveDocument(doc: DocumentDriveDocument): GqlDriveDocument$1;
3718
+ export declare function isSubgraphClass(candidate: unknown): candidate is SubgraphClass$1;
3719
+ export declare function buildGraphqlOperations(operations: Operation[], skip: number, first: number): GqlOperation$1[];
3720
+ export declare function buildGraphqlOperation(operation: Operation): GqlOperation$1;
3721
+ export declare function buildGraphQlDocument(doc: PHDocument): GqlDocument$1;
3722
+ export declare function buildGraphQlDriveDocument(doc: DocumentDriveDocument): GqlDriveDocument$1;
3723
+ //#endregion
3724
+ //#region src/graphql/errors.d.ts
3725
+ /** Caller (authenticated or anonymous) lacks permission for the document. */
3726
+ export declare class ForbiddenError extends GraphQLError {
3727
+ constructor(detail?: string);
3728
+ }
3729
+ /** Anonymous caller on an action that requires logging in. */
3730
+ export declare class AuthenticationRequiredError extends GraphQLError {
3731
+ constructor(detail?: string);
3732
+ }
3733
+ /**
3734
+ * The reactor holds no decision model, so no authorization preflight can be
3735
+ * answered.
3736
+ *
3737
+ * Distinct from a denial, and deliberately so: a caller that cannot get a
3738
+ * prediction should render its controls as it did before it asked and let the
3739
+ * submit path refuse. Reading this as a denial would disable every control on a
3740
+ * switchboard running without authEnforcement. The code is what a client
3741
+ * branches on, since the message is not a contract.
3742
+ */
3743
+ export declare class AuthEvaluationUnsupportedError extends GraphQLError {
3744
+ constructor();
3745
+ }
3746
+ /**
3747
+ * A stored operation cannot be represented in the schema, so it is reported
3748
+ * rather than served.
3749
+ *
3750
+ * The schema declares an action's id, type, timestamp, input and scope
3751
+ * non-null; an operation written before the API rejected an action without an
3752
+ * id violates that. Left to the executor, the missing value nullifies the
3753
+ * action, which bubbles up through the non-null chain until it nullifies the
3754
+ * envelope's whole operation list, and the caller receives a partial response
3755
+ * beside "Cannot return null for non-nullable field Action.id" - which says
3756
+ * nothing about which operation, and which a sync client can only read as a
3757
+ * permanent GraphQL rejection, stopping its poll timer for good.
3758
+ *
3759
+ * Thrown instead, with a code that says the failure is worth polling through:
3760
+ * the document holding the operation needs repairing, but the channel serves
3761
+ * every other document, and a peer that stopped polling would stop receiving
3762
+ * those too. The code is what a client branches on, since the message is not a
3763
+ * contract.
3764
+ */
3765
+ export declare class MalformedStoredOperationError extends GraphQLError {
3766
+ constructor(detail: string);
3767
+ }
3392
3768
  //#endregion
3393
3769
  //#region src/packages/import-loader.d.ts
3394
3770
  /**
3395
3771
  * This class is used to load packages using the import keyword.
3396
3772
  */
3397
- declare class ImportPackageLoader implements IPackageLoader {
3773
+ export declare class ImportPackageLoader implements IPackageLoader {
3774
+ private readonly hostDir;
3398
3775
  private readonly logger;
3399
3776
  readonly name = "ImportPackageLoader";
3777
+ constructor(hostDir?: string);
3778
+ private readonly reportedUnbuilt;
3400
3779
  loadDocumentModels(identifier: string): Promise<DocumentModelModule[]>;
3401
3780
  loadUpgradeManifests(identifier: string): Promise<UpgradeManifest<readonly number[]>[]>;
3402
3781
  loadSubgraphs(identifier: string): Promise<SubgraphClass$1[]>;
3403
3782
  loadProcessors(identifier: string): Promise<ProcessorFactoryBuilder | null>;
3783
+ loadPieces(identifier: string): Promise<PackagePieceEntry[]>;
3784
+ private reportUnbuilt;
3404
3785
  }
3405
3786
  //#endregion
3406
3787
  //#region src/packages/package-manager.d.ts
@@ -3416,10 +3797,10 @@ declare class ImportPackageLoader implements IPackageLoader {
3416
3797
  * either bare (`'pkg'`) or as a subpath (`'pkg/subgraphs'`), since loaders
3417
3798
  * import sub-entries like `${pkg}/subgraphs` / `${pkg}/document-models`.
3418
3799
  */
3419
- declare function isExpectedLoaderMiss(error: unknown, pkg: string): boolean;
3420
- declare function getUniqueDocumentModels(...documentModels: readonly (readonly DocumentModelModule<any>[])[]): DocumentModelModule[];
3421
- declare function getUniqueUpgradeManifests(...upgradeManifests: readonly (readonly UpgradeManifest<readonly number[]>[])[]): UpgradeManifest<readonly number[]>[];
3422
- declare class PackageManager implements IPackageManager {
3800
+ export declare function isExpectedLoaderMiss(error: unknown, pkg: string, subPath?: string): boolean;
3801
+ export declare function getUniqueDocumentModels(...documentModels: readonly (readonly DocumentModelModule<any>[])[]): DocumentModelModule[];
3802
+ export declare function getUniqueUpgradeManifests(...upgradeManifests: readonly (readonly UpgradeManifest<readonly number[]>[])[]): UpgradeManifest<readonly number[]>[];
3803
+ export declare class PackageManager implements IPackageManager {
3423
3804
  protected options: IPackageManagerOptions;
3424
3805
  private readonly logger;
3425
3806
  private loaders;
@@ -3427,6 +3808,7 @@ declare class PackageManager implements IPackageManager {
3427
3808
  private upgradeManifestsMap;
3428
3809
  private subgraphsMap;
3429
3810
  private processorMap;
3811
+ private piecesMap;
3430
3812
  private configWatcher;
3431
3813
  private debouncedUpdateCallbacks;
3432
3814
  private eventEmitter;
@@ -3439,10 +3821,12 @@ declare class PackageManager implements IPackageManager {
3439
3821
  private loadUpgradeManifests;
3440
3822
  private loadSubgraphs;
3441
3823
  private loadProcessors;
3824
+ private loadPieces;
3442
3825
  private maybeWarnAllLoadersFailed;
3443
3826
  private updateDocumentModelsForPackage;
3444
3827
  private updateSubgraphsForPackage;
3445
3828
  private updateProcessorsForPackage;
3829
+ private updatePiecesForPackage;
3446
3830
  /** Debounced per key so repeated subscribePackages calls reuse one timer. */
3447
3831
  private getDebouncedUpdateCallback;
3448
3832
  private subscribePackages;
@@ -3452,6 +3836,9 @@ declare class PackageManager implements IPackageManager {
3452
3836
  private updatePackagesMap;
3453
3837
  private updateSubgraphsMap;
3454
3838
  private updateProcessorsMap;
3839
+ private updatePiecesMap;
3840
+ /** The pieces every loaded package ships, keyed by the package. */
3841
+ getPieces(): Map<string, PackagePieceEntry[]>;
3455
3842
  /**
3456
3843
  * Remove `pkg` from all package maps and emit the change events, tearing
3457
3844
  * down everything the package registered (subgraphs, processors, document
@@ -3462,28 +3849,29 @@ declare class PackageManager implements IPackageManager {
3462
3849
  onDocumentModelsChange(handler: (documentModels: Record<string, DocumentModelModule[]>) => void): void;
3463
3850
  onSubgraphsChange(handler: (subgraphs: Map<string, SubgraphClass$1[]>) => void): void;
3464
3851
  onProcessorsChange(handler: (processors: Map<string, Processor$1>) => void): void;
3852
+ onPiecesChange(handler: (pieces: Map<string, PackagePieceEntry[]>) => void): void;
3465
3853
  }
3466
3854
  //#endregion
3467
3855
  //#region src/services/renown-config.d.ts
3468
3856
  /** Where the credential check reads from: a remote Renown or Switchboard
3469
3857
  * instance, or this switchboard's own renown read model. */
3470
- type RenownSource = NonNullable<PHReactorRenown["source"]>;
3858
+ export type RenownSource = NonNullable<PHReactorRenown["source"]>;
3471
3859
  /** The `auth.renown` config block: which Renown instance to authenticate
3472
3860
  * against, before env overrides are applied. */
3473
- type RenownConfig = PHReactorRenown;
3861
+ export type RenownConfig = PHReactorRenown;
3474
3862
  /** Resolved renown coordinates. `url` also drives this reactor's own identity,
3475
3863
  * so it stays meaningful when `source` is "self". */
3476
- type ResolvedRenownConfig = {
3864
+ export type ResolvedRenownConfig = {
3477
3865
  source: RenownSource;
3478
3866
  url: string | undefined;
3479
3867
  switchboardUrl: string | undefined;
3480
3868
  };
3481
3869
  /** Reading credentials from this reactor's own read model needs a host-supplied
3482
3870
  * verifier: core has no idea which subgraph serves that read model. */
3483
- declare function assertCredentialVerifierForSource(source: RenownSource, hasVerifier: boolean): void;
3871
+ export declare function assertCredentialVerifierForSource(source: RenownSource, hasVerifier: boolean): void;
3484
3872
  /** Resolve `auth.renown`; RENOWN_SOURCE / RENOWN_URL / SWITCHBOARD_URL win
3485
3873
  * over the config file, which wins over the SDK defaults. */
3486
- declare function resolveRenownConfig(configured: RenownConfig | undefined, env: NodeJS.ProcessEnv, logger: ILogger): ResolvedRenownConfig;
3874
+ export declare function resolveRenownConfig(configured: RenownConfig | undefined, env: NodeJS.ProcessEnv, logger: ILogger): ResolvedRenownConfig;
3487
3875
  //#endregion
3488
3876
  //#region src/server.d.ts
3489
3877
  type Options = {
@@ -3509,6 +3897,19 @@ type Options = {
3509
3897
  * request. Off by default; `REQUIRE_AUTHENTICATED_CALLER` overrides.
3510
3898
  * Requires identity resolution to be on — refused at boot without it. */
3511
3899
  requireAuthenticatedCaller?: boolean;
3900
+ /** Mounted paths that stay reachable anonymously while
3901
+ * `requireAuthenticatedCaller` is on, for a flow that runs before
3902
+ * sign-in. Matched against the request's pathname in full, never as a
3903
+ * prefix. `REQUIRE_AUTHENTICATED_CALLER_EXEMPT_PATHS` overrides, as a
3904
+ * comma-separated list. Each entry is a hole in the floor: only ever name
3905
+ * a path serving operations that are safe without a caller. */
3906
+ requireAuthenticatedCallerExemptPaths?: string[];
3907
+ /** Decide an attachment read with the referencing document's own policy
3908
+ * instead of the host permission tables. Off by default;
3909
+ * `ATTACHMENT_READS_FOLLOW_DOCUMENT_POLICY` overrides. Requires auth
3910
+ * enforcement, which is what supplies the model — refused at boot
3911
+ * without it. */
3912
+ attachmentReadsFollowDocumentPolicy?: boolean;
3512
3913
  };
3513
3914
  /** Renown coordinates the host already resolved, used verbatim instead of
3514
3915
  * resolving `auth.renown` and the env again (which would warn twice). */
@@ -3546,13 +3947,13 @@ type ProcessorInitializer = ProcessorFactoryBuilder;
3546
3947
  * Doc-perms require auth: with auth off no `user` is ever resolved, so every
3547
3948
  * authorization check fails closed. Refuse to boot rather than run broken.
3548
3949
  */
3549
- declare function assertAuthRequiredForDocumentPermissions(authEnabled: boolean, documentPermissionsRequested: boolean): void;
3950
+ export declare function assertAuthRequiredForDocumentPermissions(authEnabled: boolean, documentPermissionsRequested: boolean): void;
3550
3951
  /**
3551
3952
  * Refuses SKIP_CREDENTIAL_VERIFICATION at boot outside tests or an explicit
3552
3953
  * opt-in: it removes the only binding between a token's claimed address and its
3553
3954
  * signing key. Fail-closed — unset NODE_ENV counts as production.
3554
3955
  */
3555
- declare function assertSkipCredentialVerificationAllowed(resolvesCallerIdentity: boolean, skipCredentialVerification: boolean, env: NodeJS.ProcessEnv): void;
3956
+ export declare function assertSkipCredentialVerificationAllowed(resolvesCallerIdentity: boolean, skipCredentialVerification: boolean, env: NodeJS.ProcessEnv): void;
3556
3957
  /**
3557
3958
  * Requiring an authenticated caller requires identity resolution to exist at
3558
3959
  * all: with neither AUTH_ENABLED nor RESOLVE_CALLER_IDENTITY the middleware
@@ -3560,14 +3961,22 @@ declare function assertSkipCredentialVerificationAllowed(resolvesCallerIdentity:
3560
3961
  * require-authenticated-caller middleware would reject every caller —
3561
3962
  * authenticated ones included. Refuse to boot rather than run broken.
3562
3963
  */
3563
- declare function assertRequireAuthenticatedCallerAllowed(requireAuthenticatedCaller: boolean, resolvesCallerIdentity: boolean): void;
3964
+ export declare function assertRequireAuthenticatedCallerAllowed(requireAuthenticatedCaller: boolean, resolvesCallerIdentity: boolean, exemptPaths?: readonly string[]): void;
3965
+ /**
3966
+ * Deciding an attachment read by the document's policy needs a policy model to
3967
+ * decide with, and that is what auth enforcement supplies. Without one there is
3968
+ * nothing to consult, so the setting would silently leave the permission tables
3969
+ * in charge — configuration that describes a protection the server is not
3970
+ * applying, which is worse than no configuration at all. Refuse instead.
3971
+ */
3972
+ export declare function assertAttachmentPolicyReadsAllowed(attachmentReadsFollowDocumentPolicy: boolean, hasDecisionModel: boolean): void;
3564
3973
  /**
3565
3974
  * The GraphiQL explorer page's mount prefix. `path.posix.join` normalizes the
3566
3975
  * join with `basePath` — a naive template literal would produce `//explorer`
3567
3976
  * for the default `/` basePath, which express compiles into a route that only
3568
3977
  * matches `//explorer`, leaving `GET /explorer` a 404.
3569
3978
  */
3570
- declare function getExplorerPrefix(basePath: string): string;
3979
+ export declare function getExplorerPrefix(basePath: string): string;
3571
3980
  /**
3572
3981
  * Initializes and starts the API server using an initializer function.
3573
3982
  * This function first loads packages to get document models, then calls the initializer function
@@ -3583,17 +3992,17 @@ declare function getExplorerPrefix(basePath: string): string;
3583
3992
  * alongside the reactor module so resolvers can dispatch reactor-drive parent
3584
3993
  * ops to it; legacy switchboards omit it.
3585
3994
  */
3586
- interface ClientInitializerResult {
3995
+ export interface ClientInitializerResult {
3587
3996
  module: InProcessReactorClientModule;
3588
3997
  reactorDriveClient?: IDriveClient;
3589
3998
  attachmentReferenceProjection?: AttachmentReferenceProjectionCapability;
3590
3999
  }
3591
- interface ClientInitializerDependencies {
4000
+ export interface ClientInitializerDependencies {
3592
4001
  attachmentReferenceWriter: IAttachmentReferenceWriter;
3593
4002
  /** Upgrade manifests exported by the loaded packages, one per type. */
3594
4003
  upgradeManifests: UpgradeManifest<readonly number[]>[];
3595
4004
  }
3596
- declare function initializeAndStartAPI(clientInitializer: (documentModels: DocumentModelModule[], dependencies: ClientInitializerDependencies) => Promise<ClientInitializerResult>, options: Options, processorApp: ProcessorApp): Promise<API & {
4005
+ export declare function initializeAndStartAPI(clientInitializer: (documentModels: DocumentModelModule[], dependencies: ClientInitializerDependencies) => Promise<ClientInitializerResult>, options: Options, processorApp: ProcessorApp): Promise<API & {
3597
4006
  client: IReactorClient;
3598
4007
  syncManager: ISyncManager;
3599
4008
  documentModelRegistry: IDocumentModelRegistry;
@@ -3603,27 +4012,27 @@ declare function initializeAndStartAPI(clientInitializer: (documentModels: Docum
3603
4012
  }>;
3604
4013
  //#endregion
3605
4014
  //#region src/services/renown-credential-verifier.d.ts
3606
- interface RenownCredentialVerifierConfig {
4015
+ export interface RenownCredentialVerifierConfig {
3607
4016
  renownUrl?: string;
3608
4017
  switchboardUrl?: string;
3609
4018
  }
3610
- declare function createRenownCredentialVerifier(config?: RenownCredentialVerifierConfig): Promise<CredentialVerifier>;
4019
+ export declare function createRenownCredentialVerifier(config?: RenownCredentialVerifierConfig): Promise<CredentialVerifier>;
3611
4020
  //#endregion
3612
4021
  //#region src/utils/create-schema.d.ts
3613
- declare const buildSubgraphSchemaModule: (documentModels: DocumentModelModule[], resolvers: GraphQLResolverMap<Context$1>, typeDefs: DocumentNode) => GraphQLSchemaModule;
3614
- declare const createSchema: (documentModels: DocumentModelModule[], resolvers: GraphQLResolverMap<Context$1>, typeDefs: DocumentNode) => graphql.GraphQLSchema;
4022
+ export declare const buildSubgraphSchemaModule: (documentModels: DocumentModelModule[], resolvers: GraphQLResolverMap<Context$1>, typeDefs: DocumentNode) => GraphQLSchemaModule;
4023
+ export declare const createSchema: (documentModels: DocumentModelModule[], resolvers: GraphQLResolverMap<Context$1>, typeDefs: DocumentNode) => import("graphql").GraphQLSchema;
3615
4024
  /**
3616
4025
  * Create a merged GraphQL schema from multiple subgraph modules.
3617
4026
  * Uses buildSubgraphSchema's array overload to combine type definitions
3618
4027
  * and resolvers from multiple subgraphs into a single executable schema.
3619
4028
  */
3620
- declare const createMergedSchema: (modules: GraphQLSchemaModule[]) => graphql.GraphQLSchema;
3621
- declare function getDocumentModelSchemaName(documentModel: DocumentModelGlobalState$1): string;
3622
- declare const getDocumentModelTypeDefs: (documentModels: DocumentModelModule[], typeDefs: DocumentNode) => DocumentNode;
4029
+ export declare const createMergedSchema: (modules: GraphQLSchemaModule[]) => import("graphql").GraphQLSchema;
4030
+ export declare function getDocumentModelSchemaName(documentModel: DocumentModelGlobalState$1): string;
4031
+ export declare const getDocumentModelTypeDefs: (documentModels: DocumentModelModule[], typeDefs: DocumentNode) => DocumentNode;
3623
4032
  /**
3624
4033
  * Options for generating document model GraphQL schemas.
3625
4034
  */
3626
- interface DocumentModelSchemaOptions {
4035
+ export interface DocumentModelSchemaOptions {
3627
4036
  /**
3628
4037
  * When true, generates new API patterns:
3629
4038
  * - Mutations return full document objects (MutationResult type)
@@ -3640,7 +4049,8 @@ interface DocumentModelSchemaOptions {
3640
4049
  * @param options - Schema generation options
3641
4050
  * @returns GraphQL DocumentNode
3642
4051
  */
3643
- declare function generateDocumentModelSchema(documentModel: DocumentModelGlobalState$1, options?: DocumentModelSchemaOptions): DocumentNode;
4052
+ export declare function generateDocumentModelSchema(documentModel: DocumentModelGlobalState$1, options?: DocumentModelSchemaOptions): DocumentNode;
3644
4053
  //#endregion
3645
- 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, type WebhookEndpointInfo, type WebhookEndpointRow, type WebhookField, type WebhookHashAlgorithm, type WebhookPolicy, type WebhookReply, type WebhookRequest, type WebhookScheme, WebhookService, type WebhookSignatureEncoding, type WebhookSpec, type WebhookVerification, WithIndex, WsContextFactory, WsDisposer, assertAuthRequiredForDocumentPermissions, assertCredentialVerifierForSource, assertHostMountPath, assertRequireAuthenticatedCallerAllowed, assertSkipCredentialVerificationAllowed, buildGraphQlDocument, buildGraphQlDriveDocument, buildGraphqlOperation, buildGraphqlOperations, buildSubgraphSchemaModule, createAuthFetchMiddleware, createCanonicalDocumentIdResolver, createGatewayAdapter, createHttpAdapter, createMergedSchema, createReactorGraphQLClient, createRenownCredentialVerifier, createSchema, 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 };
4054
+ 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 };
4055
+ export {};
3646
4056
  //# sourceMappingURL=index.d.mts.map