Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Enumerations

Interfaces

Type aliases

Variables

Functions

Type aliases

ChatRoomApiStreamEventDetails

CreateWidgetInteractionItemProp

DateTime

DateTime: Date | string | number

IChatMessageRequestPayload

IChatMessageResponsePayload

IChatRoomApiStreamResponse

IChatUserMessageResponsePayload

IChatUserMessageResponsePayload: IMessageResponsePayload | IQuoteMessageResponsePayload

IMessageListIteratorResult

IMessageListIteratorResult: Promise<IteratorResult<{ messages: IChatMessageResponsePayload[] }, { messages: IChatMessageResponsePayload[] }>>

IQuoteMessagePropType

IQuoteMessagePropType: IMessageResponsePayload | Omit<IQuoteMessageResponsePayload, "quote_message" | "reactions">

IQuoteMessageRequestPayload

IQuoteMessageRequestPayload: IQuoteMessagePayload & IMessageRequestPayload

IQuoteMessageResponsePayload

IQuoteMessageResponsePayload: IQuoteMessagePayload & IMessageResponsePayload

InteractiveWidgetKind

InteractiveWidgetKind: typeof interactiveWidgets[number]

ListenerFn

ListenerFn<TEvent, TMessage>: (msg: ListenerEventMessage<TEvent, TMessage>) => void

Type parameters

  • TEvent = any

  • TMessage = any

Type declaration

MessageListenerCallback

MessageListenerCallback: (args: IMessageListenerCallbackArgs) => unknown

Type declaration

MessagePreparationCallback

MessagePreparationCallback: (message: IMessageResponse) => IMessageResponse

Type declaration

PinMessageOrderBy

PinMessageOrderBy: "desc" | "asc"

ProgramListenerCallback

ProgramListenerCallback: (args: IProgramListenerCallbackArgs) => unknown

Type declaration

ReactionSpaceEventListenerMap

ReactionSpaceEventListenerMap: { reaction-space-updated: ListenerFn<UPDATE_REACTION_SPACE, IReactionSpace>; user-reaction-added: ListenerFn<ADD_REACTION, IUserReaction>; user-reaction-removed: ListenerFn<REMOVE_REACTION, IUserReaction> }

Type declaration

SdkEventListenerMap

SdkEventListenerMap: { INITIALISED: any }

Type declaration

SubscriptionEvent

SubscriptionEventEnums

SubscriptionEventEnums: typeof Events

SubscriptionEventListenerFn

SubscriptionEventListenerFn: ListenerFn<SubscriptionEvent, any>

SubscriptionEventValuesOf

SubscriptionEventValuesOf<E>: E[keyof E]

Type parameters

  • E

VideoRoomEventListenerMap

VideoRoomEventListenerMap<ListenerArgs>: { ERROR: any; PARTICIPANT_JOIN: any; PARTICIPANT_LEFT: any; RECONNECTING: any }

Type parameters

Type declaration

  • ERROR:function
    • ERROR(errorDetails: ListenerArgs["errorDetails"]): void
    • Parameters

      • errorDetails: ListenerArgs["errorDetails"]

      Returns void

  • PARTICIPANT_JOIN:function
    • PARTICIPANT_JOIN(participant: ListenerArgs["participant"]): void
    • Parameters

      • participant: ListenerArgs["participant"]

      Returns void

  • PARTICIPANT_LEFT:function
    • PARTICIPANT_LEFT(participant: ListenerArgs["participant"]): void
    • Parameters

      • participant: ListenerArgs["participant"]

      Returns void

  • RECONNECTING:function
    • RECONNECTING(): void
    • Returns void

WidgetListenerCallback

WidgetListenerCallback: (args: IWidgetListenerCallbackArgs) => unknown

Type declaration

Variables

CHOICE_WIDGET_KIND

CHOICE_WIDGET_KIND: WidgetKind[] = ...

ChatUserMessageEventType

ChatUserMessageEventType: readonly [MESSAGE_CREATED, IMAGE_CREATED, MESSAGE_DELETED, IMAGE_DELETED, CHATROOM_UPDATED] = ...

Events

Events: { ADDED: "reactionadded"; DELETED: "messagedeleted"; FAILED: "messagefailed"; MESSAGES: "messagehistory"; RECEIVED: "messagereceived"; REMOVED: "reactionremoved"; ROOMENTER: "roomentered"; ROOMEXIT: "roomexited"; SENT: "messagesent"; UPDATED: "messageupdated" } = ...

Type declaration

  • ADDED: "reactionadded"
  • DELETED: "messagedeleted"
  • FAILED: "messagefailed"
  • MESSAGES: "messagehistory"
  • RECEIVED: "messagereceived"
  • REMOVED: "reactionremoved"
  • ROOMENTER: "roomentered"
  • ROOMEXIT: "roomexited"
  • SENT: "messagesent"
  • UPDATED: "messageupdated"

FOLLOW_UP_WIDGET_UPDATED_EVENT

FOLLOW_UP_WIDGET_UPDATED_EVENT: WidgetCreatedEvent[] = ...

InteractableWidgetKind

MessageEvents

MessageEvents: { added: "reactionadded"; chatroom-updated: "chatroom-updated"; custom-message-created: "messagereceived"; image-created: "messagereceived"; image-deleted: "messagedeleted"; message-created: "messagereceived"; message-deleted: "messagedeleted"; message-sent: "messagesent"; message-updated: "messageupdated"; removed: "reactionremoved" } = ...

Type declaration

  • added: "reactionadded"
  • chatroom-updated: "chatroom-updated"
  • custom-message-created: "messagereceived"
  • image-created: "messagereceived"
  • image-deleted: "messagedeleted"
  • message-created: "messagereceived"
  • message-deleted: "messagedeleted"
  • message-sent: "messagesent"
  • message-updated: "messageupdated"
  • removed: "reactionremoved"

PREDICTION_FOLLOW_UP_TO_PREDICTION_WIDGET_KIND

PREDICTION_FOLLOW_UP_TO_PREDICTION_WIDGET_KIND: { image-number-prediction-follow-up: WidgetKind; image-prediction-follow-up: WidgetKind; text-prediction-follow-up: WidgetKind } = ...

Type declaration

PREDICTION_FOLLOW_UP_WIDGET_KIND

PREDICTION_FOLLOW_UP_WIDGET_KIND: WidgetKind[] = ...

PREDICTION_WIDGET_ID_PROP

PREDICTION_WIDGET_ID_PROP: { image-number-prediction-follow-up: string; image-prediction-follow-up: string; text-number-prediction-follow-up: string; text-prediction-follow-up: string } = ...

Type declaration

  • image-number-prediction-follow-up: string
  • image-prediction-follow-up: string
  • text-number-prediction-follow-up: string
  • text-prediction-follow-up: string

PREDICTION_WIDGET_KIND

PREDICTION_WIDGET_KIND: WidgetKind[] = ...

UNSUPPORTED_UPDATE_INTERACTION_WIDGET_KINDS

UNSUPPORTED_UPDATE_INTERACTION_WIDGET_KINDS: WidgetKind[] = ...

