@powerhousedao/reactor-browser 6.2.3-dev.48 → 6.2.3-dev.49

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.
@@ -1,9 +1,9 @@
1
- import { a as PHGlobal$1, at as DocumentRefetchState, b as IPackagesListener, ct as IOperationCache, d as UsePHGlobalValue$1, dt as PromiseWithState, lt as OperationsCacheEntry, rt as IReactorBrowserClient$1, st as IDocumentCache, u as SetPHGlobalValue$1, ut as PromiseState, v as IPackageListerUnsubscribe, x as PackageManagerInstallResult, y as IPackageManager } from "./global-BUpRlWcM.js";
1
+ import { a as PHGlobal$1, at as DocumentRefetchState, b as IPackagesListener, ct as IOperationCache, d as UsePHGlobalValue$1, dt as PromiseWithState, lt as OperationsCacheEntry, rt as IReactorBrowserClient$1, st as IDocumentCache, u as SetPHGlobalValue$1, ut as PromiseState, v as IPackageListerUnsubscribe, x as PackageManagerInstallResult, y as IPackageManager } from "./global-BvawOKrQ.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-Cww0HJmz.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-D0ugg0E1.js";
4
4
  import { Action, DocumentModelLib, DocumentModelModule, Operation, PHDocument } from "document-model";
5
- import { Database, DocumentChangeEvent, DocumentModelSource, IDocumentModelRegistry, ISyncManager, OperationFilter, PagedResults, PagingOptions, PropagationMode, SearchFilter, ViewFilter } from "@powerhousedao/reactor";
6
- import { Action as Action$1, ActionSigningTarget, DocumentModelModule as DocumentModelModule$1, DocumentOperations, ISigner, Operation as Operation$1, PHBaseState, PHDocument as PHDocument$1, PHDocumentHeader } from "@powerhousedao/shared/document-model";
5
+ import { BatchExecutionRequest, BatchExecutionResult, Database, DocumentChangeEvent, DocumentModelSource, DocumentRelationship, IDocumentModelRegistry, ISyncManager, JobInfo, OperationFilter, PagedResults, PagingOptions, PropagationMode, SearchFilter, ViewFilter } from "@powerhousedao/reactor";
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
7
  import { ReactNode } from "react";
8
8
  import { GraphQLClient, Variables } from "graphql-request";
9
9
  import { DocumentNode } from "graphql";
@@ -244,6 +244,8 @@ declare function phDocumentFromGetDocument<TDocument extends PHDocument = PHDocu
244
244
  declare function phDocumentFromMutation<TDocument extends PHDocument = PHDocument>(document: GetDocumentQueryFields, operations: readonly RemoteOperation[], branch?: string): TDocument;
245
245
  /** Turns a `revisionsList` selection into the header's per-scope revision map. */
246
246
  declare function revisionMapFromRevisionsList(revisionsList: RevisionsListSelection): Record<string, number>;
247
+ /** The `DateTime` scalar deserializes as either an ISO string or a `Date`. */
248
+ declare function isoStringFromDateTime(value: string | Date): string;
247
249
  //#endregion
248
250
  //#region src/graphql-client/auth.d.ts
249
251
  /**
@@ -273,6 +275,27 @@ declare function ambientRenownTokenProvider(): Promise<string | undefined>;
273
275
  */
274
276
  declare function makeAuthMiddleware(tokenProvider: BearerTokenProvider): SdkFunctionWrapper;
275
277
  //#endregion
