@powerhousedao/reactor-browser 6.2.3-dev.6 → 6.2.3-dev.61

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 (88) hide show
  1. package/dist/{attachment-service-D3EhiAJ7.d.ts → attachment-service-DG6UkyMv.d.ts} +362 -65
  2. package/dist/attachment-service-DG6UkyMv.d.ts.map +1 -0
  3. package/dist/{client-BIHN_UyR.d.ts → client-BnGewICj.d.ts} +3 -3
  4. package/dist/client-BnGewICj.d.ts.map +1 -0
  5. package/dist/{client-D66jVnot.js → client-CXDpILj6.js} +232 -32
  6. package/dist/client-CXDpILj6.js.map +1 -0
  7. package/dist/{client-DjK30EQ-.js → client-Cq5avLW5.js} +35 -22
  8. package/dist/client-Cq5avLW5.js.map +1 -0
  9. package/dist/{document-by-id-B4FIzG1w.js → dispatch-C1VVTn5S.js} +393 -54
  10. package/dist/dispatch-C1VVTn5S.js.map +1 -0
  11. package/dist/document-by-id-BRDkvmpn.js +16 -0
  12. package/dist/document-by-id-BRDkvmpn.js.map +1 -0
  13. package/dist/{document-model-modules-bTP87nyr.js → document-model-modules-Gsh1Xr7j.js} +60 -68
  14. package/dist/document-model-modules-Gsh1Xr7j.js.map +1 -0
  15. package/dist/{document-operations-WeE6wIDt.js → document-operations-BSzcF0mu.js} +805 -167
  16. package/dist/document-operations-BSzcF0mu.js.map +1 -0
  17. package/dist/{global-OuINvEGT.d.ts → global-BuSwbbY0.d.ts} +59 -13
  18. package/dist/global-BuSwbbY0.d.ts.map +1 -0
  19. package/dist/{index-B33TKEqp.d.ts → index-ewIc3pEO.d.ts} +19 -98
  20. package/dist/index-ewIc3pEO.d.ts.map +1 -0
  21. package/dist/{index-BIVDXw3K.d.ts → index-rtDmzViP.d.ts} +3 -3
  22. package/dist/index-rtDmzViP.d.ts.map +1 -0
  23. package/dist/index.d.ts +395 -371
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +116 -47
  26. package/dist/index.js.map +1 -1
  27. package/dist/inspector-proxy-DODqs15F.d.ts +25 -0
  28. package/dist/inspector-proxy-DODqs15F.d.ts.map +1 -0
  29. package/dist/{make-ph-event-functions-DBq3iWYn.js → make-ph-event-functions-CdsvEl5t.js} +4 -2
  30. package/dist/{make-ph-event-functions-DBq3iWYn.js.map → make-ph-event-functions-CdsvEl5t.js.map} +1 -1
  31. package/dist/{pglite-CntadC_p-9NDG14dS.d.ts → pglite-CntadC_p-DTkdF8sr.d.ts} +11 -33
  32. package/dist/pglite-CntadC_p-DTkdF8sr.d.ts.map +1 -0
  33. package/dist/{relational-D1RB45sA.js → relational-DxHuX41f.js} +66 -5
  34. package/dist/relational-DxHuX41f.js.map +1 -0
  35. package/dist/{renown-rqK8sokh.js → renown-CPAeJt5L.js} +7 -8
  36. package/dist/{renown-rqK8sokh.js.map → renown-CPAeJt5L.js.map} +1 -1
  37. package/dist/{renown-BHxwP7xU.js → renown-D05wkobG.js} +2 -2
  38. package/dist/{renown-BHxwP7xU.js.map → renown-D05wkobG.js.map} +1 -1
  39. package/dist/src/ai/index.d.ts +51 -62
  40. package/dist/src/ai/index.d.ts.map +1 -1
  41. package/dist/src/ai/index.js +5 -8
  42. package/dist/src/ai/index.js.map +1 -1
  43. package/dist/src/analytics/index.d.ts +36 -44
  44. package/dist/src/analytics/index.d.ts.map +1 -1
  45. package/dist/src/analytics/index.js +2 -2
  46. package/dist/src/analytics/index.js.map +1 -1
  47. package/dist/src/document-model.d.ts +3 -4
  48. package/dist/src/document-model.d.ts.map +1 -1
  49. package/dist/src/document-model.js.map +1 -1
  50. package/dist/src/graphql/client.d.ts +4 -3
  51. package/dist/src/graphql/client.js +1 -1
  52. package/dist/src/graphql-client/entry.d.ts +5 -4
  53. package/dist/src/graphql-client/entry.js +4 -4
  54. package/dist/src/relational/index.d.ts +15 -9
  55. package/dist/src/relational/index.d.ts.map +1 -1
  56. package/dist/src/relational/index.js +1 -1
  57. package/dist/src/renown/index.d.ts +3 -2
  58. package/dist/src/renown/index.js +2 -2
  59. package/dist/src/rpc/index.d.ts +176 -138
  60. package/dist/src/rpc/index.d.ts.map +1 -1
  61. package/dist/src/rpc/index.js +421 -618
  62. package/dist/src/rpc/index.js.map +1 -1
  63. package/dist/{store-BJYcr_FL.js → store-DInXcjal.js} +1 -1
  64. package/dist/{store-BJYcr_FL.js.map → store-DInXcjal.js.map} +1 -1
  65. package/dist/{switchboard-CaXQ4-5Q.js → switchboard-3vHbIV5W.js} +58 -6
  66. package/dist/switchboard-3vHbIV5W.js.map +1 -0
  67. package/dist/{types-Dcv1ZLoW.d.ts → types-0Fh1tNjy.d.ts} +242 -17
  68. package/dist/types-0Fh1tNjy.d.ts.map +1 -0
  69. package/dist/{types-6vDzbRRS.d.ts → types-520nWrB3.d.ts} +2 -2
  70. package/dist/types-520nWrB3.d.ts.map +1 -0
  71. package/package.json +19 -20
  72. package/dist/attachment-service-D3EhiAJ7.d.ts.map +0 -1
  73. package/dist/client-BIHN_UyR.d.ts.map +0 -1
  74. package/dist/client-D66jVnot.js.map +0 -1
  75. package/dist/client-DjK30EQ-.js.map +0 -1
  76. package/dist/document-by-id-B4FIzG1w.js.map +0 -1
  77. package/dist/document-model-modules-bTP87nyr.js.map +0 -1
  78. package/dist/document-operations-WeE6wIDt.js.map +0 -1
  79. package/dist/global-OuINvEGT.d.ts.map +0 -1
  80. package/dist/index-B33TKEqp.d.ts.map +0 -1
  81. package/dist/index-BIVDXw3K.d.ts.map +0 -1
  82. package/dist/inspector-proxy-6h5VKAwt.d.ts +0 -257
  83. package/dist/inspector-proxy-6h5VKAwt.d.ts.map +0 -1
  84. package/dist/pglite-CntadC_p-9NDG14dS.d.ts.map +0 -1
  85. package/dist/relational-D1RB45sA.js.map +0 -1
  86. package/dist/switchboard-CaXQ4-5Q.js.map +0 -1
  87. package/dist/types-6vDzbRRS.d.ts.map +0 -1
  88. package/dist/types-Dcv1ZLoW.d.ts.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switchboard-3vHbIV5W.js","names":[],"sources":["../src/utils/nodes.ts","../src/hooks/items-in-selected-drive.ts","../src/hooks/selected-node.ts","../src/hooks/document-of-type.ts","../src/hooks/selected-document.ts","../src/ai/switchboard.ts"],"sourcesContent":["import type {\n FileNode,\n FolderNode,\n Node,\n} from \"@powerhousedao/shared/document-drive\";\n\n/** Sorts nodes by name. */\nexport function sortNodesByName<T extends Node>(nodes: T[]) {\n return nodes.toSorted((a, b) => a.name.localeCompare(b.name));\n}\n\n/** Returns whether a node is a file. */\nexport function isFileNodeKind(\n node: Node | null | undefined,\n): node is FileNode {\n if (!node) return false;\n return node.kind.toUpperCase() === \"FILE\";\n}\n\n/** Returns whether a node is a folder. */\nexport function isFolderNodeKind(\n node: Node | null | undefined,\n): node is FolderNode {\n if (!node) return false;\n return node.kind.toUpperCase() === \"FOLDER\";\n}\n","import type {\n FileNode,\n FolderNode,\n} from \"@powerhousedao/shared/document-drive\";\nimport type {\n DocumentModelDocument,\n PHDocument,\n} from \"@powerhousedao/shared/document-model\";\nimport { isFileNodeKind, isFolderNodeKind } from \"../utils/nodes.js\";\nimport { useDocumentsByIds } from \"./document-by-id.js\";\nimport { useSelectedDriveSafe } from \"./selected-drive.js\";\n\n/** Returns the nodes in the selected drive. */\nexport function useNodesInSelectedDrive() {\n const [selectedDrive] = useSelectedDriveSafe();\n return selectedDrive?.state.global.nodes;\n}\n\n/** Returns the file nodes in the selected drive. */\nexport function useFileNodesInSelectedDrive(): FileNode[] | undefined {\n const nodes = useNodesInSelectedDrive();\n return nodes?.filter((n) => isFileNodeKind(n));\n}\n\n/** Returns the folder nodes in the selected drive. */\nexport function useFolderNodesInSelectedDrive(): FolderNode[] | undefined {\n const nodes = useNodesInSelectedDrive();\n return nodes?.filter((n) => isFolderNodeKind(n));\n}\n\n/** Returns the documents in the selected drive. */\nexport function useDocumentsInSelectedDrive(): PHDocument[] | undefined {\n const fileNodes = useFileNodesInSelectedDrive();\n const fileNodeIds = fileNodes?.map((node) => node.id);\n return useDocumentsByIds(fileNodeIds);\n}\n\n/** Returns the document types supported by the selected drive, as defined by the document model documents present in the drive */\nexport function useDocumentTypesInSelectedDrive() {\n const documentsInSelectedDrive = useDocumentsInSelectedDrive();\n const documentModelDocumentsInSelectedDrive =\n documentsInSelectedDrive?.filter(isDocumentModelDocument);\n const documentTypesFromDocumentModelDocuments =\n documentModelDocumentsInSelectedDrive?.map((doc) => doc.state.global.id);\n return documentTypesFromDocumentModelDocuments;\n}\n\nfunction isDocumentModelDocument(\n document: PHDocument,\n): document is DocumentModelDocument {\n return document.header.documentType === \"powerhouse/document-model\";\n}\n","import type { Node } from \"@powerhousedao/shared/document-drive\";\nimport { useNodesInSelectedDrive } from \"./items-in-selected-drive.js\";\nimport { useSelectedNodeId } from \"./set-selected-node.js\";\n\nexport {\n addResetSelectedNodeEventHandler,\n addSelectedNodeIdEventHandler,\n addSetSelectedNodeOnPopStateEventHandler,\n setSelectedNode,\n} from \"./set-selected-node.js\";\n\n/** Returns the selected node. */\nexport function useSelectedNode(): Node | undefined {\n const selectedNodeId = useSelectedNodeId();\n const nodes = useNodesInSelectedDrive();\n return nodes?.find((n) => n.id === selectedNodeId);\n}\n","import { ModuleNotFoundError } from \"@powerhousedao/reactor\";\nimport type { DocumentDispatch } from \"@powerhousedao/reactor-browser\";\nimport type { Action, PHDocument } from \"@powerhousedao/shared/document-model\";\nimport { DocumentTypeMismatchError } from \"../errors.js\";\nimport { useDocumentById } from \"./document-by-id.js\";\nimport { useDocumentModelModuleById } from \"./document-model-modules.js\";\n\n/** Returns a document of a specific type, throws an error if the found document has a different type */\nexport function useDocumentOfType<\n TDocument extends PHDocument,\n TAction extends Action,\n>(\n documentId: string | null | undefined,\n documentType: string | null | undefined,\n) {\n const [document, dispatch] = useDocumentById(documentId);\n const documentModelModule = useDocumentModelModuleById(documentType);\n\n if (!documentId || !documentType) return [];\n\n if (!document) {\n throw new Error(`Document not found: ${documentId}`);\n }\n if (!documentModelModule) {\n throw new ModuleNotFoundError(documentType);\n }\n\n if (document.header.documentType !== documentType) {\n throw new DocumentTypeMismatchError(\n documentId,\n documentType,\n document.header.documentType,\n );\n }\n\n return [document, dispatch] as [TDocument, DocumentDispatch<TAction>];\n}\n","import type { DocumentDispatch } from \"@powerhousedao/reactor-browser\";\nimport { isFileNode } from \"@powerhousedao/shared/document-drive\";\nimport type { Action, PHDocument } from \"@powerhousedao/shared/document-model\";\nimport { NoSelectedDocumentError } from \"../errors.js\";\nimport type { DispatchFn, UseDispatchResult } from \"./dispatch.js\";\nimport { useDocumentById } from \"./document-by-id.js\";\nimport { useDocumentOfType } from \"./document-of-type.js\";\nimport { useSelectedNode } from \"./selected-node.js\";\n\n/** Returns the selected document id */\nexport function useSelectedDocumentId(): string | undefined {\n const selectedNode = useSelectedNode();\n return selectedNode && isFileNode(selectedNode) ? selectedNode.id : undefined;\n}\n\n/** Returns the selected document. */\nexport function useSelectedDocument(): readonly [\n PHDocument,\n DispatchFn<Action>,\n] {\n const selectedDocumentId = useSelectedDocumentId();\n const [document, dispatch] = useDocumentById(selectedDocumentId);\n if (!document) {\n throw new NoSelectedDocumentError();\n }\n return [document, dispatch] as const;\n}\n\n/** Returns the selected document. */\nexport function useSelectedDocumentSafe(): UseDispatchResult<\n PHDocument,\n Action\n> {\n const selectedDocumentId = useSelectedDocumentId();\n return useDocumentById(selectedDocumentId);\n}\n\n/** Returns the selected document of a specific type, throws an error if the found document has a different type */\nexport function useSelectedDocumentOfType(\n documentType: null | undefined,\n): never[];\nexport function useSelectedDocumentOfType<\n TDocument extends PHDocument,\n TAction extends Action,\n>(documentType: string): [TDocument, DocumentDispatch<TAction>];\nexport function useSelectedDocumentOfType<\n TDocument extends PHDocument,\n TAction extends Action,\n>(\n documentType: string | null | undefined,\n): never[] | [TDocument, DocumentDispatch<TAction>] {\n const documentId = useSelectedDocumentId();\n\n if (!documentType) {\n return [];\n }\n if (!documentId) {\n throw new NoSelectedDocumentError();\n }\n return useDocumentOfType<TDocument, TAction>(documentId, documentType);\n}\n","import { DriveCollectionId, type ISyncManager } from \"@powerhousedao/reactor\";\nimport { z } from \"zod\";\nimport { ambientRenownTokenProvider } from \"../graphql-client/auth.js\";\nimport type { AiToolDescriptor } from \"./types.js\";\n\n/**\n * The switchboard serving a remote drive: the base URL the browser talks to\n * and its GraphQL supergraph endpoint.\n */\nexport interface DriveSwitchboard {\n /** Switchboard base URL (e.g. `http://localhost:4001`). */\n switchboardUrl: string;\n /** GraphQL supergraph endpoint (`<base>/graphql`). */\n graphqlUrl: string;\n}\n\n/**\n * Reads the tab-side sync manager from the browser global. Returns\n * `undefined` in non-browser environments or before the reactor client\n * module is initialized.\n */\nexport function getBrowserSyncManager(): ISyncManager | undefined {\n if (typeof window === \"undefined\") {\n return undefined;\n }\n return window.ph?.reactorClientModule?.reactorModule?.syncModule?.syncManager;\n}\n\n/** Suffix of the per-drive GraphQL channel endpoint the switchboard serves. */\nexport const GQL_CHANNEL_SUFFIX = \"/graphql/r\";\n\n/**\n * Resolves the switchboard that serves a drive, if any.\n *\n * Every remote drive stores its switchboard's exact GraphQL channel\n * endpoint in its sync remote — `channelConfig = { type: \"gql\",\n * parameters: { url: \"<origin>/graphql/r\" } }` — and the switchboard base\n * is that URL minus the `/graphql/r` suffix. Deriving it per drive (rather\n * than from a global setting) is what keeps multi-switchboard deployments\n * correct. Drives that are not synced to a remote switchboard (local\n * drives, other channel types, unexpected shapes) return `undefined`.\n */\nexport function resolveDriveSwitchboard(\n driveId: string | undefined,\n syncManager?: ISyncManager,\n): DriveSwitchboard | undefined {\n const manager = syncManager ?? getBrowserSyncManager();\n if (!driveId || !manager) {\n return undefined;\n }\n const collectionId = DriveCollectionId.forDrive(driveId);\n const remote = manager\n .list()\n .find((r) => r.meta.collectionId.equals(collectionId));\n if (!remote) {\n return undefined;\n }\n const { channelConfig } = remote.meta;\n if (channelConfig.type !== \"gql\") {\n return undefined;\n }\n const url = channelConfig.parameters.url;\n if (typeof url !== \"string\" || !url.endsWith(GQL_CHANNEL_SUFFIX)) {\n return undefined;\n }\n const switchboardUrl = url.slice(0, -GQL_CHANNEL_SUFFIX.length);\n return { switchboardUrl, graphqlUrl: `${switchboardUrl}/graphql` };\n}\n\n/** A bounded introspected GraphQL type reference (see the query below). */\ntype IntrospectedTypeRef = {\n kind: string;\n name: string | null;\n ofType?: IntrospectedTypeRef | null;\n};\n\ntype IntrospectedField = {\n name: string;\n description: string | null;\n args: Array<{ name: string; type: IntrospectedTypeRef }>;\n type: IntrospectedTypeRef;\n};\n\ntype IntrospectedRootType = {\n fields: IntrospectedField[] | null;\n} | null;\n\ntype IntrospectedSchema = {\n queryType?: IntrospectedRootType;\n mutationType?: IntrospectedRootType;\n};\n\n/**\n * Introspection over the switchboard supergraph's root query and mutation\n * fields. Types are requested with three levels of `ofType` nesting so\n * that common shapes like `[X!]!` (LIST(NON_NULL(LIST(X)))) render fully.\n */\nexport const SWITCHBOARD_INTROSPECTION_QUERY: string = /* GraphQL */ `\n query SwitchboardIntrospection {\n __schema {\n queryType {\n fields {\n name\n description\n args {\n name\n type {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n }\n }\n }\n }\n }\n type {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n }\n }\n }\n }\n }\n }\n mutationType {\n fields {\n name\n description\n args {\n name\n type {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n }\n }\n }\n }\n }\n type {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n }\n }\n }\n }\n }\n }\n }\n }\n`;\n\n/**\n * Renders an introspected type reference as a GraphQL type string.\n * Recursion is bounded by the `ofType` nesting of the query, so it always\n * terminates.\n */\nfunction renderTypeRef(type: IntrospectedTypeRef | null | undefined): string {\n if (!type) {\n return \"Unknown\";\n }\n switch (type.kind) {\n case \"NON_NULL\":\n return `${renderTypeRef(type.ofType)}!`;\n case \"LIST\":\n return `[${renderTypeRef(type.ofType)}]`;\n default:\n return type.name ?? \"Unknown\";\n }\n}\n\n/** One root query or mutation field, reduced to a prompt-friendly line. */\nexport type SchemaFieldSummary = {\n name: string;\n description?: string;\n args: string;\n returns: string;\n};\n\n/** Cap on the number of fields reported per root type. */\nconst MAX_FIELDS_PER_ROOT = 200;\n\nfunction summarizeFields(fields: IntrospectedField[] | null | undefined): {\n fields: SchemaFieldSummary[];\n truncated: boolean;\n} {\n const list = fields ?? [];\n return {\n fields: list.slice(0, MAX_FIELDS_PER_ROOT).map((field) => ({\n name: field.name,\n ...(field.description ? { description: field.description } : {}),\n args: field.args\n .map((arg) => `${arg.name}: ${renderTypeRef(arg.type)}`)\n .join(\", \"),\n returns: renderTypeRef(field.type),\n })),\n truncated: list.length > MAX_FIELDS_PER_ROOT,\n };\n}\n\n/**\n * Reduces a GraphQL `__schema` introspection payload (the `data.__schema`\n * object) to a compact summary of its root query and mutation fields.\n * Accepts `unknown` because the payload arrives over the wire.\n */\nexport function summarizeIntrospectionSchema(schema: unknown): {\n queries: SchemaFieldSummary[];\n mutations: SchemaFieldSummary[];\n truncated: boolean;\n} {\n const introspection = (schema ?? {}) as IntrospectedSchema;\n const queries = summarizeFields(introspection.queryType?.fields);\n const mutations = summarizeFields(introspection.mutationType?.fields);\n return {\n queries: queries.fields,\n mutations: mutations.fields,\n truncated: queries.truncated || mutations.truncated,\n };\n}\n\nexport const SWITCHBOARD_SCHEMA_TOOL_NAME = \"getSwitchboardSchema\";\n\n/** Test seams for {@link createSwitchboardSchemaTool}. */\nexport interface SwitchboardToolDeps {\n getSyncManager?: () => ISyncManager | undefined;\n getSelectedDriveId?: () => string | undefined;\n tokenProvider?: () => Promise<string | undefined>;\n fetchImpl?: typeof fetch;\n timeoutMs?: number;\n}\n\n/**\n * Creates the read-only `getSwitchboardSchema` tool: it introspects the\n * GraphQL supergraph of the switchboard serving a drive and returns a\n * summary of its root queries and mutations. It reads the schema only and\n * never modifies data.\n */\nexport function createSwitchboardSchemaTool(\n deps?: SwitchboardToolDeps,\n): AiToolDescriptor {\n const getSyncManager = deps?.getSyncManager ?? getBrowserSyncManager;\n const getSelectedDriveId =\n deps?.getSelectedDriveId ??\n ((): string | undefined =>\n typeof window === \"undefined\" ? undefined : window.ph?.selectedDriveId);\n const tokenProvider = deps?.tokenProvider ?? ambientRenownTokenProvider;\n const fetchImpl = deps?.fetchImpl ?? fetch;\n const timeoutMs = deps?.timeoutMs ?? 10_000;\n\n return {\n name: SWITCHBOARD_SCHEMA_TOOL_NAME,\n description:\n \"Introspect the GraphQL endpoint of the switchboard serving a drive and list the queries and mutations it exposes (reactor operations, document-model read models, package subgraphs). Read-only: it reads the schema only and never modifies data. Omit driveId to introspect the currently selected drive.\",\n inputSchema: {\n driveId: z\n .string()\n .describe(\n \"Drive to introspect. Omit to use the currently selected drive.\",\n )\n .optional(),\n },\n annotations: { readOnlyHint: true },\n callback: async (input: { driveId?: string } | undefined) => {\n const driveId = input?.driveId ?? getSelectedDriveId();\n const sb = resolveDriveSwitchboard(driveId, getSyncManager());\n if (!sb) {\n throw new Error(\n driveId\n ? `Drive \"${driveId}\" has no switchboard: it is not synced to a remote switchboard.`\n : \"No drive is currently selected and no driveId was given.\",\n );\n }\n\n const token = await tokenProvider();\n let response: Response;\n try {\n response = await fetchImpl(sb.graphqlUrl, {\n method: \"POST\",\n headers: {\n \"content-type\": \"application/json\",\n ...(token ? { authorization: `Bearer ${token}` } : {}),\n },\n body: JSON.stringify({ query: SWITCHBOARD_INTROSPECTION_QUERY }),\n signal: AbortSignal.timeout(timeoutMs),\n });\n } catch (error) {\n throw new Error(\n `Switchboard at ${sb.graphqlUrl} is not reachable: ${\n error instanceof Error ? error.message : String(error)\n }`,\n { cause: error },\n );\n }\n\n if (response.status === 401 || response.status === 403) {\n throw new Error(\n `Switchboard at ${sb.graphqlUrl} refused the request (HTTP ${response.status}). Sign in to the switchboard (Renown) and try again.`,\n );\n }\n if (!response.ok) {\n throw new Error(\n `Switchboard introspection failed: HTTP ${response.status} ${response.statusText} from ${sb.graphqlUrl}`,\n );\n }\n\n const body = (await response.json()) as {\n errors?: Array<{ message?: string }>;\n data?: { __schema?: unknown } | null;\n } | null;\n const schemaErrors = body?.errors;\n if (schemaErrors && schemaErrors.length > 0) {\n throw new Error(\n schemaErrors.map((e) => e.message ?? \"unknown error\").join(\"; \"),\n );\n }\n const schema = body?.data?.__schema as\n | IntrospectedSchema\n | null\n | undefined;\n if (!schema?.queryType) {\n throw new Error(\n `Switchboard at ${sb.graphqlUrl} did not return a GraphQL schema.`,\n );\n }\n\n const summary = summarizeIntrospectionSchema(schema);\n return {\n switchboardUrl: sb.switchboardUrl,\n graphqlUrl: sb.graphqlUrl,\n ...summary,\n };\n },\n };\n}\n"],"mappings":";;;;;;;AAOA,SAAgB,gBAAgC,OAAY;CAC1D,OAAO,MAAM,UAAU,GAAG,MAAM,EAAE,KAAK,cAAc,EAAE,IAAI,CAAC;AAC9D;;AAGA,SAAgB,eACd,MACkB;CAClB,IAAI,CAAC,MAAM,OAAO;CAClB,OAAO,KAAK,KAAK,YAAY,MAAM;AACrC;;AAGA,SAAgB,iBACd,MACoB;CACpB,IAAI,CAAC,MAAM,OAAO;CAClB,OAAO,KAAK,KAAK,YAAY,MAAM;AACrC;;;;ACZA,SAAgB,0BAA0B;CACxC,MAAM,CAAC,iBAAiB,qBAAqB;CAC7C,OAAO,eAAe,MAAM,OAAO;AACrC;;AAGA,SAAgB,8BAAsD;CAEpE,OADc,wBACH,CAAC,EAAE,QAAQ,MAAM,eAAe,CAAC,CAAC;AAC/C;;AAGA,SAAgB,gCAA0D;CAExE,OADc,wBACH,CAAC,EAAE,QAAQ,MAAM,iBAAiB,CAAC,CAAC;AACjD;;AAGA,SAAgB,8BAAwD;CAEtE,MAAM,cADY,4BACU,CAAC,EAAE,KAAK,SAAS,KAAK,EAAE;CACpD,OAAO,kBAAkB,WAAW;AACtC;;AAGA,SAAgB,kCAAkC;CAMhD,QALiC,4BAER,CAAC,EA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OAAO,gCAAgC,CAAC;KAC/D,QAAQ,YAAY,QAAQ,SAAS;IACvC,CAAC;GACH,SAAS,OAAO;IACd,MAAM,IAAI,MACR,kBAAkB,GAAG,WAAW,qBAC9B,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,KAEvD,EAAE,OAAO,MAAM,CACjB;GACF;GAEA,IAAI,SAAS,WAAW,OAAO,SAAS,WAAW,KACjD,MAAM,IAAI,MACR,kBAAkB,GAAG,WAAW,6BAA6B,SAAS,OAAO,sDAC/E;GAEF,IAAI,CAAC,SAAS,IACZ,MAAM,IAAI,MACR,0CAA0C,SAAS,OAAO,GAAG,SAAS,WAAW,QAAQ,GAAG,YAC9F;GAGF,MAAM,OAAQ,MAAM,SAAS,KAAK;GAIlC,MAAM,eAAe,MAAM;GAC3B,IAAI,gBAAgB,aAAa,SAAS,GACxC,MAAM,IAAI,MACR,aAAa,KAAK,MAAM,EAAE,WAAW,eAAe,CAAC,CAAC,KAAK,IAAI,CACjE;GAEF,MAAM,SAAS,MAAM,MAAM;GAI3B,IAAI,CAAC,QAAQ,WACX,MAAM,IAAI,MACR,kBAAkB,GAAG,WAAW,kCAClC;GAGF,MAAM,UAAU,6BAA6B,MAAM;GACnD,OAAO;IACL,gBAAgB,GAAG;IACnB,YAAY,GAAG;IACf,GAAG;GACL;EACF;CACF;AACF"}
