improvement: allow null for non-supported gatewayId

This commit is contained in:
Scott Wilson
2025-07-18 13:40:42 -07:00
parent 4ab0da6b03
commit f3a8e30548
@@ -40,6 +40,7 @@ export const GenericCreateAppConnectionFieldsSchema = (
? z.string().uuid().nullish().describe("The Gateway ID to use for this connection.") ? z.string().uuid().nullish().describe("The Gateway ID to use for this connection.")
: z : z
.undefined({ message: `Not supported for ${APP_CONNECTION_NAME_MAP[app]} Connections` }) .undefined({ message: `Not supported for ${APP_CONNECTION_NAME_MAP[app]} Connections` })
.or(z.null({ message: `Not supported for ${APP_CONNECTION_NAME_MAP[app]} Connections` }))
.describe(`Not supported for ${APP_CONNECTION_NAME_MAP[app]} Connections.`) .describe(`Not supported for ${APP_CONNECTION_NAME_MAP[app]} Connections.`)
}); });
@@ -67,5 +68,6 @@ export const GenericUpdateAppConnectionFieldsSchema = (
? z.string().uuid().nullish().describe("The Gateway ID to use for this connection.") ? z.string().uuid().nullish().describe("The Gateway ID to use for this connection.")
: z : z
.undefined({ message: `Not supported for ${APP_CONNECTION_NAME_MAP[app]} Connections` }) .undefined({ message: `Not supported for ${APP_CONNECTION_NAME_MAP[app]} Connections` })
.or(z.null({ message: `Not supported for ${APP_CONNECTION_NAME_MAP[app]} Connections` }))
.describe(`Not supported for ${APP_CONNECTION_NAME_MAP[app]} Connections.`) .describe(`Not supported for ${APP_CONNECTION_NAME_MAP[app]} Connections.`)
}); });