278
+ //#region src/graphql-client/errors.d.ts
279
+ /** A call the Switchboard GraphQL surface cannot express. */
280
+ declare class GraphQLOperationNotSupportedError extends Error {
281
+ readonly name = "GraphQLOperationNotSupportedError";
282
+ readonly operation: string;
283
+ constructor(operation: string, reason: string);
284
+ static isError(error: unknown): error is GraphQLOperationNotSupportedError;
285
+ }
286
+ /**
287
+ * The reactor's `BatchJobFailedError`, rebuilt from a batch result; this entry
288
+ * imports the reactor for types only. The shared name lets either `isError`
289
+ * recognise it.
290
+ */
291
+ declare class BatchJobFailedError extends Error {
292
+ readonly name = "BatchJobFailedError";
293
+ readonly key: string;
294
+ readonly jobs: Readonly<Record<string, JobInfo>>;
295
+ constructor(key: string, jobs: Record<string, JobInfo>);
296
+ static isError(error: unknown): error is BatchJobFailedError;
297
+ }
298
+ //#endregion
276
299
  //#region src/graphql-client/subgraph.d.ts
277
300
  /**
278
301
  * The factory a GraphQL code generator produces for a schema.
@@ -454,6 +477,23 @@ declare class GraphQLReactorClient implements IReactorBrowserClient$1 {
454
477
  constructor(options: GraphQLReactorClientOptions);
455
478
  get<TDocument extends PHDocument>(identifier: string, view?: ViewFilter, signal?: AbortSignal): Promise<TDocument>;
456
479
  getOperations(documentIdentifier: string, view?: ViewFilter, filter?: OperationFilter, paging?: PagingOptions, signal?: AbortSignal): Promise<PagedResults<Operation>>;
480
+ /**
481
+ * Filters documents by criteria over the Switchboard's `findDocuments` query.
482
+ *
483
+ * The query filters by `type` and `parentId` only, at head. A search naming
484
+ * `ids` or `slugs` (present, whatever its length) and a point-in-time view are
485
+ * each by-contract limitations the query cannot express -- running it anyway
486
+ * would return every document instead of the named ones, or head instead of
487
+ * the asked-for revision, a silently wrong answer. {@link findIsServableOverGraphQL}
488
+ * is the single predicate that decides this, and an unservable `find` throws
489
+ * {@link GraphQLOperationNotSupportedError}. Drive enumeration itself filters
490
+ * by `type` at head, which is served.
491
+ */
492
+ find<TDocument extends PHDocument = PHDocument>(search: SearchFilter, view?: ViewFilter, paging?: PagingOptions, signal?: AbortSignal): Promise<PagedResults<TDocument>>;
493
+ getOutgoingRelationships(sourceIdentifier: string, relationshipType: string, view?: ViewFilter, paging?: PagingOptions, signal?: AbortSignal): Promise<PagedResults<PHDocument>>;
494
+ getIncomingRelationships(targetIdentifier: string, relationshipType: string, view?: ViewFilter, paging?: PagingOptions, signal?: AbortSignal): Promise<PagedResults<PHDocument>>;
495
+ getOutgoingRelationshipEdges(sourceIdentifier: string, relationshipType?: string, view?: ViewFilter, paging?: PagingOptions, signal?: AbortSignal): Promise<PagedResults<DocumentRelationship>>;
496
+ getIncomingRelationshipEdges(targetIdentifier: string, relationshipType?: string, view?: ViewFilter, paging?: PagingOptions, signal?: AbortSignal): Promise<PagedResults<DocumentRelationship>>;
457
497
  create<TDocument extends PHDocument = PHDocument>(document: PHDocument, parentIdentifier?: string, signal?: AbortSignal): Promise<TDocument>;
458
498
  /**
459
499
  * Pushes actions to the Switchboard and returns the updated document.
@@ -473,6 +513,73 @@ declare class GraphQLReactorClient implements IReactorBrowserClient$1 {
473
513
  * request. Declaring it would suggest a per-call choice that does not exist.
474
514
  */
475
515
  execute<TDocument extends PHDocument>(documentIdentifier: string, branch: string, actions: Action[], signal?: AbortSignal): Promise<TDocument>;
