@amityco/ts-sdk-react-native
Version:
Amity Social Cloud Typescript SDK
25 lines • 787 B
TypeScript
/**
* ```js
* import { createPoll } from '@amityco/ts-sdk-react-native'
* const created = await createPoll({
* question: 'question',
* answers: [
* { dataType: 'text', data: 'answer1', fileId: 'fileId1' },
* { dataType: 'text', data: 'answer2', fileId: 'fileId2' },
* ],
* closedIn: 1649136484
* }))
* ```
*
* Creates an {@link Amity.Poll}
*
* @param bundle The data necessary to create a new {@link Amity.Poll}
* @returns The newly created {@link Amity.Poll}
*
* @category Poll API
* @async
*/
export declare const createPoll: (bundle: Pick<Amity.Poll, 'title' | 'question' | 'answerType' | 'closedIn'> & {
answers: Pick<Amity.PollAnswer, 'dataType' | 'data'>[];
}) => Promise<Amity.Cached<Amity.Poll>>;
//# sourceMappingURL=createPoll.d.ts.map