WIDGET_RESULTS

WIDGET_RESULTS: { CHEER_METER: "cheer-meter-results"; EMOJI_SLIDER: "emoji-slider-results"; IMAGE_POLL: "image-poll-results"; IMAGE_QUIZ: "image-quiz-results"; TEXT_POLL: "text-poll-results"; TEXT_QUIZ: "text-quiz-results" } = ...

Type declaration

  • CHEER_METER: "cheer-meter-results"
  • EMOJI_SLIDER: "emoji-slider-results"
  • IMAGE_POLL: "image-poll-results"
  • IMAGE_QUIZ: "image-quiz-results"
  • TEXT_POLL: "text-poll-results"
  • TEXT_QUIZ: "text-quiz-results"

WidgetResults

WidgetResults: ("emoji-slider-results" | "cheer-meter-results" | "text-poll-results" | "image-poll-results" | "text-quiz-results" | "image-quiz-results")[] = ...

_$$

_$$: IApiGlobal = ...

_config

_config: { apiDocVersion: string; ready: boolean; version: string } = ...

Type declaration

  • apiDocVersion: string
  • ready: boolean
  • version: string

chatUserMessageEvents

chatUserMessageEvents: ChatMessageEvent[] = ...

interactiveWidgets

subscriptionCoordinator

subscriptionCoordinator: { addListener: (channel: string, callback: SubscriptionEventListenerFn, event?: SubscriptionEvent) => void; initialisePubnub: (pnConfig: IPubnubConfig) => void; listeners: Record<string, SubscriptionEventListenerFn[]>; removeAllListenersForEvent: (channel: string, event: SubscriptionEvent) => Record<string, SubscriptionEventListenerFn[]>; removeListener: (channel: string, callback: SubscriptionEventListenerFn, event?: SubscriptionEvent) => Record<string, SubscriptionEventListenerFn[]>; subscribe: (channel: any) => void; unsubscribe: (channel: any) => void } = ...

Type declaration

userProfile

userProfile: IUserProfile = ...

widgetEndPhase

widgetEndPhase: WidgetPhase[] = ...

widgetKindVote

widgetKindVote: { cheer-meter: string; emoji-slider: string; image-number-prediction: string; image-poll: string; image-prediction: string; image-quiz: string; text-ask: string; text-number-prediction: string; text-poll: string; text-prediction: string; text-quiz: string } = ...

Type declaration

  • cheer-meter: string
  • emoji-slider: string
  • image-number-prediction: string
  • image-poll: string
  • image-prediction: string
  • image-quiz: string
  • text-ask: string
  • text-number-prediction: string
  • text-poll: string
  • text-prediction: string
  • text-quiz: string

Functions

addChatRoomEventListener

  • addChatRoomEventListener<_Event, _EventListener>(chatRoomEvent: _Event, listenerFn: _EventListener, options: IChatRoomEventListenerOptions): Promise<void>

addComment

  • description

    Add comment to a comment board

    async
    since

    0.1.0

    example
     addComment({
    text: '<Your text comment>',
    customData: '<Your custom data to send with reply comment>',
    commentBoardId: '<Your comment board Id>'
    }).then(comment => console.log(comment));

    Parameters

    Returns Promise<IComment>

addCommentReply

  • description

    Add reply to comment

    async
    since

    0.1.0

    example
     addCommentReply({
    text: '<Your text comment>',
    customData:'<Your custom data to send with reply comment>',
    commentBoardId:'<Your comment board Id>',
    parentCommentId:'<Your parent comment Id>'
    }).then(comment => console.log(comment));

    Parameters

    Returns Promise<IComment>

Const addMessageListener

  • Adds a listener to a chatroom that calls passed callback function when event fires.

    since

    0.1.0

    example
    addMessageListener({roomId: string}, function(e){console.log(e)})
    

    Parameters

    Returns Promise<void>

addNewMemberToChatRoom

  • description

    Add new member to the chat room (requires roomId and profileId)

    async
    since

    0.1.0

    example
    addNewMemberToChatRoom({
    roomId: "9e6f1bc4-9f02-4c57-92b7-7521d0f5b027",
    profileId: "aa7e03fc-01f0-4a98-a2e0-3fed689632d7"
    }).then(membership => console.log(membership))

    Parameters

    Returns Promise<IChatRoomMembership>

    Promise

Const addProgramListener

  • Add a program listener to get program updates including widgets published from produce suite

    since

    0.1.0

    example
    function programListener({event, message}){
    // your custom logic
    }
    addProgramListener({
    programId: "<Your program Id>"
    }, programListener)

    Parameters

    Returns Promise<void>

addReactionSpaceEventListener

  • addReactionSpaceEventListener<_Event, _EventListener>(eventArg: IReactionEventArg<_Event>, listenerFn: _EventListener): Promise<void>

addRewardEventListener

addSdkEventListener

  • addSdkEventListener<_Event, ListenerFn>(sdkEvent: _Event, listenerFn: ListenerFn): void
  • description

    Add listener for a given SdkEvent

    since

    0.1.0

    example
    addSdkEventListener(SdkEvent.INITIALISED, function onSdkInitialisation(userProfile){
    console.log(userProfile);
    })

    Type parameters

    Parameters

    • sdkEvent: _Event
    • listenerFn: ListenerFn

    Returns void

addUserProfileEventListener

  • description

    Add listener for the given UserProfileEvent

    since

    0.1.0

    example
    addUserProfileEventListener(UserProfileEvent.BLOCK_PROFILE, function onBlockProfileListener(blockInfo){
    console.log(blockInfo);
    })

    Parameters

    Returns void

addUserReaction

  • description

    Add a user reaction

    async
    since

    0.1.0

    example
    addUserReaction({
    targetId: "target-1",
    reactionSpaceId: "aa7e03fc-01f0-4a98-a2e0-3fed689632d7",
    reactionId: "0fddc166-b8c3-4ce9-990e-848bde12188b"
    }).then(reaction => console.log(reaction))

    Parameters

    Returns Promise<IUserReaction>

Const addWidgetListener

  • Add a widget listener

    since

    0.1.0

    example
    function widgetListener({event, message}){
    // your custom logic
    }
    addWidgetListener({
    widgetId: "<Your widget Id>",
    widgetKind: "<Your widget kind>"
    }, widgetListener)

    Parameters

    Returns Promise<void>

blockProfile

  • description

    Block profile using profile Id

    async
    since

    0.1.0

    example
    blockProfile({profileId: "aa7e03fc-01f0-4a98-a2e0-3fed689632d7"}).then(blockInfo => console.log(blockInfo))
    

    Parameters

    Returns Promise<IBlockInfo>

Const claimPredictionWidgetRewards

  • Claim prediction widget reward for the prediction submitted by the user. This could be used when prediction followup widget is published/rendered

    since

    0.1.0

    async
    example
    claimPredictionWidgetRewards({
    widgetId: "xxxx",
    widgetKind: "<widget kind>"
    }).then(predictionClaim => console.log(predictionClaim))

    Parameters

    Returns Promise<IPredictionClaim>

