@amityco/ts-sdk-react-native
Version:
Amity Social Cloud Typescript SDK
21 lines • 893 B
TypeScript
/**
* ```js
* import { createReport } from '@amityco/ts-sdk-react-native'
* const flagged = await createReport('post', postId)
* const flaggedUser = await createReport('user', userId, {
* reportType: 'behavior',
* reason: 'Harassment or bullying',
* })
* ```
*
* @param referenceType The type of thing to add a report to, such as a post or a comment.
* @param referenceId The ID of the thing to add a new report to.
* @param options Optional report metadata. Only honored when `referenceType === 'user'`.
* See `UserRepository.flagUser` for the accepted shape and validation rules.
* @returns the created report result
*
* @category Report API
* @async
* */
export declare const createReport: (referenceType: 'post' | 'comment' | 'message' | 'user', referenceId: string, options?: Amity.UserReportOptions) => Promise<boolean>;
//# sourceMappingURL=createReport.d.ts.map