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

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 (39) hide show
  1. package/dist/{attachment-service-BsOmg2-v.d.ts → attachment-service-D-CKdGUb.d.ts} +152 -11
  2. package/dist/attachment-service-D-CKdGUb.d.ts.map +1 -0
  3. package/dist/{client-CXDpILj6.js → client-CI-3xGMZ.js} +2 -2
  4. package/dist/{client-CXDpILj6.js.map → client-CI-3xGMZ.js.map} +1 -1
  5. package/dist/{client-BnGewICj.d.ts → client-Ca_CA8VC.d.ts} +2 -2
  6. package/dist/client-Ca_CA8VC.d.ts.map +1 -0
  7. package/dist/{dispatch-BEI1Ai2b.js → dispatch-qujH7vLW.js} +13 -7
  8. package/dist/dispatch-qujH7vLW.js.map +1 -0
  9. package/dist/{document-by-id-bHT2FDHM.js → document-by-id-D1wsYWhq.js} +2 -2
  10. package/dist/{document-by-id-bHT2FDHM.js.map → document-by-id-D1wsYWhq.js.map} +1 -1
  11. package/dist/{document-model-modules-DAx3VAm3.js → document-model-modules-DmLQhKvh.js} +2 -2
  12. package/dist/{document-model-modules-DAx3VAm3.js.map → document-model-modules-DmLQhKvh.js.map} +1 -1
  13. package/dist/{document-operations-zQKFs_xu.js → document-operations-C4-irgHD.js} +528 -42
  14. package/dist/document-operations-C4-irgHD.js.map +1 -0
  15. package/dist/{global-DY0jZmcO.d.ts → global-CgzlPBc3.d.ts} +32 -6
  16. package/dist/global-CgzlPBc3.d.ts.map +1 -0
  17. package/dist/{index-DlZsXHpT.d.ts → index-CrVfRJO1.d.ts} +2 -2
  18. package/dist/{index-DlZsXHpT.d.ts.map → index-CrVfRJO1.d.ts.map} +1 -1
  19. package/dist/index.d.ts +12 -12
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +17 -17
  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-G3aKXjNx.js → switchboard-0yDJ-f9X.js} +4 -4
  31. package/dist/{switchboard-G3aKXjNx.js.map → switchboard-0yDJ-f9X.js.map} +1 -1
  32. package/dist/{types-0Fh1tNjy.d.ts → types-DOY-eHEk.d.ts} +2 -2
  33. package/dist/{types-0Fh1tNjy.d.ts.map → types-DOY-eHEk.d.ts.map} +1 -1
  34. package/package.json +9 -9
  35. package/dist/attachment-service-BsOmg2-v.d.ts.map +0 -1
  36. package/dist/client-BnGewICj.d.ts.map +0 -1
  37. package/dist/dispatch-BEI1Ai2b.js.map +0 -1
  38. package/dist/document-operations-zQKFs_xu.js.map +0 -1
  39. package/dist/global-DY0jZmcO.d.ts.map +0 -1
@@ -1,21 +1,23 @@
1
- import { D as IPackageManager, E as IPackageListerUnsubscribe, O as IPackagesListener, _ as SetPHGlobalValue$1, _t as IDocumentTypeCache, bt as PromiseState, dt as IReactorBrowserClient$1, gt as IDocumentCache, k as PackageManagerInstallResult, mt as DocumentsOfTypeEntry, o as PHGlobal$1, pt as DocumentRefetchState, vt as IOperationCache, xt as PromiseWithState, y as UsePHGlobalValue$1, yt as OperationsCacheEntry } from "./global-DY0jZmcO.js";
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";
2
2
  import { t as PGlite } from "./pglite-CntadC_p-DTkdF8sr.js";
