@powerhousedao/reactor-browser 6.2.3-dev.77 → 6.2.3-dev.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/{attachment-service-D-CKdGUb.d.ts → attachment-service-BoLudaH0.d.ts} +128 -30
  2. package/dist/attachment-service-BoLudaH0.d.ts.map +1 -0
  3. package/dist/{client-CI-3xGMZ.js → client-BUpynoY6.js} +114 -2
  4. package/dist/client-BUpynoY6.js.map +1 -0
  5. package/dist/{client-Ca_CA8VC.d.ts → client-XPGQrO4a.d.ts} +2 -2
  6. package/dist/client-XPGQrO4a.d.ts.map +1 -0
  7. package/dist/{dispatch-qujH7vLW.js → dispatch-C8J9jQ-o.js} +77 -9
  8. package/dist/dispatch-C8J9jQ-o.js.map +1 -0
  9. package/dist/{document-by-id-D1wsYWhq.js → document-by-id-Dpp76ZNE.js} +2 -2
  10. package/dist/{document-by-id-D1wsYWhq.js.map → document-by-id-Dpp76ZNE.js.map} +1 -1
  11. package/dist/{document-model-modules-DmLQhKvh.js → document-model-modules-XrYfGXt8.js} +254 -9
  12. package/dist/document-model-modules-XrYfGXt8.js.map +1 -0
  13. package/dist/{document-operations-C4-irgHD.js → document-operations-B0GZilXW.js} +452 -171
  14. package/dist/document-operations-B0GZilXW.js.map +1 -0
  15. package/dist/{global-CgzlPBc3.d.ts → global-BlOVLagj.d.ts} +140 -54
  16. package/dist/global-BlOVLagj.d.ts.map +1 -0
  17. package/dist/{index-CrVfRJO1.d.ts → index-Ck5Q0beA.d.ts} +2 -2
  18. package/dist/{index-CrVfRJO1.d.ts.map → index-Ck5Q0beA.d.ts.map} +1 -1
  19. package/dist/index.d.ts +69 -61
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +304 -87
  22. package/dist/index.js.map +1 -1
  23. package/dist/src/ai/index.js +2 -2
  24. package/dist/src/analytics/index.js +1 -1
  25. package/dist/src/graphql/client.d.ts +2 -2
  26. package/dist/src/graphql/client.js +1 -1
  27. package/dist/src/graphql-client/entry.d.ts +4 -4
  28. package/dist/src/graphql-client/entry.js +4 -4
  29. package/dist/src/renown/index.d.ts +1 -1
  30. package/dist/{switchboard-0yDJ-f9X.js → switchboard-CYTCYt4Z.js} +10 -48
  31. package/dist/switchboard-CYTCYt4Z.js.map +1 -0
  32. package/dist/{types-DOY-eHEk.d.ts → types-BNVqRNli.d.ts} +79 -2
  33. package/dist/types-BNVqRNli.d.ts.map +1 -0
  34. package/package.json +9 -9
  35. package/dist/attachment-service-D-CKdGUb.d.ts.map +0 -1
  36. package/dist/client-CI-3xGMZ.js.map +0 -1
  37. package/dist/client-Ca_CA8VC.d.ts.map +0 -1
  38. package/dist/dispatch-qujH7vLW.js.map +0 -1
  39. package/dist/document-model-modules-DmLQhKvh.js.map +0 -1
  40. package/dist/document-operations-C4-irgHD.js.map +0 -1
  41. package/dist/global-CgzlPBc3.d.ts.map +0 -1
  42. package/dist/switchboard-0yDJ-f9X.js.map +0 -1
  43. package/dist/types-DOY-eHEk.d.ts.map +0 -1
@@ -1,23 +1,55 @@
1
- import { Ct as PromiseState, D as IPackageManager, E as IPackageListerUnsubscribe, O as IPackagesListener, St as OperationsCacheEntry, _ as SetPHGlobalValue$1, _t as DocumentsOfTypeEntry, bt as IDocumentTypeCache, dt as IReactorBrowserClient$1, ft as IReactorBrowserReadClient, gt as DocumentRefetchState, k as PackageManagerInstallResult, o as PHGlobal$1, pt as IReactorBrowserWriteClient, wt as PromiseWithState, xt as IOperationCache, y as UsePHGlobalValue$1, yt as IDocumentCache } from "./global-CgzlPBc3.js";
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-BlOVLagj.js";
2
2
  import { t as PGlite } from "./pglite-CntadC_p-DTkdF8sr.js";
3
- import { A as SdkFunctionWrapper, C as GetDocumentQuery, D as PhDocumentFieldsFragment, O as PropagationMode$1, S as GetDocumentOperationsQuery, T as JobChangesSubscription, b as DocumentChangesSubscription, c as ReactorGraphQLClient, g as ActionInput, j as ViewFilterInput, k as Scalars } from "./types-DOY-eHEk.js";
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-BNVqRNli.js";
4
4
  import { ReactNode } from "react";
