Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
19f6897
feat: add RuntimeClient, RuntimeProvider, and ConnectRPC proto gen (P…
ericpgreen2 Feb 24, 2026
ba367e8
feat: add TanStack Query hook code generator (Phase 2)
ericpgreen2 Feb 24, 2026
8cdc22d
feat: update invalidation and query matching for dual key formats (Ph…
ericpgreen2 Feb 24, 2026
3aaa80d
fix: resolve type errors in generated query hooks
ericpgreen2 Feb 24, 2026
366c809
fix: prevent reactive loop in runtime store bridge
ericpgreen2 Feb 24, 2026
13adf06
feat: add JSON bridge to v2 code generator (Phase 4)
ericpgreen2 Feb 24, 2026
243dd49
feat: add generic TData support to v2 query hooks for select transforms
ericpgreen2 Feb 24, 2026
a77cf00
fix: strip undefined values before proto fromJson in JSON bridge
ericpgreen2 Feb 24, 2026
369e0b5
fix: emit default values in proto toJson to match gRPC-Gateway output
ericpgreen2 Feb 24, 2026
301244f
fix: deep-strip undefined values in `stripUndefined` for nested reque…
ericpgreen2 Feb 24, 2026
840e757
feat: port request queue to ConnectRPC transport interceptor
ericpgreen2 Feb 25, 2026
ae800e0
refactor: migrate connectors and column-profile to v2 RuntimeClient
ericpgreen2 Feb 24, 2026
d760301
refactor: migrate more connectors components to v2 RuntimeClient
ericpgreen2 Feb 24, 2026
133a411
refactor: migrate column-profile, canvas, and remaining connectors to…
ericpgreen2 Feb 24, 2026
fafeda1
fix: restore select transforms now that v2 hooks support generic TData
ericpgreen2 Feb 24, 2026
46ae340
refactor: migrate chart providers and canvas leaf components to v2 Ru…
ericpgreen2 Feb 24, 2026
25a80d1
refactor: add runtimeClient to dashboard StateManagers and migrate co…
ericpgreen2 Feb 24, 2026
8392af2
refactor: migrate dashboard time-series and selector modules to v2 Ru…
ericpgreen2 Feb 24, 2026
b65d646
refactor: migrate dashboard Svelte components from runtime store to u…
ericpgreen2 Feb 24, 2026
e7bc93b
fix: update test infrastructure for v2 ConnectRPC hooks
ericpgreen2 Feb 24, 2026
2267e4d
refactor: migrate export and pivot-query modules from runtime store t…
ericpgreen2 Feb 24, 2026
d4e0b17
refactor: migrate time controls and time ranges from runtime store to…
ericpgreen2 Feb 24, 2026
bfe9b4b
refactor: migrate canvas, explores, and state-managers from runtime s…
ericpgreen2 Feb 24, 2026
5947503
refactor: thread `RuntimeClient` through `.ts` query factories and re…
ericpgreen2 Feb 24, 2026
fb10785
refactor: migrate web-common features from `runtime` store to `Runtim…
ericpgreen2 Feb 25, 2026
fe3b390
fix: update conversation tests to use mock `RuntimeClient`
ericpgreen2 Feb 25, 2026
2102ddd
refactor: migrate remaining `.ts` modules from runtime store to Runti…
ericpgreen2 Feb 25, 2026
8061a16
refactor: cleanup — migrate embed to v2 RuntimeProvider, delete old p…
ericpgreen2 Feb 25, 2026
2b11911
refactor: delete unused `StreamingQueryBatch` and fix `createDownload…
ericpgreen2 Feb 25, 2026
b777e09
refactor: migrate remaining legacy consumers + delete Orval gen and h…
ericpgreen2 Feb 25, 2026
63c62ba
fix: three UXQA bugs — empty GetFile path, missing TableCardinality p…
ericpgreen2 Feb 26, 2026
b1dd0f6
fix: resolve TypeScript and svelte-check errors from v2 migration
ericpgreen2 Feb 26, 2026
4ddc1d5
fix: provide RuntimeClient to TopNavigationBar via global store
ericpgreen2 Feb 26, 2026
def18ff
fix: prevent infinite SSE reconnection loop when server closes immedi…
ericpgreen2 Feb 26, 2026
3ade689
fix: pass JWT to SSE log connection and forward options to fetch client
ericpgreen2 Feb 26, 2026
4338016
fix: retarget barrel to v2/gen and fix remaining legacy imports
ericpgreen2 Feb 26, 2026
2192094
refactor: migrate all remaining consumers to v2 RuntimeClient signatures
ericpgreen2 Feb 26, 2026
6fa0bcb
fix: resolve all svelte-check and unit test errors from v2 migration
ericpgreen2 Feb 26, 2026
826b3dd
merge: resolve conflicts from main, migrate generateCanvas.ts to v2 R…
ericpgreen2 Feb 26, 2026
9c65c7b
fix: resolve remaining v2 RuntimeClient migration errors blocking build
ericpgreen2 Feb 26, 2026
9e022c6
fix: remove dead `instanceId` vars and fix remaining v2 call signatures
ericpgreen2 Feb 26, 2026
5213771
fix: remove unused `runtimeClient` in `NavFile`, fix `$lib` alias in …
ericpgreen2 Feb 26, 2026
a1ca2fd
fix: allow empty-string host in RuntimeProvider, fix `client` arg in …
ericpgreen2 Feb 26, 2026
3f2591f
fix: set `FileArtifacts` client synchronously to prevent undefined ac…
ericpgreen2 Feb 26, 2026
ca80172
fix: validate `RuntimeClient` constructor args, remove redundant temp…
ericpgreen2 Feb 26, 2026
5a3a103
fix: replace manual REST `fetch()` calls with v2 RPC, remove dead que…
ericpgreen2 Feb 27, 2026
7fa13bd
fix: update web-local for v2 RPC compatibility
ericpgreen2 Feb 27, 2026
0a02a6a
fix: handle ConnectRPC errors in REST-style error checks
ericpgreen2 Feb 27, 2026
12fec35
fix: replace REST-style error handling with ConnectRPC-compatible uti…
ericpgreen2 Feb 27, 2026
fc5e973
fix: update timeseries e2e test to match ConnectRPC URL pattern
ericpgreen2 Feb 27, 2026
23459c0
fix: guard `RuntimeProvider` mount until runtime connection props res…
ericpgreen2 Feb 27, 2026
cb82774
fix: use `runtimeClientStore` in `ProjectGlobalStatusIndicator` and e…
ericpgreen2 Feb 27, 2026
fe517ce
merge main, resolve conflict in `DeploymentSection.svelte`
ericpgreen2 Feb 27, 2026
a5ff1dc
fix: `Heap.delete` must try `moveUp` before `moveDown`
ericpgreen2 Mar 2, 2026
c244546
fix: `removeByName` must reject pending promises before deleting
ericpgreen2 Mar 2, 2026
d703a07
refactor: use `async/await` in generated base functions
ericpgreen2 Mar 2, 2026
3f2c517
fix: guard `runtimeClientStore` clear against stale identity
ericpgreen2 Mar 2, 2026
ef2e38f
chore: remove `frontend.md` from this branch
ericpgreen2 Mar 2, 2026
5a71e78
chore: restore `generate:runtime-client` script name, document Orval …
ericpgreen2 Mar 2, 2026
e8ef7ca
fix: add 60s timeout to `waitForFreshJwt`
ericpgreen2 Mar 2, 2026
e3d528c
fix: add `RequestQueue.clear()` and use it in `dispose()`
ericpgreen2 Mar 2, 2026
e7d4ac8
fix: tear down `featureFlags` subscription on RuntimeProvider unmount
ericpgreen2 Mar 2, 2026
da3fcd5
fix: remove unused `prioritiseColumn` from `RequestQueue`
ericpgreen2 Mar 2, 2026
a9b85ed
fix: skip generating hooks for instance-management methods
ericpgreen2 Mar 2, 2026
4974e52
chore: move query hooks generator into `runtime-client/v2/`
ericpgreen2 Mar 2, 2026
04fccc4
refactor: adopt `ConnectError` as the TanStack Query error type
ericpgreen2 Mar 2, 2026
b1f0e97
fix: update `smartRefetchIntervalFunc` and `useCanvas` to use `Connec…
ericpgreen2 Mar 2, 2026
ff41139
chore: standardize import paths to use runtime-client barrel
ericpgreen2 Mar 2, 2026
674d583
fix: use extractErrorMessage in RenameAssetModal
ericpgreen2 Mar 2, 2026
fc5c049
test: add tests for query hooks code generator
ericpgreen2 Mar 2, 2026
2411e80
merge main, resolve conflicts from MeasureChart refactor (#8752)
ericpgreen2 Mar 3, 2026
c380c52
fix: convert Luxon DateTimes to UTC before `.toISO()` for proto Times…
ericpgreen2 Mar 3, 2026
765c697
fix: detect empty time range from access controls with ConnectRPC
ericpgreen2 Mar 3, 2026
3598037
fix: unit test failures in DashboardStateManager
ericpgreen2 Mar 3, 2026
300b6a9
merge main, resolve conflicts from generateCanvas feature flag removal
ericpgreen2 Mar 4, 2026
15583f7
refactor: unify runtime client access with cached `getRuntimeClient()…
ericpgreen2 Mar 4, 2026
289fb55
refactor: add infinite query codegen, reorganize into `codegen/` fold…
ericpgreen2 Mar 5, 2026
f8e0c0f
fix: silently return from `waitForFreshJwt` on dispose instead of thr…
ericpgreen2 Mar 5, 2026
4bd65d8
merge main, resolve conflicts in AddData form and code-utils
ericpgreen2 Mar 5, 2026
23dfbd3
fix: remove unused `serviceName` variable in `generateInfiniteQueryMe…
ericpgreen2 Mar 5, 2026
58b0021
Potential fix for code scanning alert no. 52: Shell command built fro…
ericpgreen2 Mar 5, 2026
eea3712
fix: use `execFileSync` instead of `execSync` to avoid shell injectio…
ericpgreen2 Mar 5, 2026
9ca869d
fix: tighten `waitForFreshJwt` warning window and throw AbortError on…
ericpgreen2 Mar 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: add generic TData support to v2 query hooks for select transforms
The generated hooks now accept a TData type parameter (defaulting to the
response type), enabling select transforms that narrow the return type.
This mirrors the Orval pattern and avoids forcing consumers to use
derived stores as workarounds.
  • Loading branch information
ericpgreen2 committed Feb 26, 2026
commit 243dd495c2b8f74b5c2c8433cc4a0ce5526fe228
18 changes: 9 additions & 9 deletions web-common/scripts/generate-query-hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,15 +287,15 @@ function generateServiceFile(service: ServiceDef): string {
``,
);

// Tier 3: Query options
// Tier 3: Query options (generic TData for select support)
lines.push(
`export function ${optsFnName}(`,
`export function ${optsFnName}<TData = ${responseType}>(`,
` client: RuntimeClient,`,
` request: ${requestType},`,
` options?: {`,
` query?: Partial<CreateQueryOptions<${responseType}>>;`,
` query?: Partial<CreateQueryOptions<${responseType}, Error, TData>>;`,
` },`,
`): CreateQueryOptions<${responseType}> & { queryKey: QueryKey } {`,
`): CreateQueryOptions<${responseType}, Error, TData> & { queryKey: QueryKey } {`,
` const queryKey = ${keyFnName}(client.instanceId, request);`,
` const queryFn: QueryFunction<${responseType}> = ({ signal }) =>`,
` ${fullName}(client, request, { signal });`,
Expand All @@ -304,21 +304,21 @@ function generateServiceFile(service: ServiceDef): string {
` queryFn,`,
` enabled: !!client.instanceId,`,
` ...options?.query,`,
` };`,
` } as CreateQueryOptions<${responseType}, Error, TData> & { queryKey: QueryKey };`,
`}`,
``,
);

// Tier 4: Convenience hook
// Tier 4: Convenience hook (generic TData for select support)
lines.push(
`export function ${hookName}(`,
`export function ${hookName}<TData = ${responseType}>(`,
` client: RuntimeClient,`,
` request: ${requestType},`,
` options?: {`,
` query?: Partial<CreateQueryOptions<${responseType}>>;`,
` query?: Partial<CreateQueryOptions<${responseType}, Error, TData>>;`,
` },`,
` queryClient?: QueryClient,`,
`): CreateQueryResult<${responseType}> {`,
`): CreateQueryResult<TData, Error> {`,
` const queryOptions = ${optsFnName}(client, request, options);`,
` return createQuery(queryOptions, queryClient);`,
`}`,
Expand Down
140 changes: 98 additions & 42 deletions web-common/src/runtime-client/v2/gen/connector-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,17 @@ export function getConnectorServiceListBucketsQueryKey(
] as const;
}

export function getConnectorServiceListBucketsQueryOptions(
export function getConnectorServiceListBucketsQueryOptions<
TData = V1ListBucketsResponse,
>(
client: RuntimeClient,
request: Omit<PartialMessage<ListBucketsRequest>, "instanceId">,
options?: {
query?: Partial<CreateQueryOptions<V1ListBucketsResponse>>;
query?: Partial<CreateQueryOptions<V1ListBucketsResponse, Error, TData>>;
},
): CreateQueryOptions<V1ListBucketsResponse> & { queryKey: QueryKey } {
): CreateQueryOptions<V1ListBucketsResponse, Error, TData> & {
queryKey: QueryKey;
} {
const queryKey = getConnectorServiceListBucketsQueryKey(
client.instanceId,
request,
Expand All @@ -81,17 +85,21 @@ export function getConnectorServiceListBucketsQueryOptions(
queryFn,
enabled: !!client.instanceId,
...options?.query,
} as CreateQueryOptions<V1ListBucketsResponse, Error, TData> & {
queryKey: QueryKey;
};
}

export function createConnectorServiceListBuckets(
export function createConnectorServiceListBuckets<
TData = V1ListBucketsResponse,
>(
client: RuntimeClient,
request: Omit<PartialMessage<ListBucketsRequest>, "instanceId">,
options?: {
query?: Partial<CreateQueryOptions<V1ListBucketsResponse>>;
query?: Partial<CreateQueryOptions<V1ListBucketsResponse, Error, TData>>;
},
queryClient?: QueryClient,
): CreateQueryResult<V1ListBucketsResponse> {
): CreateQueryResult<TData, Error> {
const queryOptions = getConnectorServiceListBucketsQueryOptions(
client,
request,
Expand Down Expand Up @@ -131,13 +139,17 @@ export function getConnectorServiceListObjectsQueryKey(
] as const;
}

export function getConnectorServiceListObjectsQueryOptions(
export function getConnectorServiceListObjectsQueryOptions<
TData = V1ListObjectsResponse,
>(
client: RuntimeClient,
request: Omit<PartialMessage<ListObjectsRequest>, "instanceId">,
options?: {
query?: Partial<CreateQueryOptions<V1ListObjectsResponse>>;
query?: Partial<CreateQueryOptions<V1ListObjectsResponse, Error, TData>>;
},
): CreateQueryOptions<V1ListObjectsResponse> & { queryKey: QueryKey } {
): CreateQueryOptions<V1ListObjectsResponse, Error, TData> & {
queryKey: QueryKey;
} {
const queryKey = getConnectorServiceListObjectsQueryKey(
client.instanceId,
request,
Expand All @@ -149,17 +161,21 @@ export function getConnectorServiceListObjectsQueryOptions(
queryFn,
enabled: !!client.instanceId,
...options?.query,
} as CreateQueryOptions<V1ListObjectsResponse, Error, TData> & {
queryKey: QueryKey;
};
}

export function createConnectorServiceListObjects(
export function createConnectorServiceListObjects<
TData = V1ListObjectsResponse,
>(
client: RuntimeClient,
request: Omit<PartialMessage<ListObjectsRequest>, "instanceId">,
options?: {
query?: Partial<CreateQueryOptions<V1ListObjectsResponse>>;
query?: Partial<CreateQueryOptions<V1ListObjectsResponse, Error, TData>>;
},
queryClient?: QueryClient,
): CreateQueryResult<V1ListObjectsResponse> {
): CreateQueryResult<TData, Error> {
const queryOptions = getConnectorServiceListObjectsQueryOptions(
client,
request,
Expand Down Expand Up @@ -199,13 +215,17 @@ export function getConnectorServiceOLAPListTablesQueryKey(
] as const;
}

export function getConnectorServiceOLAPListTablesQueryOptions(
export function getConnectorServiceOLAPListTablesQueryOptions<
TData = V1OLAPListTablesResponse,
>(
client: RuntimeClient,
request: Omit<PartialMessage<OLAPListTablesRequest>, "instanceId">,
options?: {
query?: Partial<CreateQueryOptions<V1OLAPListTablesResponse>>;
query?: Partial<CreateQueryOptions<V1OLAPListTablesResponse, Error, TData>>;
},
): CreateQueryOptions<V1OLAPListTablesResponse> & { queryKey: QueryKey } {
): CreateQueryOptions<V1OLAPListTablesResponse, Error, TData> & {
queryKey: QueryKey;
} {
const queryKey = getConnectorServiceOLAPListTablesQueryKey(
client.instanceId,
request,
Expand All @@ -217,17 +237,21 @@ export function getConnectorServiceOLAPListTablesQueryOptions(
queryFn,
enabled: !!client.instanceId,
...options?.query,
} as CreateQueryOptions<V1OLAPListTablesResponse, Error, TData> & {
queryKey: QueryKey;
};
}

export function createConnectorServiceOLAPListTables(
export function createConnectorServiceOLAPListTables<
TData = V1OLAPListTablesResponse,
>(
client: RuntimeClient,
request: Omit<PartialMessage<OLAPListTablesRequest>, "instanceId">,
options?: {
query?: Partial<CreateQueryOptions<V1OLAPListTablesResponse>>;
query?: Partial<CreateQueryOptions<V1OLAPListTablesResponse, Error, TData>>;
},
queryClient?: QueryClient,
): CreateQueryResult<V1OLAPListTablesResponse> {
): CreateQueryResult<TData, Error> {
const queryOptions = getConnectorServiceOLAPListTablesQueryOptions(
client,
request,
Expand Down Expand Up @@ -267,13 +291,17 @@ export function getConnectorServiceOLAPGetTableQueryKey(
] as const;
}

export function getConnectorServiceOLAPGetTableQueryOptions(
export function getConnectorServiceOLAPGetTableQueryOptions<
TData = V1OLAPGetTableResponse,
>(
client: RuntimeClient,
request: Omit<PartialMessage<OLAPGetTableRequest>, "instanceId">,
options?: {
query?: Partial<CreateQueryOptions<V1OLAPGetTableResponse>>;
query?: Partial<CreateQueryOptions<V1OLAPGetTableResponse, Error, TData>>;
},
): CreateQueryOptions<V1OLAPGetTableResponse> & { queryKey: QueryKey } {
): CreateQueryOptions<V1OLAPGetTableResponse, Error, TData> & {
queryKey: QueryKey;
} {
const queryKey = getConnectorServiceOLAPGetTableQueryKey(
client.instanceId,
request,
Expand All @@ -285,17 +313,21 @@ export function getConnectorServiceOLAPGetTableQueryOptions(
queryFn,
enabled: !!client.instanceId,
...options?.query,
} as CreateQueryOptions<V1OLAPGetTableResponse, Error, TData> & {
queryKey: QueryKey;
};
}

export function createConnectorServiceOLAPGetTable(
export function createConnectorServiceOLAPGetTable<
TData = V1OLAPGetTableResponse,
>(
client: RuntimeClient,
request: Omit<PartialMessage<OLAPGetTableRequest>, "instanceId">,
options?: {
query?: Partial<CreateQueryOptions<V1OLAPGetTableResponse>>;
query?: Partial<CreateQueryOptions<V1OLAPGetTableResponse, Error, TData>>;
},
queryClient?: QueryClient,
): CreateQueryResult<V1OLAPGetTableResponse> {
): CreateQueryResult<TData, Error> {
const queryOptions = getConnectorServiceOLAPGetTableQueryOptions(
client,
request,
Expand Down Expand Up @@ -335,13 +367,19 @@ export function getConnectorServiceListDatabaseSchemasQueryKey(
] as const;
}

export function getConnectorServiceListDatabaseSchemasQueryOptions(
export function getConnectorServiceListDatabaseSchemasQueryOptions<
TData = V1ListDatabaseSchemasResponse,
>(
client: RuntimeClient,
request: Omit<PartialMessage<ListDatabaseSchemasRequest>, "instanceId">,
options?: {
query?: Partial<CreateQueryOptions<V1ListDatabaseSchemasResponse>>;
query?: Partial<
CreateQueryOptions<V1ListDatabaseSchemasResponse, Error, TData>
>;
},
): CreateQueryOptions<V1ListDatabaseSchemasResponse> & { queryKey: QueryKey } {
): CreateQueryOptions<V1ListDatabaseSchemasResponse, Error, TData> & {
queryKey: QueryKey;
} {
const queryKey = getConnectorServiceListDatabaseSchemasQueryKey(
client.instanceId,
request,
Expand All @@ -353,17 +391,23 @@ export function getConnectorServiceListDatabaseSchemasQueryOptions(
queryFn,
enabled: !!client.instanceId,
...options?.query,
} as CreateQueryOptions<V1ListDatabaseSchemasResponse, Error, TData> & {
queryKey: QueryKey;
};
}

export function createConnectorServiceListDatabaseSchemas(
export function createConnectorServiceListDatabaseSchemas<
TData = V1ListDatabaseSchemasResponse,
>(
client: RuntimeClient,
request: Omit<PartialMessage<ListDatabaseSchemasRequest>, "instanceId">,
options?: {
query?: Partial<CreateQueryOptions<V1ListDatabaseSchemasResponse>>;
query?: Partial<
CreateQueryOptions<V1ListDatabaseSchemasResponse, Error, TData>
>;
},
queryClient?: QueryClient,
): CreateQueryResult<V1ListDatabaseSchemasResponse> {
): CreateQueryResult<TData, Error> {
const queryOptions = getConnectorServiceListDatabaseSchemasQueryOptions(
client,
request,
Expand Down Expand Up @@ -398,13 +442,17 @@ export function getConnectorServiceListTablesQueryKey(
return ["ConnectorService", "listTables", instanceId, request ?? {}] as const;
}

export function getConnectorServiceListTablesQueryOptions(
export function getConnectorServiceListTablesQueryOptions<
TData = V1ListTablesResponse,
>(
client: RuntimeClient,
request: Omit<PartialMessage<ListTablesRequest>, "instanceId">,
options?: {
query?: Partial<CreateQueryOptions<V1ListTablesResponse>>;
query?: Partial<CreateQueryOptions<V1ListTablesResponse, Error, TData>>;
},
): CreateQueryOptions<V1ListTablesResponse> & { queryKey: QueryKey } {
): CreateQueryOptions<V1ListTablesResponse, Error, TData> & {
queryKey: QueryKey;
} {
const queryKey = getConnectorServiceListTablesQueryKey(
client.instanceId,
request,
Expand All @@ -416,17 +464,19 @@ export function getConnectorServiceListTablesQueryOptions(
queryFn,
enabled: !!client.instanceId,
...options?.query,
} as CreateQueryOptions<V1ListTablesResponse, Error, TData> & {
queryKey: QueryKey;
};
}

export function createConnectorServiceListTables(
export function createConnectorServiceListTables<TData = V1ListTablesResponse>(
client: RuntimeClient,
request: Omit<PartialMessage<ListTablesRequest>, "instanceId">,
options?: {
query?: Partial<CreateQueryOptions<V1ListTablesResponse>>;
query?: Partial<CreateQueryOptions<V1ListTablesResponse, Error, TData>>;
},
queryClient?: QueryClient,
): CreateQueryResult<V1ListTablesResponse> {
): CreateQueryResult<TData, Error> {
const queryOptions = getConnectorServiceListTablesQueryOptions(
client,
request,
Expand Down Expand Up @@ -461,13 +511,17 @@ export function getConnectorServiceGetTableQueryKey(
return ["ConnectorService", "getTable", instanceId, request ?? {}] as const;
}

export function getConnectorServiceGetTableQueryOptions(
export function getConnectorServiceGetTableQueryOptions<
TData = V1GetTableResponse,
>(
client: RuntimeClient,
request: Omit<PartialMessage<GetTableRequest>, "instanceId">,
options?: {
query?: Partial<CreateQueryOptions<V1GetTableResponse>>;
query?: Partial<CreateQueryOptions<V1GetTableResponse, Error, TData>>;
},
): CreateQueryOptions<V1GetTableResponse> & { queryKey: QueryKey } {
): CreateQueryOptions<V1GetTableResponse, Error, TData> & {
queryKey: QueryKey;
} {
const queryKey = getConnectorServiceGetTableQueryKey(
client.instanceId,
request,
Expand All @@ -479,17 +533,19 @@ export function getConnectorServiceGetTableQueryOptions(
queryFn,
enabled: !!client.instanceId,
...options?.query,
} as CreateQueryOptions<V1GetTableResponse, Error, TData> & {
queryKey: QueryKey;
};
}

export function createConnectorServiceGetTable(
export function createConnectorServiceGetTable<TData = V1GetTableResponse>(
client: RuntimeClient,
request: Omit<PartialMessage<GetTableRequest>, "instanceId">,
options?: {
query?: Partial<CreateQueryOptions<V1GetTableResponse>>;
query?: Partial<CreateQueryOptions<V1GetTableResponse, Error, TData>>;
},
queryClient?: QueryClient,
): CreateQueryResult<V1GetTableResponse> {
): CreateQueryResult<TData, Error> {
const queryOptions = getConnectorServiceGetTableQueryOptions(
client,
request,
Expand Down
Loading