3
- import { A as ViewFilterInput, C as GetDocumentQuery, D as PropagationMode$1, E as PhDocumentFieldsFragment, O as Scalars, S as GetDocumentOperationsQuery, b as DocumentChangesSubscription, c as ReactorGraphQLClient, g as ActionInput, k as SdkFunctionWrapper } from "./types-0Fh1tNjy.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";
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";
7
+ import { BatchExecutionRequest, BatchExecutionResult, ConsistencyToken, Database, DocumentChangeEvent, DocumentModelSource, DocumentRelationship, IDocumentModelRegistry, IReactorClient, ISyncManager, JobInfo, OperationFilter, PagedResults, PagingOptions, PropagationMode, SearchFilter, ViewFilter } from "@powerhousedao/reactor";
8
8
  import { GraphQLClient, Variables } from "graphql-request";
9
9
  import { DocumentNode } from "graphql";
10
10
  import { IAttachmentService } from "@powerhousedao/reactor-attachments/client";
11
11
  import { Kysely } from "kysely";
12
- import { AddPHGlobalEventHandler, BrowserReactorClientModule, IReactorBrowserClient, SetPHGlobalValue, UsePHGlobalValue, WorkerReactorClientModule } from "@powerhousedao/reactor-browser";
12
+ import { AddPHGlobalEventHandler, BrowserReactorClientModule, IReactorBrowserClient, ReactorBrowserHalves, SetPHGlobalValue, UsePHGlobalValue, WorkerReactorClientModule } from "@powerhousedao/reactor-browser";
13
13
  import { RegistryPackageSource } from "@powerhousedao/shared";
14
14
  //#region src/document-refetcher.d.ts
15
15
  /** The refetch snapshot of a document with nothing in flight and no kept failure. */
16
16
  declare const IDLE_REFETCH_STATE: DocumentRefetchState;
17
17
  //#endregion
18
18
  //#region src/document-cache.d.ts
19
+ /** The reads a {@link DocumentCache} makes. */
20
+ interface IDocumentCacheReader extends Pick<IReactorBrowserReadClient, "get" | "find" | "getOperations" | "subscribe"> {}
19
21
  declare function addPromiseState<T>(promise: Promise<T>): PromiseWithState<T>;
20
22
  declare function readPromiseState<T>(promise: Promise<T> | PromiseWithState<T>): PromiseState<T>;
21
23
  /** The snapshot every uncached document scope reads as. One frozen object, so `useSyncExternalStore` sees a stable value. */
@@ -29,13 +31,14 @@ declare function isDocumentTypeCache(cache: unknown): cache is IDocumentTypeCach
29
31
  /**
30
32
  * Document cache implementation that uses the new ReactorClient API.
31
33
  *
32
- * This cache subscribes to document change events via IReactorBrowserClient.subscribe()
34
+ * This cache subscribes to document change events through the client's read half
33
35
  * and automatically updates the cache when documents are created, updated, or deleted.
36
+ * It is built over a browser client, whose `read` half it uses, or over a read
37
+ * half directly.
34
38
  * It also holds paginated operation history per document scope (see `IOperationCache`),
35
39
  * which is dropped for a document whenever a change event for it arrives.
36
40
  */
