Skip to content

Commit 618783b

Browse files
authored
Merge pull request #155 from seamapi/allow-access-code-delete
Allow access codes delete interaction
2 parents 179ab88 + 3ab680a commit 618783b

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

lib/interact-for-access-code.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ export const interactForAccessCode = async ({
2222
type: "autocomplete",
2323
message: "Select an access_code:",
2424
choices: accessCodes.map((ac: any) => ({
25-
title: ac.properties.name ?? "<No Name>",
26-
value: ac.access_code_id,
27-
description: `${ac.type} ${ac.access_code_id}`,
25+
title: ac?.properties?.name ?? "<No Name>",
26+
value: ac?.access_code_id,
27+
description: `${ac?.type} ${ac?.access_code_id}`,
2828
})),
2929
})
3030

lib/interact-for-custom-metadata.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
import prompts from "prompts"
22
import { getSeam } from "./get-seam"
33
import { CustomMetadata } from "@seamapi/types/connect"
4+
5+
type UpdatedCustomMetadata = {
6+
[x: string]: string | boolean | null
7+
}
8+
49
export const interactForCustomMetadata = async (
510
custom_metadata: CustomMetadata
611
) => {
712
const seam = await getSeam()
8-
const updated_custom_metadata = { ...custom_metadata }
13+
const updated_custom_metadata: UpdatedCustomMetadata = { ...custom_metadata }
914

1015
const displayCurrentCustomMetadata = () => {
1116
console.log("custom_metadata:")

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)