@powerhousedao/reactor-api 6.2.3-dev.76 → 6.2.3-dev.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{base-document-models-BGt__Ctn.mjs → base-document-models-By4P20-z.mjs} +4 -4
- package/dist/{base-document-models-BGt__Ctn.mjs.map → base-document-models-By4P20-z.mjs.map} +1 -1
- package/dist/{error-info-CCQcLAcW.mjs → error-info-BaEL50f5.mjs} +68 -6
- package/dist/error-info-BaEL50f5.mjs.map +1 -0
- package/dist/index.d.mts +406 -13
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1638 -1102
- package/dist/index.mjs.map +1 -1
- package/dist/{package-subgraph-check-C5S8yvBI.mjs → package-subgraph-check-6tK9LMg1.mjs} +4 -4
- package/dist/{package-subgraph-check-C5S8yvBI.mjs.map → package-subgraph-check-6tK9LMg1.mjs.map} +1 -1
- package/dist/{pglite-node-BOFT_yUj.mjs → pglite-node-DOFZDYCK.mjs} +5 -5
- package/dist/pglite-node-DOFZDYCK.mjs.map +1 -0
- package/dist/src/graphql/subgraph-types.mjs +1 -1
- package/dist/src/packages/vite-loader.mjs +1 -1
- package/dist/src/pglite/pglite-node.d.mts +38 -5
- package/dist/src/pglite/pglite-node.d.mts.map +1 -1
- package/dist/src/pglite/pglite-node.mjs +5 -5
- package/dist/src/pglite/worker/entry.mjs +1 -1
- package/dist/{subgraph-extraction-cSpPp3Hq.mjs → subgraph-extraction-zUDn2zX_.mjs} +239 -13
- package/dist/subgraph-extraction-zUDn2zX_.mjs.map +1 -0
- package/package.json +13 -13
- package/dist/error-info-CCQcLAcW.mjs.map +0 -1
- package/dist/pglite-node-BOFT_yUj.mjs.map +0 -1
- package/dist/subgraph-extraction-cSpPp3Hq.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -4,7 +4,7 @@ import { C as hasOperationSchemas, E as typeDefinitionNames, S as getGeneratedDo
|
|
|
4
4
|
import { IAnalyticsStore } from "@powerhousedao/analytics-engine-core";
|
|
5
5
|
import { AnalyticsModel } from "@powerhousedao/analytics-engine-graphql";
|
|
6
6
|
import { DocumentNode, GraphQLError, GraphQLResolveInfo, GraphQLScalarType, GraphQLScalarTypeConfig, GraphQLSchema } from "graphql";
|
|
7
|
-
import { AttachmentRef, CatchUpLoadSample, DocumentModelSource as DocumentModelSource$1, ICatchUpLoadSource, IDocumentModelLoader, IDocumentModelRegistry, IDriveClient, IInspectableAttachmentStore, IInspector, IInspectorAdmin, IInspectorStorageHealthProvider, INSPECTOR_OPS, IReactorClient, IReactorFactsSink, IReactorProcessorHostModuleBase, IRelationalDb, ISyncInspector, ISyncManager, InProcessReactorClientModule, InProcessReactorModule, InspectorDocumentReader, InspectorReadOpKey, PagedResults, ParsedDriveUrl, ProcessorFactoryBuilder as ProcessorFactoryBuilder$1, Remote, SYNC_INSPECTION_OPS, SearchFilter, SyncInspectionReadOpKey, SyncScopeGate, ViewFilter, driveIdFromUrl, parseDriveUrl } from "@powerhousedao/reactor";
|
|
7
|
+
import { AttachmentRef, CatchUpLoadSample, DocumentModelSource as DocumentModelSource$1, ICatchUpLoadSource, IDocumentModelLoader, IDocumentModelRegistry, IDriveClient, IDriveNodeSource, IInspectableAttachmentStore, IInspector, IInspectorAdmin, IInspectorStorageHealthProvider, INSPECTOR_OPS, IReactorClient, IReactorFactsSink, IReactorProcessorHostModuleBase, IReactorReadClient, IReactorWriteClient, IRelationalDb, ISyncInspector, ISyncManager, InProcessReactorClientModule, InProcessReactorModule, InspectorDocumentReader, InspectorReadOpKey, PagedResults, ParsedDriveUrl, ProcessorFactoryBuilder as ProcessorFactoryBuilder$1, Remote, SYNC_INSPECTION_OPS, SearchFilter, SyncInspectionReadOpKey, SyncScopeGate, ViewFilter, driveIdFromUrl, parseDriveUrl } from "@powerhousedao/reactor";
|
|
8
8
|
import { AuthSubject, DocumentModelModule, Operation, PHDocument, UpgradeManifest } from "@powerhousedao/shared/document-model";
|
|
9
9
|
import { ILogger } from "document-model";
|
|
10
10
|
import { GraphQLResolverMap } from "@apollo/subgraph";
|
|
@@ -81,6 +81,58 @@ export interface DbClient {
|
|
|
81
81
|
export declare function getDbClient(connectionString?: string | undefined, pgliteFactory?: PgliteFactory): DbClient;
|
|
82
82
|
export declare const initAnalyticsStoreSql: string[];
|
|
83
83
|
//#endregion
|
|
84
|
+
//#region src/services/permission-cache.d.ts
|
|
85
|
+
/**
|
|
86
|
+
* Everything an authorization decision reads about one document: its
|
|
87
|
+
* protection flag (the configured default when it has no protection row), its
|
|
88
|
+
* owner, the users' grant levels and the users granted each operation.
|
|
89
|
+
* Addresses are stored lowercase, as the permission service writes them.
|
|
90
|
+
*/
|
|
91
|
+
export declare class DocumentPermissionSnapshot {
|
|
92
|
+
readonly documentId: string;
|
|
93
|
+
readonly isProtected: boolean;
|
|
94
|
+
readonly ownerAddress: string | null;
|
|
95
|
+
readonly grants: ReadonlyMap<string, DocumentPermissionLevel>;
|
|
96
|
+
readonly operationGrants: ReadonlyMap<string, ReadonlySet<string>>;
|
|
97
|
+
constructor(documentId: string, isProtected: boolean, ownerAddress: string | null, grants: ReadonlyMap<string, DocumentPermissionLevel>, operationGrants: ReadonlyMap<string, ReadonlySet<string>>);
|
|
98
|
+
grantLevel(userAddress: string): DocumentPermissionLevel | null;
|
|
99
|
+
isOperationRestricted(operationType: string): boolean;
|
|
100
|
+
hasOperationGrant(operationType: string, userAddress: string): boolean;
|
|
101
|
+
}
|
|
102
|
+
/** Loads the snapshots of the given documents; every id gets one. */
|
|
103
|
+
export type PermissionSnapshotLoader = (documentIds: string[]) => Promise<Map<string, DocumentPermissionSnapshot>>;
|
|
104
|
+
export interface PermissionCacheOptions {
|
|
105
|
+
/** How long an entry is served without reloading; 0 disables caching. */
|
|
106
|
+
ttlMs: number;
|
|
107
|
+
/** Entries kept before the least recently used one is dropped. */
|
|
108
|
+
maxEntries: number;
|
|
109
|
+
now: () => number;
|
|
110
|
+
}
|
|
111
|
+
export declare const DEFAULT_PERMISSION_CACHE_TTL_MS = 30000;
|
|
112
|
+
export declare const DEFAULT_PERMISSION_CACHE_OPTIONS: PermissionCacheOptions;
|
|
113
|
+
/**
|
|
114
|
+
* Per-process cache of document permission snapshots, keyed by document id.
|
|
115
|
+
*
|
|
116
|
+
* Filled on miss from the store, invalidated by the permission service after
|
|
117
|
+
* each of its own writes, and expired after `ttlMs` as the safety net for
|
|
118
|
+
* writes made by another process (another switchboard instance on the same
|
|
119
|
+
* database) until cross-instance invalidation exists.
|
|
120
|
+
*
|
|
121
|
+
* A load that overlaps an invalidation still answers its caller but is not
|
|
122
|
+
* stored, so a read that started before a write commits cannot repopulate
|
|
123
|
+
* the cache with the pre-write rows.
|
|
124
|
+
*/
|
|
125
|
+
export declare class PermissionCache {
|
|
126
|
+
#private;
|
|
127
|
+
constructor(load: PermissionSnapshotLoader, options?: PermissionCacheOptions);
|
|
128
|
+
get size(): number;
|
|
129
|
+
get(documentId: string): Promise<DocumentPermissionSnapshot>;
|
|
130
|
+
/** Snapshots for every id, loading the missing and expired ones in one batch. */
|
|
131
|
+
getMany(documentIds: string[]): Promise<Map<string, DocumentPermissionSnapshot>>;
|
|
132
|
+
invalidate(documentId: string): void;
|
|
133
|
+
clear(): void;
|
|
134
|
+
}
|
|
135
|
+
//#endregion
|
|
84
136
|
//#region src/services/document-permission.service.d.ts
|
|
85
137
|
export interface DocumentPermissionEntry {
|
|
86
138
|
documentId: string;
|
|
@@ -122,7 +174,13 @@ export interface DocumentPermissionConfig {
|
|
|
122
174
|
export declare class DocumentPermissionService {
|
|
123
175
|
private readonly db;
|
|
124
176
|
readonly config: DocumentPermissionConfig;
|
|
125
|
-
|
|
177
|
+
/**
|
|
178
|
+
* Serves the reads authorization decisions make (protection, owner, grant
|
|
179
|
+
* level, operation grants). Every write through this service invalidates
|
|
180
|
+
* the document it touched.
|
|
181
|
+
*/
|
|
182
|
+
readonly permissionCache: PermissionCache;
|
|
183
|
+
constructor(db: Kysely<DocumentPermissionDatabase>, config?: DocumentPermissionConfig, cacheOptions?: PermissionCacheOptions);
|
|
126
184
|
/**
|
|
127
185
|
* Get the permission level for a user on a specific document.
|
|
128
186
|
* Returns null if no permission is set.
|
|
@@ -189,6 +247,11 @@ export declare class DocumentPermissionService {
|
|
|
189
247
|
* Collects all ancestor IDs first (with cycle detection), then batch-checks protection.
|
|
190
248
|
*/
|
|
191
249
|
isProtectedWithAncestors(documentId: string, getParentIds: GetParentIdsFn): Promise<boolean>;
|
|
250
|
+
/**
|
|
251
|
+
* Reads the permission rows of the given documents from the store, three
|
|
252
|
+
* queries for the whole batch. The permission cache's loader.
|
|
253
|
+
*/
|
|
254
|
+
loadPermissionSnapshots(documentIds: string[]): Promise<Map<string, DocumentPermissionSnapshot>>;
|
|
192
255
|
/**
|
|
193
256
|
* Collect all ancestor IDs (including the document itself) with cycle detection.
|
|
194
257
|
*/
|
|
@@ -432,6 +495,21 @@ export declare class AuthService implements ICredentialInvalidator {
|
|
|
432
495
|
private fetchCredentialExists;
|
|
433
496
|
}
|
|
434
497
|
//#endregion
|
|
498
|
+
//#region src/graphql/request-clients.d.ts
|
|
499
|
+
/**
|
|
500
|
+
* The reactor client halves a resolver may use, carried on the GraphQL
|
|
501
|
+
* context as `ctx.clients`.
|
|
502
|
+
*/
|
|
503
|
+
interface RequestClients {
|
|
504
|
+
/** Answers from read models; always present. */
|
|
505
|
+
readonly read: IReactorReadClient;
|
|
506
|
+
/**
|
|
507
|
+
* Enqueues writes. Present while a mutation executes; reading it in a query
|
|
508
|
+
* or a subscription throws {@link WriteClientUnavailableError}.
|
|
509
|
+
*/
|
|
510
|
+
readonly write: IReactorWriteClient;
|
|
511
|
+
}
|
|
512
|
+
//#endregion
|
|
435
513
|
//#region src/graphql/gateway/types.d.ts
|
|
436
514
|
export type TlsOptions = {
|
|
437
515
|
keyPath: string;
|
|
@@ -658,11 +736,13 @@ export declare class MemoryWebhookStore implements IWebhookStore {
|
|
|
658
736
|
//#region src/http/webhook-service.d.ts
|
|
659
737
|
/** The flat, token-addressed path family. */
|
|
660
738
|
export declare const WEBHOOK_SEGMENT = "webhooks";
|
|
739
|
+
/** An origin, or a read of one only known once the server listens. */
|
|
740
|
+
type PublicOrigin = string | (() => string);
|
|
661
741
|
interface WebhookServiceOptions {
|
|
662
742
|
store: IWebhookStore;
|
|
663
743
|
basePath?: string;
|
|
664
744
|
/** Public origin to advertise, e.g. https://switchboard.example. */
|
|
665
|
-
publicUrl?:
|
|
745
|
+
publicUrl?: PublicOrigin;
|
|
666
746
|
}
|
|
667
747
|
/** One host route for `/webhooks/:token`, dispatching by token. The flat path leaks
|
|
668
748
|
* neither package nor document; the namespace lives in the token record, which is also what stops one package's token reaching another's handler. */
|
|
@@ -699,7 +779,7 @@ interface HttpRouteServiceOptions {
|
|
|
699
779
|
/** Absent when auth is disabled host-wide; every route then sees an anonymous actor. */
|
|
700
780
|
authService?: AuthService;
|
|
701
781
|
/** The host's public origin; empty when unknowable, the only case where advertised URLs degrade to paths. */
|
|
702
|
-
publicUrl?:
|
|
782
|
+
publicUrl?: PublicOrigin;
|
|
703
783
|
/** Whether to believe the `X-Forwarded-*` headers that name the request's public origin.
|
|
704
784
|
* Off by default: they are client-written, so with no proxy in front a caller could choose the origin a route advertises. */
|
|
705
785
|
trustProxy?: boolean;
|
|
@@ -843,12 +923,28 @@ export declare class CanonicalDocumentIdResolutionError extends Error {
|
|
|
843
923
|
constructor();
|
|
844
924
|
}
|
|
845
925
|
export type CanonicalDocumentIdResolver = (identifier: string) => Promise<CanonicalDocumentId>;
|
|
926
|
+
/** Resolves an identifier the way the read side's data paths do. */
|
|
927
|
+
export type ReadSideIdentity = Pick<IReactorReadClient, "resolveIdOrSlug">;
|
|
928
|
+
/** Resolves an identifier the way a mutation resolves its target. */
|
|
929
|
+
export type WriteSideIdentity = Pick<IReactorWriteClient, "describe">;
|
|
930
|
+
/** The halves an identifier can be resolved on; mutations need `write`. */
|
|
931
|
+
export type CanonicalIdClients = {
|
|
932
|
+
read: ReadSideIdentity;
|
|
933
|
+
write?: WriteSideIdentity;
|
|
934
|
+
};
|
|
935
|
+
/** Which side resolves: a mutation resolves on the write side. */
|
|
936
|
+
export type CanonicalIdOperation = "query" | "mutation" | "subscription";
|
|
846
937
|
/**
|
|
847
938
|
* The sanctioned string-to-CanonicalDocumentId cast: both the GraphQL layer
|
|
848
939
|
* and server routes must resolve caller identifiers through this helper so
|
|
849
940
|
* decision and data layers always agree on the subject document.
|
|
941
|
+
*
|
|
942
|
+
* Queries and subscriptions resolve on the read half (`resolveIdOrSlug`, the
|
|
943
|
+
* lookup their data fetch makes); mutations on the write half (`describe`, the
|
|
944
|
+
* lookup their write makes). A bare read client (or the facade, whose
|
|
945
|
+
* `write` is then used) is accepted as the read half.
|
|
850
946
|
*/
|
|
851
|
-
export declare function createCanonicalDocumentIdResolver(
|
|
947
|
+
export declare function createCanonicalDocumentIdResolver(clients: CanonicalIdClients | ReadSideIdentity, operationType?: CanonicalIdOperation): CanonicalDocumentIdResolver;
|
|
852
948
|
//#endregion
|
|
853
949
|
//#region src/services/attachment-access.service.d.ts
|
|
854
950
|
/**
|
|
@@ -1060,6 +1156,12 @@ export type Context = {
|
|
|
1060
1156
|
/** The did:key of the app instance that issued this request's token. */
|
|
1061
1157
|
appKey: string;
|
|
1062
1158
|
};
|
|
1159
|
+
/**
|
|
1160
|
+
* The reactor client halves this operation may use. `read` is always there;
|
|
1161
|
+
* `write` only while a mutation executes, and reading it anywhere else
|
|
1162
|
+
* throws an error naming the field.
|
|
1163
|
+
*/
|
|
1164
|
+
clients: RequestClients;
|
|
1063
1165
|
};
|
|
1064
1166
|
export type ISubgraph = {
|
|
1065
1167
|
name: string;
|
|
@@ -1073,14 +1175,33 @@ export type ISubgraph = {
|
|
|
1073
1175
|
path?: string;
|
|
1074
1176
|
resolvers: Record<string, any>;
|
|
1075
1177
|
typeDefs: DocumentNode;
|
|
1076
|
-
|
|
1178
|
+
/** The read half, for setup-time lookups; resolvers read through `ctx.clients.read`. */
|
|
1179
|
+
readClient?: IReactorReadClient;
|
|
1180
|
+
/** @deprecated Resolvers use `ctx.clients`; setup-time code uses `readClient`. */
|
|
1181
|
+
reactorClient?: IReactorClient;
|
|
1077
1182
|
relationalDb: IRelationalDb;
|
|
1183
|
+
/**
|
|
1184
|
+
* Query fields of this subgraph that read write-side state and so are handed
|
|
1185
|
+
* `ctx.clients.write` although they run in a query. Honoured for the host's
|
|
1186
|
+
* core subgraphs only.
|
|
1187
|
+
*/
|
|
1188
|
+
writeSideQueries?: readonly string[];
|
|
1078
1189
|
hasSubscriptions?: boolean;
|
|
1079
1190
|
onSetup?: () => Promise<void>;
|
|
1080
1191
|
onDisconnect?: () => Promise<void>;
|
|
1081
1192
|
};
|
|
1082
1193
|
export type SubgraphArgs = {
|
|
1083
|
-
|
|
1194
|
+
/**
|
|
1195
|
+
* The read half, for setup-time lookups (schema building, model lookup).
|
|
1196
|
+
* Resolvers read through `ctx.clients.read` and write through
|
|
1197
|
+
* `ctx.clients.write`. Derived from `reactorClient` when absent.
|
|
1198
|
+
*/
|
|
1199
|
+
readClient?: IReactorReadClient;
|
|
1200
|
+
/**
|
|
1201
|
+
* @deprecated The facade over both halves, kept for one release for
|
|
1202
|
+
* subgraphs that still call it. Use `readClient` and `ctx.clients`.
|
|
1203
|
+
*/
|
|
1204
|
+
reactorClient?: IReactorClient;
|
|
1084
1205
|
/**
|
|
1085
1206
|
* The subgraph's package's slice of the HTTP surface, for serving REST
|
|
1086
1207
|
* routes and webhooks alongside the GraphQL API. Already bound to the
|
|
@@ -1189,6 +1310,16 @@ export declare class BaseSubgraph implements ISubgraph$1 {
|
|
|
1189
1310
|
path: string;
|
|
1190
1311
|
resolvers: Record<string, any>;
|
|
1191
1312
|
typeDefs: DocumentNode;
|
|
1313
|
+
/**
|
|
1314
|
+
* The read half, for setup-time use (schema building, model lookup).
|
|
1315
|
+
* Resolvers read through `ctx.clients.read` instead.
|
|
1316
|
+
*/
|
|
1317
|
+
readonly readClient: IReactorReadClient;
|
|
1318
|
+
/**
|
|
1319
|
+
* @deprecated The facade over both halves, for subgraphs that have not
|
|
1320
|
+
* moved. Resolvers use `ctx.clients.read` and, in a mutation,
|
|
1321
|
+
* `ctx.clients.write`; setup-time code uses {@link readClient}.
|
|
1322
|
+
*/
|
|
1192
1323
|
reactorClient: IReactorClient;
|
|
1193
1324
|
/** This package's namespaced slice of the HTTP surface. */
|
|
1194
1325
|
readonly http: SubgraphArgs$1["http"];
|
|
@@ -1213,13 +1344,20 @@ export declare class BaseSubgraph implements ISubgraph$1 {
|
|
|
1213
1344
|
* @throws Error when the host provides no attachment client to subgraphs.
|
|
1214
1345
|
*/
|
|
1215
1346
|
attachmentsFor(ctx: Context): IAttachmentClient;
|
|
1347
|
+
/**
|
|
1348
|
+
* The clients this request's operation may use: those the GraphQL layer put
|
|
1349
|
+
* on the context. A context it never saw (a resolver called directly) reads
|
|
1350
|
+
* through {@link readClient} and may not write.
|
|
1351
|
+
*/
|
|
1352
|
+
clientsOf(ctx: Context | undefined): RequestClients;
|
|
1216
1353
|
onSetup(): Promise<void>;
|
|
1217
1354
|
onDisconnect(): Promise<void>;
|
|
1218
1355
|
/**
|
|
1219
1356
|
* Resolves a caller-supplied identifier (id or slug) to its canonical
|
|
1220
1357
|
* document id, memoized per request. Both the decision layer and the data
|
|
1221
|
-
* layer must agree on the subject, so this runs the
|
|
1222
|
-
*
|
|
1358
|
+
* layer must agree on the subject, so this runs the lookup the data path
|
|
1359
|
+
* uses: `resolveIdOrSlug` on the read half for a query, `describe` on the
|
|
1360
|
+
* write half for a mutation. A resolution failure (not found, ambiguous, or
|
|
1223
1361
|
* transient) surfaces as a generic Forbidden, fail-closed, so a bad
|
|
1224
1362
|
* identifier cannot be used as a document-existence oracle.
|
|
1225
1363
|
*/
|
|
@@ -1602,7 +1740,19 @@ export type GraphQLManagerOptions = {
|
|
|
1602
1740
|
path: string;
|
|
1603
1741
|
httpServer: http.Server;
|
|
1604
1742
|
wsServer: WebSocketServer;
|
|
1605
|
-
|
|
1743
|
+
/**
|
|
1744
|
+
* The read half: every query reads through it (as `ctx.clients.read`), and
|
|
1745
|
+
* so do setup-time lookups, drive discovery and the drive ownership cache.
|
|
1746
|
+
*/
|
|
1747
|
+
readClient?: IReactorReadClient;
|
|
1748
|
+
/** The write half, handed to mutation resolvers as `ctx.clients.write`. */
|
|
1749
|
+
writeClient?: IReactorWriteClient;
|
|
1750
|
+
/**
|
|
1751
|
+
* @deprecated Pass `readClient` and `writeClient`. Accepted for one release:
|
|
1752
|
+
* the halves are taken from its `read` and `write`, and it is still handed
|
|
1753
|
+
* to subgraphs as their deprecated `reactorClient`.
|
|
1754
|
+
*/
|
|
1755
|
+
reactorClient?: IReactorClient;
|
|
1606
1756
|
relationalDb: IRelationalDb;
|
|
1607
1757
|
analyticsStore: IAnalyticsStore;
|
|
1608
1758
|
syncManager: ISyncManager;
|
|
@@ -1618,13 +1768,18 @@ export type GraphQLManagerOptions = {
|
|
|
1618
1768
|
authorizationService: IAuthorizationService;
|
|
1619
1769
|
/** Resolvers dispatch to it for reactor-drive parents. */
|
|
1620
1770
|
reactorDriveClient?: IDriveClient;
|
|
1771
|
+
/**
|
|
1772
|
+
* Type-neutral drive node reads behind the reactor subgraph's `driveNodes`,
|
|
1773
|
+
* `driveNode` and `driveDescendants`. Without it those fields refuse.
|
|
1774
|
+
*/
|
|
1775
|
+
driveNodes?: IDriveNodeSource;
|
|
1621
1776
|
syncServingGate?: SyncScopeGate;
|
|
1622
1777
|
httpRoutes?: HttpRouteService;
|
|
1623
1778
|
attachments?: IAttachmentClientProvider;
|
|
1624
1779
|
inspection?: IReactorInspectionSource;
|
|
1625
1780
|
/**
|
|
1626
1781
|
* Where drive ownership is looked up, past the read gate. Defaults to the
|
|
1627
|
-
*
|
|
1782
|
+
* read client, which withholds a drive the host's own key may not read.
|
|
1628
1783
|
*/
|
|
1629
1784
|
driveStore?: DriveStore;
|
|
1630
1785
|
reportError?: ReportError;
|
|
@@ -1672,11 +1827,12 @@ export declare class GraphQLManager {
|
|
|
1672
1827
|
* it for reactor-drive parents.
|
|
1673
1828
|
*/
|
|
1674
1829
|
readonly reactorDriveClient?: IDriveClient;
|
|
1830
|
+
/** See {@link GraphQLManagerOptions.driveNodes}. */
|
|
1831
|
+
readonly driveNodes?: IDriveNodeSource;
|
|
1675
1832
|
private readonly authorizationService;
|
|
1676
1833
|
private readonly path;
|
|
1677
1834
|
private readonly httpServer;
|
|
1678
1835
|
private readonly wsServer;
|
|
1679
|
-
private readonly reactorClient;
|
|
1680
1836
|
private readonly relationalDb;
|
|
1681
1837
|
private readonly analyticsStore;
|
|
1682
1838
|
private readonly syncManager;
|
|
@@ -1868,6 +2024,8 @@ export type ReadinessGate = {
|
|
|
1868
2024
|
};
|
|
1869
2025
|
export type API = {
|
|
1870
2026
|
httpAdapter: IHttpAdapter;
|
|
2027
|
+
/** The port the HTTP server bound; the ephemeral one when 0 was requested. */
|
|
2028
|
+
port: number;
|
|
1871
2029
|
/** The listening server, for host-side observers such as request load. */
|
|
1872
2030
|
httpServer: http.Server;
|
|
1873
2031
|
/** Hands each package a namespaced slice of the HTTP surface. */
|
|
@@ -2189,6 +2347,7 @@ export type MakeEmpty<T extends {
|
|
|
2189
2347
|
[key: string]: unknown;
|
|
2190
2348
|
}, K extends keyof T> = { [_ in K]?: never; };
|
|
2191
2349
|
export type Incremental<T> = T | { [P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never; };
|
|
2350
|
+
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
2192
2351
|
export type RequireFields<T, K extends keyof T> = Omit<T, K> & { [P in K]-?: NonNullable<T[P]>; };
|
|
2193
2352
|
/** All built-in and custom scalars, mapped to their actual values */
|
|
2194
2353
|
export type Scalars = {
|
|
@@ -2333,6 +2492,13 @@ export type ConsistencyCoordinate = {
|
|
|
2333
2492
|
readonly operationIndex: Scalars["Int"]["output"];
|
|
2334
2493
|
readonly scope: Scalars["String"]["output"];
|
|
2335
2494
|
};
|
|
2495
|
+
/** A consistency token's coordinate, as ConsistencyCoordinate reports it. */
|
|
2496
|
+
export type ConsistencyCoordinateInput = {
|
|
2497
|
+
readonly branch: Scalars["String"]["input"];
|
|
2498
|
+
readonly documentId: Scalars["String"]["input"];
|
|
2499
|
+
readonly operationIndex: Scalars["Int"]["input"];
|
|
2500
|
+
readonly scope: Scalars["String"]["input"];
|
|
2501
|
+
};
|
|
2336
2502
|
/**
|
|
2337
2503
|
* The write positions a job reached, for read-after-write. Only meaningful once
|
|
2338
2504
|
* the job has completed.
|
|
@@ -2342,6 +2508,15 @@ export type ConsistencyToken = {
|
|
|
2342
2508
|
readonly createdAtUtcIso: Scalars["String"]["output"];
|
|
2343
2509
|
readonly version: Scalars["Int"]["output"];
|
|
2344
2510
|
};
|
|
2511
|
+
/**
|
|
2512
|
+
* A consistency token, as JobInfo.consistencyToken reports it. A read given one
|
|
2513
|
+
* waits until the read models it reads from hold every coordinate it names.
|
|
2514
|
+
*/
|
|
2515
|
+
export type ConsistencyTokenInput = {
|
|
2516
|
+
readonly coordinates: ReadonlyArray<ConsistencyCoordinateInput>;
|
|
2517
|
+
readonly createdAtUtcIso: Scalars["String"]["input"];
|
|
2518
|
+
readonly version: Scalars["Int"]["input"];
|
|
2519
|
+
};
|
|
2345
2520
|
export type CreateDefaults = {
|
|
2346
2521
|
readonly protocolVersions: Scalars["JSONObject"]["output"];
|
|
2347
2522
|
readonly signaturePolicy: Scalars["String"]["output"];
|
|
@@ -2417,6 +2592,29 @@ export type DocumentWithChildren = {
|
|
|
2417
2592
|
readonly childIds: ReadonlyArray<Scalars["String"]["output"]>;
|
|
2418
2593
|
readonly document: PhDocument;
|
|
2419
2594
|
};
|
|
2595
|
+
export type DriveFileNode = {
|
|
2596
|
+
readonly documentType: Scalars["String"]["output"];
|
|
2597
|
+
readonly driveId: Scalars["ID"]["output"];
|
|
2598
|
+
readonly id: Scalars["ID"]["output"];
|
|
2599
|
+
readonly name: Scalars["String"]["output"];
|
|
2600
|
+
readonly parentFolder?: Maybe<Scalars["ID"]["output"]>;
|
|
2601
|
+
};
|
|
2602
|
+
export type DriveFolderNode = {
|
|
2603
|
+
readonly driveId: Scalars["ID"]["output"];
|
|
2604
|
+
readonly id: Scalars["ID"]["output"];
|
|
2605
|
+
readonly name: Scalars["String"]["output"];
|
|
2606
|
+
readonly parentFolder?: Maybe<Scalars["ID"]["output"]>;
|
|
2607
|
+
};
|
|
2608
|
+
export type DriveNode = DriveFileNode | DriveFolderNode;
|
|
2609
|
+
export declare enum DriveNodeKind {
|
|
2610
|
+
File = "FILE",
|
|
2611
|
+
Folder = "FOLDER"
|
|
2612
|
+
}
|
|
2613
|
+
export type DriveNodePage = {
|
|
2614
|
+
readonly hasMore: Scalars["Boolean"]["output"];
|
|
2615
|
+
readonly nextCursor?: Maybe<Scalars["String"]["output"]>;
|
|
2616
|
+
readonly results: ReadonlyArray<DriveNode>;
|
|
2617
|
+
};
|
|
2420
2618
|
/**
|
|
2421
2619
|
* One mutation job of a batch, mirroring the reactor's `ExecutionJobPlan`
|
|
2422
2620
|
* (packages/reactor/src/core/types.ts). The batch runs its jobs in dependency
|
|
@@ -2750,6 +2948,9 @@ export type Query = {
|
|
|
2750
2948
|
readonly documentOutgoingRelationshipEdges: DocumentRelationshipResultPage;
|
|
2751
2949
|
readonly documentOutgoingRelationships: PhDocumentResultPage;
|
|
2752
2950
|
readonly documentServed: Scalars["Boolean"]["output"];
|
|
2951
|
+
readonly driveDescendants: ReadonlyArray<DriveNode>;
|
|
2952
|
+
readonly driveNode?: Maybe<DriveNode>;
|
|
2953
|
+
readonly driveNodes: DriveNodePage;
|
|
2753
2954
|
/**
|
|
2754
2955
|
* Predicts whether the calling subject would be admitted to execute each of a
|
|
2755
2956
|
* set of candidate operations, without submitting any of them. A UI asks this to
|
|
@@ -2799,11 +3000,13 @@ export type QueryCreateDefaultsArgs = {
|
|
|
2799
3000
|
parentIdOrSlug?: InputMaybe<Scalars["String"]["input"]>;
|
|
2800
3001
|
};
|
|
2801
3002
|
export type QueryDocumentArgs = {
|
|
3003
|
+
consistency?: InputMaybe<ConsistencyTokenInput>;
|
|
2802
3004
|
idOrSlug?: InputMaybe<Scalars["String"]["input"]>;
|
|
2803
3005
|
identifier?: InputMaybe<Scalars["String"]["input"]>;
|
|
2804
3006
|
view?: InputMaybe<ViewFilterInput>;
|
|
2805
3007
|
};
|
|
2806
3008
|
export type QueryDocumentIncomingRelationshipEdgesArgs = {
|
|
3009
|
+
consistency?: InputMaybe<ConsistencyTokenInput>;
|
|
2807
3010
|
paging?: InputMaybe<PagingInput>;
|
|
2808
3011
|
relationshipType?: InputMaybe<Scalars["String"]["input"]>;
|
|
2809
3012
|
targetIdOrSlug?: InputMaybe<Scalars["String"]["input"]>;
|
|
@@ -2811,6 +3014,7 @@ export type QueryDocumentIncomingRelationshipEdgesArgs = {
|
|
|
2811
3014
|
view?: InputMaybe<ViewFilterInput>;
|
|
2812
3015
|
};
|
|
2813
3016
|
export type QueryDocumentIncomingRelationshipsArgs = {
|
|
3017
|
+
consistency?: InputMaybe<ConsistencyTokenInput>;
|
|
2814
3018
|
paging?: InputMaybe<PagingInput>;
|
|
2815
3019
|
relationshipType: Scalars["String"]["input"];
|
|
2816
3020
|
targetIdOrSlug?: InputMaybe<Scalars["String"]["input"]>;
|
|
@@ -2826,6 +3030,7 @@ export type QueryDocumentOperationsArgs = {
|
|
|
2826
3030
|
paging?: InputMaybe<PagingInput>;
|
|
2827
3031
|
};
|
|
2828
3032
|
export type QueryDocumentOutgoingRelationshipEdgesArgs = {
|
|
3033
|
+
consistency?: InputMaybe<ConsistencyTokenInput>;
|
|
2829
3034
|
paging?: InputMaybe<PagingInput>;
|
|
2830
3035
|
relationshipType?: InputMaybe<Scalars["String"]["input"]>;
|
|
2831
3036
|
sourceIdOrSlug?: InputMaybe<Scalars["String"]["input"]>;
|
|
@@ -2833,6 +3038,7 @@ export type QueryDocumentOutgoingRelationshipEdgesArgs = {
|
|
|
2833
3038
|
view?: InputMaybe<ViewFilterInput>;
|
|
2834
3039
|
};
|
|
2835
3040
|
export type QueryDocumentOutgoingRelationshipsArgs = {
|
|
3041
|
+
consistency?: InputMaybe<ConsistencyTokenInput>;
|
|
2836
3042
|
paging?: InputMaybe<PagingInput>;
|
|
2837
3043
|
relationshipType: Scalars["String"]["input"];
|
|
2838
3044
|
sourceIdOrSlug?: InputMaybe<Scalars["String"]["input"]>;
|
|
@@ -2843,6 +3049,20 @@ export type QueryDocumentServedArgs = {
|
|
|
2843
3049
|
idOrSlug: Scalars["String"]["input"];
|
|
2844
3050
|
view?: InputMaybe<ViewFilterInput>;
|
|
2845
3051
|
};
|
|
3052
|
+
export type QueryDriveDescendantsArgs = {
|
|
3053
|
+
driveId: Scalars["ID"]["input"];
|
|
3054
|
+
root: Scalars["ID"]["input"];
|
|
3055
|
+
};
|
|
3056
|
+
export type QueryDriveNodeArgs = {
|
|
3057
|
+
driveId: Scalars["ID"]["input"];
|
|
3058
|
+
id: Scalars["ID"]["input"];
|
|
3059
|
+
};
|
|
3060
|
+
export type QueryDriveNodesArgs = {
|
|
3061
|
+
driveId: Scalars["ID"]["input"];
|
|
3062
|
+
kind?: InputMaybe<DriveNodeKind>;
|
|
3063
|
+
paging?: InputMaybe<PagingInput>;
|
|
3064
|
+
parentFolder?: InputMaybe<Scalars["ID"]["input"]>;
|
|
3065
|
+
};
|
|
2846
3066
|
export type QueryEvaluateActionsArgs = {
|
|
2847
3067
|
branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
2848
3068
|
candidates: ReadonlyArray<ActionCandidateInput>;
|
|
@@ -2850,6 +3070,7 @@ export type QueryEvaluateActionsArgs = {
|
|
|
2850
3070
|
documentIdentifier?: InputMaybe<Scalars["String"]["input"]>;
|
|
2851
3071
|
};
|
|
2852
3072
|
export type QueryFindDocumentsArgs = {
|
|
3073
|
+
consistency?: InputMaybe<ConsistencyTokenInput>;
|
|
2853
3074
|
paging?: InputMaybe<PagingInput>;
|
|
2854
3075
|
search?: InputMaybe<SearchFilterInput>;
|
|
2855
3076
|
view?: InputMaybe<ViewFilterInput>;
|
|
@@ -3366,6 +3587,80 @@ export type GetCreateDefaultsQuery = {
|
|
|
3366
3587
|
readonly protocolVersions: NonNullable<unknown>;
|
|
3367
3588
|
};
|
|
3368
3589
|
};
|
|
3590
|
+
type DriveNodeFields_DriveFileNode_Fragment = {
|
|
3591
|
+
readonly id: string;
|
|
3592
|
+
readonly driveId: string;
|
|
3593
|
+
readonly name: string;
|
|
3594
|
+
readonly parentFolder?: string | null | undefined;
|
|
3595
|
+
readonly documentType: string;
|
|
3596
|
+
};
|
|
3597
|
+
type DriveNodeFields_DriveFolderNode_Fragment = {
|
|
3598
|
+
readonly id: string;
|
|
3599
|
+
readonly driveId: string;
|
|
3600
|
+
readonly name: string;
|
|
3601
|
+
readonly parentFolder?: string | null | undefined;
|
|
3602
|
+
};
|
|
3603
|
+
export type DriveNodeFieldsFragment = DriveNodeFields_DriveFileNode_Fragment | DriveNodeFields_DriveFolderNode_Fragment;
|
|
3604
|
+
export type GetDriveNodesQueryVariables = Exact<{
|
|
3605
|
+
driveId: Scalars["ID"]["input"];
|
|
3606
|
+
parentFolder?: InputMaybe<Scalars["ID"]["input"]>;
|
|
3607
|
+
paging?: InputMaybe<PagingInput>;
|
|
3608
|
+
kind?: InputMaybe<DriveNodeKind>;
|
|
3609
|
+
}>;
|
|
3610
|
+
export type GetDriveNodesQuery = {
|
|
3611
|
+
readonly driveNodes: {
|
|
3612
|
+
readonly nextCursor?: string | null | undefined;
|
|
3613
|
+
readonly hasMore: boolean;
|
|
3614
|
+
readonly results: ReadonlyArray<{
|
|
3615
|
+
readonly id: string;
|
|
3616
|
+
readonly driveId: string;
|
|
3617
|
+
readonly name: string;
|
|
3618
|
+
readonly parentFolder?: string | null | undefined;
|
|
3619
|
+
readonly documentType: string;
|
|
3620
|
+
} | {
|
|
3621
|
+
readonly id: string;
|
|
3622
|
+
readonly driveId: string;
|
|
3623
|
+
readonly name: string;
|
|
3624
|
+
readonly parentFolder?: string | null | undefined;
|
|
3625
|
+
}>;
|
|
3626
|
+
};
|
|
3627
|
+
};
|
|
3628
|
+
export type GetDriveNodeQueryVariables = Exact<{
|
|
3629
|
+
driveId: Scalars["ID"]["input"];
|
|
3630
|
+
id: Scalars["ID"]["input"];
|
|
3631
|
+
}>;
|
|
3632
|
+
export type GetDriveNodeQuery = {
|
|
3633
|
+
readonly driveNode?: {
|
|
3634
|
+
readonly id: string;
|
|
3635
|
+
readonly driveId: string;
|
|
3636
|
+
readonly name: string;
|
|
3637
|
+
readonly parentFolder?: string | null | undefined;
|
|
3638
|
+
readonly documentType: string;
|
|
3639
|
+
} | {
|
|
3640
|
+
readonly id: string;
|
|
3641
|
+
readonly driveId: string;
|
|
3642
|
+
readonly name: string;
|
|
3643
|
+
readonly parentFolder?: string | null | undefined;
|
|
3644
|
+
} | null | undefined;
|
|
3645
|
+
};
|
|
3646
|
+
export type GetDriveDescendantsQueryVariables = Exact<{
|
|
3647
|
+
driveId: Scalars["ID"]["input"];
|
|
3648
|
+
root: Scalars["ID"]["input"];
|
|
3649
|
+
}>;
|
|
3650
|
+
export type GetDriveDescendantsQuery = {
|
|
3651
|
+
readonly driveDescendants: ReadonlyArray<{
|
|
3652
|
+
readonly id: string;
|
|
3653
|
+
readonly driveId: string;
|
|
3654
|
+
readonly name: string;
|
|
3655
|
+
readonly parentFolder?: string | null | undefined;
|
|
3656
|
+
readonly documentType: string;
|
|
3657
|
+
} | {
|
|
3658
|
+
readonly id: string;
|
|
3659
|
+
readonly driveId: string;
|
|
3660
|
+
readonly name: string;
|
|
3661
|
+
readonly parentFolder?: string | null | undefined;
|
|
3662
|
+
}>;
|
|
3663
|
+
};
|
|
3369
3664
|
export type EvaluateActionsQueryVariables = Exact<{
|
|
3370
3665
|
documentIdentifier: Scalars["String"]["input"];
|
|
3371
3666
|
branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
@@ -3833,6 +4128,10 @@ export type TypeResolveFn<TTypes, TParent = Record<PropertyKey, never>, TContext
|
|
|
3833
4128
|
export type IsTypeOfResolverFn<T = Record<PropertyKey, never>, TContext = Record<PropertyKey, never>> = (obj: T, context: TContext, info: GraphQLResolveInfo) => boolean | Promise<boolean>;
|
|
3834
4129
|
export type NextResolverFn<T> = () => Promise<T>;
|
|
3835
4130
|
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>;
|
|
4131
|
+
/** Mapping of union types */
|
|
4132
|
+
export type ResolversUnionTypes<_RefType extends Record<string, unknown>> = ResolversObject<{
|
|
4133
|
+
DriveNode: DriveFileNode | DriveFolderNode;
|
|
4134
|
+
}>;
|
|
3836
4135
|
/** Mapping between all available schema types and the resolvers types */
|
|
3837
4136
|
export type ResolversTypes = ResolversObject<{
|
|
3838
4137
|
Action: ResolverTypeWrapper<Action>;
|
|
@@ -3849,7 +4148,9 @@ export type ResolversTypes = ResolversObject<{
|
|
|
3849
4148
|
ChannelMeta: ResolverTypeWrapper<ChannelMeta>;
|
|
3850
4149
|
ChannelMetaInput: ChannelMetaInput;
|
|
3851
4150
|
ConsistencyCoordinate: ResolverTypeWrapper<ConsistencyCoordinate>;
|
|
4151
|
+
ConsistencyCoordinateInput: ConsistencyCoordinateInput;
|
|
3852
4152
|
ConsistencyToken: ResolverTypeWrapper<ConsistencyToken>;
|
|
4153
|
+
ConsistencyTokenInput: ConsistencyTokenInput;
|
|
3853
4154
|
CreateDefaults: ResolverTypeWrapper<CreateDefaults>;
|
|
3854
4155
|
DateTime: ResolverTypeWrapper<Scalars["DateTime"]["output"]>;
|
|
3855
4156
|
DeadLetterInfo: ResolverTypeWrapper<DeadLetterInfo>;
|
|
@@ -3862,7 +4163,15 @@ export type ResolversTypes = ResolversObject<{
|
|
|
3862
4163
|
DocumentRelationship: ResolverTypeWrapper<DocumentRelationship>;
|
|
3863
4164
|
DocumentRelationshipResultPage: ResolverTypeWrapper<DocumentRelationshipResultPage>;
|
|
3864
4165
|
DocumentWithChildren: ResolverTypeWrapper<DocumentWithChildren>;
|
|
4166
|
+
DriveFileNode: ResolverTypeWrapper<DriveFileNode>;
|
|
4167
|
+
DriveFolderNode: ResolverTypeWrapper<DriveFolderNode>;
|
|
4168
|
+
DriveNode: ResolverTypeWrapper<ResolversUnionTypes<ResolversTypes>["DriveNode"]>;
|
|
4169
|
+
DriveNodeKind: DriveNodeKind;
|
|
4170
|
+
DriveNodePage: ResolverTypeWrapper<Omit<DriveNodePage, "results"> & {
|
|
4171
|
+
results: ReadonlyArray<ResolversTypes["DriveNode"]>;
|
|
4172
|
+
}>;
|
|
3865
4173
|
ExecutionJobInput: ExecutionJobInput;
|
|
4174
|
+
ID: ResolverTypeWrapper<Scalars["ID"]["output"]>;
|
|
3866
4175
|
Int: ResolverTypeWrapper<Scalars["Int"]["output"]>;
|
|
3867
4176
|
JSONObject: ResolverTypeWrapper<Scalars["JSONObject"]["output"]>;
|
|
3868
4177
|
JobBatchMeta: ResolverTypeWrapper<JobBatchMeta>;
|
|
@@ -3925,7 +4234,9 @@ export type ResolversParentTypes = ResolversObject<{
|
|
|
3925
4234
|
ChannelMeta: ChannelMeta;
|
|
3926
4235
|
ChannelMetaInput: ChannelMetaInput;
|
|
3927
4236
|
ConsistencyCoordinate: ConsistencyCoordinate;
|
|
4237
|
+
ConsistencyCoordinateInput: ConsistencyCoordinateInput;
|
|
3928
4238
|
ConsistencyToken: ConsistencyToken;
|
|
4239
|
+
ConsistencyTokenInput: ConsistencyTokenInput;
|
|
3929
4240
|
CreateDefaults: CreateDefaults;
|
|
3930
4241
|
DateTime: Scalars["DateTime"]["output"];
|
|
3931
4242
|
DeadLetterInfo: DeadLetterInfo;
|
|
@@ -3937,7 +4248,14 @@ export type ResolversParentTypes = ResolversObject<{
|
|
|
3937
4248
|
DocumentRelationship: DocumentRelationship;
|
|
3938
4249
|
DocumentRelationshipResultPage: DocumentRelationshipResultPage;
|
|
3939
4250
|
DocumentWithChildren: DocumentWithChildren;
|
|
4251
|
+
DriveFileNode: DriveFileNode;
|
|
4252
|
+
DriveFolderNode: DriveFolderNode;
|
|
4253
|
+
DriveNode: ResolversUnionTypes<ResolversParentTypes>["DriveNode"];
|
|
4254
|
+
DriveNodePage: Omit<DriveNodePage, "results"> & {
|
|
4255
|
+
results: ReadonlyArray<ResolversParentTypes["DriveNode"]>;
|
|
4256
|
+
};
|
|
3940
4257
|
ExecutionJobInput: ExecutionJobInput;
|
|
4258
|
+
ID: Scalars["ID"]["output"];
|
|
3941
4259
|
Int: Scalars["Int"]["output"];
|
|
3942
4260
|
JSONObject: Scalars["JSONObject"]["output"];
|
|
3943
4261
|
JobBatchMeta: JobBatchMeta;
|
|
@@ -4082,6 +4400,29 @@ export type DocumentWithChildrenResolvers<ContextType = Context, ParentType exte
|
|
|
4082
4400
|
childIds?: Resolver<ReadonlyArray<ResolversTypes["String"]>, ParentType, ContextType>;
|
|
4083
4401
|
document?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType>;
|
|
4084
4402
|
}>;
|
|
4403
|
+
export type DriveFileNodeResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DriveFileNode"] = ResolversParentTypes["DriveFileNode"]> = ResolversObject<{
|
|
4404
|
+
documentType?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
4405
|
+
driveId?: Resolver<ResolversTypes["ID"], ParentType, ContextType>;
|
|
4406
|
+
id?: Resolver<ResolversTypes["ID"], ParentType, ContextType>;
|
|
4407
|
+
name?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
4408
|
+
parentFolder?: Resolver<Maybe<ResolversTypes["ID"]>, ParentType, ContextType>;
|
|
4409
|
+
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
4410
|
+
}>;
|
|
4411
|
+
export type DriveFolderNodeResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DriveFolderNode"] = ResolversParentTypes["DriveFolderNode"]> = ResolversObject<{
|
|
4412
|
+
driveId?: Resolver<ResolversTypes["ID"], ParentType, ContextType>;
|
|
4413
|
+
id?: Resolver<ResolversTypes["ID"], ParentType, ContextType>;
|
|
4414
|
+
name?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
4415
|
+
parentFolder?: Resolver<Maybe<ResolversTypes["ID"]>, ParentType, ContextType>;
|
|
4416
|
+
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
4417
|
+
}>;
|
|
4418
|
+
export type DriveNodeResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DriveNode"] = ResolversParentTypes["DriveNode"]> = ResolversObject<{
|
|
4419
|
+
__resolveType: TypeResolveFn<"DriveFileNode" | "DriveFolderNode", ParentType, ContextType>;
|
|
4420
|
+
}>;
|
|
4421
|
+
export type DriveNodePageResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DriveNodePage"] = ResolversParentTypes["DriveNodePage"]> = ResolversObject<{
|
|
4422
|
+
hasMore?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
|
|
4423
|
+
nextCursor?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
|
|
4424
|
+
results?: Resolver<ReadonlyArray<ResolversTypes["DriveNode"]>, ParentType, ContextType>;
|
|
4425
|
+
}>;
|
|
4085
4426
|
export interface JsonObjectScalarConfig extends GraphQLScalarTypeConfig<ResolversTypes["JSONObject"], any> {
|
|
4086
4427
|
name: "JSONObject";
|
|
4087
4428
|
}
|
|
@@ -4195,6 +4536,9 @@ export type QueryResolvers<ContextType = Context, ParentType extends ResolversPa
|
|
|
4195
4536
|
documentOutgoingRelationshipEdges?: Resolver<ResolversTypes["DocumentRelationshipResultPage"], ParentType, ContextType, Partial<QueryDocumentOutgoingRelationshipEdgesArgs>>;
|
|
4196
4537
|
documentOutgoingRelationships?: Resolver<ResolversTypes["PHDocumentResultPage"], ParentType, ContextType, RequireFields<QueryDocumentOutgoingRelationshipsArgs, "relationshipType">>;
|
|
4197
4538
|
documentServed?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType, RequireFields<QueryDocumentServedArgs, "idOrSlug">>;
|
|
4539
|
+
driveDescendants?: Resolver<ReadonlyArray<ResolversTypes["DriveNode"]>, ParentType, ContextType, RequireFields<QueryDriveDescendantsArgs, "driveId" | "root">>;
|
|
4540
|
+
driveNode?: Resolver<Maybe<ResolversTypes["DriveNode"]>, ParentType, ContextType, RequireFields<QueryDriveNodeArgs, "driveId" | "id">>;
|
|
4541
|
+
driveNodes?: Resolver<ResolversTypes["DriveNodePage"], ParentType, ContextType, RequireFields<QueryDriveNodesArgs, "driveId">>;
|
|
4198
4542
|
evaluateActions?: Resolver<ResolversTypes["ActionEvaluations"], ParentType, ContextType, RequireFields<QueryEvaluateActionsArgs, "candidates">>;
|
|
4199
4543
|
findDocuments?: Resolver<ResolversTypes["PHDocumentResultPage"], ParentType, ContextType, Partial<QueryFindDocumentsArgs>>;
|
|
4200
4544
|
jobStatus?: Resolver<Maybe<ResolversTypes["JobInfo"]>, ParentType, ContextType, RequireFields<QueryJobStatusArgs, "jobId">>;
|
|
@@ -4290,6 +4634,10 @@ export type Resolvers<ContextType = Context> = ResolversObject<{
|
|
|
4290
4634
|
DocumentRelationship?: DocumentRelationshipResolvers<ContextType>;
|
|
4291
4635
|
DocumentRelationshipResultPage?: DocumentRelationshipResultPageResolvers<ContextType>;
|
|
4292
4636
|
DocumentWithChildren?: DocumentWithChildrenResolvers<ContextType>;
|
|
4637
|
+
DriveFileNode?: DriveFileNodeResolvers<ContextType>;
|
|
4638
|
+
DriveFolderNode?: DriveFolderNodeResolvers<ContextType>;
|
|
4639
|
+
DriveNode?: DriveNodeResolvers<ContextType>;
|
|
4640
|
+
DriveNodePage?: DriveNodePageResolvers<ContextType>;
|
|
4293
4641
|
JSONObject?: GraphQLScalarType;
|
|
4294
4642
|
JobBatchMeta?: JobBatchMetaResolvers<ContextType>;
|
|
4295
4643
|
JobChangeEvent?: JobChangeEventResolvers<ContextType>;
|
|
@@ -4324,12 +4672,15 @@ export declare const isDefinedNonNullAny: (v: any) => v is definedNonNullAny;
|
|
|
4324
4672
|
export declare const definedNonNullAnySchema: z$1.ZodAny & z$1.ZodType<definedNonNullAny, any, z$1.core.$ZodTypeInternals<definedNonNullAny, any>>;
|
|
4325
4673
|
export declare const AuthDecisionSchema: z$1.ZodEnum<typeof AuthDecision>;
|
|
4326
4674
|
export declare const DocumentChangeTypeSchema: z$1.ZodEnum<typeof DocumentChangeType>;
|
|
4675
|
+
export declare const DriveNodeKindSchema: z$1.ZodEnum<typeof DriveNodeKind>;
|
|
4327
4676
|
export declare const PropagationModeSchema: z$1.ZodEnum<typeof PropagationMode>;
|
|
4328
4677
|
export declare const SyncEnvelopeTypeSchema: z$1.ZodEnum<typeof SyncEnvelopeType>;
|
|
4329
4678
|
export declare function ActionCandidateInputSchema(): z$1.ZodObject<Properties<ActionCandidateInput>>;
|
|
4330
4679
|
export declare function ActionContextInputSchema(): z$1.ZodObject<Properties<ActionContextInput>>;
|
|
4331
4680
|
export declare function ActionInputSchema(): z$1.ZodObject<Properties<ActionInput>>;
|
|
4332
4681
|
export declare function ChannelMetaInputSchema(): z$1.ZodObject<Properties<ChannelMetaInput>>;
|
|
4682
|
+
export declare function ConsistencyCoordinateInputSchema(): z$1.ZodObject<Properties<ConsistencyCoordinateInput>>;
|
|
4683
|
+
export declare function ConsistencyTokenInputSchema(): z$1.ZodObject<Properties<ConsistencyTokenInput>>;
|
|
4333
4684
|
export declare function DocumentOperationsFilterInputSchema(): z$1.ZodObject<Properties<DocumentOperationsFilterInput>>;
|
|
4334
4685
|
export declare function ExecutionJobInputSchema(): z$1.ZodObject<Properties<ExecutionJobInput>>;
|
|
4335
4686
|
export declare function OperationContextInputSchema(): z$1.ZodObject<Properties<OperationContextInput>>;
|
|
@@ -4350,6 +4701,7 @@ export declare function ViewFilterInputSchema(): z$1.ZodObject<Properties<ViewFi
|
|
|
4350
4701
|
export declare const PhDocumentFieldsFragmentDoc: DocumentNode;
|
|
4351
4702
|
export declare const DocumentRelationshipFieldsFragmentDoc: DocumentNode;
|
|
4352
4703
|
export declare const JobInfoFieldsFragmentDoc: DocumentNode;
|
|
4704
|
+
export declare const DriveNodeFieldsFragmentDoc: DocumentNode;
|
|
4353
4705
|
export declare const GetDocumentModelsDocument: DocumentNode;
|
|
4354
4706
|
export declare const GetDocumentDocument: DocumentNode;
|
|
4355
4707
|
export declare const GetDocumentWithOperationsDocument: DocumentNode;
|
|
@@ -4362,6 +4714,9 @@ export declare const GetDocumentOperationsDocument: DocumentNode;
|
|
|
4362
4714
|
export declare const GetJobStatusDocument: DocumentNode;
|
|
4363
4715
|
export declare const GetDocumentServedDocument: DocumentNode;
|
|
4364
4716
|
export declare const GetCreateDefaultsDocument: DocumentNode;
|
|
4717
|
+
export declare const GetDriveNodesDocument: DocumentNode;
|
|
4718
|
+
export declare const GetDriveNodeDocument: DocumentNode;
|
|
4719
|
+
export declare const GetDriveDescendantsDocument: DocumentNode;
|
|
4365
4720
|
export declare const EvaluateActionsDocument: DocumentNode;
|
|
4366
4721
|
export declare const CreateDocumentDocument: DocumentNode;
|
|
4367
4722
|
export declare const CreateEmptyDocumentDocument: DocumentNode;
|
|
@@ -4395,6 +4750,9 @@ export declare function getSdk<C>(requester: Requester<C>): {
|
|
|
4395
4750
|
GetJobStatus(variables: GetJobStatusQueryVariables, options?: C): Promise<GetJobStatusQuery>;
|
|
4396
4751
|
GetDocumentServed(variables: GetDocumentServedQueryVariables, options?: C): Promise<GetDocumentServedQuery>;
|
|
4397
4752
|
GetCreateDefaults(variables?: GetCreateDefaultsQueryVariables, options?: C): Promise<GetCreateDefaultsQuery>;
|
|
4753
|
+
GetDriveNodes(variables: GetDriveNodesQueryVariables, options?: C): Promise<GetDriveNodesQuery>;
|
|
4754
|
+
GetDriveNode(variables: GetDriveNodeQueryVariables, options?: C): Promise<GetDriveNodeQuery>;
|
|
4755
|
+
GetDriveDescendants(variables: GetDriveDescendantsQueryVariables, options?: C): Promise<GetDriveDescendantsQuery>;
|
|
4398
4756
|
EvaluateActions(variables: EvaluateActionsQueryVariables, options?: C): Promise<EvaluateActionsQuery>;
|
|
4399
4757
|
CreateDocument(variables: CreateDocumentMutationVariables, options?: C): Promise<CreateDocumentMutation>;
|
|
4400
4758
|
CreateEmptyDocument(variables: CreateEmptyDocumentMutationVariables, options?: C): Promise<CreateEmptyDocumentMutation>;
|
|
@@ -4479,6 +4837,20 @@ export declare function createReactorGraphQLClient(url: string, fetchImpl?: Fetc
|
|
|
4479
4837
|
GetCreateDefaults(variables?: Exact<{
|
|
4480
4838
|
parentIdOrSlug?: InputMaybe<Scalars["String"]["input"]>;
|
|
4481
4839
|
}> | undefined, options?: {} | undefined): Promise<GetCreateDefaultsQuery>;
|
|
4840
|
+
GetDriveNodes(variables: Exact<{
|
|
4841
|
+
driveId: Scalars["ID"]["input"];
|
|
4842
|
+
parentFolder?: InputMaybe<Scalars["ID"]["input"]>;
|
|
4843
|
+
paging?: InputMaybe<PagingInput>;
|
|
4844
|
+
kind?: InputMaybe<DriveNodeKind>;
|
|
4845
|
+
}>, options?: {} | undefined): Promise<GetDriveNodesQuery>;
|
|
4846
|
+
GetDriveNode(variables: Exact<{
|
|
4847
|
+
driveId: Scalars["ID"]["input"];
|
|
4848
|
+
id: Scalars["ID"]["input"];
|
|
4849
|
+
}>, options?: {} | undefined): Promise<GetDriveNodeQuery>;
|
|
4850
|
+
GetDriveDescendants(variables: Exact<{
|
|
4851
|
+
driveId: Scalars["ID"]["input"];
|
|
4852
|
+
root: Scalars["ID"]["input"];
|
|
4853
|
+
}>, options?: {} | undefined): Promise<GetDriveDescendantsQuery>;
|
|
4482
4854
|
EvaluateActions(variables: Exact<{
|
|
4483
4855
|
documentIdentifier: Scalars["String"]["input"];
|
|
4484
4856
|
branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
@@ -4580,6 +4952,8 @@ export declare class ReactorSubgraph extends BaseSubgraph {
|
|
|
4580
4952
|
constructor(args: SubgraphArgs);
|
|
4581
4953
|
name: string;
|
|
4582
4954
|
hasSubscriptions: boolean;
|
|
4955
|
+
/** See {@link resolvers.WRITE_SIDE_QUERIES}. */
|
|
4956
|
+
readonly writeSideQueries: readonly string[];
|
|
4583
4957
|
private get documentChanges();
|
|
4584
4958
|
/**
|
|
4585
4959
|
* Check operation-level permissions for an array of actions.
|
|
@@ -4974,15 +5348,34 @@ export declare function getExplorerPrefix(basePath: string): string;
|
|
|
4974
5348
|
export interface ClientInitializerResult {
|
|
4975
5349
|
module: InProcessReactorClientModule;
|
|
4976
5350
|
reactorDriveClient?: IDriveClient;
|
|
5351
|
+
/** Type-neutral drive node reads for the reactor subgraph's node queries. */
|
|
5352
|
+
driveNodes?: IDriveNodeSource;
|
|
4977
5353
|
attachmentReferenceProjection?: AttachmentReferenceProjectionCapability;
|
|
5354
|
+
/**
|
|
5355
|
+
* The reactor store, bound to the schema its migrations ran in, where the
|
|
5356
|
+
* document permission tables live (reactor migration 029). When absent the
|
|
5357
|
+
* permission service keeps the legacy tables on the read-model store.
|
|
5358
|
+
*/
|
|
5359
|
+
permissionsDb?: Kysely<DocumentPermissionDatabase>;
|
|
4978
5360
|
}
|
|
4979
5361
|
export interface ClientInitializerDependencies {
|
|
4980
5362
|
attachmentReferenceWriter: IAttachmentReferenceWriter;
|
|
4981
5363
|
/** Upgrade manifests exported by the loaded packages, one per type. */
|
|
4982
5364
|
upgradeManifests: UpgradeManifest<readonly number[]>[];
|
|
5365
|
+
/** The read-model store, for moving data that used to live there. */
|
|
5366
|
+
readModelDb: Kysely<unknown>;
|
|
4983
5367
|
}
|
|
5368
|
+
/**
|
|
5369
|
+
* The permission cache TTL from `DOCUMENT_PERMISSION_CACHE_TTL_MS`: a
|
|
5370
|
+
* non-negative integer of milliseconds, 0 disabling the cache. Anything else
|
|
5371
|
+
* falls back to the default with a warning.
|
|
5372
|
+
*/
|
|
5373
|
+
export declare function resolvePermissionCacheTtlMs(raw: string | undefined, logger: ILogger): number;
|
|
4984
5374
|
export declare function initializeAndStartAPI(clientInitializer: (documentModels: DocumentModelModule[], dependencies: ClientInitializerDependencies) => Promise<ClientInitializerResult>, options: Options, processorApp: ProcessorApp): Promise<API & {
|
|
5375
|
+
/** @deprecated Use `read` and `write`. */
|
|
4985
5376
|
client: IReactorClient;
|
|
5377
|
+
read: IReactorReadClient;
|
|
5378
|
+
write: IReactorWriteClient;
|
|
4986
5379
|
syncManager: ISyncManager;
|
|
4987
5380
|
documentModelRegistry: IDocumentModelRegistry;
|
|
4988
5381
|
readiness: ReadinessGate;
|
|
@@ -5018,6 +5411,6 @@ export declare class PrivacyPermissionAdapter {
|
|
|
5018
5411
|
erasePermissions(documentId: string): Promise<Record<string, number>>;
|
|
5019
5412
|
}
|
|
5020
5413
|
//#endregion
|
|
5021
|
-
export { type AttachmentReadGate, type AuthorizationConfig, type AuthorizerResult, type CanonicalDocumentId, DocumentModelSchema, DocumentModelSchemaCache, DocumentModelSchemaOptions, DocumentModelSource, GeneratedDocumentModelTypes, type HttpRouteServiceOptions, type IAuthorizationService, type IDocumentScopeGate, type IEventLoopDelaySource, type IHttpScope, type IPackageLoader, type IPackageLoaderOptions, type IPackagePieceSource, type IReactorInspectionSource, type IWebhookEndpoints, type IWebhookScope, type IWebhookStore, type InspectionCallerGate, type InspectionReadField, type InspectionThrottleConfig, type NodeRouteSpec, PGLITE_UTC_PARSERS, type PackagePiece, type PackagePieceEntry, type PackagesSubgraphArgs, type ParsedDriveUrl, type ReactorInspectionOptions, ReportError, type RequestLoadRecorderOptions, ReservedTypeNames, ResolvedDocumentModelSchema, type RouteActor, type RouteAuth, type RouteAuthorizer, type RouteBody, type RouteContext, type RouteHandler, type RouteMethod, type RouteOptions, type RouteSpec, type RouteTransport, type RouteUser, RunDetachedOptions, type ScopedRouteHandle, SubgraphSchemaOptions, SubgraphTypeCollisionError, type WebhookEndpointInfo, type WebhookEndpointRow, type WebhookField, type WebhookHashAlgorithm, type WebhookPolicy, type WebhookReply, type WebhookRequest, type WebhookScheme, type WebhookSignatureEncoding, type WebhookSpec, type WebhookVerification, assembleSubgraphTypeDefs, buildDocumentModelSchema, buildSubgraphSchemaModule, createMergedSchema, createSchema, documentModelSubgraphTypes, driveIdFromUrl, findSubgraphTypeCollisions, generateDocumentModelSchema, generatedTypesOf, getDocumentModelSchemaName, getDocumentModelSubgraphName, getDocumentModelTypeDefs, getGeneratedDocumentModelTypes, hasOperationSchemas, parseDriveUrl, reportFailure, reservedTypeNames, reservedTypeNamesTaken, runDetached, typeDefinitionNames };
|
|
5414
|
+
export { type AttachmentReadGate, type AuthorizationConfig, type AuthorizerResult, type CanonicalDocumentId, DocumentModelSchema, DocumentModelSchemaCache, DocumentModelSchemaOptions, DocumentModelSource, GeneratedDocumentModelTypes, type HttpRouteServiceOptions, type IAuthorizationService, type IDocumentScopeGate, type IEventLoopDelaySource, type IHttpScope, type IPackageLoader, type IPackageLoaderOptions, type IPackagePieceSource, type IReactorInspectionSource, type IWebhookEndpoints, type IWebhookScope, type IWebhookStore, type InspectionCallerGate, type InspectionReadField, type InspectionThrottleConfig, type NodeRouteSpec, PGLITE_UTC_PARSERS, type PackagePiece, type PackagePieceEntry, type PackagesSubgraphArgs, type ParsedDriveUrl, type PublicOrigin, type ReactorInspectionOptions, ReportError, type RequestClients, type RequestLoadRecorderOptions, ReservedTypeNames, ResolvedDocumentModelSchema, type RouteActor, type RouteAuth, type RouteAuthorizer, type RouteBody, type RouteContext, type RouteHandler, type RouteMethod, type RouteOptions, type RouteSpec, type RouteTransport, type RouteUser, RunDetachedOptions, type ScopedRouteHandle, SubgraphSchemaOptions, SubgraphTypeCollisionError, type WebhookEndpointInfo, type WebhookEndpointRow, type WebhookField, type WebhookHashAlgorithm, type WebhookPolicy, type WebhookReply, type WebhookRequest, type WebhookScheme, type WebhookSignatureEncoding, type WebhookSpec, type WebhookVerification, assembleSubgraphTypeDefs, buildDocumentModelSchema, buildSubgraphSchemaModule, createMergedSchema, createSchema, documentModelSubgraphTypes, driveIdFromUrl, findSubgraphTypeCollisions, generateDocumentModelSchema, generatedTypesOf, getDocumentModelSchemaName, getDocumentModelSubgraphName, getDocumentModelTypeDefs, getGeneratedDocumentModelTypes, hasOperationSchemas, parseDriveUrl, reportFailure, reservedTypeNames, reservedTypeNamesTaken, runDetached, typeDefinitionNames };
|
|
5022
5415
|
export {};
|
|
5023
5416
|
//# sourceMappingURL=index.d.mts.map
|