37
41
  declare class DocumentCache implements IDocumentCache, IOperationCache, IDocumentTypeCache {
38
- private client;
39
42
  private documents;
40
43
  private batchPromises;
41
44
  private listeners;
@@ -58,7 +61,8 @@ declare class DocumentCache implements IDocumentCache, IOperationCache, IDocumen
58
61
  private typeRequests;
59
62
  private typeListeners;
60
63
  private unsubscribe;
61
- constructor(client: IReactorBrowserClient$1);
64
+ private readonly client;
65
+ constructor(client: IReactorBrowserClient$1 | IDocumentCacheReader);
62
66
  private handleDocumentChange;
63
67
  private handleDocumentDeleted;
64
68
  private handleDocumentUpdated;
@@ -328,6 +332,18 @@ declare class BatchJobFailedError extends Error {
328
332
  constructor(key: string, jobs: Record<string, JobInfo>);
329
333
  static isError(error: unknown): error is BatchJobFailedError;
330
334
  }
335
+ /**
336
+ * The reactor's `JobFailedError`, rebuilt from a job the Switchboard reported
337
+ * FAILED; this entry imports the reactor for types only. A write handle's
338
+ * stage rejects with it. The message is the job error's message, as the
339
+ * reactor's is.
340
+ */
341
+ declare class JobFailedError extends Error {
342
+ readonly name = "JobFailedError";
343
+ readonly job: JobInfo;
344
+ constructor(job: JobInfo);
345
+ static isError(error: unknown): error is JobFailedError;
346
+ }
331
347
  //#endregion
332
348
  //#region src/graphql-client/subgraph.d.ts
333
349
  /**
@@ -527,8 +543,36 @@ declare class GraphQLReactorClient implements IReactorBrowserClient$1 {
527
543
  private realtimeErrorLogged;
528
544
  /** Whether the last socket died because the Switchboard refused its credentials. */
529
545
  private realtimeRefusedCredentials;
546
+ /** The socket write handles wait on; opened by the first stage wait. */
547
+ private jobSocket;
548
+ /** Set once the `jobChanges` subscription failed; stage waits then only poll. */
549
+ private jobRealtimeBroken;
550
+ /** Set once the Switchboard refused the `document` query's `consistency` argument. */
551
+ private consistencyUnsupported;
552
+ /**
553
+ * The read half: the reads the hooks make. Every method is this client's
554
+ * own; nothing that writes is reachable from it.
555
+ */
556
+ readonly read: IReactorBrowserReadClient;
557
+ /**
558
+ * The write half. `execute` submits through `executeAsync` and hands back a
559
+ * handle whose `written` and `readable` resolve from `jobStatus`, woken by
560
+ * the `jobChanges` subscription when realtime is on, and whose `document()`
561
+ * runs the `document` query bounded by the receipt's token. `create` and
562
+ * `deleteDocument` have no asynchronous mutation: they run the synchronous
563
+ * ones and hand back a settled handle.
564
+ */
565
+ readonly write: IReactorBrowserWriteClient;
530
566
  constructor(options: GraphQLReactorClientOptions);
531
- get<TDocument extends PHDocument>(identifier: string, view?: ViewFilter, signal?: AbortSignal): Promise<TDocument>;
567
+ /**
568
+ * Reads a document. With a consistency token that names any coordinate, the
569
+ * Switchboard waits until its read models hold them; one without the
570
+ * `document` query's `consistency` argument is read without it, which after
571
+ * a write's `readable` stage still sees the write on a single node.
572
+ */
573
+ 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. */
575
+ getMany<TDocument extends PHDocument>(documentIds: string[], view?: ViewFilter, signal?: AbortSignal, consistencyToken?: ConsistencyToken): Promise<TDocument[]>;
532
576
  /**
533
577
  * Whether the Switchboard would serve the document to this client's caller,
534
578
  * from its `documentServed` query: the same read gate `find` passes. Absent
@@ -600,6 +644,8 @@ declare class GraphQLReactorClient implements IReactorBrowserClient$1 {
600
644
  executeBatch(request: BatchExecutionRequest, signal?: AbortSignal): Promise<BatchExecutionResult>;
601
645
  /** The job as `jobStatus` reports it now; `undefined` when it reports none. */
602
646
  getJob(jobId: string, signal?: AbortSignal): Promise<JobInfo | undefined>;
647
+ /** The job as `jobStatus` reports it now; throws when it reports none. */
648
+ getJobStatus(jobId: string, signal?: AbortSignal): Promise<JobInfo>;
603
649
  /** Polls `jobStatus` until the job is READ_READY or FAILED. */
604
650
  waitForJob(jobOrId: string | JobInfo, signal?: AbortSignal): Promise<JobInfo>;
605
651
  /**
@@ -738,6 +784,40 @@ declare class GraphQLReactorClient implements IReactorBrowserClient$1 {
738
784
  * {@link PagedResults}, restoring each edge's `Date` fields.
739
785
  */
740
786
  private toRelationshipResults;
787
+ /**
788
+ * The write half's `execute`: signs as the facade's `execute` does, submits
789
+ * through `executeAsync` and returns once the job is accepted. When anyone
790
+ * subscribes, the document is read back once the job is readable and
791
+ * announced as `Updated`, as the facade's `execute` announces it; the handle
792
+ * shares that read with its own `document()`.
793
+ */
794
+ private submitExecute;
795
+ /** The write half's `create`: the synchronous mutation, a settled handle. */
796
+ private submitCreate;
797
+ /** The write half's `deleteDocument`: the synchronous mutation, a settled handle. */
798
+ private submitDeleteDocument;
799
+ /** Reads a write's document back, bounded by its receipt's token. */
800
+ private handleReader;
801
+ /** Announces a write's document as `Updated` once it is readable. */
802
+ private announceWrite;
803
+ /**
804
+ * Waits for a job to settle a stage, resolving with a FAILED job too. Polls
805
+ * `jobStatus` with a doubling interval; with realtime on, a `jobChanges`
806
+ * event for the job wakes the wait early and the interval is only a safety
807
+ * net. A failed subscription is logged once and the wait keeps polling.
808
+ */
809
+ private waitForStage;
810
+ /**
811
+ * Subscribes to one job's `jobChanges` when realtime is on and the
812
+ * subscription has not failed before. Returns the stop function, or
813
+ * undefined when nothing was subscribed.
814
+ */
815
+ private watchJob;
816
+ /**
817
+ * The `document` query with the `consistency` argument, or without it once
818
+ * the Switchboard has refused the argument.
819
+ */
820
+ private getDocumentAtConsistency;
741
821
  /**
742
822
  * Opens the realtime socket on the first subscriber.
743
823
  *
@@ -992,6 +1072,33 @@ type MutateDocumentWithOperationsResult = {
992
1072
  } | null;
993
1073
  };
994
1074
  };
1075
+ /**
1076
+ * `document`, bounded by a consistency token: the read waits until the
1077
+ * Switchboard's read models hold every operation the token names. The
1078
+ * `consistency` argument is additive on the Switchboard; one without it refuses
1079
+ * this document, and the client falls back to the plain `GetDocument`.
1080
+ */
1081
+ declare const GetDocumentAtConsistencyDocument: import("graphql").DocumentNode;
1082
+ type GetDocumentAtConsistencyVariables = {
1083
+ identifier: Scalars["String"]["input"];
1084
+ view?: ViewFilterInput;
1085
+ consistency: {
1086
+ version: number;
1087
+ createdAtUtcIso: string;
1088
+ coordinates: ReadonlyArray<{
1089
+ documentId: string;
1090
+ scope: string;
1091
+ branch: string;
1092
+ operationIndex: number;
1093
+ }>;
1094
+ };
1095
+ };
1096
+ type GetDocumentAtConsistencyResult = {
1097
+ readonly document?: {
1098
+ readonly document: PhDocumentFieldsFragment;
1099
+ readonly childIds: ReadonlyArray<string>;
1100
+ } | null;
1101
+ };
995
1102
  //#endregion
996
1103
  //#region src/graphql-client/signing.d.ts
997
1104
  /**
@@ -1143,6 +1250,33 @@ declare function isAuthRefusalClose(error: unknown): boolean;
1143
1250
  * socket. It is safe to call more than once.
1144
1251
  */
1145
1252
  declare function startDocumentChangesSubscription(options: DocumentChangesSubscriptionOptions): () => void;
1253
+ /** The `jobChanges` payload, exactly as the Switchboard sends it. */
1254
+ type JobChangesEventPayload = JobChangesSubscription["jobChanges"];
1255
+ /**
1256
+ * One socket carrying `jobChanges` subscriptions, one per watched job. The
1257
+ * socket opens on the first watch and closes when nothing is watched.
1258
+ */
1259
+ interface IJobChangesSocket {
1260
+ /**
1261
+ * Watches one job. `onEvent` is called per status change the Switchboard
1262
+ * reports; `onError` once if the subscription fails. Returns the stop
1263
+ * function, safe to call more than once.
1264
+ */
1265
+ watch(jobId: string, onEvent: (event: JobChangesEventPayload) => void, onError: (error: unknown) => void): () => void;
1266
+ /** Closes the socket; a later watch opens a new one. */
1267
+ dispose(): void;
1268
+ }
1269
+ type JobChangesSocketOptions = {
1270
+ /** The websocket endpoint, e.g. `ws://localhost:4001/graphql/subscriptions`. */
1271
+ wsUrl: string;
1272
+ /** Resolves the `ConnectionInit` payload, per connect. */
1273
+ connectionParams?: () => Promise<ConnectionParams>;
1274
+ };
1275
+ /**
1276
+ * Opens the socket write handles wait on. `graphql-ws` multiplexes every
1277
+ * watched job over it and closes it once the last watch stops.
1278
+ */
1279
+ declare function createJobChangesSocket(options: JobChangesSocketOptions): IJobChangesSocket;
1146
1280
  /**
1147
1281
  * Derives the websocket endpoint from the GraphQL http endpoint.
1148
1282
  *
@@ -1305,8 +1439,15 @@ declare const setReactorClientModule: SetPHGlobalValue<BrowserReactorClientModul
1305
1439
  declare const addReactorClientModuleEventHandler: AddPHGlobalEventHandler;
1306
1440
  /** Returns the reactor client */
1307
1441
  declare const useReactorClient: UsePHGlobalValue<IReactorBrowserClient>;
1308
- /** Sets the reactor client */
1442
+ /**
1443
+ * Sets the reactor client, and `window.ph.reactor` to its read and write
1444
+ * halves. A client without halves leaves `reactor` unset.
1445
+ */
1309
1446
  declare const setReactorClient: SetPHGlobalValue<IReactorBrowserClient>;
1447
+ /** Returns the reactor client's read and write halves */
1448
+ declare const useReactorHalves: UsePHGlobalValue<ReactorBrowserHalves>;
1449
+ /** Adds an event handler for the reactor client's halves */
1450
+ declare const addReactorHalvesEventHandler: AddPHGlobalEventHandler;
1310
1451
  /** Adds an event handler for the reactor client */
1311
1452
  declare const addReactorClientEventHandler: AddPHGlobalEventHandler;
1312
1453
  /** Sets the client full-client actions use instead of the module's */
@@ -1407,6 +1548,6 @@ declare const setAttachmentService: SetPHGlobalValue<IAttachmentService>;
1407
1548
  /** Registers the attachmentService window event handler */
1408
1549
  declare const addAttachmentServiceEventHandler: AddPHGlobalEventHandler;
1409
1550
  //#endregion
1410
- export { ReactorOperationFieldsFragmentDoc as $, readPromiseState as $t, useDocument as A, ConflictStrategy as At, isAuthRefusalClose as B, RemoteControllerOptions as Bt, usePGlite as C, GetDocumentQueryResult as Ct, useSyncList as D, phDocumentFromMutation as Dt, useSync as E, phDocumentFromGetDocument as Et, useGetDocumentAsync as F, IRemoteClient as Ft, packageFromDocumentModels as G, SyncStatus$1 as Gt, startDocumentChangesSubscription as H, RemoteDocumentData as Ht, useGetDocuments as I, IRemoteController as It, signStampedAction as J, IDLE_DOCUMENTS_OF_TYPE_ENTRY as Jt, resolveDocumentModelModule as K, TrackedAction as Kt, ConnectionParams as L, MergeHandler as Lt, useDocumentSafe as M, GetDocumentResult as Mt, useDocuments as N, GetDocumentWithOperationsResult as Nt, addDocumentCacheEventHandler as O, revisionMapFromRevisionsList as Ot, useGetDocument as P, GetOperationsResult as Pt, MutateDocumentWithOperationsVariables as Q, isOperationCache as Qt, DocumentChangesEventPayload as R, PushResult as Rt, useModelRegistry as S, GetDocumentQueryFields as St, useReactorClientModule as T, isoStringFromDateTime as Tt, subscriptionsUrlFromGraphqlUrl as U, RemoteOperation as Ut, makeAuthConnectionParams as V, RemoteDocumentChangeEvent as Vt, StaticPackageManager as W, RemoteOperationResultPage as Wt, MutateDocumentWithOperationsDocument as X, addPromiseState as Xt, stampAction as Y, IDLE_OPERATIONS_ENTRY as Yt, MutateDocumentWithOperationsResult as Z, isDocumentTypeCache as Zt, getFullReactorClient as _, GraphQLOperationNotSupportedError as _t, DocumentOperationsState as a, GraphQLReactorClient as at, setReactorClientModule as b, ambientRenownTokenProvider as bt, useDocumentModelModuleById as c, isGraphQLReactorClient as ct, UseDispatchResult as d, SubgraphSdkFactory as dt, IDLE_REFETCH_STATE as en, GraphQLReactorProvider as et, createDispatch as f, SubgraphSdkRegistry as ft, addReactorClientModuleEventHandler as g, BatchJobFailedError as gt, addReactorClientEventHandler as h, subgraphUrlFromGraphqlUrl as ht, DocumentOperationsResult as i, DriveIdCall as it, useDocumentCache as j, DocumentChangeListener as jt, setDocumentCache as k, ConflictInfo as kt, useDocumentModelModules as l, viewFilterInputFromViewFilter as lt, addFullReactorClientEventHandler as m, describeGraphQLDocument as mt, setAttachmentService as n, ensurePHEventHandlers as nt, UseDocumentOperationsOptions as o, GraphQLReactorClientOptions as ot, useDispatch as p, TypedGraphQLDocument as pt, prepareSignedActions as q, DocumentCache as qt, useAttachmentService as r, useSwitchboardClient as rt, useDocumentOperations as s, findIsServableOverGraphQL as st, addAttachmentServiceEventHandler as t, GraphQLReactorProviderProps as tt, DispatchFn as u, GraphQLRequestOptions as ut, setFullReactorClient as v, GraphQLWrongBackendError as vt, useReactorClient as w, RevisionsListSelection as wt, useDatabase as x, makeAuthMiddleware as xt, setReactorClient as y, BearerTokenProvider as yt, DocumentChangesSubscriptionOptions as z, RemoteControllerGraphQLClient as zt };
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 };
1411
1552
  export {};