Const claimUserQuestRewards

  • description

    Claim a User quest rewards using userQuestId.

    async
    since

    0.1.0

    example
    claimUserQuestRewards({
    userQuestId: "<User Quest ID>"
    }).then(userQuest => console.log(userQuest))

    Parameters

    Returns Promise<IUserQuest>

Const createChatRoom

  • description

    Creates a new chat room

    async
    since

    0.1.0

    • createChatRoom({title: "Chat room name", content_filter: "filtered", visibility: "everyone"})
      

    Parameters

    Returns Promise<IChatRoomPayload>

    Promise

createCommentBoard

  • description

    Create comment board

    async
    since

    0.1.0

    example
     createCommentBoard({'title': 'sd','customId':'postid1','repliesDepth':2,'allowComments':true,'description': 'desc','customData':'abc'}).then(commentBoard => console.log(commentBoard));
    

    Parameters

    Returns Promise<ICommentBoard>

createCommentBoardBan

  • description

    Ban a user to restrict access in a comment board

    async
    since

    0.1.0

    example
     createCommentBoardBan({
    profileId: '<profile_id>',
    commentBoardId: '<comment_board_id>',
    description: '<Reason for banning>',
    }).then((commentBoardBan) => console.log(commentBoardBan));
    ``

    Parameters

    Returns Promise<ICommentBoardBan>

createCommentReport

  • description

    Report a comment

    async
    since

    0.1.0

    example
     createCommentReport({
    commentId: '<comment_id>',
    description: '<Reason for reporting>',
    }).then((commentReport) => console.log(commentReport));
    ``

    Parameters

    Returns Promise<ICommentReport>

createProfileRelationship

  • description

    Create Profile Relationship

    async
    since

    0.1.0

    example
     createProfileRelationship({
    relationshipTypeKey: "follow",
    toProfileId: "<Profile ID>",
    fromProfileId: "<Profile ID>",
    }).then((profileRelationship) => console.log(profileRelationship))
    ``

    Parameters

    Returns Promise<IProfileRelationship>

createReactionSpace

  • description

    Create a reaction space

    async
    since

    0.1.0

    example
    createReactionSpace({
    targetGroupId: "target-group-1",
    reactionPackIds: ["aa7e03fc-01f0-4a98-a2e0-3fed689632d7", "0fddc166-b8c3-4ce9-990e-848bde12188b"]
    }).then(reactionSpace => console.log(reactionSpace))

    Parameters

    Returns Promise<IReactionSpace>

Const createUserProfile

  • createUserProfile(args: { nickname?: string }): Promise<IUserProfile>
  • Creates user profile. If no nickname argument is passed, a random nickname will be generated.

    async
    since

    0.1.0

    example
    createUserProfile({ nickname: 'Test Nickname' }).then(profile => console.log(profile))
    

    Parameters

    • args: { nickname?: string }
      • Optional nickname?: string

        Optional nickname

    Returns Promise<IUserProfile>

Const createWidgetImpression

  • Create widget impression used for analytics purposes for eg: analyse how many total users a given widget has reached

    since

    0.1.0

    example
    createWidgetImpression({
    widgetId: "<Your widget Id>",
    widgetKind: "<Your widget kind>"
    })

    Parameters

    Returns Promise<IWidgetImpression>

Const createWidgetInteraction

  • Create a widget interaction

    since

    0.1.0

    example
    createWidgetInteraction({
    widgetId: "<Your widget Id>",
    widgetKind: "<widget kind>",
    interactionItem: selectedPollOptionItem
    })

    Parameters

    Returns Promise<IWidgetInteraction>

deleteChatRoomInvitation

  • description

    Delete chat room invitation

    params

    args of type IDeleteChatRoomInvitation

    async
    since

    0.1.0

    example
    deleteChatRoomInvitation({
    invitationId: "28cc0ceb-8934-48cd-abc5-4d3a3a681c1b",
    }).then(res => console.log(res))

    Parameters

    Returns Promise<void>

    Promise

deleteComment

  • description

    Delete a comment inside a commentboard

    async
    since

    0.1.0

    example
    deleteComment({
    commentBoardId: "<comment-board-id>",
    commentId: "<comment-id>"
    })

    Parameters

    Returns Promise<null>

deleteCommentBoard

  • description

    Delete a comment board

    async
    since

    0.1.0

    example
    deleteCommentBoard({
    commentBoardId: "aa7e03fc-01f0-4a98-a2e0-3fed689632d7",
    })

    Parameters

    Returns Promise<null>

deleteCommentBoardBan

  • description

    Delete comment board ban resource

    async
    since

    0.1.0

    example
     deleteCommentBoardBan({
    commentBoardBanId: '<comment_board_ban_id>',
    })
    ``

    Parameters

    Returns Promise<null>

deleteCommentReport

  • description

    Delete a comment report resource

    async
    since

    0.1.0

    example
     deleteCommentReport({
    commentReportId: '<comment_report_id>',
    })
    ``

    Parameters

    Returns Promise<null>

Const deleteMessage

  • description

    Delete a chatroom message using messageId

    since

    0.1.0

    async
    example
    deleteMessage({
    roomId: "a147f914-d474-4cfb-81c6-4099404c435a",
    messageId: "dd810f9f-09d5-4c6b-a0df-e43dee9b2994"
    }).then((res) => console.log(res))

    Parameters

    Returns Promise<void>

deleteProfileRelationship

  • description

    Delete Profile Relationship

    async
    since

    0.1.0

    example
    deleteProfileRelationship({ relationshipId: "<Profile Relationship ID>" })
    ``

    Parameters

    Returns Promise<null>

deleteReactionSpace

  • description

    Delete a reaction space

    async
    since

    0.1.0

    example
    deleteReactionSpace({
    reactionSpaceId: "aa7e03fc-01f0-4a98-a2e0-3fed689632d7",
    })

    Parameters

    Returns Promise<null>

dismissAllCommentReports

  • description

    Dismiss all the reports associated with a specific comment. This updates the report_status of all such reports to 'dismissed'.

    async
    since

    0.1.0

    example
     dismissAllCommentReports({
    commentBoardId: '<comment_board_id>',
    commentId: '<comment_id>',
    })
    ``

    Parameters

    Returns Promise<IDismissAllCommentReportsResponse>

dismissCommentReport

  • description

    Dismiss a comment report. This updates the report_status to 'dismissed'.

    async
    since

    0.1.0

    example
     dismissCommentReport({
    commentReportId: '<comment_report_id>',
    }).then((commentReport) => console.log(commentReport));
    ``

    Parameters

    Returns Promise<ICommentReport>

editComment

  • description

    edit comment of a comment board

    async
    since

    0.1.0

    example
    editComment({
    commentBoardId: "<comment-board-id>",
    commentId: "<comment-id>",
    text: '<Your text comment>',
    customData: '<Your custom data to send with reply comment>',
    }).then(comment => console.log(comment))

    Parameters

    Returns Promise<IComment>