5
5
  import { Action, DocumentModelLib, DocumentModelModule, Operation, PHDocument } from "document-model";
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, ConsistencyToken, Database, DocumentChangeEvent, DocumentModelSource, DocumentRelationship, IDocumentModelRegistry, IReactorClient, ISyncManager, JobInfo, OperationFilter, PagedResults, PagingOptions, PropagationMode, SearchFilter, ViewFilter } from "@powerhousedao/reactor";
8
- import { GraphQLClient, Variables } from "graphql-request";
6
+ import { Action as Action$1, ActionSigningTarget, DispatchOutcome, 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, ConsistencyToken, CreateProtocolVersionsOptions, Database, DocumentChangeEvent, DocumentModelSource, DocumentRelationship, DriveNodeKind, DriveNodePage, DriveNodeRecord, IDocumentModelRegistry, IDriveNodeSource, IDriveReadClient, IReactorClient, ISyncManager, JobInfo, NewDocumentOptions, 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
13
  import { AddPHGlobalEventHandler, BrowserReactorClientModule, IReactorBrowserClient, ReactorBrowserHalves, SetPHGlobalValue, UsePHGlobalValue, WorkerReactorClientModule } from "@powerhousedao/reactor-browser";
13
14
  import { RegistryPackageSource } from "@powerhousedao/shared";
15
+ //#region src/actions/dispatch.d.ts
16
+ /** Called once the write lands; `outcome.rejected` is empty when every action applied. */
17
+ type DispatchSuccessCallback = (result: PHDocument$1, outcome: DispatchOutcome) => void;
18
+ /**
19
+ * Dispatches actions to a document.
20
+ * @param actionOrActions - The action or actions to dispatch.
21
+ * @param document - The document to dispatch actions to.
22
+ * @param onErrors - Callback invoked with an `OperationRejectedError` for each action the
23
+ * document did not apply, or with why nothing was dispatched. Runs before `onSuccess`.
24
+ * @param onSuccess - Callback invoked with the updated document once the write lands, after
25
+ * `onErrors` and also when an action was rejected; `outcome.rejected` lists the rejections.
26
+ * @returns The updated document, or undefined if the dispatch failed.
27
+ */
28
+ declare function dispatchActions<TDocument = PHDocument$1, TAction = Action$1>(actionOrActions: TAction[] | TAction | undefined, document: TDocument | undefined, onErrors?: (errors: Error[]) => void, onSuccess?: DispatchSuccessCallback): Promise<PHDocument$1 | undefined>;
29
+ /**
30
+ * Dispatches actions to a document.
31
+ * @param actionOrActions - The action or actions to dispatch.
32
+ * @param documentId - The ID of the document to dispatch actions to.
33
+ * @param onErrors - Callback invoked with an `OperationRejectedError` for each action the
34
+ * document did not apply. Runs before `onSuccess`.
35
+ * @param onSuccess - Callback invoked with the updated document once the write lands, after
36
+ * `onErrors` and also when an action was rejected; `outcome.rejected` lists the rejections.
37
+ * @returns The updated document, or undefined if the dispatch failed.
38
+ */
39
+ declare function dispatchActions(actionOrActions: Action$1[] | Action$1 | undefined, documentId: string, onErrors?: (errors: Error[]) => void, onSuccess?: DispatchSuccessCallback): Promise<PHDocument$1 | undefined>;
40
+ //#endregion
14
41
  //#region src/document-refetcher.d.ts
15
42
  /** The refetch snapshot of a document with nothing in flight and no kept failure. */
16
43
  declare const IDLE_REFETCH_STATE: DocumentRefetchState;
17
44
  //#endregion
18
45
  //#region src/document-cache.d.ts
19
- /** The reads a {@link DocumentCache} makes. */
20
- interface IDocumentCacheReader extends Pick<IReactorBrowserReadClient, "get" | "find" | "getOperations" | "subscribe"> {}
46
+ /**
47
+ * The reads a {@link DocumentCache} makes. `getMany` is optional: without it,
48
+ * a batch reads each uncached id with `get`.
49
+ */
50
+ interface IDocumentCacheReader extends Pick<IReactorBrowserReadClient, "get" | "find" | "getOperations" | "subscribe">, Partial<Pick<IReactorBrowserReadClient, "getMany">> {}
51
+ /** The most ids one `getMany` call is asked for. */
52
+ declare const GET_MANY_CHUNK_SIZE = 100;
21
53
  declare function addPromiseState<T>(promise: Promise<T>): PromiseWithState<T>;
22
54
  declare function readPromiseState<T>(promise: Promise<T> | PromiseWithState<T>): PromiseState<T>;
23
55
  /** The snapshot every uncached document scope reads as. One frozen object, so `useSyncExternalStore` sees a stable value. */
@@ -75,6 +107,19 @@ declare class DocumentCache implements IDocumentCache, IOperationCache, IDocumen
75
107
  get(id: string, refetch?: boolean): Promise<PHDocument$1>;
76
108
  getRefetchState(id: string): DocumentRefetchState;
77
109
  getBatch(ids: string[]): Promise<PHDocument$1[]>;
110
+ /**
111
+ * Reserves an entry for every id not yet cached and fills them from
112
+ * `getMany`, in chunks of {@link GET_MANY_CHUNK_SIZE}. Each id keeps its own
113
+ * entry, settled as `get` would settle it.
114
+ */
115
+ private loadMany;
116
+ /**
117
+ * `getMany` rejects when any id is unavailable, so a failed chunk is split
118
+ * in half and retried; a single id is read with `get`, so it settles exactly
119
+ * as a single read would.
120
+ */
121
+ private settleMany;
122
+ private settleFetched;
78
123
  subscribe(id: string | string[], callback: () => void): () => void;
79
124
  getOperationsState(documentId: string, scope: string): OperationsCacheEntry;
80
125
  loadOperations(documentId: string, scope: string, limit: number): void;
@@ -123,7 +168,7 @@ declare class DocumentCache implements IDocumentCache, IOperationCache, IDocumen
123
168
  }
