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

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