@powerhousedao/reactor-workflow 6.2.3-dev.24 → 6.2.3-dev.25

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.
package/README.md CHANGED
@@ -215,7 +215,9 @@ releases what an earlier enable registered. The reason reads
215
215
  **Auth**
216
216
 
217
217
  - CustomAuth `refresh`: rejected, as `CustomAuth refresh` (#3091).
218
- - `auth` as an array: rejected, as `Multi-auth (auth as an array)` (#3091).
218
+ - `auth` as an array runs through the method whose type matches the
219
+ connection's. The piece is refused only when none of its methods can run,
220
+ with the first method's reason.
219
221
  - OAuth2 and OIDC: rejected, as `OAuth2 auth` and `OIDC auth` (#3091). Their
220
222
  connections are refused at check and run too.
221
223
  - `server` in `validate` and `getConnectionIdentifier` is a throwing stub.
@@ -1,4 +1,4 @@
1
- import { R as unsupportedAuth, U as getActions, W as getTriggers, z as unsupportedTrigger } from "./redact-C2y8tU--.js";
1
+ import { B as unsupportedTrigger, G as getTriggers, W as getActions, z as unsupportedAuth } from "./redact-DM3JhxdF.js";
2
2
  import { createRequire } from "node:module";
3
3
  import { readFileSync, realpathSync } from "node:fs";
4
4
  import path from "node:path";
@@ -133,6 +133,19 @@ function isPropertyObject(value) {
133
133
  function withUnsupported(feature) {
134
134
  return feature ? { unsupported: feature } : {};
135
135
  }
136
+ function describeAuthMethod(auth) {
137
+ if (!auth || typeof auth !== "object") return void 0;
138
+ const method = auth;
139
+ const props = method.props && typeof method.props === "object" ? describeProperties(method.props) : [];
140
+ return {
141
+ type: method.type ?? "UNKNOWN",
142
+ displayName: method.displayName,
143
+ description: method.description,
144
+ required: method.required,
145
+ ...props.length > 0 ? { props } : {},
146
+ ...withUnsupported(unsupportedAuth(method))
147
+ };
148
+ }
136
149
  function buildDescriptor(piece, source) {
137
150
  const actions = Object.entries(getActions(piece)).map(([actionName, action]) => ({
138
151
  name: action.name ?? actionName,
@@ -170,20 +183,16 @@ function buildDescriptor(piece, source) {
170
183
  triggers,
171
184
  ...withUnsupported(unsupportedAuth(piece.auth))
172
185
  };
173
- if (Array.isArray(piece.auth)) return descriptor;
174
- if (piece.auth && typeof piece.auth === "object") {
175
- const authProps = piece.auth.props && typeof piece.auth.props === "object" ? describeProperties(piece.auth.props) : [];
176
- descriptor.auth = {
177
- type: piece.auth.type ?? "UNKNOWN",
178
- displayName: piece.auth.displayName,
179
- description: piece.auth.description,
180
- required: piece.auth.required,
181
- ...authProps.length > 0 ? { props: authProps } : {}
182
- };
186
+ if (Array.isArray(piece.auth)) {
187
+ const methods = piece.auth.map(describeAuthMethod).filter((method) => method !== void 0);
188
+ if (methods.length > 0) descriptor.auth = methods;
189
+ } else {
190
+ const method = describeAuthMethod(piece.auth);
191
+ if (method) descriptor.auth = method;
183
192
  }
184
193
  return descriptor;
185
194
  }
186
195
  //#endregion
187
196
  export { loadPieceFromDir as i, describeProperties as n, loadPiece as r, buildDescriptor as t };
188
197
 
189
- //# sourceMappingURL=descriptor-E4swpRpd.js.map
198
+ //# sourceMappingURL=descriptor-CtMB-wPx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"descriptor-CtMB-wPx.js","names":[],"sources":["../src/pieces/activepieces/loader.ts","../src/pieces/activepieces/descriptor.ts"],"sourcesContent":["import { readFileSync, realpathSync } from \"node:fs\";\nimport { createRequire } from \"node:module\";\nimport path from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\nimport type { ApPiece } from \"./types.js\";\n\nexport interface LoadedPiece {\n piece: ApPiece;\n entryPath: string;\n // Which duck-type check identified the export.\n check: \"constructor-name\" | \"structural\";\n}\n\n// Resolves a bundle's entry file. Published bundles typically carry only\n// `main` (no `exports`, no `type` — they are CJS).\nexport function resolveEntry(pieceDir: string): string {\n const raw = readFileSync(path.join(pieceDir, \"package.json\"), \"utf8\");\n const pkg = JSON.parse(raw) as {\n main?: string;\n module?: string;\n exports?: Record<string, unknown>;\n };\n const dotExport = pkg.exports?.[\".\"];\n const candidates: (string | undefined)[] = [];\n if (typeof dotExport === \"string\") candidates.push(dotExport);\n if (dotExport && typeof dotExport === \"object\") {\n const cond = dotExport as Record<string, unknown>;\n for (const key of [\"import\", \"require\", \"default\"]) {\n const value = cond[key];\n if (typeof value === \"string\") candidates.push(value);\n }\n }\n candidates.push(pkg.main, pkg.module, \"src/index.js\", \"index.js\", \"main.js\");\n // A bundle's manifest (or a symlink inside it) must not point the entry\n // outside pieceDir; realpath so a symlink can't launder the escape.\n const root = realpathSync(pieceDir);\n const rootWithSep = root + path.sep;\n for (const candidate of candidates) {\n if (!candidate) continue;\n const abs = path.resolve(pieceDir, candidate);\n let real: string;\n try {\n real = realpathSync(abs);\n } catch {\n continue; // candidate doesn't exist; try the next one\n }\n if (real !== root && !real.startsWith(rootWithSep)) continue;\n return abs;\n }\n throw new Error(`No entry file found for piece bundle at ${pieceDir}`);\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null;\n}\n\n// Identify the piece by constructor name (their own loader's check), falling\n// back to structure for bundles minified without keepNames. No `instanceof`.\nfunction findPiece(\n mod: Record<string, unknown>,\n): Pick<LoadedPiece, \"piece\" | \"check\"> | undefined {\n const candidates: unknown[] = [\n ...Object.values(mod),\n ...(isRecord(mod.default) ? Object.values(mod.default) : []),\n mod.default,\n ];\n for (const candidate of candidates) {\n // `constructor?.name`: a bundle may export an Object.create(null), and the\n // real piece is usually beside it in the same module.\n if (isRecord(candidate) && candidate.constructor?.name === \"Piece\") {\n return {\n piece: candidate as unknown as ApPiece,\n check: \"constructor-name\",\n };\n }\n }\n for (const candidate of candidates) {\n if (\n isRecord(candidate) &&\n typeof candidate.displayName === \"string\" &&\n (isRecord(candidate.actions) ||\n typeof candidate.actions === \"function\" ||\n typeof candidate.getAction === \"function\")\n ) {\n return { piece: candidate as unknown as ApPiece, check: \"structural\" };\n }\n }\n return undefined;\n}\n\n// A module the piece names and node cannot find. Dependencies are installed\n// with scripts disabled, so a native or downloaded one looks like this.\nfunction missingModule(entryPath: string, error: unknown): Error | undefined {\n const code = (error as { code?: unknown } | null)?.code;\n if (code !== \"ERR_MODULE_NOT_FOUND\" && code !== \"MODULE_NOT_FOUND\") {\n return undefined;\n }\n const detail = error instanceof Error ? error.message : String(error);\n return new Error(\n `Piece at ${entryPath} could not be loaded: it imports a module that is ` +\n `not there. Its dependencies are installed with lifecycle scripts ` +\n `disabled, so one that compiles or downloads on install -- a native ` +\n `addon, a browser download -- cannot be prepared here. ${detail}`,\n );\n}\n\n// ESM-first `import()` — Node's CJS interop handles the typical CJS bundle —\n// with a `require` fallback.\nexport async function loadPiece(entryPath: string): Promise<LoadedPiece> {\n let mod: Record<string, unknown>;\n try {\n mod = (await import(\n /* @vite-ignore */ pathToFileURL(entryPath).href\n )) as Record<string, unknown>;\n } catch (imported) {\n try {\n const require = createRequire(import.meta.url);\n mod = require(entryPath) as Record<string, unknown>;\n } catch (required) {\n // The import's error names the missing module; require's often names\n // only the entry it was handed.\n throw (\n missingModule(entryPath, imported) ??\n missingModule(entryPath, required) ??\n required\n );\n }\n }\n const found = findPiece(mod);\n if (!found) {\n throw new Error(\n `No Piece export found in ${entryPath}. Export keys: ${Object.keys(mod).join(\", \")}`,\n );\n }\n return { ...found, entryPath };\n}\n\nexport async function loadPieceFromDir(pieceDir: string): Promise<LoadedPiece> {\n return loadPiece(resolveEntry(pieceDir));\n}\n","import {\n getActions,\n getTriggers,\n type ApPiece,\n type ApProperty,\n type ApPropertyType,\n type ApDropdownOption,\n type ApTrigger,\n type ApTriggerStrategy,\n} from \"./types.js\";\nimport {\n unsupportedAuth,\n unsupportedTrigger,\n type UnsupportedFeature,\n} from \"./unsupported.js\";\n\nexport interface PiecePropDescriptor {\n name: string;\n displayName: string;\n description?: string;\n placeholder?: string;\n type: ApPropertyType;\n required: boolean;\n defaultValue?: unknown;\n // STATIC_DROPDOWN choices, extracted so the editor needs no runtime call.\n staticOptions?: ApDropdownOption[];\n // True when the prop carries a design-time resolver (DROPDOWN options() / DYNAMIC props()).\n hasDynamicResolver: boolean;\n // Synthesised domain-provider id: activepieces:<pkg>#<action>.<prop> (doc 08 §6.3).\n // Only top-level props get one; nested resolvers are not addressable yet.\n dynamicResolverId?: string;\n // Sibling prop names whose values feed the resolver; the editor re-runs\n // it when any of them changes.\n refreshers?: string[];\n // Nested shape: an ARRAY item's fields, or the props a DYNAMIC resolver\n // produced (see describeProperties). OBJECT props are free-form and carry none.\n properties?: PiecePropDescriptor[];\n}\n\nexport interface PieceActionDescriptor {\n name: string;\n displayName: string;\n description?: string;\n // UI metadata only — not a credential contract (spike finding).\n requireAuth: boolean;\n props: PiecePropDescriptor[];\n // Carried verbatim: it is what the expression picker builds a later step's\n // field list from, and a package piece has no published listing to read.\n outputSchema?: unknown;\n // Orders the action picker, so a package piece that declares it must be\n // ordered by it too rather than counting as unset.\n audience?: string;\n}\n\nexport interface PieceTriggerDescriptor {\n name: string;\n displayName: string;\n description?: string;\n strategy: ApTriggerStrategy;\n testStrategy?: string;\n requireAuth: boolean;\n props: PiecePropDescriptor[];\n outputSchema?: unknown;\n hasSampleData: boolean;\n // The sample itself, not just whether there is one: a trigger that declares\n // no outputSchema is read for its shape instead.\n sampleData?: unknown;\n // How the sender proves the endpoint exists before it will register it.\n // Absent when the trigger declares no handshake, or declares NONE.\n handshake?: { strategy: string; paramName?: string };\n // A trigger feature the engine cannot run; the piece's own is on the piece.\n unsupported?: UnsupportedFeature;\n}\n\nexport interface PieceAuthDescriptor {\n type: ApPropertyType;\n displayName?: string;\n description?: string;\n required?: boolean;\n // CUSTOM_AUTH's own fields. Without them a connection form has nothing to\n // ask for, which is what a piece read from a package rather than a published\n // listing would otherwise leave the editor with.\n props?: PiecePropDescriptor[];\n // Set when this engine can't sign in this way (OAuth2, for one).\n unsupported?: UnsupportedFeature;\n}\n\n// NONE is how the framework spells \"no handshake\", so it is not carried:\n// a caller checking the field would otherwise have to know that too.\nfunction describeHandshake(\n trigger: ApTrigger,\n): { strategy: string; paramName?: string } | undefined {\n const strategy = trigger.handshakeConfiguration?.strategy;\n if (!strategy || strategy === \"NONE\") return undefined;\n return { strategy, paramName: trigger.handshakeConfiguration?.paramName };\n}\n\nexport interface PieceSource {\n packageName: string;\n version: string;\n}\n\n// Serializable descriptor of an adapted piece; the engine never learns\n// Activepieces exists (doc 08 §6.2).\nexport interface PieceDescriptor {\n id: string;\n source: PieceSource;\n displayName: string;\n description?: string;\n logoUrl?: string;\n categories?: string[];\n // A list when the piece offers several sign-in methods.\n auth?: PieceAuthDescriptor | PieceAuthDescriptor[];\n minimumSupportedRelease?: string;\n maximumSupportedRelease?: string;\n actions: PieceActionDescriptor[];\n triggers: PieceTriggerDescriptor[];\n // Set when no block of the piece can run here, e.g. an OAuth2 piece.\n unsupported?: UnsupportedFeature;\n}\n\nfunction hasResolver(prop: ApProperty): boolean {\n return typeof prop.options === \"function\" || typeof prop.props === \"function\";\n}\n\nfunction toPropDescriptor(\n name: string,\n prop: ApProperty,\n resolverId?: string,\n): PiecePropDescriptor {\n const dynamic = hasResolver(prop);\n const descriptor: PiecePropDescriptor = {\n name,\n displayName: prop.displayName ?? name,\n type: prop.type ?? \"UNKNOWN\",\n required: prop.required ?? false,\n hasDynamicResolver: dynamic,\n };\n if (typeof prop.description === \"string\" && prop.description !== \"\") {\n descriptor.description = prop.description;\n }\n if (typeof prop.placeholder === \"string\" && prop.placeholder !== \"\") {\n descriptor.placeholder = prop.placeholder;\n }\n if (prop.defaultValue !== undefined) {\n descriptor.defaultValue = prop.defaultValue;\n }\n if (dynamic && resolverId) {\n descriptor.dynamicResolverId = resolverId;\n }\n if (dynamic && Array.isArray(prop.refreshers)) {\n descriptor.refreshers = prop.refreshers.filter(\n (entry): entry is string => typeof entry === \"string\",\n );\n }\n if (typeof prop.options === \"object\" && Array.isArray(prop.options.options)) {\n descriptor.staticOptions = prop.options.options.map((o) => ({\n label: o.label,\n value: o.value,\n }));\n }\n if (prop.properties && typeof prop.properties === \"object\") {\n const nested = describeProperties(prop.properties);\n if (nested.length > 0) descriptor.properties = nested;\n }\n return descriptor;\n}\n\n// Descriptor list for a props map: nested ARRAY items and what a DYNAMIC\n// resolver returns, so the editor never sees raw piece properties.\nexport function describeProperties(\n props: Record<string, ApProperty> | null | undefined,\n resolverIdFor?: (propName: string) => string,\n): PiecePropDescriptor[] {\n if (!props || typeof props !== \"object\") return [];\n return Object.entries(props)\n .filter((entry): entry is [string, ApProperty] =>\n isPropertyObject(entry[1]),\n )\n .map(([propName, prop]) =>\n toPropDescriptor(propName, prop, resolverIdFor?.(propName)),\n );\n}\n\n// Bundles are duck-typed; a props map may carry non-object junk.\nfunction isPropertyObject(value: unknown): value is ApProperty {\n return value !== null && typeof value === \"object\";\n}\n\nfunction withUnsupported(feature: UnsupportedFeature | undefined): {\n unsupported?: UnsupportedFeature;\n} {\n return feature ? { unsupported: feature } : {};\n}\n\n// Pure translation over a loaded piece; performs no I/O and never executes\n// piece code beyond the actions()/triggers() accessors.\nfunction describeAuthMethod(auth: unknown): PieceAuthDescriptor | undefined {\n if (!auth || typeof auth !== \"object\") return undefined;\n const method = auth as ApProperty;\n // CUSTOM_AUTH carries a record here; a DYNAMIC prop would carry a\n // resolver function, which is not an auth shape at all.\n const props =\n method.props && typeof method.props === \"object\"\n ? describeProperties(method.props)\n : [];\n return {\n type: method.type ?? \"UNKNOWN\",\n displayName: method.displayName,\n description: method.description,\n required: method.required,\n ...(props.length > 0 ? { props } : {}),\n ...withUnsupported(unsupportedAuth(method)),\n };\n}\n\nexport function buildDescriptor(\n piece: ApPiece,\n source: PieceSource,\n): PieceDescriptor {\n const actions = Object.entries(getActions(piece)).map(\n ([actionName, action]): PieceActionDescriptor => ({\n name: action.name ?? actionName,\n displayName: action.displayName ?? actionName,\n description: action.description,\n requireAuth: action.requireAuth ?? false,\n props: describeProperties(\n action.props,\n (propName) =>\n `activepieces:${source.packageName}#${actionName}.${propName}`,\n ),\n ...(action.outputSchema !== undefined\n ? { outputSchema: action.outputSchema }\n : {}),\n ...(action.audience !== undefined ? { audience: action.audience } : {}),\n }),\n );\n\n const triggers = Object.entries(getTriggers(piece)).map(\n ([triggerName, trigger]): PieceTriggerDescriptor => ({\n name: trigger.name ?? triggerName,\n displayName: trigger.displayName ?? triggerName,\n description: trigger.description,\n strategy: trigger.type ?? \"UNKNOWN\",\n testStrategy: trigger.testStrategy,\n requireAuth: trigger.requireAuth ?? false,\n props: describeProperties(\n trigger.props,\n (propName) =>\n `activepieces:${source.packageName}#${triggerName}.${propName}`,\n ),\n ...(trigger.outputSchema !== undefined\n ? { outputSchema: trigger.outputSchema }\n : {}),\n hasSampleData:\n trigger.sampleData !== undefined && trigger.sampleData !== null,\n ...(trigger.sampleData !== undefined && trigger.sampleData !== null\n ? { sampleData: trigger.sampleData }\n : {}),\n handshake: describeHandshake(trigger),\n ...withUnsupported(unsupportedTrigger(trigger)),\n }),\n );\n\n const descriptor: PieceDescriptor = {\n id: `activepieces:${source.packageName}`,\n source,\n displayName: piece.displayName,\n description: piece.description,\n logoUrl: piece.logoUrl,\n categories: piece.categories,\n minimumSupportedRelease: piece.minimumSupportedRelease,\n maximumSupportedRelease: piece.maximumSupportedRelease,\n actions,\n triggers,\n ...withUnsupported(unsupportedAuth(piece.auth)),\n };\n // Several methods stay a list, in the piece's order; each says whether this\n // engine can run it.\n if (Array.isArray(piece.auth)) {\n const methods = piece.auth\n .map(describeAuthMethod)\n .filter((method) => method !== undefined);\n if (methods.length > 0) descriptor.auth = methods;\n } else {\n const method = describeAuthMethod(piece.auth);\n if (method) descriptor.auth = method;\n }\n return descriptor;\n}\n"],"mappings":";;;;;;AAeA,SAAgB,aAAa,UAA0B;CACrD,MAAM,MAAM,aAAa,KAAK,KAAK,UAAU,cAAc,GAAG,MAAM;CACpE,MAAM,MAAM,KAAK,MAAM,GAAG;CAK1B,MAAM,YAAY,IAAI,UAAU;CAChC,MAAM,aAAqC,CAAC;CAC5C,IAAI,OAAO,cAAc,UAAU,WAAW,KAAK,SAAS;CAC5D,IAAI,aAAa,OAAO,cAAc,UAAU;E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;EACf,YAAY,MAAM;EAClB,yBAAyB,MAAM;EAC/B,yBAAyB,MAAM;EAC/B;EACA;EACA,GAAG,gBAAgB,gBAAgB,MAAM,IAAI,CAAC;CAChD;CAGA,IAAI,MAAM,QAAQ,MAAM,IAAI,GAAG;EAC7B,MAAM,UAAU,MAAM,KACnB,IAAI,kBAAkB,CAAC,CACvB,QAAQ,WAAW,WAAW,KAAA,CAAS;EAC1C,IAAI,QAAQ,SAAS,GAAG,WAAW,OAAO;CAC5C,OAAO;EACL,MAAM,SAAS,mBAAmB,MAAM,IAAI;EAC5C,IAAI,QAAQ,WAAW,OAAO;CAChC;CACA,OAAO;AACT"}
package/dist/index.d.ts CHANGED
@@ -1,9 +1,8 @@
1
- import { C as EgressPolicy, _ as PieceWorker, a as AttachmentPort, c as ConnectionRequest, d as SecretStore, m as WorkflowRunResult, n as packagePieces, p as StepExecutionRecord, t as PieceRegistry, v as PieceWorkerResult, x as PieceResolver } from "./piece-registry-q4bgYbXa.js";
1
+ import { S as PieceResolver, h as WorkflowRunResult, i as AttachmentPort, n as packagePieces, p as StepExecutionRecord, s as ConnectionRequest, t as PieceRegistry, u as SecretStore, v as PieceWorker, w as EgressPolicy, y as PieceWorkerResult } from "./piece-registry-D6dvy2OD.js";
2
2
  import { ActionBase, TriggerBase } from "@powerhousedao/pieces-framework";
3
3
  import { ILogger, OperationWithContext } from "document-model";
4
4
  import { BaseReadModel, DocumentViewDatabase, IConsistencyTracker, IOperationIndex, IReactorClient, IWriteCache, ReadModelRegistrationStage } from "@powerhousedao/reactor";
5
5
  import { IRelationalDb, IWebhookScope, WebhookField, WebhookHashAlgorithm, WebhookPolicy, WebhookReply, WebhookRequest, WebhookSignatureEncoding } from "@powerhousedao/shared/processors";
6
-
7
6
  //#region src/reactor/attachment-port.d.ts
8
7
  interface AttachmentClientLike {
9
8
  upload(input: {
@@ -25,13 +24,13 @@ interface AttachmentClientLike {
25
24
  body: ReadableStream<Uint8Array>;
26
25
  }>;
27
26
  }
28
- declare function createAttachmentPort(client: AttachmentClientLike, documentIdFor: () => string | undefined, canReadRef: (documentId: string, ref: string) => Promise<boolean>): AttachmentPort;
27
+ export declare function createAttachmentPort(client: AttachmentClientLike, documentIdFor: () => string | undefined, canReadRef: (documentId: string, ref: string) => Promise<boolean>): AttachmentPort;
29
28
  //#endregion
30
29
  //#region src/reactor/package-name.d.ts
31
- declare const WORKFLOW_PACKAGE_NAME = "@powerhousedao/workflow";
30
+ export declare const WORKFLOW_PACKAGE_NAME = "@powerhousedao/workflow";
32
31
  //#endregion
33
32
  //#region src/pieces/activepieces/registry-source.d.ts
34
- declare function setPieceRegistryUrl(url: string | undefined): void;
33
+ export declare function setPieceRegistryUrl(url: string | undefined): void;
35
34
  //#endregion
36
35
  //#region src/reactor/host.d.ts
37
36
  type WorkflowCaller = object;
@@ -150,6 +149,8 @@ interface StepExecutionRow {
150
149
  output: string | null;
151
150
  port: string | null;
152
151
  error: string | null;
152
+ started_at: string | null;
153
+ ended_at: string | null;
153
154
  }
154
155
  interface TriggerStateRow {
155
156
  workflow_id: string;
@@ -353,7 +354,7 @@ interface WebhookEndpointRecord {
353
354
  armed: boolean;
354
355
  createdAt: string;
355
356
  }
356
- declare class WorkflowRuntimeService {
357
+ export declare class WorkflowRuntimeService {
357
358
  private readonly host;
358
359
  private readonly logger;
359
360
  private readonly attachments?;
@@ -483,7 +484,7 @@ declare class WorkflowRuntimeService {
483
484
  rerun(runId: string, ctx?: WorkflowCaller): Promise<PersistedRunResult>;
484
485
  }
485
486
  /** The runtime a host composes: one instance, its lifetime the host's. */
486
- declare function createWorkflowRuntime(deps: WorkflowRuntimeHostDeps): WorkflowRuntimeService;
487
+ export declare function createWorkflowRuntime(deps: WorkflowRuntimeHostDeps): WorkflowRuntimeService;
487
488
  //#endregion
488
489
  //#region ../../node_modules/.pnpm/kysely@0.28.16/node_modules/kysely/dist/esm/operation-node/operation-node.d.ts
489
490
  type OperationNodeKind = 'IdentifierNode' | 'SchemableIdentifierNode' | 'RawNode' | 'SelectQueryNode' | 'SelectionNode' | 'ReferenceNode' | 'ColumnNode' | 'TableNode' | 'AliasNode' | 'FromNode' | 'SelectAllNode' | 'AndNode' | 'OrNode' | 'ParensNode' | 'ValueNode' | 'ValueListNode' | 'PrimitiveValueListNode' | 'JoinNode' | 'OperatorNode' | 'WhereNode' | 'InsertQueryNode' | 'DeleteQueryNode' | 'ReturningNode' | 'CreateTableNode' | 'ColumnDefinitionNode' | 'AddColumnNode' | 'DropTableNode' | 'DataTypeNode' | 'OrderByNode' | 'OrderByItemNode' | 'GroupByNode' | 'GroupByItemNode' | 'UpdateQueryNode' | 'ColumnUpdateNode' | 'LimitNode' | 'OffsetNode' | 'OnConflictNode' | 'OnDuplicateKeyNode' | 'CreateIndexNode' | 'DropIndexNode' | 'ListNode' | 'ReferencesNode' | 'PrimaryKeyConstraintNode' | 'UniqueConstraintNode' | 'CheckConstraintNode' | 'ForeignKeyConstraintNode' | 'WithNode' | 'CommonTableExpressionNode' | 'HavingNode' | 'CreateSchemaNode' | 'DropSchemaNode' | 'AlterTableNode' | 'ModifyColumnNode' | 'DropColumnNode' | 'RenameColumnNode' | 'AlterColumnNode' | 'AddConstraintNode' | 'DropConstraintNode' | 'CreateViewNode' | 'RefreshMaterializedViewNode' | 'DropViewNode' | 'GeneratedNode' | 'DefaultValueNode' | 'OnNode' | 'ValuesNode' | 'CommonTableExpressionNameNode' | 'SelectModifierNode' | 'CreateTypeNode' | 'DropTypeNode' | 'ExplainNode' | 'DefaultInsertValueNode' | 'AggregateFunctionNode' | 'OverNode' | 'PartitionByNode' | 'PartitionByItemNode' | 'SetOperationNode' | 'BinaryOperationNode' | 'UnaryOperationNode' | 'UsingNode' | 'FunctionNode' | 'CaseNode' | 'WhenNode' | 'JSONReferenceNode' | 'JSONPathNode' | 'JSONPathLegNode' | 'JSONOperatorChainNode' | 'TupleNode' | 'MergeQueryNode' | 'MatchedNode' | 'AddIndexNode' | 'CastNode' | 'FetchNode' | 'TopNode' | 'OutputNode' | 'OrActionNode' | 'CollateNode' | 'RenameConstraintNode';
@@ -713,11 +714,11 @@ declare class MergeResult {
713
714
  * // Columns == 'id' | 'name' | 'species'
714
715
  * ```
715
716
  */
716
- type AnyColumn<DB, TB extends keyof DB> = { [T in TB]: keyof DB[T] }[TB] & string;
717
+ type AnyColumn<DB, TB extends keyof DB> = { [T in TB]: keyof DB[T]; }[TB] & string;
717
718
  /**
718
719
  * Extracts a column type.
719
720
  */
720
- type ExtractColumnType<DB, TB extends keyof DB, C> = { [T in TB]: C extends keyof DB[T] ? DB[T][C] : never }[TB];
721
+ type ExtractColumnType<DB, TB extends keyof DB, C> = { [T in TB]: C extends keyof DB[T] ? DB[T][C] : never; }[TB];
721
722
  /**
722
723
  * Given a database type and a union of table names in that db, returns
723
724
  * a union type with all possible `table`.`column` combinations.
@@ -749,7 +750,7 @@ type ExtractColumnType<DB, TB extends keyof DB, C> = { [T in TB]: C extends keyo
749
750
  * // Columns == 'person.id' | 'pet.name' | 'pet.species'
750
751
  * ```
751
752
  */
752
- type AnyColumnWithTable<DB, TB extends keyof DB> = { [T in TB]: `${T & string}.${keyof DB[T] & string}` }[TB];
753
+ type AnyColumnWithTable<DB, TB extends keyof DB> = { [T in TB]: `${T & string}.${keyof DB[T] & string}`; }[TB];
753
754
  /**
754
755
  * Just like {@link AnyColumn} but with a ` as <string>` suffix.
755
756
  */
@@ -764,7 +765,7 @@ type AnyAliasedColumnWithTable<DB, TB extends keyof DB> = `${AnyColumnWithTable<
764
765
  type ArrayItemType<T> = T extends ReadonlyArray<infer I> ? I : never;
765
766
  type SimplifySingleResult<O> = O extends InsertResult ? O : O extends DeleteResult ? O : O extends UpdateResult ? O : O extends MergeResult ? O : Simplify<O> | undefined;
766
767
  type SimplifyResult<O> = O extends InsertResult ? O : O extends DeleteResult ? O : O extends UpdateResult ? O : O extends MergeResult ? O : Simplify<O>;
767
- type Simplify<T> = DrainOuterGeneric<{ [K in keyof T]: T[K] } & {}>;
768
+ type Simplify<T> = DrainOuterGeneric<{ [K in keyof T]: T[K]; } & {}>;
768
769
  /**
769
770
  * Represents a database row whose column names and their types are unknown.
770
771
  */
@@ -772,12 +773,12 @@ type UnknownRow = Record<string, unknown>;
772
773
  /**
773
774
  * Makes all properties of object type `T` nullable.
774
775
  */
775
- type Nullable<T> = { [P in keyof T]: T[P] | null };
776
+ type Nullable<T> = { [P in keyof T]: T[P] | null; };
776
777
  /**
777
778
  * Evaluates to `true` if `T` is `never`.
778
779
  */
779
780
  type IsNever<T> = [T] extends [never] ? true : false;
780
- type NarrowPartial<O, T> = DrainOuterGeneric<T extends object ? { [K in keyof O & string]: K extends keyof T ? T[K] extends NotNull$1 ? Exclude<O[K], null> : T[K] extends O[K] ? T[K] : KyselyTypeError<`$narrowType() call failed: passed type does not exist in '${K}'s type union`> : O[K] } : never>;
781
+ type NarrowPartial<O, T> = DrainOuterGeneric<T extends object ? { [K in keyof O & string]: K extends keyof T ? T[K] extends NotNull$1 ? Exclude<O[K], null> : T[K] extends O[K] ? T[K] : KyselyTypeError<`$narrowType() call failed: passed type does not exist in '${K}'s type union`> : O[K]; } : never>;
781
782
  /**
782
783
  * A type constant for marking a column as not null. Can be used with `$narrowPartial`.
783
784
  *
@@ -825,13 +826,13 @@ type SqlBool = boolean | 0 | 1;
825
826
  * ```
826
827
  */
827
828
  type DrainOuterGeneric<T> = [T] extends [unknown] ? T : never;
828
- type ShallowRecord<K extends keyof any, T> = DrainOuterGeneric<{ [P in K]: T }>;
829
+ type ShallowRecord<K extends keyof any, T> = DrainOuterGeneric<{ [P in K]: T; }>;
829
830
  /**
830
831
  * Dehydrates any root properties of an object that are not valid JSON types.
831
832
  *
832
833
  * For now, we catch anything in {@link StringsWhenDataTypeNotAvailable} and convert it to `string`.
833
834
  */
834
- type ShallowDehydrateObject<O> = { [K in keyof O]: ShallowDehydrateValue<O[K]> };
835
+ type ShallowDehydrateObject<O> = { [K in keyof O]: ShallowDehydrateValue<O[K]>; };
835
836
  /**
836
837
  * Dehydrates a value when it is not a valid JSON type.
837
838
  *
@@ -2813,7 +2814,6 @@ interface QueryExecutor extends ConnectionProvider {
2813
2814
  * How many rows should be pulled from the database at once. Supported
2814
2815
  * only by the postgres driver.
2815
2816
  */
2816
-
2817
2817
  chunkSize: number): AsyncIterableIterator<QueryResult<R>>;
2818
2818
  /**
2819
2819
  * Returns a copy of this executor with a new connection provider.
@@ -3624,19 +3624,19 @@ type UpdateType<T> = T extends ColumnType<any, any, infer U> ? U : T;
3624
3624
  /**
3625
3625
  * Keys of `R` whose `InsertType` values can be `null` or `undefined`.
3626
3626
  */
3627
- type NullableInsertKeys<R> = { [K in keyof R]: IfNullable<InsertType<R[K]>, K> }[keyof R];
3627
+ type NullableInsertKeys<R> = { [K in keyof R]: IfNullable<InsertType<R[K]>, K>; }[keyof R];
3628
3628
  /**
3629
3629
  * Keys of `R` whose `InsertType` values can't be `null` or `undefined`.
3630
3630
  */
3631
- type NonNullableInsertKeys<R> = { [K in keyof R]: IfNotNullable<InsertType<R[K]>, K> }[keyof R];
3631
+ type NonNullableInsertKeys<R> = { [K in keyof R]: IfNotNullable<InsertType<R[K]>, K>; }[keyof R];
3632
3632
  /**
3633
3633
  * Keys of `R` whose `SelectType` values are not `never`
3634
3634
  */
3635
- type NonNeverSelectKeys<R> = { [K in keyof R]: IfNotNever<SelectType<R[K]>, K> }[keyof R];
3635
+ type NonNeverSelectKeys<R> = { [K in keyof R]: IfNotNever<SelectType<R[K]>, K>; }[keyof R];
3636
3636
  /**
3637
3637
  * Keys of `R` whose `UpdateType` values are not `never`
3638
3638
  */
3639
- type UpdateKeys<R> = { [K in keyof R]: IfNotNever<UpdateType<R[K]>, K> }[keyof R];
3639
+ type UpdateKeys<R> = { [K in keyof R]: IfNotNever<UpdateType<R[K]>, K>; }[keyof R];
3640
3640
  /**
3641
3641
  * Given a table interface, extracts the select type from all
3642
3642
  * {@link ColumnType} types.
@@ -3658,7 +3658,7 @@ type UpdateKeys<R> = { [K in keyof R]: IfNotNever<UpdateType<R[K]>, K> }[keyof R
3658
3658
  * // }
3659
3659
  * ```
3660
3660
  */
3661
- type Selectable<R> = DrainOuterGeneric<{ [K in NonNeverSelectKeys<R>]: SelectType<R[K]> }>;
3661
+ type Selectable<R> = DrainOuterGeneric<{ [K in NonNeverSelectKeys<R>]: SelectType<R[K]>; }>;
3662
3662
  /**
3663
3663
  * Given a table interface, extracts the update type from all
3664
3664
  * {@link ColumnType} types.
@@ -3679,14 +3679,14 @@ type Selectable<R> = DrainOuterGeneric<{ [K in NonNeverSelectKeys<R>]: SelectTyp
3679
3679
  * // }
3680
3680
  * ```
3681
3681
  */
3682
- type Updateable<R> = DrainOuterGeneric<{ [K in UpdateKeys<R>]?: UpdateType<R[K]> }>;
3682
+ type Updateable<R> = DrainOuterGeneric<{ [K in UpdateKeys<R>]?: UpdateType<R[K]>; }>;
3683
3683
  //#endregion
3684
3684
  //#region ../../node_modules/.pnpm/kysely@0.28.16/node_modules/kysely/dist/esm/parser/binary-operation-parser.d.ts
3685
3685
  type OperandValueExpression<DB, TB extends keyof DB, RE> = ValueExpression<DB, TB, ExtractTypeFromReferenceExpression<DB, TB, RE>>;
3686
3686
  type OperandValueExpressionOrList<DB, TB extends keyof DB, RE> = ValueExpressionOrList<DB, TB, ExtractTypeFromReferenceExpression<DB, TB, RE> | null>;
3687
3687
  type BinaryOperatorExpression = BinaryOperator | Expression<unknown>;
3688
3688
  type ComparisonOperatorExpression = ComparisonOperator | Expression<unknown>;
3689
- type FilterObject<DB, TB extends keyof DB> = IsNever<TB> extends true ? KyselyTypeError<'there are no tables in query context, so a filter object cannot be defined. try passing an array instead.'> : { [R in StringReference<DB, TB>]?: ValueExpressionOrList<DB, TB, SelectType<ExtractTypeFromStringReference<DB, TB, R>>> };
3689
+ type FilterObject<DB, TB extends keyof DB> = IsNever<TB> extends true ? KyselyTypeError<'there are no tables in query context, so a filter object cannot be defined. try passing an array instead.'> : { [R in StringReference<DB, TB>]?: ValueExpressionOrList<DB, TB, SelectType<ExtractTypeFromStringReference<DB, TB, R>>>; };
3690
3690
  //#endregion
3691
3691
  //#region ../../node_modules/.pnpm/kysely@0.28.16/node_modules/kysely/dist/esm/query-builder/join-builder.d.ts
3692
3692
  declare class JoinBuilder<DB, TB extends keyof DB> implements OperationNodeSource {
@@ -3743,7 +3743,7 @@ type TableExpressionOrList<DB, TB extends keyof DB> = TableExpression<DB, TB> |
3743
3743
  type SimpleTableReference<DB> = AnyAliasedTable<DB> | AnyTable<DB>;
3744
3744
  type AnyAliasedTable<DB> = `${AnyTable<DB>} as ${string}`;
3745
3745
  type AnyTable<DB> = keyof DB & string;
3746
- type From<DB, TE> = DrainOuterGeneric<{ [C in keyof DB | ExtractAliasFromTableExpression<DB, TE>]: C extends ExtractAliasFromTableExpression<DB, TE> ? ExtractRowTypeFromTableExpression<DB, TE, C> : C extends keyof DB ? DB[C] : never }>;
3746
+ type From<DB, TE> = DrainOuterGeneric<{ [C in keyof DB | ExtractAliasFromTableExpression<DB, TE>]: C extends ExtractAliasFromTableExpression<DB, TE> ? ExtractRowTypeFromTableExpression<DB, TE, C> : C extends keyof DB ? DB[C] : never; }>;
3747
3747
  type FromTables<DB, TB extends keyof DB, TE> = DrainOuterGeneric<TB | ExtractAliasFromTableExpression<DB, TE>>;
3748
3748
  type ExtractTableAlias<DB, TE> = TE extends `${string} as ${infer TA}` ? TA extends keyof DB ? TA : never : TE extends keyof DB ? TE : never;
3749
3749
  type ExtractAliasFromTableExpression<DB, TE> = TE extends string ? TE extends `${string} as ${infer TA}` ? TA : TE extends keyof DB ? TE : never : TE extends AliasedExpression<any, infer QA> ? QA : TE extends ((qb: any) => AliasedExpression<any, infer QA>) ? QA : TE extends AliasedDynamicTableBuilder<any, infer DA> ? DA : never;
@@ -3778,17 +3778,17 @@ type SelectCallback<DB, TB extends keyof DB> = (eb: ExpressionBuilder<DB, TB>) =
3778
3778
  /**
3779
3779
  * Turns a SelectExpression or a union of them into a selection object.
3780
3780
  */
3781
- type Selection<DB, TB extends keyof DB, SE> = [DB] extends [unknown] ? { [E in FlattenSelectExpression<SE> as ExtractAliasFromSelectExpression<E>]: SelectType<ExtractTypeFromSelectExpression<DB, TB, E>> } : {};
3781
+ type Selection<DB, TB extends keyof DB, SE> = [DB] extends [unknown] ? { [E in FlattenSelectExpression<SE> as ExtractAliasFromSelectExpression<E>]: SelectType<ExtractTypeFromSelectExpression<DB, TB, E>>; } : {};
3782
3782
  /**
3783
3783
  * Turns a SelectCallback into a selection object.
3784
3784
  */
3785
3785
  type CallbackSelection<DB, TB extends keyof DB, CB> = CB extends ((eb: any) => ReadonlyArray<infer SE>) ? Selection<DB, TB, SE> : never;
3786
- type FlattenSelectExpression<SE> = SE extends DynamicReferenceBuilder<infer RA> ? { [R in RA]: DynamicReferenceBuilder<R> }[RA] : SE;
3786
+ type FlattenSelectExpression<SE> = SE extends DynamicReferenceBuilder<infer RA> ? { [R in RA]: DynamicReferenceBuilder<R>; }[RA] : SE;
3787
3787
  type ExtractAliasFromSelectExpression<SE> = SE extends string ? ExtractAliasFromStringSelectExpression<SE> : SE extends AliasedExpression<any, infer EA> ? EA : SE extends ((qb: any) => AliasedExpression<any, infer EA>) ? EA : SE extends DynamicReferenceBuilder<infer RA> ? ExtractAliasFromStringSelectExpression<RA> : never;
3788
3788
  type ExtractAliasFromStringSelectExpression<SE extends string> = SE extends `${string}.${string}.${string} as ${infer A}` ? A : SE extends `${string}.${string} as ${infer A}` ? A : SE extends `${string} as ${infer A}` ? A : SE extends `${string}.${string}.${infer C}` ? C : SE extends `${string}.${infer C}` ? C : SE;
3789
3789
  type ExtractTypeFromSelectExpression<DB, TB extends keyof DB, SE> = SE extends string ? ExtractTypeFromStringSelectExpression<DB, TB, SE> : SE extends AliasedSelectQueryBuilder<infer O, any> ? O[keyof O] | null : SE extends ((eb: any) => AliasedSelectQueryBuilder<infer O, any>) ? O[keyof O] | null : SE extends AliasedExpression<infer O, any> ? O : SE extends ((eb: any) => AliasedExpression<infer O, any>) ? O : SE extends DynamicReferenceBuilder<infer RA> ? ExtractTypeFromStringSelectExpression<DB, TB, RA> | undefined : never;
3790
3790
  type ExtractTypeFromStringSelectExpression<DB, TB extends keyof DB, SE extends string> = SE extends `${infer SC}.${infer T}.${infer C} as ${string}` ? `${SC}.${T}` extends TB ? C extends keyof DB[`${SC}.${T}`] ? DB[`${SC}.${T}`][C] : never : never : SE extends `${infer T}.${infer C} as ${string}` ? T extends TB ? C extends keyof DB[T] ? DB[T][C] : never : never : SE extends `${infer C} as ${string}` ? C extends AnyColumn<DB, TB> ? ExtractColumnType<DB, TB, C> : never : SE extends `${infer SC}.${infer T}.${infer C}` ? `${SC}.${T}` extends TB ? C extends keyof DB[`${SC}.${T}`] ? DB[`${SC}.${T}`][C] : never : never : SE extends `${infer T}.${infer C}` ? T extends TB ? C extends keyof DB[T] ? DB[T][C] : never : never : SE extends AnyColumn<DB, TB> ? ExtractColumnType<DB, TB, SE> : never;
3791
- type AllSelection<DB, TB extends keyof DB> = DrainOuterGeneric<{ [C in AnyColumn<DB, TB>]: { [T in TB]: SelectType<C extends keyof DB[T] ? DB[T][C] : never> }[TB] }>;
3791
+ type AllSelection<DB, TB extends keyof DB> = DrainOuterGeneric<{ [C in AnyColumn<DB, TB>]: { [T in TB]: SelectType<C extends keyof DB[T] ? DB[T][C] : never>; }[TB]; }>;
3792
3792
  //#endregion
3793
3793
  //#region ../../node_modules/.pnpm/kysely@0.28.16/node_modules/kysely/dist/esm/parser/collate-parser.d.ts
3794
3794
  type Collation = 'nocase' | 'binary' | 'rtrim' | (string & {});
@@ -7422,16 +7422,16 @@ interface AliasedSelectQueryBuilder<O = undefined, A extends string = never> ext
7422
7422
  }
7423
7423
  type SelectQueryBuilderWithInnerJoin<DB, TB extends keyof DB, O, TE extends TableExpression<DB, TB>> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? InnerJoinedBuilder$2<DB, TB, O, A, DB[T]> : never : TE extends keyof DB ? SelectQueryBuilder<DB, TB | TE, O> : TE extends AliasedExpression<infer QO, infer QA> ? InnerJoinedBuilder$2<DB, TB, O, QA, QO> : TE extends ((qb: any) => AliasedExpression<infer QO, infer QA>) ? InnerJoinedBuilder$2<DB, TB, O, QA, QO> : never;
7424
7424
  type InnerJoinedBuilder$2<DB, TB extends keyof DB, O, A extends string, R> = A extends keyof DB ? SelectQueryBuilder<InnerJoinedDB$2<DB, A, R>, TB | A, O> : SelectQueryBuilder<DB & ShallowRecord<A, R>, TB | A, O>;
7425
- type InnerJoinedDB$2<DB, A extends string, R> = DrainOuterGeneric<{ [C in keyof DB | A]: C extends A ? R : C extends keyof DB ? DB[C] : never }>;
7425
+ type InnerJoinedDB$2<DB, A extends string, R> = DrainOuterGeneric<{ [C in keyof DB | A]: C extends A ? R : C extends keyof DB ? DB[C] : never; }>;
7426
7426
  type SelectQueryBuilderWithLeftJoin<DB, TB extends keyof DB, O, TE extends TableExpression<DB, TB>> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? LeftJoinedBuilder$2<DB, TB, O, A, DB[T]> : never : TE extends keyof DB ? LeftJoinedBuilder$2<DB, TB, O, TE, DB[TE]> : TE extends AliasedExpression<infer QO, infer QA> ? LeftJoinedBuilder$2<DB, TB, O, QA, QO> : TE extends ((qb: any) => AliasedExpression<infer QO, infer QA>) ? LeftJoinedBuilder$2<DB, TB, O, QA, QO> : never;
7427
7427
  type LeftJoinedBuilder$2<DB, TB extends keyof DB, O, A extends keyof any, R> = A extends keyof DB ? SelectQueryBuilder<LeftJoinedDB$2<DB, A, R>, TB | A, O> : SelectQueryBuilder<DB & ShallowRecord<A, Nullable<R>>, TB | A, O>;
7428
- type LeftJoinedDB$2<DB, A extends keyof any, R> = DrainOuterGeneric<{ [C in keyof DB | A]: C extends A ? Nullable<R> : C extends keyof DB ? DB[C] : never }>;
7428
+ type LeftJoinedDB$2<DB, A extends keyof any, R> = DrainOuterGeneric<{ [C in keyof DB | A]: C extends A ? Nullable<R> : C extends keyof DB ? DB[C] : never; }>;
7429
7429
  type SelectQueryBuilderWithRightJoin<DB, TB extends keyof DB, O, TE extends TableExpression<DB, TB>> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? RightJoinedBuilder$2<DB, TB, O, A, DB[T]> : never : TE extends keyof DB ? RightJoinedBuilder$2<DB, TB, O, TE, DB[TE]> : TE extends AliasedExpression<infer QO, infer QA> ? RightJoinedBuilder$2<DB, TB, O, QA, QO> : TE extends ((qb: any) => AliasedExpression<infer QO, infer QA>) ? RightJoinedBuilder$2<DB, TB, O, QA, QO> : never;
7430
7430
  type RightJoinedBuilder$2<DB, TB extends keyof DB, O, A extends keyof any, R> = SelectQueryBuilder<RightJoinedDB$2<DB, TB, A, R>, TB | A, O>;
7431
- type RightJoinedDB$2<DB, TB extends keyof DB, A extends keyof any, R> = DrainOuterGeneric<{ [C in keyof DB | A]: C extends A ? R : C extends TB ? Nullable<DB[C]> : C extends keyof DB ? DB[C] : never }>;
7431
+ type RightJoinedDB$2<DB, TB extends keyof DB, A extends keyof any, R> = DrainOuterGeneric<{ [C in keyof DB | A]: C extends A ? R : C extends TB ? Nullable<DB[C]> : C extends keyof DB ? DB[C] : never; }>;
7432
7432
  type SelectQueryBuilderWithFullJoin<DB, TB extends keyof DB, O, TE extends TableExpression<DB, TB>> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? OuterJoinedBuilder$2<DB, TB, O, A, DB[T]> : never : TE extends keyof DB ? OuterJoinedBuilder$2<DB, TB, O, TE, DB[TE]> : TE extends AliasedExpression<infer QO, infer QA> ? OuterJoinedBuilder$2<DB, TB, O, QA, QO> : TE extends ((qb: any) => AliasedExpression<infer QO, infer QA>) ? OuterJoinedBuilder$2<DB, TB, O, QA, QO> : never;
7433
7433
  type OuterJoinedBuilder$2<DB, TB extends keyof DB, O, A extends keyof any, R> = SelectQueryBuilder<OuterJoinedBuilderDB$2<DB, TB, A, R>, TB | A, O>;
7434
- type OuterJoinedBuilderDB$2<DB, TB extends keyof DB, A extends keyof any, R> = DrainOuterGeneric<{ [C in keyof DB | A]: C extends A ? Nullable<R> : C extends TB ? Nullable<DB[C]> : C extends keyof DB ? DB[C] : never }>;
7434
+ type OuterJoinedBuilderDB$2<DB, TB extends keyof DB, A extends keyof any, R> = DrainOuterGeneric<{ [C in keyof DB | A]: C extends A ? Nullable<R> : C extends TB ? Nullable<DB[C]> : C extends keyof DB ? DB[C] : never; }>;
7435
7435
  type TableOrList<TB extends keyof any> = (TB & string) | ReadonlyArray<TB & string>;
7436
7436
  //#endregion
7437
7437
  //#region ../../node_modules/.pnpm/kysely@0.28.16/node_modules/kysely/dist/esm/parser/coalesce-parser.d.ts
@@ -8849,7 +8849,7 @@ declare class JSONPathBuilder<S, O = S> {
8849
8849
  * select "nicknames"->>'$[#-1]' as `last_nickname` from `person`
8850
8850
  * ```
8851
8851
  */
8852
- at<I extends (any[] extends O ? number | 'last' | `#-${number}` : never), O2 = null | NonNullable<NonNullable<O>[keyof NonNullable<O> & number]>>(index: `${I}` extends `${any}.${any}` | `#--${any}` ? never : I): TraversedJSONPathBuilder<S, O2>;
8852
+ at<I extends any[] extends O ? number | 'last' | `#-${number}` : never, O2 = null | NonNullable<NonNullable<O>[keyof NonNullable<O> & number]>>(index: `${I}` extends `${any}.${any}` | `#--${any}` ? never : I): TraversedJSONPathBuilder<S, O2>;
8853
8853
  /**
8854
8854
  * Access a property of a JSON object.
8855
8855
  *
@@ -8899,7 +8899,7 @@ declare class JSONPathBuilder<S, O = S> {
8899
8899
  * select "profile"->'addresses'->0->'city' as "city" from "person"
8900
8900
  * ```
8901
8901
  */
8902
- key<K extends (any[] extends O ? never : O extends object ? keyof NonNullable<O> & string : never), O2 = (undefined extends O ? null | NonNullable<NonNullable<O>[K]> : null extends O ? null | NonNullable<NonNullable<O>[K]> : string extends keyof NonNullable<O> ? null | NonNullable<NonNullable<O>[K]> : NonNullable<O>[K])>(key: K): TraversedJSONPathBuilder<S, O2>;
8902
+ key<K extends any[] extends O ? never : O extends object ? keyof NonNullable<O> & string : never, O2 = undefined extends O ? null | NonNullable<NonNullable<O>[K]> : null extends O ? null | NonNullable<NonNullable<O>[K]> : string extends keyof NonNullable<O> ? null | NonNullable<NonNullable<O>[K]> : NonNullable<O>[K]>(key: K): TraversedJSONPathBuilder<S, O2>;
8903
8903
  }
8904
8904
  declare class TraversedJSONPathBuilder<S, O> extends JSONPathBuilder<S, O> implements AliasableExpression<O> {
8905
8905
  #private;
@@ -11588,13 +11588,13 @@ declare class DynamicModule<DB> {
11588
11588
  }
11589
11589
  //#endregion
11590
11590
  //#region ../../node_modules/.pnpm/kysely@0.28.16/node_modules/kysely/dist/esm/parser/insert-values-parser.d.ts
11591
- type InsertObject<DB, TB extends keyof DB> = { [C in NonNullableInsertKeys<DB[TB]>]: ValueExpression<DB, TB, InsertType<DB[TB][C]>> } & { [C in NullableInsertKeys<DB[TB]>]?: ValueExpression<DB, TB, InsertType<DB[TB][C]>> | undefined };
11591
+ type InsertObject<DB, TB extends keyof DB> = { [C in NonNullableInsertKeys<DB[TB]>]: ValueExpression<DB, TB, InsertType<DB[TB][C]>>; } & { [C in NullableInsertKeys<DB[TB]>]?: ValueExpression<DB, TB, InsertType<DB[TB][C]>> | undefined; };
11592
11592
  type InsertObjectOrList<DB, TB extends keyof DB> = InsertObject<DB, TB> | ReadonlyArray<InsertObject<DB, TB>>;
11593
11593
  type InsertObjectOrListFactory<DB, TB extends keyof DB, UT extends keyof DB = never> = (eb: ExpressionBuilder<DB, TB | UT>) => InsertObjectOrList<DB, TB>;
11594
11594
  type InsertExpression<DB, TB extends keyof DB, UT extends keyof DB = never> = InsertObjectOrList<DB, TB> | InsertObjectOrListFactory<DB, TB, UT>;
11595
11595
  //#endregion
11596
11596
  //#region ../../node_modules/.pnpm/kysely@0.28.16/node_modules/kysely/dist/esm/parser/update-set-parser.d.ts
11597
- type UpdateObject<DB, TB extends keyof DB, UT extends keyof DB = TB> = DrainOuterGeneric<{ [C in AnyColumn<DB, UT>]?: { [T in UT]: C extends keyof DB[T] ? ValueExpression<DB, TB, UpdateType<DB[T][C]>> | undefined : never }[UT] }>;
11597
+ type UpdateObject<DB, TB extends keyof DB, UT extends keyof DB = TB> = DrainOuterGeneric<{ [C in AnyColumn<DB, UT>]?: { [T in UT]: C extends keyof DB[T] ? ValueExpression<DB, TB, UpdateType<DB[T][C]>> | undefined : never; }[UT]; }>;
11598
11598
  type UpdateObjectFactory<DB, TB extends keyof DB, UT extends keyof DB> = (eb: ExpressionBuilder<DB, TB>) => UpdateObject<DB, TB, UT>;
11599
11599
  type UpdateObjectExpression<DB, TB extends keyof DB, UT extends keyof DB = TB> = UpdateObject<DB, TB, UT> | UpdateObjectFactory<DB, TB, UT>;
11600
11600
  type ExtractUpdateTypeFromReferenceExpression<DB, TB extends keyof DB, RE, DV = unknown> = UpdateType<ExtractRawTypeFromReferenceExpression<DB, TB, RE, DV>>;
@@ -12203,7 +12203,7 @@ declare class OnConflictBuilder<DB, TB extends keyof DB> implements WhereInterfa
12203
12203
  interface OnConflictBuilderProps {
12204
12204
  readonly onConflictNode: OnConflictNode;
12205
12205
  }
12206
- type OnConflictDatabase<DB, TB extends keyof DB> = { [K in keyof DB | 'excluded']: Updateable<K extends keyof DB ? DB[K] : DB[TB]> };
12206
+ type OnConflictDatabase<DB, TB extends keyof DB> = { [K in keyof DB | 'excluded']: Updateable<K extends keyof DB ? DB[K] : DB[TB]>; };
12207
12207
  type OnConflictTables<TB> = TB | 'excluded';
12208
12208
  declare class OnConflictDoNothingBuilder<DB, TB extends keyof DB> implements OperationNodeSource {
12209
12209
  #private;
@@ -12684,7 +12684,7 @@ interface OutputInterface<DB, TB extends keyof DB, O, OP extends OutputPrefix =
12684
12684
  outputAll(table: OP): OutputInterface<DB, TB, ReturningAllRow<DB, TB, O>, OP>;
12685
12685
  }
12686
12686
  type OutputPrefix = 'deleted' | 'inserted';
12687
- type OutputDatabase<DB, TB extends keyof DB, OP extends OutputPrefix = OutputPrefix> = { [K in OP]: DB[TB] };
12687
+ type OutputDatabase<DB, TB extends keyof DB, OP extends OutputPrefix = OutputPrefix> = { [K in OP]: DB[TB]; };
12688
12688
  type OutputExpression<DB, TB extends keyof DB, OP extends OutputPrefix = OutputPrefix, ODB = OutputDatabase<DB, TB, OP>, OTB extends keyof ODB = keyof ODB> = AnyAliasedColumnWithTable<ODB, OTB> | AnyColumnWithTable<ODB, OTB> | AliasedExpressionOrFactory<ODB, OTB>;
12689
12689
  type OutputCallback<DB, TB extends keyof DB, OP extends OutputPrefix = OutputPrefix> = (eb: ExpressionBuilder<OutputDatabase<DB, TB, OP>, OP>) => ReadonlyArray<OutputExpression<DB, TB, OP>>;
12690
12690
  type SelectExpressionFromOutputExpression<OE> = OE extends `${OutputPrefix}.${infer C}` ? C : OE;
@@ -13691,7 +13691,7 @@ declare class InsertQueryBuilder<DB, TB extends keyof DB, O> implements Returnin
13691
13691
  * }>
13692
13692
  * ```
13693
13693
  */
13694
- $if<O2>(condition: boolean, func: (qb: this) => InsertQueryBuilder<any, any, O2>): O2 extends InsertResult ? InsertQueryBuilder<DB, TB, InsertResult> : O2 extends O & infer E ? InsertQueryBuilder<DB, TB, O & Partial<E>> : InsertQueryBuilder<DB, TB, Partial<O2>>;
13694
+ $if<O2>(condition: boolean, func: (qb: this) => InsertQueryBuilder<any, any, O2>): O2 extends InsertResult ? InsertQueryBuilder<DB, TB, InsertResult> : O2 extends O & (infer E) ? InsertQueryBuilder<DB, TB, O & Partial<E>> : InsertQueryBuilder<DB, TB, Partial<O2>>;
13695
13695
  /**
13696
13696
  * Change the output type of the query.
13697
13697
  *
@@ -15029,7 +15029,7 @@ declare class UpdateQueryBuilder<DB, UT extends keyof DB, TB extends keyof DB, O
15029
15029
  * }>
15030
15030
  * ```
15031
15031
  */
15032
- $if<O2>(condition: boolean, func: (qb: this) => UpdateQueryBuilder<any, any, any, O2>): O2 extends UpdateResult ? UpdateQueryBuilder<DB, UT, TB, UpdateResult> : O2 extends O & infer E ? UpdateQueryBuilder<DB, UT, TB, O & Partial<E>> : UpdateQueryBuilder<DB, UT, TB, Partial<O2>>;
15032
+ $if<O2>(condition: boolean, func: (qb: this) => UpdateQueryBuilder<any, any, any, O2>): O2 extends UpdateResult ? UpdateQueryBuilder<DB, UT, TB, UpdateResult> : O2 extends O & (infer E) ? UpdateQueryBuilder<DB, UT, TB, O & Partial<E>> : UpdateQueryBuilder<DB, UT, TB, Partial<O2>>;
15033
15033
  /**
15034
15034
  * Change the output type of the query.
15035
15035
  *
@@ -15248,16 +15248,16 @@ interface UpdateQueryBuilderProps {
15248
15248
  }
15249
15249
  type UpdateQueryBuilderWithInnerJoin<DB, UT extends keyof DB, TB extends keyof DB, O, TE extends TableExpression<DB, TB>> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? InnerJoinedBuilder$1<DB, UT, TB, O, A, DB[T]> : never : TE extends keyof DB ? UpdateQueryBuilder<DB, UT, TB | TE, O> : TE extends AliasedExpression<infer QO, infer QA> ? InnerJoinedBuilder$1<DB, UT, TB, O, QA, QO> : TE extends ((qb: any) => AliasedExpression<infer QO, infer QA>) ? InnerJoinedBuilder$1<DB, UT, TB, O, QA, QO> : never;
15250
15250
  type InnerJoinedBuilder$1<DB, UT extends keyof DB, TB extends keyof DB, O, A extends string, R> = A extends keyof DB ? UpdateQueryBuilder<InnerJoinedDB$1<DB, A, R>, UT, TB | A, O> : UpdateQueryBuilder<DB & ShallowRecord<A, R>, UT, TB | A, O>;
15251
- type InnerJoinedDB$1<DB, A extends string, R> = DrainOuterGeneric<{ [C in keyof DB | A]: C extends A ? R : C extends keyof DB ? DB[C] : never }>;
15251
+ type InnerJoinedDB$1<DB, A extends string, R> = DrainOuterGeneric<{ [C in keyof DB | A]: C extends A ? R : C extends keyof DB ? DB[C] : never; }>;
15252
15252
  type UpdateQueryBuilderWithLeftJoin<DB, UT extends keyof DB, TB extends keyof DB, O, TE extends TableExpression<DB, TB>> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? LeftJoinedBuilder$1<DB, UT, TB, O, A, DB[T]> : never : TE extends keyof DB ? LeftJoinedBuilder$1<DB, UT, TB, O, TE, DB[TE]> : TE extends AliasedExpression<infer QO, infer QA> ? LeftJoinedBuilder$1<DB, UT, TB, O, QA, QO> : TE extends ((qb: any) => AliasedExpression<infer QO, infer QA>) ? LeftJoinedBuilder$1<DB, UT, TB, O, QA, QO> : never;
15253
15253
  type LeftJoinedBuilder$1<DB, UT extends keyof DB, TB extends keyof DB, O, A extends keyof any, R> = A extends keyof DB ? UpdateQueryBuilder<LeftJoinedDB$1<DB, A, R>, UT, TB | A, O> : UpdateQueryBuilder<DB & ShallowRecord<A, Nullable<R>>, UT, TB | A, O>;
15254
- type LeftJoinedDB$1<DB, A extends keyof any, R> = DrainOuterGeneric<{ [C in keyof DB | A]: C extends A ? Nullable<R> : C extends keyof DB ? DB[C] : never }>;
15254
+ type LeftJoinedDB$1<DB, A extends keyof any, R> = DrainOuterGeneric<{ [C in keyof DB | A]: C extends A ? Nullable<R> : C extends keyof DB ? DB[C] : never; }>;
15255
15255
  type UpdateQueryBuilderWithRightJoin<DB, UT extends keyof DB, TB extends keyof DB, O, TE extends TableExpression<DB, TB>> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? RightJoinedBuilder$1<DB, UT, TB, O, A, DB[T]> : never : TE extends keyof DB ? RightJoinedBuilder$1<DB, UT, TB, O, TE, DB[TE]> : TE extends AliasedExpression<infer QO, infer QA> ? RightJoinedBuilder$1<DB, UT, TB, O, QA, QO> : TE extends ((qb: any) => AliasedExpression<infer QO, infer QA>) ? RightJoinedBuilder$1<DB, UT, TB, O, QA, QO> : never;
15256
15256
  type RightJoinedBuilder$1<DB, UT extends keyof DB, TB extends keyof DB, O, A extends keyof any, R> = UpdateQueryBuilder<RightJoinedDB$1<DB, TB, A, R>, UT, TB | A, O>;
15257
- type RightJoinedDB$1<DB, TB extends keyof DB, A extends keyof any, R> = DrainOuterGeneric<{ [C in keyof DB | A]: C extends A ? R : C extends TB ? Nullable<DB[C]> : C extends keyof DB ? DB[C] : never }>;
15257
+ type RightJoinedDB$1<DB, TB extends keyof DB, A extends keyof any, R> = DrainOuterGeneric<{ [C in keyof DB | A]: C extends A ? R : C extends TB ? Nullable<DB[C]> : C extends keyof DB ? DB[C] : never; }>;
15258
15258
  type UpdateQueryBuilderWithFullJoin<DB, UT extends keyof DB, TB extends keyof DB, O, TE extends TableExpression<DB, TB>> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? OuterJoinedBuilder$1<DB, UT, TB, O, A, DB[T]> : never : TE extends keyof DB ? OuterJoinedBuilder$1<DB, UT, TB, O, TE, DB[TE]> : TE extends AliasedExpression<infer QO, infer QA> ? OuterJoinedBuilder$1<DB, UT, TB, O, QA, QO> : TE extends ((qb: any) => AliasedExpression<infer QO, infer QA>) ? OuterJoinedBuilder$1<DB, UT, TB, O, QA, QO> : never;
15259
15259
  type OuterJoinedBuilder$1<DB, UT extends keyof DB, TB extends keyof DB, O, A extends keyof any, R> = UpdateQueryBuilder<OuterJoinedBuilderDB$1<DB, TB, A, R>, UT, TB | A, O>;
15260
- type OuterJoinedBuilderDB$1<DB, TB extends keyof DB, A extends keyof any, R> = DrainOuterGeneric<{ [C in keyof DB | A]: C extends A ? Nullable<R> : C extends TB ? Nullable<DB[C]> : C extends keyof DB ? DB[C] : never }>;
15260
+ type OuterJoinedBuilderDB$1<DB, TB extends keyof DB, A extends keyof any, R> = DrainOuterGeneric<{ [C in keyof DB | A]: C extends A ? Nullable<R> : C extends TB ? Nullable<DB[C]> : C extends keyof DB ? DB[C] : never; }>;
15261
15261
  //#endregion
15262
15262
  //#region ../../node_modules/.pnpm/kysely@0.28.16/node_modules/kysely/dist/esm/query-builder/delete-query-builder.d.ts
15263
15263
  declare class DeleteQueryBuilder<DB, TB extends keyof DB, O> implements WhereInterface<DB, TB>, MultiTableReturningInterface<DB, TB, O>, OutputInterface<DB, TB, O, 'deleted'>, OrderByInterface<DB, TB, {}>, OperationNodeSource, Compilable<O>, Explainable, Streamable<O> {
@@ -16360,7 +16360,7 @@ declare class DeleteQueryBuilder<DB, TB extends keyof DB, O> implements WhereInt
16360
16360
  * }>
16361
16361
  * ```
16362
16362
  */
16363
- $if<O2>(condition: boolean, func: (qb: this) => DeleteQueryBuilder<any, any, O2>): O2 extends DeleteResult ? DeleteQueryBuilder<DB, TB, DeleteResult> : O2 extends O & infer E ? DeleteQueryBuilder<DB, TB, O & Partial<E>> : DeleteQueryBuilder<DB, TB, Partial<O2>>;
16363
+ $if<O2>(condition: boolean, func: (qb: this) => DeleteQueryBuilder<any, any, O2>): O2 extends DeleteResult ? DeleteQueryBuilder<DB, TB, DeleteResult> : O2 extends O & (infer E) ? DeleteQueryBuilder<DB, TB, O & Partial<E>> : DeleteQueryBuilder<DB, TB, Partial<O2>>;
16364
16364
  /**
16365
16365
  * Change the output type of the query.
16366
16366
  *
@@ -16561,16 +16561,16 @@ interface DeleteQueryBuilderProps {
16561
16561
  }
16562
16562
  type DeleteQueryBuilderWithInnerJoin<DB, TB extends keyof DB, O, TE extends TableExpression<DB, TB>> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? InnerJoinedBuilder<DB, TB, O, A, DB[T]> : never : TE extends keyof DB ? DeleteQueryBuilder<DB, TB | TE, O> : TE extends AliasedExpression<infer QO, infer QA> ? InnerJoinedBuilder<DB, TB, O, QA, QO> : TE extends ((qb: any) => AliasedExpression<infer QO, infer QA>) ? InnerJoinedBuilder<DB, TB, O, QA, QO> : never;
16563
16563
  type InnerJoinedBuilder<DB, TB extends keyof DB, O, A extends string, R> = A extends keyof DB ? DeleteQueryBuilder<InnerJoinedDB<DB, A, R>, TB | A, O> : DeleteQueryBuilder<DB & ShallowRecord<A, R>, TB | A, O>;
16564
- type InnerJoinedDB<DB, A extends string, R> = DrainOuterGeneric<{ [C in keyof DB | A]: C extends A ? R : C extends keyof DB ? DB[C] : never }>;
16564
+ type InnerJoinedDB<DB, A extends string, R> = DrainOuterGeneric<{ [C in keyof DB | A]: C extends A ? R : C extends keyof DB ? DB[C] : never; }>;
16565
16565
  type DeleteQueryBuilderWithLeftJoin<DB, TB extends keyof DB, O, TE extends TableExpression<DB, TB>> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? LeftJoinedBuilder<DB, TB, O, A, DB[T]> : never : TE extends keyof DB ? LeftJoinedBuilder<DB, TB, O, TE, DB[TE]> : TE extends AliasedExpression<infer QO, infer QA> ? LeftJoinedBuilder<DB, TB, O, QA, QO> : TE extends ((qb: any) => AliasedExpression<infer QO, infer QA>) ? LeftJoinedBuilder<DB, TB, O, QA, QO> : never;
16566
16566
  type LeftJoinedBuilder<DB, TB extends keyof DB, O, A extends keyof any, R> = A extends keyof DB ? DeleteQueryBuilder<LeftJoinedDB<DB, A, R>, TB | A, O> : DeleteQueryBuilder<DB & ShallowRecord<A, Nullable<R>>, TB | A, O>;
16567
- type LeftJoinedDB<DB, A extends keyof any, R> = DrainOuterGeneric<{ [C in keyof DB | A]: C extends A ? Nullable<R> : C extends keyof DB ? DB[C] : never }>;
16567
+ type LeftJoinedDB<DB, A extends keyof any, R> = DrainOuterGeneric<{ [C in keyof DB | A]: C extends A ? Nullable<R> : C extends keyof DB ? DB[C] : never; }>;
16568
16568
  type DeleteQueryBuilderWithRightJoin<DB, TB extends keyof DB, O, TE extends TableExpression<DB, TB>> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? RightJoinedBuilder<DB, TB, O, A, DB[T]> : never : TE extends keyof DB ? RightJoinedBuilder<DB, TB, O, TE, DB[TE]> : TE extends AliasedExpression<infer QO, infer QA> ? RightJoinedBuilder<DB, TB, O, QA, QO> : TE extends ((qb: any) => AliasedExpression<infer QO, infer QA>) ? RightJoinedBuilder<DB, TB, O, QA, QO> : never;
16569
16569
  type RightJoinedBuilder<DB, TB extends keyof DB, O, A extends keyof any, R> = DeleteQueryBuilder<RightJoinedDB<DB, TB, A, R>, TB | A, O>;
16570
- type RightJoinedDB<DB, TB extends keyof DB, A extends keyof any, R> = DrainOuterGeneric<{ [C in keyof DB | A]: C extends A ? R : C extends TB ? Nullable<DB[C]> : C extends keyof DB ? DB[C] : never }>;
16570
+ type RightJoinedDB<DB, TB extends keyof DB, A extends keyof any, R> = DrainOuterGeneric<{ [C in keyof DB | A]: C extends A ? R : C extends TB ? Nullable<DB[C]> : C extends keyof DB ? DB[C] : never; }>;
16571
16571
  type DeleteQueryBuilderWithFullJoin<DB, TB extends keyof DB, O, TE extends TableExpression<DB, TB>> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? OuterJoinedBuilder<DB, TB, O, A, DB[T]> : never : TE extends keyof DB ? OuterJoinedBuilder<DB, TB, O, TE, DB[TE]> : TE extends AliasedExpression<infer QO, infer QA> ? OuterJoinedBuilder<DB, TB, O, QA, QO> : TE extends ((qb: any) => AliasedExpression<infer QO, infer QA>) ? OuterJoinedBuilder<DB, TB, O, QA, QO> : never;
16572
16572
  type OuterJoinedBuilder<DB, TB extends keyof DB, O, A extends keyof any, R> = DeleteQueryBuilder<OuterJoinedBuilderDB<DB, TB, A, R>, TB | A, O>;
16573
- type OuterJoinedBuilderDB<DB, TB extends keyof DB, A extends keyof any, R> = DrainOuterGeneric<{ [C in keyof DB | A]: C extends A ? Nullable<R> : C extends TB ? Nullable<DB[C]> : C extends keyof DB ? DB[C] : never }>;
16573
+ type OuterJoinedBuilderDB<DB, TB extends keyof DB, A extends keyof any, R> = DrainOuterGeneric<{ [C in keyof DB | A]: C extends A ? Nullable<R> : C extends TB ? Nullable<DB[C]> : C extends keyof DB ? DB[C] : never; }>;
16574
16574
  //#endregion
16575
16575
  //#region ../../node_modules/.pnpm/kysely@0.28.16/node_modules/kysely/dist/esm/query-builder/cte-builder.d.ts
16576
16576
  declare class CTEBuilder<N extends string> implements OperationNodeSource {
@@ -16593,8 +16593,8 @@ type CTEBuilderCallback<N extends string> = (cte: <N2 extends string>(name: N2)
16593
16593
  //#endregion
16594
16594
  //#region ../../node_modules/.pnpm/kysely@0.28.16/node_modules/kysely/dist/esm/parser/with-parser.d.ts
16595
16595
  type CommonTableExpression<DB, CN extends string> = (creator: QueryCreator<DB>) => CommonTableExpressionOutput<DB, CN>;
16596
- type RecursiveCommonTableExpression<DB, CN extends string> = (creator: QueryCreator<DB & { [K in ExtractTableFromCommonTableExpressionName<CN>]: ExtractRowFromCommonTableExpressionName<CN> }>) => CommonTableExpressionOutput<DB, CN>;
16597
- type QueryCreatorWithCommonTableExpression<DB, CN extends string, CTE> = QueryCreator<DB & { [K in ExtractTableFromCommonTableExpressionName<CN>]: ExtractRowFromCommonTableExpression<CTE> }>;
16596
+ type RecursiveCommonTableExpression<DB, CN extends string> = (creator: QueryCreator<DB & { [K in ExtractTableFromCommonTableExpressionName<CN>]: ExtractRowFromCommonTableExpressionName<CN>; }>) => CommonTableExpressionOutput<DB, CN>;
16597
+ type QueryCreatorWithCommonTableExpression<DB, CN extends string, CTE> = QueryCreator<DB & { [K in ExtractTableFromCommonTableExpressionName<CN>]: ExtractRowFromCommonTableExpression<CTE>; }>;
16598
16598
  type CommonTableExpressionOutput<DB, CN extends string> = Expression<ExtractRowFromCommonTableExpressionName<CN>> | InsertQueryBuilder<DB, any, ExtractRowFromCommonTableExpressionName<CN>> | UpdateQueryBuilder<DB, any, any, ExtractRowFromCommonTableExpressionName<CN>> | DeleteQueryBuilder<DB, any, ExtractRowFromCommonTableExpressionName<CN>>;
16599
16599
  /**
16600
16600
  * Given a common CommonTableExpression CTE extracts the row type from it.
@@ -16616,7 +16616,7 @@ type ExtractTableFromCommonTableExpressionName<CN extends string> = CN extends `
16616
16616
  * }
16617
16617
  *
16618
16618
  */
16619
- type ExtractRowFromCommonTableExpressionName<CN extends string> = CN extends `${string}(${infer CL})` ? { [C in ExtractColumnNamesFromColumnList<CL>]: any } : ShallowRecord<string, any>;
16619
+ type ExtractRowFromCommonTableExpressionName<CN extends string> = CN extends `${string}(${infer CL})` ? { [C in ExtractColumnNamesFromColumnList<CL>]: any; } : ShallowRecord<string, any>;
16620
16620
  /**
16621
16621
  * Parses a string like 'id, first_name' into a type 'id' | 'first_name'
16622
16622
  */
@@ -17386,7 +17386,7 @@ declare class WheneableMergeQueryBuilder<DB, TT extends keyof DB, ST extends key
17386
17386
  * }>
17387
17387
  * ```
17388
17388
  */
17389
- $if<O2>(condition: boolean, func: (qb: this) => WheneableMergeQueryBuilder<any, any, any, O2>): O2 extends MergeResult ? WheneableMergeQueryBuilder<DB, TT, ST, MergeResult> : O2 extends O & infer E ? WheneableMergeQueryBuilder<DB, TT, ST, O & Partial<E>> : WheneableMergeQueryBuilder<DB, TT, ST, Partial<O2>>;
17389
+ $if<O2>(condition: boolean, func: (qb: this) => WheneableMergeQueryBuilder<any, any, any, O2>): O2 extends MergeResult ? WheneableMergeQueryBuilder<DB, TT, ST, MergeResult> : O2 extends O & (infer E) ? WheneableMergeQueryBuilder<DB, TT, ST, O & Partial<E>> : WheneableMergeQueryBuilder<DB, TT, ST, Partial<O2>>;
17390
17390
  toOperationNode(): MergeQueryNode;
17391
17391
  compile(): CompiledQuery<O>;
17392
17392
  /**
@@ -19046,9 +19046,9 @@ declare class Command<T> {
19046
19046
  }
19047
19047
  //#endregion
19048
19048
  //#region src/reactor/workflow-triggers-read-model.d.ts
19049
- declare const WORKFLOW_TRIGGERS_READ_MODEL = "workflow-triggers";
19050
- declare const WORKFLOW_TRIGGERS_READ_MODEL_STAGE: ReadModelRegistrationStage;
19051
- declare class WorkflowTriggersReadModel extends BaseReadModel {
19049
+ export declare const WORKFLOW_TRIGGERS_READ_MODEL = "workflow-triggers";
19050
+ export declare const WORKFLOW_TRIGGERS_READ_MODEL_STAGE: ReadModelRegistrationStage;
19051
+ export declare class WorkflowTriggersReadModel extends BaseReadModel {
19052
19052
  private readonly runtime;
19053
19053
  private freshRegistration;
19054
19054
  constructor(db: Kysely<DocumentViewDatabase>, operationIndex: IOperationIndex, writeCache: IWriteCache, consistencyTracker: IConsistencyTracker, runtime: WorkflowRuntimeService);
@@ -19085,5 +19085,6 @@ interface WebhookPayload {
19085
19085
  body: unknown;
19086
19086
  }
19087
19087
  //#endregion
19088
- export { type AttachmentClientLike, type ConnectionCheckResult, type ConnectionSummary, type PersistedRunResult, PieceRegistry, type PieceStoreRow, type PieceTriggerBinding, type RunRow, type ScheduleTriggerBinding, type StepExecutionRow, type TriggerBinding, type TriggerDedupeRow, type TriggerStateRow, WORKFLOW_PACKAGE_NAME, WORKFLOW_TRIGGERS_READ_MODEL, WORKFLOW_TRIGGERS_READ_MODEL_STAGE, type WebhookConfig, type WebhookPayload, type WorkflowCaller, type WorkflowRuntimeDB, type WorkflowRuntimeHostDeps, WorkflowRuntimeService, WorkflowTriggersReadModel, createAttachmentPort, createWorkflowRuntime, packagePieces, setPieceRegistryUrl };
19088
+ export { type AttachmentClientLike, type ConnectionCheckResult, type ConnectionSummary, type PersistedRunResult, PieceRegistry, type PieceStoreRow, type PieceTriggerBinding, type RunRow, type ScheduleTriggerBinding, type StepExecutionRow, type TriggerBinding, type TriggerDedupeRow, type TriggerStateRow, type WebhookConfig, type WebhookPayload, type WorkflowCaller, type WorkflowRuntimeDB, type WorkflowRuntimeHostDeps, packagePieces };
19089
+ export {};
19089
19090
  //# sourceMappingURL=index.d.ts.map