@powerhousedao/reactor-browser 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/{attachment-service-BsOmg2-v.d.ts → attachment-service-C_8_poEv.d.ts} +223 -12
- package/dist/attachment-service-C_8_poEv.d.ts.map +1 -0
- package/dist/{client-BnGewICj.d.ts → client-Cx43uuSO.d.ts} +2 -2
- package/dist/client-Cx43uuSO.d.ts.map +1 -0
- package/dist/{client-CXDpILj6.js → client-D_cBN8L-.js} +91 -3
- package/dist/client-D_cBN8L-.js.map +1 -0
- package/dist/{dispatch-BEI1Ai2b.js → dispatch-DLD1E-9L.js} +80 -8
- package/dist/dispatch-DLD1E-9L.js.map +1 -0
- package/dist/{document-by-id-bHT2FDHM.js → document-by-id-BGTnMWiG.js} +2 -2
- package/dist/{document-by-id-bHT2FDHM.js.map → document-by-id-BGTnMWiG.js.map} +1 -1
- package/dist/{document-model-modules-DAx3VAm3.js → document-model-modules-D_kT09sv.js} +254 -9
- package/dist/document-model-modules-D_kT09sv.js.map +1 -0
- package/dist/{document-operations-zQKFs_xu.js → document-operations-BdCl99y6.js} +777 -52
- package/dist/document-operations-BdCl99y6.js.map +1 -0
- package/dist/{global-DY0jZmcO.d.ts → global-C4kaLEPb.d.ts} +165 -53
- package/dist/global-C4kaLEPb.d.ts.map +1 -0
- package/dist/{index-DlZsXHpT.d.ts → index-CROGY3XV.d.ts} +2 -2
- package/dist/{index-DlZsXHpT.d.ts.map → index-CROGY3XV.d.ts.map} +1 -1
- package/dist/index.d.ts +55 -41
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +215 -53
- package/dist/index.js.map +1 -1
- package/dist/src/ai/index.js +2 -2
- package/dist/src/analytics/index.js +1 -1
- package/dist/src/graphql/client.d.ts +2 -2
- package/dist/src/graphql/client.js +1 -1
- package/dist/src/graphql-client/entry.d.ts +4 -4
- package/dist/src/graphql-client/entry.js +4 -4
- package/dist/src/renown/index.d.ts +1 -1
- package/dist/{switchboard-G3aKXjNx.js → switchboard-CqUq5pIZ.js} +10 -48
- package/dist/switchboard-CqUq5pIZ.js.map +1 -0
- package/dist/{types-0Fh1tNjy.d.ts → types-Vb8q55oM.d.ts} +69 -2
- package/dist/types-Vb8q55oM.d.ts.map +1 -0
- package/package.json +9 -9
- package/dist/attachment-service-BsOmg2-v.d.ts.map +0 -1
- package/dist/client-BnGewICj.d.ts.map +0 -1
- package/dist/client-CXDpILj6.js.map +0 -1
- package/dist/dispatch-BEI1Ai2b.js.map +0 -1
- package/dist/document-model-modules-DAx3VAm3.js.map +0 -1
- package/dist/document-operations-zQKFs_xu.js.map +0 -1
- package/dist/global-DY0jZmcO.d.ts.map +0 -1
- package/dist/switchboard-G3aKXjNx.js.map +0 -1
- package/dist/types-0Fh1tNjy.d.ts.map +0 -1
|
@@ -1,21 +1,29 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $ as IPackagesListener, Gt as IDocumentTypeCache, Ht as DocumentsOfTypeEntry, It as IReactorBrowserClient$1, Jt as PromiseState, Kt as IOperationCache, Lt as IReactorBrowserReadClient, Q as IPackageManager, Rt as IReactorBrowserWriteClient, Vt as DocumentRefetchState, Wt as IDocumentCache, Yt as PromiseWithState, Z as IPackageListerUnsubscribe, _ as SetPHGlobalValue$1, et as PackageManagerInstallResult, o as PHGlobal$1, qt as OperationsCacheEntry, y as UsePHGlobalValue$1 } from "./global-C4kaLEPb.js";
|
|
2
2
|
import { t as PGlite } from "./pglite-CntadC_p-DTkdF8sr.js";
|
|
3
|
-
import { A as
|
|
3
|
+
import { A as Sdk, C as GetDocumentQuery, D as PhDocumentFieldsFragment, M as ViewFilterInput, O as PropagationMode$1, S as GetDocumentOperationsQuery, T as JobChangesSubscription, b as DocumentChangesSubscription, c as ReactorGraphQLClient, g as ActionInput, j as SdkFunctionWrapper, k as Scalars } from "./types-Vb8q55oM.js";
|
|
4
4
|
import { ReactNode } from "react";
|
|
5
5
|
import { Action, DocumentModelLib, DocumentModelModule, Operation, PHDocument } from "document-model";
|
|
6
6
|
import { Action as Action$1, ActionSigningTarget, DocumentModelModule as DocumentModelModule$1, DocumentOperations, ISigner, Operation as Operation$1, PHBaseState, PHDocument as PHDocument$1, PHDocumentHeader, ProtocolVersions, SignaturePolicy } from "@powerhousedao/shared/document-model";
|
|
7
|
-
import { BatchExecutionRequest, BatchExecutionResult, Database, DocumentChangeEvent, DocumentModelSource, DocumentRelationship, IDocumentModelRegistry, IReactorClient, ISyncManager, JobInfo, OperationFilter, PagedResults, PagingOptions, PropagationMode, SearchFilter, ViewFilter } from "@powerhousedao/reactor";
|
|
8
|
-
import {
|
|
7
|
+
import { BatchExecutionRequest, BatchExecutionResult, ConsistencyToken, Database, DocumentChangeEvent, DocumentModelSource, DocumentRelationship, DriveNodeKind, DriveNodePage, DriveNodeRecord, IDocumentModelRegistry, IDriveNodeSource, IDriveReadClient, IReactorClient, ISyncManager, JobInfo, OperationFilter, PagedResults, PagingOptions, PropagationMode, SearchFilter, ViewFilter } from "@powerhousedao/reactor";
|
|
8
|
+
import { Node } from "@powerhousedao/shared/document-drive";
|
|
9
9
|
import { DocumentNode } from "graphql";
|
|
10
|
+
import { GraphQLClient, Variables } from "graphql-request";
|
|
10
11
|
import { IAttachmentService } from "@powerhousedao/reactor-attachments/client";
|
|
11
12
|
import { Kysely } from "kysely";
|
|
12
|
-
import { AddPHGlobalEventHandler, BrowserReactorClientModule, IReactorBrowserClient, SetPHGlobalValue, UsePHGlobalValue, WorkerReactorClientModule } from "@powerhousedao/reactor-browser";
|
|
13
|
+
import { AddPHGlobalEventHandler, BrowserReactorClientModule, IReactorBrowserClient, ReactorBrowserHalves, SetPHGlobalValue, UsePHGlobalValue, WorkerReactorClientModule } from "@powerhousedao/reactor-browser";
|
|
13
14
|
import { RegistryPackageSource } from "@powerhousedao/shared";
|
|
14
15
|
//#region src/document-refetcher.d.ts
|
|
15
16
|
/** The refetch snapshot of a document with nothing in flight and no kept failure. */
|
|
16
17
|
declare const IDLE_REFETCH_STATE: DocumentRefetchState;
|
|
17
18
|
//#endregion
|
|
18
19
|
//#region src/document-cache.d.ts
|
|
20
|
+
/**
|
|
21
|
+
* The reads a {@link DocumentCache} makes. `getMany` is optional: without it,
|
|
22
|
+
* a batch reads each uncached id with `get`.
|
|
23
|
+
*/
|
|
24
|
+
interface IDocumentCacheReader extends Pick<IReactorBrowserReadClient, "get" | "find" | "getOperations" | "subscribe">, Partial<Pick<IReactorBrowserReadClient, "getMany">> {}
|
|
25
|
+
/** The most ids one `getMany` call is asked for. */
|
|
26
|
+
declare const GET_MANY_CHUNK_SIZE = 100;
|
|
19
27
|
declare function addPromiseState<T>(promise: Promise<T>): PromiseWithState<T>;
|
|
20
28
|
declare function readPromiseState<T>(promise: Promise<T> | PromiseWithState<T>): PromiseState<T>;
|
|
21
29
|
/** The snapshot every uncached document scope reads as. One frozen object, so `useSyncExternalStore` sees a stable value. */
|
|
@@ -29,13 +37,14 @@ declare function isDocumentTypeCache(cache: unknown): cache is IDocumentTypeCach
|
|
|
29
37
|
/**
|
|
30
38
|
* Document cache implementation that uses the new ReactorClient API.
|
|
31
39
|
*
|
|
32
|
-
* This cache subscribes to document change events
|
|
40
|
+
* This cache subscribes to document change events through the client's read half
|
|
33
41
|
* and automatically updates the cache when documents are created, updated, or deleted.
|
|
42
|
+
* It is built over a browser client, whose `read` half it uses, or over a read
|
|
43
|
+
* half directly.
|
|
34
44
|
* It also holds paginated operation history per document scope (see `IOperationCache`),
|
|
35
45
|
* which is dropped for a document whenever a change event for it arrives.
|
|
36
46
|
*/
|
|
37
47
|
declare class DocumentCache implements IDocumentCache, IOperationCache, IDocumentTypeCache {
|
|
38
|
-
private client;
|
|
39
48
|
private documents;
|
|
40
49
|
private batchPromises;
|
|
41
50
|
private listeners;
|
|
@@ -58,7 +67,8 @@ declare class DocumentCache implements IDocumentCache, IOperationCache, IDocumen
|
|
|
58
67
|
private typeRequests;
|
|
59
68
|
private typeListeners;
|
|
60
69
|
private unsubscribe;
|
|
61
|
-
|
|
70
|
+
private readonly client;
|
|
71
|
+
constructor(client: IReactorBrowserClient$1 | IDocumentCacheReader);
|
|
62
72
|
private handleDocumentChange;
|
|
63
73
|
private handleDocumentDeleted;
|
|
64
74
|
private handleDocumentUpdated;
|
|
@@ -71,6 +81,19 @@ declare class DocumentCache implements IDocumentCache, IOperationCache, IDocumen
|
|
|
71
81
|
get(id: string, refetch?: boolean): Promise<PHDocument$1>;
|
|
72
82
|
getRefetchState(id: string): DocumentRefetchState;
|
|
73
83
|
getBatch(ids: string[]): Promise<PHDocument$1[]>;
|
|
84
|
+
/**
|
|
85
|
+
* Reserves an entry for every id not yet cached and fills them from
|
|
86
|
+
* `getMany`, in chunks of {@link GET_MANY_CHUNK_SIZE}. Each id keeps its own
|
|
87
|
+
* entry, settled as `get` would settle it.
|
|
88
|
+
*/
|
|
89
|
+
private loadMany;
|
|
90
|
+
/**
|
|
91
|
+
* `getMany` rejects when any id is unavailable, so a failed chunk is split
|
|
92
|
+
* in half and retried; a single id is read with `get`, so it settles exactly
|
|
93
|
+
* as a single read would.
|
|
94
|
+
*/
|
|
95
|
+
private settleMany;
|
|
96
|
+
private settleFetched;
|
|
74
97
|
subscribe(id: string | string[], callback: () => void): () => void;
|
|
75
98
|
getOperationsState(documentId: string, scope: string): OperationsCacheEntry;
|
|
76
99
|
loadOperations(documentId: string, scope: string, limit: number): void;
|
|
@@ -294,6 +317,37 @@ declare function ambientRenownTokenProvider(): Promise<string | undefined>;
|
|
|
294
317
|
*/
|
|
295
318
|
declare function makeAuthMiddleware(tokenProvider: BearerTokenProvider): SdkFunctionWrapper;
|
|
296
319
|
//#endregion
|
|
320
|
+
//#region src/graphql-client/drive-nodes.d.ts
|
|
321
|
+
/** The node queries a {@link GraphQLDriveNodeSource} runs. */
|
|
322
|
+
type DriveNodeQueries = Pick<Sdk, "GetDriveNodes" | "GetDriveNode" | "GetDriveDescendants">;
|
|
323
|
+
/**
|
|
324
|
+
* The reactor subgraph's type-neutral node queries (`driveNodes`, `driveNode`,
|
|
325
|
+
* `driveDescendants`) as an {@link IDriveNodeSource}, so a browser reads a
|
|
326
|
+
* legacy drive and a reactor-drive alike. The Switchboard serves only the
|
|
327
|
+
* nodes the caller may read. Drive ids must be canonical ids, not slugs.
|
|
328
|
+
*/
|
|
329
|
+
declare class GraphQLDriveNodeSource implements IDriveNodeSource {
|
|
330
|
+
private readonly queries;
|
|
331
|
+
private readonly headersFor;
|
|
332
|
+
constructor(queries: DriveNodeQueries, headersFor?: (driveId: string) => Record<string, string> | undefined);
|
|
333
|
+
getNode(driveId: string, nodeId: string, signal?: AbortSignal): Promise<DriveNodeRecord | undefined>;
|
|
334
|
+
listChildren(driveId: string, parentFolder: string | null | undefined, paging?: PagingOptions, signal?: AbortSignal, kind?: DriveNodeKind): Promise<DriveNodePage>;
|
|
335
|
+
getDescendants(driveId: string, root: string, signal?: AbortSignal): Promise<DriveNodeRecord[]>;
|
|
336
|
+
listAll(driveId: string, signal?: AbortSignal): Promise<DriveNodeRecord[]>;
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* `read.drives` over a node source: the reactor's {@link IDriveReadClient},
|
|
340
|
+
* answering in the legacy `Node` shape for every drive type.
|
|
341
|
+
*/
|
|
342
|
+
declare class GraphQLDriveReadClient implements IDriveReadClient {
|
|
343
|
+
private readonly nodes;
|
|
344
|
+
constructor(nodes: IDriveNodeSource);
|
|
345
|
+
getNode(driveIdentifier: string, nodeId: string, signal?: AbortSignal): Promise<Node>;
|
|
346
|
+
listNodes(driveIdentifier: string, parentFolder?: string | null, paging?: PagingOptions, signal?: AbortSignal): Promise<PagedResults<Node>>;
|
|
347
|
+
}
|
|
348
|
+
/** A node record in the legacy `Node` shape. */
|
|
349
|
+
declare function toLegacyNode(node: DriveNodeRecord): Node;
|
|
350
|
+
//#endregion
|
|
297
351
|
//#region src/graphql-client/errors.d.ts
|
|
298
352
|
/** A call the Switchboard GraphQL surface cannot express. */
|
|
299
353
|
declare class GraphQLOperationNotSupportedError extends Error {
|
|
@@ -328,6 +382,18 @@ declare class BatchJobFailedError extends Error {
|
|
|
328
382
|
constructor(key: string, jobs: Record<string, JobInfo>);
|
|
329
383
|
static isError(error: unknown): error is BatchJobFailedError;
|
|
330
384
|
}
|
|
385
|
+
/**
|
|
386
|
+
* The reactor's `JobFailedError`, rebuilt from a job the Switchboard reported
|
|
387
|
+
* FAILED; this entry imports the reactor for types only. A write handle's
|
|
388
|
+
* stage rejects with it. The message is the job error's message, as the
|
|
389
|
+
* reactor's is.
|
|
390
|
+
*/
|
|
391
|
+
declare class JobFailedError extends Error {
|
|
392
|
+
readonly name = "JobFailedError";
|
|
393
|
+
readonly job: JobInfo;
|
|
394
|
+
constructor(job: JobInfo);
|
|
395
|
+
static isError(error: unknown): error is JobFailedError;
|
|
396
|
+
}
|
|
331
397
|
//#endregion
|
|
332
398
|
//#region src/graphql-client/subgraph.d.ts
|
|
333
399
|
/**
|
|
@@ -503,6 +569,11 @@ type GraphQLReactorClientOptions = {
|
|
|
503
569
|
* and answers `false`. A branded property survives both.
|
|
504
570
|
*/
|
|
505
571
|
declare const graphQLReactorClientBrand: "__powerhouseGraphQLReactorClient";
|
|
572
|
+
/** The read half of {@link GraphQLReactorClient}: the hooks' reads plus `drives`. */
|
|
573
|
+
interface GraphQLReactorReadClient extends IReactorBrowserReadClient {
|
|
574
|
+
/** A drive's nodes from the node queries, for every drive type. */
|
|
575
|
+
readonly drives: IDriveReadClient;
|
|
576
|
+
}
|
|
506
577
|
/**
|
|
507
578
|
* A light implementation of {@link IReactorBrowserClient} that talks plain
|
|
508
579
|
* GraphQL to a Switchboard, with no reactor in the bundle.
|
|
@@ -527,8 +598,49 @@ declare class GraphQLReactorClient implements IReactorBrowserClient$1 {
|
|
|
527
598
|
private realtimeErrorLogged;
|
|
528
599
|
/** Whether the last socket died because the Switchboard refused its credentials. */
|
|
529
600
|
private realtimeRefusedCredentials;
|
|
601
|
+
/** The socket write handles wait on; opened by the first stage wait. */
|
|
602
|
+
private jobSocket;
|
|
603
|
+
/** Set once the `jobChanges` subscription failed; stage waits then only poll. */
|
|
604
|
+
private jobRealtimeBroken;
|
|
605
|
+
/** Set once the Switchboard refused the `document` query's `consistency` argument. */
|
|
606
|
+
private consistencyUnsupported;
|
|
607
|
+
private readonly driveNodes;
|
|
608
|
+
/**
|
|
609
|
+
* The read half: the reads the hooks make. Every method is this client's
|
|
610
|
+
* own; nothing that writes is reachable from it.
|
|
611
|
+
*/
|
|
612
|
+
readonly read: GraphQLReactorReadClient;
|
|
613
|
+
/**
|
|
614
|
+
* The write half. `execute` submits through `executeAsync` and hands back a
|
|
615
|
+
* handle whose `written` and `readable` resolve from `jobStatus`, woken by
|
|
616
|
+
* the `jobChanges` subscription when realtime is on, and whose `document()`
|
|
617
|
+
* runs the `document` query bounded by the receipt's token. `create` and
|
|
618
|
+
* `deleteDocument` have no asynchronous mutation: they run the synchronous
|
|
619
|
+
* ones and hand back a settled handle.
|
|
620
|
+
*/
|
|
621
|
+
readonly write: IReactorBrowserWriteClient;
|
|
530
622
|
constructor(options: GraphQLReactorClientOptions);
|
|
531
|
-
|
|
623
|
+
/**
|
|
624
|
+
* The Switchboard's drive node queries as a node source, for every drive
|
|
625
|
+
* type. `read.drives` answers from it.
|
|
626
|
+
*/
|
|
627
|
+
nodeSource(): IDriveNodeSource;
|
|
628
|
+
/**
|
|
629
|
+
* Reads a document. With a consistency token that names any coordinate, the
|
|
630
|
+
* Switchboard waits until its read models hold them; one without the
|
|
631
|
+
* `document` query's `consistency` argument is read without it, which after
|
|
632
|
+
* a write's `readable` stage still sees the write on a single node.
|
|
633
|
+
*/
|
|
634
|
+
get<TDocument extends PHDocument>(identifier: string, view?: ViewFilter, signal?: AbortSignal, consistencyToken?: ConsistencyToken): Promise<TDocument>;
|
|
635
|
+
/**
|
|
636
|
+
* Reads documents by id, in the order given; throws if any is missing. Each
|
|
637
|
+
* chunk of {@link GET_MANY_CHUNK_SIZE} ids is one request holding an aliased
|
|
638
|
+
* `document` field per id, with the selection and arguments `get` sends.
|
|
639
|
+
*/
|
|
640
|
+
getMany<TDocument extends PHDocument>(documentIds: string[], view?: ViewFilter, signal?: AbortSignal, consistencyToken?: ConsistencyToken): Promise<TDocument[]>;
|
|
641
|
+
/** One chunk of `getMany`, with the `consistency` argument while the Switchboard accepts it. */
|
|
642
|
+
private getDocumentChunk;
|
|
643
|
+
private runGetDocuments;
|
|
532
644
|
/**
|
|
533
645
|
* Whether the Switchboard would serve the document to this client's caller,
|
|
534
646
|
* from its `documentServed` query: the same read gate `find` passes. Absent
|
|
@@ -600,6 +712,8 @@ declare class GraphQLReactorClient implements IReactorBrowserClient$1 {
|
|
|
600
712
|
executeBatch(request: BatchExecutionRequest, signal?: AbortSignal): Promise<BatchExecutionResult>;
|
|
601
713
|
/** The job as `jobStatus` reports it now; `undefined` when it reports none. */
|
|
602
714
|
getJob(jobId: string, signal?: AbortSignal): Promise<JobInfo | undefined>;
|
|
715
|
+
/** The job as `jobStatus` reports it now; throws when it reports none. */
|
|
716
|
+
getJobStatus(jobId: string, signal?: AbortSignal): Promise<JobInfo>;
|
|
603
717
|
/** Polls `jobStatus` until the job is READ_READY or FAILED. */
|
|
604
718
|
waitForJob(jobOrId: string | JobInfo, signal?: AbortSignal): Promise<JobInfo>;
|
|
605
719
|
/**
|
|
@@ -738,6 +852,40 @@ declare class GraphQLReactorClient implements IReactorBrowserClient$1 {
|
|
|
738
852
|
* {@link PagedResults}, restoring each edge's `Date` fields.
|
|
739
853
|
*/
|
|
740
854
|
private toRelationshipResults;
|
|
855
|
+
/**
|
|
856
|
+
* The write half's `execute`: signs as the facade's `execute` does, submits
|
|
857
|
+
* through `executeAsync` and returns once the job is accepted. When anyone
|
|
858
|
+
* subscribes, the document is read back once the job is readable and
|
|
859
|
+
* announced as `Updated`, as the facade's `execute` announces it; the handle
|
|
860
|
+
* shares that read with its own `document()`.
|
|
861
|
+
*/
|
|
862
|
+
private submitExecute;
|
|
863
|
+
/** The write half's `create`: the synchronous mutation, a settled handle. */
|
|
864
|
+
private submitCreate;
|
|
865
|
+
/** The write half's `deleteDocument`: the synchronous mutation, a settled handle. */
|
|
866
|
+
private submitDeleteDocument;
|
|
867
|
+
/** Reads a write's document back, bounded by its receipt's token. */
|
|
868
|
+
private handleReader;
|
|
869
|
+
/** Announces a write's document as `Updated` once it is readable. */
|
|
870
|
+
private announceWrite;
|
|
871
|
+
/**
|
|
872
|
+
* Waits for a job to settle a stage, resolving with a FAILED job too. Polls
|
|
873
|
+
* `jobStatus` with a doubling interval; with realtime on, a `jobChanges`
|
|
874
|
+
* event for the job wakes the wait early and the interval is only a safety
|
|
875
|
+
* net. A failed subscription is logged once and the wait keeps polling.
|
|
876
|
+
*/
|
|
877
|
+
private waitForStage;
|
|
878
|
+
/**
|
|
879
|
+
* Subscribes to one job's `jobChanges` when realtime is on and the
|
|
880
|
+
* subscription has not failed before. Returns the stop function, or
|
|
881
|
+
* undefined when nothing was subscribed.
|
|
882
|
+
*/
|
|
883
|
+
private watchJob;
|
|
884
|
+
/**
|
|
885
|
+
* The `document` query with the `consistency` argument, or without it once
|
|
886
|
+
* the Switchboard has refused the argument.
|
|
887
|
+
*/
|
|
888
|
+
private getDocumentAtConsistency;
|
|
741
889
|
/**
|
|
742
890
|
* Opens the realtime socket on the first subscriber.
|
|
743
891
|
*
|
|
@@ -803,6 +951,8 @@ declare class GraphQLReactorClient implements IReactorBrowserClient$1 {
|
|
|
803
951
|
*/
|
|
804
952
|
private emitChange;
|
|
805
953
|
}
|
|
954
|
+
/** {@link GraphQLReactorClient.nodeSource}, as a function. */
|
|
955
|
+
declare function createGraphQLDriveNodeSource(client: GraphQLReactorClient): IDriveNodeSource;
|
|
806
956
|
/**
|
|
807
957
|
* Whether a value is a {@link GraphQLReactorClient}, including one built by
|
|
808
958
|
* another copy of this module.
|
|
@@ -992,6 +1142,33 @@ type MutateDocumentWithOperationsResult = {
|
|
|
992
1142
|
} | null;
|
|
993
1143
|
};
|
|
994
1144
|
};
|
|
1145
|
+
/**
|
|
1146
|
+
* `document`, bounded by a consistency token: the read waits until the
|
|
1147
|
+
* Switchboard's read models hold every operation the token names. The
|
|
1148
|
+
* `consistency` argument is additive on the Switchboard; one without it refuses
|
|
1149
|
+
* this document, and the client falls back to the plain `GetDocument`.
|
|
1150
|
+
*/
|
|
1151
|
+
declare const GetDocumentAtConsistencyDocument: import("graphql").DocumentNode;
|
|
1152
|
+
type GetDocumentAtConsistencyVariables = {
|
|
1153
|
+
identifier: Scalars["String"]["input"];
|
|
1154
|
+
view?: ViewFilterInput;
|
|
1155
|
+
consistency: {
|
|
1156
|
+
version: number;
|
|
1157
|
+
createdAtUtcIso: string;
|
|
1158
|
+
coordinates: ReadonlyArray<{
|
|
1159
|
+
documentId: string;
|
|
1160
|
+
scope: string;
|
|
1161
|
+
branch: string;
|
|
1162
|
+
operationIndex: number;
|
|
1163
|
+
}>;
|
|
1164
|
+
};
|
|
1165
|
+
};
|
|
1166
|
+
type GetDocumentAtConsistencyResult = {
|
|
1167
|
+
readonly document?: {
|
|
1168
|
+
readonly document: PhDocumentFieldsFragment;
|
|
1169
|
+
readonly childIds: ReadonlyArray<string>;
|
|
1170
|
+
} | null;
|
|
1171
|
+
};
|
|
995
1172
|
//#endregion
|
|
996
1173
|
//#region src/graphql-client/signing.d.ts
|
|
997
1174
|
/**
|
|
@@ -1143,6 +1320,33 @@ declare function isAuthRefusalClose(error: unknown): boolean;
|
|
|
1143
1320
|
* socket. It is safe to call more than once.
|
|
1144
1321
|
*/
|
|
1145
1322
|
declare function startDocumentChangesSubscription(options: DocumentChangesSubscriptionOptions): () => void;
|
|
1323
|
+
/** The `jobChanges` payload, exactly as the Switchboard sends it. */
|
|
1324
|
+
type JobChangesEventPayload = JobChangesSubscription["jobChanges"];
|
|
1325
|
+
/**
|
|
1326
|
+
* One socket carrying `jobChanges` subscriptions, one per watched job. The
|
|
1327
|
+
* socket opens on the first watch and closes when nothing is watched.
|
|
1328
|
+
*/
|
|
1329
|
+
interface IJobChangesSocket {
|
|
1330
|
+
/**
|
|
1331
|
+
* Watches one job. `onEvent` is called per status change the Switchboard
|
|
1332
|
+
* reports; `onError` once if the subscription fails. Returns the stop
|
|
1333
|
+
* function, safe to call more than once.
|
|
1334
|
+
*/
|
|
1335
|
+
watch(jobId: string, onEvent: (event: JobChangesEventPayload) => void, onError: (error: unknown) => void): () => void;
|
|
1336
|
+
/** Closes the socket; a later watch opens a new one. */
|
|
1337
|
+
dispose(): void;
|
|
1338
|
+
}
|
|
1339
|
+
type JobChangesSocketOptions = {
|
|
1340
|
+
/** The websocket endpoint, e.g. `ws://localhost:4001/graphql/subscriptions`. */
|
|
1341
|
+
wsUrl: string;
|
|
1342
|
+
/** Resolves the `ConnectionInit` payload, per connect. */
|
|
1343
|
+
connectionParams?: () => Promise<ConnectionParams>;
|
|
1344
|
+
};
|
|
1345
|
+
/**
|
|
1346
|
+
* Opens the socket write handles wait on. `graphql-ws` multiplexes every
|
|
1347
|
+
* watched job over it and closes it once the last watch stops.
|
|
1348
|
+
*/
|
|
1349
|
+
declare function createJobChangesSocket(options: JobChangesSocketOptions): IJobChangesSocket;
|
|
1146
1350
|
/**
|
|
1147
1351
|
* Derives the websocket endpoint from the GraphQL http endpoint.
|
|
1148
1352
|
*
|
|
@@ -1305,8 +1509,15 @@ declare const setReactorClientModule: SetPHGlobalValue<BrowserReactorClientModul
|
|
|
1305
1509
|
declare const addReactorClientModuleEventHandler: AddPHGlobalEventHandler;
|
|
1306
1510
|
/** Returns the reactor client */
|
|
1307
1511
|
declare const useReactorClient: UsePHGlobalValue<IReactorBrowserClient>;
|
|
1308
|
-
/**
|
|
1512
|
+
/**
|
|
1513
|
+
* Sets the reactor client, and `window.ph.reactor` to its read and write
|
|
1514
|
+
* halves. A client without halves leaves `reactor` unset.
|
|
1515
|
+
*/
|
|
1309
1516
|
declare const setReactorClient: SetPHGlobalValue<IReactorBrowserClient>;
|
|
1517
|
+
/** Returns the reactor client's read and write halves */
|
|
1518
|
+
declare const useReactorHalves: UsePHGlobalValue<ReactorBrowserHalves>;
|
|
1519
|
+
/** Adds an event handler for the reactor client's halves */
|
|
1520
|
+
declare const addReactorHalvesEventHandler: AddPHGlobalEventHandler;
|
|
1310
1521
|
/** Adds an event handler for the reactor client */
|
|
1311
1522
|
declare const addReactorClientEventHandler: AddPHGlobalEventHandler;
|
|
1312
1523
|
/** Sets the client full-client actions use instead of the module's */
|
|
@@ -1407,6 +1618,6 @@ declare const setAttachmentService: SetPHGlobalValue<IAttachmentService>;
|
|
|
1407
1618
|
/** Registers the attachmentService window event handler */
|
|
1408
1619
|
declare const addAttachmentServiceEventHandler: AddPHGlobalEventHandler;
|
|
1409
1620
|
//#endregion
|
|
1410
|
-
export {
|
|
1621
|
+
export { prepareSignedActions as $, MergeHandler as $t, addDocumentCacheEventHandler as A, JobFailedError as At, DocumentChangesEventPayload as B, RevisionsListSelection as Bt, useModelRegistry as C, SubgraphSdkRegistry as Ct, useReactorHalves as D, BatchJobFailedError as Dt, useReactorClientModule as E, subgraphUrlFromGraphqlUrl as Et, useDocuments as F, BearerTokenProvider as Ft, createJobChangesSocket as G, ConflictInfo as Gt, IJobChangesSocket as H, phDocumentFromGetDocument as Ht, useGetDocument as I, ambientRenownTokenProvider as It, startDocumentChangesSubscription as J, GetDocumentResult as Jt, isAuthRefusalClose as K, ConflictStrategy as Kt, useGetDocumentAsync as L, makeAuthMiddleware as Lt, useDocument as M, GraphQLDriveNodeSource as Mt, useDocumentCache as N, GraphQLDriveReadClient as Nt, useSync as O, GraphQLOperationNotSupportedError as Ot, useDocumentSafe as P, toLegacyNode as Pt, resolveDocumentModelModule as Q, IRemoteController as Qt, useGetDocuments as R, GetDocumentQueryFields as Rt, useDatabase as S, SubgraphSdkFactory as St, useReactorClient as T, describeGraphQLDocument as Tt, JobChangesEventPayload as U, phDocumentFromMutation as Ut, DocumentChangesSubscriptionOptions as V, isoStringFromDateTime as Vt, JobChangesSocketOptions as W, revisionMapFromRevisionsList as Wt, StaticPackageManager as X, GetOperationsResult as Xt, subscriptionsUrlFromGraphqlUrl as Y, GetDocumentWithOperationsResult as Yt, packageFromDocumentModels as Z, IRemoteClient as Zt, addReactorHalvesEventHandler as _, readPromiseState as _n, createGraphQLDriveNodeSource as _t, DocumentOperationsState as a, RemoteOperation as an, MutateDocumentWithOperationsDocument as at, setReactorClient as b, viewFilterInputFromViewFilter as bt, useDocumentModelModuleById as c, TrackedAction as cn, ReactorOperationFieldsFragmentDoc as ct, UseDispatchResult as d, IDLE_DOCUMENTS_OF_TYPE_ENTRY as dn, ensurePHEventHandlers as dt, PushResult as en, signStampedAction as et, createDispatch as f, IDLE_OPERATIONS_ENTRY as fn, useSwitchboardClient as ft, addReactorClientModuleEventHandler as g, isOperationCache as gn, GraphQLReactorReadClient as gt, addReactorClientEventHandler as h, isDocumentTypeCache as hn, GraphQLReactorClientOptions as ht, DocumentOperationsResult as i, RemoteDocumentData as in, GetDocumentAtConsistencyVariables as it, setDocumentCache as j, DriveNodeQueries as jt, useSyncList as k, GraphQLWrongBackendError as kt, useDocumentModelModules as l, DocumentCache as ln, GraphQLReactorProvider as lt, addFullReactorClientEventHandler as m, addPromiseState as mn, GraphQLReactorClient as mt, setAttachmentService as n, RemoteControllerOptions as nn, GetDocumentAtConsistencyDocument as nt, UseDocumentOperationsOptions as o, RemoteOperationResultPage as on, MutateDocumentWithOperationsResult as ot, useDispatch as p, IDocumentCacheReader as pn, DriveIdCall as pt, makeAuthConnectionParams as q, DocumentChangeListener as qt, useAttachmentService as r, RemoteDocumentChangeEvent as rn, GetDocumentAtConsistencyResult as rt, useDocumentOperations as s, SyncStatus$1 as sn, MutateDocumentWithOperationsVariables as st, addAttachmentServiceEventHandler as t, RemoteControllerGraphQLClient as tn, stampAction as tt, DispatchFn as u, GET_MANY_CHUNK_SIZE as un, GraphQLReactorProviderProps as ut, getFullReactorClient as v, IDLE_REFETCH_STATE as vn, findIsServableOverGraphQL as vt, usePGlite as w, TypedGraphQLDocument as wt, setReactorClientModule as x, GraphQLRequestOptions as xt, setFullReactorClient as y, isGraphQLReactorClient as yt, ConnectionParams as z, GetDocumentQueryResult as zt };
|
|
1411
1622
|
export {};
|
|
1412
|
-
//# sourceMappingURL=attachment-service-
|
|
1623
|
+
//# sourceMappingURL=attachment-service-C_8_poEv.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attachment-service-C_8_poEv.d.ts","names":[],"sources":["../src/document-refetcher.ts","../src/document-cache.ts","../src/remote-controller/types.ts","../src/graphql-client/adapter.ts","../src/graphql-client/auth.ts","../src/graphql-client/drive-nodes.ts","../src/graphql-client/errors.ts","../src/graphql-client/subgraph.ts","../src/graphql-client/graphql-reactor-client.ts","../src/graphql-client/graphql-reactor-provider.tsx","../src/graphql-client/operations.ts","../src/graphql-client/signing.ts","../src/graphql-client/static-package-manager.ts","../src/graphql-client/subscriptions.ts","../src/hooks/document-cache.ts","../src/hooks/reactor.ts","../src/hooks/dispatch.ts","../src/hooks/document-model-modules.ts","../src/hooks/document-operations.ts","../src/hooks/attachment-service.ts"],"mappings":";;;;;;;;;;;;;;;;cASa,oBAAoB;;;;;;;UCmBhB,6BAEb,KACE,4EAGF,QAAQ,KAAK;;cAGJ;iBAEG,gBAAgB,GAAG,SAAS,QAAQ,KAAK,iBAAiB;iBAwB1D,iBAAiB,GAC/B,SAAS,QAAQ,KAAK,iBAAiB,KACtC,aAAa;;cA4BH,uBAAuB;;iBAQpB,iBAAiB,iBAAiB,SAAS;;cAa9C,8BAA8B;;iBAU3B,oBACd,iBACC,SAAS;;;;;;;;;;;cAuFC,yBACA,gBAAgB,iBAAiB;UAEpC;UACA;UAIA;UAEA;;;;;;;;UAkBA;;UAGA;;UAKA;UACA;;UAGA;UACA;UACA;UAEA;mBACS;EAEjB,YAAY,QAAQ,0BAAwB;UAUpC;UAwBA;UAeM;UAON;;UAOA;;UAKA;UAMA;EAQR,IAAI,YAAY,oBAAoB,QA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1,4 @@
|
|
|
1
|
-
import { c as ReactorGraphQLClient,
|
|
1
|
+
import { c as ReactorGraphQLClient, j as SdkFunctionWrapper } from "./types-Vb8q55oM.js";
|
|
2
2
|
import { GraphQLClient } from "graphql-request";
|
|
3
3
|
//#region src/graphql/client.d.ts
|
|
4
4
|
/**
|
|
@@ -11,4 +11,4 @@ declare function createClient(urlOrGQLClient: string | GraphQLClient, middleware
|
|
|
11
11
|
//#endregion
|
|
12
12
|
export { createClient as t };
|
|
13
13
|
export {};
|
|
14
|
-
//# sourceMappingURL=client-
|
|
14
|
+
//# sourceMappingURL=client-Cx43uuSO.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-Cx43uuSO.d.ts","names":[],"sources":["../src/graphql/client.ts"],"mappings":";;;;;;;;;iBA4BgB,aACd,yBAAyB,eACzB,aAAa,qBACZ"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GraphQLClient } from "graphql-request";
|
|
2
1
|
import { gql } from "graphql-tag";
|
|
2
|
+
import { GraphQLClient } from "graphql-request";
|
|
3
3
|
//#region src/graphql/gen/schema.ts
|
|
4
4
|
let PropagationMode = /* @__PURE__ */ function(PropagationMode) {
|
|
5
5
|
PropagationMode["Cascade"] = "CASCADE";
|
|
@@ -59,6 +59,23 @@ const JobInfoFieldsFragmentDoc = gql`
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
`;
|
|
62
|
+
const DriveNodeFieldsFragmentDoc = gql`
|
|
63
|
+
fragment DriveNodeFields on DriveNode {
|
|
64
|
+
... on DriveFileNode {
|
|
65
|
+
id
|
|
66
|
+
driveId
|
|
67
|
+
name
|
|
68
|
+
parentFolder
|
|
69
|
+
documentType
|
|
70
|
+
}
|
|
71
|
+
... on DriveFolderNode {
|
|
72
|
+
id
|
|
73
|
+
driveId
|
|
74
|
+
name
|
|
75
|
+
parentFolder
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
`;
|
|
62
79
|
const GetDocumentModelsDocument = gql`
|
|
63
80
|
query GetDocumentModels($namespace: String, $paging: PagingInput) {
|
|
64
81
|
documentModels(namespace: $namespace, paging: $paging) {
|
|
@@ -309,6 +326,44 @@ const GetCreateDefaultsDocument = gql`
|
|
|
309
326
|
}
|
|
310
327
|
}
|
|
311
328
|
`;
|
|
329
|
+
const GetDriveNodesDocument = gql`
|
|
330
|
+
query GetDriveNodes(
|
|
331
|
+
$driveId: ID!
|
|
332
|
+
$parentFolder: ID
|
|
333
|
+
$paging: PagingInput
|
|
334
|
+
$kind: DriveNodeKind
|
|
335
|
+
) {
|
|
336
|
+
driveNodes(
|
|
337
|
+
driveId: $driveId
|
|
338
|
+
parentFolder: $parentFolder
|
|
339
|
+
paging: $paging
|
|
340
|
+
kind: $kind
|
|
341
|
+
) {
|
|
342
|
+
results {
|
|
343
|
+
...DriveNodeFields
|
|
344
|
+
}
|
|
345
|
+
nextCursor
|
|
346
|
+
hasMore
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
${DriveNodeFieldsFragmentDoc}
|
|
350
|
+
`;
|
|
351
|
+
const GetDriveNodeDocument = gql`
|
|
352
|
+
query GetDriveNode($driveId: ID!, $id: ID!) {
|
|
353
|
+
driveNode(driveId: $driveId, id: $id) {
|
|
354
|
+
...DriveNodeFields
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
${DriveNodeFieldsFragmentDoc}
|
|
358
|
+
`;
|
|
359
|
+
const GetDriveDescendantsDocument = gql`
|
|
360
|
+
query GetDriveDescendants($driveId: ID!, $root: ID!) {
|
|
361
|
+
driveDescendants(driveId: $driveId, root: $root) {
|
|
362
|
+
...DriveNodeFields
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
${DriveNodeFieldsFragmentDoc}
|
|
366
|
+
`;
|
|
312
367
|
const EvaluateActionsDocument = gql`
|
|
313
368
|
query EvaluateActions(
|
|
314
369
|
$documentIdentifier: String!
|
|
@@ -787,6 +842,39 @@ function getSdk(client, withWrapper = defaultWrapper) {
|
|
|
787
842
|
signal
|
|
788
843
|
}), "GetCreateDefaults", "query", variables);
|
|
789
844
|
},
|
|
845
|
+
GetDriveNodes(variables, requestHeaders, signal) {
|
|
846
|
+
return withWrapper((wrappedRequestHeaders) => client.request({
|
|
847
|
+
document: GetDriveNodesDocument,
|
|
848
|
+
variables,
|
|
849
|
+
requestHeaders: {
|
|
850
|
+
...requestHeaders,
|
|
851
|
+
...wrappedRequestHeaders
|
|
852
|
+
},
|
|
853
|
+
signal
|
|
854
|
+
}), "GetDriveNodes", "query", variables);
|
|
855
|
+
},
|
|
856
|
+
GetDriveNode(variables, requestHeaders, signal) {
|
|
857
|
+
return withWrapper((wrappedRequestHeaders) => client.request({
|
|
858
|
+
document: GetDriveNodeDocument,
|
|
859
|
+
variables,
|
|
860
|
+
requestHeaders: {
|
|
861
|
+
...requestHeaders,
|
|
862
|
+
...wrappedRequestHeaders
|
|
863
|
+
},
|
|
864
|
+
signal
|
|
865
|
+
}), "GetDriveNode", "query", variables);
|
|
866
|
+
},
|
|
867
|
+
GetDriveDescendants(variables, requestHeaders, signal) {
|
|
868
|
+
return withWrapper((wrappedRequestHeaders) => client.request({
|
|
869
|
+
document: GetDriveDescendantsDocument,
|
|
870
|
+
variables,
|
|
871
|
+
requestHeaders: {
|
|
872
|
+
...requestHeaders,
|
|
873
|
+
...wrappedRequestHeaders
|
|
874
|
+
},
|
|
875
|
+
signal
|
|
876
|
+
}), "GetDriveDescendants", "query", variables);
|
|
877
|
+
},
|
|
790
878
|
EvaluateActions(variables, requestHeaders, signal) {
|
|
791
879
|
return withWrapper((wrappedRequestHeaders) => client.request({
|
|
792
880
|
document: EvaluateActionsDocument,
|
|
@@ -1129,6 +1217,6 @@ function createClient(urlOrGQLClient, middleware) {
|
|
|
1129
1217
|
};
|
|
1130
1218
|
}
|
|
1131
1219
|
//#endregion
|
|
1132
|
-
export {
|
|
1220
|
+
export { PhDocumentFieldsFragmentDoc as a, JobChangesDocument as i, DocumentChangesDocument as n, PropagationMode as o, GetDocumentWithOperationsDocument as r, createClient as t };
|
|
1133
1221
|
|
|
1134
|
-
//# sourceMappingURL=client-
|
|
1222
|
+
//# sourceMappingURL=client-D_cBN8L-.js.map
|