124
169
  //#endregion
125
170
  //#region src/remote-controller/types.d.ts
126
- type RemoteControllerGraphQLClient = Pick<ReactorGraphQLClient, "GetDocument" | "GetDocumentWithOperations" | "GetDocumentOperations" | "MutateDocument" | "CreateDocument" | "CreateEmptyDocument" | "DeleteDocument" | "BatchGetDocumentOperations" | "BatchGetDocumentWithOperations">;
171
+ type RemoteControllerGraphQLClient = Pick<ReactorGraphQLClient, "GetDocument" | "GetDocumentWithOperations" | "GetDocumentOperations" | "MutateDocument" | "CreateDocument" | "CreateEmptyDocument" | "GetCreateDefaults" | "GetCreateProtocolVersions" | "DeleteDocument" | "BatchGetDocumentOperations" | "BatchGetDocumentWithOperations">;
127
172
  type RemoteDocumentData = PhDocumentFieldsFragment;
128
173
  type RemoteOperation = GetDocumentOperationsQuery["documentOperations"]["items"][number];
129
174
  type RemoteOperationResultPage = GetDocumentOperationsQuery["documentOperations"];
@@ -298,6 +343,37 @@ declare function ambientRenownTokenProvider(): Promise<string | undefined>;
298
343
  */
299
344
  declare function makeAuthMiddleware(tokenProvider: BearerTokenProvider): SdkFunctionWrapper;
300
345
  //#endregion
346
+ //#region src/graphql-client/drive-nodes.d.ts
347
+ /** The node queries a {@link GraphQLDriveNodeSource} runs. */
348
+ type DriveNodeQueries = Pick<Sdk, "GetDriveNodes" | "GetDriveNode" | "GetDriveDescendants">;
349
+ /**
350
+ * The reactor subgraph's type-neutral node queries (`driveNodes`, `driveNode`,
351
+ * `driveDescendants`) as an {@link IDriveNodeSource}, so a browser reads a
352
+ * legacy drive and a reactor-drive alike. The Switchboard serves only the
353
+ * nodes the caller may read. Drive ids must be canonical ids, not slugs.
354
+ */
355
+ declare class GraphQLDriveNodeSource implements IDriveNodeSource {
356
+ private readonly queries;
357
+ private readonly headersFor;
358
+ constructor(queries: DriveNodeQueries, headersFor?: (driveId: string) => Record<string, string> | undefined);
359
+ getNode(driveId: string, nodeId: string, signal?: AbortSignal): Promise<DriveNodeRecord | undefined>;
360
+ listChildren(driveId: string, parentFolder: string | null | undefined, paging?: PagingOptions, signal?: AbortSignal, kind?: DriveNodeKind): Promise<DriveNodePage>;
361
+ getDescendants(driveId: string, root: string, signal?: AbortSignal): Promise<DriveNodeRecord[]>;
362
+ listAll(driveId: string, signal?: AbortSignal): Promise<DriveNodeRecord[]>;
363
+ }
364
+ /**
365
+ * `read.drives` over a node source: the reactor's {@link IDriveReadClient},
366
+ * answering in the legacy `Node` shape for every drive type.
367
+ */
368
+ declare class GraphQLDriveReadClient implements IDriveReadClient {
369
+ private readonly nodes;
370
+ constructor(nodes: IDriveNodeSource);
371
+ getNode(driveIdentifier: string, nodeId: string, signal?: AbortSignal): Promise<Node>;
372
+ listNodes(driveIdentifier: string, parentFolder?: string | null, paging?: PagingOptions, signal?: AbortSignal): Promise<PagedResults<Node>>;
373
+ }
374
+ /** A node record in the legacy `Node` shape. */
375
+ declare function toLegacyNode(node: DriveNodeRecord): Node;
376
+ //#endregion
301
377
  //#region src/graphql-client/errors.d.ts
302
378
  /** A call the Switchboard GraphQL surface cannot express. */