Const getApplicationBadges

  • description

    Get Application Badges.

    async
    since

    0.1.0

    example
    getApplicationBadges().then(padinatedResponse => console.log(padinatedResponse.results))
    

    Returns Promise<IPaginatedResponse<IBadge>>

Const getApplicationRewardItems

Const getApplicationSponsors

  • description

    Get sponsors list for a given application.

    async
    since

    0.1.0

    example
    getApplicationSponsors().then(paginatedSponsors => console.log(paginatedSponsors.results))
    

    Returns Promise<IPaginatedResponse<ISponsorPayload>>

getBadgeProfiles

  • description

    Get profiles for a given badge.

    async
    since

    0.1.0

    example
    getBadgeProfiles({
    badgeId: "dd810f9f-09d5-4c6b-a0df-e43dee9b2994"
    }).then(res => console.log(res))

    Parameters

    • args: { badgeId: string }
      • badgeId: string

    Returns Promise<IPaginatedResponse<IBadgeProfile>>

Const getBadgeProgress

  • getBadgeProgress(args: { badgeIds: string[]; profileId: string }): Promise<IBadgeProgress[]>
  • description

    Get Progress of Badges for a given profileId.

    async
    since

    0.1.0

    example
    getBadgeProgress({
    profileId: "xxxxx",
    badgeIds: [ "yyyyy", "zzzzz" ]
    }).then(res => console.log(res))

    Parameters

    • args: { badgeIds: string[]; profileId: string }
      • badgeIds: string[]
      • profileId: string

    Returns Promise<IBadgeProgress[]>

getBlockInfoList

  • description

    Get Block Info list containing list of block info of all the blocked profile

    async
    since

    0.1.0

    example
    getBlockInfoList().then(paginatedBlockInfo => console.log(paginatedBlockInfo))
    

    Returns Promise<IPaginatedResponse<IBlockInfo>>

getBlockedProfileIds

  • description

    Get list of blocked profile ids, could be used to filter chat messages by blocked profile

    async
    since

    0.1.0

    example
    getBlockedProfileIds().then(profileIds => console.log(profileIds))
    

    Returns Promise<IPaginatedResponse<string>>

Const getChatRoom

  • description

    Gets chat room by roomId

    async
    since

    0.1.0

    getChatRoom({roomId: 'c1f6082c-f7b9-4d1e-b64e-9071a3860ffc'}).then((res) => console.log(res))
    

    Parameters

    Returns Promise<IChatRoomPayload>

    Promise

Const getChatRoomMemberships

Const getChatRoomSponsors

  • description

    Get sponsors list for a given chatroom.

    async
    since

    0.1.0

    example
    getChatRoomSponsors({
    roomId: string
    }).then(paginatedSponsors => console.log(paginatedSponsors.results))

    Parameters

    • args: { roomId: string }
      • roomId: string

    Returns Promise<IPaginatedResponse<ISponsorPayload>>

Const getChatRooms

  • description

    Get all avaliable chat rooms in an application

    async
    since

    0.1.0

    example
    getChatRooms().then(paginatedResponse => console.log(paginatedResponse))
    

    Returns Promise<IPaginatedResponse<IChatRoomPayload>>

    paginated response with results as an array of chat room details

Const getChatUserMutedStatus

  • description

    Gets the muted status of the current user for a given chat room

    async
    since

    0.1.0

    Parameters

    Returns Promise<IMutedResponse>

    Promise - true if muted else false

getComment

  • description

    Get comment details

    async
    since

    0.1.0

    example
    getComment({
    commentBoardId: "<comment-board-id>",
    commentId:"<comment-id>"})
    .then(({results}) => console.log(results))

    Parameters

    Returns Promise<IComment>

getCommentBoardBan

  • description

    Get comment board ban resource from commentBoardBanId

    async
    since

    0.1.0

    example
     getCommentBoardBan({
    commentBoardBanId: '<comment_board_ban_id>',
    })
    ``

    Parameters

    Returns Promise<ICommentBoardBan>

getCommentBoardBans

  • description

    Get a list of comment board bans in the Application. Each comment board ban resource represents restrictive access to comment board for a given user profile.

    async
    since

    0.1.0

    example
     getCommentBoardBans({
    profileId: '<profile_id>',
    commentBoardId: '<comment_board_id>',
    }).then((padinatedResponse) => console.log(padinatedResponse));
    ``

    Parameters

    Returns Promise<IPaginatedResponse<ICommentBoardBan>>

getCommentBoardDetails

  • description

    Get comment board details

    async
    since

    0.1.0

    example
    getCommentBoardDetails({ commentBoardId: "aa7e03fc-01f0-4a98-a2e0-3fed689632d7"}).then(({results}) => console.log(results))
    

    Parameters

    Returns Promise<ICommentBoard>

getCommentBoards

  • description

    Get list of comment boards in an application

    async
    since

    0.1.0

    example
    getCommentBoards().then(({results}) => console.log(results))
    

    Returns Promise<IPaginatedResponse<ICommentBoard>>

getCommentReplies

  • description

    List of comments replies

    async
    since

    0.1.0

    example
    getCommentReplies({
    commentBoardId:'<comment-board-id>',
    commentId:'<comment-id>',
    sorting: CommentSort.NEWEST,
    }).then(comments => console.log(comments));

    Parameters

    Returns Promise<IPaginatedResponse<IComment>>

getCommentReport

  • description

    Get a report submitted for a comment.

    async
    since

    0.1.0

    example
     getCommentReport({
    commentReportId: '<comment_report_id>',
    }).then((commentReport) => console.log(commentReport));
    ``

    Parameters

    Returns Promise<IPaginatedResponse<ICommentReport>>

getCommentReports

  • description

    Get a list of comment reports i.e. the reports submitted for a comment in an application.

    async
    since

    0.1.0

    example
     getCommentReports({
    commentBoardId: '<comment_board_id>',
    commentId: '<comment_id>',
    reportStatus: CommentReportStatus.PENDING,
    }).then((paginatedResponse) => console.log(paginatedResponse));
    ``

    Parameters

    Returns Promise<IPaginatedResponse<ICommentReport>>

getComments

  • description

    List comments with replies

    async
    since

    0.1.0

    example
     getComments({
    commentBoardId:'<comment-board-id>',
    sorting:'<Your comment sorting enum value>',
    repliedSince:'<2023-12-19T15:28:46.493Z>',
    repliedUntil:'<2023-12-19T15:28:46.493Z>',
    isReported: true,
    }).then(paginatedResponse => console.log(paginatedResponse));

    Parameters

    Returns Promise<IPaginatedResponse<IComment>>

getGifs

  • description

    Get list of gifs images

    async
    since

    0.1.0

    example
    getGifs({search: "thank you"}).then(({results}) => console.log(results))
    

    Parameters

    Returns Promise<IPaginatedResponse<IGif>>

    paginated response with results as an array of IGif

getInvokedRewardActions

  • description

    Get list of invoked reward action

    async
    since

    0.1.0

    example
    getInvokedRewardActions({
    programId: "xxx-yyy-zzz",
    rewardActionKeys: ["xx-yy-zz"],
    profileIds: ["xxx-yyy", "www-zzz"],
    attributes: [{ key: "color", value: "red" }]
    }).then(({results}) => console.log(results))

    Parameters

    Returns Promise<IPaginatedResponse<IInvokedRewardAction>>

