Skip to content

Commit

Permalink
fixup! build
Browse files Browse the repository at this point in the history
Signed-off-by: Petr Kadlec <[email protected]>
  • Loading branch information
kapetr committed Jan 21, 2025
1 parent 656123c commit 527c3ad
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/app/api/apps/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import { client } from '../client';
import { assertSuccessResponse, getRequestHeaders } from '../utils';
import { ChatCompletionCreateBody } from './types';
import { ChatCompletionCreateBody, ChatCompletionResponse } from './types';

export async function createChatCompletion(
organizationId: string,
Expand All @@ -28,7 +28,7 @@ export async function createChatCompletion(
headers: getRequestHeaders(organizationId, projectId),
});
assertSuccessResponse(res);
return res.data;
return res.data as ChatCompletionResponse;
}

export async function modulesToPackages(
Expand Down
2 changes: 1 addition & 1 deletion src/app/api/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export type ApiMetadata = {
};

export type EntityResultWithMetadata<T> = Omit<T, 'uiMetadata'> & {
metadata?: ApiMetadata;
metadata?: ApiMetadata | null;
};

export type EntityWithEncodedMetadata<T> = Omit<T, 'uiMetadata'> & {
Expand Down
2 changes: 1 addition & 1 deletion src/app/api/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export function encodeMetadata<T extends EntityMetadata>(
}

export function decodeMetadata<T extends EntityMetadata>(
metadata?: ApiMetadata,
metadata?: ApiMetadata | null,
): T {
const decoded: EntityMetadata = {};

Expand Down
2 changes: 1 addition & 1 deletion src/modules/tools/manage/UserToolModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ export function UserToolModal({
);
}

function ApiAuthenticationMethod({ tool }: { tool: Tool }) {
function ApiAuthenticationMethod({ tool }: { tool?: Tool }) {
const [editApiKey, setEditApiKey] = useState(false);
const id = useId();
const {
Expand Down

0 comments on commit 527c3ad

Please sign in to comment.