@powerhousedao/reactor-browser 6.2.2-dev.5 → 6.2.2-dev.50

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 (66) hide show
  1. package/README.md +283 -0
  2. package/dist/attachment-service-CghxHYta.d.ts +970 -0
  3. package/dist/attachment-service-CghxHYta.d.ts.map +1 -0
  4. package/dist/client-BaHKLGy5.d.ts +14 -0
  5. package/dist/client-BaHKLGy5.d.ts.map +1 -0
  6. package/dist/{client-u13cr-Vg.js → client-Zz_l9QzI.js} +30 -3
  7. package/dist/client-Zz_l9QzI.js.map +1 -0
  8. package/dist/{client-_Gh2Uf0E.js → client-s_ISz_Zs.js} +30 -4
  9. package/dist/client-s_ISz_Zs.js.map +1 -0
  10. package/dist/{document-by-id-dLYFX-xz.js → document-by-id-DWEQI7wn.js} +48 -43
  11. package/dist/document-by-id-DWEQI7wn.js.map +1 -0
  12. package/dist/document-operations-D0ePGjbp.js +2778 -0
  13. package/dist/document-operations-D0ePGjbp.js.map +1 -0
  14. package/dist/global-CbyAMlZd.d.ts +400 -0
  15. package/dist/global-CbyAMlZd.d.ts.map +1 -0
  16. package/dist/index-CxxxP14A.d.ts +144 -0
  17. package/dist/index-CxxxP14A.d.ts.map +1 -0
  18. package/dist/index-DPq1VjpB.d.ts +345 -0
  19. package/dist/index-DPq1VjpB.d.ts.map +1 -0
  20. package/dist/index.d.ts +177 -695
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +256 -1627
  23. package/dist/index.js.map +1 -1
  24. package/dist/{inspector-proxy-CvQDDxmT.d.ts → inspector-proxy-CaCFdEG4.d.ts} +4 -2
  25. package/dist/inspector-proxy-CaCFdEG4.d.ts.map +1 -0
  26. package/dist/{make-ph-event-functions-BHoLPif5.js → make-ph-event-functions-DBq3iWYn.js} +1 -1
  27. package/dist/{make-ph-event-functions-BHoLPif5.js.map → make-ph-event-functions-DBq3iWYn.js.map} +1 -1
  28. package/dist/{index-DS4W07Y8.d.ts → pglite-CntadC_p-BtEalg1H.d.ts} +2 -142
  29. package/dist/pglite-CntadC_p-BtEalg1H.d.ts.map +1 -0
  30. package/dist/{relational-Dj06-YkI.js → relational-C_0GdGVN.js} +2 -2
  31. package/dist/{relational-Dj06-YkI.js.map → relational-C_0GdGVN.js.map} +1 -1
  32. package/dist/renown-BZabzj4l.js +68 -0
  33. package/dist/renown-BZabzj4l.js.map +1 -0
  34. package/dist/{renown-D-1c_Bvx.js → renown-C7a1ygsj.js} +471 -57
  35. package/dist/renown-C7a1ygsj.js.map +1 -0
  36. package/dist/src/analytics/index.d.ts +1 -1
  37. package/dist/src/analytics/index.js +2 -1
  38. package/dist/src/analytics/index.js.map +1 -1
  39. package/dist/src/graphql/client.d.ts +3 -2
  40. package/dist/src/graphql/client.js +1 -1
  41. package/dist/src/graphql-client/entry.d.ts +4 -0
  42. package/dist/src/graphql-client/entry.js +3 -0
  43. package/dist/src/relational/index.d.ts +1 -1
  44. package/dist/src/relational/index.js +1 -1
  45. package/dist/src/renown/index.d.ts +2 -2
  46. package/dist/src/renown/index.js +3 -2
  47. package/dist/src/rpc/index.d.ts +5 -3
  48. package/dist/src/rpc/index.d.ts.map +1 -1
  49. package/dist/src/rpc/index.js +37 -10
  50. package/dist/src/rpc/index.js.map +1 -1
  51. package/dist/store-DAJq6vSs.js +37 -0
  52. package/dist/store-DAJq6vSs.js.map +1 -0
  53. package/dist/{client-09xv0Dq6.d.ts → types-Bitg5Z5j.d.ts} +25 -13
  54. package/dist/types-Bitg5Z5j.d.ts.map +1 -0
  55. package/dist/{types-CPV0Cnsy.d.ts → types-wGaiXwjh.d.ts} +1 -1
  56. package/dist/{types-CPV0Cnsy.d.ts.map → types-wGaiXwjh.d.ts.map} +1 -1
  57. package/package.json +15 -9
  58. package/dist/client-09xv0Dq6.d.ts.map +0 -1
  59. package/dist/client-_Gh2Uf0E.js.map +0 -1
  60. package/dist/client-u13cr-Vg.js.map +0 -1
  61. package/dist/document-by-id-dLYFX-xz.js.map +0 -1
  62. package/dist/index-D3bV5rcl.d.ts +0 -216
  63. package/dist/index-D3bV5rcl.d.ts.map +0 -1
  64. package/dist/index-DS4W07Y8.d.ts.map +0 -1
  65. package/dist/inspector-proxy-CvQDDxmT.d.ts.map +0 -1
  66. package/dist/renown-D-1c_Bvx.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachment-service-CghxHYta.d.ts","names":[],"sources":["../src/document-cache.ts","../src/remote-controller/types.ts","../src/graphql-client/adapter.ts","../src/graphql-client/auth.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":";;;;;;;;;;;;;;;;;;iBAYgB,eAAA,GAAA,CAAmB,OAAA,EAAS,OAAA,CAAQ,CAAA,IAAK,gBAAA,CAAiB,CAAA;AAAA,iBAwB1D,gBAAA,GAAA,CACd,OAAA,EAAS,OAAA,CAAQ,CAAA,IAAK,gBAAA,CAAiB,CAAA,IACtC,YAAA,CAAa,CAAA;;;;;;;cAiCH,aAAA,YAAyB,cAAA;EAAA,QAShB,MAAA;EAAA,QARZ,SAAA;EAAA,QACA,aAAA;EAAA,QAIA,SAAA;EAAA,QACA,WAAA;cAEY,MAAA,EAAQ,uBAAA;EAAA,QAMpB,oBAAA;EAAA,QAaA,qBAAA;EAAA,QAUM,qBAAA;EAAA,QAUN,2BAAA;EAQR,GAAA,CAAI,EAAA,UAAY,OAAA,aAAoB,OAAA,CAAQ,YAAA;EAgB5C,QAAA,CAAS,GAAA,aAAgB,OAAA,CAAQ,YAAA;EA8DjC,SAAA,CAAU,EAAA,qBAAuB,QAAA;EAjMsC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uBAAA,CAHuB,MAAA;AAAA,cAKX,gBAAA,QAAuB,sBAAA;AAAA,cAGvB,WAAA,QAAkB,MAAA,CAAO,QAAA;AAAA,cAOzB,SAAA,QAAgB,MAAA;;;;;;;;;KC1DjB,UAAA,aACV,eAAA,EAAiB,OAAA,KAAY,OAAA,cAC7B,QAAA,IAAY,MAAA,EAAQ,KAAA,aACpB,SAAA,IAAa,MAAA,EAAQ,YAAA;AAAA,KAGX,iBAAA,iCACV,SAAA,cACA,UAAA,CAAW,OAAA;AAAA,iBAGG,WAAA,aAAwB,YAAA,YAAsB,QAAA,CAAA,CAC5D,QAAA,EAAU,SAAA,eACT,iBAAA,CAAkB,SAAA,EAAW,OAAA;;;iBCpBhB,uBAAA,CAAA,GAA2B,mBAAA;;;;;;;;;iBAuB3B,0BAAA,CACd,EAAA,6BACA,OAAA,YACC,mBAAA;;;KCzBE,aAAA;EACH,gBAAA,EAAkB,WAAA;EAClB,eAAA,EAAiB,WAAA;EACjB,SAAA;EACA,KAAA,EAAO,KAAA;AAAA;;KAIG,uBAAA,GAA0B,aAAA;EACpC,OAAA;AAAA;;;;;;;;iBAUc,qBAAA,CACd,UAAA,8BACC,uBAAA;;;;cCbU,oBAAA,EAAsB,gBAAA,CAAiB,kBAAA;;cAIvC,oBAAA,EAAsB,gBAAA,CAAiB,kBAAA;;cAIvC,gCAAA,EAAkC,uBAAA"}
@@ -0,0 +1,14 @@
1
+ import { O as SdkFunctionWrapper, c as ReactorGraphQLClient } from "./types-Bitg5Z5j.js";
2
+ import { GraphQLClient } from "graphql-request";
3
+
4
+ //#region src/graphql/client.d.ts
5
+ /**
6
+ * Creates a GraphQL client for the Reactor Subgraph API.
7
+ * @param urlOrGQLClient The URL of the GraphQL API or a GraphQL client instance.
8
+ * @param middleware An optional middleware function to wrap the GraphQL client calls.
9
+ * @returns A GraphQL client for the Reactor Subgraph API.
10
+ */
11
+ declare function createClient(urlOrGQLClient: string | GraphQLClient, middleware?: SdkFunctionWrapper): ReactorGraphQLClient;
12
+ //#endregion
13
+ export { createClient as t };
14
+ //# sourceMappingURL=client-BaHKLGy5.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client-BaHKLGy5.d.ts","names":[],"sources":["../src/graphql/client.ts"],"mappings":";;;;AA4BA;;;;;;AAAA,iBAAgB,YAAA,CACd,cAAA,WAAyB,aAAA,EACzB,UAAA,GAAa,kBAAA,GACZ,oBAAA"}
@@ -7,6 +7,33 @@ async function getPackages(registryUrl) {
7
7
  if (!res.ok) throw new Error(`Registry error: HTTP ${res.status}`);
8
8
  return await res.json();
9
9
  }