@@ -1,11 +1,10 @@
1
1
  import { GraphQLClient, RequestDocument, RequestOptions, Variables } from "graphql-request";
2
2
  import { z } from "zod";
3
-
4
3
  //#region src/graphql/gen/schema.d.ts
5
4
  type InputMaybe<T> = T | null | undefined;
6
5
  type Exact<T extends {
7
6
  [key: string]: unknown;
8
- }> = { [K in keyof T]: T[K] };
7
+ }> = { [K in keyof T]: T[K]; };
9
8
  type GraphQLClientRequestHeaders = RequestOptions["requestHeaders"];
10
9
  /** All built-in and custom scalars, mapped to their actual values */
11
10
  type Scalars = {
@@ -63,8 +62,11 @@ type ActionCandidateInput = {
63
62
  * the params carried in its own tuple, which do not include them.
64
63
  */
65
64
  type ActionContextInput = {
66
- /** Covers replay of an operation that would otherwise be a no-op. */readonly nonce?: InputMaybe<Scalars["String"]["input"]>; /** The hash of the state the action applies to. */
67
- readonly prevOpHash?: InputMaybe<Scalars["String"]["input"]>; /** The index of the last operation in the scope the action applies to. */
65
+ /** Covers replay of an operation that would otherwise be a no-op. */
66
+ readonly nonce?: InputMaybe<Scalars["String"]["input"]>;
67
+ /** The hash of the state the action applies to. */
68
+ readonly prevOpHash?: InputMaybe<Scalars["String"]["input"]>;
69
+ /** The index of the last operation in the scope the action applies to. */
68
70
  readonly prevOpIndex?: InputMaybe<Scalars["Int"]["input"]>;
69
71
  readonly signer?: InputMaybe<ReactorSignerInput>;
70
72
  };
@@ -100,6 +102,27 @@ type DocumentOperationsFilterInput = {
100
102
  readonly timestampFrom?: InputMaybe<Scalars["String"]["input"]>;
101
103
  readonly timestampTo?: InputMaybe<Scalars["String"]["input"]>;
102
104
  };
105
+ /**
106
+ * One mutation job of a batch, mirroring the reactor's `ExecutionJobPlan`
107
+ * (packages/reactor/src/core/types.ts). The batch runs its jobs in dependency
108
+ * order only, not atomically: each job commits on its own with no batch rollback,
109
+ * and a failed job still releases its dependents.
110
+ *
111
+ * `documentIdOrSlug` is the document the job's actions apply to -- an id that does
112
+ * not yet exist when the job's actions create it. `actions` are coerced against
113
+ * `ActionInput` and passed through exactly as `execute` does, so a client-signed
114
+ * action keeps its signature. `scope` is the single scope every action in the job
115
+ * shares, and `dependsOn` names the plan keys this job is ordered after. `branch`
116
+ * defaults to `main`.
117
+ */
118
+ type ExecutionJobInput = {
119
+ readonly actions: ReadonlyArray<ActionInput>;
120
+ readonly branch?: InputMaybe<Scalars["String"]["input"]>;
121
+ readonly dependsOn: ReadonlyArray<Scalars["String"]["input"]>;
122
+ readonly documentIdOrSlug: Scalars["String"]["input"];
123
+ readonly key: Scalars["String"]["input"];
124
+ readonly scope: Scalars["String"]["input"];
125
+ };
103
126
  type OperationContextInput = {
104
127
  readonly branch: Scalars["String"]["input"];
105
128
  readonly documentId: Scalars["String"]["input"];
@@ -124,7 +147,9 @@ type OperationWithContextInput = {
124
147
  type OperationsFilterInput = {
125
148
  readonly actionTypes?: InputMaybe<ReadonlyArray<Scalars["String"]["input"]>>;
126
149
  readonly branch?: InputMaybe<Scalars["String"]["input"]>;
127
- readonly documentId: Scalars["String"]["input"];
150
+ /** @deprecated Use documentIdOrSlug. */
151
+ readonly documentId?: InputMaybe<Scalars["String"]["input"]>;
152
+ readonly documentIdOrSlug?: InputMaybe<Scalars["String"]["input"]>;
128
153
  readonly scopes?: InputMaybe<ReadonlyArray<Scalars["String"]["input"]>>;
129
154
  readonly sinceRevision?: InputMaybe<Scalars["Int"]["input"]>;
130
155
  readonly timestampFrom?: InputMaybe<Scalars["String"]["input"]>;
@@ -164,6 +189,7 @@ type RemoteFilterInput = {
164
189
  readonly scope: ReadonlyArray<Scalars["String"]["input"]>;
165
190
  };
166
191
  type SearchFilterInput = {
192
+ /** @deprecated Ignored. Filter by type or parentId. */
167
193
  readonly identifiers?: InputMaybe<ReadonlyArray<Scalars["String"]["input"]>>;
168
194
  readonly parentId?: InputMaybe<Scalars["String"]["input"]>;
169
195
  readonly type?: InputMaybe<Scalars["String"]["input"]>;
@@ -180,10 +206,16 @@ declare enum SyncEnvelopeType {
180
206
  Ack = "ACK",
181
207
  Operations = "OPERATIONS"
182
208
  }
209
+ type SyncRefusalInput = {
210
+ readonly branch: Scalars["String"]["input"];
211
+ readonly documentId: Scalars["String"]["input"];
212
+ readonly kind?: InputMaybe<Scalars["String"]["input"]>;
213
+ };
183
214
  type TouchChannelInput = {
184
215
  readonly collectionId: Scalars["String"]["input"];
185
216
  readonly filter: RemoteFilterInput;
186
217
  readonly id: Scalars["String"]["input"];
218
+ readonly manifest?: InputMaybe<Scalars["JSONObject"]["input"]>;
187
219
  readonly name: Scalars["String"]["input"];
188
220
  readonly sinceTimestampUtcMs: Scalars["String"]["input"];
189
221
  };
@@ -196,6 +228,8 @@ type PhDocumentFieldsFragment = {
196
228
  readonly slug?: string | null | undefined;
197
229
  readonly name: string;
198
230
  readonly documentType: string;
231
+ readonly meta?: NonNullable<unknown> | null | undefined;
232
+ readonly protocolVersions?: NonNullable<unknown> | null | undefined;
199
233
  readonly state: NonNullable<unknown>;
200
234
  readonly createdAtUtcIso: string | Date;
201
235
  readonly lastModifiedAtUtcIso: string | Date;
@@ -210,7 +244,6 @@ type GetDocumentModelsQueryVariables = Exact<{
210
244
  }>;
211
245
  type GetDocumentModelsQuery = {
212
246
  readonly documentModels: {
213
- readonly totalCount: number;
214
247
  readonly hasNextPage: boolean;
215
248
  readonly hasPreviousPage: boolean;
216
249
  readonly cursor?: string | null | undefined;
@@ -235,6 +268,8 @@ type GetDocumentQuery = {
235
268
  readonly slug?: string | null | undefined;
236
269
  readonly name: string;
237
270
  readonly documentType: string;
271
+ readonly meta?: NonNullable<unknown> | null | undefined;
272
+ readonly protocolVersions?: NonNullable<unknown> | null | undefined;
238
273
  readonly state: NonNullable<unknown>;
239
274
  readonly createdAtUtcIso: string | Date;
240
275
  readonly lastModifiedAtUtcIso: string | Date;
@@ -259,11 +294,12 @@ type GetDocumentWithOperationsQuery = {
259
294
  readonly slug?: string | null | undefined;
260
295
  readonly name: string;
261
296
  readonly documentType: string;
297
+ readonly meta?: NonNullable<unknown> | null | undefined;
298
+ readonly protocolVersions?: NonNullable<unknown> | null | undefined;
262
299
  readonly state: NonNullable<unknown>;
263
300
  readonly createdAtUtcIso: string | Date;
264
301
  readonly lastModifiedAtUtcIso: string | Date;
265
302
  readonly operations?: {
266
- readonly totalCount: number;
267
303
  readonly hasNextPage: boolean;
268
304
  readonly hasPreviousPage: boolean;
269
305
  readonly cursor?: string | null | undefined;
@@ -313,7 +349,6 @@ type GetDocumentOutgoingRelationshipsQueryVariables = Exact<{
313
349
  }>;
314
350
  type GetDocumentOutgoingRelationshipsQuery = {
315
351
  readonly documentOutgoingRelationships: {
316
- readonly totalCount: number;
317
352
  readonly hasNextPage: boolean;
318
353
  readonly hasPreviousPage: boolean;
319
354
  readonly cursor?: string | null | undefined;
@@ -322,6 +357,8 @@ type GetDocumentOutgoingRelationshipsQuery = {
322
357
  readonly slug?: string | null | undefined;
323
358
  readonly name: string;
324
359
  readonly documentType: string;
360
+ readonly meta?: NonNullable<unknown> | null | undefined;
361
+ readonly protocolVersions?: NonNullable<unknown> | null | undefined;
325
362
  readonly state: NonNullable<unknown>;
326
363
  readonly createdAtUtcIso: string | Date;
327
364
  readonly lastModifiedAtUtcIso: string | Date;
@@ -340,7 +377,6 @@ type GetDocumentIncomingRelationshipsQueryVariables = Exact<{
340
377
  }>;
341
378
  type GetDocumentIncomingRelationshipsQuery = {
342
379
  readonly documentIncomingRelationships: {
343
- readonly totalCount: number;
344
380
  readonly hasNextPage: boolean;
345
381
  readonly hasPreviousPage: boolean;
346
382
  readonly cursor?: string | null | undefined;
@@ -349,6 +385,8 @@ type GetDocumentIncomingRelationshipsQuery = {
349
385
  readonly slug?: string | null | undefined;
350
386
  readonly name: string;
351
387
  readonly documentType: string;
388
+ readonly meta?: NonNullable<unknown> | null | undefined;
389
+ readonly protocolVersions?: NonNullable<unknown> | null | undefined;
352
390
  readonly state: NonNullable<unknown>;
353
391
  readonly createdAtUtcIso: string | Date;
354
392
  readonly lastModifiedAtUtcIso: string | Date;
@@ -359,6 +397,48 @@ type GetDocumentIncomingRelationshipsQuery = {
359
397
  }>;
360
398
  };
361
399
  };
400
+ type GetDocumentOutgoingRelationshipEdgesQueryVariables = Exact<{
401
+ sourceIdentifier: Scalars["String"]["input"];
402
+ relationshipType?: InputMaybe<Scalars["String"]["input"]>;
403
+ view?: InputMaybe<ViewFilterInput>;
404
+ paging?: InputMaybe<PagingInput>;
405
+ }>;
406
+ type GetDocumentOutgoingRelationshipEdgesQuery = {
407
+ readonly documentOutgoingRelationshipEdges: {
408
+ readonly hasNextPage: boolean;
409
+ readonly hasPreviousPage: boolean;
410
+ readonly cursor?: string | null | undefined;
411
+ readonly items: ReadonlyArray<{
412
+ readonly sourceId: string;
413
+ readonly targetId: string;
414
+ readonly relationshipType: string;
415
+ readonly metadata?: NonNullable<unknown> | null | undefined;
416
+ readonly createdAt: string | Date;
417
+ readonly updatedAt: string | Date;
418
+ }>;
419
+ };
420
+ };
421
+ type GetDocumentIncomingRelationshipEdgesQueryVariables = Exact<{
422
+ targetIdentifier: Scalars["String"]["input"];
423
+ relationshipType?: InputMaybe<Scalars["String"]["input"]>;
424
+ view?: InputMaybe<ViewFilterInput>;
425
+ paging?: InputMaybe<PagingInput>;
426
+ }>;
427
+ type GetDocumentIncomingRelationshipEdgesQuery = {
428
+ readonly documentIncomingRelationshipEdges: {
429
+ readonly hasNextPage: boolean;
430
+ readonly hasPreviousPage: boolean;
431
+ readonly cursor?: string | null | undefined;
432
+ readonly items: ReadonlyArray<{
433
+ readonly sourceId: string;
434
+ readonly targetId: string;
435
+ readonly relationshipType: string;
436
+ readonly metadata?: NonNullable<unknown> | null | undefined;
437
+ readonly createdAt: string | Date;
438
+ readonly updatedAt: string | Date;
439
+ }>;
440
+ };
441
+ };
362
442
  type FindDocumentsQueryVariables = Exact<{
363
443
  search?: InputMaybe<SearchFilterInput>;
364
444
  view?: InputMaybe<ViewFilterInput>;
@@ -366,7 +446,6 @@ type FindDocumentsQueryVariables = Exact<{
366
446
  }>;
367
447
  type FindDocumentsQuery = {
368
448
  readonly findDocuments: {
369
- readonly totalCount: number;
370
449
  readonly hasNextPage: boolean;
371
450
  readonly hasPreviousPage: boolean;
372
451
  readonly cursor?: string | null | undefined;
@@ -375,6 +454,8 @@ type FindDocumentsQuery = {
375
454
  readonly slug?: string | null | undefined;
376
455
  readonly name: string;
377
456
  readonly documentType: string;
457
+ readonly meta?: NonNullable<unknown> | null | undefined;
458
+ readonly protocolVersions?: NonNullable<unknown> | null | undefined;
378
459
  readonly state: NonNullable<unknown>;
379
460
  readonly createdAtUtcIso: string | Date;
380
461
  readonly lastModifiedAtUtcIso: string | Date;
@@ -391,7 +472,6 @@ type GetDocumentOperationsQueryVariables = Exact<{
391
472
  }>;
392
473
  type GetDocumentOperationsQuery = {
393
474
  readonly documentOperations: {
394
- readonly totalCount: number;
395
475
  readonly hasNextPage: boolean;
396
476
  readonly hasPreviousPage: boolean;
397
477
  readonly cursor?: string | null | undefined;
@@ -433,13 +513,45 @@ type GetJobStatusQueryVariables = Exact<{
433
513
  type GetJobStatusQuery = {
434
514
  readonly jobStatus?: {
435
515
  readonly id: string;
516
+ readonly documentId: string;
436
517
  readonly status: string;
437
518
  readonly result?: NonNullable<unknown> | null | undefined;
438
519
  readonly error?: string | null | undefined;
520
+ readonly errorName?: string | null | undefined;
439
521
  readonly createdAt: string | Date;
440
522
  readonly completedAt?: string | Date | null | undefined;
523
+ readonly consistencyToken: {
524
+ readonly version: number;
525
+ readonly createdAtUtcIso: string;
526
+ readonly coordinates: ReadonlyArray<{
527
+ readonly documentId: string;
528
+ readonly scope: string;
529
+ readonly branch: string;
530
+ readonly operationIndex: number;
531
+ }>;
532
+ };
533
+ readonly meta: {
534
+ readonly batchId: string;
535
+ readonly batchJobIds: ReadonlyArray<string>;
536
+ };
441
537
  } | null | undefined;
442
538
  };
539
+ type GetDocumentServedQueryVariables = Exact<{
540
+ idOrSlug: Scalars["String"]["input"];
541
+ view?: InputMaybe<ViewFilterInput>;
542
+ }>;
543
+ type GetDocumentServedQuery = {
544
+ readonly documentServed: boolean;
545
+ };
546
+ type GetCreateDefaultsQueryVariables = Exact<{
547
+ parentIdOrSlug?: InputMaybe<Scalars["String"]["input"]>;
548
+ }>;
549
+ type GetCreateDefaultsQuery = {
550
+ readonly createDefaults: {
551
+ readonly signaturePolicy: string;
552
+ readonly protocolVersions: NonNullable<unknown>;
553
+ };
554
+ };
443
555
  type EvaluateActionsQueryVariables = Exact<{
444
556
  documentIdentifier: Scalars["String"]["input"];
445
557
  branch?: InputMaybe<Scalars["String"]["input"]>;
@@ -467,6 +579,8 @@ type CreateDocumentMutation = {
467
579
  readonly slug?: string | null | undefined;
468
580
  readonly name: string;
469
581
  readonly documentType: string;
582
+ readonly meta?: NonNullable<unknown> | null | undefined;
583
+ readonly protocolVersions?: NonNullable<unknown> | null | undefined;
470
584
  readonly state: NonNullable<unknown>;
471
585
  readonly createdAtUtcIso: string | Date;
472
586
  readonly lastModifiedAtUtcIso: string | Date;
@@ -486,6 +600,8 @@ type CreateEmptyDocumentMutation = {
486
600
  readonly slug?: string | null | undefined;
487
601
  readonly name: string;
488
602
  readonly documentType: string;
603
+ readonly meta?: NonNullable<unknown> | null | undefined;
604
+ readonly protocolVersions?: NonNullable<unknown> | null | undefined;
489
605
  readonly state: NonNullable<unknown>;
490
606
  readonly createdAtUtcIso: string | Date;
491
607
  readonly lastModifiedAtUtcIso: string | Date;
@@ -506,6 +622,8 @@ type MutateDocumentMutation = {
506
622
  readonly slug?: string | null | undefined;
507
623
  readonly name: string;
508
624
  readonly documentType: string;
625
+ readonly meta?: NonNullable<unknown> | null | undefined;
626
+ readonly protocolVersions?: NonNullable<unknown> | null | undefined;
509
627
  readonly state: NonNullable<unknown>;
510
628
  readonly createdAtUtcIso: string | Date;
511
629
  readonly lastModifiedAtUtcIso: string | Date;
@@ -523,11 +641,61 @@ type MutateDocumentAsyncMutationVariables = Exact<{
523
641
  type MutateDocumentAsyncMutation = {
524
642
  readonly mutateDocumentAsync: {
525
643
  readonly id: string;
644
+ readonly documentId: string;
526
645
  readonly status: string;
527
646
  readonly result?: NonNullable<unknown> | null | undefined;
528
647
  readonly error?: string | null | undefined;
648
+ readonly errorName?: string | null | undefined;
529
649
  readonly createdAt: string | Date;
530
650
  readonly completedAt?: string | Date | null | undefined;
651
+ readonly consistencyToken: {
652
+ readonly version: number;
653
+ readonly createdAtUtcIso: string;
654
+ readonly coordinates: ReadonlyArray<{
655
+ readonly documentId: string;
656
+ readonly scope: string;
657
+ readonly branch: string;
658
+ readonly operationIndex: number;
659
+ }>;
660
+ };
661
+ readonly meta: {
662
+ readonly batchId: string;
663
+ readonly batchJobIds: ReadonlyArray<string>;
664
+ };
665
+ };
666
+ };
667
+ type ExecuteBatchMutationVariables = Exact<{
668
+ jobs: ReadonlyArray<ExecutionJobInput>;
669
+ }>;
670
+ type ExecuteBatchMutation = {
671
+ readonly executeBatch: {
672
+ readonly jobs: ReadonlyArray<{
673
+ readonly key: string;
674
+ readonly job: {
675
+ readonly id: string;
676
+ readonly documentId: string;
677
+ readonly status: string;
678
+ readonly result?: NonNullable<unknown> | null | undefined;
679
+ readonly error?: string | null | undefined;
680
+ readonly errorName?: string | null | undefined;
681
+ readonly createdAt: string | Date;
682
+ readonly completedAt?: string | Date | null | undefined;
683
+ readonly consistencyToken: {
684
+ readonly version: number;
685
+ readonly createdAtUtcIso: string;
686
+ readonly coordinates: ReadonlyArray<{
687
+ readonly documentId: string;
688
+ readonly scope: string;
689
+ readonly branch: string;
690
+ readonly operationIndex: number;
691
+ }>;
692
+ };
693
+ readonly meta: {
694
+ readonly batchId: string;
695
+ readonly batchJobIds: ReadonlyArray<string>;
696
+ };
697
+ };
698
+ }>;
531
699
  };
532
700
  };
533
701
  type RenameDocumentMutationVariables = Exact<{
@@ -541,6 +709,8 @@ type RenameDocumentMutation = {
541
709
  readonly slug?: string | null | undefined;
542
710
  readonly name: string;
543
711
  readonly documentType: string;
712
+ readonly meta?: NonNullable<unknown> | null | undefined;
713
+ readonly protocolVersions?: NonNullable<unknown> | null | undefined;
544
714
  readonly state: NonNullable<unknown>;
545
715
  readonly createdAtUtcIso: string | Date;
546
716
  readonly lastModifiedAtUtcIso: string | Date;
@@ -561,6 +731,8 @@ type SetPreferredEditorMutation = {
561
731
  readonly slug?: string | null | undefined;
562
732
  readonly name: string;
563
733
  readonly documentType: string;
734
+ readonly meta?: NonNullable<unknown> | null | undefined;
735
+ readonly protocolVersions?: NonNullable<unknown> | null | undefined;
564
736
  readonly state: NonNullable<unknown>;
565
737
  readonly createdAtUtcIso: string | Date;
566
738
  readonly lastModifiedAtUtcIso: string | Date;
@@ -574,6 +746,7 @@ type AddRelationshipMutationVariables = Exact<{
574
746
  sourceIdentifier: Scalars["String"]["input"];
575
747
  targetIdentifier: Scalars["String"]["input"];
576
748
  relationshipType: Scalars["String"]["input"];
749
+ metadata?: InputMaybe<Scalars["JSONObject"]["input"]>;
577
750
  branch?: InputMaybe<Scalars["String"]["input"]>;
578
751
  }>;
579
752
  type AddRelationshipMutation = {
@@ -582,6 +755,32 @@ type AddRelationshipMutation = {
582
755
  readonly slug?: string | null | undefined;
583
756
  readonly name: string;
584
757
  readonly documentType: string;
758
+ readonly meta?: NonNullable<unknown> | null | undefined;
759
+ readonly protocolVersions?: NonNullable<unknown> | null | undefined;
760
+ readonly state: NonNullable<unknown>;
761
+ readonly createdAtUtcIso: string | Date;
762
+ readonly lastModifiedAtUtcIso: string | Date;
763
+ readonly revisionsList: ReadonlyArray<{
764
+ readonly scope: string;
765
+ readonly revision: number;
766
+ }>;
767
+ };
768
+ };
769
+ type UpdateRelationshipMutationVariables = Exact<{
770
+ sourceIdentifier: Scalars["String"]["input"];
771
+ targetIdentifier: Scalars["String"]["input"];
772
+ relationshipType: Scalars["String"]["input"];
773
+ metadata?: InputMaybe<Scalars["JSONObject"]["input"]>;
774
+ branch?: InputMaybe<Scalars["String"]["input"]>;
775
+ }>;
776
+ type UpdateRelationshipMutation = {
777
+ readonly updateRelationship: {
778
+ readonly id: string;
779
+ readonly slug?: string | null | undefined;
780
+ readonly name: string;
781
+ readonly documentType: string;
782
+ readonly meta?: NonNullable<unknown> | null | undefined;
783
+ readonly protocolVersions?: NonNullable<unknown> | null | undefined;
585
784
  readonly state: NonNullable<unknown>;
586
785
  readonly createdAtUtcIso: string | Date;
587
786
  readonly lastModifiedAtUtcIso: string | Date;
@@ -603,6 +802,8 @@ type RemoveRelationshipMutation = {
603
802
  readonly slug?: string | null | undefined;
604
803
  readonly name: string;
605
804
  readonly documentType: string;
805
+ readonly meta?: NonNullable<unknown> | null | undefined;
806
+ readonly protocolVersions?: NonNullable<unknown> | null | undefined;
606
807
  readonly state: NonNullable<unknown>;
607
808
  readonly createdAtUtcIso: string | Date;
608
809
  readonly lastModifiedAtUtcIso: string | Date;
@@ -626,6 +827,8 @@ type MoveRelationshipMutation = {
626
827
  readonly slug?: string | null | undefined;
627
828
  readonly name: string;
628
829
  readonly documentType: string;
830
+ readonly meta?: NonNullable<unknown> | null | undefined;
831
+ readonly protocolVersions?: NonNullable<unknown> | null | undefined;
629
832
  readonly state: NonNullable<unknown>;
630
833
  readonly createdAtUtcIso: string | Date;
631
834
  readonly lastModifiedAtUtcIso: string | Date;
@@ -639,6 +842,8 @@ type MoveRelationshipMutation = {
639
842
  readonly slug?: string | null | undefined;
640
843
  readonly name: string;
641
844
  readonly documentType: string;
845
+ readonly meta?: NonNullable<unknown> | null | undefined;
846
+ readonly protocolVersions?: NonNullable<unknown> | null | undefined;
642
847
  readonly state: NonNullable<unknown>;
643
848
  readonly createdAtUtcIso: string | Date;
644
849
  readonly lastModifiedAtUtcIso: string | Date;
@@ -675,6 +880,8 @@ type DocumentChangesSubscription = {
675
880
  readonly slug?: string | null | undefined;
676
881
  readonly name: string;
677
882
  readonly documentType: string;
883
+ readonly meta?: NonNullable<unknown> | null | undefined;
884
+ readonly protocolVersions?: NonNullable<unknown> | null | undefined;
678
885
  readonly state: NonNullable<unknown>;
679
886
  readonly createdAtUtcIso: string | Date;
680
887
  readonly lastModifiedAtUtcIso: string | Date;
@@ -696,7 +903,7 @@ type JobChangesSubscription = {
696
903
  readonly jobChanges: {
697
904
  readonly jobId: string;
698
905
  readonly status: string;
699
- readonly result: NonNullable<unknown>;
906
+ readonly result?: NonNullable<unknown> | null | undefined;
700
907
  readonly error?: string | null | undefined;
701
908
  };
702
909
  };
@@ -704,11 +911,15 @@ type PollSyncEnvelopesQueryVariables = Exact<{
704
911
  channelId: Scalars["String"]["input"];
705
912
  outboxAck: Scalars["Int"]["input"];
706
913
  outboxLatest: Scalars["Int"]["input"];
914
+ manifestRevision?: InputMaybe<Scalars["String"]["input"]>;
915
+ refusals?: InputMaybe<ReadonlyArray<SyncRefusalInput>>;
707
916
  }>;
708
917
  type PollSyncEnvelopesQuery = {
709
918
  readonly pollSyncEnvelopes: {
710
919
  readonly ackOrdinal: number;
711
920
  readonly hasMore: boolean;
921
+ readonly manifestRevision?: string | null | undefined;
922
+ readonly peerManifestRevision?: string | null | undefined;
712
923
  readonly envelopes: ReadonlyArray<{
713
924
  readonly type: SyncEnvelopeType;
714
925
  readonly key?: string | null | undefined;
@@ -774,10 +985,12 @@ type TouchChannelMutation = {
774
985
  readonly touchChannel: {
775
986
  readonly success: boolean;
776
987
  readonly ackOrdinal: number;
988
+ readonly manifest?: NonNullable<unknown> | null | undefined;
777
989
  };
778
990
  };
779
991
  type PushSyncEnvelopesMutationVariables = Exact<{
780
992
  envelopes: ReadonlyArray<SyncEnvelopeInput>;
993
+ peerManifestRevision?: InputMaybe<Scalars["String"]["input"]>;
781
994
  }>;
782
995
  type PushSyncEnvelopesMutation = {
783
996
  readonly pushSyncEnvelopes: boolean;
@@ -789,17 +1002,23 @@ declare function getSdk(client: GraphQLClient, withWrapper?: SdkFunctionWrapper)
789
1002
  GetDocumentWithOperations(variables: GetDocumentWithOperationsQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<GetDocumentWithOperationsQuery>;
790
1003
  GetDocumentOutgoingRelationships(variables: GetDocumentOutgoingRelationshipsQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<GetDocumentOutgoingRelationshipsQuery>;
791
1004
  GetDocumentIncomingRelationships(variables: GetDocumentIncomingRelationshipsQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<GetDocumentIncomingRelationshipsQuery>;
1005
+ GetDocumentOutgoingRelationshipEdges(variables: GetDocumentOutgoingRelationshipEdgesQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<GetDocumentOutgoingRelationshipEdgesQuery>;
1006
+ GetDocumentIncomingRelationshipEdges(variables: GetDocumentIncomingRelationshipEdgesQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<GetDocumentIncomingRelationshipEdgesQuery>;
792
1007
  FindDocuments(variables?: FindDocumentsQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<FindDocumentsQuery>;
793
1008
  GetDocumentOperations(variables: GetDocumentOperationsQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<GetDocumentOperationsQuery>;
794
1009
  GetJobStatus(variables: GetJobStatusQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<GetJobStatusQuery>;
1010
+ GetDocumentServed(variables: GetDocumentServedQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<GetDocumentServedQuery>;
1011
+ GetCreateDefaults(variables?: GetCreateDefaultsQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<GetCreateDefaultsQuery>;
795
1012
  EvaluateActions(variables: EvaluateActionsQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<EvaluateActionsQuery>;
796
1013
  CreateDocument(variables: CreateDocumentMutationVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<CreateDocumentMutation>;
797
1014
  CreateEmptyDocument(variables: CreateEmptyDocumentMutationVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<CreateEmptyDocumentMutation>;
798
1015
  MutateDocument(variables: MutateDocumentMutationVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<MutateDocumentMutation>;
799
1016
  MutateDocumentAsync(variables: MutateDocumentAsyncMutationVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<MutateDocumentAsyncMutation>;
1017
+ ExecuteBatch(variables: ExecuteBatchMutationVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<ExecuteBatchMutation>;
800
1018
  RenameDocument(variables: RenameDocumentMutationVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<RenameDocumentMutation>;
801
1019
  SetPreferredEditor(variables: SetPreferredEditorMutationVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<SetPreferredEditorMutation>;
802
1020
  AddRelationship(variables: AddRelationshipMutationVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<AddRelationshipMutation>;
1021
+ UpdateRelationship(variables: UpdateRelationshipMutationVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<UpdateRelationshipMutation>;
803
1022
  RemoveRelationship(variables: RemoveRelationshipMutationVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<RemoveRelationshipMutation>;
804
1023
  MoveRelationship(variables: MoveRelationshipMutationVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<MoveRelationshipMutation>;
805
1024
  DeleteDocument(variables: DeleteDocumentMutationVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<DeleteDocumentMutation>;
@@ -824,8 +1043,11 @@ type DocumentOperationsPage = GetDocumentOperationsQuery["documentOperations"];
824
1043
  type DocumentResult = NonNullable<GetDocumentQuery["document"]>;
825
1044
  /** Arguments for running a hand-authored GraphQL document through the SDK. */
826
1045
  type RunDocumentOptions = {
827
- /** Operation name reported to the middleware (auth, logging, tracing). */operationName: string; /** Operation type reported to the middleware. Defaults to `"query"`. */
828
- operationType?: string; /** The document to run: a source string or a parsed `DocumentNode`. */
1046
+ /** Operation name reported to the middleware (auth, logging, tracing). */
1047
+ operationName: string;
1048
+ /** Operation type reported to the middleware. Defaults to `"query"`. */
1049
+ operationType?: string;
1050
+ /** The document to run: a source string or a parsed `DocumentNode`. */
829
1051
  document: RequestDocument;
830
1052
  variables?: Variables;
831
1053
  requestHeaders?: Record<string, string>;
@@ -838,8 +1060,10 @@ type ReactorGraphQLClient = Sdk & {
838
1060
  * generator cannot express, such as a mutation that also returns the
839
1061
  * operations it produced.
840
1062
  */
841
- RunDocument: <TData>(options: RunDocumentOptions) => Promise<TData>; /** Fetch multiple documentOperations in a single request via aliases. */
842
- BatchGetDocumentOperations?: (filters: OperationsFilterInput[], pagings: (PagingInput | undefined | null)[]) => Promise<DocumentOperationsPage[]>; /** Fetch a document and multiple documentOperations in a single request. */
1063
+ RunDocument: <TData>(options: RunDocumentOptions) => Promise<TData>;
1064
+ /** Fetch multiple documentOperations in a single request via aliases. */
1065
+ BatchGetDocumentOperations?: (filters: OperationsFilterInput[], pagings: (PagingInput | undefined | null)[]) => Promise<DocumentOperationsPage[]>;
1066
+ /** Fetch a document and multiple documentOperations in a single request. */
843
1067
  BatchGetDocumentWithOperations?: (identifier: string, view: ViewFilterInput | undefined, filters: OperationsFilterInput[], pagings: (PagingInput | undefined)[]) => Promise<{
844
1068
  document: DocumentResult | null;
845
1069
  operations: DocumentOperationsPage[];
@@ -861,4 +1085,5 @@ type TStateSchemaZodObject = z.ZodObject<{
861
1085
  }>;
862
1086
  //#endregion
863
1087
  export { ViewFilterInput as A, GetDocumentQuery as C, PropagationMode as D, PhDocumentFieldsFragment as E, Scalars as O, GetDocumentOperationsQuery as S, MutateDocumentMutation as T, CreateDocumentMutation as _, GraphQLDocumentEvents as a, DocumentChangesSubscription as b, ReactorGraphQLClient as c, DEFAULT_DRIVE_ID as d, DEFAULT_SWITCHBOARD_URL as f, ActionInput as g, graphqlEventsToSyncDrive as h, GraphQLDocumentEventOperationName as i, SdkFunctionWrapper as k, RunDocumentOptions as l, graphqlDocumentsEvents as m, GraphQLClientDocumentsEvent as n, GraphQLDocumentEventsOperationName as o, graphqlDocumentEvents as p, GraphQLClientWindowEvents as r, GraphQLDocumentsEvents as s, GraphQLClientDocumentEvent as t, TStateSchemaZodObject as u, DeleteDocumentMutation as v, GetDocumentWithOperationsQuery as w, FindDocumentsQuery as x, DeleteDocumentsMutation as y };
864
- //# sourceMappingURL=types-Dcv1ZLoW.d.ts.map
1088
+ export {};
1089
+ //# sourceMappingURL=types-0Fh1tNjy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-0Fh1tNjy.d.ts","names":[],"sources":["../src/graphql/gen/schema.ts","../src/graphql/constants.ts","../src/graphql/types.ts"],"mappings":";;;KAGY,WAAW,KAAK;KAChB,MAAM;GAAa;QAC5B,WAAW,IAAI,EAAE;KAiBf,8BAA8B;;KAEvB;EACV;IAAM;IAAe;;EACrB;IAAU;IAAe;;EACzB;IAAW;IAAgB;;EAC3B;IAAO;IAAe;;EACtB;IAAS;IAAe;;EACxB;IAAY,gBAAgB;IAAM,iBAAiB;;EACnD;IAAc,OAAO;IAAsB,QAAQ;;;;;;;;;;KAmBzC;WACD,QAAQ,WAAW;WACnB,OAAO;WACP,MAAM;;;;;;;;;;;;;;KAmBL;;WAED,QAAQ,WAAW;;WAEnB,aAAa,WAAW;;WAExB,cAAc,WAAW;WACzB,SAAS,WAAW;;KA6BnB;WACD,UAAU,WAAW;WACrB,IAAI;WACJ,OAAO;WACP,OAAO;WACP,gBAAgB;WAChB,MAAM;;aAGL;EACV;EACA;;KA6BU;WACD,IAAI;;aAmDH;EACV;EACA;EACA;EACA;EACA;EACA;EACA;;KAkBU;WACD,cAAc,WAAW,cAAc;WACvC,SAAS,WAAW;WACpB,SAAS,WAAW,cAAc;WAClC,gBAAgB,WAAW;WAC3B,gBAAgB,WAAW;WAC3B,cAAc,WAAW;;;;;;;;;;;;;;;KAqCxB;WACD,SAAS,cAAc;WACvB,SAAS,WAAW;WACpB,WAAW,cAAc;WACzB,kBAAkB;WAClB,KAAK;WACL,OAAO;;KA2ON;WACD,QAAQ;WACR,YAAY;WACZ,cAAc;WACd,SAAS;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A2B,SACnC,wBACR,QAAQ;EAcX,gBAAe,WACF,kCAAgC,iBAC1B,6BAA2B,SACnC,wBACR,QAAQ;EAcX,gBAAe,YACD,sCAAoC,iBAC/B,6BAA2B,SACnC,wBACR,QAAQ;EAcX,WAAU,WACG,iCAA+B,iBACzB,6BAA2B,SACnC,wBACR,QAAQ;EAcX,kBAAiB,WACJ,iCAA+B,iBACzB,6BAA2B,SACnC,wBACR,QAAQ;EAcX,aAAY,WACC,+BAA6B,iBACvB,6BAA2B,SACnC,wBACR,QAAQ;EAcX,kBAAiB,WACJ,oCAAkC,iBAC5B,6BAA2B,SACnC,wBACR,QAAQ;;KAgBH,MAAM,kBAAkB;;;cCl/FvB;cACA;cACA;cAUA;cAMA;;;KCHR,yBAAyB;KAEzB,iBAAiB,YAAY;;KAGtB;;EAEV;;EAGA;;EAGA,UAAU;EAEV,YAAY;EACZ,iBAAiB;EACjB,SAAS;;KAGC,uBAAuB;;;;;;;EAOjC,cAAc,OAAO,SAAS,uBAAuB,QAAQ;;EAG7D,8BACE,SAAS,yBACT,UAAU,sCACP,QAAQ;;EAGb,kCACE,oBACA,MAAM,6BACN,SAAS,yBACT,UAAU,+BACP;IACH,UAAU;IACV,YAAY;;;KAIJ,6BAA6B;EACvC;;KAGU,8BAA8B;EACxC;;KAGU,4CACF;KAEE,6CACF;KAEE,wBAAwB,OAClC,mCACA;KAGU,yBAAyB,OACnC,oCACA;KAGU,4BAA4B,wBACtC;KAEU,wBAAwB,EAAE;EACpC,OAAO,EAAE"}
@@ -1,6 +1,5 @@
1
1
  import { BrowserAnalyticsStore, BrowserAnalyticsStoreOptions } from "@powerhousedao/analytics-engine-browser";
2
2
  import { AnalyticsQueryEngine, IAnalyticsStore } from "@powerhousedao/analytics-engine-core";
3
-
4
3
  //#region src/analytics/store.d.ts
5
4
  type CreateStoreOptions = BrowserAnalyticsStoreOptions;
6
5
  declare function createAnalyticsStore(options: CreateStoreOptions): Promise<{
@@ -19,4 +18,5 @@ type IPowerhouseAnalytics = {
19
18
  };
20
19
  //#endregion
21
20
  export { getAnalyticsStore as a, createAnalyticsStore as i, IPowerhouseAnalytics as n, CreateStoreOptions as r, IAnalyticsStoreOptions as t };
22
- //# sourceMappingURL=types-6vDzbRRS.d.ts.map
21
+ export {};
22
+ //# sourceMappingURL=types-520nWrB3.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-520nWrB3.d.ts","names":[],"sources":["../src/analytics/store.ts","../src/analytics/types.ts"],"mappings":";;;KAMY,qBAAqB;iBAEX,qBAAqB,SAAS,qBAAkB;;;;;iBAYhD,qBAAqB,QAAQ;;;KCfvC,yBAAyB;KAEzB;EACV,OAAO;EACP,QAAQ;EACR,SAAS"}