diff --git a/cdp-agentkit-core/CHANGELOG.md b/cdp-agentkit-core/CHANGELOG.md index a1abaf8..48c0bf7 100644 --- a/cdp-agentkit-core/CHANGELOG.md +++ b/cdp-agentkit-core/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Refactor + +- Use `ZodString.min(1)` instead of deprecated `ZodString.nonempty()` + ## [0.0.8] - 2024-12-09 ### Added diff --git a/cdp-agentkit-core/src/actions/cdp/social/twitter/account_mentions.ts b/cdp-agentkit-core/src/actions/cdp/social/twitter/account_mentions.ts index 813f944..46f1017 100644 --- a/cdp-agentkit-core/src/actions/cdp/social/twitter/account_mentions.ts +++ b/cdp-agentkit-core/src/actions/cdp/social/twitter/account_mentions.ts @@ -28,7 +28,7 @@ export const AccountMentionsInput = z .object({ userId: z .string() - .nonempty("Account ID is required.") + .min(1, "Account ID is required.") .describe("The Twitter (X) user id to return mentions for"), }) .strip() diff --git a/cdp-agentkit-core/src/twitter_agentkit.ts b/cdp-agentkit-core/src/twitter_agentkit.ts index 305f4b4..f416f11 100644 --- a/cdp-agentkit-core/src/twitter_agentkit.ts +++ b/cdp-agentkit-core/src/twitter_agentkit.ts @@ -9,19 +9,19 @@ export const TwitterAgentkitOptions = z .object({ apiKey: z .string() - .nonempty("The Twitter (X) API key is required") + .min(1, "The Twitter (X) API key is required") .describe("The Twitter (X) API key"), apiSecret: z .string() - .nonempty("The Twitter (X) API secret is required") + .min(1, "The Twitter (X) API secret is required") .describe("The Twitter (X) API secret"), accessToken: z .string() - .nonempty("The Twitter (X) access token is required") + .min(1, "The Twitter (X) access token is required") .describe("The Twitter (X) access token"), accessTokenSecret: z .string() - .nonempty("The Twitter (X) access token secret is required") + .min(1, "The Twitter (X) access token secret is required") .describe("The Twitter (X) access token secret"), }) .strip() @@ -33,19 +33,19 @@ export const TwitterAgentkitOptions = z const EnvSchema = z.object({ TWITTER_API_KEY: z .string() - .nonempty("TWITTER_API_KEY is required") + .min(1, "TWITTER_API_KEY is required") .describe("The Twitter (X) API key"), TWITTER_API_SECRET: z .string() - .nonempty("TWITTER_API_SECRET is required") + .min(1, "TWITTER_API_SECRET is required") .describe("The Twitter (X) API secret"), TWITTER_ACCESS_TOKEN: z .string() - .nonempty("TWITTER_ACCESS_TOKEN is required") + .min(1, "TWITTER_ACCESS_TOKEN is required") .describe("The Twitter (X) access token"), TWITTER_ACCESS_TOKEN_SECRET: z .string() - .nonempty("TWITTER_ACCESS_TOKEN_SECRET is required") + .min(1, "TWITTER_ACCESS_TOKEN_SECRET is required") .describe("The Twitter (X) access token secret"), });