@amityco/ts-sdk-react-native
Version:
Amity Social Cloud Typescript SDK
36 lines • 1.53 kB
TypeScript
/**
* ```js
* import { addReaction } from '@amityco/ts-sdk-react-native'
* const success = await addReaction('post', postId, 'like')
* ```
*
* Creates an {@link Amity.Reaction}
*
* @param referenceType The type of thing to add a {@link Amity.Reaction} to, such as a post or a comment.
* @param referenceId The ID of the thing to add a new {@link Amity.Reaction} to.
* @param reactionName Reaction name, such as a `like` or `love`.
* @returns The added result.
*
* @category Reaction API
* @async
* */
export declare const addReaction: {
(referenceType: Amity.Reaction['referenceType'], referenceId: Amity.Reaction['referenceId'], reactionName: Amity.InternalReactor['reactionName']): Promise<boolean>;
/**
* ```js
* import { addReaction } from '@amityco/ts-sdk-react-native'
* const success = addReaction.optimistically('post', postId, 'like')
* ```
*
* Creates an {@link Amity.Reaction} optimistically
*
* @param referenceType The type of thing to add a {@link Amity.Reaction} to, such as a post or a comment.
* @param referenceId The ID of the thing to add a new {@link Amity.Reaction} to.
* @param reactionName Reaction name, such as a `like` or `love`.
* @returns The added result.
*
* @category Reaction API
* */
optimistically(referenceType: Amity.ReactableType, referenceId: Amity.Reaction['referenceId'], reactionName: Amity.InternalReactor['reactionName']): boolean | undefined;
};
//# sourceMappingURL=addReaction.d.ts.map