diff --git a/lib/interact-for-access-code.ts b/lib/interact-for-access-code.ts index 77c264d..04ffa81 100644 --- a/lib/interact-for-access-code.ts +++ b/lib/interact-for-access-code.ts @@ -22,9 +22,9 @@ export const interactForAccessCode = async ({ type: "autocomplete", message: "Select an access_code:", choices: accessCodes.map((ac: any) => ({ - title: ac.properties.name ?? "", - value: ac.access_code_id, - description: `${ac.type} ${ac.access_code_id}`, + title: ac?.properties?.name ?? "", + value: ac?.access_code_id, + description: `${ac?.type} ${ac?.access_code_id}`, })), }) diff --git a/lib/interact-for-custom-metadata.ts b/lib/interact-for-custom-metadata.ts index edbfd21..ddee921 100644 --- a/lib/interact-for-custom-metadata.ts +++ b/lib/interact-for-custom-metadata.ts @@ -1,11 +1,16 @@ import prompts from "prompts" import { getSeam } from "./get-seam" import { CustomMetadata } from "@seamapi/types/connect" + +type UpdatedCustomMetadata = { + [x: string]: string | boolean | null +} + export const interactForCustomMetadata = async ( custom_metadata: CustomMetadata ) => { const seam = await getSeam() - const updated_custom_metadata = { ...custom_metadata } + const updated_custom_metadata: UpdatedCustomMetadata = { ...custom_metadata } const displayCurrentCustomMetadata = () => { console.log("custom_metadata:") diff --git a/package-lock.json b/package-lock.json index 3a95221..8a2bc02 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,7 @@ "@types/prompts": "^2.4.9", "@vercel/ncc": "^0.38.1", "axios": "^1.6.2", - "bun-types": "*", + "bun-types": "latest", "chalk": "^5.3.0", "command-line-usage": "^7.0.1", "configstore": "^6.0.0",