@powerhousedao/reactor-api 6.2.3-dev.50 → 6.2.3-dev.51
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 +168 -18
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +698 -90
- package/dist/index.mjs.map +1 -1
- package/dist/src/packages/vite-loader.mjs +1 -1
- package/dist/{subgraph-extraction-DTFoN_bS.mjs → subgraph-extraction-sQlZLLPH.mjs} +28 -4
- package/dist/subgraph-extraction-sQlZLLPH.mjs.map +1 -0
- package/package.json +13 -13
- package/dist/subgraph-extraction-DTFoN_bS.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import { a as IPackagePieceSource, c as PackageManagerResult, i as IPackageManag
|
|
|
2
2
|
import { IAnalyticsStore } from "@powerhousedao/analytics-engine-core";
|
|
3
3
|
import { AnalyticsModel } from "@powerhousedao/analytics-engine-graphql";
|
|
4
4
|
import { DocumentNode, GraphQLError, GraphQLResolveInfo, GraphQLScalarType, GraphQLScalarTypeConfig, GraphQLSchema } from "graphql";
|
|
5
|
-
import { AttachmentRef, DocumentModelSource, IDocumentModelLoader, IDocumentModelRegistry, IDriveClient, IReactorClient, IReactorProcessorHostModuleBase, IRelationalDb, ISyncManager, InProcessReactorClientModule, ParsedDriveUrl, ProcessorFactoryBuilder as ProcessorFactoryBuilder$1, SyncScopeGate, driveIdFromUrl, parseDriveUrl } from "@powerhousedao/reactor";
|
|
5
|
+
import { AttachmentRef, DocumentModelSource, IDocumentModelLoader, IDocumentModelRegistry, IDriveClient, IInspectableAttachmentStore, IInspector, 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";
|
|
6
6
|
import { AuthSubject, DocumentModelGlobalState as DocumentModelGlobalState$1, DocumentModelModule, Operation, PHDocument, UpgradeManifest } from "@powerhousedao/shared/document-model";
|
|
7
7
|
import { ILogger } from "document-model";
|
|
8
8
|
import { GraphQLResolverMap, GraphQLSchemaModule } from "@apollo/subgraph";
|
|
@@ -12,6 +12,7 @@ import { AttachmentBuildResult, AttachmentDownloadOptions, AttachmentDownloadTar
|
|
|
12
12
|
import { IAttachmentClient } from "@powerhousedao/reactor-attachments/client";
|
|
13
13
|
import { WebSocketServer } from "ws";
|
|
14
14
|
import { AuthorizerResult, IHttpScope, IRelationalDb as IRelationalDb$1, IWebhookEndpoints, IWebhookScope, NodeRouteSpec, ProcessorApp, ProcessorFactory, RouteActor, RouteAuth, RouteAuthorizer, RouteBody, RouteContext, RouteHandler, RouteMethod, RouteOptions, RouteSpec, RouteTransport, RouteUser, RouteUser as RouteUser$1, ScopedRouteHandle, WebhookEndpointInfo, WebhookField, WebhookHashAlgorithm, WebhookPolicy, WebhookReply, WebhookRequest, WebhookScheme, WebhookSignatureEncoding, WebhookSpec, WebhookVerification } from "@powerhousedao/shared/processors";
|
|
15
|
+
import { AttachmentReadGate, IDocumentScopeGate } from "@powerhousedao/reactor-attachments/replication";
|
|
15
16
|
import { Generated, Kysely } from "kysely";
|
|
16
17
|
import { PGlite } from "@electric-sql/pglite";
|
|
17
18
|
import { Knex } from "knex";
|
|
@@ -587,6 +588,8 @@ interface IWebhookStore {
|
|
|
587
588
|
revoke(namespace: string, endpoint: string, ownerKey: string): Promise<void>;
|
|
588
589
|
/** True when this delivery has been seen before, within the TTL. */
|
|
589
590
|
seen(token: string, key: string, ttlSeconds: number): Promise<boolean>;
|
|
591
|
+
/** Drops a delivery recorded by seen(), so a retry of it is delivered. */
|
|
592
|
+
forget(token: string, key: string): Promise<void>;
|
|
590
593
|
}
|
|
591
594
|
/** Opaque and unguessable: the URL is a bearer capability held by a third party. */
|
|
592
595
|
export declare function newWebhookToken(): string;
|
|
@@ -600,6 +603,7 @@ export declare class RelationalWebhookStore implements IWebhookStore {
|
|
|
600
603
|
find(token: string): Promise<WebhookEndpointRow | undefined>;
|
|
601
604
|
list(namespace: string, endpoint?: string): Promise<WebhookEndpointRow[]>;
|
|
602
605
|
revoke(namespace: string, endpoint: string, ownerKey: string): Promise<void>;
|
|
606
|
+
forget(token: string, key: string): Promise<void>;
|
|
603
607
|
seen(token: string, key: string, ttlSeconds: number): Promise<boolean>;
|
|
604
608
|
}
|
|
605
609
|
/** In-memory store, for hosts with no relational database and for tests. */
|
|
@@ -608,6 +612,7 @@ export declare class MemoryWebhookStore implements IWebhookStore {
|
|
|
608
612
|
init(): Promise<void>;
|
|
609
613
|
ensure(namespace: string, endpoint: string, ownerKey: string): Promise<WebhookEndpointRow>;
|
|
610
614
|
find(token: string): Promise<WebhookEndpointRow | undefined>;
|
|
615
|
+
forget(token: string, key: string): Promise<void>;
|
|
611
616
|
list(namespace: string, endpoint?: string): Promise<WebhookEndpointRow[]>;
|
|
612
617
|
revoke(namespace: string, endpoint: string, ownerKey: string): Promise<void>;
|
|
613
618
|
seen(token: string, key: string, ttlSeconds: number): Promise<boolean>;
|
|
@@ -805,20 +810,6 @@ export interface AttachmentAccessRequest {
|
|
|
805
810
|
*/
|
|
806
811
|
appKey?: string;
|
|
807
812
|
}
|
|
808
|
-
/** The reactor's read gate, as the attachment facade consults it. */
|
|
809
|
-
export type AttachmentReadGate = Pick<IReactorClient, "isServed" | "get">;
|
|
810
|
-
/**
|
|
811
|
-
* Which scopes of a document a subject may read, asked by document id.
|
|
812
|
-
*
|
|
813
|
-
* Structural on purpose: the composition that has a policy model to enforce
|
|
814
|
-
* supplies `SyncScopeGate`, and one that does not supplies nothing at all.
|
|
815
|
-
*/
|
|
816
|
-
export interface IDocumentScopeGate {
|
|
817
|
-
scopePredicateById(documentId: string, subject: {
|
|
818
|
-
address?: string;
|
|
819
|
-
key?: string;
|
|
820
|
-
}, branch: string, signal?: AbortSignal): Promise<(scope: string) => boolean>;
|
|
821
|
-
}
|
|
822
813
|
export type AttachmentCallerResult = {
|
|
823
814
|
kind: "admitted";
|
|
824
815
|
} | {
|
|
@@ -931,6 +922,24 @@ export declare class AttachmentClientProvider implements IAttachmentClientProvid
|
|
|
931
922
|
forSubject(subject: AuthSubject): IAttachmentClient;
|
|
932
923
|
}
|
|
933
924
|
//#endregion
|
|
925
|
+
//#region src/graphql/inspection/source.d.ts
|
|
926
|
+
/** What the inspection subgraph serves. Only reads cross GraphQL. */
|
|
927
|
+
interface IReactorInspectionSource {
|
|
928
|
+
/** Reads as the host; drive and document reads are re-made as the caller. */
|
|
929
|
+
readonly inspector: IInspector;
|
|
930
|
+
readonly syncInspector: ISyncInspector | undefined;
|
|
931
|
+
readonly documentModelRegistry: IDocumentModelRegistry;
|
|
932
|
+
/** Facts the host learns after boot, e.g. a composed workflow runtime. */
|
|
933
|
+
readonly facts: IReactorFactsSink;
|
|
934
|
+
}
|
|
935
|
+
type ReactorInspectionOptions = {
|
|
936
|
+
/** Absent: a group-commit store's own health, else `tracked: false`. */
|
|
937
|
+
storageHealth?: IInspectorStorageHealthProvider;
|
|
938
|
+
attachmentStore?: IInspectableAttachmentStore;
|
|
939
|
+
workflows?: boolean;
|
|
940
|
+
};
|
|
941
|
+
export declare function createReactorInspectionSource(module: InProcessReactorModule, options?: ReactorInspectionOptions): IReactorInspectionSource;
|
|
942
|
+
//#endregion
|
|
934
943
|
//#region src/graphql/types.d.ts
|
|
935
944
|
export type SubgraphClass = typeof BaseSubgraph;
|
|
936
945
|
export type Context = {
|
|
@@ -989,6 +998,8 @@ export type SubgraphArgs = {
|
|
|
989
998
|
* `BaseSubgraph.attachmentsFor(ctx)`.
|
|
990
999
|
*/
|
|
991
1000
|
attachments?: IAttachmentClientProvider;
|
|
1001
|
+
/** Read only by `InspectionSubgraph`, registered only when this is set. */
|
|
1002
|
+
inspection?: IReactorInspectionSource;
|
|
992
1003
|
/**
|
|
993
1004
|
* The host's base path, injected by the GraphQL manager when it constructs
|
|
994
1005
|
* a subgraph. Subgraph code may read it, but routing ignores it: every
|
|
@@ -1106,6 +1117,10 @@ export declare class BaseSubgraph implements ISubgraph$1 {
|
|
|
1106
1117
|
* layer, such as a fetched document's id). Performs no slug resolution.
|
|
1107
1118
|
*/
|
|
1108
1119
|
canReadDocument(documentId: CanonicalDocumentId, ctx: Context): Promise<boolean>;
|
|
1120
|
+
/** Drops the items the host's own ACL refuses the caller. */
|
|
1121
|
+
readableByHost<T extends {
|
|
1122
|
+
id: string;
|
|
1123
|
+
}>(items: readonly T[], ctx: Context): Promise<T[]>;
|
|
1109
1124
|
/**
|
|
1110
1125
|
* The principal a request decides as: the authenticated caller's address, and
|
|
1111
1126
|
* the did:key of the app instance whose token authenticated it.
|
|
@@ -1119,6 +1134,14 @@ export declare class BaseSubgraph implements ISubgraph$1 {
|
|
|
1119
1134
|
protected viewSubject(ctx: Context): AuthSubject;
|
|
1120
1135
|
/** Whether a listing would serve the document to the caller; fails closed. */
|
|
1121
1136
|
protected servesDocument(documentId: string, ctx: Context): Promise<boolean>;
|
|
1137
|
+
/** {@link servesDocument}, but a reactor that cannot answer throws. */
|
|
1138
|
+
protected servesDocumentOrThrows(identifier: string, ctx: Context, view?: Pick<ViewFilter, "branch" | "scopes">): Promise<boolean>;
|
|
1139
|
+
/**
|
|
1140
|
+
* Whether a listing would serve the document to the caller: the reactor read
|
|
1141
|
+
* gate, then the host's legacy layer, as `findDocuments` applies them. Absent
|
|
1142
|
+
* or withheld is `false`; a failure to decide throws.
|
|
1143
|
+
*/
|
|
1144
|
+
protected listsDocument(identifier: string, ctx: Context, view?: Pick<ViewFilter, "branch" | "scopes">): Promise<boolean>;
|
|
1122
1145
|
/**
|
|
1123
1146
|
* Asserts read access, resolving a slug first. Returns a handle whose
|
|
1124
1147
|
* `fetchIdentifier` the caller reuses for the data fetch; a denial throws.
|
|
@@ -1374,6 +1397,14 @@ export type HttpAdapterSetup = {
|
|
|
1374
1397
|
export declare function createHttpAdapter(type: HttpAdapterType): Promise<HttpAdapterSetup>;
|
|
1375
1398
|
//#endregion
|
|
1376
1399
|
//#region src/graphql/gateway/drive-ownership-cache.d.ts
|
|
1400
|
+
/**
|
|
1401
|
+
* Where drives are looked up: the raw reactor, past the read gate. Ownership
|
|
1402
|
+
* is a storage fact that serves no content, so a policy that withholds a drive
|
|
1403
|
+
* from the host's key must not make the host deny holding it.
|
|
1404
|
+
*/
|
|
1405
|
+
type DriveStore = {
|
|
1406
|
+
find(search: SearchFilter): Promise<PagedResults<PHDocument>>;
|
|
1407
|
+
};
|
|
1377
1408
|
/**
|
|
1378
1409
|
* In-memory record of which drives this switchboard instance owns.
|
|
1379
1410
|
*
|
|
@@ -1385,11 +1416,17 @@ export declare function createHttpAdapter(type: HttpAdapterType): Promise<HttpAd
|
|
|
1385
1416
|
* 421 response.
|
|
1386
1417
|
*/
|
|
1387
1418
|
declare class DriveOwnershipCache {
|
|
1388
|
-
private readonly
|
|
1419
|
+
private readonly store;
|
|
1389
1420
|
private readonly drives;
|
|
1390
|
-
constructor(
|
|
1421
|
+
constructor(store: DriveStore);
|
|
1391
1422
|
init(): Promise<void>;
|
|
1392
1423
|
has(driveId: string): boolean;
|
|
1424
|
+
/**
|
|
1425
|
+
* Whether this host holds the drive, asking the reactor on a miss: drives
|
|
1426
|
+
* also arrive by sync and by writes that bypass the create resolvers. A
|
|
1427
|
+
* positive answer is cached; a failure to ask throws.
|
|
1428
|
+
*/
|
|
1429
|
+
holds(driveId: string): Promise<boolean>;
|
|
1393
1430
|
add(driveId: string): void;
|
|
1394
1431
|
remove(driveId: string): void;
|
|
1395
1432
|
size(): number;
|
|
@@ -1426,6 +1463,12 @@ export type GraphQLManagerOptions = {
|
|
|
1426
1463
|
syncServingGate?: SyncScopeGate;
|
|
1427
1464
|
httpRoutes?: HttpRouteService;
|
|
1428
1465
|
attachments?: IAttachmentClientProvider;
|
|
1466
|
+
inspection?: IReactorInspectionSource;
|
|
1467
|
+
/**
|
|
1468
|
+
* Where drive ownership is looked up, past the read gate. Defaults to the
|
|
1469
|
+
* reactor client, which withholds a drive the host's own key may not read.
|
|
1470
|
+
*/
|
|
1471
|
+
driveStore?: DriveStore;
|
|
1429
1472
|
};
|
|
1430
1473
|
export declare function createWsAuthHandlers(opts: {
|
|
1431
1474
|
authService?: AuthService;
|
|
@@ -1479,6 +1522,7 @@ export declare class GraphQLManager {
|
|
|
1479
1522
|
private readonly syncServingGate?;
|
|
1480
1523
|
private readonly httpRoutes?;
|
|
1481
1524
|
private readonly attachments?;
|
|
1525
|
+
private readonly inspection?;
|
|
1482
1526
|
constructor(options: GraphQLManagerOptions);
|
|
1483
1527
|
init(coreSubgraphs: SubgraphClass$1[], authMiddleware?: AuthFetchMiddleware, requireAuthMiddleware?: RequireAuthFetchMiddleware): Promise<void>;
|
|
1484
1528
|
/**
|
|
@@ -1545,6 +1589,50 @@ export declare class GraphQLManager {
|
|
|
1545
1589
|
shutdown(): Promise<void>;
|
|
1546
1590
|
}
|
|
1547
1591
|
//#endregion
|
|
1592
|
+
//#region src/graphql/inspection/resolvers.d.ts
|
|
1593
|
+
/** How the subgraph decides for one request's caller. */
|
|
1594
|
+
interface InspectionCallerGate {
|
|
1595
|
+
/** One of the host's listed admins, whatever the policy. */
|
|
1596
|
+
isOperator(ctx: Context): boolean;
|
|
1597
|
+
/** The reactor client, reading as the caller. */
|
|
1598
|
+
readerFor(ctx: Context): InspectorDocumentReader;
|
|
1599
|
+
/** The host's own read check on one document; throws when refused. */
|
|
1600
|
+
assertCanRead(identifier: string, ctx: Context): Promise<string>;
|
|
1601
|
+
/** The host's own read check over a listing. */
|
|
1602
|
+
readableIds(ids: readonly string[], ctx: Context): Promise<Set<string>>;
|
|
1603
|
+
/** The document's id and the scopes the caller is served, or undefined. */
|
|
1604
|
+
servedDocument(identifier: string, branch: string | undefined, ctx: Context): Promise<{
|
|
1605
|
+
id: string;
|
|
1606
|
+
scopes: ReadonlySet<string>;
|
|
1607
|
+
} | undefined>;
|
|
1608
|
+
}
|
|
1609
|
+
type GqlOf<T, K extends keyof T> = T[K] extends {
|
|
1610
|
+
readonly gql: infer G extends string;
|
|
1611
|
+
} ? G : never;
|
|
1612
|
+
/** Exactly the GraphQL fields of the read rows of both op tables. */
|
|
1613
|
+
type InspectionReadField = GqlOf<typeof INSPECTOR_OPS, InspectorReadOpKey> | GqlOf<typeof SYNC_INSPECTION_OPS, SyncInspectionReadOpKey>;
|
|
1614
|
+
/** The read half of the inspection surface; no lever has a field here. */
|
|
1615
|
+
export declare function createInspectionResolvers(source: IReactorInspectionSource, sync: {
|
|
1616
|
+
list(): Remote[];
|
|
1617
|
+
}, gate: InspectionCallerGate): Record<string, unknown>;
|
|
1618
|
+
//#endregion
|
|
1619
|
+
//#region src/graphql/inspection/schema.d.ts
|
|
1620
|
+
export declare const inspectionTypeDefs: import("graphql").DocumentNode;
|
|
1621
|
+
//#endregion
|
|
1622
|
+
//#region src/graphql/inspection/subgraph.d.ts
|
|
1623
|
+
export declare function isListedAdmin(config: AuthorizationConfig, address: string | undefined): boolean;
|
|
1624
|
+
/** The read half of the reactor's inspection surface. */
|
|
1625
|
+
export declare class InspectionSubgraph extends BaseSubgraph {
|
|
1626
|
+
name: string;
|
|
1627
|
+
hasSubscriptions: boolean;
|
|
1628
|
+
typeDefs: DocumentNode;
|
|
1629
|
+
resolvers: Record<string, any>;
|
|
1630
|
+
constructor(args: SubgraphArgs);
|
|
1631
|
+
private callerGate;
|
|
1632
|
+
private readerFor;
|
|
1633
|
+
private servedDocument;
|
|
1634
|
+
}
|
|
1635
|
+
//#endregion
|
|
1548
1636
|
//#region src/services/package-storage.d.ts
|
|
1549
1637
|
export interface InstalledPackageInfo {
|
|
1550
1638
|
name: string;
|
|
@@ -1611,6 +1699,8 @@ export type API = {
|
|
|
1611
1699
|
/** The read-model relational store, for the same host-composed component:
|
|
1612
1700
|
* its tables belong in this database and nothing else hands one over. */
|
|
1613
1701
|
relationalDb: IRelationalDb$1;
|
|
1702
|
+
/** Present when the host serves inspection; `facts` takes late-bound facts. */
|
|
1703
|
+
inspection?: IReactorInspectionSource;
|
|
1614
1704
|
/**
|
|
1615
1705
|
* Releases resources owned by the API: shuts down the GraphQL gateway,
|
|
1616
1706
|
* closes WebSocket and HTTP servers, destroys knex pools, and closes any
|
|
@@ -1646,6 +1736,10 @@ type CachedRegistryPackage = {
|
|
|
1646
1736
|
/** Absolute entry files inside `dir`, for the entries the package serves. */
|
|
1647
1737
|
entries: Partial<Record<PackageEntryKind, string>>;
|
|
1648
1738
|
source: "cache" | "download";
|
|
1739
|
+
/** External packages the package manifest lists, name -> version. */
|
|
1740
|
+
externalDependencies: Record<string, string>;
|
|
1741
|
+
/** The external packages that resolve from neither the project nor reactor-api. */
|
|
1742
|
+
missingExternalDependencies: string[];
|
|
1649
1743
|
};
|
|
1650
1744
|
type RegistryPackageCacheOptions = {
|
|
1651
1745
|
registryUrl: string;
|
|
@@ -1675,6 +1769,9 @@ declare class RegistryPackageCache {
|
|
|
1675
1769
|
private download;
|
|
1676
1770
|
private dependenciesOf;
|
|
1677
1771
|
private fetchBounded;
|
|
1772
|
+
private outsideUrl;
|
|
1773
|
+
/** Whether `specifier` resolves from the project or from reactor-api. */
|
|
1774
|
+
resolvesForCachedPackages(specifier: string, pkg: string): boolean;
|
|
1678
1775
|
private linkBareImports;
|
|
1679
1776
|
}
|
|
1680
1777
|
//#endregion
|
|
@@ -1718,6 +1815,7 @@ export declare class HttpPackageLoader implements IPackageLoader {
|
|
|
1718
1815
|
readonly documentModelLoader: HttpDocumentModelLoader;
|
|
1719
1816
|
readonly cache: RegistryPackageCache;
|
|
1720
1817
|
private readonly versions;
|
|
1818
|
+
private readonly reportedExternal;
|
|
1721
1819
|
constructor(options: HttpPackageLoaderOptions);
|
|
1722
1820
|
/**
|
|
1723
1821
|
* Load document models from a package in the HTTP registry.
|
|
@@ -1736,6 +1834,7 @@ export declare class HttpPackageLoader implements IPackageLoader {
|
|
|
1736
1834
|
module: Record<string, unknown>;
|
|
1737
1835
|
filePath?: string;
|
|
1738
1836
|
}>;
|
|
1837
|
+
private assertExternalDependencies;
|
|
1739
1838
|
importDocumentModels(packageSpec: string): Promise<{
|
|
1740
1839
|
module: Record<string, unknown>;
|
|
1741
1840
|
filePath?: string;
|
|
@@ -2046,6 +2145,10 @@ export type ConsistencyToken = {
|
|
|
2046
2145
|
readonly createdAtUtcIso: Scalars["String"]["output"];
|
|
2047
2146
|
readonly version: Scalars["Int"]["output"];
|
|
2048
2147
|
};
|
|
2148
|
+
export type CreateDefaults = {
|
|
2149
|
+
readonly protocolVersions: Scalars["JSONObject"]["output"];
|
|
2150
|
+
readonly signaturePolicy: Scalars["String"]["output"];
|
|
2151
|
+
};
|
|
2049
2152
|
export type DeadLetterInfo = {
|
|
2050
2153
|
readonly branch: Scalars["String"]["output"];
|
|
2051
2154
|
readonly documentId: Scalars["String"]["output"];
|
|
@@ -2441,6 +2544,7 @@ export declare enum PropagationMode {
|
|
|
2441
2544
|
Orphan = "ORPHAN"
|
|
2442
2545
|
}
|
|
2443
2546
|
export type Query = {
|
|
2547
|
+
readonly createDefaults: CreateDefaults;
|
|
2444
2548
|
readonly document?: Maybe<DocumentWithChildren>;
|
|
2445
2549
|
readonly documentIncomingRelationshipEdges: DocumentRelationshipResultPage;
|
|
2446
2550
|
readonly documentIncomingRelationships: PhDocumentResultPage;
|
|
@@ -2448,6 +2552,7 @@ export type Query = {
|
|
|
2448
2552
|
readonly documentOperations: ReactorOperationResultPage;
|
|
2449
2553
|
readonly documentOutgoingRelationshipEdges: DocumentRelationshipResultPage;
|
|
2450
2554
|
readonly documentOutgoingRelationships: PhDocumentResultPage;
|
|
2555
|
+
readonly documentServed: Scalars["Boolean"]["output"];
|
|
2451
2556
|
/**
|
|
2452
2557
|
* Predicts whether the calling subject would be admitted to execute each of a
|
|
2453
2558
|
* set of candidate operations, without submitting any of them. A UI asks this to
|
|
@@ -2493,6 +2598,9 @@ export type Query = {
|
|
|
2493
2598
|
readonly pollSyncEnvelopes: PollSyncEnvelopesResult;
|
|
2494
2599
|
readonly syncHolds: ReadonlyArray<SyncHold>;
|
|
2495
2600
|
};
|
|
2601
|
+
export type QueryCreateDefaultsArgs = {
|
|
2602
|
+
parentIdOrSlug?: InputMaybe<Scalars["String"]["input"]>;
|
|
2603
|
+
};
|
|
2496
2604
|
export type QueryDocumentArgs = {
|
|
2497
2605
|
idOrSlug?: InputMaybe<Scalars["String"]["input"]>;
|
|
2498
2606
|
identifier?: InputMaybe<Scalars["String"]["input"]>;
|
|
@@ -2534,6 +2642,10 @@ export type QueryDocumentOutgoingRelationshipsArgs = {
|
|
|
2534
2642
|
sourceIdentifier?: InputMaybe<Scalars["String"]["input"]>;
|
|
2535
2643
|
view?: InputMaybe<ViewFilterInput>;
|
|
2536
2644
|
};
|
|
2645
|
+
export type QueryDocumentServedArgs = {
|
|
2646
|
+
idOrSlug: Scalars["String"]["input"];
|
|
2647
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
2648
|
+
};
|
|
2537
2649
|
export type QueryEvaluateActionsArgs = {
|
|
2538
2650
|
branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
2539
2651
|
candidates: ReadonlyArray<ActionCandidateInput>;
|
|
@@ -3041,6 +3153,22 @@ export type GetJobStatusQuery = {
|
|
|
3041
3153
|
};
|
|
3042
3154
|
} | null | undefined;
|
|
3043
3155
|
};
|
|
3156
|
+
export type GetDocumentServedQueryVariables = Exact<{
|
|
3157
|
+
idOrSlug: Scalars["String"]["input"];
|
|
3158
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
3159
|
+
}>;
|
|
3160
|
+
export type GetDocumentServedQuery = {
|
|
3161
|
+
readonly documentServed: boolean;
|
|
3162
|
+
};
|
|
3163
|
+
export type GetCreateDefaultsQueryVariables = Exact<{
|
|
3164
|
+
parentIdOrSlug?: InputMaybe<Scalars["String"]["input"]>;
|
|
3165
|
+
}>;
|
|
3166
|
+
export type GetCreateDefaultsQuery = {
|
|
3167
|
+
readonly createDefaults: {
|
|
3168
|
+
readonly signaturePolicy: string;
|
|
3169
|
+
readonly protocolVersions: NonNullable<unknown>;
|
|
3170
|
+
};
|
|
3171
|
+
};
|
|
3044
3172
|
export type EvaluateActionsQueryVariables = Exact<{
|
|
3045
3173
|
documentIdentifier: Scalars["String"]["input"];
|
|
3046
3174
|
branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
@@ -3525,6 +3653,7 @@ export type ResolversTypes = ResolversObject<{
|
|
|
3525
3653
|
ChannelMetaInput: ChannelMetaInput;
|
|
3526
3654
|
ConsistencyCoordinate: ResolverTypeWrapper<ConsistencyCoordinate>;
|
|
3527
3655
|
ConsistencyToken: ResolverTypeWrapper<ConsistencyToken>;
|
|
3656
|
+
CreateDefaults: ResolverTypeWrapper<CreateDefaults>;
|
|
3528
3657
|
DateTime: ResolverTypeWrapper<Scalars["DateTime"]["output"]>;
|
|
3529
3658
|
DeadLetterInfo: ResolverTypeWrapper<DeadLetterInfo>;
|
|
3530
3659
|
DocumentChangeContext: ResolverTypeWrapper<DocumentChangeContext>;
|
|
@@ -3600,6 +3729,7 @@ export type ResolversParentTypes = ResolversObject<{
|
|
|
3600
3729
|
ChannelMetaInput: ChannelMetaInput;
|
|
3601
3730
|
ConsistencyCoordinate: ConsistencyCoordinate;
|
|
3602
3731
|
ConsistencyToken: ConsistencyToken;
|
|
3732
|
+
CreateDefaults: CreateDefaults;
|
|
3603
3733
|
DateTime: Scalars["DateTime"]["output"];
|
|
3604
3734
|
DeadLetterInfo: DeadLetterInfo;
|
|
3605
3735
|
DocumentChangeContext: DocumentChangeContext;
|
|
@@ -3699,6 +3829,10 @@ export type ConsistencyTokenResolvers<ContextType = Context, ParentType extends
|
|
|
3699
3829
|
createdAtUtcIso?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
3700
3830
|
version?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
|
|
3701
3831
|
}>;
|
|
3832
|
+
export type CreateDefaultsResolvers<ContextType = Context, ParentType extends ResolversParentTypes["CreateDefaults"] = ResolversParentTypes["CreateDefaults"]> = ResolversObject<{
|
|
3833
|
+
protocolVersions?: Resolver<ResolversTypes["JSONObject"], ParentType, ContextType>;
|
|
3834
|
+
signaturePolicy?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
3835
|
+
}>;
|
|
3702
3836
|
export interface DateTimeScalarConfig extends GraphQLScalarTypeConfig<ResolversTypes["DateTime"], any> {
|
|
3703
3837
|
name: "DateTime";
|
|
3704
3838
|
}
|
|
@@ -3855,6 +3989,7 @@ export type PollSyncEnvelopesResultResolvers<ContextType = Context, ParentType e
|
|
|
3855
3989
|
peerManifestRevision?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
|
|
3856
3990
|
}>;
|
|
3857
3991
|
export type QueryResolvers<ContextType = Context, ParentType extends ResolversParentTypes["Query"] = ResolversParentTypes["Query"]> = ResolversObject<{
|
|
3992
|
+
createDefaults?: Resolver<ResolversTypes["CreateDefaults"], ParentType, ContextType, Partial<QueryCreateDefaultsArgs>>;
|
|
3858
3993
|
document?: Resolver<Maybe<ResolversTypes["DocumentWithChildren"]>, ParentType, ContextType, Partial<QueryDocumentArgs>>;
|
|
3859
3994
|
documentIncomingRelationshipEdges?: Resolver<ResolversTypes["DocumentRelationshipResultPage"], ParentType, ContextType, Partial<QueryDocumentIncomingRelationshipEdgesArgs>>;
|
|
3860
3995
|
documentIncomingRelationships?: Resolver<ResolversTypes["PHDocumentResultPage"], ParentType, ContextType, RequireFields<QueryDocumentIncomingRelationshipsArgs, "relationshipType">>;
|
|
@@ -3862,6 +3997,7 @@ export type QueryResolvers<ContextType = Context, ParentType extends ResolversPa
|
|
|
3862
3997
|
documentOperations?: Resolver<ResolversTypes["ReactorOperationResultPage"], ParentType, ContextType, RequireFields<QueryDocumentOperationsArgs, "filter">>;
|
|
3863
3998
|
documentOutgoingRelationshipEdges?: Resolver<ResolversTypes["DocumentRelationshipResultPage"], ParentType, ContextType, Partial<QueryDocumentOutgoingRelationshipEdgesArgs>>;
|
|
3864
3999
|
documentOutgoingRelationships?: Resolver<ResolversTypes["PHDocumentResultPage"], ParentType, ContextType, RequireFields<QueryDocumentOutgoingRelationshipsArgs, "relationshipType">>;
|
|
4000
|
+
documentServed?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType, RequireFields<QueryDocumentServedArgs, "idOrSlug">>;
|
|
3865
4001
|
evaluateActions?: Resolver<ResolversTypes["ActionEvaluations"], ParentType, ContextType, RequireFields<QueryEvaluateActionsArgs, "candidates">>;
|
|
3866
4002
|
findDocuments?: Resolver<ResolversTypes["PHDocumentResultPage"], ParentType, ContextType, Partial<QueryFindDocumentsArgs>>;
|
|
3867
4003
|
jobStatus?: Resolver<Maybe<ResolversTypes["JobInfo"]>, ParentType, ContextType, RequireFields<QueryJobStatusArgs, "jobId">>;
|
|
@@ -3947,6 +4083,7 @@ export type Resolvers<ContextType = Context> = ResolversObject<{
|
|
|
3947
4083
|
ChannelMeta?: ChannelMetaResolvers<ContextType>;
|
|
3948
4084
|
ConsistencyCoordinate?: ConsistencyCoordinateResolvers<ContextType>;
|
|
3949
4085
|
ConsistencyToken?: ConsistencyTokenResolvers<ContextType>;
|
|
4086
|
+
CreateDefaults?: CreateDefaultsResolvers<ContextType>;
|
|
3950
4087
|
DateTime?: GraphQLScalarType;
|
|
3951
4088
|
DeadLetterInfo?: DeadLetterInfoResolvers<ContextType>;
|
|
3952
4089
|
DocumentChangeContext?: DocumentChangeContextResolvers<ContextType>;
|
|
@@ -4026,6 +4163,8 @@ export declare const GetDocumentIncomingRelationshipEdgesDocument: DocumentNode;
|
|
|
4026
4163
|
export declare const FindDocumentsDocument: DocumentNode;
|
|
4027
4164
|
export declare const GetDocumentOperationsDocument: DocumentNode;
|
|
4028
4165
|
export declare const GetJobStatusDocument: DocumentNode;
|
|
4166
|
+
export declare const GetDocumentServedDocument: DocumentNode;
|
|
4167
|
+
export declare const GetCreateDefaultsDocument: DocumentNode;
|
|
4029
4168
|
export declare const EvaluateActionsDocument: DocumentNode;
|
|
4030
4169
|
export declare const CreateDocumentDocument: DocumentNode;
|
|
4031
4170
|
export declare const CreateEmptyDocumentDocument: DocumentNode;
|
|
@@ -4057,6 +4196,8 @@ export declare function getSdk<C>(requester: Requester<C>): {
|
|
|
4057
4196
|
FindDocuments(variables?: FindDocumentsQueryVariables, options?: C): Promise<FindDocumentsQuery>;
|
|
4058
4197
|
GetDocumentOperations(variables: GetDocumentOperationsQueryVariables, options?: C): Promise<GetDocumentOperationsQuery>;
|
|
4059
4198
|
GetJobStatus(variables: GetJobStatusQueryVariables, options?: C): Promise<GetJobStatusQuery>;
|
|
4199
|
+
GetDocumentServed(variables: GetDocumentServedQueryVariables, options?: C): Promise<GetDocumentServedQuery>;
|
|
4200
|
+
GetCreateDefaults(variables?: GetCreateDefaultsQueryVariables, options?: C): Promise<GetCreateDefaultsQuery>;
|
|
4060
4201
|
EvaluateActions(variables: EvaluateActionsQueryVariables, options?: C): Promise<EvaluateActionsQuery>;
|
|
4061
4202
|
CreateDocument(variables: CreateDocumentMutationVariables, options?: C): Promise<CreateDocumentMutation>;
|
|
4062
4203
|
CreateEmptyDocument(variables: CreateEmptyDocumentMutationVariables, options?: C): Promise<CreateEmptyDocumentMutation>;
|
|
@@ -4134,6 +4275,13 @@ export declare function createReactorGraphQLClient(url: string, fetchImpl?: Fetc
|
|
|
4134
4275
|
GetJobStatus(variables: Exact<{
|
|
4135
4276
|
jobId: Scalars["String"]["input"];
|
|
4136
4277
|
}>, options?: {} | undefined): Promise<GetJobStatusQuery>;
|
|
4278
|
+
GetDocumentServed(variables: Exact<{
|
|
4279
|
+
idOrSlug: Scalars["String"]["input"];
|
|
4280
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
4281
|
+
}>, options?: {} | undefined): Promise<GetDocumentServedQuery>;
|
|
4282
|
+
GetCreateDefaults(variables?: Exact<{
|
|
4283
|
+
parentIdOrSlug?: InputMaybe<Scalars["String"]["input"]>;
|
|
4284
|
+
}> | undefined, options?: {} | undefined): Promise<GetCreateDefaultsQuery>;
|
|
4137
4285
|
EvaluateActions(variables: Exact<{
|
|
4138
4286
|
documentIdentifier: Scalars["String"]["input"];
|
|
4139
4287
|
branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
@@ -4547,6 +4695,8 @@ type Options = {
|
|
|
4547
4695
|
* or os.tmpdir() for in-memory DB deployments.
|
|
4548
4696
|
*/
|
|
4549
4697
|
attachmentStoragePath?: string;
|
|
4698
|
+
/** Storage health and workflow facts for the inspection subgraph. */
|
|
4699
|
+
inspection?: ReactorInspectionOptions;
|
|
4550
4700
|
};
|
|
4551
4701
|
type ProcessorInitializer = ProcessorFactoryBuilder;
|
|
4552
4702
|
/**
|
|
@@ -4678,6 +4828,6 @@ export interface DocumentModelSchemaOptions {
|
|
|
4678
4828
|
*/
|
|
4679
4829
|
export declare function generateDocumentModelSchema(documentModel: DocumentModelGlobalState$1, options?: DocumentModelSchemaOptions): DocumentNode;
|
|
4680
4830
|
//#endregion
|
|
4681
|
-
export { type AuthorizationConfig, type AuthorizerResult, type CanonicalDocumentId, type HttpRouteServiceOptions, type IAuthorizationService, type IHttpScope, type IPackageLoader, type IPackageLoaderOptions, type IPackagePieceSource, type IWebhookEndpoints, type IWebhookScope, type IWebhookStore, type NodeRouteSpec, type PackagePiece, type PackagePieceEntry, type PackagesSubgraphArgs, type ParsedDriveUrl, type RouteActor, type RouteAuth, type RouteAuthorizer, type RouteBody, type RouteContext, type RouteHandler, type RouteMethod, type RouteOptions, type RouteSpec, type RouteTransport, type RouteUser, type ScopedRouteHandle, type WebhookEndpointInfo, type WebhookEndpointRow, type WebhookField, type WebhookHashAlgorithm, type WebhookPolicy, type WebhookReply, type WebhookRequest, type WebhookScheme, type WebhookSignatureEncoding, type WebhookSpec, type WebhookVerification, driveIdFromUrl, parseDriveUrl };
|
|
4831
|
+
export { type AttachmentReadGate, type AuthorizationConfig, type AuthorizerResult, type CanonicalDocumentId, type HttpRouteServiceOptions, type IAuthorizationService, type IDocumentScopeGate, type IHttpScope, type IPackageLoader, type IPackageLoaderOptions, type IPackagePieceSource, type IReactorInspectionSource, type IWebhookEndpoints, type IWebhookScope, type IWebhookStore, type InspectionCallerGate, type InspectionReadField, type NodeRouteSpec, type PackagePiece, type PackagePieceEntry, type PackagesSubgraphArgs, type ParsedDriveUrl, type ReactorInspectionOptions, type RouteActor, type RouteAuth, type RouteAuthorizer, type RouteBody, type RouteContext, type RouteHandler, type RouteMethod, type RouteOptions, type RouteSpec, type RouteTransport, type RouteUser, type ScopedRouteHandle, type WebhookEndpointInfo, type WebhookEndpointRow, type WebhookField, type WebhookHashAlgorithm, type WebhookPolicy, type WebhookReply, type WebhookRequest, type WebhookScheme, type WebhookSignatureEncoding, type WebhookSpec, type WebhookVerification, driveIdFromUrl, parseDriveUrl };
|
|
4682
4832
|
export {};
|
|
4683
4833
|
//# sourceMappingURL=index.d.mts.map
|