@amityco/ts-sdk-react-native
Version:
Amity Social Cloud Typescript SDK
30 lines • 922 B
TypeScript
/**
* ```js
* import { PostRepository } from '@amityco/ts-sdk-react-native'
* const created = await PostRepository.createPost({
* targetType: 'user',
* targetId: 'foobar',
* data: { text: 'hello world' }
* }))
* ```
*
* Creates an {@link Amity.Post}
*
* @param bundle The data necessary to create a new {@link Amity.Post}
* @returns The newly created {@link Amity.Post}
*
* @category Post API
* @async
*/
export declare const createPost: <T extends string>(bundle: Pick<Amity.Post<T>, "targetId" | "targetType"> & Partial<Pick<Amity.Post<T>, "tags" | "metadata" | "mentionees" | "hashtags">> & {
dataType?: T | undefined;
data?: {
[k: string]: any;
} | undefined;
attachments?: {
type: T;
fileId: Amity.File['fileId'];
}[] | undefined;
links?: Amity.Link[] | undefined;
}) => Promise<Amity.Cached<Amity.Post>>;
//# sourceMappingURL=createPost.d.ts.map