303
379
  declare class GraphQLOperationNotSupportedError extends Error {
@@ -332,6 +408,10 @@ declare class BatchJobFailedError extends Error {
332
408
  constructor(key: string, jobs: Record<string, JobInfo>);
333
409
  static isError(error: unknown): error is BatchJobFailedError;
334
410
  }
411
+ /** A validation error naming root field `field` unknown: a host from before it. */
412
+ declare function queriesUnknownField(error: unknown, field: string): boolean;
413
+ /** A validation error naming `argument` unknown: a host from before it. */
414
+ declare function queriesUnknownArgument(error: unknown, argument: string): boolean;
335
415
  /**
336
416
  * The reactor's `JobFailedError`, rebuilt from a job the Switchboard reported
337
417
  * FAILED; this entry imports the reactor for types only. A write handle's
@@ -519,6 +599,11 @@ type GraphQLReactorClientOptions = {
519
599
  * and answers `false`. A branded property survives both.
520
600
  */
521
601
  declare const graphQLReactorClientBrand: "__powerhouseGraphQLReactorClient";
602
+ /** The read half of {@link GraphQLReactorClient}: the hooks' reads plus `drives`. */
603
+ interface GraphQLReactorReadClient extends IReactorBrowserReadClient {
604
+ /** A drive's nodes from the node queries, for every drive type. */
605
+ readonly drives: IDriveReadClient;
606
+ }
522
607
  /**
523
608
  * A light implementation of {@link IReactorBrowserClient} that talks plain
524
609
  * GraphQL to a Switchboard, with no reactor in the bundle.
@@ -549,11 +634,12 @@ declare class GraphQLReactorClient implements IReactorBrowserClient$1 {
549
634
  private jobRealtimeBroken;
550
635
  /** Set once the Switchboard refused the `document` query's `consistency` argument. */
551
636
  private consistencyUnsupported;
637
+ private readonly driveNodes;
552
638
  /**
553
639
  * The read half: the reads the hooks make. Every method is this client's
554
640
  * own; nothing that writes is reachable from it.
555
641
  */
556
- readonly read: IReactorBrowserReadClient;
642
+ readonly read: GraphQLReactorReadClient;
557
643
  /**
558
644
  * The write half. `execute` submits through `executeAsync` and hands back a
559
645
  * handle whose `written` and `readable` resolve from `jobStatus`, woken by
@@ -564,6 +650,11 @@ declare class GraphQLReactorClient implements IReactorBrowserClient$1 {
564
650
  */
565
651
  readonly write: IReactorBrowserWriteClient;
566
652
  constructor(options: GraphQLReactorClientOptions);
653
+ /**
654
+ * The Switchboard's drive node queries as a node source, for every drive
655
+ * type. `read.drives` answers from it.
656
+ */
657
+ nodeSource(): IDriveNodeSource;
567
658
  /**
568
659
  * Reads a document. With a consistency token that names any coordinate, the
569
660
  * Switchboard waits until its read models hold them; one without the
@@ -571,8 +662,15 @@ declare class GraphQLReactorClient implements IReactorBrowserClient$1 {
571
662
  * a write's `readable` stage still sees the write on a single node.
572
663
  */
573
664
  get<TDocument extends PHDocument>(identifier: string, view?: ViewFilter, signal?: AbortSignal, consistencyToken?: ConsistencyToken): Promise<TDocument>;
574
- /** Reads documents by id, in the order given; throws if any is missing. */
665
+ /**
666
+ * Reads documents by id, in the order given; throws if any is missing. Each
667
+ * chunk of {@link GET_MANY_CHUNK_SIZE} ids is one request holding an aliased
668
+ * `document` field per id, with the selection and arguments `get` sends.
669
+ */
575
670
  getMany<TDocument extends PHDocument>(documentIds: string[], view?: ViewFilter, signal?: AbortSignal, consistencyToken?: ConsistencyToken): Promise<TDocument[]>;
671
+ /** One chunk of `getMany`, with the `consistency` argument while the Switchboard accepts it. */
672
+ private getDocumentChunk;
673
+ private runGetDocuments;
576
674
  /**
577
675
  * Whether the Switchboard would serve the document to this client's caller,
578
676
  * from its `documentServed` query: the same read gate `find` passes. Absent
@@ -648,22 +746,12 @@ declare class GraphQLReactorClient implements IReactorBrowserClient$1 {
648
746
  getJobStatus(jobId: string, signal?: AbortSignal): Promise<JobInfo>;
649
747
  /** Polls `jobStatus` until the job is READ_READY or FAILED. */
650
748
  waitForJob(jobOrId: string | JobInfo, signal?: AbortSignal): Promise<JobInfo>;
651
- /**
652
- * The policy the Switchboard gives a new document, read from its
653
- * `createDefaults` query. A Switchboard without that query is refused with
654
- * {@link GraphQLOperationNotSupportedError}: a guessed default would
655
- * under-sign on a stricter host.
656
- */
749
+ /** See {@link readCreateSignaturePolicy}. */
657
750
  getCreateSignaturePolicy(): Promise<SignaturePolicy>;
658
- /**
659
- * The protocol versions the Switchboard selects for a new document under
660
- * `parentIdentifier`, read from its `createDefaults` query. A parent the
661
- * caller may not read is refused by the server, never answered as if none
662
- * was named; a Switchboard without the query is refused with
663
- * {@link GraphQLOperationNotSupportedError}.
664
- */
665
- getCreateProtocolVersions(parentIdentifier?: string, signal?: AbortSignal): Promise<ProtocolVersions>;
666
- private createDefaults;
751
+ /** See {@link readCreateProtocolVersions}; fitted to `documentModels`. */
752
+ getCreateProtocolVersions(options: CreateProtocolVersionsOptions, signal?: AbortSignal): Promise<ProtocolVersions>;
753
+ /** See {@link IReactorClient.newDocument}; the module comes from `documentModels`. */
754
+ newDocument<TDocument extends PHDocument = PHDocument>(documentType: string, options?: NewDocumentOptions, signal?: AbortSignal): Promise<TDocument>;
667
755
  /**
668
756
  * Sets or, with `null`, clears the preferred editor as a client-signed
669
757
  * action, as the in-process client does.
@@ -883,6 +971,8 @@ declare class GraphQLReactorClient implements IReactorBrowserClient$1 {
883
971
  */
884
972
  private emitChange;
885
973
  }