1412
- //# sourceMappingURL=attachment-service-BsOmg2-v.d.ts.map
1553
+ //# sourceMappingURL=attachment-service-D-CKdGUb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachment-service-D-CKdGUb.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/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;;;;UCgBhB,6BAA6B,KAC5C;iBAIc,gBAAgB,GAAG,SAAS,QAAQ,KAAK,iBAAiB;iBAwB1D,iBAAiB,GAC/B,SAAS,QAAQ,KAAK,iBAAiB,KACtC,aA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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;;;;;KCzGjB,WAAW,YACrB,iBAAiB,YAAY,qBAC7B,YAAY,QAAQ,kBACpB,aAAa,QAAQ;KAGX,kBAAkB,WAAW,qBACvC,uBACA,WAAW;;iBAIG,eAAe,YAAY,cAAY,UAAU,UAC/D,mBAAmB,wBAClB,WAAW;iBAoCE,YAAY,YAAY,cAAY,UAAU,UAC5D,UAAU,wBACT,kBAAkB,WAAW;;;iBCxDhB,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"}
@@ -1129,6 +1129,6 @@ function createClient(urlOrGQLClient, middleware) {
1129
1129
  };
1130
1130
  }
1131
1131
  //#endregion
1132
- export { PropagationMode as a, PhDocumentFieldsFragmentDoc as i, DocumentChangesDocument as n, GetDocumentWithOperationsDocument as r, createClient as t };
1132
+ export { PhDocumentFieldsFragmentDoc as a, JobChangesDocument as i, DocumentChangesDocument as n, PropagationMode as o, GetDocumentWithOperationsDocument as r, createClient as t };
1133
1133
 
1134
- //# sourceMappingURL=client-CXDpILj6.js.map
1134
+ //# sourceMappingURL=client-CI-3xGMZ.js.map