516
+ /**
517
+ * Runs multiple mutation jobs in dependency order over the Switchboard's
518
+ * `executeBatch` mutation and waits for all to settle, returning the result
519
+ * shaped like `IReactor.executeBatch`'s so the reference `DriveClient`
520
+ * consumes it unchanged.
521
+ *
522
+ * Not atomic: each job commits on its own and a failed job still releases
523
+ * its dependents. A FAILED job throws {@link BatchJobFailedError}, naming the
524
+ * first failed plan key and carrying every job's final state.
525
+ *
526
+ * Each job's actions are signed independently for the job's own
527
+ * `(documentId, branch)` target -- the per-action signing the reactor's own
528
+ * `signActions` does, not the batch state-prediction `execute` uses for a
529
+ * multi-action push. A drive job such as `addFile`'s is `CREATE_DOCUMENT` +
530
+ * `UPGRADE_DOCUMENT` + `ADD_RELATIONSHIP`, which the prediction path rejects
531
+ * outright and which has no fetchable baseline to stamp against. The reactor
532
+ * records but does not verify the stamped previous-state head, so signing
533
+ * each action bare is exactly what the in-process `DriveClient` relies on.
534
+ *
535
+ * The mutation is synchronous server-side: a job it returns is already
536
+ * settled, so {@link waitForJob} resolves from it without polling.
537
+ */
538
+ executeBatch(request: BatchExecutionRequest, signal?: AbortSignal): Promise<BatchExecutionResult>;
539
+ /** Polls `jobStatus` until the job is READ_READY or FAILED. */
540
+ waitForJob(jobOrId: string | JobInfo, signal?: AbortSignal): Promise<JobInfo>;
541
+ /**
542
+ * Not served: the Switchboard has no query for the policy it gives new
543
+ * documents, and a guessed default would under-sign on a stricter host.
544
+ */
545
+ getCreateSignaturePolicy(): Promise<SignaturePolicy>;
546
+ /**
547
+ * Not served: the versions a new document takes come from the host's peer
548
+ * agreement, which the Switchboard does not expose. A parent's own versions
549
+ * are not that answer.
550
+ */
551
+ getCreateProtocolVersions(_parentIdentifier?: string, _signal?: AbortSignal): Promise<ProtocolVersions>;
552
+ /**
553
+ * Sets or, with `null`, clears the preferred editor as a client-signed
554
+ * action, as the in-process client does.
555
+ */
556
+ setPreferredEditor(documentIdentifier: string, preferredEditor: string | null, branch?: string, signal?: AbortSignal): Promise<PHDocument>;
557
+ /**
558
+ * Emits the changes the batch's settled jobs made, as `create` and `execute`
559
+ * do, so a cache is invalidated without a realtime socket. The documents a
560
+ * job wrote to are its own and those its consistency token names.
561
+ */
562
+ private announceBatch;
563
+ /**
564
+ * The id a job's actions are signed for: a signature covers the document id,
565
+ * and the server resolves a slug before verifying. A document created by this
566
+ * job or an earlier one is named by its id. When the server has no such
567
+ * document the identifier is used as given, and the server decides; any
568
+ * other failure to read it throws, so nothing is signed for a slug.
569
+ */
570
+ private batchWriteTarget;
571
+ /**
572
+ * Signs one batch job's actions for the job's own log.
573
+ *
574
+ * Each action is signed on its own for `(documentId, branch)`, the same
575
+ * per-action signing the reactor's `signActions` does: no state prediction
576
+ * across the job, so a job carrying a `CREATE_DOCUMENT` the push-prediction
577
+ * path rejects still signs. An action already signed under a key is left
578
+ * as it is: the reference `DriveClient` signs its jobs before handing them
579
+ * here. With no signer the actions pass through unsigned, matching
580
+ * {@link execute}.
581
+ */
582
+ private signBatchJobActions;
476
583
  /**
477
584
  * Deletes a document and announces it as a `Deleted` event.
478
585
  *
@@ -547,6 +654,19 @@ declare class GraphQLReactorClient implements IReactorBrowserClient$1 {
547
654
  * `gql` document or a string and name the result type at the call site.
548
655
  */
