Skip to content

Commit

Permalink
fix: fix pipeline view issue and catalog missing fileUid
Browse files Browse the repository at this point in the history
  • Loading branch information
EiffelFly committed Nov 4, 2024
1 parent 63aa8ae commit 052b151
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "instill-sdk",
"version": "0.11.0-rc.22",
"version": "0.11.0-rc.28",
"description": "Instill AI's Typescript SDK",
"repository": "https://github.com/instill-ai/typescript-sdk.git",
"bugs": "https://github.com/instill-ai/community/issues",
Expand Down
10 changes: 7 additions & 3 deletions packages/sdk/src/helper/getQueryString.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Nullable } from "vitest";
import { Nullable } from "../types";

export const getQueryString = ({
baseURL,
Expand Down Expand Up @@ -39,6 +39,8 @@ export const getQueryString = ({
}) => {
let url = baseURL;

console.log(fileUid);

if (
pageSize ||
page ||
Expand All @@ -52,7 +54,9 @@ export const getQueryString = ({
start ||
stop ||
aggregationWindow ||
showDeleted !== undefined
showDeleted !== undefined ||
fileUid ||
chunkUids
) {
// Check if the baseURL already has a query string
if (baseURL.includes("?")) {
Expand Down Expand Up @@ -110,7 +114,7 @@ export const getQueryString = ({
url += `aggregationWindow=${aggregationWindow}&`;
}

if (showDeleted !== undefined) {
if (showDeleted) {
url += `showDeleted=${showDeleted}&`;
}

Expand Down
1 change: 1 addition & 0 deletions packages/sdk/src/vdp/pipeline/PipelineClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ export class PipelineClient extends APIResource {
visibility,
orderBy,
view,
showDeleted,
})),
);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/toolkit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@instill-ai/toolkit",
"version": "0.110.0-rc.53",
"version": "0.110.0-rc.69",
"description": "Instill AI's frontend toolkit",
"repository": "https://github.com/instill-ai/design-system.git",
"bugs": "https://github.com/instill-ai/design-system/issues",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ export function prefetchNamespacePipeline({
queryKey: queryKeyStore.pipeline.getUseNamespacePipelineQueryKey({
namespaceId,
pipelineId,
view,
shareCode,
}),
queryFn: async () => {
return await fetchNamespacePipeline({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,17 @@ export function useDeleteNamespacePipeline() {
queryKey: queryKeyStore.pipeline.getUseNamespacePipelineQueryKey({
namespaceId,
pipelineId,
view: null,
shareCode: null,
}),
});

queryClient.removeQueries({
queryKey: queryKeyStore.pipeline.getUseNamespacePipelineQueryKey({
namespaceId,
pipelineId,
view: null,
shareCode: null,
}),
exact: true,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ export function useRenameNamespacePipeline() {
queryKey: queryKeyStore.pipeline.getUseNamespacePipelineQueryKey({
namespaceId,
pipelineId: oldPipelineId,
view: null,
shareCode: null,
}),
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export function useUpdateNamespacePipeline() {
queryKeyStore.pipeline.getUseNamespacePipelineQueryKey({
namespaceId,
pipelineId,
view: null,
shareCode: null,
}),
pipeline,
);
Expand Down

0 comments on commit 052b151

Please sign in to comment.