@powerhousedao/reactor-api 6.0.2-staging.4 → 6.0.2-staging.6
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/index.d.mts +150 -79
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +293 -134
- package/dist/index.mjs.map +1 -1
- package/dist/src/packages/vite-loader.mjs +1 -1
- package/dist/{utils-DEEhP99G.mjs → utils-CVrD_vPF.mjs} +3 -2
- package/dist/utils-CVrD_vPF.mjs.map +1 -0
- package/package.json +11 -10
- package/dist/utils-DEEhP99G.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -10,6 +10,7 @@ import { DocumentModelGlobalState as DocumentModelGlobalState$1, DocumentModelMo
|
|
|
10
10
|
import { IDocumentModelLoader, IDocumentModelRegistry, IReactorClient, IRelationalDb, ISyncManager, ParsedDriveUrl, ReactorClientModule, driveIdFromUrl, parseDriveUrl } from "@powerhousedao/reactor";
|
|
11
11
|
import * as z$1 from "zod";
|
|
12
12
|
import { DocumentDriveDocument, DocumentDriveGlobalState } from "@powerhousedao/shared/document-drive";
|
|
13
|
+
import { AttachmentBuildResult } from "@powerhousedao/reactor-attachments";
|
|
13
14
|
import { WebSocketServer } from "ws";
|
|
14
15
|
import { IProcessorHostModule, IRelationalDb as IRelationalDb$1, ProcessorApp, ProcessorRecord } from "@powerhousedao/shared/processors";
|
|
15
16
|
import { Generated, Kysely } from "kysely";
|
|
@@ -94,9 +95,17 @@ interface OperationGroupPermissionTable {
|
|
|
94
95
|
createdAt: Date;
|
|
95
96
|
}
|
|
96
97
|
type Db = Kysely<any>;
|
|
97
|
-
|
|
98
|
+
/**
|
|
99
|
+
* Optional factory used by callers (e.g. Switchboard) to inject a
|
|
100
|
+
* version-specific PGLite instance — e.g. `pglite-legacy-02` when an existing
|
|
101
|
+
* data dir was created with an older PG major. Wire-compatible with the
|
|
102
|
+
* current PGLite class for the surface knex-pglite uses.
|
|
103
|
+
*/
|
|
104
|
+
type PgliteFactory = (connectionString: string | undefined) => PGlite;
|
|
105
|
+
declare function getDbClient(connectionString?: string | undefined, pgliteFactory?: PgliteFactory): {
|
|
98
106
|
db: Db;
|
|
99
107
|
knex: Knex;
|
|
108
|
+
pglite: PGlite | undefined;
|
|
100
109
|
};
|
|
101
110
|
declare const initAnalyticsStoreSql: string[];
|
|
102
111
|
//#endregion
|
|
@@ -817,6 +826,11 @@ declare class AuthService {
|
|
|
817
826
|
private readonly config;
|
|
818
827
|
constructor(config: AuthConfig);
|
|
819
828
|
authenticateRequest(request: globalThis.Request): Promise<AuthContext | globalThis.Response>;
|
|
829
|
+
/**
|
|
830
|
+
* Verify a Bearer token regardless of HTTP method. Use this from non-GraphQL
|
|
831
|
+
* middleware that must enforce authentication on every request.
|
|
832
|
+
*/
|
|
833
|
+
verifyBearer(authorization: string | undefined): Promise<AuthContext | globalThis.Response>;
|
|
820
834
|
authenticateWebSocketConnection(connectionParams: Record<string, unknown>): Promise<User | null>;
|
|
821
835
|
/**
|
|
822
836
|
* Verify the auth bearer token
|
|
@@ -935,7 +949,7 @@ interface IHttpAdapter {
|
|
|
935
949
|
* The req/res objects are `http.IncomingMessage`/`http.ServerResponse`
|
|
936
950
|
* (Express Request/Response are compatible subtypes).
|
|
937
951
|
*/
|
|
938
|
-
mountNodeRoute(method: "DELETE" | "GET" | "POST", path: string, handler: (req: http.IncomingMessage, res: http.ServerResponse, body?: unknown) => void): void;
|
|
952
|
+
mountNodeRoute(method: "DELETE" | "GET" | "POST" | "PUT", path: string, handler: (req: http.IncomingMessage, res: http.ServerResponse, body?: unknown) => void): void;
|
|
939
953
|
/**
|
|
940
954
|
* Register framework-specific Sentry error-capturing middleware after all routes
|
|
941
955
|
* are mounted. Each adapter calls the Sentry setup function appropriate for its
|
|
@@ -1046,6 +1060,16 @@ type API = {
|
|
|
1046
1060
|
httpAdapter: IHttpAdapter;
|
|
1047
1061
|
graphqlManager: GraphQLManager$1;
|
|
1048
1062
|
packages: IPackageManager;
|
|
1063
|
+
attachments: AttachmentBuildResult;
|
|
1064
|
+
authService: AuthService | undefined;
|
|
1065
|
+
/**
|
|
1066
|
+
* Releases resources owned by the API: shuts down the GraphQL gateway,
|
|
1067
|
+
* closes WebSocket and HTTP servers, destroys knex pools, and closes any
|
|
1068
|
+
* PGlite instances created via {@link getDbClient}. Safe to call once;
|
|
1069
|
+
* intended to be wired into the reactor's shutdown chain via
|
|
1070
|
+
* `ReactorBuilder.withShutdownHook`.
|
|
1071
|
+
*/
|
|
1072
|
+
dispose: () => Promise<void>;
|
|
1049
1073
|
};
|
|
1050
1074
|
type ReactorModule = {
|
|
1051
1075
|
analyticsStore: IAnalyticsStore;
|
|
@@ -1361,28 +1385,29 @@ type JobInfo = {
|
|
|
1361
1385
|
readonly result: Scalars["JSONObject"]["output"];
|
|
1362
1386
|
readonly status: Scalars["String"]["output"];
|
|
1363
1387
|
};
|
|
1364
|
-
type
|
|
1388
|
+
type MoveRelationshipResult = {
|
|
1365
1389
|
readonly source: PhDocument;
|
|
1366
1390
|
readonly target: PhDocument;
|
|
1367
1391
|
};
|
|
1368
1392
|
type Mutation = {
|
|
1369
|
-
readonly
|
|
1393
|
+
readonly addRelationship: PhDocument;
|
|
1370
1394
|
readonly createDocument: PhDocument;
|
|
1371
1395
|
readonly createEmptyDocument: PhDocument;
|
|
1372
1396
|
readonly deleteDocument: Scalars["Boolean"]["output"];
|
|
1373
1397
|
readonly deleteDocuments: Scalars["Boolean"]["output"];
|
|
1374
|
-
readonly
|
|
1398
|
+
readonly moveRelationship: MoveRelationshipResult;
|
|
1375
1399
|
readonly mutateDocument: PhDocument;
|
|
1376
1400
|
readonly mutateDocumentAsync: Scalars["String"]["output"];
|
|
1377
1401
|
readonly pushSyncEnvelopes: Scalars["Boolean"]["output"];
|
|
1378
|
-
readonly
|
|
1402
|
+
readonly removeRelationship: PhDocument;
|
|
1379
1403
|
readonly renameDocument: PhDocument;
|
|
1380
1404
|
readonly touchChannel: TouchChannelResult;
|
|
1381
1405
|
};
|
|
1382
|
-
type
|
|
1406
|
+
type MutationAddRelationshipArgs = {
|
|
1383
1407
|
branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
1384
|
-
|
|
1385
|
-
|
|
1408
|
+
relationshipType: Scalars["String"]["input"];
|
|
1409
|
+
sourceIdentifier: Scalars["String"]["input"];
|
|
1410
|
+
targetIdentifier: Scalars["String"]["input"];
|
|
1386
1411
|
};
|
|
1387
1412
|
type MutationCreateDocumentArgs = {
|
|
1388
1413
|
document: Scalars["JSONObject"]["input"];
|
|
@@ -1400,10 +1425,11 @@ type MutationDeleteDocumentsArgs = {
|
|
|
1400
1425
|
identifiers: ReadonlyArray<Scalars["String"]["input"]>;
|
|
1401
1426
|
propagate?: InputMaybe<PropagationMode>;
|
|
1402
1427
|
};
|
|
1403
|
-
type
|
|
1428
|
+
type MutationMoveRelationshipArgs = {
|
|
1404
1429
|
branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
1405
|
-
|
|
1430
|
+
relationshipType: Scalars["String"]["input"];
|
|
1406
1431
|
sourceParentIdentifier: Scalars["String"]["input"];
|
|
1432
|
+
targetIdentifier: Scalars["String"]["input"];
|
|
1407
1433
|
targetParentIdentifier: Scalars["String"]["input"];
|
|
1408
1434
|
};
|
|
1409
1435
|
type MutationMutateDocumentArgs = {
|
|
@@ -1419,10 +1445,11 @@ type MutationMutateDocumentAsyncArgs = {
|
|
|
1419
1445
|
type MutationPushSyncEnvelopesArgs = {
|
|
1420
1446
|
envelopes: ReadonlyArray<SyncEnvelopeInput>;
|
|
1421
1447
|
};
|
|
1422
|
-
type
|
|
1448
|
+
type MutationRemoveRelationshipArgs = {
|
|
1423
1449
|
branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
1424
|
-
|
|
1425
|
-
|
|
1450
|
+
relationshipType: Scalars["String"]["input"];
|
|
1451
|
+
sourceIdentifier: Scalars["String"]["input"];
|
|
1452
|
+
targetIdentifier: Scalars["String"]["input"];
|
|
1426
1453
|
};
|
|
1427
1454
|
type MutationRenameDocumentArgs = {
|
|
1428
1455
|
branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
@@ -1512,10 +1539,10 @@ declare enum PropagationMode {
|
|
|
1512
1539
|
}
|
|
1513
1540
|
type Query = {
|
|
1514
1541
|
readonly document?: Maybe<DocumentWithChildren>;
|
|
1515
|
-
readonly
|
|
1542
|
+
readonly documentIncomingRelationships: PhDocumentResultPage;
|
|
1516
1543
|
readonly documentModels: DocumentModelResultPage;
|
|
1517
1544
|
readonly documentOperations: ReactorOperationResultPage;
|
|
1518
|
-
readonly
|
|
1545
|
+
readonly documentOutgoingRelationships: PhDocumentResultPage;
|
|
1519
1546
|
readonly findDocuments: PhDocumentResultPage;
|
|
1520
1547
|
readonly jobStatus?: Maybe<JobInfo>;
|
|
1521
1548
|
readonly pollSyncEnvelopes: PollSyncEnvelopesResult;
|
|
@@ -1524,9 +1551,10 @@ type QueryDocumentArgs = {
|
|
|
1524
1551
|
identifier: Scalars["String"]["input"];
|
|
1525
1552
|
view?: InputMaybe<ViewFilterInput>;
|
|
1526
1553
|
};
|
|
1527
|
-
type
|
|
1554
|
+
type QueryDocumentIncomingRelationshipsArgs = {
|
|
1528
1555
|
paging?: InputMaybe<PagingInput>;
|
|
1529
|
-
|
|
1556
|
+
relationshipType: Scalars["String"]["input"];
|
|
1557
|
+
targetIdentifier: Scalars["String"]["input"];
|
|
1530
1558
|
view?: InputMaybe<ViewFilterInput>;
|
|
1531
1559
|
};
|
|
1532
1560
|
type QueryDocumentModelsArgs = {
|
|
@@ -1537,9 +1565,10 @@ type QueryDocumentOperationsArgs = {
|
|
|
1537
1565
|
filter: OperationsFilterInput;
|
|
1538
1566
|
paging?: InputMaybe<PagingInput>;
|
|
1539
1567
|
};
|
|
1540
|
-
type
|
|
1541
|
-
childIdentifier: Scalars["String"]["input"];
|
|
1568
|
+
type QueryDocumentOutgoingRelationshipsArgs = {
|
|
1542
1569
|
paging?: InputMaybe<PagingInput>;
|
|
1570
|
+
relationshipType: Scalars["String"]["input"];
|
|
1571
|
+
sourceIdentifier: Scalars["String"]["input"];
|
|
1543
1572
|
view?: InputMaybe<ViewFilterInput>;
|
|
1544
1573
|
};
|
|
1545
1574
|
type QueryFindDocumentsArgs = {
|
|
@@ -1789,13 +1818,14 @@ type GetDocumentWithOperationsQuery = {
|
|
|
1789
1818
|
};
|
|
1790
1819
|
} | null | undefined;
|
|
1791
1820
|
};
|
|
1792
|
-
type
|
|
1793
|
-
|
|
1821
|
+
type GetDocumentOutgoingRelationshipsQueryVariables = Exact<{
|
|
1822
|
+
sourceIdentifier: Scalars["String"]["input"];
|
|
1823
|
+
relationshipType: Scalars["String"]["input"];
|
|
1794
1824
|
view?: InputMaybe<ViewFilterInput>;
|
|
1795
1825
|
paging?: InputMaybe<PagingInput>;
|
|
1796
1826
|
}>;
|
|
1797
|
-
type
|
|
1798
|
-
readonly
|
|
1827
|
+
type GetDocumentOutgoingRelationshipsQuery = {
|
|
1828
|
+
readonly documentOutgoingRelationships: {
|
|
1799
1829
|
readonly totalCount: number;
|
|
1800
1830
|
readonly hasNextPage: boolean;
|
|
1801
1831
|
readonly hasPreviousPage: boolean;
|
|
@@ -1815,13 +1845,14 @@ type GetDocumentChildrenQuery = {
|
|
|
1815
1845
|
}>;
|
|
1816
1846
|
};
|
|
1817
1847
|
};
|
|
1818
|
-
type
|
|
1819
|
-
|
|
1848
|
+
type GetDocumentIncomingRelationshipsQueryVariables = Exact<{
|
|
1849
|
+
targetIdentifier: Scalars["String"]["input"];
|
|
1850
|
+
relationshipType: Scalars["String"]["input"];
|
|
1820
1851
|
view?: InputMaybe<ViewFilterInput>;
|
|
1821
1852
|
paging?: InputMaybe<PagingInput>;
|
|
1822
1853
|
}>;
|
|
1823
|
-
type
|
|
1824
|
-
readonly
|
|
1854
|
+
type GetDocumentIncomingRelationshipsQuery = {
|
|
1855
|
+
readonly documentIncomingRelationships: {
|
|
1825
1856
|
readonly totalCount: number;
|
|
1826
1857
|
readonly hasNextPage: boolean;
|
|
1827
1858
|
readonly hasPreviousPage: boolean;
|
|
@@ -2014,13 +2045,14 @@ type RenameDocumentMutation = {
|
|
|
2014
2045
|
}>;
|
|
2015
2046
|
};
|
|
2016
2047
|
};
|
|
2017
|
-
type
|
|
2018
|
-
|
|
2019
|
-
|
|
2048
|
+
type AddRelationshipMutationVariables = Exact<{
|
|
2049
|
+
sourceIdentifier: Scalars["String"]["input"];
|
|
2050
|
+
targetIdentifier: Scalars["String"]["input"];
|
|
2051
|
+
relationshipType: Scalars["String"]["input"];
|
|
2020
2052
|
branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
2021
2053
|
}>;
|
|
2022
|
-
type
|
|
2023
|
-
readonly
|
|
2054
|
+
type AddRelationshipMutation = {
|
|
2055
|
+
readonly addRelationship: {
|
|
2024
2056
|
readonly id: string;
|
|
2025
2057
|
readonly slug?: string | null | undefined;
|
|
2026
2058
|
readonly name: string;
|
|
@@ -2034,13 +2066,14 @@ type AddChildrenMutation = {
|
|
|
2034
2066
|
}>;
|
|
2035
2067
|
};
|
|
2036
2068
|
};
|
|
2037
|
-
type
|
|
2038
|
-
|
|
2039
|
-
|
|
2069
|
+
type RemoveRelationshipMutationVariables = Exact<{
|
|
2070
|
+
sourceIdentifier: Scalars["String"]["input"];
|
|
2071
|
+
targetIdentifier: Scalars["String"]["input"];
|
|
2072
|
+
relationshipType: Scalars["String"]["input"];
|
|
2040
2073
|
branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
2041
2074
|
}>;
|
|
2042
|
-
type
|
|
2043
|
-
readonly
|
|
2075
|
+
type RemoveRelationshipMutation = {
|
|
2076
|
+
readonly removeRelationship: {
|
|
2044
2077
|
readonly id: string;
|
|
2045
2078
|
readonly slug?: string | null | undefined;
|
|
2046
2079
|
readonly name: string;
|
|
@@ -2054,14 +2087,15 @@ type RemoveChildrenMutation = {
|
|
|
2054
2087
|
}>;
|
|
2055
2088
|
};
|
|
2056
2089
|
};
|
|
2057
|
-
type
|
|
2090
|
+
type MoveRelationshipMutationVariables = Exact<{
|
|
2058
2091
|
sourceParentIdentifier: Scalars["String"]["input"];
|
|
2059
2092
|
targetParentIdentifier: Scalars["String"]["input"];
|
|
2060
|
-
|
|
2093
|
+
targetIdentifier: Scalars["String"]["input"];
|
|
2094
|
+
relationshipType: Scalars["String"]["input"];
|
|
2061
2095
|
branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
2062
2096
|
}>;
|
|
2063
|
-
type
|
|
2064
|
-
readonly
|
|
2097
|
+
type MoveRelationshipMutation = {
|
|
2098
|
+
readonly moveRelationship: {
|
|
2065
2099
|
readonly source: {
|
|
2066
2100
|
readonly id: string;
|
|
2067
2101
|
readonly slug?: string | null | undefined;
|
|
@@ -2276,7 +2310,7 @@ type ResolversTypes = ResolversObject<{
|
|
|
2276
2310
|
JSONObject: ResolverTypeWrapper<Scalars["JSONObject"]["output"]>;
|
|
2277
2311
|
JobChangeEvent: ResolverTypeWrapper<JobChangeEvent>;
|
|
2278
2312
|
JobInfo: ResolverTypeWrapper<JobInfo>;
|
|
2279
|
-
|
|
2313
|
+
MoveRelationshipResult: ResolverTypeWrapper<MoveRelationshipResult>;
|
|
2280
2314
|
Mutation: ResolverTypeWrapper<Record<PropertyKey, never>>;
|
|
2281
2315
|
OperationContext: ResolverTypeWrapper<OperationContext>;
|
|
2282
2316
|
OperationContextInput: OperationContextInput;
|
|
@@ -2335,7 +2369,7 @@ type ResolversParentTypes = ResolversObject<{
|
|
|
2335
2369
|
JSONObject: Scalars["JSONObject"]["output"];
|
|
2336
2370
|
JobChangeEvent: JobChangeEvent;
|
|
2337
2371
|
JobInfo: JobInfo;
|
|
2338
|
-
|
|
2372
|
+
MoveRelationshipResult: MoveRelationshipResult;
|
|
2339
2373
|
Mutation: Record<PropertyKey, never>;
|
|
2340
2374
|
OperationContext: OperationContext;
|
|
2341
2375
|
OperationContextInput: OperationContextInput;
|
|
@@ -2446,21 +2480,21 @@ type JobInfoResolvers<ContextType = Context, ParentType extends ResolversParentT
|
|
|
2446
2480
|
result?: Resolver<ResolversTypes["JSONObject"], ParentType, ContextType>;
|
|
2447
2481
|
status?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2448
2482
|
}>;
|
|
2449
|
-
type
|
|
2483
|
+
type MoveRelationshipResultResolvers<ContextType = Context, ParentType extends ResolversParentTypes["MoveRelationshipResult"] = ResolversParentTypes["MoveRelationshipResult"]> = ResolversObject<{
|
|
2450
2484
|
source?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType>;
|
|
2451
2485
|
target?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType>;
|
|
2452
2486
|
}>;
|
|
2453
2487
|
type MutationResolvers<ContextType = Context, ParentType extends ResolversParentTypes["Mutation"] = ResolversParentTypes["Mutation"]> = ResolversObject<{
|
|
2454
|
-
|
|
2488
|
+
addRelationship?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType, RequireFields<MutationAddRelationshipArgs, "relationshipType" | "sourceIdentifier" | "targetIdentifier">>;
|
|
2455
2489
|
createDocument?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType, RequireFields<MutationCreateDocumentArgs, "document">>;
|
|
2456
2490
|
createEmptyDocument?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType, RequireFields<MutationCreateEmptyDocumentArgs, "documentType">>;
|
|
2457
2491
|
deleteDocument?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType, RequireFields<MutationDeleteDocumentArgs, "identifier">>;
|
|
2458
2492
|
deleteDocuments?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType, RequireFields<MutationDeleteDocumentsArgs, "identifiers">>;
|
|
2459
|
-
|
|
2493
|
+
moveRelationship?: Resolver<ResolversTypes["MoveRelationshipResult"], ParentType, ContextType, RequireFields<MutationMoveRelationshipArgs, "relationshipType" | "sourceParentIdentifier" | "targetIdentifier" | "targetParentIdentifier">>;
|
|
2460
2494
|
mutateDocument?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType, RequireFields<MutationMutateDocumentArgs, "actions" | "documentIdentifier">>;
|
|
2461
2495
|
mutateDocumentAsync?: Resolver<ResolversTypes["String"], ParentType, ContextType, RequireFields<MutationMutateDocumentAsyncArgs, "actions" | "documentIdentifier">>;
|
|
2462
2496
|
pushSyncEnvelopes?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType, RequireFields<MutationPushSyncEnvelopesArgs, "envelopes">>;
|
|
2463
|
-
|
|
2497
|
+
removeRelationship?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType, RequireFields<MutationRemoveRelationshipArgs, "relationshipType" | "sourceIdentifier" | "targetIdentifier">>;
|
|
2464
2498
|
renameDocument?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType, RequireFields<MutationRenameDocumentArgs, "documentIdentifier" | "name">>;
|
|
2465
2499
|
touchChannel?: Resolver<ResolversTypes["TouchChannelResult"], ParentType, ContextType, RequireFields<MutationTouchChannelArgs, "input">>;
|
|
2466
2500
|
}>;
|
|
@@ -2502,10 +2536,10 @@ type PollSyncEnvelopesResultResolvers<ContextType = Context, ParentType extends
|
|
|
2502
2536
|
}>;
|
|
2503
2537
|
type QueryResolvers<ContextType = Context, ParentType extends ResolversParentTypes["Query"] = ResolversParentTypes["Query"]> = ResolversObject<{
|
|
2504
2538
|
document?: Resolver<Maybe<ResolversTypes["DocumentWithChildren"]>, ParentType, ContextType, RequireFields<QueryDocumentArgs, "identifier">>;
|
|
2505
|
-
|
|
2539
|
+
documentIncomingRelationships?: Resolver<ResolversTypes["PHDocumentResultPage"], ParentType, ContextType, RequireFields<QueryDocumentIncomingRelationshipsArgs, "relationshipType" | "targetIdentifier">>;
|
|
2506
2540
|
documentModels?: Resolver<ResolversTypes["DocumentModelResultPage"], ParentType, ContextType, Partial<QueryDocumentModelsArgs>>;
|
|
2507
2541
|
documentOperations?: Resolver<ResolversTypes["ReactorOperationResultPage"], ParentType, ContextType, RequireFields<QueryDocumentOperationsArgs, "filter">>;
|
|
2508
|
-
|
|
2542
|
+
documentOutgoingRelationships?: Resolver<ResolversTypes["PHDocumentResultPage"], ParentType, ContextType, RequireFields<QueryDocumentOutgoingRelationshipsArgs, "relationshipType" | "sourceIdentifier">>;
|
|
2509
2543
|
findDocuments?: Resolver<ResolversTypes["PHDocumentResultPage"], ParentType, ContextType, Partial<QueryFindDocumentsArgs>>;
|
|
2510
2544
|
jobStatus?: Resolver<Maybe<ResolversTypes["JobInfo"]>, ParentType, ContextType, RequireFields<QueryJobStatusArgs, "jobId">>;
|
|
2511
2545
|
pollSyncEnvelopes?: Resolver<ResolversTypes["PollSyncEnvelopesResult"], ParentType, ContextType, RequireFields<QueryPollSyncEnvelopesArgs, "channelId" | "outboxAck" | "outboxLatest">>;
|
|
@@ -2580,7 +2614,7 @@ type Resolvers<ContextType = Context> = ResolversObject<{
|
|
|
2580
2614
|
JSONObject?: GraphQLScalarType;
|
|
2581
2615
|
JobChangeEvent?: JobChangeEventResolvers<ContextType>;
|
|
2582
2616
|
JobInfo?: JobInfoResolvers<ContextType>;
|
|
2583
|
-
|
|
2617
|
+
MoveRelationshipResult?: MoveRelationshipResultResolvers<ContextType>;
|
|
2584
2618
|
Mutation?: MutationResolvers<ContextType>;
|
|
2585
2619
|
OperationContext?: OperationContextResolvers<ContextType>;
|
|
2586
2620
|
OperationWithContext?: OperationWithContextResolvers<ContextType>;
|
|
@@ -2629,8 +2663,8 @@ declare const PhDocumentFieldsFragmentDoc: DocumentNode;
|
|
|
2629
2663
|
declare const GetDocumentModelsDocument: DocumentNode;
|
|
2630
2664
|
declare const GetDocumentDocument: DocumentNode;
|
|
2631
2665
|
declare const GetDocumentWithOperationsDocument: DocumentNode;
|
|
2632
|
-
declare const
|
|
2633
|
-
declare const
|
|
2666
|
+
declare const GetDocumentOutgoingRelationshipsDocument: DocumentNode;
|
|
2667
|
+
declare const GetDocumentIncomingRelationshipsDocument: DocumentNode;
|
|
2634
2668
|
declare const FindDocumentsDocument: DocumentNode;
|
|
2635
2669
|
declare const GetDocumentOperationsDocument: DocumentNode;
|
|
2636
2670
|
declare const GetJobStatusDocument: DocumentNode;
|
|
@@ -2639,9 +2673,9 @@ declare const CreateEmptyDocumentDocument: DocumentNode;
|
|
|
2639
2673
|
declare const MutateDocumentDocument: DocumentNode;
|
|
2640
2674
|
declare const MutateDocumentAsyncDocument: DocumentNode;
|
|
2641
2675
|
declare const RenameDocumentDocument: DocumentNode;
|
|
2642
|
-
declare const
|
|
2643
|
-
declare const
|
|
2644
|
-
declare const
|
|
2676
|
+
declare const AddRelationshipDocument: DocumentNode;
|
|
2677
|
+
declare const RemoveRelationshipDocument: DocumentNode;
|
|
2678
|
+
declare const MoveRelationshipDocument: DocumentNode;
|
|
2645
2679
|
declare const DeleteDocumentDocument: DocumentNode;
|
|
2646
2680
|
declare const DeleteDocumentsDocument: DocumentNode;
|
|
2647
2681
|
declare const DocumentChangesDocument: DocumentNode;
|
|
@@ -2654,8 +2688,8 @@ declare function getSdk<C>(requester: Requester<C>): {
|
|
|
2654
2688
|
GetDocumentModels(variables?: GetDocumentModelsQueryVariables, options?: C): Promise<GetDocumentModelsQuery>;
|
|
2655
2689
|
GetDocument(variables: GetDocumentQueryVariables, options?: C): Promise<GetDocumentQuery>;
|
|
2656
2690
|
GetDocumentWithOperations(variables: GetDocumentWithOperationsQueryVariables, options?: C): Promise<GetDocumentWithOperationsQuery>;
|
|
2657
|
-
|
|
2658
|
-
|
|
2691
|
+
GetDocumentOutgoingRelationships(variables: GetDocumentOutgoingRelationshipsQueryVariables, options?: C): Promise<GetDocumentOutgoingRelationshipsQuery>;
|
|
2692
|
+
GetDocumentIncomingRelationships(variables: GetDocumentIncomingRelationshipsQueryVariables, options?: C): Promise<GetDocumentIncomingRelationshipsQuery>;
|
|
2659
2693
|
FindDocuments(variables?: FindDocumentsQueryVariables, options?: C): Promise<FindDocumentsQuery>;
|
|
2660
2694
|
GetDocumentOperations(variables: GetDocumentOperationsQueryVariables, options?: C): Promise<GetDocumentOperationsQuery>;
|
|
2661
2695
|
GetJobStatus(variables: GetJobStatusQueryVariables, options?: C): Promise<GetJobStatusQuery>;
|
|
@@ -2664,9 +2698,9 @@ declare function getSdk<C>(requester: Requester<C>): {
|
|
|
2664
2698
|
MutateDocument(variables: MutateDocumentMutationVariables, options?: C): Promise<MutateDocumentMutation>;
|
|
2665
2699
|
MutateDocumentAsync(variables: MutateDocumentAsyncMutationVariables, options?: C): Promise<MutateDocumentAsyncMutation>;
|
|
2666
2700
|
RenameDocument(variables: RenameDocumentMutationVariables, options?: C): Promise<RenameDocumentMutation>;
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2701
|
+
AddRelationship(variables: AddRelationshipMutationVariables, options?: C): Promise<AddRelationshipMutation>;
|
|
2702
|
+
RemoveRelationship(variables: RemoveRelationshipMutationVariables, options?: C): Promise<RemoveRelationshipMutation>;
|
|
2703
|
+
MoveRelationship(variables: MoveRelationshipMutationVariables, options?: C): Promise<MoveRelationshipMutation>;
|
|
2670
2704
|
DeleteDocument(variables: DeleteDocumentMutationVariables, options?: C): Promise<DeleteDocumentMutation>;
|
|
2671
2705
|
DeleteDocuments(variables: DeleteDocumentsMutationVariables, options?: C): Promise<DeleteDocumentsMutation>;
|
|
2672
2706
|
DocumentChanges(variables?: DocumentChangesSubscriptionVariables, options?: C): AsyncIterable<DocumentChangesSubscription>;
|
|
@@ -2696,16 +2730,18 @@ declare function createReactorGraphQLClient(url: string, fetchImpl?: FetchLike,
|
|
|
2696
2730
|
operationsFilter?: InputMaybe<DocumentOperationsFilterInput>;
|
|
2697
2731
|
operationsPaging?: InputMaybe<PagingInput>;
|
|
2698
2732
|
}>, options?: {} | undefined): Promise<GetDocumentWithOperationsQuery>;
|
|
2699
|
-
|
|
2700
|
-
|
|
2733
|
+
GetDocumentOutgoingRelationships(variables: Exact<{
|
|
2734
|
+
sourceIdentifier: Scalars["String"]["input"];
|
|
2735
|
+
relationshipType: Scalars["String"]["input"];
|
|
2701
2736
|
view?: InputMaybe<ViewFilterInput>;
|
|
2702
2737
|
paging?: InputMaybe<PagingInput>;
|
|
2703
|
-
}>, options?: {} | undefined): Promise<
|
|
2704
|
-
|
|
2705
|
-
|
|
2738
|
+
}>, options?: {} | undefined): Promise<GetDocumentOutgoingRelationshipsQuery>;
|
|
2739
|
+
GetDocumentIncomingRelationships(variables: Exact<{
|
|
2740
|
+
targetIdentifier: Scalars["String"]["input"];
|
|
2741
|
+
relationshipType: Scalars["String"]["input"];
|
|
2706
2742
|
view?: InputMaybe<ViewFilterInput>;
|
|
2707
2743
|
paging?: InputMaybe<PagingInput>;
|
|
2708
|
-
}>, options?: {} | undefined): Promise<
|
|
2744
|
+
}>, options?: {} | undefined): Promise<GetDocumentIncomingRelationshipsQuery>;
|
|
2709
2745
|
FindDocuments(variables?: Exact<{
|
|
2710
2746
|
search?: InputMaybe<SearchFilterInput>;
|
|
2711
2747
|
view?: InputMaybe<ViewFilterInput>;
|
|
@@ -2741,22 +2777,25 @@ declare function createReactorGraphQLClient(url: string, fetchImpl?: FetchLike,
|
|
|
2741
2777
|
name: Scalars["String"]["input"];
|
|
2742
2778
|
branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
2743
2779
|
}>, options?: {} | undefined): Promise<RenameDocumentMutation>;
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2780
|
+
AddRelationship(variables: Exact<{
|
|
2781
|
+
sourceIdentifier: Scalars["String"]["input"];
|
|
2782
|
+
targetIdentifier: Scalars["String"]["input"];
|
|
2783
|
+
relationshipType: Scalars["String"]["input"];
|
|
2747
2784
|
branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
2748
|
-
}>, options?: {} | undefined): Promise<
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2785
|
+
}>, options?: {} | undefined): Promise<AddRelationshipMutation>;
|
|
2786
|
+
RemoveRelationship(variables: Exact<{
|
|
2787
|
+
sourceIdentifier: Scalars["String"]["input"];
|
|
2788
|
+
targetIdentifier: Scalars["String"]["input"];
|
|
2789
|
+
relationshipType: Scalars["String"]["input"];
|
|
2752
2790
|
branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
2753
|
-
}>, options?: {} | undefined): Promise<
|
|
2754
|
-
|
|
2791
|
+
}>, options?: {} | undefined): Promise<RemoveRelationshipMutation>;
|
|
2792
|
+
MoveRelationship(variables: Exact<{
|
|
2755
2793
|
sourceParentIdentifier: Scalars["String"]["input"];
|
|
2756
2794
|
targetParentIdentifier: Scalars["String"]["input"];
|
|
2757
|
-
|
|
2795
|
+
targetIdentifier: Scalars["String"]["input"];
|
|
2796
|
+
relationshipType: Scalars["String"]["input"];
|
|
2758
2797
|
branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
2759
|
-
}>, options?: {} | undefined): Promise<
|
|
2798
|
+
}>, options?: {} | undefined): Promise<MoveRelationshipMutation>;
|
|
2760
2799
|
DeleteDocument(variables: Exact<{
|
|
2761
2800
|
identifier: Scalars["String"]["input"];
|
|
2762
2801
|
propagate?: InputMaybe<PropagationMode>;
|
|
@@ -2804,6 +2843,25 @@ declare class ReactorSubgraph extends BaseSubgraph {
|
|
|
2804
2843
|
//#region src/graphql/system/env/index.d.ts
|
|
2805
2844
|
declare const ADMIN_USERS: string[];
|
|
2806
2845
|
//#endregion
|
|
2846
|
+
//#region src/graphql/system/subgraph.d.ts
|
|
2847
|
+
declare class SystemSubgraph extends BaseSubgraph {
|
|
2848
|
+
name: string;
|
|
2849
|
+
hasSubscriptions: boolean;
|
|
2850
|
+
typeDefs: graphql.DocumentNode;
|
|
2851
|
+
resolvers: {
|
|
2852
|
+
Query: {
|
|
2853
|
+
system: () => {
|
|
2854
|
+
version: string;
|
|
2855
|
+
gitHash: string;
|
|
2856
|
+
};
|
|
2857
|
+
};
|
|
2858
|
+
};
|
|
2859
|
+
}
|
|
2860
|
+
//#endregion
|
|
2861
|
+
//#region src/graphql/system/version.d.ts
|
|
2862
|
+
declare function getVersion(): string;
|
|
2863
|
+
declare function getGitHash(): string;
|
|
2864
|
+
//#endregion
|
|
2807
2865
|
//#region src/graphql/utils.d.ts
|
|
2808
2866
|
declare function isSubgraphClass(candidate: unknown): candidate is SubgraphClass$1;
|
|
2809
2867
|
declare function buildGraphqlOperations(operations: Operation[], skip: number, first: number): GqlOperation$1[];
|
|
@@ -2859,6 +2917,13 @@ type Options = {
|
|
|
2859
2917
|
port?: number;
|
|
2860
2918
|
dbPath: string | undefined;
|
|
2861
2919
|
client?: PGlite | typeof Pool | undefined;
|
|
2920
|
+
/**
|
|
2921
|
+
* Factory for the PGLite instance backing the read-model store. When set,
|
|
2922
|
+
* `getDbClient` uses it instead of constructing `new PGlite(dbPath)`. Used
|
|
2923
|
+
* by Switchboard to keep a legacy-version data dir readable while running
|
|
2924
|
+
* the newer Switchboard binary.
|
|
2925
|
+
*/
|
|
2926
|
+
pgliteFactory?: PgliteFactory;
|
|
2862
2927
|
configFile?: string;
|
|
2863
2928
|
packages?: string[];
|
|
2864
2929
|
auth?: {
|
|
@@ -2883,6 +2948,12 @@ type Options = {
|
|
|
2883
2948
|
documentPermissionService?: DocumentPermissionService;
|
|
2884
2949
|
enableDocumentModelSubgraphs?: boolean;
|
|
2885
2950
|
logger?: ILogger;
|
|
2951
|
+
/**
|
|
2952
|
+
* Filesystem path for attachment binary storage.
|
|
2953
|
+
* Defaults to a sibling "attachments" directory next to dbPath,
|
|
2954
|
+
* or os.tmpdir() for in-memory DB deployments.
|
|
2955
|
+
*/
|
|
2956
|
+
attachmentStoragePath?: string;
|
|
2886
2957
|
};
|
|
2887
2958
|
type ProcessorInitializer = ProcessorFactoryBuilder;
|
|
2888
2959
|
/**
|
|
@@ -2939,5 +3010,5 @@ interface DocumentModelSchemaOptions {
|
|
|
2939
3010
|
*/
|
|
2940
3011
|
declare function generateDocumentModelSchema(documentModel: DocumentModelGlobalState$1, options?: DocumentModelSchemaOptions): DocumentNode;
|
|
2941
3012
|
//#endregion
|
|
2942
|
-
export { ADMIN_USERS, API, Action, ActionContext, ActionContextInput, ActionContextInputSchema, ActionContextResolvers, ActionInput, ActionInputSchema, ActionResolvers,
|
|
3013
|
+
export { ADMIN_USERS, API, Action, ActionContext, ActionContextInput, ActionContextInputSchema, ActionContextResolvers, ActionInput, ActionInputSchema, ActionResolvers, AddRelationshipDocument, AddRelationshipMutation, AddRelationshipMutationVariables, AnalyticsSubgraph, Attachment, AttachmentInput, AttachmentInputSchema, AttachmentResolvers, AuthConfig, AuthContext, AuthFetchMiddleware, AuthService, AuthSubgraph, BaseSubgraph, ChannelMeta, ChannelMetaInput, ChannelMetaInputSchema, ChannelMetaResolvers, Context, CreateDocumentDocument, CreateDocumentMutation, CreateDocumentMutationVariables, CreateEmptyDocumentDocument, CreateEmptyDocumentMutation, CreateEmptyDocumentMutationVariables, DateTimeScalarConfig, DeadLetterInfo, DeadLetterInfoResolvers, DeleteDocumentDocument, DeleteDocumentMutation, DeleteDocumentMutationVariables, DeleteDocumentsDocument, DeleteDocumentsMutation, DeleteDocumentsMutationVariables, DirectiveResolverFn, DocumentChangeContext, DocumentChangeContextResolvers, DocumentChangeEvent, DocumentChangeEventResolvers, DocumentChangeType, DocumentChangeTypeSchema, DocumentChangesDocument, DocumentChangesSubscription, DocumentChangesSubscriptionVariables, DocumentGroupPermissionEntry, DocumentGroupPermissionTable, DocumentModelGlobalState, DocumentModelGlobalStateResolvers, DocumentModelResultPage, DocumentModelResultPageResolvers, DocumentModelSchemaOptions, DocumentOperationsFilterInput, DocumentOperationsFilterInputSchema, DocumentPermissionConfig, DocumentPermissionDatabase, DocumentPermissionEntry, DocumentPermissionLevel, DocumentPermissionService, DocumentPermissionTable, DocumentProtectionTable, DocumentWithChildren, DocumentWithChildrenResolvers, Exact, 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, Group, GroupTable, HttpAdapterSetup, HttpAdapterType, HttpDocumentModelLoader, HttpPackageLoader, HttpPackageLoaderLogger, HttpPackageLoaderOptions, IGatewayAdapter, IHttpAdapter, type IPackageLoader, type IPackageLoaderOptions, IPackageStorage, ISubgraph, ImportPackageLoader, InMemoryPackageStorage, Incremental, InputMaybe, InstallPackageResult, InstalledPackageInfo, IsTypeOfResolverFn, JobChangeEvent, JobChangeEventResolvers, JobChangesDocument, JobChangesSubscription, JobChangesSubscriptionVariables, JobInfo, JobInfoResolvers, JsonObjectScalarConfig, MakeEmpty, MakeMaybe, MakeOptional, Maybe, MoveRelationshipDocument, MoveRelationshipMutation, MoveRelationshipMutationVariables, MoveRelationshipResult, MoveRelationshipResultResolvers, MutateDocumentAsyncDocument, MutateDocumentAsyncMutation, MutateDocumentAsyncMutationVariables, MutateDocumentDocument, MutateDocumentMutation, MutateDocumentMutationVariables, Mutation, MutationAddRelationshipArgs, MutationCreateDocumentArgs, MutationCreateEmptyDocumentArgs, MutationDeleteDocumentArgs, MutationDeleteDocumentsArgs, MutationMoveRelationshipArgs, MutationMutateDocumentArgs, MutationMutateDocumentAsyncArgs, MutationPushSyncEnvelopesArgs, MutationRemoveRelationshipArgs, MutationRenameDocumentArgs, MutationResolvers, MutationTouchChannelArgs, NextResolverFn, OperationContext, OperationContextInput, OperationContextInputSchema, OperationContextResolvers, OperationGroupPermissionEntry, OperationGroupPermissionTable, OperationInput, OperationInputSchema, OperationUserPermissionEntry, OperationUserPermissionTable, OperationWithContext, OperationWithContextInput, OperationWithContextInputSchema, OperationWithContextResolvers, OperationsFilterInput, OperationsFilterInputSchema, 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, QueryFindDocumentsArgs, QueryJobStatusArgs, QueryPollSyncEnvelopesArgs, QueryResolvers, ReactorModule, ReactorOperation, ReactorOperationResolvers, ReactorOperationResultPage, ReactorOperationResultPageResolvers, ReactorSigner, ReactorSignerApp, ReactorSignerAppInput, ReactorSignerAppInputSchema, ReactorSignerAppResolvers, ReactorSignerInput, ReactorSignerInputSchema, ReactorSignerResolvers, ReactorSignerUser, ReactorSignerUserInput, ReactorSignerUserInputSchema, ReactorSignerUserResolvers, ReactorSubgraph, RemoteCursor, RemoteCursorInput, RemoteCursorInputSchema, RemoteCursorResolvers, RemoteFilterInput, RemoteFilterInputSchema, RemoveRelationshipDocument, RemoveRelationshipMutation, RemoveRelationshipMutationVariables, RenameDocumentDocument, RenameDocumentMutation, RenameDocumentMutationVariables, Requester, RequireFields, Resolver, ResolverFn, ResolverTypeWrapper, ResolverWithResolve, Resolvers, ResolversObject, ResolversParentTypes, ResolversTypes, Revision, RevisionResolvers, Scalars, Sdk, SearchFilterInput, SearchFilterInputSchema, 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, UserGroupTable, ViewFilterInput, ViewFilterInputSchema, WithIndex, WsContextFactory, WsDisposer, buildGraphQlDocument, buildGraphQlDriveDocument, buildGraphqlOperation, buildGraphqlOperations, buildSubgraphSchemaModule, createAuthFetchMiddleware, createGatewayAdapter, createHttpAdapter, createMergedSchema, createReactorGraphQLClient, createSchema, definedNonNullAnySchema, driveIdFromUrl, generateDocumentModelSchema, getAuthContext, getDbClient, getDocumentModelSchemaName, getDocumentModelTypeDefs, getGitHash, getSdk, getUniqueDocumentModels, getVersion, initAnalyticsStoreSql, initTracing, initializeAndStartAPI, isDefinedNonNullAny, isSubgraphClass, isTracingEnabled, parseDriveUrl, renderGraphqlPlayground, trace };
|
|
2943
3014
|
//# sourceMappingURL=index.d.mts.map
|