10
+ /**
11
+ * Fetch one page of the registry listing (trimmed items). Backed by the
12
+ * paginated `GET /packages?limit=&offset=&search=` mode. Used by the Package
13
+ * Manager's Available tab for infinite scroll + server-side search.
14
+ */
15
+ async function getPackagePage(registryUrl, params) {
16
+ const query = new URLSearchParams({
17
+ limit: String(params.limit),
18
+ offset: String(params.offset)
19
+ });
20
+ if (params.search) query.set("search", params.search);
21
+ const res = await fetch(`${trimTrailingSlash(registryUrl)}/packages?${query.toString()}`);
22
+ if (!res.ok) throw new Error(`Registry error: HTTP ${res.status}`);
23
+ return await res.json();
24
+ }
25
+ /**
26
+ * Fetch full package info for every package exposing a given document type,
27
+ * via the legacy `?documentType=` filter (returns full PackageInfo objects,
28
+ * not just names). Used by the MissingPackageModal to offer installs without
29
+ * loading the entire paginated listing.
30
+ */
31
+ async function getPackagesForDocumentType(registryUrl, documentType) {
32
+ const encodedType = encodeURIComponent(documentType);
33
+ const res = await fetch(`${trimTrailingSlash(registryUrl)}/packages?documentType=${encodedType}`);
34
+ if (!res.ok) throw new Error(`Registry error: HTTP ${res.status}`);
35
+ return await res.json();
36
+ }
10
37
  async function getPackagesByDocumentType(registryUrl, documentType) {
11
38
  const encodedType = encodeURIComponent(documentType);
12
39
  const res = await fetch(`${trimTrailingSlash(registryUrl)}/packages/by-document-type?type=${encodedType}`);
@@ -33,7 +60,7 @@ var RegistryClient = class {
33
60
  const packages = await this.getPackages();
34
61
  if (!query) return packages;
35
62
  const lowerQuery = query.toLowerCase();
36
- return packages.filter((pkg) => pkg.name.toLowerCase().includes(lowerQuery) || pkg.manifest?.description?.toLowerCase().includes(lowerQuery));
63
+ return packages.filter((pkg) => pkg.name.toLowerCase().includes(lowerQuery));
37
64
  }
38
65
  onPublish(callback) {
39
66
  const eventSource = new EventSource(`${this.apiUrl}/-/events`);
@@ -46,6 +73,6 @@ var RegistryClient = class {
46
73
  }
47
74
  };
48
75
  //#endregion
49
- export { trimTrailingSlash as i, getPackages as n, getPackagesByDocumentType as r, RegistryClient as t };
76
+ export { getPackagesForDocumentType as a, getPackagesByDocumentType as i, getPackagePage as n, trimTrailingSlash as o, getPackages as r, RegistryClient as t };
50
77
 
51
- //# sourceMappingURL=client-u13cr-Vg.js.map
78
+ //# sourceMappingURL=client-Zz_l9QzI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client-Zz_l9QzI.js","names":[],"sources":["../src/registry/fetchers.ts","../src/registry/client.ts"],"sourcesContent":["import type { PackageInfo, PackagePage } from \"@powerhousedao/shared/registry\";\n\n// Strip a trailing \"/\" so we don't emit `http://host//packages` when a user\n// writes `packageRegistryUrl: \"http://host/\"`. Verdaccio's own web backend\n// 404s on the doubled slash, which cascades into an empty registry list and\n// masks the real install flow.\nexport function trimTrailingSlash(url: string): string {\n return url.endsWith(\"/\") ? url.slice(0, -1) : url;\n}\n\nexport async function getPackages(registryUrl: string) {\n const res = await fetch(`${trimTrailingSlash(registryUrl)}/packages`);\n if (!res.ok) throw new Error(`Registry error: HTTP ${res.status}`);\n const data = (await res.json()) as PackageInfo[];\n return data;\n}\n\n/**\n * Fetch one page of the registry listing (trimmed items). Backed by the\n * paginated `GET /packages?limit=&offset=&search=` mode. Used by the Package\n * Manager's Available tab for infinite scroll + server-side search.\n */\nexport async function getPackagePage(\n registryUrl: string,\n params: { limit: number; offset: number; search?: string },\n): Promise<PackagePage> {\n const query = new URLSearchParams({\n limit: String(params.limit),\n offset: String(params.offset),\n });\n if (params.search) query.set(\"search\", params.search);\n const res = await fetch(\n `${trimTrailingSlash(registryUrl)}/packages?${query.toString()}`,\n );\n if (!res.ok) throw new Error(`Registry error: HTTP ${res.status}`);\n return (await res.json()) as PackagePage;\n}\n\n/**\n * Fetch full package info for every package exposing a given document type,\n * via the legacy `?documentType=` filter (returns full PackageInfo objects,\n * not just names). Used by the MissingPackageModal to offer installs without\n * loading the entire paginated listing.\n */\nexport async function getPackagesForDocumentType(\n registryUrl: string,\n documentType: string,\n): Promise<PackageInfo[]> {\n const encodedType = encodeURIComponent(documentType);\n const res = await fetch(\n `${trimTrailingSlash(registryUrl)}/packages?documentType=${encodedType}`,\n );\n if (!res.ok) throw new Error(`Registry error: HTTP ${res.status}`);\n return (await res.json()) as PackageInfo[];\n}\n\nexport async function getPackagesByDocumentType(\n registryUrl: string,\n documentType: string,\n): Promise<string[]> {\n const encodedType = encodeURIComponent(documentType);\n const res = await fetch(\n `${trimTrailingSlash(registryUrl)}/packages/by-document-type?type=${encodedType}`,\n );\n if (!res.ok) throw new Error(`Registry error: HTTP ${res.status}`);\n return (await res.json()) as string[];\n}\n","import type { PackageInfo } from \"@powerhousedao/shared/registry\";\nimport { getPackages, getPackagesByDocumentType } from \"./fetchers.js\";\nimport type { PublishEvent } from \"./types.js\";\n\nfunction cdnUrlToApiUrl(cdnUrl: string): string {\n return cdnUrl.replace(/\\/-\\/cdn\\/?$/, \"\");\n}\nexport class RegistryClient {\n readonly apiUrl: string;\n\n constructor(cdnUrl: string) {\n this.apiUrl = cdnUrlToApiUrl(cdnUrl);\n }\n\n async getPackages(): Promise<PackageInfo[]> {\n const data = await getPackages(this.apiUrl);\n return data;\n }\n\n async getPackagesByDocumentType(documentType: string): Promise<string[]> {\n return await getPackagesByDocumentType(this.apiUrl, documentType);\n }\n\n async searchPackages(query: string): Promise<PackageInfo[]> {\n const packages = await this.getPackages();\n if (!query) return packages;\n const lowerQuery = query.toLowerCase();\n // Match on package name only (not description).\n return packages.filter((pkg) =>\n pkg.name.toLowerCase().includes(lowerQuery),\n );\n }\n\n onPublish(callback: (event: PublishEvent) => void): () => void {\n const eventSource = new EventSource(`${this.apiUrl}/-/events`);\n\n eventSource.addEventListener(\"publish\", (e: MessageEvent<string>) => {\n const data = JSON.parse(e.data) as PublishEvent;\n callback(data);\n });\n\n return () => {\n eventSource.close();\n };\n }\n}\n"],"mappings":";AAMA,SAAgB,kBAAkB,KAAqB;AACrD,QAAO,IAAI,SAAS,IAAI,GAAG,IAAI,MAAM,GAAG,GAAG,GAAG;;AAGhD,eAAsB,YAAY,aAAqB;CACrD,MAAM,MAAM,MAAM,MAAM,GAAG,kBAAkB,YAAY,CAAC,WAAW;AACrE,KAAI,CAAC,IAAI,GAAI,OAAM,IAAI,MAAM,wBAAwB,IAAI,SAAS;AAElE,QADc,MAAM,IAAI,MAAM;;;;;;;AAShC,eAAsB,eACpB,aACA,QACsB;CACtB,MAAM,QAAQ,IAAI,gBAAgB;EAChC,OAAO,OAAO,OAAO,MAAM;EAC3B,QAAQ,OAAO,OAAO,OAAO;EAC9B,CAAC;AACF,KAAI,OAAO,OAAQ,OAAM,IAAI,UAAU,OAAO,OAAO;CACrD,MAAM,MAAM,MAAM,MAChB,GAAG,kBAAkB,YAAY,CAAC,YAAY,MAAM,UAAU,GAC/D;AACD,KAAI,CAAC,IAAI,GAAI,OAAM,IAAI,MAAM,wBAAwB,IAAI,SAAS;AAClE,QAAQ,MAAM,IAAI,MAAM;;;;;;;;AAS1B,eAAsB,2BACpB,aACA,cACwB;CACxB,MAAM,cAAc,mBAAmB,aAAa;CACpD,MAAM,MAAM,MAAM,MAChB,GAAG,kBAAkB,YAAY,CAAC,yBAAyB,cAC5D;AACD,KAAI,CAAC,IAAI,GAAI,OAAM,IAAI,MAAM,wBAAwB,IAAI,SAAS;AAClE,QAAQ,MAAM,IAAI,MAAM;;AAG1B,eAAsB,0BACpB,aACA,cACmB;CACnB,MAAM,cAAc,mBAAmB,aAAa;CACpD,MAAM,MAAM,MAAM,MAChB,GAAG,kBAAkB,YAAY,CAAC,kCAAkC,cACrE;AACD,KAAI,CAAC,IAAI,GAAI,OAAM,IAAI,MAAM,wBAAwB,IAAI,SAAS;AAClE,QAAQ,MAAM,IAAI,MAAM;;;;AC7D1B,SAAS,eAAe,QAAwB;AAC9C,QAAO,OAAO,QAAQ,gBAAgB,GAAG;;AAE3C,IAAa,iBAAb,MAA4B;CAC1B;CAEA,YAAY,QAAgB;AAC1B,OAAK,SAAS,eAAe,OAAO;;CAGtC,MAAM,cAAsC;AAE1C,SADa,MAAM,YAAY,KAAK,OAAO;;CAI7C,MAAM,0BAA0B,cAAyC;AACvE,SAAO,MAAM,0BAA0B,KAAK,QAAQ,aAAa;;CAGnE,MAAM,eAAe,OAAuC;EAC1D,MAAM,WAAW,MAAM,KAAK,aAAa;AACzC,MAAI,CAAC,MAAO,QAAO;EACnB,MAAM,aAAa,MAAM,aAAa;AAEtC,SAAO,SAAS,QAAQ,QACtB,IAAI,KAAK,aAAa,CAAC,SAAS,WAAW,CAC5C;;CAGH,UAAU,UAAqD;EAC7D,MAAM,cAAc,IAAI,YAAY,GAAG,KAAK,OAAO,WAAW;AAE9D,cAAY,iBAAiB,YAAY,MAA4B;AAEnE,YADa,KAAK,MAAM,EAAE,KAAK,CACjB;IACd;AAEF,eAAa;AACX,eAAY,OAAO"}
@@ -1,6 +1,16 @@
1
1
  import { GraphQLClient } from "graphql-request";
2
2
  import { gql } from "graphql-tag";
3
3
  //#region src/graphql/gen/schema.ts
4
+ let DocumentChangeType = /* @__PURE__ */ function(DocumentChangeType) {
5
+ DocumentChangeType["ChildAdded"] = "CHILD_ADDED";
6
+ DocumentChangeType["ChildRemoved"] = "CHILD_REMOVED";
7
+ DocumentChangeType["Created"] = "CREATED";
8
+ DocumentChangeType["Deleted"] = "DELETED";
9
+ DocumentChangeType["ParentAdded"] = "PARENT_ADDED";
10
+ DocumentChangeType["ParentRemoved"] = "PARENT_REMOVED";
11
+ DocumentChangeType["Updated"] = "UPDATED";
12
+ return DocumentChangeType;
13
+ }({});
4
14
  let PropagationMode = /* @__PURE__ */ function(PropagationMode) {
5
15
  PropagationMode["Cascade"] = "CASCADE";
6
16
  PropagationMode["Orphan"] = "ORPHAN";
@@ -66,6 +76,7 @@ const GetDocumentWithOperationsDocument = gql`
66
76
  hash
67
77
  skip
68
78
  error
79
+ deniedReason
69
80
  id
70
81
  action {
71
82
  id
@@ -178,6 +189,7 @@ const GetDocumentOperationsDocument = gql`
178
189
  hash
179
190
  skip
180
191
  error
192
+ deniedReason
181
193
  id
182
194
  action {
183
195
  id
@@ -428,6 +440,7 @@ const PollSyncEnvelopesDocument = gql`
428
440
  hash
429
441
  skip
430
442
  error
443
+ deniedReason
431
444
  id
432
445
  action {
433
446
  id
@@ -470,6 +483,7 @@ const PollSyncEnvelopesDocument = gql`
470
483
  deadLetters {
471
484
  documentId
472
485
  error
486
+ errorType
473
487
  }
474
488
  hasMore
475
489
  }
@@ -841,12 +855,24 @@ function buildBatchDocumentWithOperationsQuery(identifier, view, filters, paging
841
855
  */
842
856
  function createClient(urlOrGQLClient, middleware) {
843
857
  const client = typeof urlOrGQLClient === "string" ? new GraphQLClient(urlOrGQLClient) : urlOrGQLClient;
844
- const runWithMiddleware = async (operationName, run) => {
858
+ const runWithMiddleware = async (operationName, run, operationType = "query", variables) => {
845
859
  if (!middleware) return run();
846
- return middleware(run, operationName, "query");
860
+ return middleware(run, operationName, operationType, variables);
847
861
  };
848
862
  return {
849
863
  ...getSdk(client, middleware),
864
+ async RunDocument(options) {
865
+ const { document, variables, signal } = options;
866
+ return runWithMiddleware(options.operationName, (wrappedRequestHeaders) => client.request({
867
+ document,
868
+ variables,
869
+ requestHeaders: {
870
+ ...options.requestHeaders,
871
+ ...wrappedRequestHeaders
872
+ },
873
+ signal
874
+ }), options.operationType, variables);
875
+ },
850
876
  async BatchGetDocumentOperations(filters, pagings) {
851
877
  const { query, variables } = buildBatchOperationsQuery(filters, pagings);
852
878
  const data = await runWithMiddleware("BatchGetDocumentOperations", (requestHeaders) => client.request(query, variables, requestHeaders));
@@ -863,6 +889,6 @@ function createClient(urlOrGQLClient, middleware) {
863
889
  };
864
890
  }
865
891
  //#endregion
866
- export { GetDocumentWithOperationsDocument as n, PropagationMode as r, createClient as t };
892
+ export { PhDocumentFieldsFragmentDoc as a, GetDocumentWithOperationsDocument as i, DocumentChangeType as n, PropagationMode as o, DocumentChangesDocument as r, createClient as t };
867
893
 
868
- //# sourceMappingURL=client-_Gh2Uf0E.js.map
894
+ //# sourceMappingURL=client-s_ISz_Zs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client-s_ISz_Zs.js","names":[],"sources":["../src/graphql/gen/schema.ts","../src/graphql/batch-queries.ts","../src/graphql/client.ts"],"sourcesContent":["import type { GraphQLClient, RequestOptions } from \"graphql-request\";\nimport { gql } from \"graphql-tag\";\nexport type Maybe<T> = T | null | undefined;\nexport type InputMaybe<T> = T | null | undefined;\nexport type Exact<T extends { [key: string]: unknown }> = {\n [K in keyof T]: T[K];\n};\nexport type MakeOptional<T, K extends keyof T> = Omit<T, K> & {\n [SubKey in K]?: Maybe<T[SubKey]>;\n};\nexport type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {\n [SubKey in K]: Maybe<T[SubKey]>;\n};\nexport type MakeEmpty<\n T extends { [key: string]: unknown },\n K extends keyof T,\n> = { [_ in K]?: never };\nexport type Incremental<T> =\n | T\n | {\n [P in keyof T]?: P extends \" $fragmentName\" | \"__typename\" ? T[P] : never;\n };\ntype GraphQLClientRequestHeaders = RequestOptions[\"requestHeaders\"];\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n ID: { input: string; output: string };\n String: { input: string; output: string };\n Boolean: { input: boolean; output: boolean };\n Int: { input: number; output: number };\n Float: { input: number; output: number };\n DateTime: { input: string | Date; output: string | Date };\n JSONObject: { input: NonNullable<unknown>; output: NonNullable<unknown> };\n};\n\nexport type Action = {\n readonly context?: Maybe<ActionContext>;\n readonly id: Scalars[\"String\"][\"output\"];\n readonly input: Scalars[\"JSONObject\"][\"output\"];\n readonly scope: Scalars[\"String\"][\"output\"];\n readonly timestampUtcMs: Scalars[\"String\"][\"output\"];\n readonly type: Scalars[\"String\"][\"output\"];\n};\n\nexport type ActionContext = {\n readonly signer?: Maybe<ReactorSigner>;\n};\n\nexport type ActionContextInput = {\n readonly signer?: InputMaybe<ReactorSignerInput>;\n};\n\nexport type ActionInput = {\n readonly context?: InputMaybe<ActionContextInput>;\n readonly id: Scalars[\"String\"][\"input\"];\n readonly input: Scalars[\"JSONObject\"][\"input\"];\n readonly scope: Scalars[\"String\"][\"input\"];\n readonly timestampUtcMs: Scalars[\"String\"][\"input\"];\n readonly type: Scalars[\"String\"][\"input\"];\n};\n\nexport type ChannelMeta = {\n readonly id: Scalars[\"String\"][\"output\"];\n};\n\nexport type ChannelMetaInput = {\n readonly id: Scalars[\"String\"][\"input\"];\n};\n\nexport type DeadLetterInfo = {\n readonly branch: Scalars[\"String\"][\"output\"];\n readonly documentId: Scalars[\"String\"][\"output\"];\n readonly error: Scalars[\"String\"][\"output\"];\n /**\n * How the origin classified the failure. A peer needs this to mirror the origin's\n * quarantine decision; without it a held auth operation would freeze the document\n * on the peer side while the origin kept syncing.\n */\n readonly errorType?: Maybe<Scalars[\"String\"][\"output\"]>;\n readonly jobId: Scalars[\"String\"][\"output\"];\n readonly operationCount: Scalars[\"Int\"][\"output\"];\n readonly scopes: ReadonlyArray<Scalars[\"String\"][\"output\"]>;\n};\n\nexport type DocumentChangeContext = {\n readonly childId?: Maybe<Scalars[\"String\"][\"output\"]>;\n readonly parentId?: Maybe<Scalars[\"String\"][\"output\"]>;\n};\n\nexport type DocumentChangeEvent = {\n readonly context?: Maybe<DocumentChangeContext>;\n readonly documents: ReadonlyArray<PhDocument>;\n readonly type: DocumentChangeType;\n};\n\nexport enum DocumentChangeType {\n ChildAdded = \"CHILD_ADDED\",\n ChildRemoved = \"CHILD_REMOVED\",\n Created = \"CREATED\",\n Deleted = \"DELETED\",\n ParentAdded = \"PARENT_ADDED\",\n ParentRemoved = \"PARENT_REMOVED\",\n Updated = \"UPDATED\",\n}\n\nexport type DocumentModelGlobalState = {\n readonly id: Scalars[\"String\"][\"output\"];\n readonly name: Scalars[\"String\"][\"output\"];\n readonly namespace?: Maybe<Scalars[\"String\"][\"output\"]>;\n readonly specification: Scalars[\"JSONObject\"][\"output\"];\n readonly version?: Maybe<Scalars[\"String\"][\"output\"]>;\n};\n\nexport type DocumentModelResultPage = {\n readonly cursor?: Maybe<Scalars[\"String\"][\"output\"]>;\n readonly hasNextPage: Scalars[\"Boolean\"][\"output\"];\n readonly hasPreviousPage: Scalars[\"Boolean\"][\"output\"];\n readonly items: ReadonlyArray<DocumentModelGlobalState>;\n readonly totalCount: Scalars[\"Int\"][\"output\"];\n};\n\nexport type DocumentOperationsFilterInput = {\n readonly actionTypes?: InputMaybe<ReadonlyArray<Scalars[\"String\"][\"input\"]>>;\n readonly branch?: InputMaybe<Scalars[\"String\"][\"input\"]>;\n readonly scopes?: InputMaybe<ReadonlyArray<Scalars[\"String\"][\"input\"]>>;\n readonly sinceRevision?: InputMaybe<Scalars[\"Int\"][\"input\"]>;\n readonly timestampFrom?: InputMaybe<Scalars[\"String\"][\"input\"]>;\n readonly timestampTo?: InputMaybe<Scalars[\"String\"][\"input\"]>;\n};\n\nexport type DocumentWithChildren = {\n readonly childIds: ReadonlyArray<Scalars[\"String\"][\"output\"]>;\n readonly document: PhDocument;\n};\n\nexport type JobChangeEvent = {\n readonly error?: Maybe<Scalars[\"String\"][\"output\"]>;\n readonly jobId: Scalars[\"String\"][\"output\"];\n readonly result: Scalars[\"JSONObject\"][\"output\"];\n readonly status: Scalars[\"String\"][\"output\"];\n};\n\nexport type JobInfo = {\n readonly completedAt?: Maybe<Scalars[\"DateTime\"][\"output\"]>;\n readonly createdAt: Scalars[\"DateTime\"][\"output\"];\n readonly error?: Maybe<Scalars[\"String\"][\"output\"]>;\n readonly id: Scalars[\"String\"][\"output\"];\n readonly result: Scalars[\"JSONObject\"][\"output\"];\n readonly status: Scalars[\"String\"][\"output\"];\n};\n\nexport type MoveRelationshipResult = {\n readonly source: PhDocument;\n readonly target: PhDocument;\n};\n\nexport type Mutation = {\n readonly addRelationship: PhDocument;\n readonly createDocument: PhDocument;\n readonly createEmptyDocument: PhDocument;\n readonly deleteDocument: Scalars[\"Boolean\"][\"output\"];\n readonly deleteDocuments: Scalars[\"Boolean\"][\"output\"];\n readonly moveRelationship: MoveRelationshipResult;\n readonly mutateDocument: PhDocument;\n readonly mutateDocumentAsync: Scalars[\"String\"][\"output\"];\n readonly pushSyncEnvelopes: Scalars[\"Boolean\"][\"output\"];\n readonly removeRelationship: PhDocument;\n readonly renameDocument: PhDocument;\n readonly setPreferredEditor: PhDocument;\n readonly touchChannel: TouchChannelResult;\n};\n\nexport type MutationAddRelationshipArgs = {\n branch?: InputMaybe<Scalars[\"String\"][\"input\"]>;\n relationshipType: Scalars[\"String\"][\"input\"];\n sourceIdentifier: Scalars[\"String\"][\"input\"];\n targetIdentifier: Scalars[\"String\"][\"input\"];\n};\n\nexport type MutationCreateDocumentArgs = {\n document: Scalars[\"JSONObject\"][\"input\"];\n parentIdentifier?: InputMaybe<Scalars[\"String\"][\"input\"]>;\n};\n\nexport type MutationCreateEmptyDocumentArgs = {\n documentType: Scalars[\"String\"][\"input\"];\n parentIdentifier?: InputMaybe<Scalars[\"String\"][\"input\"]>;\n};\n\nexport type MutationDeleteDocumentArgs = {\n identifier: Scalars[\"String\"][\"input\"];\n propagate?: InputMaybe<PropagationMode>;\n};\n\nexport type MutationDeleteDocumentsArgs = {\n identifiers: ReadonlyArray<Scalars[\"String\"][\"input\"]>;\n propagate?: InputMaybe<PropagationMode>;\n};\n\nexport type MutationMoveRelationshipArgs = {\n branch?: InputMaybe<Scalars[\"String\"][\"input\"]>;\n relationshipType: Scalars[\"String\"][\"input\"];\n sourceParentIdentifier: Scalars[\"String\"][\"input\"];\n targetIdentifier: Scalars[\"String\"][\"input\"];\n targetParentIdentifier: Scalars[\"String\"][\"input\"];\n};\n\nexport type MutationMutateDocumentArgs = {\n actions: ReadonlyArray<Scalars[\"JSONObject\"][\"input\"]>;\n documentIdentifier: Scalars[\"String\"][\"input\"];\n view?: InputMaybe<ViewFilterInput>;\n};\n\nexport type MutationMutateDocumentAsyncArgs = {\n actions: ReadonlyArray<Scalars[\"JSONObject\"][\"input\"]>;\n documentIdentifier: Scalars[\"String\"][\"input\"];\n view?: InputMaybe<ViewFilterInput>;\n};\n\nexport type MutationPushSyncEnvelopesArgs = {\n envelopes: ReadonlyArray<SyncEnvelopeInput>;\n};\n\nexport type MutationRemoveRelationshipArgs = {\n branch?: InputMaybe<Scalars[\"String\"][\"input\"]>;\n relationshipType: Scalars[\"String\"][\"input\"];\n sourceIdentifier: Scalars[\"String\"][\"input\"];\n targetIdentifier: Scalars[\"String\"][\"input\"];\n};\n\nexport type MutationRenameDocumentArgs = {\n branch?: InputMaybe<Scalars[\"String\"][\"input\"]>;\n documentIdentifier: Scalars[\"String\"][\"input\"];\n name: Scalars[\"String\"][\"input\"];\n};\n\nexport type MutationSetPreferredEditorArgs = {\n branch?: InputMaybe<Scalars[\"String\"][\"input\"]>;\n documentIdentifier: Scalars[\"String\"][\"input\"];\n preferredEditor?: InputMaybe<Scalars[\"String\"][\"input\"]>;\n};\n\nexport type MutationTouchChannelArgs = {\n input: TouchChannelInput;\n};\n\nexport type OperationContext = {\n readonly branch: Scalars[\"String\"][\"output\"];\n readonly documentId: Scalars[\"String\"][\"output\"];\n readonly documentType: Scalars[\"String\"][\"output\"];\n readonly ordinal: Scalars[\"Int\"][\"output\"];\n readonly scope: Scalars[\"String\"][\"output\"];\n};\n\nexport type OperationContextInput = {\n readonly branch: Scalars[\"String\"][\"input\"];\n readonly documentId: Scalars[\"String\"][\"input\"];\n readonly documentType: Scalars[\"String\"][\"input\"];\n readonly ordinal: Scalars[\"Int\"][\"input\"];\n readonly scope: Scalars[\"String\"][\"input\"];\n};\n\nexport type OperationInput = {\n readonly action: ActionInput;\n readonly deniedReason?: InputMaybe<Scalars[\"String\"][\"input\"]>;\n readonly error?: InputMaybe<Scalars[\"String\"][\"input\"]>;\n readonly hash: Scalars[\"String\"][\"input\"];\n readonly id?: InputMaybe<Scalars[\"String\"][\"input\"]>;\n readonly index: Scalars[\"Int\"][\"input\"];\n readonly skip: Scalars[\"Int\"][\"input\"];\n readonly timestampUtcMs: Scalars[\"String\"][\"input\"];\n};\n\nexport type OperationWithContext = {\n readonly context: OperationContext;\n readonly operation: ReactorOperation;\n};\n\nexport type OperationWithContextInput = {\n readonly context: OperationContextInput;\n readonly operation: OperationInput;\n};\n\nexport type OperationsFilterInput = {\n readonly actionTypes?: InputMaybe<ReadonlyArray<Scalars[\"String\"][\"input\"]>>;\n readonly branch?: InputMaybe<Scalars[\"String\"][\"input\"]>;\n readonly documentId: Scalars[\"String\"][\"input\"];\n readonly scopes?: InputMaybe<ReadonlyArray<Scalars[\"String\"][\"input\"]>>;\n readonly sinceRevision?: InputMaybe<Scalars[\"Int\"][\"input\"]>;\n readonly timestampFrom?: InputMaybe<Scalars[\"String\"][\"input\"]>;\n readonly timestampTo?: InputMaybe<Scalars[\"String\"][\"input\"]>;\n};\n\nexport type PhDocument = {\n readonly createdAtUtcIso: Scalars[\"DateTime\"][\"output\"];\n readonly documentType: Scalars[\"String\"][\"output\"];\n readonly id: Scalars[\"String\"][\"output\"];\n readonly lastModifiedAtUtcIso: Scalars[\"DateTime\"][\"output\"];\n readonly name: Scalars[\"String\"][\"output\"];\n readonly operations?: Maybe<ReactorOperationResultPage>;\n readonly preferredEditor?: Maybe<Scalars[\"String\"][\"output\"]>;\n readonly revisionsList: ReadonlyArray<Revision>;\n readonly slug?: Maybe<Scalars[\"String\"][\"output\"]>;\n readonly state: Scalars[\"JSONObject\"][\"output\"];\n};\n\nexport type PhDocumentOperationsArgs = {\n filter?: InputMaybe<DocumentOperationsFilterInput>;\n paging?: InputMaybe<PagingInput>;\n};\n\nexport type PhDocumentResultPage = {\n readonly cursor?: Maybe<Scalars[\"String\"][\"output\"]>;\n readonly hasNextPage: Scalars[\"Boolean\"][\"output\"];\n readonly hasPreviousPage: Scalars[\"Boolean\"][\"output\"];\n readonly items: ReadonlyArray<PhDocument>;\n readonly totalCount: Scalars[\"Int\"][\"output\"];\n};\n\nexport type PagingInput = {\n readonly cursor?: InputMaybe<Scalars[\"String\"][\"input\"]>;\n readonly limit?: InputMaybe<Scalars[\"Int\"][\"input\"]>;\n readonly offset?: InputMaybe<Scalars[\"Int\"][\"input\"]>;\n};\n\nexport type PollSyncEnvelopesResult = {\n readonly ackOrdinal: Scalars[\"Int\"][\"output\"];\n readonly deadLetters: ReadonlyArray<DeadLetterInfo>;\n readonly envelopes: ReadonlyArray<SyncEnvelope>;\n readonly hasMore: Scalars[\"Boolean\"][\"output\"];\n};\n\nexport enum PropagationMode {\n Cascade = \"CASCADE\",\n Orphan = \"ORPHAN\",\n}\n\nexport type Query = {\n readonly document?: Maybe<DocumentWithChildren>;\n readonly documentIncomingRelationships: PhDocumentResultPage;\n readonly documentModels: DocumentModelResultPage;\n readonly documentOperations: ReactorOperationResultPage;\n readonly documentOutgoingRelationships: PhDocumentResultPage;\n readonly findDocuments: PhDocumentResultPage;\n readonly jobStatus?: Maybe<JobInfo>;\n readonly pollSyncEnvelopes: PollSyncEnvelopesResult;\n};\n\nexport type QueryDocumentArgs = {\n identifier: Scalars[\"String\"][\"input\"];\n view?: InputMaybe<ViewFilterInput>;\n};\n\nexport type QueryDocumentIncomingRelationshipsArgs = {\n paging?: InputMaybe<PagingInput>;\n relationshipType: Scalars[\"String\"][\"input\"];\n targetIdentifier: Scalars[\"String\"][\"input\"];\n view?: InputMaybe<ViewFilterInput>;\n};\n\nexport type QueryDocumentModelsArgs = {\n namespace?: InputMaybe<Scalars[\"String\"][\"input\"]>;\n paging?: InputMaybe<PagingInput>;\n};\n\nexport type QueryDocumentOperationsArgs = {\n filter: OperationsFilterInput;\n paging?: InputMaybe<PagingInput>;\n};\n\nexport type QueryDocumentOutgoingRelationshipsArgs = {\n paging?: InputMaybe<PagingInput>;\n relationshipType: Scalars[\"String\"][\"input\"];\n sourceIdentifier: Scalars[\"String\"][\"input\"];\n view?: InputMaybe<ViewFilterInput>;\n};\n\nexport type QueryFindDocumentsArgs = {\n paging?: InputMaybe<PagingInput>;\n search?: InputMaybe<SearchFilterInput>;\n view?: InputMaybe<ViewFilterInput>;\n};\n\nexport type QueryJobStatusArgs = {\n jobId: Scalars[\"String\"][\"input\"];\n};\n\nexport type QueryPollSyncEnvelopesArgs = {\n channelId: Scalars[\"String\"][\"input\"];\n outboxAck: Scalars[\"Int\"][\"input\"];\n outboxLatest: Scalars[\"Int\"][\"input\"];\n};\n\nexport type ReactorOperation = {\n readonly action: Action;\n readonly deniedReason?: Maybe<Scalars[\"String\"][\"output\"]>;\n readonly error?: Maybe<Scalars[\"String\"][\"output\"]>;\n readonly hash: Scalars[\"String\"][\"output\"];\n readonly id?: Maybe<Scalars[\"String\"][\"output\"]>;\n readonly index: Scalars[\"Int\"][\"output\"];\n readonly skip: Scalars[\"Int\"][\"output\"];\n readonly timestampUtcMs: Scalars[\"String\"][\"output\"];\n};\n\nexport type ReactorOperationResultPage = {\n readonly cursor?: Maybe<Scalars[\"String\"][\"output\"]>;\n readonly hasNextPage: Scalars[\"Boolean\"][\"output\"];\n readonly hasPreviousPage: Scalars[\"Boolean\"][\"output\"];\n readonly items: ReadonlyArray<ReactorOperation>;\n readonly totalCount: Scalars[\"Int\"][\"output\"];\n};\n\nexport type ReactorSigner = {\n readonly app?: Maybe<ReactorSignerApp>;\n readonly signatures: ReadonlyArray<Scalars[\"String\"][\"output\"]>;\n readonly user?: Maybe<ReactorSignerUser>;\n};\n\nexport type ReactorSignerApp = {\n readonly key: Scalars[\"String\"][\"output\"];\n readonly name: Scalars[\"String\"][\"output\"];\n};\n\nexport type ReactorSignerAppInput = {\n readonly key: Scalars[\"String\"][\"input\"];\n readonly name: Scalars[\"String\"][\"input\"];\n};\n\nexport type ReactorSignerInput = {\n readonly app?: InputMaybe<ReactorSignerAppInput>;\n readonly signatures: ReadonlyArray<Scalars[\"String\"][\"input\"]>;\n readonly user?: InputMaybe<ReactorSignerUserInput>;\n};\n\nexport type ReactorSignerUser = {\n readonly address: Scalars[\"String\"][\"output\"];\n readonly chainId: Scalars[\"Int\"][\"output\"];\n readonly networkId: Scalars[\"String\"][\"output\"];\n};\n\nexport type ReactorSignerUserInput = {\n readonly address: Scalars[\"String\"][\"input\"];\n readonly chainId: Scalars[\"Int\"][\"input\"];\n readonly networkId: Scalars[\"String\"][\"input\"];\n};\n\nexport type RemoteCursor = {\n readonly cursorOrdinal: Scalars[\"Int\"][\"output\"];\n readonly lastSyncedAtUtcMs?: Maybe<Scalars[\"String\"][\"output\"]>;\n readonly remoteName: Scalars[\"String\"][\"output\"];\n};\n\nexport type RemoteCursorInput = {\n readonly cursorOrdinal: Scalars[\"Int\"][\"input\"];\n readonly lastSyncedAtUtcMs?: InputMaybe<Scalars[\"String\"][\"input\"]>;\n readonly remoteName: Scalars[\"String\"][\"input\"];\n};\n\nexport type RemoteFilterInput = {\n readonly branch: Scalars[\"String\"][\"input\"];\n readonly documentId: ReadonlyArray<Scalars[\"String\"][\"input\"]>;\n readonly scope: ReadonlyArray<Scalars[\"String\"][\"input\"]>;\n};\n\nexport type Revision = {\n readonly revision: Scalars[\"Int\"][\"output\"];\n readonly scope: Scalars[\"String\"][\"output\"];\n};\n\nexport type SearchFilterInput = {\n readonly identifiers?: InputMaybe<ReadonlyArray<Scalars[\"String\"][\"input\"]>>;\n readonly parentId?: InputMaybe<Scalars[\"String\"][\"input\"]>;\n readonly type?: InputMaybe<Scalars[\"String\"][\"input\"]>;\n};\n\nexport type Subscription = {\n readonly documentChanges: DocumentChangeEvent;\n readonly jobChanges: JobChangeEvent;\n};\n\nexport type SubscriptionDocumentChangesArgs = {\n search?: InputMaybe<SearchFilterInput>;\n view?: InputMaybe<ViewFilterInput>;\n};\n\nexport type SubscriptionJobChangesArgs = {\n jobId: Scalars[\"String\"][\"input\"];\n};\n\nexport type SyncEnvelope = {\n readonly channelMeta: ChannelMeta;\n readonly cursor?: Maybe<RemoteCursor>;\n readonly dependsOn?: Maybe<ReadonlyArray<Scalars[\"String\"][\"output\"]>>;\n readonly key?: Maybe<Scalars[\"String\"][\"output\"]>;\n readonly operations?: Maybe<ReadonlyArray<OperationWithContext>>;\n readonly type: SyncEnvelopeType;\n};\n\nexport type SyncEnvelopeInput = {\n readonly channelMeta: ChannelMetaInput;\n readonly cursor?: InputMaybe<RemoteCursorInput>;\n readonly dependsOn?: InputMaybe<ReadonlyArray<Scalars[\"String\"][\"input\"]>>;\n readonly key?: InputMaybe<Scalars[\"String\"][\"input\"]>;\n readonly operations?: InputMaybe<ReadonlyArray<OperationWithContextInput>>;\n readonly type: SyncEnvelopeType;\n};\n\nexport enum SyncEnvelopeType {\n Ack = \"ACK\",\n Operations = \"OPERATIONS\",\n}\n\nexport type TouchChannelInput = {\n readonly collectionId: Scalars[\"String\"][\"input\"];\n readonly filter: RemoteFilterInput;\n readonly id: Scalars[\"String\"][\"input\"];\n readonly name: Scalars[\"String\"][\"input\"];\n readonly sinceTimestampUtcMs: Scalars[\"String\"][\"input\"];\n};\n\nexport type TouchChannelResult = {\n readonly ackOrdinal: Scalars[\"Int\"][\"output\"];\n readonly success: Scalars[\"Boolean\"][\"output\"];\n};\n\nexport type ViewFilterInput = {\n readonly branch?: InputMaybe<Scalars[\"String\"][\"input\"]>;\n readonly scopes?: InputMaybe<ReadonlyArray<Scalars[\"String\"][\"input\"]>>;\n};\n\nexport type PhDocumentFieldsFragment = {\n readonly id: string;\n readonly slug?: string | null | undefined;\n readonly name: string;\n readonly documentType: string;\n readonly state: NonNullable<unknown>;\n readonly createdAtUtcIso: string | Date;\n readonly lastModifiedAtUtcIso: string | Date;\n readonly revisionsList: ReadonlyArray<{\n readonly scope: string;\n readonly revision: number;\n }>;\n};\n\nexport type GetDocumentModelsQueryVariables = Exact<{\n namespace?: InputMaybe<Scalars[\"String\"][\"input\"]>;\n paging?: InputMaybe<PagingInput>;\n}>;\n\nexport type GetDocumentModelsQuery = {\n readonly documentModels: {\n readonly totalCount: number;\n readonly hasNextPage: boolean;\n readonly hasPreviousPage: boolean;\n readonly cursor?: string | null | undefined;\n readonly items: ReadonlyArray<{\n readonly id: string;\n readonly name: string;\n readonly namespace?: string | null | undefined;\n readonly version?: string | null | undefined;\n readonly specification: NonNullable<unknown>;\n }>;\n };\n};\n\nexport type GetDocumentQueryVariables = Exact<{\n identifier: Scalars[\"String\"][\"input\"];\n view?: InputMaybe<ViewFilterInput>;\n}>;\n\nexport type GetDocumentQuery = {\n readonly document?:\n | {\n readonly childIds: ReadonlyArray<string>;\n readonly document: {\n readonly id: string;\n readonly slug?: string | null | undefined;\n readonly name: string;\n readonly documentType: string;\n readonly state: NonNullable<unknown>;\n readonly createdAtUtcIso: string | Date;\n readonly lastModifiedAtUtcIso: string | Date;\n readonly revisionsList: ReadonlyArray<{\n readonly scope: string;\n readonly revision: number;\n }>;\n };\n }\n | null\n | undefined;\n};\n\nexport type GetDocumentWithOperationsQueryVariables = Exact<{\n identifier: Scalars[\"String\"][\"input\"];\n view?: InputMaybe<ViewFilterInput>;\n operationsFilter?: InputMaybe<DocumentOperationsFilterInput>;\n operationsPaging?: InputMaybe<PagingInput>;\n}>;\n\nexport type GetDocumentWithOperationsQuery = {\n readonly document?:\n | {\n readonly childIds: ReadonlyArray<string>;\n readonly document: {\n readonly id: string;\n readonly slug?: string | null | undefined;\n readonly name: string;\n readonly documentType: string;\n readonly state: NonNullable<unknown>;\n readonly createdAtUtcIso: string | Date;\n readonly lastModifiedAtUtcIso: string | Date;\n readonly operations?:\n | {\n readonly totalCount: number;\n readonly hasNextPage: boolean;\n readonly hasPreviousPage: boolean;\n readonly cursor?: string | null | undefined;\n readonly items: ReadonlyArray<{\n readonly index: number;\n readonly timestampUtcMs: string;\n readonly hash: string;\n readonly skip: number;\n readonly error?: string | null | undefined;\n readonly deniedReason?: string | null | undefined;\n readonly id?: string | null | undefined;\n readonly action: {\n readonly id: string;\n readonly type: string;\n readonly timestampUtcMs: string;\n readonly input: NonNullable<unknown>;\n readonly scope: string;\n readonly context?:\n | {\n readonly signer?:\n | {\n readonly signatures: ReadonlyArray<string>;\n readonly user?:\n | {\n readonly address: string;\n readonly networkId: string;\n readonly chainId: number;\n }\n | null\n | undefined;\n readonly app?:\n | {\n readonly name: string;\n readonly key: string;\n }\n | null\n | undefined;\n }\n | null\n | undefined;\n }\n | null\n | undefined;\n };\n }>;\n }\n | null\n | undefined;\n readonly revisionsList: ReadonlyArray<{\n readonly scope: string;\n readonly revision: number;\n }>;\n };\n }\n | null\n | undefined;\n};\n\nexport type GetDocumentOutgoingRelationshipsQueryVariables = Exact<{\n sourceIdentifier: Scalars[\"String\"][\"input\"];\n relationshipType: Scalars[\"String\"][\"input\"];\n view?: InputMaybe<ViewFilterInput>;\n paging?: InputMaybe<PagingInput>;\n}>;\n\nexport type GetDocumentOutgoingRelationshipsQuery = {\n readonly documentOutgoingRelationships: {\n readonly totalCount: number;\n readonly hasNextPage: boolean;\n readonly hasPreviousPage: boolean;\n readonly cursor?: string | null | undefined;\n readonly items: ReadonlyArray<{\n readonly id: string;\n readonly slug?: string | null | undefined;\n readonly name: string;\n readonly documentType: string;\n readonly state: NonNullable<unknown>;\n readonly createdAtUtcIso: string | Date;\n readonly lastModifiedAtUtcIso: string | Date;\n readonly revisionsList: ReadonlyArray<{\n readonly scope: string;\n readonly revision: number;\n }>;\n }>;\n };\n};\n\nexport type GetDocumentIncomingRelationshipsQueryVariables = Exact<{\n targetIdentifier: Scalars[\"String\"][\"input\"];\n relationshipType: Scalars[\"String\"][\"input\"];\n view?: InputMaybe<ViewFilterInput>;\n paging?: InputMaybe<PagingInput>;\n}>;\n\nexport type GetDocumentIncomingRelationshipsQuery = {\n readonly documentIncomingRelationships: {\n readonly totalCount: number;\n readonly hasNextPage: boolean;\n readonly hasPreviousPage: boolean;\n readonly cursor?: string | null | undefined;\n readonly items: ReadonlyArray<{\n readonly id: string;\n readonly slug?: string | null | undefined;\n readonly name: string;\n readonly documentType: string;\n readonly state: NonNullable<unknown>;\n readonly createdAtUtcIso: string | Date;\n readonly lastModifiedAtUtcIso: string | Date;\n readonly revisionsList: ReadonlyArray<{\n readonly scope: string;\n readonly revision: number;\n }>;\n }>;\n };\n};\n\nexport type FindDocumentsQueryVariables = Exact<{\n search?: InputMaybe<SearchFilterInput>;\n view?: InputMaybe<ViewFilterInput>;\n paging?: InputMaybe<PagingInput>;\n}>;\n\nexport type FindDocumentsQuery = {\n readonly findDocuments: {\n readonly totalCount: number;\n readonly hasNextPage: boolean;\n readonly hasPreviousPage: boolean;\n readonly cursor?: string | null | undefined;\n readonly items: ReadonlyArray<{\n readonly id: string;\n readonly slug?: string | null | undefined;\n readonly name: string;\n readonly documentType: string;\n readonly state: NonNullable<unknown>;\n readonly createdAtUtcIso: string | Date;\n readonly lastModifiedAtUtcIso: string | Date;\n readonly revisionsList: ReadonlyArray<{\n readonly scope: string;\n readonly revision: number;\n }>;\n }>;\n };\n};\n\nexport type GetDocumentOperationsQueryVariables = Exact<{\n filter: OperationsFilterInput;\n paging?: InputMaybe<PagingInput>;\n}>;\n\nexport type GetDocumentOperationsQuery = {\n readonly documentOperations: {\n readonly totalCount: number;\n readonly hasNextPage: boolean;\n readonly hasPreviousPage: boolean;\n readonly cursor?: string | null | undefined;\n readonly items: ReadonlyArray<{\n readonly index: number;\n readonly timestampUtcMs: string;\n readonly hash: string;\n readonly skip: number;\n readonly error?: string | null | undefined;\n readonly deniedReason?: string | null | undefined;\n readonly id?: string | null | undefined;\n readonly action: {\n readonly id: string;\n readonly type: string;\n readonly timestampUtcMs: string;\n readonly input: NonNullable<unknown>;\n readonly scope: string;\n readonly context?:\n | {\n readonly signer?:\n | {\n readonly signatures: ReadonlyArray<string>;\n readonly user?:\n | {\n readonly address: string;\n readonly networkId: string;\n readonly chainId: number;\n }\n | null\n | undefined;\n readonly app?:\n | { readonly name: string; readonly key: string }\n | null\n | undefined;\n }\n | null\n | undefined;\n }\n | null\n | undefined;\n };\n }>;\n };\n};\n\nexport type GetJobStatusQueryVariables = Exact<{\n jobId: Scalars[\"String\"][\"input\"];\n}>;\n\nexport type GetJobStatusQuery = {\n readonly jobStatus?:\n | {\n readonly id: string;\n readonly status: string;\n readonly result: NonNullable<unknown>;\n readonly error?: string | null | undefined;\n readonly createdAt: string | Date;\n readonly completedAt?: string | Date | null | undefined;\n }\n | null\n | undefined;\n};\n\nexport type CreateDocumentMutationVariables = Exact<{\n document: Scalars[\"JSONObject\"][\"input\"];\n parentIdentifier?: InputMaybe<Scalars[\"String\"][\"input\"]>;\n}>;\n\nexport type CreateDocumentMutation = {\n readonly createDocument: {\n readonly id: string;\n readonly slug?: string | null | undefined;\n readonly name: string;\n readonly documentType: string;\n readonly state: NonNullable<unknown>;\n readonly createdAtUtcIso: string | Date;\n readonly lastModifiedAtUtcIso: string | Date;\n readonly revisionsList: ReadonlyArray<{\n readonly scope: string;\n readonly revision: number;\n }>;\n };\n};\n\nexport type CreateEmptyDocumentMutationVariables = Exact<{\n documentType: Scalars[\"String\"][\"input\"];\n parentIdentifier?: InputMaybe<Scalars[\"String\"][\"input\"]>;\n}>;\n\nexport type CreateEmptyDocumentMutation = {\n readonly createEmptyDocument: {\n readonly id: string;\n readonly slug?: string | null | undefined;\n readonly name: string;\n readonly documentType: string;\n readonly state: NonNullable<unknown>;\n readonly createdAtUtcIso: string | Date;\n readonly lastModifiedAtUtcIso: string | Date;\n readonly revisionsList: ReadonlyArray<{\n readonly scope: string;\n readonly revision: number;\n }>;\n };\n};\n\nexport type MutateDocumentMutationVariables = Exact<{\n documentIdentifier: Scalars[\"String\"][\"input\"];\n actions: ReadonlyArray<Scalars[\"JSONObject\"][\"input\"]>;\n view?: InputMaybe<ViewFilterInput>;\n}>;\n\nexport type MutateDocumentMutation = {\n readonly mutateDocument: {\n readonly id: string;\n readonly slug?: string | null | undefined;\n readonly name: string;\n readonly documentType: string;\n readonly state: NonNullable<unknown>;\n readonly createdAtUtcIso: string | Date;\n readonly lastModifiedAtUtcIso: string | Date;\n readonly revisionsList: ReadonlyArray<{\n readonly scope: string;\n readonly revision: number;\n }>;\n };\n};\n\nexport type MutateDocumentAsyncMutationVariables = Exact<{\n documentIdentifier: Scalars[\"String\"][\"input\"];\n actions: ReadonlyArray<Scalars[\"JSONObject\"][\"input\"]>;\n view?: InputMaybe<ViewFilterInput>;\n}>;\n\nexport type MutateDocumentAsyncMutation = {\n readonly mutateDocumentAsync: string;\n};\n\nexport type RenameDocumentMutationVariables = Exact<{\n documentIdentifier: Scalars[\"String\"][\"input\"];\n name: Scalars[\"String\"][\"input\"];\n branch?: InputMaybe<Scalars[\"String\"][\"input\"]>;\n}>;\n\nexport type RenameDocumentMutation = {\n readonly renameDocument: {\n readonly id: string;\n readonly slug?: string | null | undefined;\n readonly name: string;\n readonly documentType: string;\n readonly state: NonNullable<unknown>;\n readonly createdAtUtcIso: string | Date;\n readonly lastModifiedAtUtcIso: string | Date;\n readonly revisionsList: ReadonlyArray<{\n readonly scope: string;\n readonly revision: number;\n }>;\n };\n};\n\nexport type SetPreferredEditorMutationVariables = Exact<{\n documentIdentifier: Scalars[\"String\"][\"input\"];\n preferredEditor?: InputMaybe<Scalars[\"String\"][\"input\"]>;\n branch?: InputMaybe<Scalars[\"String\"][\"input\"]>;\n}>;\n\nexport type SetPreferredEditorMutation = {\n readonly setPreferredEditor: {\n readonly id: string;\n readonly slug?: string | null | undefined;\n readonly name: string;\n readonly documentType: string;\n readonly state: NonNullable<unknown>;\n readonly createdAtUtcIso: string | Date;\n readonly lastModifiedAtUtcIso: string | Date;\n readonly revisionsList: ReadonlyArray<{\n readonly scope: string;\n readonly revision: number;\n }>;\n };\n};\n\nexport type AddRelationshipMutationVariables = Exact<{\n sourceIdentifier: Scalars[\"String\"][\"input\"];\n targetIdentifier: Scalars[\"String\"][\"input\"];\n relationshipType: Scalars[\"String\"][\"input\"];\n branch?: InputMaybe<Scalars[\"String\"][\"input\"]>;\n}>;\n\nexport type AddRelationshipMutation = {\n readonly addRelationship: {\n readonly id: string;\n readonly slug?: string | null | undefined;\n readonly name: string;\n readonly documentType: string;\n readonly state: NonNullable<unknown>;\n readonly createdAtUtcIso: string | Date;\n readonly lastModifiedAtUtcIso: string | Date;\n readonly revisionsList: ReadonlyArray<{\n readonly scope: string;\n readonly revision: number;\n }>;\n };\n};\n\nexport type RemoveRelationshipMutationVariables = Exact<{\n sourceIdentifier: Scalars[\"String\"][\"input\"];\n targetIdentifier: Scalars[\"String\"][\"input\"];\n relationshipType: Scalars[\"String\"][\"input\"];\n branch?: InputMaybe<Scalars[\"String\"][\"input\"]>;\n}>;\n\nexport type RemoveRelationshipMutation = {\n readonly removeRelationship: {\n readonly id: string;\n readonly slug?: string | null | undefined;\n readonly name: string;\n readonly documentType: string;\n readonly state: NonNullable<unknown>;\n readonly createdAtUtcIso: string | Date;\n readonly lastModifiedAtUtcIso: string | Date;\n readonly revisionsList: ReadonlyArray<{\n readonly scope: string;\n readonly revision: number;\n }>;\n };\n};\n\nexport type MoveRelationshipMutationVariables = Exact<{\n sourceParentIdentifier: Scalars[\"String\"][\"input\"];\n targetParentIdentifier: Scalars[\"String\"][\"input\"];\n targetIdentifier: Scalars[\"String\"][\"input\"];\n relationshipType: Scalars[\"String\"][\"input\"];\n branch?: InputMaybe<Scalars[\"String\"][\"input\"]>;\n}>;\n\nexport type MoveRelationshipMutation = {\n readonly moveRelationship: {\n readonly source: {\n readonly id: string;\n readonly slug?: string | null | undefined;\n readonly name: string;\n readonly documentType: string;\n readonly state: NonNullable<unknown>;\n readonly createdAtUtcIso: string | Date;\n readonly lastModifiedAtUtcIso: string | Date;\n readonly revisionsList: ReadonlyArray<{\n readonly scope: string;\n readonly revision: number;\n }>;\n };\n readonly target: {\n readonly id: string;\n readonly slug?: string | null | undefined;\n readonly name: string;\n readonly documentType: string;\n readonly state: NonNullable<unknown>;\n readonly createdAtUtcIso: string | Date;\n readonly lastModifiedAtUtcIso: string | Date;\n readonly revisionsList: ReadonlyArray<{\n readonly scope: string;\n readonly revision: number;\n }>;\n };\n };\n};\n\nexport type DeleteDocumentMutationVariables = Exact<{\n identifier: Scalars[\"String\"][\"input\"];\n propagate?: InputMaybe<PropagationMode>;\n}>;\n\nexport type DeleteDocumentMutation = { readonly deleteDocument: boolean };\n\nexport type DeleteDocumentsMutationVariables = Exact<{\n identifiers: ReadonlyArray<Scalars[\"String\"][\"input\"]>;\n propagate?: InputMaybe<PropagationMode>;\n}>;\n\nexport type DeleteDocumentsMutation = { readonly deleteDocuments: boolean };\n\nexport type DocumentChangesSubscriptionVariables = Exact<{\n search?: InputMaybe<SearchFilterInput>;\n view?: InputMaybe<ViewFilterInput>;\n}>;\n\nexport type DocumentChangesSubscription = {\n readonly documentChanges: {\n readonly type: DocumentChangeType;\n readonly documents: ReadonlyArray<{\n readonly id: string;\n readonly slug?: string | null | undefined;\n readonly name: string;\n readonly documentType: string;\n readonly state: NonNullable<unknown>;\n readonly createdAtUtcIso: string | Date;\n readonly lastModifiedAtUtcIso: string | Date;\n readonly revisionsList: ReadonlyArray<{\n readonly scope: string;\n readonly revision: number;\n }>;\n }>;\n readonly context?:\n | {\n readonly parentId?: string | null | undefined;\n readonly childId?: string | null | undefined;\n }\n | null\n | undefined;\n };\n};\n\nexport type JobChangesSubscriptionVariables = Exact<{\n jobId: Scalars[\"String\"][\"input\"];\n}>;\n\nexport type JobChangesSubscription = {\n readonly jobChanges: {\n readonly jobId: string;\n readonly status: string;\n readonly result: NonNullable<unknown>;\n readonly error?: string | null | undefined;\n };\n};\n\nexport type PollSyncEnvelopesQueryVariables = Exact<{\n channelId: Scalars[\"String\"][\"input\"];\n outboxAck: Scalars[\"Int\"][\"input\"];\n outboxLatest: Scalars[\"Int\"][\"input\"];\n}>;\n\nexport type PollSyncEnvelopesQuery = {\n readonly pollSyncEnvelopes: {\n readonly ackOrdinal: number;\n readonly hasMore: boolean;\n readonly envelopes: ReadonlyArray<{\n readonly type: SyncEnvelopeType;\n readonly key?: string | null | undefined;\n readonly dependsOn?: ReadonlyArray<string> | null | undefined;\n readonly channelMeta: { readonly id: string };\n readonly operations?:\n | ReadonlyArray<{\n readonly operation: {\n readonly index: number;\n readonly timestampUtcMs: string;\n readonly hash: string;\n readonly skip: number;\n readonly error?: string | null | undefined;\n readonly deniedReason?: string | null | undefined;\n readonly id?: string | null | undefined;\n readonly action: {\n readonly id: string;\n readonly type: string;\n readonly timestampUtcMs: string;\n readonly input: NonNullable<unknown>;\n readonly scope: string;\n readonly context?:\n | {\n readonly signer?:\n | {\n readonly signatures: ReadonlyArray<string>;\n readonly user?:\n | {\n readonly address: string;\n readonly networkId: string;\n readonly chainId: number;\n }\n | null\n | undefined;\n readonly app?:\n | { readonly name: string; readonly key: string }\n | null\n | undefined;\n }\n | null\n | undefined;\n }\n | null\n | undefined;\n };\n };\n readonly context: {\n readonly documentId: string;\n readonly documentType: string;\n readonly scope: string;\n readonly branch: string;\n };\n }>\n | null\n | undefined;\n readonly cursor?:\n | {\n readonly remoteName: string;\n readonly cursorOrdinal: number;\n readonly lastSyncedAtUtcMs?: string | null | undefined;\n }\n | null\n | undefined;\n }>;\n readonly deadLetters: ReadonlyArray<{\n readonly documentId: string;\n readonly error: string;\n readonly errorType?: string | null | undefined;\n }>;\n };\n};\n\nexport type TouchChannelMutationVariables = Exact<{\n input: TouchChannelInput;\n}>;\n\nexport type TouchChannelMutation = {\n readonly touchChannel: {\n readonly success: boolean;\n readonly ackOrdinal: number;\n };\n};\n\nexport type PushSyncEnvelopesMutationVariables = Exact<{\n envelopes: ReadonlyArray<SyncEnvelopeInput>;\n}>;\n\nexport type PushSyncEnvelopesMutation = { readonly pushSyncEnvelopes: boolean };\n\nexport const PhDocumentFieldsFragmentDoc = gql`\n fragment PHDocumentFields on PHDocument {\n id\n slug\n name\n documentType\n state\n revisionsList {\n scope\n revision\n }\n createdAtUtcIso\n lastModifiedAtUtcIso\n }\n`;\nexport const GetDocumentModelsDocument = gql`\n query GetDocumentModels($namespace: String, $paging: PagingInput) {\n documentModels(namespace: $namespace, paging: $paging) {\n items {\n id\n name\n namespace\n version\n specification\n }\n totalCount\n hasNextPage\n hasPreviousPage\n cursor\n }\n }\n`;\nexport const GetDocumentDocument = gql`\n query GetDocument($identifier: String!, $view: ViewFilterInput) {\n document(identifier: $identifier, view: $view) {\n document {\n ...PHDocumentFields\n }\n childIds\n }\n }\n ${PhDocumentFieldsFragmentDoc}\n`;\nexport const GetDocumentWithOperationsDocument = gql`\n query GetDocumentWithOperations(\n $identifier: String!\n $view: ViewFilterInput\n $operationsFilter: DocumentOperationsFilterInput\n $operationsPaging: PagingInput\n ) {\n document(identifier: $identifier, view: $view) {\n document {\n ...PHDocumentFields\n operations(filter: $operationsFilter, paging: $operationsPaging) {\n items {\n index\n timestampUtcMs\n hash\n skip\n error\n deniedReason\n id\n action {\n id\n type\n timestampUtcMs\n input\n scope\n context {\n signer {\n user {\n address\n networkId\n chainId\n }\n app {\n name\n key\n }\n signatures\n }\n }\n }\n }\n totalCount\n hasNextPage\n hasPreviousPage\n cursor\n }\n }\n childIds\n }\n }\n ${PhDocumentFieldsFragmentDoc}\n`;\nexport const GetDocumentOutgoingRelationshipsDocument = gql`\n query GetDocumentOutgoingRelationships(\n $sourceIdentifier: String!\n $relationshipType: String!\n $view: ViewFilterInput\n $paging: PagingInput\n ) {\n documentOutgoingRelationships(\n sourceIdentifier: $sourceIdentifier\n relationshipType: $relationshipType\n view: $view\n paging: $paging\n ) {\n items {\n ...PHDocumentFields\n }\n totalCount\n hasNextPage\n hasPreviousPage\n cursor\n }\n }\n ${PhDocumentFieldsFragmentDoc}\n`;\nexport const GetDocumentIncomingRelationshipsDocument = gql`\n query GetDocumentIncomingRelationships(\n $targetIdentifier: String!\n $relationshipType: String!\n $view: ViewFilterInput\n $paging: PagingInput\n ) {\n documentIncomingRelationships(\n targetIdentifier: $targetIdentifier\n relationshipType: $relationshipType\n view: $view\n paging: $paging\n ) {\n items {\n ...PHDocumentFields\n }\n totalCount\n hasNextPage\n hasPreviousPage\n cursor\n }\n }\n ${PhDocumentFieldsFragmentDoc}\n`;\nexport const FindDocumentsDocument = gql`\n query FindDocuments(\n $search: SearchFilterInput\n $view: ViewFilterInput\n $paging: PagingInput\n ) {\n findDocuments(search: $search, view: $view, paging: $paging) {\n items {\n ...PHDocumentFields\n }\n totalCount\n hasNextPage\n hasPreviousPage\n cursor\n }\n }\n ${PhDocumentFieldsFragmentDoc}\n`;\nexport const GetDocumentOperationsDocument = gql`\n query GetDocumentOperations(\n $filter: OperationsFilterInput!\n $paging: PagingInput\n ) {\n documentOperations(filter: $filter, paging: $paging) {\n items {\n index\n timestampUtcMs\n hash\n skip\n error\n deniedReason\n id\n action {\n id\n type\n timestampUtcMs\n input\n scope\n context {\n signer {\n user {\n address\n networkId\n chainId\n }\n app {\n name\n key\n }\n signatures\n }\n }\n }\n }\n totalCount\n hasNextPage\n hasPreviousPage\n cursor\n }\n }\n`;\nexport const GetJobStatusDocument = gql`\n query GetJobStatus($jobId: String!) {\n jobStatus(jobId: $jobId) {\n id\n status\n result\n error\n createdAt\n completedAt\n }\n }\n`;\nexport const CreateDocumentDocument = gql`\n mutation CreateDocument($document: JSONObject!, $parentIdentifier: String) {\n createDocument(document: $document, parentIdentifier: $parentIdentifier) {\n ...PHDocumentFields\n }\n }\n ${PhDocumentFieldsFragmentDoc}\n`;\nexport const CreateEmptyDocumentDocument = gql`\n mutation CreateEmptyDocument(\n $documentType: String!\n $parentIdentifier: String\n ) {\n createEmptyDocument(\n documentType: $documentType\n parentIdentifier: $parentIdentifier\n ) {\n ...PHDocumentFields\n }\n }\n ${PhDocumentFieldsFragmentDoc}\n`;\nexport const MutateDocumentDocument = gql`\n mutation MutateDocument(\n $documentIdentifier: String!\n $actions: [JSONObject!]!\n $view: ViewFilterInput\n ) {\n mutateDocument(\n documentIdentifier: $documentIdentifier\n actions: $actions\n view: $view\n ) {\n ...PHDocumentFields\n }\n }\n ${PhDocumentFieldsFragmentDoc}\n`;\nexport const MutateDocumentAsyncDocument = gql`\n mutation MutateDocumentAsync(\n $documentIdentifier: String!\n $actions: [JSONObject!]!\n $view: ViewFilterInput\n ) {\n mutateDocumentAsync(\n documentIdentifier: $documentIdentifier\n actions: $actions\n view: $view\n )\n }\n`;\nexport const RenameDocumentDocument = gql`\n mutation RenameDocument(\n $documentIdentifier: String!\n $name: String!\n $branch: String\n ) {\n renameDocument(\n documentIdentifier: $documentIdentifier\n name: $name\n branch: $branch\n ) {\n ...PHDocumentFields\n }\n }\n ${PhDocumentFieldsFragmentDoc}\n`;\nexport const SetPreferredEditorDocument = gql`\n mutation SetPreferredEditor(\n $documentIdentifier: String!\n $preferredEditor: String\n $branch: String\n ) {\n setPreferredEditor(\n documentIdentifier: $documentIdentifier\n preferredEditor: $preferredEditor\n branch: $branch\n ) {\n ...PHDocumentFields\n }\n }\n ${PhDocumentFieldsFragmentDoc}\n`;\nexport const AddRelationshipDocument = gql`\n mutation AddRelationship(\n $sourceIdentifier: String!\n $targetIdentifier: String!\n $relationshipType: String!\n $branch: String\n ) {\n addRelationship(\n sourceIdentifier: $sourceIdentifier\n targetIdentifier: $targetIdentifier\n relationshipType: $relationshipType\n branch: $branch\n ) {\n ...PHDocumentFields\n }\n }\n ${PhDocumentFieldsFragmentDoc}\n`;\nexport const RemoveRelationshipDocument = gql`\n mutation RemoveRelationship(\n $sourceIdentifier: String!\n $targetIdentifier: String!\n $relationshipType: String!\n $branch: String\n ) {\n removeRelationship(\n sourceIdentifier: $sourceIdentifier\n targetIdentifier: $targetIdentifier\n relationshipType: $relationshipType\n branch: $branch\n ) {\n ...PHDocumentFields\n }\n }\n ${PhDocumentFieldsFragmentDoc}\n`;\nexport const MoveRelationshipDocument = gql`\n mutation MoveRelationship(\n $sourceParentIdentifier: String!\n $targetParentIdentifier: String!\n $targetIdentifier: String!\n $relationshipType: String!\n $branch: String\n ) {\n moveRelationship(\n sourceParentIdentifier: $sourceParentIdentifier\n targetParentIdentifier: $targetParentIdentifier\n targetIdentifier: $targetIdentifier\n relationshipType: $relationshipType\n branch: $branch\n ) {\n source {\n ...PHDocumentFields\n }\n target {\n ...PHDocumentFields\n }\n }\n }\n ${PhDocumentFieldsFragmentDoc}\n`;\nexport const DeleteDocumentDocument = gql`\n mutation DeleteDocument($identifier: String!, $propagate: PropagationMode) {\n deleteDocument(identifier: $identifier, propagate: $propagate)\n }\n`;\nexport const DeleteDocumentsDocument = gql`\n mutation DeleteDocuments(\n $identifiers: [String!]!\n $propagate: PropagationMode\n ) {\n deleteDocuments(identifiers: $identifiers, propagate: $propagate)\n }\n`;\nexport const DocumentChangesDocument = gql`\n subscription DocumentChanges(\n $search: SearchFilterInput\n $view: ViewFilterInput\n ) {\n documentChanges(search: $search, view: $view) {\n type\n documents {\n ...PHDocumentFields\n }\n context {\n parentId\n childId\n }\n }\n }\n ${PhDocumentFieldsFragmentDoc}\n`;\nexport const JobChangesDocument = gql`\n subscription JobChanges($jobId: String!) {\n jobChanges(jobId: $jobId) {\n jobId\n status\n result\n error\n }\n }\n`;\nexport const PollSyncEnvelopesDocument = gql`\n query PollSyncEnvelopes(\n $channelId: String!\n $outboxAck: Int!\n $outboxLatest: Int!\n ) {\n pollSyncEnvelopes(\n channelId: $channelId\n outboxAck: $outboxAck\n outboxLatest: $outboxLatest\n ) {\n envelopes {\n type\n channelMeta {\n id\n }\n operations {\n operation {\n index\n timestampUtcMs\n hash\n skip\n error\n deniedReason\n id\n action {\n id\n type\n timestampUtcMs\n input\n scope\n context {\n signer {\n user {\n address\n networkId\n chainId\n }\n app {\n name\n key\n }\n signatures\n }\n }\n }\n }\n context {\n documentId\n documentType\n scope\n branch\n }\n }\n cursor {\n remoteName\n cursorOrdinal\n lastSyncedAtUtcMs\n }\n key\n dependsOn\n }\n ackOrdinal\n deadLetters {\n documentId\n error\n errorType\n }\n hasMore\n }\n }\n`;\nexport const TouchChannelDocument = gql`\n mutation TouchChannel($input: TouchChannelInput!) {\n touchChannel(input: $input) {\n success\n ackOrdinal\n }\n }\n`;\nexport const PushSyncEnvelopesDocument = gql`\n mutation PushSyncEnvelopes($envelopes: [SyncEnvelopeInput!]!) {\n pushSyncEnvelopes(envelopes: $envelopes)\n }\n`;\n\nexport type SdkFunctionWrapper = <T>(\n action: (requestHeaders?: Record<string, string>) => Promise<T>,\n operationName: string,\n operationType?: string,\n variables?: any,\n) => Promise<T>;\n\nconst defaultWrapper: SdkFunctionWrapper = (\n action,\n _operationName,\n _operationType,\n _variables,\n) => action();\n\nexport function getSdk(\n client: GraphQLClient,\n withWrapper: SdkFunctionWrapper = defaultWrapper,\n) {\n return {\n GetDocumentModels(\n variables?: GetDocumentModelsQueryVariables,\n requestHeaders?: GraphQLClientRequestHeaders,\n signal?: RequestInit[\"signal\"],\n ): Promise<GetDocumentModelsQuery> {\n return withWrapper(\n (wrappedRequestHeaders) =>\n client.request<GetDocumentModelsQuery>({\n document: GetDocumentModelsDocument,\n variables,\n requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders },\n signal,\n }),\n \"GetDocumentModels\",\n \"query\",\n variables,\n );\n },\n GetDocument(\n variables: GetDocumentQueryVariables,\n requestHeaders?: GraphQLClientRequestHeaders,\n signal?: RequestInit[\"signal\"],\n ): Promise<GetDocumentQuery> {\n return withWrapper(\n (wrappedRequestHeaders) =>\n client.request<GetDocumentQuery>({\n document: GetDocumentDocument,\n variables,\n requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders },\n signal,\n }),\n \"GetDocument\",\n \"query\",\n variables,\n );\n },\n GetDocumentWithOperations(\n variables: GetDocumentWithOperationsQueryVariables,\n requestHeaders?: GraphQLClientRequestHeaders,\n signal?: RequestInit[\"signal\"],\n ): Promise<GetDocumentWithOperationsQuery> {\n return withWrapper(\n (wrappedRequestHeaders) =>\n client.request<GetDocumentWithOperationsQuery>({\n document: GetDocumentWithOperationsDocument,\n variables,\n requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders },\n signal,\n }),\n \"GetDocumentWithOperations\",\n \"query\",\n variables,\n );\n },\n GetDocumentOutgoingRelationships(\n variables: GetDocumentOutgoingRelationshipsQueryVariables,\n requestHeaders?: GraphQLClientRequestHeaders,\n signal?: RequestInit[\"signal\"],\n ): Promise<GetDocumentOutgoingRelationshipsQuery> {\n return withWrapper(\n (wrappedRequestHeaders) =>\n client.request<GetDocumentOutgoingRelationshipsQuery>({\n document: GetDocumentOutgoingRelationshipsDocument,\n variables,\n requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders },\n signal,\n }),\n \"GetDocumentOutgoingRelationships\",\n \"query\",\n variables,\n );\n },\n GetDocumentIncomingRelationships(\n variables: GetDocumentIncomingRelationshipsQueryVariables,\n requestHeaders?: GraphQLClientRequestHeaders,\n signal?: RequestInit[\"signal\"],\n ): Promise<GetDocumentIncomingRelationshipsQuery> {\n return withWrapper(\n (wrappedRequestHeaders) =>\n client.request<GetDocumentIncomingRelationshipsQuery>({\n document: GetDocumentIncomingRelationshipsDocument,\n variables,\n requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders },\n signal,\n }),\n \"GetDocumentIncomingRelationships\",\n \"query\",\n variables,\n );\n },\n FindDocuments(\n variables?: FindDocumentsQueryVariables,\n requestHeaders?: GraphQLClientRequestHeaders,\n signal?: RequestInit[\"signal\"],\n ): Promise<FindDocumentsQuery> {\n return withWrapper(\n (wrappedRequestHeaders) =>\n client.request<FindDocumentsQuery>({\n document: FindDocumentsDocument,\n variables,\n requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders },\n signal,\n }),\n \"FindDocuments\",\n \"query\",\n variables,\n );\n },\n GetDocumentOperations(\n variables: GetDocumentOperationsQueryVariables,\n requestHeaders?: GraphQLClientRequestHeaders,\n signal?: RequestInit[\"signal\"],\n ): Promise<GetDocumentOperationsQuery> {\n return withWrapper(\n (wrappedRequestHeaders) =>\n client.request<GetDocumentOperationsQuery>({\n document: GetDocumentOperationsDocument,\n variables,\n requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders },\n signal,\n }),\n \"GetDocumentOperations\",\n \"query\",\n variables,\n );\n },\n GetJobStatus(\n variables: GetJobStatusQueryVariables,\n requestHeaders?: GraphQLClientRequestHeaders,\n signal?: RequestInit[\"signal\"],\n ): Promise<GetJobStatusQuery> {\n return withWrapper(\n (wrappedRequestHeaders) =>\n client.request<GetJobStatusQuery>({\n document: GetJobStatusDocument,\n variables,\n requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders },\n signal,\n }),\n \"GetJobStatus\",\n \"query\",\n variables,\n );\n },\n CreateDocument(\n variables: CreateDocumentMutationVariables,\n requestHeaders?: GraphQLClientRequestHeaders,\n signal?: RequestInit[\"signal\"],\n ): Promise<CreateDocumentMutation> {\n return withWrapper(\n (wrappedRequestHeaders) =>\n client.request<CreateDocumentMutation>({\n document: CreateDocumentDocument,\n variables,\n requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders },\n signal,\n }),\n \"CreateDocument\",\n \"mutation\",\n variables,\n );\n },\n CreateEmptyDocument(\n variables: CreateEmptyDocumentMutationVariables,\n requestHeaders?: GraphQLClientRequestHeaders,\n signal?: RequestInit[\"signal\"],\n ): Promise<CreateEmptyDocumentMutation> {\n return withWrapper(\n (wrappedRequestHeaders) =>\n client.request<CreateEmptyDocumentMutation>({\n document: CreateEmptyDocumentDocument,\n variables,\n requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders },\n signal,\n }),\n \"CreateEmptyDocument\",\n \"mutation\",\n variables,\n );\n },\n MutateDocument(\n variables: MutateDocumentMutationVariables,\n requestHeaders?: GraphQLClientRequestHeaders,\n signal?: RequestInit[\"signal\"],\n ): Promise<MutateDocumentMutation> {\n return withWrapper(\n (wrappedRequestHeaders) =>\n client.request<MutateDocumentMutation>({\n document: MutateDocumentDocument,\n variables,\n requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders },\n signal,\n }),\n \"MutateDocument\",\n \"mutation\",\n variables,\n );\n },\n MutateDocumentAsync(\n variables: MutateDocumentAsyncMutationVariables,\n requestHeaders?: GraphQLClientRequestHeaders,\n signal?: RequestInit[\"signal\"],\n ): Promise<MutateDocumentAsyncMutation> {\n return withWrapper(\n (wrappedRequestHeaders) =>\n client.request<MutateDocumentAsyncMutation>({\n document: MutateDocumentAsyncDocument,\n variables,\n requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders },\n signal,\n }),\n \"MutateDocumentAsync\",\n \"mutation\",\n variables,\n );\n },\n RenameDocument(\n variables: RenameDocumentMutationVariables,\n requestHeaders?: GraphQLClientRequestHeaders,\n signal?: RequestInit[\"signal\"],\n ): Promise<RenameDocumentMutation> {\n return withWrapper(\n (wrappedRequestHeaders) =>\n client.request<RenameDocumentMutation>({\n document: RenameDocumentDocument,\n variables,\n requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders },\n signal,\n }),\n \"RenameDocument\",\n \"mutation\",\n variables,\n );\n },\n SetPreferredEditor(\n variables: SetPreferredEditorMutationVariables,\n requestHeaders?: GraphQLClientRequestHeaders,\n signal?: RequestInit[\"signal\"],\n ): Promise<SetPreferredEditorMutation> {\n return withWrapper(\n (wrappedRequestHeaders) =>\n client.request<SetPreferredEditorMutation>({\n document: SetPreferredEditorDocument,\n variables,\n requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders },\n signal,\n }),\n \"SetPreferredEditor\",\n \"mutation\",\n variables,\n );\n },\n AddRelationship(\n variables: AddRelationshipMutationVariables,\n requestHeaders?: GraphQLClientRequestHeaders,\n signal?: RequestInit[\"signal\"],\n ): Promise<AddRelationshipMutation> {\n return withWrapper(\n (wrappedRequestHeaders) =>\n client.request<AddRelationshipMutation>({\n document: AddRelationshipDocument,\n variables,\n requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders },\n signal,\n }),\n \"AddRelationship\",\n \"mutation\",\n variables,\n );\n },\n RemoveRelationship(\n variables: RemoveRelationshipMutationVariables,\n requestHeaders?: GraphQLClientRequestHeaders,\n signal?: RequestInit[\"signal\"],\n ): Promise<RemoveRelationshipMutation> {\n return withWrapper(\n (wrappedRequestHeaders) =>\n client.request<RemoveRelationshipMutation>({\n document: RemoveRelationshipDocument,\n variables,\n requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders },\n signal,\n }),\n \"RemoveRelationship\",\n \"mutation\",\n variables,\n );\n },\n MoveRelationship(\n variables: MoveRelationshipMutationVariables,\n requestHeaders?: GraphQLClientRequestHeaders,\n signal?: RequestInit[\"signal\"],\n ): Promise<MoveRelationshipMutation> {\n return withWrapper(\n (wrappedRequestHeaders) =>\n client.request<MoveRelationshipMutation>({\n document: MoveRelationshipDocument,\n variables,\n requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders },\n signal,\n }),\n \"MoveRelationship\",\n \"mutation\",\n variables,\n );\n },\n DeleteDocument(\n variables: DeleteDocumentMutationVariables,\n requestHeaders?: GraphQLClientRequestHeaders,\n signal?: RequestInit[\"signal\"],\n ): Promise<DeleteDocumentMutation> {\n return withWrapper(\n (wrappedRequestHeaders) =>\n client.request<DeleteDocumentMutation>({\n document: DeleteDocumentDocument,\n variables,\n requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders },\n signal,\n }),\n \"DeleteDocument\",\n \"mutation\",\n variables,\n );\n },\n DeleteDocuments(\n variables: DeleteDocumentsMutationVariables,\n requestHeaders?: GraphQLClientRequestHeaders,\n signal?: RequestInit[\"signal\"],\n ): Promise<DeleteDocumentsMutation> {\n return withWrapper(\n (wrappedRequestHeaders) =>\n client.request<DeleteDocumentsMutation>({\n document: DeleteDocumentsDocument,\n variables,\n requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders },\n signal,\n }),\n \"DeleteDocuments\",\n \"mutation\",\n variables,\n );\n },\n DocumentChanges(\n variables?: DocumentChangesSubscriptionVariables,\n requestHeaders?: GraphQLClientRequestHeaders,\n signal?: RequestInit[\"signal\"],\n ): Promise<DocumentChangesSubscription> {\n return withWrapper(\n (wrappedRequestHeaders) =>\n client.request<DocumentChangesSubscription>({\n document: DocumentChangesDocument,\n variables,\n requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders },\n signal,\n }),\n \"DocumentChanges\",\n \"subscription\",\n variables,\n );\n },\n JobChanges(\n variables: JobChangesSubscriptionVariables,\n requestHeaders?: GraphQLClientRequestHeaders,\n signal?: RequestInit[\"signal\"],\n ): Promise<JobChangesSubscription> {\n return withWrapper(\n (wrappedRequestHeaders) =>\n client.request<JobChangesSubscription>({\n document: JobChangesDocument,\n variables,\n requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders },\n signal,\n }),\n \"JobChanges\",\n \"subscription\",\n variables,\n );\n },\n PollSyncEnvelopes(\n variables: PollSyncEnvelopesQueryVariables,\n requestHeaders?: GraphQLClientRequestHeaders,\n signal?: RequestInit[\"signal\"],\n ): Promise<PollSyncEnvelopesQuery> {\n return withWrapper(\n (wrappedRequestHeaders) =>\n client.request<PollSyncEnvelopesQuery>({\n document: PollSyncEnvelopesDocument,\n variables,\n requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders },\n signal,\n }),\n \"PollSyncEnvelopes\",\n \"query\",\n variables,\n );\n },\n TouchChannel(\n variables: TouchChannelMutationVariables,\n requestHeaders?: GraphQLClientRequestHeaders,\n signal?: RequestInit[\"signal\"],\n ): Promise<TouchChannelMutation> {\n return withWrapper(\n (wrappedRequestHeaders) =>\n client.request<TouchChannelMutation>({\n document: TouchChannelDocument,\n variables,\n requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders },\n signal,\n }),\n \"TouchChannel\",\n \"mutation\",\n variables,\n );\n },\n PushSyncEnvelopes(\n variables: PushSyncEnvelopesMutationVariables,\n requestHeaders?: GraphQLClientRequestHeaders,\n signal?: RequestInit[\"signal\"],\n ): Promise<PushSyncEnvelopesMutation> {\n return withWrapper(\n (wrappedRequestHeaders) =>\n client.request<PushSyncEnvelopesMutation>({\n document: PushSyncEnvelopesDocument,\n variables,\n requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders },\n signal,\n }),\n \"PushSyncEnvelopes\",\n \"mutation\",\n variables,\n );\n },\n };\n}\nexport type Sdk = ReturnType<typeof getSdk>;\n","import {\n GetDocumentDocument,\n GetDocumentOperationsDocument,\n type OperationsFilterInput,\n type PagingInput,\n type ViewFilterInput,\n} from \"./gen/schema.js\";\n\n/** Get the source string from a GraphQL document (string or DocumentNode). */\nfunction getDocumentSource(doc: unknown): string {\n return typeof doc === \"string\"\n ? doc\n : ((doc as { loc?: { source: { body: string } } }).loc?.source.body ?? \"\");\n}\n\n/**\n * Extract the inner selection set of a named field from a GraphQL document source.\n * Returns the `{ ... }` block including braces.\n */\nfunction extractSelectionSet(\n doc: unknown,\n fieldName: string,\n fallback: string,\n): string {\n const source = getDocumentSource(doc);\n\n const regex = new RegExp(\n `${fieldName}\\\\([^)]*\\\\)\\\\s*(\\\\{[\\\\s\\\\S]*\\\\})\\\\s*\\\\}`,\n );\n return regex.exec(source)?.[1] ?? fallback;\n}\n\n/**\n * Extract the query body and any fragment definitions from a GraphQL document.\n * Returns { body, fragments } where body is the content inside the query `{ ... }`\n * and fragments are any trailing fragment definitions.\n */\nfunction extractQueryParts(\n doc: unknown,\n fallbackBody: string,\n): { body: string; fragments: string } {\n const source = getDocumentSource(doc);\n\n // Match the query body: everything between the first `{` and its closing `}`\n // before any fragment definitions\n const queryMatch = /^[^{]*\\{([\\s\\S]*?)\\}\\s*(fragment[\\s\\S]*)?$/.exec(source);\n const body = queryMatch?.[1]?.trim() ?? fallbackBody;\n const fragments = queryMatch?.[2]?.trim() ?? \"\";\n\n return { body, fragments };\n}\n\nconst operationsSelectionSet = extractSelectionSet(\n GetDocumentOperationsDocument,\n \"documentOperations\",\n \"{ items { index } }\",\n);\n\nconst documentParts = extractQueryParts(\n GetDocumentDocument,\n \"document(identifier: $identifier) { document { id name documentType state revisionsList { scope revision } createdAtUtcIso lastModifiedAtUtcIso } childIds }\",\n);\n\n/**\n * Build a single GraphQL query that fetches documentOperations for\n * multiple filters using aliases. Each filter gets its own alias\n * (`scope_0`, `scope_1`, …) so all scopes are fetched in one HTTP request.\n */\nexport function buildBatchOperationsQuery(\n filters: OperationsFilterInput[],\n pagings: (PagingInput | undefined | null)[],\n) {\n const varDefs = filters\n .flatMap((_, i) => [\n `$filter_${i}: OperationsFilterInput!`,\n `$paging_${i}: PagingInput`,\n ])\n .join(\", \");\n\n const fields = filters\n .map(\n (_, i) =>\n `scope_${i}: documentOperations(filter: $filter_${i}, paging: $paging_${i}) ${operationsSelectionSet}`,\n )\n .join(\"\\n \");\n\n const query = `query BatchGetDocumentOperations(${varDefs}) {\n ${fields}\n }`;\n\n const variables: Record<string, unknown> = {};\n for (let i = 0; i < filters.length; i++) {\n variables[`filter_${i}`] = filters[i];\n variables[`paging_${i}`] = pagings[i] ?? null;\n }\n\n return { query, variables };\n}\n\n/**\n * Build a single GraphQL query that fetches a document AND\n * documentOperations for multiple filters, all in one HTTP request.\n */\nexport function buildBatchDocumentWithOperationsQuery(\n identifier: string,\n view: ViewFilterInput | undefined,\n filters: OperationsFilterInput[],\n pagings: (PagingInput | undefined)[],\n) {\n const docVarDefs = \"$identifier: String!, $view: ViewFilterInput\";\n const opsVarDefs = filters\n .flatMap((_, i) => [\n `$filter_${i}: OperationsFilterInput!`,\n `$paging_${i}: PagingInput`,\n ])\n .join(\", \");\n\n const opsFields = filters\n .map(\n (_, i) =>\n `scope_${i}: documentOperations(filter: $filter_${i}, paging: $paging_${i}) ${operationsSelectionSet}`,\n )\n .join(\"\\n \");\n\n const query = `query BatchGetDocumentWithOperations(${docVarDefs}, ${opsVarDefs}) {\n ${documentParts.body}\n ${opsFields}\n }\n ${documentParts.fragments}`;\n\n const variables: Record<string, unknown> = {\n identifier,\n view: view ?? null,\n };\n for (let i = 0; i < filters.length; i++) {\n variables[`filter_${i}`] = filters[i];\n variables[`paging_${i}`] = pagings[i] ?? null;\n }\n\n return { query, variables };\n}\n","import { GraphQLClient, type Variables } from \"graphql-request\";\nimport {\n buildBatchDocumentWithOperationsQuery,\n buildBatchOperationsQuery,\n} from \"./batch-queries.js\";\nimport {\n getSdk,\n type GetDocumentOperationsQuery,\n type GetDocumentQuery,\n type OperationsFilterInput,\n type PagingInput,\n type SdkFunctionWrapper,\n type ViewFilterInput,\n} from \"./gen/schema.js\";\nimport type { ReactorGraphQLClient, RunDocumentOptions } from \"./types.js\";\n\nexport type { ReactorGraphQLClient, RunDocumentOptions } from \"./types.js\";\n\ntype DocumentOperationsPage = GetDocumentOperationsQuery[\"documentOperations\"];\n\ntype DocumentResult = NonNullable<GetDocumentQuery[\"document\"]>;\n\n/**\n * Creates a GraphQL client for the Reactor Subgraph API.\n * @param urlOrGQLClient The URL of the GraphQL API or a GraphQL client instance.\n * @param middleware An optional middleware function to wrap the GraphQL client calls.\n * @returns A GraphQL client for the Reactor Subgraph API.\n */\nexport function createClient(\n urlOrGQLClient: string | GraphQLClient,\n middleware?: SdkFunctionWrapper,\n): ReactorGraphQLClient {\n const client =\n typeof urlOrGQLClient === \"string\"\n ? new GraphQLClient(urlOrGQLClient)\n : urlOrGQLClient;\n\n // The hand-written batch methods below call `client.request` directly,\n // bypassing the middleware that `getSdk` applies. Wrap them in the same\n // shape so auth/logging/tracing middleware runs for batch calls too.\n const runWithMiddleware = async <T>(\n operationName: string,\n run: (requestHeaders?: Record<string, string>) => Promise<T>,\n operationType = \"query\",\n variables?: Variables,\n ): Promise<T> => {\n if (!middleware) return run();\n return middleware(run, operationName, operationType, variables);\n };\n\n return {\n ...getSdk(client, middleware),\n\n /**\n * Run a hand-authored GraphQL document through the same transport and\n * middleware as the generated SDK methods.\n */\n async RunDocument<TData>(options: RunDocumentOptions): Promise<TData> {\n const { document, variables, signal } = options;\n return runWithMiddleware<TData>(\n options.operationName,\n (wrappedRequestHeaders) =>\n client.request<TData>({\n document,\n variables,\n requestHeaders: {\n ...options.requestHeaders,\n ...wrappedRequestHeaders,\n },\n signal,\n }),\n options.operationType,\n variables,\n );\n },\n\n /**\n * Fetch documentOperations for multiple filters in a single HTTP request\n * using GraphQL aliases. Each filter has its own paging parameters.\n * Returns one result page per filter, in order.\n */\n async BatchGetDocumentOperations(\n filters: OperationsFilterInput[],\n pagings: (PagingInput | undefined | null)[],\n ): Promise<DocumentOperationsPage[]> {\n const { query, variables } = buildBatchOperationsQuery(filters, pagings);\n const data = await runWithMiddleware(\n \"BatchGetDocumentOperations\",\n (requestHeaders) =>\n client.request<Record<string, DocumentOperationsPage>>(\n query,\n variables,\n requestHeaders,\n ),\n );\n return filters.map((_, i) => data[`scope_${i}`]);\n },\n\n /**\n * Fetch a document AND documentOperations for multiple filters\n * in a single HTTP request. Combines GetDocument + BatchGetDocumentOperations.\n */\n async BatchGetDocumentWithOperations(\n identifier: string,\n view: ViewFilterInput | undefined,\n filters: OperationsFilterInput[],\n pagings: (PagingInput | undefined)[],\n ): Promise<{\n document: DocumentResult | null;\n operations: DocumentOperationsPage[];\n }> {\n const { query, variables } = buildBatchDocumentWithOperationsQuery(\n identifier,\n view,\n filters,\n pagings,\n );\n const data = await runWithMiddleware(\n \"BatchGetDocumentWithOperations\",\n (requestHeaders) =>\n client.request<\n Record<string, unknown> & { document?: DocumentResult }\n >(query, variables, requestHeaders),\n );\n return {\n document: data.document ?? null,\n operations: filters.map(\n (_, i) => data[`scope_${i}`] as DocumentOperationsPage,\n ),\n };\n },\n };\n}\n"],"mappings":";;;AA8FA,IAAY,qBAAL,yBAAA,oBAAA;AACL,oBAAA,gBAAA;AACA,oBAAA,kBAAA;AACA,oBAAA,aAAA;AACA,oBAAA,aAAA;AACA,oBAAA,iBAAA;AACA,oBAAA,mBAAA;AACA,oBAAA,aAAA;;KACD;AAqOD,IAAY,kBAAL,yBAAA,iBAAA;AACL,iBAAA,aAAA;AACA,iBAAA,YAAA;;KACD;AAs1BD,MAAa,8BAA8B,GAAG;;;;;;;;;;;;;;;AAe9C,MAAa,4BAA4B,GAAG;;;;;;;;;;;;;;;;;AAiB5C,MAAa,sBAAs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A6C;GACpE,MAAM,EAAE,UAAU,WAAW,WAAW;AACxC,UAAO,kBACL,QAAQ,gBACP,0BACC,OAAO,QAAe;IACpB;IACA;IACA,gBAAgB;KACd,GAAG,QAAQ;KACX,GAAG;KACJ;IACD;IACD,CAAC,EACJ,QAAQ,eACR,UACD;;EAQH,MAAM,2BACJ,SACA,SACmC;GACnC,MAAM,EAAE,OAAO,cAAc,0BAA0B,SAAS,QAAQ;GACxE,MAAM,OAAO,MAAM,kBACjB,+BACC,mBACC,OAAO,QACL,OACA,WACA,eACD,CACJ;AACD,UAAO,QAAQ,KAAK,GAAG,MAAM,KAAK,SAAS,KAAK;;EAOlD,MAAM,+BACJ,YACA,MACA,SACA,SAIC;GACD,MAAM,EAAE,OAAO,cAAc,sCAC3B,YACA,MACA,SACA,QACD;GACD,MAAM,OAAO,MAAM,kBACjB,mCACC,mBACC,OAAO,QAEL,OAAO,WAAW,eAAe,CACtC;AACD,UAAO;IACL,UAAU,KAAK,YAAY;IAC3B,YAAY,QAAQ,KACjB,GAAG,MAAM,KAAK,SAAS,KACzB;IACF;;EAEJ"}
@@ -1,10 +1,7 @@
1
- import { t as makePHEventFunctions } from "./make-ph-event-functions-BHoLPif5.js";
1
+ import { t as makePHEventFunctions } from "./make-ph-event-functions-DBq3iWYn.js";
2
2
  import { logger } from "document-model";
3
3
  import { buildSignedAction } from "@powerhousedao/shared/document-model";
4
- import { DocumentChangeType } from "@powerhousedao/reactor";
5
- import { use, useCallback, useSyncExternalStore } from "react";
6
- import { BrowserAnalyticsStore } from "@powerhousedao/analytics-engine-browser";
7
- import { AnalyticsQueryEngine } from "@powerhousedao/analytics-engine-core";
4
+ import { use, useCallback, useEffect, useReducer, useSyncExternalStore } from "react";
8
5
  //#region src/actions/queue.ts
9
6
  async function queueActions(document, actionOrActions) {
10
7
  if (!document) throw new Error("No document provided");
@@ -53,12 +50,12 @@ async function uploadOperations(documentId, allOperations, pushOperations, optio
53
50
  //#endregion
54
51
  //#region src/actions/sign.ts
55
52
  async function signAction(action, document) {
56
- const reactor = window.ph?.reactorClient;
57
- if (!reactor) return action;
58
- const reducer = (await reactor.getDocumentModelModule(document.header.documentType)).reducer;
59
53
  const renown = window.ph?.renown;
60
54
  if (!renown?.user) return action;
61
55
  if (!action.context?.signer) return action;
56
+ const reactorClient = window.ph?.reactorClientModule?.client;
57
+ if (!reactorClient) return action;
58
+ const reducer = (await reactorClient.getDocumentModelModuleForDocument(document)).reducer;
62
59
  const actionSigner = action.context.signer;
63
60
  return await buildSignedAction(action, reducer, document, actionSigner, renown.crypto.sign);
64
61
  }
@@ -138,37 +135,32 @@ async function dispatchActions(actionOrActions, documentOrDocumentId, onErrors,
138
135
  if (onSuccess && result) onSuccess(result);
139
136
  return result;
140
137
  }
141
- //#endregion
142
- //#region src/global/core.ts
143
- function getGlobal(namespace) {
144
- if (typeof window === "undefined") return void 0;
145
- return window.powerhouse?.[namespace];
146
- }
147
- function setGlobal(namespace, value) {
148
- if (typeof window === "undefined") return;
149
- window.powerhouse = window.powerhouse || {};
150
- window.powerhouse[namespace] = value;
151
- }
152
- function clearGlobal(namespace) {
153
- if (typeof window === "undefined") return;
154
- if (window.powerhouse?.[namespace]) {
155
- delete window.powerhouse[namespace];
156
- if (Object.keys(window.powerhouse).length === 0) delete window.powerhouse;
157
- }
158
- }
159
- //#endregion
160
- //#region src/analytics/store.ts
161
- async function createAnalyticsStore(options) {
162
- const store = new BrowserAnalyticsStore(options);
163
- await store.init();
164
- return {
165
- store,
166
- engine: new AnalyticsQueryEngine(store),
167
- options
168
- };
138
+ /**
139
+ * The reactor's `DocumentChangeType` members, typed as the enum so they can be
140
+ * assigned to `DocumentChangeEvent.type`. The assertion is unavoidable - a
141
+ * TypeScript string enum is nominal, so no string literal is assignable to it
142
+ * without one - and the two checks above are what make it safe.
143
+ */
144
+ const DOCUMENT_CHANGE_TYPE = {
145
+ Created: "created",
146
+ Deleted: "deleted",
147
+ Updated: "updated",
148
+ ParentAdded: "parent_added",
149
+ ParentRemoved: "parent_removed",
150
+ ChildAdded: "child_added",
151
+ ChildRemoved: "child_removed"
152
+ };
153
+ /**
154
+ * Structural equivalents of the reactor error classes' own static `isError`
155
+ * guards. Those guards match on `error.name` rather than the prototype chain
156
+ * (`packages/reactor/src/registry/errors.ts`), so re-implementing them here is
157
+ * behaviour-preserving and does not need the class at runtime.
158
+ */
159
+ function isDuplicateModuleError(error) {
160
+ return Error.isError(error) && error.name === "DuplicateModuleError";
169
161
  }
170
- async function getAnalyticsStore() {
171
- return (await getGlobal("analytics"))?.store ?? null;
162
+ function isDuplicateManifestError(error) {
163
+ return Error.isError(error) && error.name === "DuplicateManifestError";
172
164
  }
173
165
  //#endregion
174
166
  //#region src/document-cache.ts
@@ -206,7 +198,7 @@ function fulfilledOnly(promises) {
206
198
  /**
207
199
  * Document cache implementation that uses the new ReactorClient API.
208
200
  *
209
- * This cache subscribes to document change events via IReactorClient.subscribe()
201
+ * This cache subscribes to document change events via IReactorBrowserClient.subscribe()
210
202
  * and automatically updates the cache when documents are created, updated, or deleted.
211
203
  */
212
204
  var DocumentCache = class {
@@ -221,10 +213,10 @@ var DocumentCache = class {
221
213
  });
222
214
  }
223
215
  handleDocumentChange(event) {
224
- if (event.type === DocumentChangeType.Deleted) {
216
+ if (event.type === DOCUMENT_CHANGE_TYPE.Deleted) {
225
217
  const documentId = event.context?.childId;
226
218
  if (documentId) this.handleDocumentDeleted(documentId);
227
- } else if (event.type === DocumentChangeType.Updated) for (const doc of event.documents) this.handleDocumentUpdated(doc.header.id).catch(console.warn);
219
+ } else if (event.type === DOCUMENT_CHANGE_TYPE.Updated) for (const doc of event.documents) this.handleDocumentUpdated(doc.header.id).catch(console.warn);
228
220
  }
229
221
  handleDocumentDeleted(documentId) {
230
222
  const listeners = this.listeners.get(documentId);
@@ -380,6 +372,19 @@ function useDocument(id) {
380
372
  function useDocumentSafe(id) {
381
373
  const documentCache = useDocumentCache();
382
374
  const promise = useSyncExternalStore((cb) => id && documentCache ? documentCache.subscribe(id, cb) : () => {}, () => id ? documentCache?.get(id) : void 0);
375
+ const [, bumpOnSettle] = useReducer((count) => count + 1, 0);
376
+ const pendingPromise = promise && readPromiseState(promise).status === "pending" ? promise : null;
377
+ useEffect(() => {
378
+ if (!pendingPromise) return;
379
+ let active = true;
380
+ const settled = () => {
381
+ if (active) bumpOnSettle();
382
+ };
383
+ pendingPromise.then(settled, settled);
384
+ return () => {
385
+ active = false;
386
+ };
387
+ }, [pendingPromise]);
383
388
  if (!promise || !documentCache || !id) return {
384
389
  status: "initial",
385
390
  isPending: false,
@@ -482,6 +487,6 @@ function useDocumentsByIds(ids) {
482
487
  return useDocuments(ids);
483
488
  }
484
489
  //#endregion
485
- export { queueOperations as C, queueActions as S, getAnalyticsStore as _, setDocumentCache as a, setGlobal as b, useDocumentSafe as c, useGetDocumentAsync as d, useGetDocuments as f, createAnalyticsStore as g, readPromiseState as h, addDocumentCacheEventHandler as i, useDocuments as l, addPromiseState as m, useDocumentsByIds as n, useDocument as o, DocumentCache as p, useDispatch as r, useDocumentCache as s, useDocumentById as t, useGetDocument as u, clearGlobal as v, uploadOperations as w, dispatchActions as x, getGlobal as y };
490
+ export { uploadOperations as S, isDuplicateManifestError as _, setDocumentCache as a, queueActions as b, useDocumentSafe as c, useGetDocumentAsync as d, useGetDocuments as f, DOCUMENT_CHANGE_TYPE as g, readPromiseState as h, addDocumentCacheEventHandler as i, useDocuments as l, addPromiseState as m, useDocumentsByIds as n, useDocument as o, DocumentCache as p, useDispatch as r, useDocumentCache as s, useDocumentById as t, useGetDocument as u, isDuplicateModuleError as v, queueOperations as x, dispatchActions as y };
486
491
 
487
- //# sourceMappingURL=document-by-id-dLYFX-xz.js.map
492
+ //# sourceMappingURL=document-by-id-DWEQI7wn.js.map