@amityco/ts-sdk-react-native
Version: 
Amity Social Cloud Typescript SDK
39 lines (31 loc) • 797 B
text/typescript
export {};
declare global {
  namespace Amity {
    type PollDataType = 'text' | 'image';
    type PollAnswerType = 'single' | 'multiple';
    type PollAnswer = {
      id: string;
      dataType: PollDataType;
      data: string;
      voteCount: number;
      isVotedByUser: boolean;
      fileId?: string;
    };
    type PollStatus = 'closed' | 'open';
    type RawPoll = {
      pollId: string;
      question: string;
      answers: PollAnswer[];
      answerType: PollAnswerType;
      closedAt?: Amity.timestamp;
      closedIn?: number;
      isVoted?: boolean;
      status: PollStatus;
      title?: string | null;
      userId: Amity.InternalUser['userId'];
    } & Amity.Timestamps &
      Amity.SoftDelete;
    type InternalPoll = RawPoll;
    type Poll = InternalPoll;
  }
}