549
656
  request<TResult = unknown, TVariables extends Variables = Variables>(document: TypedGraphQLDocument<TResult, TVariables> | string, variables?: TVariables, options?: GraphQLRequestOptions): Promise<TResult>;
657
+ /**
658
+ * Shapes a document result page into the reactor's {@link PagedResults}.
659
+ *
660
+ * The items carry the same `PHDocumentFields` fragment as `get`, so the same
661
+ * adapter rebuilds each one. `hasNextPage` gates the cursor exactly as
662
+ * `getOperations` does: no cursor means no `next`.
663
+ */
664
+ private toDocumentResults;
665
+ /**
666
+ * Shapes a relationship-edge result page into the reactor's
667
+ * {@link PagedResults}, restoring each edge's `Date` fields.
668
+ */
669
+ private toRelationshipResults;
550
670
  /**
551
671
  * Opens the realtime socket on the first subscriber.
552
672
  *
@@ -628,6 +748,15 @@ declare function isGraphQLReactorClient(client: unknown): client is GraphQLReact
628
748
  * argument, so silently returning the head state would be wrong.
629
749
  */
630
750
  declare function viewFilterInputFromViewFilter(view?: ViewFilter): ViewFilterInput | undefined;
751
+ /**
752
+ * The single source of truth for whether the Switchboard `findDocuments` query
753
+ * can serve a `find`. It is servable iff the search names neither `ids` nor
754
+ * `slugs` (present, regardless of length) AND the view is not point-in-time:
755
+ * each is a by-contract limitation of a surface that filters only by
756
+ * `type`/`parentId` at head. Exported so a caller can route around an
757
+ * unservable search instead of catching the error `find` throws for it.
758
+ */
759
+ declare function findIsServableOverGraphQL(search: SearchFilter, view?: ViewFilter): boolean;
631
760
  //#endregion
632
761
  //#region src/graphql-client/graphql-reactor-provider.d.ts
