UNPKG

@coinbase/agentkit

Version:

Coinbase AgentKit core primitives

67 lines (66 loc) 2.2 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TwitterUploadMediaSchema = exports.TwitterPostTweetReplySchema = exports.TwitterPostTweetSchema = exports.TwitterAccountMentionsSchema = exports.TwitterAccountDetailsSchema = void 0; const zod_1 = require("zod"); /** * Input schema for retrieving account details. */ exports.TwitterAccountDetailsSchema = zod_1.z .object({}) .strip() .describe("Input schema for retrieving account details"); /** * Input schema for retrieving account mentions. */ exports.TwitterAccountMentionsSchema = zod_1.z .object({ userId: zod_1.z .string() .min(1, "Account ID is required.") .describe("The Twitter (X) user id to return mentions for"), }) .strip() .describe("Input schema for retrieving account mentions"); /** * Input schema for posting a tweet. */ exports.TwitterPostTweetSchema = zod_1.z .object({ tweet: zod_1.z.string().max(280, "Tweet must be a maximum of 280 characters."), mediaIds: zod_1.z .array(zod_1.z.string()) .max(4, "Maximum of 4 media IDs allowed") .optional() .describe("Optional array of 1-4 media IDs to attach to the tweet"), }) .strip() .describe("Input schema for posting a tweet"); /** * Input schema for posting a tweet reply. */ exports.TwitterPostTweetReplySchema = zod_1.z .object({ tweetId: zod_1.z.string().describe("The id of the tweet to reply to"), tweetReply: zod_1.z .string() .max(280, "The reply to the tweet which must be a maximum of 280 characters."), mediaIds: zod_1.z .array(zod_1.z.string()) .max(4, "Maximum of 4 media IDs allowed") .optional() .describe("Optional array of 1-4 media IDs to attach to the tweet"), }) .strip() .describe("Input schema for posting a tweet reply"); /** * Input schema for uploading media. */ exports.TwitterUploadMediaSchema = zod_1.z .object({ filePath: zod_1.z .string() .min(1, "File path is required.") .describe("The path to the media file to upload"), }) .strip() .describe("Input schema for uploading media to Twitter");