Const getLeaderboard

  • description

    Gets leaderboard detail from leaderboardId.

    async
    since

    0.1.0

    example
    getLeaderboard({ leaderboardId: "xxxxxx" }).then(leaderboard => console.log(leaderboard))
    

    Parameters

    Returns Promise<ILeaderboardPayload>

Const getLeaderboardEntries

  • description

    Gets list of leaderboard entries from leaderboardId.

    async
    since

    0.1.0

    example
    getLeaderboardEntries({
    programId: "xxxxx"
    }).then(paginatedResponse => console.log(paginatedResponse.results))

    Parameters

    Returns Promise<IPaginatedResponse<ILeaderboardRankPayload>>

Const getLeaderboardProfileRank

  • description

    Gets leaderboard entry for a given profile in a given leaderboard.

    async
    since

    0.1.0

    example
    getLeaderboardProfileRank({
    leaderboardId: "xxxxx",
    profileId: "yyyyy"
    }).then(leaderboardEntry => console.log(leaderboardEntry))

    Parameters

    Returns Promise<ILeaderboardRankPayload>

Const getLeaderboards

  • description

    Gets leaderboard list for a given program.

    async
    since

    0.1.0

    example
    getLeaderboards({ programId: "xxxxx" }).then(leaderboards => console.log(leaderboards))
    

    Parameters

    • args: { programId: string }
      • programId: string

    Returns Promise<ILeaderboardPayload[]>

Const getMessageCount

  • getMessageCount Returns number of messages in chat room

    since

    0.1.0

    async
    example
    getMessageCount('c1f6082c-f7b9-4d1e-b64e-9071a3860ffc', {since: "2020-04-16T16:29:39.158Z"}).then(r => console.log(r.count))
    

    Parameters

    Returns Promise<IMessageCount>

Const getMessageList

  • getMessageList Returns array of message objects

    since

    0.1.0

    async
    example
    getMessageList(roomId: string).then(list => console.log(list))
    

    Parameters

    Returns Promise<IMessageListPayload>

Const getMilliseconds

  • getMilliseconds(duration: any): number
  • Converts ISO8601 format duration into milliseconds (PYYYYMMDDThhmmss) Example of duration - P3Y6M4DT12H30M5S

    Parameters

    • duration: any

      Time duration in ISO8601 format

    Returns number

    duration in milliseconds

getPinMessageInfoList

  • description

    Get list of pin message info

    async
    since

    0.1.0

    example
    getPinMessageInfoList({
    roomId: "37e1720a-fc7b-4962-b216-6be9ed69dc96",
    orderBy: "desc"
    }).then(pinMessageInfoList => console.log(pinMessageInfoList))

    Parameters

    Returns Promise<IPaginatedResponse<IPinMessageInfo>>

Const getPostedWidgets

  • Get list of widgets that have already been posted.

    async
    since

    0.1.0

    example
    getPostedWidgets({
    programId: "<your program id>"
    }).then((res) => console.log(res))

    Parameters

    • args: { programId: string }
      • programId: string

    Returns Promise<IPostedWidgetsPayload>

Const getProfileBadges

  • description

    Get badges for a given userProfile.

    async
    since

    0.1.0

    example
    getProfileBadges({
    profileId: "xxxxxx"
    }).then(paginatedResponse => console.log(paginatedResponse.results))

    Parameters

    • args: { profileId: string }
      • profileId: string

        userProfile ID

    Returns Promise<IPaginatedResponse<IProfileBadge>>

getProfileBlockInfo

  • description

    Get Block Info for given profile id if exists

    async
    since

    0.1.0

    example
    getProfileBlockInfo({profileId: "aa7e03fc-01f0-4a98-a2e0-3fed689632d7"}).then(blockInfo => console.log(blockInfo))
    

    Parameters

    Returns Promise<IBlockInfo | undefined>

Const getProfileChatRoomMemberships

Const getProfileLeaderboardViews

  • description

    Get list of leaderboard views in which a given profile is part of. If no profileId is passed, get current profile leaderboard views.

    async
    since

    0.1.0

    example
    getProfileLeaderboardViews({
    profileId: "<profile-id>"
    }).then(paginatedLeaderboardviews => console.log(paginatedLeaderboardviews))

    Parameters

    Returns Promise<IPaginatedResponse<IProfileLeaderboardView>>

Const getProfileLeaderboards

  • description

    Get list of leaderboard in which a given profile is part of. If no profileId is passed, get current profile leaderboards.

    async
    since

    0.1.0

    example
    getProfileLeaderboards({
    profileId: "<profile-id>"
    }).then(paginatedLeaderboards => console.log(paginatedLeaderboards.results))

    Parameters

    Returns Promise<IPaginatedResponse<IProfileLeaderboard>>

Const getProfileRelationshipDetails

  • Gets profile relationship detail from relationshipId.

    async
    since

    0.1.0

    example
    getProfileRelationshipDetails({
    relationshipId: "<Profile Relationship ID>"
    }).then(profileRelationship => console.log(profileRelationship))

    Parameters

    Returns Promise<IProfileRelationship>

getProfileRelationshipTypes

getProfileRelationships

  • description

    Get list of Profile Relationships

    async
    since

    0.1.0

    example
    getProfileRelationships({
    relationshipTypeKey: "follow",
    toProfileId: "<Profile ID>",
    fromProfileId: "<Profile ID>",
    }).then(({results}) => console.log(results))

    Parameters

    Returns Promise<IPaginatedResponse<IProfileRelationship>>

Const getProgramSponsors

  • description

    Get sponsors list for a given program.

    async
    since

    0.1.0

    example
    getProgramSponsors({
    programId: string
    }).then(paginatedSponsors => console.log(paginatedSponsors.results))

    Parameters

    • args: { programId: string }
      • programId: string

    Returns Promise<IPaginatedResponse<ISponsorPayload>>

Const getQuestRewards

  • description

    Get Quest rewards for a given quest using questId.

    async
    since

    0.1.0

    example
    getQuestRewards({
    questId: "<Quest ID>"
    }).then(paginatedResponse => console.log(paginatedResponse))

    Parameters

    Returns Promise<IPaginatedResponse<IQuestReward>>

Const getQuests

  • description

    Gets Quests in an application.

    async
    since

    0.1.0

    example
    getQuests({
    questIds: ["<Quest ID>"]
    }).then(paginatedResponse => console.log(paginatedResponse))

    Parameters

    Returns Promise<IPaginatedResponse<IQuest>>

getReactionPackDetail

  • description

    Get reaction pack detail with collection of reactions using a reaction pack Id

    async
    since

    0.1.0

    example
    getReactionPackDetail({
    reactionPackId: "aa7e03fc-01f0-4a98-a2e0-3fed689632d7",
    }).then(reactionPack => console.log(reactionPack))

    Parameters

    Returns Promise<IReactionPack>