633
762
  declare global {
@@ -1203,6 +1332,6 @@ declare const setAttachmentService: SetPHGlobalValue<IAttachmentService>;
1203
1332
  /** Registers the attachmentService window event handler */
1204
1333
  declare const addAttachmentServiceEventHandler: AddPHGlobalEventHandler;
1205
1334
  //#endregion
1206
- export { useSwitchboardClient as $, useGetDocument as A, RemoteControllerOptions as At, StaticPackageManager as B, isOperationCache as Bt, useSyncList as C, GetDocumentWithOperationsResult as Ct, useDocumentCache as D, MergeHandler as Dt, useDocument as E, IRemoteController as Et, DocumentChangesSubscriptionOptions as F, SyncStatus$1 as Ft, stampAction as G, resolveDocumentModelModule as H, IDLE_REFETCH_STATE as Ht, isAuthRefusalClose as I, TrackedAction as It, MutateDocumentWithOperationsVariables as J, MutateDocumentWithOperationsDocument as K, makeAuthConnectionParams as L, DocumentCache as Lt, useGetDocuments as M, RemoteDocumentData as Mt, ConnectionParams as N, RemoteOperation as Nt, useDocumentSafe as O, PushResult as Ot, DocumentChangesEventPayload as P, RemoteOperationResultPage as Pt, ensurePHEventHandlers as Q, startDocumentChangesSubscription as R, IDLE_OPERATIONS_ENTRY as Rt, useSync as S, GetDocumentResult as St, setDocumentCache as T, IRemoteClient as Tt, prepareSignedActions as U, packageFromDocumentModels as V, readPromiseState as Vt, signStampedAction as W, GraphQLReactorProvider as X, ReactorOperationFieldsFragmentDoc as Y, GraphQLReactorProviderProps as Z, useDatabase as _, phDocumentFromMutation as _t, DocumentOperationsState as a, SubgraphSdkFactory as at, useReactorClient as b, ConflictStrategy as bt, useDocumentModelModuleById as c, describeGraphQLDocument as ct, UseDispatchResult as d, ambientRenownTokenProvider as dt, GraphQLReactorClient as et, useDispatch as f, makeAuthMiddleware as ft, setReactorClientModule as g, phDocumentFromGetDocument as gt, setReactorClient as h, RevisionsListSelection as ht, DocumentOperationsResult as i, GraphQLRequestOptions as it, useGetDocumentAsync as j, RemoteDocumentChangeEvent as jt, useDocuments as k, RemoteControllerGraphQLClient as kt, useDocumentModelModules as l, subgraphUrlFromGraphqlUrl as lt, addReactorClientModuleEventHandler as m, GetDocumentQueryResult as mt, setAttachmentService as n, isGraphQLReactorClient as nt, UseDocumentOperationsOptions as o, SubgraphSdkRegistry as ot, addReactorClientEventHandler as p, GetDocumentQueryFields as pt, MutateDocumentWithOperationsResult as q, useAttachmentService as r, viewFilterInputFromViewFilter as rt, useDocumentOperations as s, TypedGraphQLDocument as st, addAttachmentServiceEventHandler as t, GraphQLReactorClientOptions as tt, DispatchFn as u, BearerTokenProvider as ut, useModelRegistry as v, revisionMapFromRevisionsList as vt, addDocumentCacheEventHandler as w, GetOperationsResult as wt, useReactorClientModule as x, DocumentChangeListener as xt, usePGlite as y, ConflictInfo as yt, subscriptionsUrlFromGraphqlUrl as z, addPromiseState as zt };
1335
+ export { useSwitchboardClient as $, useGetDocument as A, IRemoteController as At, StaticPackageManager as B, TrackedAction as Bt, useSyncList as C, ConflictInfo as Ct, useDocumentCache as D, GetDocumentWithOperationsResult as Dt, useDocument as E, GetDocumentResult as Et, DocumentChangesSubscriptionOptions as F, RemoteDocumentChangeEvent as Ft, stampAction as G, readPromiseState as Gt, resolveDocumentModelModule as H, IDLE_OPERATIONS_ENTRY as Ht, isAuthRefusalClose as I, RemoteDocumentData as It, MutateDocumentWithOperationsVariables as J, MutateDocumentWithOperationsDocument as K, IDLE_REFETCH_STATE as Kt, makeAuthConnectionParams as L, RemoteOperation as Lt, useGetDocuments as M, PushResult as Mt, ConnectionParams as N, RemoteControllerGraphQLClient as Nt, useDocumentSafe as O, GetOperationsResult as Ot, DocumentChangesEventPayload as P, RemoteControllerOptions as Pt, ensurePHEventHandlers as Q, startDocumentChangesSubscription as R, RemoteOperationResultPage as Rt, useSync as S, revisionMapFromRevisionsList as St, setDocumentCache as T, DocumentChangeListener as Tt, prepareSignedActions as U, addPromiseState as Ut, packageFromDocumentModels as V, DocumentCache as Vt, signStampedAction as W, isOperationCache as Wt, GraphQLReactorProvider as X, ReactorOperationFieldsFragmentDoc as Y, GraphQLReactorProviderProps as Z, useDatabase as _, GetDocumentQueryResult as _t, DocumentOperationsState as a, GraphQLRequestOptions as at, useReactorClient as b, phDocumentFromGetDocument as bt, useDocumentModelModuleById as c, TypedGraphQLDocument as ct, UseDispatchResult as d, BatchJobFailedError as dt, GraphQLReactorClient as et, useDispatch as f, GraphQLOperationNotSupportedError as ft, setReactorClientModule as g, GetDocumentQueryFields as gt, setReactorClient as h, makeAuthMiddleware as ht, DocumentOperationsResult as i, viewFilterInputFromViewFilter as it, useGetDocumentAsync as j, MergeHandler as jt, useDocuments as k, IRemoteClient as kt, useDocumentModelModules as l, describeGraphQLDocument as lt, addReactorClientModuleEventHandler as m, ambientRenownTokenProvider as mt, setAttachmentService as n, findIsServableOverGraphQL as nt, UseDocumentOperationsOptions as o, SubgraphSdkFactory as ot, addReactorClientEventHandler as p, BearerTokenProvider as pt, MutateDocumentWithOperationsResult as q, useAttachmentService as r, isGraphQLReactorClient as rt, useDocumentOperations as s, SubgraphSdkRegistry as st, addAttachmentServiceEventHandler as t, GraphQLReactorClientOptions as tt, DispatchFn as u, subgraphUrlFromGraphqlUrl as ut, useModelRegistry as v, RevisionsListSelection as vt, addDocumentCacheEventHandler as w, ConflictStrategy as wt, useReactorClientModule as x, phDocumentFromMutation as xt, usePGlite as y, isoStringFromDateTime as yt, subscriptionsUrlFromGraphqlUrl as z, SyncStatus$1 as zt };
1207
1336
  export {};
1208
- //# sourceMappingURL=attachment-service-CkxtGxj8.d.ts.map
1337
+ //# sourceMappingURL=attachment-service-B-nLR114.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachment-service-B-nLR114.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;;;iBCUjB,gBAAgB,GAAG,SAAS,QAAQ,KAAK,iB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C,oBAAe,kBAIb,QAAA;;;;;;;;;;;;;;iBAuBF,oBAAoB;WAItB;;;;;;;;WAxME;;;;;;;;WAOA;;;;;;;;WAOA;;;;;;;;;;;cC/BH,wBAAwB,iBACnC,6BAA6B;;cAIlB,wBAAwB,iBACnC,6BAA6B;;cAIlB,oCAAoC;;cAIpC,kBAAkB,iBAAiB;;cAInC,kBAAkB,iBAAiB;;cAInC,8BAA8B;cAK9B,eAAc;cAGd,oDAAW;cAKX,wBAAuB;cAGvB,mBAAkB,OAAO;cAOzB,iBAAgB;;;;;;;;;KC1DjB,WAAW,YACrB,iBAAiB,YAAY,qBAC7B,YAAY,QAAQ,kBACpB,aAAa,QAAQ;KAGX,kBAAkB,WAAW,qBACvC,uBACA,WAAW;iBAGG,YAAY,YAAY,cAAY,UAAU,UAC5D,UAAU,wBACT,kBAAkB,WAAW;;;iBCpBhB,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;;;iBAoFc,sBACd,wCACC;;;;;;;;;;;;;;;;;iBAiBa,sBACd,uCACA,eACA,UAAU,+BACT;;;;cC/IU,sBAAsB,iBAAiB;;cAIvC,sBAAsB,iBAAiB;;cAIvC,kCAAkC"}
@@ -1,4 +1,4 @@
1
- import { c as ReactorGraphQLClient, k as SdkFunctionWrapper } from "./types-Cww0HJmz.js";
1
+ import { c as ReactorGraphQLClient, k as SdkFunctionWrapper } from "./types-D0ugg0E1.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-BYd9eNbA.d.ts.map
14
+ //# sourceMappingURL=client-C-tRLfRN.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client-C-tRLfRN.d.ts","names":[],"sources":["../src/graphql/client.ts"],"mappings":";;;;;;;;;iBA4BgB,aACd,yBAAyB,eACzB,aAAa,qBACZ"}
@@ -12,6 +12,8 @@ const PhDocumentFieldsFragmentDoc = gql`
12
12
  slug
13
13
  name
14
14
  documentType
15
+ meta
16
+ protocolVersions
15
17
  state
16
18
  revisionsList {
17
19
  scope
@@ -31,6 +33,32 @@ const DocumentRelationshipFieldsFragmentDoc = gql`
31
33
  updatedAt
32
34
  }