974
+ /** {@link GraphQLReactorClient.nodeSource}, as a function. */
975
+ declare function createGraphQLDriveNodeSource(client: GraphQLReactorClient): IDriveNodeSource;
886
976
  /**
887
977
  * Whether a value is a {@link GraphQLReactorClient}, including one built by
888
978
  * another copy of this module.
@@ -1463,12 +1553,20 @@ declare const useDatabase: () => Kysely<Database> | undefined;
1463
1553
  declare const usePGlite: () => PGlite | undefined;
1464
1554
  //#endregion
1465
1555
  //#region src/hooks/dispatch.d.ts
1466
- /** Dispatches actions. `onErrors` gets an `OperationRejectedError` per action the document
1467
- * did not apply, or why the dispatch failed; `onSuccess` gets the document once it lands. */
1468
- type DispatchFn<TAction> = (actionOrActions: TAction[] | TAction | undefined, onErrors?: (errors: Error[]) => void, onSuccess?: (result: PHDocument$1) => void) => void;
1556
+ /** Dispatches actions.
1557
+ *
1558
+ * Once the write lands, `onErrors` runs first, with an `OperationRejectedError` per action
1559
+ * the document did not apply; it is skipped when every action applied. Then `onSuccess`
1560
+ * runs with the document and an outcome, whether or not any action was rejected:
1561
+ * `outcome.rejected` holds the same errors, and is empty only when every action applied.
1562
+ * If `onErrors` throws, `onSuccess` does not run.
1563
+ *
1564
+ * When nothing lands (no document, no reactor, a failed write), only `onErrors` runs, with why. */
1565
+ type DispatchFn<TAction> = (actionOrActions: TAction[] | TAction | undefined, onErrors?: (errors: Error[]) => void, onSuccess?: DispatchSuccessCallback) => void;
1469
1566
  type UseDispatchResult<TDocument, TAction> = readonly [TDocument | undefined, DispatchFn<TAction>];
1470
1567
  /** A dispatch to the document `getDocument` returns when it runs. */
1471
1568
  declare function createDispatch<TDocument = PHDocument$1, TAction = Action$1>(getDocument: () => TDocument | undefined): DispatchFn<TAction>;
1569
+ /** Returns the document and a dispatch to it; see `DispatchFn` for the callbacks' order. */
1472
1570
  declare function useDispatch<TDocument = PHDocument$1, TAction = Action$1>(document: TDocument | undefined): UseDispatchResult<TDocument, TAction>;
1473
1571
  //#endregion
1474
1572
  //#region src/hooks/document-model-modules.d.ts
@@ -1548,6 +1646,6 @@ declare const setAttachmentService: SetPHGlobalValue<IAttachmentService>;
1548
1646
  /** Registers the attachmentService window event handler */
1549
1647
  declare const addAttachmentServiceEventHandler: AddPHGlobalEventHandler;
1550
1648
  //#endregion