getReactionPacks

  • description

    Get list of reaction packs in an application

    async
    since

    0.1.0

    example
    getReactionPacks().then(({results}) => console.log(results))
    

    Returns Promise<IPaginatedResponse<IReactionPack>>

getReactionSpaceDetail

  • description

    Get reaction space detail from reactionSpaceId or targetGroupId

    async
    since

    0.1.0

    example
    getReactionSpaceDetail({
    reactionSpaceId: "aa7e03fc-01f0-4a98-a2e0-3fed689632d7",
    }).then(reactionSpace => console.log(reactionSpace))

    OR

    getReactionSpaceDetail({
    targetGroupId: "target-group-1",
    }).then(reactionSpace => console.log(reactionSpace))

    Parameters

    Returns Promise<IReactionSpace>

getReactionSpaces

  • description

    Get list of reaction spaces in an application

    async
    since

    0.1.0

    example
    getReactionSpaces().then(({results}) => console.log(results))
    

    Returns Promise<IPaginatedResponse<IReactionSpace>>

getReceivedChatRoomInvitations

  • description

    Get list of chat room invitations received by the current user profile

    params

    args of type IGetInvitationsArgs

    async
    since

    0.1.0

    example
    getReceivedChatRoomInvitations({
    invitationStatus: ChatRoomInvitationStatus.PENDING
    }).then(paginatedInvitations => console.log(paginatedInvitations))

    Parameters

    Returns Promise<IPaginatedResponse<IChatRoomInvitation>>

    Promise<IPaginatedResponse>

getRewardActions

  • description

    Get list of reward action

    async
    since

    0.1.0

    example
    getRewardActions().then(({results}) => console.log(results))
    

    Returns Promise<IPaginatedResponse<IRewardAction>>

Const getRewardItemBalances

Const getRewardItemTransfers

Const getRewardTransactions

  • description

    Get paginated list of Reward transactions filtered by widget_id and kind

    since

    0.1.0

    example
    getRewardTransactions({
    widgetIds: ["xx", "yy"],
    widgetKinds: [ WidgetKind.TEXT_POLL, WidgetKind.TEXT_PREDICTION]
    }).then(res => console.log(res));

    Parameters

    Returns Promise<IPaginatedResponse<IRewardTransaction>>

getSentChatRoomInvitations

  • description

    Get list of chat room invitations sent by the current user profile

    params

    args of type IGetInvitationsArgs

    async
    since

    0.1.0

    example
    getSentChatRoomInvitations({
    invitationStatus: ChatRoomInvitationStatus.PENDING
    }).then(paginatedInvitations => console.log(paginatedInvitations))

    Parameters

    Returns Promise<IPaginatedResponse<IChatRoomInvitation>>

    Promise<IPaginatedResponse>

getStickerPackDetail

  • description

    Get sticker pack detail with collection of stickers using a stickerPackId

    async
    since

    0.1.0

    example
    getStickerPackDetail({
    stickerPackId: "aa7e03fc-01f0-4a98-a2e0-3fed689632d7",
    }).then(stickerPack => console.log(stickerPack))

    Parameters

    Returns Promise<IStickerPack>

getStickerPacks

  • description

    Get list of sticker packs in an application

    async
    since

    0.1.0

    example
    getStickerPacks().then(({results}) => console.log(results))
    

    Returns Promise<IPaginatedResponse<IStickerPack>>

    paginated response with results as an array of IStickerPack