33
35
  `;
36
+ const JobInfoFieldsFragmentDoc = gql`
37
+ fragment JobInfoFields on JobInfo {
38
+ id
39
+ documentId
40
+ status
41
+ result
42
+ error
43
+ errorName
44
+ createdAt
45
+ completedAt
46
+ consistencyToken {
47
+ version
48
+ createdAtUtcIso
49
+ coordinates {
50
+ documentId
51
+ scope
52
+ branch
53
+ operationIndex
54
+ }
55
+ }
56
+ meta {
57
+ batchId
58
+ batchJobIds
59
+ }
60
+ }
61
+ `;
34
62
  const GetDocumentModelsDocument = gql`
35
63
  query GetDocumentModels($namespace: String, $paging: PagingInput) {
36
64
  documentModels(namespace: $namespace, paging: $paging) {
@@ -263,14 +291,10 @@ const GetDocumentOperationsDocument = gql`
263
291
  const GetJobStatusDocument = gql`
264
292
  query GetJobStatus($jobId: String!) {
265
293
  jobStatus(jobId: $jobId) {
266
- id
267
- status
268
- result
269
- error
270
- createdAt
271
- completedAt
294
+ ...JobInfoFields
272
295
  }
273
296
  }
297
+ ${JobInfoFieldsFragmentDoc}
274
298
  `;
275
299
  const EvaluateActionsDocument = gql`
276
300
  query EvaluateActions(
@@ -343,14 +367,23 @@ const MutateDocumentAsyncDocument = gql`
343
367
  actions: $actions
344
368
  branch: $branch
345
369
  ) {
346
- id
347
- status
348
- result
349
- error
350
- createdAt
351
- completedAt
370
+ ...JobInfoFields
352
371
  }
353
372
  }
373
+ ${JobInfoFieldsFragmentDoc}
374
+ `;
375
+ const ExecuteBatchDocument = gql`
376
+ mutation ExecuteBatch($jobs: [ExecutionJobInput!]!) {
377
+ executeBatch(jobs: $jobs) {
378
+ jobs {
379
+ key
380
+ job {
381
+ ...JobInfoFields
382
+ }
383
+ }
384
+ }
385
+ }
386
+ ${JobInfoFieldsFragmentDoc}
354
387
  `;
355
388
  const RenameDocumentDocument = gql`
356
389
  mutation RenameDocument(
@@ -774,6 +807,17 @@ function getSdk(client, withWrapper = defaultWrapper) {
774
807
  signal
775
808
  }), "MutateDocumentAsync", "mutation", variables);
776
809
  },
810
+ ExecuteBatch(variables, requestHeaders, signal) {
811
+ return withWrapper((wrappedRequestHeaders) => client.request({
812
+ document: ExecuteBatchDocument,
813
+ variables,
814
+ requestHeaders: {
815
+ ...requestHeaders,
816
+ ...wrappedRequestHeaders
817
+ },
818
+ signal
819
+ }), "ExecuteBatch", "mutation", variables);
820
+ },
777
821
  RenameDocument(variables, requestHeaders, signal) {
778
822
  return withWrapper((wrappedRequestHeaders) => client.request({
779
823
  document: RenameDocumentDocument,
@@ -1052,4 +1096,4 @@ function createClient(urlOrGQLClient, middleware) {
1052
1096
  //#endregion
1053
1097
  export { PropagationMode as a, PhDocumentFieldsFragmentDoc as i, DocumentChangesDocument as n, GetDocumentWithOperationsDocument as r, createClient as t };
1054
1098
 
1055
- //# sourceMappingURL=client-CSOLwWU9.js.map
1099
+ //# sourceMappingURL=client-CZyHv02L.js.map