1551
- export { prepareSignedActions as $, RemoteOperation as $t, addDocumentCacheEventHandler as A, ambientRenownTokenProvider as At, DocumentChangesEventPayload as B, ConflictStrategy as Bt, useModelRegistry as C, describeGraphQLDocument as Ct, useReactorHalves as D, GraphQLWrongBackendError as Dt, useReactorClientModule as E, GraphQLOperationNotSupportedError as Et, useDocuments as F, isoStringFromDateTime as Ft, createJobChangesSocket as G, IRemoteClient as Gt, IJobChangesSocket as H, GetDocumentResult as Ht, useGetDocument as I, phDocumentFromGetDocument as It, startDocumentChangesSubscription as J, PushResult as Jt, isAuthRefusalClose as K, IRemoteController as Kt, useGetDocumentAsync as L, phDocumentFromMutation as Lt, useDocument as M, GetDocumentQueryFields as Mt, useDocumentCache as N, GetDocumentQueryResult as Nt, useSync as O, JobFailedError as Ot, useDocumentSafe as P, RevisionsListSelection as Pt, resolveDocumentModelModule as Q, RemoteDocumentData as Qt, useGetDocuments as R, revisionMapFromRevisionsList as Rt, useDatabase as S, TypedGraphQLDocument as St, useReactorClient as T, BatchJobFailedError as Tt, JobChangesEventPayload as U, GetDocumentWithOperationsResult as Ut, DocumentChangesSubscriptionOptions as V, DocumentChangeListener as Vt, JobChangesSocketOptions as W, GetOperationsResult as Wt, StaticPackageManager as X, RemoteControllerOptions as Xt, subscriptionsUrlFromGraphqlUrl as Y, RemoteControllerGraphQLClient as Yt, packageFromDocumentModels as Z, RemoteDocumentChangeEvent as Zt, addReactorHalvesEventHandler as _, isGraphQLReactorClient as _t, DocumentOperationsState as a, IDLE_OPERATIONS_ENTRY as an, MutateDocumentWithOperationsDocument as at, setReactorClient as b, SubgraphSdkFactory as bt, useDocumentModelModuleById as c, isDocumentTypeCache as cn, ReactorOperationFieldsFragmentDoc as ct, UseDispatchResult as d, IDLE_REFETCH_STATE as dn, ensurePHEventHandlers as dt, RemoteOperationResultPage as en, signStampedAction as et, createDispatch as f, useSwitchboardClient as ft, addReactorClientModuleEventHandler as g, findIsServableOverGraphQL as gt, addReactorClientEventHandler as h, GraphQLReactorClientOptions as ht, DocumentOperationsResult as i, IDLE_DOCUMENTS_OF_TYPE_ENTRY as in, GetDocumentAtConsistencyVariables as it, setDocumentCache as j, makeAuthMiddleware as jt, useSyncList as k, BearerTokenProvider as kt, useDocumentModelModules as l, isOperationCache as ln, GraphQLReactorProvider as lt, addFullReactorClientEventHandler as m, GraphQLReactorClient as mt, setAttachmentService as n, TrackedAction as nn, GetDocumentAtConsistencyDocument as nt, UseDocumentOperationsOptions as o, IDocumentCacheReader as on, MutateDocumentWithOperationsResult as ot, useDispatch as p, DriveIdCall as pt, makeAuthConnectionParams as q, MergeHandler as qt, useAttachmentService as r, DocumentCache as rn, GetDocumentAtConsistencyResult as rt, useDocumentOperations as s, addPromiseState as sn, MutateDocumentWithOperationsVariables as st, addAttachmentServiceEventHandler as t, SyncStatus$1 as tn, stampAction as tt, DispatchFn as u, readPromiseState as un, GraphQLReactorProviderProps as ut, getFullReactorClient as v, viewFilterInputFromViewFilter as vt, usePGlite as w, subgraphUrlFromGraphqlUrl as wt, setReactorClientModule as x, SubgraphSdkRegistry as xt, setFullReactorClient as y, GraphQLRequestOptions as yt, ConnectionParams as z, ConflictInfo as zt };
1649
+ export { prepareSignedActions as $, IRemoteClient as $t, addDocumentCacheEventHandler as A, JobFailedError as At, DocumentChangesEventPayload as B, GetDocumentQueryFields as Bt, useModelRegistry as C, SubgraphSdkRegistry as Ct, useReactorHalves as D, BatchJobFailedError as Dt, useReactorClientModule as E, subgraphUrlFromGraphqlUrl as Et, useDocuments as F, GraphQLDriveReadClient as Ft, createJobChangesSocket as G, phDocumentFromMutation as Gt, IJobChangesSocket as H, RevisionsListSelection as Ht, useGetDocument as I, toLegacyNode as It, startDocumentChangesSubscription as J, ConflictStrategy as Jt, isAuthRefusalClose as K, revisionMapFromRevisionsList as Kt, useGetDocumentAsync as L, BearerTokenProvider as Lt, useDocument as M, queriesUnknownField as Mt, useDocumentCache as N, DriveNodeQueries as Nt, useSync as O, GraphQLOperationNotSupportedError as Ot, useDocumentSafe as P, GraphQLDriveNodeSource as Pt, resolveDocumentModelModule as Q, GetOperationsResult as Qt, useGetDocuments as R, ambientRenownTokenProvider as Rt, useDatabase as S, SubgraphSdkFactory as St, useReactorClient as T, describeGraphQLDocument as Tt, JobChangesEventPayload as U, isoStringFromDateTime as Ut, DocumentChangesSubscriptionOptions as V, GetDocumentQueryResult as Vt, JobChangesSocketOptions as W, phDocumentFromGetDocument as Wt, StaticPackageManager as X, GetDocumentResult as Xt, subscriptionsUrlFromGraphqlUrl as Y, DocumentChangeListener as Yt, packageFromDocumentModels as Z, GetDocumentWithOperationsResult as Zt, addReactorHalvesEventHandler as _, isDocumentTypeCache as _n, createGraphQLDriveNodeSource as _t, DocumentOperationsState as a, RemoteDocumentChangeEvent as an, MutateDocumentWithOperationsDocument as at, setReactorClient as b, IDLE_REFETCH_STATE as bn, viewFilterInputFromViewFilter as bt, useDocumentModelModuleById as c, RemoteOperationResultPage as cn, ReactorOperationFieldsFragmentDoc as ct, UseDispatchResult as d, DocumentCache as dn, ensurePHEventHandlers as dt, IRemoteController as en, signStampedAction as et, createDispatch as f, GET_MANY_CHUNK_SIZE as fn, useSwitchboardClient as ft, addReactorClientModuleEventHandler as g, addPromiseState as gn, GraphQLReactorReadClient as gt, addReactorClientEventHandler as h, IDocumentCacheReader as hn, GraphQLReactorClientOptions as ht, DocumentOperationsResult as i, RemoteControllerOptions as in, GetDocumentAtConsistencyVariables as it, setDocumentCache as j, queriesUnknownArgument as jt, useSyncList as k, GraphQLWrongBackendError as kt, useDocumentModelModules as l, SyncStatus$1 as ln, GraphQLReactorProvider as lt, addFullReactorClientEventHandler as m, IDLE_OPERATIONS_ENTRY as mn, GraphQLReactorClient as mt, setAttachmentService as n, PushResult as nn, GetDocumentAtConsistencyDocument as nt, UseDocumentOperationsOptions as o, RemoteDocumentData as on, MutateDocumentWithOperationsResult as ot, useDispatch as p, IDLE_DOCUMENTS_OF_TYPE_ENTRY as pn, DriveIdCall as pt, makeAuthConnectionParams as q, ConflictInfo as qt, useAttachmentService as r, RemoteControllerGraphQLClient as rn, GetDocumentAtConsistencyResult as rt, useDocumentOperations as s, RemoteOperation as sn, MutateDocumentWithOperationsVariables as st, addAttachmentServiceEventHandler as t, MergeHandler as tn, stampAction as tt, DispatchFn as u, TrackedAction as un, GraphQLReactorProviderProps as ut, getFullReactorClient as v, isOperationCache as vn, findIsServableOverGraphQL as vt, usePGlite as w, TypedGraphQLDocument as wt, setReactorClientModule as x, dispatchActions as xn, GraphQLRequestOptions as xt, setFullReactorClient as y, readPromiseState as yn, isGraphQLReactorClient as yt, ConnectionParams as z, makeAuthMiddleware as zt };
1552
1650
  export {};
