itd-api / report
Variable: report
ts
const report: Readonly<{
comment: (commentId) => ReportBuilder;
post: (postId) => ReportBuilder;
user: (userId) => ReportBuilder;
}>;Defined in: builders/report.ts:89
Начинает сборку жалобы.
Тип объекта выбирается точкой входа, так что указать идентификатор комментария с типом «пост» нельзя в принципе.
Example
ts
import { report, ReportReason } from 'itd-api';
await itd.reports.create(report.post(postId).reason(ReportReason.Spam));
await itd.reports.create(report.user(userId).reason('fraud').description('пишет в личку'));