import * as document_model0 from "document-model"; import { Action, DocumentModelGlobalState, DocumentModelUtils, PHAuthState, PHBaseState, PHDocument, PHDocumentController, PHDocumentState, Reducer, SignalDispatch } from "document-model"; import * as z$1 from "zod"; import { z } from "zod"; import { DocumentDispatch } from "@powerhousedao/reactor-browser"; //#region document-models/subgraph-module/v1/gen/schema/types.d.ts type Maybe = T | null | undefined; type InputMaybe = T | null | undefined; type Exact = { [K in keyof T]: T[K] }; type MakeOptional = Omit & { [SubKey in K]?: Maybe }; type MakeMaybe = Omit & { [SubKey in K]: Maybe }; type MakeEmpty = { [_ in K]?: never }; type Incremental = T | { [P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never }; /** All built-in and custom scalars, mapped to their actual values */ type Scalars = { ID: { input: string; output: string; }; String: { input: string; output: string; }; Boolean: { input: boolean; output: boolean; }; Int: { input: number; output: number; }; Float: { input: number; output: number; }; Address: { input: `${string}:0x${string}`; output: `${string}:0x${string}`; }; Amount: { input: { unit?: string; value?: number; }; output: { unit?: string; value?: number; }; }; Amount_Crypto: { input: { unit: string; value: string; }; output: { unit: string; value: string; }; }; Amount_Currency: { input: { unit: string; value: string; }; output: { unit: string; value: string; }; }; Amount_Fiat: { input: { unit: string; value: number; }; output: { unit: string; value: number; }; }; Amount_Money: { input: number; output: number; }; Amount_Percentage: { input: number; output: number; }; Amount_Tokens: { input: number; output: number; }; AttachmentRef: { input: `attachment://v${number}:${string}`; output: `attachment://v${number}:${string}`; }; Currency: { input: string; output: string; }; Date: { input: string; output: string; }; DateTime: { input: string; output: string; }; EmailAddress: { input: string; output: string; }; EthereumAddress: { input: string; output: string; }; OID: { input: string; output: string; }; OLabel: { input: string; output: string; }; PHID: { input: string; output: string; }; URL: { input: string; output: string; }; Unknown: { input: unknown; output: unknown; }; Upload: { input: File; output: File; }; }; type SetSubgraphNameInput = { name: Scalars["String"]["input"]; }; type SetSubgraphStatusInput = { status: StatusType; }; /** * Lifecycle status of a module definition. * - DRAFT: still being edited; codegen does not run. * - CONFIRMED: locked in; codegen produces the corresponding scaffold. */ type StatusType = "CONFIRMED" | "DRAFT"; /** * Configuration for a GraphQL subgraph contributed by the package. The subgraph * is served by Switchboard and stitched into the unified Powerhouse API. */ type SubgraphModuleState = { /** Display name of the subgraph. Also determines the generated folder name under `subgraphs/` and the route segment Switchboard mounts it at. */name: Scalars["String"]["output"]; /** Lifecycle status. While DRAFT the subgraph definition is editable and codegen is skipped; switching to CONFIRMED triggers scaffold generation. */ status: StatusType; }; //#endregion //#region document-models/subgraph-module/v1/gen/types.d.ts type SubgraphModuleLocalState = Record; type SubgraphModulePHState = PHBaseState & { global: SubgraphModuleState; local: SubgraphModuleLocalState; }; type SubgraphModuleDocument = PHDocument; //#endregion //#region document-models/subgraph-module/v1/gen/base-operations/actions.d.ts type SetSubgraphNameAction = Action & { type: "SET_SUBGRAPH_NAME"; input: SetSubgraphNameInput; }; type SetSubgraphStatusAction = Action & { type: "SET_SUBGRAPH_STATUS"; input: SetSubgraphStatusInput; }; type SubgraphModuleBaseOperationsAction = SetSubgraphNameAction | SetSubgraphStatusAction; //#endregion //#region document-models/subgraph-module/v1/gen/actions.d.ts type SubgraphModuleAction = SubgraphModuleBaseOperationsAction; //#endregion //#region document-models/subgraph-module/v1/gen/base-operations/operations.d.ts interface SubgraphModuleBaseOperationsOperations { setSubgraphNameOperation: (state: SubgraphModuleState, action: SetSubgraphNameAction, dispatch?: SignalDispatch) => void; setSubgraphStatusOperation: (state: SubgraphModuleState, action: SetSubgraphStatusAction, dispatch?: SignalDispatch) => void; } //#endregion //#region document-models/subgraph-module/v1/gen/controller.d.ts declare const SubgraphModuleController: new (initialDocument?: document_model0.PHDocument | undefined) => PHDocumentController & document_model0.ActionMap>; declare namespace creators_d_exports { export { setSubgraphName, setSubgraphStatus }; } declare const setSubgraphName: (input: SetSubgraphNameInput) => SetSubgraphNameAction; declare const setSubgraphStatus: (input: SetSubgraphStatusInput) => SetSubgraphStatusAction; //#endregion //#region document-models/subgraph-module/v1/gen/document-model.d.ts declare const documentModel: DocumentModelGlobalState; //#endregion //#region document-models/subgraph-module/v1/gen/document-schema.d.ts /** Schema for validating the header object of a SubgraphModule document */ declare const SubgraphModuleDocumentHeaderSchema: z.ZodObject<{ id: z.ZodString; name: z.ZodString; createdAtUtcIso: z.ZodString; lastModifiedAtUtcIso: z.ZodString; documentType: z.ZodLiteral<"powerhouse/subgraph">; }, z.core.$strip>; /** Schema for validating the state object of a SubgraphModule document */ declare const SubgraphModulePHStateSchema: z.ZodObject<{ global: z.ZodObject>; status: z.ZodType>; }>, z.core.$strip>; }, z.core.$strip>; declare const SubgraphModuleDocumentSchema: z.ZodObject<{ header: z.ZodObject<{ id: z.ZodString; name: z.ZodString; createdAtUtcIso: z.ZodString; lastModifiedAtUtcIso: z.ZodString; documentType: z.ZodLiteral<"powerhouse/subgraph">; }, z.core.$strip>; state: z.ZodObject<{ global: z.ZodObject>; status: z.ZodType>; }>, z.core.$strip>; }, z.core.$strip>; initialState: z.ZodObject<{ global: z.ZodObject>; status: z.ZodType>; }>, z.core.$strip>; }, z.core.$strip>; }, z.core.$strip>; /** Simple helper function to check if a state object is a SubgraphModule document state object */ declare function isSubgraphModuleState(state: unknown): state is SubgraphModulePHState; /** Simple helper function to assert that a document state object is a SubgraphModule document state object */ declare function assertIsSubgraphModuleState(state: unknown): asserts state is SubgraphModulePHState; /** Simple helper function to check if a document is a SubgraphModule document */ declare function isSubgraphModuleDocument(document: unknown): document is SubgraphModuleDocument; /** Simple helper function to assert that a document is a SubgraphModule document */ declare function assertIsSubgraphModuleDocument(document: unknown): asserts document is SubgraphModuleDocument; //#endregion //#region document-models/subgraph-module/v1/gen/document-type.d.ts /** * WARNING: DO NOT EDIT * This file is auto-generated and updated by codegen */ declare const subgraphModuleDocumentType = "powerhouse/subgraph"; //#endregion //#region document-models/subgraph-module/v1/gen/ph-factories.d.ts declare function defaultGlobalState(): SubgraphModuleState; declare function defaultLocalState(): SubgraphModuleLocalState; declare function defaultPHState(): SubgraphModulePHState; declare function createState$1(baseState?: Partial, globalState?: Partial, localState?: Partial): SubgraphModulePHState; /** * Creates a SubgraphModuleDocument with custom global and local state * This properly handles the PHBaseState requirements while allowing * document-specific state to be set. */ declare function createSubgraphModuleDocument(state?: Partial<{ auth?: Partial; document?: Partial; global?: Partial; local?: Partial; }>): SubgraphModuleDocument; //#endregion //#region document-models/subgraph-module/v1/actions.d.ts /** Actions for the SubgraphModule document model */ declare const actions: { setSubgraphName: (input: SetSubgraphNameInput) => SetSubgraphNameAction; setSubgraphStatus: (input: SetSubgraphStatusInput) => SetSubgraphStatusAction; setName: (name: string | { name: string; }) => document_model0.SetNameAction; setPreferredEditor: (input: string | null | { preferredEditor: string | null; }) => document_model0.SetPreferredEditorAction; undo: (count?: number, scope?: string) => document_model0.UndoAction; redo: (count?: number, scope?: string) => document_model0.RedoAction; prune: (start?: number, end?: number, scope?: string) => document_model0.SchemaPruneAction; loadState: (state: TState & { name: string; }, operations: number) => document_model0.LoadStateAction; noop: (scope?: string) => document_model0.NOOPAction; }; //#endregion //#region document-models/subgraph-module/v1/hooks.d.ts /** Hook to get a SubgraphModule document by its id */ declare function useSubgraphModuleDocumentById(documentId: string | null | undefined): [SubgraphModuleDocument, DocumentDispatch] | [undefined, undefined]; /** Hook to get the selected SubgraphModule document */ declare function useSelectedSubgraphModuleDocument(): [SubgraphModuleDocument, DocumentDispatch]; /** Hook to get all SubgraphModule documents in the selected drive */ declare function useSubgraphModuleDocumentsInSelectedDrive(): SubgraphModuleDocument[] | undefined; /** Hook to get all SubgraphModule documents in the selected folder */ declare function useSubgraphModuleDocumentsInSelectedFolder(): SubgraphModuleDocument[] | undefined; //#endregion //#region document-models/subgraph-module/v1/module.d.ts /** Document model module for the SubgraphModule document type */ declare const SubgraphModule: { readonly version: 1; readonly reducer: document_model0.Reducer; readonly actions: { setSubgraphName: (input: SetSubgraphNameInput) => SetSubgraphNameAction; setSubgraphStatus: (input: SetSubgraphStatusInput) => SetSubgraphStatusAction; setName: (name: string | { name: string; }) => document_model0.SetNameAction; setPreferredEditor: (input: string | null | { preferredEditor: string | null; }) => document_model0.SetPreferredEditorAction; undo: (count?: number, scope?: string) => document_model0.UndoAction; redo: (count?: number, scope?: string) => document_model0.RedoAction; prune: (start?: number, end?: number, scope?: string) => document_model0.SchemaPruneAction; loadState: (state: TState & { name: string; }, operations: number) => document_model0.LoadStateAction; noop: (scope?: string) => document_model0.NOOPAction; }; readonly utils: document_model0.DocumentModelUtils; readonly documentModel: document_model0.DocumentModelPHState; }; //#endregion //#region document-models/subgraph-module/v1/utils.d.ts /** Utils for the SubgraphModule document model */ declare const utils: DocumentModelUtils; //#endregion //#region document-models/subgraph-module/v1/gen/reducer.d.ts declare const reducer: Reducer; //#endregion //#region document-models/subgraph-module/v1/gen/schema/zod.d.ts type Properties = Required<{ [K in keyof T]: z$1.ZodType }>; type definedNonNullAny = {}; declare const isDefinedNonNullAny: (v: any) => v is definedNonNullAny; declare const definedNonNullAnySchema: z$1.ZodAny & z$1.ZodType>; declare const StatusTypeSchema: z$1.ZodEnum<{ CONFIRMED: "CONFIRMED"; DRAFT: "DRAFT"; }>; declare function SetSubgraphNameInputSchema(): z$1.ZodObject>; declare function SetSubgraphStatusInputSchema(): z$1.ZodObject>; declare function SubgraphModuleStateSchema(): z$1.ZodObject>; //#endregion //#region document-models/subgraph-module/v1/gen/utils.d.ts declare const initialGlobalState: SubgraphModuleState; declare const initialLocalState: SubgraphModuleLocalState; //#endregion export { StatusType as $, documentModel as A, SubgraphModuleDocument as B, SubgraphModuleDocumentHeaderSchema as C, assertIsSubgraphModuleState as D, assertIsSubgraphModuleDocument as E, SubgraphModuleBaseOperationsOperations as F, InputMaybe as G, SubgraphModulePHState as H, SubgraphModuleAction as I, MakeOptional as J, MakeEmpty as K, SetSubgraphNameAction as L, setSubgraphName as M, setSubgraphStatus as N, isSubgraphModuleDocument as O, SubgraphModuleController as P, SetSubgraphStatusInput as Q, SetSubgraphStatusAction as R, subgraphModuleDocumentType as S, SubgraphModulePHStateSchema as T, Exact as U, SubgraphModuleLocalState as V, Incremental as W, Scalars as X, Maybe as Y, SetSubgraphNameInput as Z, createState$1 as _, StatusTypeSchema as a, defaultLocalState as b, isDefinedNonNullAny as c, SubgraphModule as d, SubgraphModuleState as et, useSelectedSubgraphModuleDocument as f, actions as g, useSubgraphModuleDocumentsInSelectedFolder as h, SetSubgraphStatusInputSchema as i, creators_d_exports as j, isSubgraphModuleState as k, reducer as l, useSubgraphModuleDocumentsInSelectedDrive as m, initialLocalState as n, SubgraphModuleStateSchema as o, useSubgraphModuleDocumentById as p, MakeMaybe as q, SetSubgraphNameInputSchema as r, definedNonNullAnySchema as s, initialGlobalState as t, utils as u, createSubgraphModuleDocument as v, SubgraphModuleDocumentSchema as w, defaultPHState as x, defaultGlobalState as y, SubgraphModuleBaseOperationsAction as z }; //# sourceMappingURL=index-HHjpYUNP.d.ts.map