1553
- //# sourceMappingURL=attachment-service-D-CKdGUb.d.ts.map
1651
+ //# sourceMappingURL=attachment-service-BoLudaH0.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachment-service-BoLudaH0.d.ts","names":[],"sources":["../src/actions/dispatch.ts","../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":";;;;;;;;;;;;;;;;KAoHY,2BACV,QAAQ,cACR,SAAS;;;;;;;;;;;iBAaW,gBAAgB,YAAY,cAAY,UAAU,UACtE,iBAAiB,YAAY,qBAC7B,UAAU,uBACV,YAAY,QAAQ,kBACpB,YAAY,0BACX,QAAQ;;;;;;;;;;;iBAWW,gBACpB,iBAAiB,aAAW,sBAC5B,oBACA,YAAY,QAAQ,kBACpB,YAAY,0BACX,QAAQ;;;;cC/IE,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,QAAQ;EA0B5C,gBAAgB,aAAa;EAI7B,SAAS,gBAAgB,QAAQ;;;;;;UAsEzB;;;;;;UA2BM;UAkCN;EAWR,UAAU,uBAAuB;EAiBjC,mBAAmB,oBAAoB,gBAAgB;EAMvD,eAAe,oBAAoB,eAAe;EA8BlD,mBAAmB,oB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A,aAAa,mCAAgC;;;;;;iBAsB7C,mBAAc,eAIf,QAAA;;;;;;iBAeC,oBAAe,kBAIb,QAAA;;;;;;;;;;;;;;iBAuBF,oBAAoB;WAItB;;;;;;;;WA1ME;;;;;;;;WAOA;;;;;;;;WAOA;;;;;;;;;;;cCzBH,wBAAwB,iBACnC,6BAA6B;;cAIlB,wBAAwB,iBACnC,6BAA6B;;cAIlB,oCAAoC;;cAIpC,kBAAkB,iBAAiB;;;;;cAOnC,kBAAkB,iBAAiB;;cAQnC,kBAAkB,iBAAiB;;cAInC,8BAA8B;;cAY9B,8BAA8B;;cAI9B,sBAAsB,iBAAiB;;cAIvC,kCAAkC;;iBAI/B,wBAAwB;cAQ3B,eAAc;cAGd,oDAAW;cAKX,wBAAuB;cAGvB,mBAAkB,OAAO;cAOzB,iBAAgB;;;;;;;;;;;;KC/FjB,WAAW,YACrB,iBAAiB,YAAY,qBAC7B,YAAY,QAAQ,kBACpB,YAAY;KAGF,kBAAkB,WAAW,qBACvC,uBACA,WAAW;;iBAIG,eAAe,YAAY,cAAY,UAAU,UAC/D,mBAAmB,wBAClB,WAAW;;iBAwCE,YAAY,YAAY,cAAY,UAAU,UAC5D,UAAU,wBACT,kBAAkB,WAAW;;;iBCtEhB,2BAA2B;;;;;;;;;iBAuB3B,2BACd,+BACA,mBACC;;;KCvBS;;;;;;EAMV;;EAEA;;;KAIU;;EAEV,qBAAqB;;EAErB;;EAEA,OAAO;;EAEP;;EAEA;;EAEA;;;;;;KAaU;EACV,kBAAkB;EAClB,iBAAiB;EACjB;EACA,OAAO;EACP;;;iBAsFc,sBACd,wCACC;;;;;;;;;;;;;;;;;iBAiBa,sBACd,uCACA,eACA,UAAU,+BACT;;;;cCjJU,sBAAsB,iBAAiB;;cAIvC,sBAAsB,iBAAiB;;cAIvC,kCAAkC"}
@@ -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,57 @@ const GetCreateDefaultsDocument = gql`
309
326
  }
310
327
  }
311
328
  `;
