Skip to content
← Public packages

@kentcdodds/x

X API v2 helpers for tweets, search, legacy DMs, and encrypted X Chat via a Fly XDK sidecar.

src/repost-post.ts

14 lines · 573 B · TypeScript
import { repostPost } from './client.ts'
import type { XPostActionParams } from './client.ts'

/**
 * Repost or dry-run reposting an X post; requires confirm: true.
 * @returns Repost result, or dry-run action payload.
 * @example
 * import repostPost from 'kody:@kentcdodds/x/repost-post'
 * const preview = await repostPost({ postId: '123', dryRun: true })
 * // => { dryRun: true, action: 'repost-post', requiresConfirm: true, payload: { ... } }
 */
export default async function repostPostEntrypoint(params: XPostActionParams = {}) {
	return await repostPost(params)
}