getTargetedWidgetIdAndKind

  • description

    Get targeted widget Id and widget kind from a given widget details Targeted widget Id and kind could be different in the case of follow up widget. This API could be used to get targeted widget id and kind when fetching widget interaction or widget reward transactions

    since

    0.1.0

    async
    example
    getTargetedWidgetIdAndKind({
    widgetId: "xxxx",
    widgetKind: WidgetKind.TEXT_PREDICTION_FOLLOW_UP
    }).then(res => console.log(res))

    OR
    getTargetedWidgetIdAndKind({
    widget: { // widgetPayload }
    }).then(res => console.log(res))

    Parameters

    Returns Promise<ITargetedWidgetIdKind>

Const getUnclaimedWidgetInteractionsRewards

  • description

    Get unclamed widget interaction rewards for a given program

    since

    0.1.0

    async
    example
    getUnclaimedWidgetInteractionsRewards({
    programId: "xxxxxx"
    }).then(res => console.log(res))

    Parameters

    • args: { programId: string }
      • programId: string

    Returns Promise<IPaginatedResponse<IUnclaimedWidgetInteraction>>

getUpdatedWidgetInteraction

Const getUserProfile

  • getUserProfile(args: { accessToken?: string; profileId?: string }): Promise<IUserProfile>
  • Gets userProfile from accessToken.

    async
    since

    0.1.0

    example
    getUserProfile({ accessToken }).then(profile => console.log(profile))
    

    Parameters

    • args: { accessToken?: string; profileId?: string }
      • Optional accessToken?: string
      • Optional profileId?: string

    Returns Promise<IUserProfile>

Const getUserQuestRewards

  • description

    Get User quest rewards for a given user quest using userQuestId.

    async
    since

    0.1.0

    example
    getUserQuestRewards({
    userQuestId: "<User Quest ID>",
    rewardStatus: QuestRewardStatus.UNCLAIMED
    }).then(paginatedResponse => console.log(paginatedResponse))

    Parameters

    Returns Promise<IPaginatedResponse<IUserQuestReward>>

Const getUserQuests

  • description

    Gets Quests of a user(complete/incomplete).

    async
    since

    0.1.0

    example
    getUserQuests({
    userQuestIds: ["<User Quest ID>"],
    profileId: ["<Profile ID>"],
    status: UserQuestStatus.INCOMPLETE,
    rewardStatus: QuestRewardStatus.UNCLAIMED
    }).then(paginatedResponse => console.log(paginatedResponse))

    Parameters

    Returns Promise<IPaginatedResponse<IUserQuest>>

getUserReactions

  • description

    Get list of user reaction based on argument object filters

    async
    since

    0.1.0

    example
    getUserReactions({
    reactionSpaceId: "aa7e03fc-01f0-4a98-a2e0-3fed689632d7",
    targetId: "0fddc166-b8c3-4ce9-990e-848bde12188b"
    }).then(paginatedReactions => console.log(paginatedReactions))

    Parameters

    Returns Promise<IPaginatedResponse<IUserReaction>>

getUserReactionsCount

  • description

    get count of user reactions for a given collection of target in a reaction space

    async
    since

    0.1.0

    example
    getUserReactionsCount({
    reactionSpaceId: "aa7e03fc-01f0-4a98-a2e0-3fed689632d7",
    targetIds: ["0fddc166-b8c3-4ce9-990e-848bde12188b"],
    }).then(reaction => console.log(reaction))

    Parameters

    Returns Promise<IPaginatedResponse<IReactionsCount>>

Const getWidget

  • Get a widget based on widget kind and widget id

    async
    since

    0.1.0

    example
    getWidget({
    widgetId: "<Your widget Id>",
    widgetKind: "<Your widget kind>"
    }).then(widgetPayload => console.log(widgetPayload))

    Parameters

    Returns Promise<IWidgetPayload>

Const getWidgetInteractions

  • Get widget interactions based on programId, widgetId & widgetKind

    since

    0.1.0

    async
    example
    getWidgetInteractions({
    programId: "<your program Id>",
    widgetId: "xxxx",
    widgetKind: WidgetKind.TEXT_POLL,
    }).then(interactions => console.log(interactions))

    Parameters

    Returns Promise<IWidgetInteraction[]>

Const getWidgets

  • description

    Get paginated list of widgets filtered by widget status and kind

    since

    0.1.0

    example
    getWidgets({
    programId: "xxxx",
    status: "pending",
    widgetKinds: ["text-poll"],
    ordering: "recent",
    interactive: true,
    since: "2022-05-26T12:41:27.463Z"
    }).then(res => console.log(res));

    Parameters

    Returns Promise<IPaginatedResponse<IWidgetPayload>>

Const getWidgetsInteractions

  • Get collection of widget interactions based on interaction url or an array of widget id or an array of widget kinds

    since

    0.1.0

    async
    example
    getWidgetsInteractions({
    interactionUrl: "<url>"
    }).then(interactions => console.log(interactions))

    // OR
    getWidgetsInteractions({
    programId: "<program-id>",
    widgets: [{
    kind: WidgetKind.TEXT_POLL,
    id: "<widget-id>"
    }]
    }).then(interactions => console.log(interactions))

    // OR
    getWidgetsInteractions({
    programId: "<program-id>",
    widgetKinds: [ WidgetKind.TEXT_POLL, WidgetKind.TEXT_PREDICTION ]
    }).then(interactions => console.log(interactions))

    Parameters

    Returns Promise<IWidgetKindInteractionsMap>

hasDebugLogger

  • hasDebugLogger(): boolean
  • Returns boolean

Const incrementUserQuestTaskProgress

  • description

    Increment user quest quest progress for current user.

    async
    since

    0.1.0

    example
    incrementUserQuestTaskProgress({
    userQuestTaskId: "<User Quest Task ID>",
    customIncrement: 10
    }).then(userQuest => console.log(userQuest))

    Parameters

    Returns Promise<IUserQuest>

init

isChatMessageResponsePayload

isChatUserMessageResponsePayload

isCustomMessageResponsePayload

isNumberPredictionItem

isQuoteMessagePayload

isSliderInteractionItem

isTextAskInteractionItem

isWidgetChoiceItem

isWidgetOptionItem

Const joinChatRoom

  • description

    Join chat room by roomId, current user becomes 'member' and is available in chatroom membership list

    async
    since

    0.1.0

    example
    joinChatRoom({roomId: 'c1f6082c-f7b9-4d1e-b64e-9071a3860ffc'})
    

    Parameters

    Returns Promise<IChatRoomMembership>

    Promise

Const leaveChatRoom

  • description

    Leave chat room by roomId, current user 'member' status removed from chatroom membership list

    async
    since

    0.1.0

    example
    leaveChatRoom({roomId: 'c1f6082c-f7b9-4d1e-b64e-9071a3860ffc'})
    

    Parameters

    Returns Promise<boolean>

    Promise - true if leaved else false

pinMessage

  • description

    Pin a chat message

    async
    since

    0.1.0

    example
    pinMessage({
    roomId: "9e6f1bc4-9f02-4c57-92b7-7521d0f5b027",
    messageId: "aa7e03fc-01f0-4a98-a2e0-3fed689632d7",
    messagePayload: { // messagePayload of type IMessagePayload
    message: "test Message"
    }
    }).then(pinMessageInfo => console.log(pinMessageInfo))

    Parameters

    Returns Promise<IPinMessageInfo>

Const prepareOutgoingChatMessage

removeChatRoomEventListener

  • removeChatRoomEventListener<_Event, _EventListener>(chatRoomEvent: _Event, listenerFn: _EventListener, options: IChatRoomEventListenerOptions): Promise<void>

Const removeMessageListener

  • Removes listener from chatroom

    since

    0.1.0

    example
    removeMessageListener({roomId: string}, function(e){console.log(e)})
    

    Parameters

    Returns Promise<void>

Const removeProgramListener

  • Remove a program listenerFn

    since

    0.1.0

    example
    function programListener({event, message}){
    // your custom logic
    }
    removeProgramListener({
    programId: "<Your program Id>"
    }, programListener)

    Parameters

    Returns Promise<void>

removeReactionSpaceEventListener

  • removeReactionSpaceEventListener<_Event, _EventListener>(eventArg: IReactionEventArg<_Event>, listenerFn?: _EventListener): Promise<void>

removeRewardEventListener

  • description

    Remove registered listenerFn for the RewardEvent. If no listenerFn is passed, it removes all the listeners attached to that event

    since

    0.1.0

    example
    function onReceiveNewRewardItemTransfer(rewardItemTransfer){
    console.log(rewardItemTransfer);
    }
    removeRewardEventListener(
    RewardEvent.REWARD_ITEM_TRANSFER_RECEIVED,
    onReceiveNewRewardItemTransfer
    );

    Parameters

    Returns void

removeSdkEventListener

  • removeSdkEventListener<_Event, ListenerFn>(sdkEvent: _Event, listenerFn: ListenerFn): void
  • description

    Remove registered listenerFn for the given SdkEvent, when no listener passed, all registered event listener will be removed

    since

    0.1.0

    example
    removeSdkEventListener(SdkEvent.INITIALISED, onSdkInitialisation);
    

    Type parameters

    Parameters

    • sdkEvent: _Event
    • listenerFn: ListenerFn

    Returns void

removeUserProfileEventListener

  • description

    Remove registered listenerFn for the given UserProfileEvent, when no listener passed, all registered event listener will be removed

    since

    0.1.0

    example
    removeUserProfileEventListener(UserProfileEvent.BLOCK_PROFILE, onBlockProfileListener);
    

    Parameters

    Returns void

removeUserReaction

  • description

    Remove a user reaction

    async
    since

    0.1.0

    example
    removeUserReaction({
    reactionSpaceId: "aa7e03fc-01f0-4a98-a2e0-3fed689632d7",
    userReactionId: "0fddc166-b8c3-4ce9-990e-848bde12188b"
    })

    Parameters

    Returns Promise<null>

Const removeWidgetListener

  • Remove widget listener

    since

    0.1.0

    example
    function widgetListener({event, message}){
    // your custom logic
    }
    removeWidgetListener({
    widgetId: "<Your widget Id>",
    widgetKind: "<Your widget kind>"
    }, widgetListener)

    Parameters

    Returns Promise<void>

Const reportMessage

  • description

    Report Chat Message

    since

    0.1.0

    async
    example
    reportMessage({
    roomId: "a147f914-d474-4cfb-81c6-4099404c435a",
    profileId: "c1ca9590-81d9-4da2-8d4f-85b24a35f81f",
    nickname: "Jon Doe",
    messageId: "d145e2f1-36df-4c5a-8157-078cbf366297",
    }).then((res) => console.log(res));

    Parameters

    Returns Promise<IReportChatMessageResponse>

sendChatRoomInviteToProfile

  • description

    Send chat room invite to profile (user)

    params

    args of type ISendChatRoomInviteArgs

    async
    since

    0.1.0

    example
    sendChatRoomInviteToProfile({
    roomId: "9e6f1bc4-9f02-4c57-92b7-7521d0f5b027",
    profileId: "aa7e03fc-01f0-4a98-a2e0-3fed689632d7"
    }).then(chatRoomInvitation => console.log(chatRoomInvitation))

    Parameters

    Returns Promise<IChatRoomInvitation>

    Promise

Const sendCustomMessage

  • sendCustomMessage Send custom message to chat room.

    since

    0.1.0

    async
    example
    sendCustomMessage({custom_data: 'Test message', roomId: 'c1f6082c-f7b9-4d1e-b64e-9071a3860ffc'})
    

    Parameters

    Returns Promise<ICustomMessageResponsePayload>

Const sendMessage

  • sendMessage Send user message to chat room.

    async
    since

    0.1.0

    example
    sendMessage({message: 'Test message', roomId: 'c1f6082c-f7b9-4d1e-b64e-9071a3860ffc'})
    

    Parameters

    Returns Promise<IMessageResponsePayload>

Const setUserQuestTaskProgress

  • description

    Update user quest quest progress (to an absolute value) for current user.

    async
    since

    0.1.0

    example
    setUserQuestTaskProgress({
    userQuestTaskId: "<User Quest Task ID>",
    customProgress: 10
    }).then(userQuest => console.log(userQuest))

    Parameters

    Returns Promise<IUserQuest>

Const startUserQuest

  • description

    Start a quest for current user.

    async
    since

    0.1.0

    example
    startUserQuest({
    questId: "<Quest ID>"
    }).then(userQuest => console.log(userQuest))

    Parameters

    Returns Promise<IUserQuest>

Const transferRewardItemAmount

  • description

    Transfer Reward Item Balance to another user profile.

    async
    since

    0.1.0

    example
    transferRewardItemAmount({
    rewardItemId: "xxxx",
    amount: 10,
    recipientProfileId: "xxxx"
    }).then(res => console.log(res))

    Parameters

    Returns Promise<IRewardItemTransferPayload>

unblockProfile

  • description

    Unblock profile using Block Info id for a given blocked profile, use getProfileBlockInfo or getBlockInfoList to get corresponding profile block info id

    async
    since

    0.1.0

    example
    unblockProfile({blockId: "c327a72c-94e5-4f5a-bcef-16ee84d35077"}).then(response => console.log(response))
    

    Parameters

    Returns Promise<any>

unpinMessage

  • description

    Unpin a chat message

    async
    since

    0.1.0

    example
    unpinMessage({
    pinMessageInfoId: "3f81ccb0-ec95-4e71-a0b7-462889699f75"
    }).then(res => console.log(res))

    Parameters

    Returns Promise<null>

Const updateChatRoom

  • description

    Updates chat room by id

    async
    since

    0.1.0

    updateChatRoom("5c9974ba-2180-4640-b949-eb9501d2f2ff", {
    title: "new title",
    content_filter: "none",
    visibility: "everyone",
    }).then((res) => console.log(res));

    Parameters

    Returns Promise<IChatRoomPayload>

    Promise

updateChatRoomInviteStatus

  • description

    Updates chat room invitation status

    params

    args of type IUpdateChatRoomInvitationStatusArgs

    async
    since

    0.1.0

    example
    updateChatRoomInviteStatus({
    invitationId: "28cc0ceb-8934-48cd-abc5-4d3a3a681c1b",
    invitationStatus: ChatRoomInvitationStatus.ACCEPTED
    }).then(chatRoomInvitation => console.log(chatRoomInvitation))

    Parameters

    Returns Promise<IChatRoomInvitation>

    Promise

updateCommentBoard

  • description

    Update comment board

    async
    since

    0.1.0

    example
    updateCommentBoard({
    commentBoardId: '5f5fea99-569b-42f3-875d-5b3943b64ba0',
    title: "title",
    customId: "postID431",
    repliesDepth: 1,
    allowComments: true,
    description: 'abc',
    customData: 'custom data'
    }).then(commentBoard => console.log(commentBoard))
    ``

    Parameters

    Returns Promise<ICommentBoard>

updateReactionSpace

  • description

    Update a reaction space with reaction pack ids or reaction space name

    async
    since

    0.1.0

    example
    updateReactionSpace({
    reactionSpaceId: "aa7e03fc-01f0-4a98-a2e0-3fed689632d7",
    reactionPackIds: ["aa7e03fc-01f0-4a98-a2e0-3fed689632d7", "0fddc166-b8c3-4ce9-990e-848bde12188b"]
    }).then(reactionSpace => console.log(reactionSpace))

    Parameters

    Returns Promise<IReactionSpace>

Const updateUserProfile

  • updateUserProfile(args: { accessToken: string; options?: { custom_data?: string; nickname?: string } }): Promise<IUserProfile>
  • Updates profile by accessToken with optional changed nickname or custom_data.

    async
    since

    0.1.0

    example
    const options = {nickname: 'New Nickname'}
    updateUserProfile({accessToken, options}).then(profile => console.log(profile))

    Parameters

    • args: { accessToken: string; options?: { custom_data?: string; nickname?: string } }
      • accessToken: string

        userProfile access_token

      • Optional options?: { custom_data?: string; nickname?: string }
        • Optional custom_data?: string

          Data saved to profile's custom_data property

        • Optional nickname?: string

          The nickname to update the userProfile

    Returns Promise<IUserProfile>

Const updateUserQuestTasks

  • description

    Complete a quest task for current user.

    async
    since

    0.1.0

    example
    updateUserQuestTasks({
    userQuestId: "<User Quest ID>";
    userQuestTaskIds: ["<User Quest Task ID>"];
    status: UserQuestStatus.INCOMPLETE;
    }).then(userQuest => console.log(userQuest))

    Parameters

    Returns Promise<IUserQuest>

Const updateWidgetInteraction

  • Update a widget interaction

    since

    0.1.0

    example
    updateWidgetInteraction({
    widgetId: "<Your widget Id>",
    widgetKind: "<widget kind>",
    interactionItem: selectedPollOptionItem
    })

    Parameters

    Returns Promise<IWidgetInteraction>

Const uploadImage

  • description

    Upload a image to get image url for sending image message

    since

    0.1.0

    async
    example
    // For Web usage
    // get the image blob data from image uri, uri could be local file uri
    const imageBlob = await fetch(imageUri).then(res => res.blob())
    // create formdata and append "type" and "image" keys
    const imageFormData = new FormData();
    imageFormData.append('type', 'file')
    imageFormData.append('image', imageBlob)

    const { image_url } = await uploadImage({
    roomId: "a147f914-d474-4cfb-81c6-4099404c435a",
    imageFormData: imageFormData
    });

    Parameters

    Returns Promise<IUploadImageResponse>

Legend

  • Property
  • Method

Generated using TypeDoc