329
+ const GetCreateProtocolVersionsDocument = gql`
330
+ query GetCreateProtocolVersions(
331
+ $parentIdOrSlug: String
332
+ $documentType: String!
333
+ ) {
334
+ createDefaults(
335
+ parentIdOrSlug: $parentIdOrSlug
336
+ documentType: $documentType
337
+ ) {
338
+ protocolVersions
339
+ }
340
+ }
341
+ `;
342
+ const GetDriveNodesDocument = gql`
343
+ query GetDriveNodes(
344
+ $driveId: ID!
345
+ $parentFolder: ID
346
+ $paging: PagingInput
347
+ $kind: DriveNodeKind
348
+ ) {
349
+ driveNodes(
350
+ driveId: $driveId
351
+ parentFolder: $parentFolder
352
+ paging: $paging
353
+ kind: $kind
354
+ ) {
355
+ results {
356
+ ...DriveNodeFields
357
+ }
358
+ nextCursor
359
+ hasMore
360
+ }
361
+ }
362
+ ${DriveNodeFieldsFragmentDoc}
363
+ `;
364
+ const GetDriveNodeDocument = gql`
365
+ query GetDriveNode($driveId: ID!, $id: ID!) {
366
+ driveNode(driveId: $driveId, id: $id) {
367
+ ...DriveNodeFields
368
+ }
369
+ }
370
+ ${DriveNodeFieldsFragmentDoc}
371
+ `;
372
+ const GetDriveDescendantsDocument = gql`
373
+ query GetDriveDescendants($driveId: ID!, $root: ID!) {
374
+ driveDescendants(driveId: $driveId, root: $root) {
375
+ ...DriveNodeFields
376
+ }
377
+ }
378
+ ${DriveNodeFieldsFragmentDoc}
379
+ `;
312
380
  const EvaluateActionsDocument = gql`
313
381
  query EvaluateActions(
314
382
  $documentIdentifier: String!
@@ -787,6 +855,50 @@ function getSdk(client, withWrapper = defaultWrapper) {
787
855
  signal
788
856
  }), "GetCreateDefaults", "query", variables);
789
857
  },
858
+ GetCreateProtocolVersions(variables, requestHeaders, signal) {
859
+ return withWrapper((wrappedRequestHeaders) => client.request({
860
+ document: GetCreateProtocolVersionsDocument,
861
+ variables,
862
+ requestHeaders: {
863
+ ...requestHeaders,
864
+ ...wrappedRequestHeaders
865
+ },
866
+ signal
867
+ }), "GetCreateProtocolVersions", "query", variables);
868
+ },
869
+ GetDriveNodes(variables, requestHeaders, signal) {
870
+ return withWrapper((wrappedRequestHeaders) => client.request({
871
+ document: GetDriveNodesDocument,
872
+ variables,
873
+ requestHeaders: {
874
+ ...requestHeaders,
875
+ ...wrappedRequestHeaders
876
+ },
877
+ signal
878
+ }), "GetDriveNodes", "query", variables);
879
+ },
880
+ GetDriveNode(variables, requestHeaders, signal) {
881
+ return withWrapper((wrappedRequestHeaders) => client.request({
882
+ document: GetDriveNodeDocument,
883
+ variables,
884
+ requestHeaders: {
885
+ ...requestHeaders,
886
+ ...wrappedRequestHeaders
887
+ },
888
+ signal
889
+ }), "GetDriveNode", "query", variables);
890
+ },
891
+ GetDriveDescendants(variables, requestHeaders, signal) {
892
+ return withWrapper((wrappedRequestHeaders) => client.request({
893
+ document: GetDriveDescendantsDocument,
894
+ variables,
895
+ requestHeaders: {
896
+ ...requestHeaders,
897
+ ...wrappedRequestHeaders
898
+ },
899
+ signal
900
+ }), "GetDriveDescendants", "query", variables);
901
+ },
790
902
  EvaluateActions(variables, requestHeaders, signal) {
791
903
  return withWrapper((wrappedRequestHeaders) => client.request({
792
904
  document: EvaluateActionsDocument,
@@ -1131,4 +1243,4 @@ function createClient(urlOrGQLClient, middleware) {
1131
1243
  //#endregion
1132
1244
  export { PhDocumentFieldsFragmentDoc as a, JobChangesDocument as i, DocumentChangesDocument as n, PropagationMode as o, GetDocumentWithOperationsDocument as r, createClient as t };
1133
1245
 
1134
- //# sourceMappingURL=client-CI-3xGMZ.js.map
1246
+ //# sourceMappingURL=client-BUpynoY6.js.map