@wepublish/api
Version:
API core for we.publish.
112 lines (111 loc) • 4.33 kB
TypeScript
import { CommentAuthorType, CommentItemType, CommentState, Prisma, PrismaClient } from '@prisma/client';
import { Context } from '../../context';
import { RichTextNode } from "../../../../richtext-api/src";
export declare const takeActionOnComment: (id: string, input: Pick<Prisma.CommentUncheckedUpdateInput, 'state' | 'rejectionReason'>, authenticate: Context['authenticate'], comment: PrismaClient['comment']) => Prisma.Prisma__CommentClient<{
revisions: (import("@prisma/client/runtime/library").GetResult<{
id: string;
createdAt: Date;
text: Prisma.JsonValue;
title: string;
lead: string;
commentId: string;
}, unknown> & {})[];
} & import("@prisma/client/runtime/library").GetResult<{
id: string;
createdAt: Date;
modifiedAt: Date;
itemID: string;
itemType: CommentItemType;
peerId: string;
parentID: string;
rejectionReason: import(".prisma/client").CommentRejectionReason;
state: CommentState;
source: string;
authorType: CommentAuthorType;
guestUsername: string;
guestUserImageID: string;
userID: string;
}, unknown> & {}, never, import("@prisma/client/runtime/library").DefaultArgs>;
type CommentRevisionInput = {
text?: RichTextNode[];
title?: string;
lead?: string;
};
type CommentRatingOverrideInput = {
answerId: string;
value: number | null | undefined;
};
export declare const updateComment: (commentId: string, revision: CommentRevisionInput | undefined, userID: string, guestUsername: string, guestUserImageID: string, source: string, tagIds: string[] | undefined, ratingOverrides: CommentRatingOverrideInput[] | undefined, authenticate: Context['authenticate'], commentRatingAnswerClient: PrismaClient['commentRatingSystemAnswer'], commentClient: PrismaClient['comment']) => Promise<{
revisions: (import("@prisma/client/runtime/library").GetResult<{
id: string;
createdAt: Date;
text: Prisma.JsonValue;
title: string;
lead: string;
commentId: string;
}, unknown> & {})[];
overriddenRatings: (import("@prisma/client/runtime/library").GetResult<{
answerId: string;
commentId: string;
createdAt: Date;
modifiedAt: Date;
value: number;
}, unknown> & {})[];
} & import("@prisma/client/runtime/library").GetResult<{
id: string;
createdAt: Date;
modifiedAt: Date;
itemID: string;
itemType: CommentItemType;
peerId: string;
parentID: string;
rejectionReason: import(".prisma/client").CommentRejectionReason;
state: CommentState;
source: string;
authorType: CommentAuthorType;
guestUsername: string;
guestUserImageID: string;
userID: string;
}, unknown> & {}>;
export declare const createAdminComment: (itemId: string, itemType: CommentItemType, parentID: string | undefined | null, text: string | undefined, tagIds: string[] | undefined, authenticate: Context['authenticate'], commentClient: PrismaClient['comment']) => Promise<{
revisions: (import("@prisma/client/runtime/library").GetResult<{
id: string;
createdAt: Date;
text: Prisma.JsonValue;
title: string;
lead: string;
commentId: string;
}, unknown> & {})[];
} & import("@prisma/client/runtime/library").GetResult<{
id: string;
createdAt: Date;
modifiedAt: Date;
itemID: string;
itemType: CommentItemType;
peerId: string;
parentID: string;
rejectionReason: import(".prisma/client").CommentRejectionReason;
state: CommentState;
source: string;
authorType: CommentAuthorType;
guestUsername: string;
guestUserImageID: string;
userID: string;
}, unknown> & {}>;
export declare const deleteComment: (id: string, authenticate: Context['authenticate'], commentClient: PrismaClient['comment']) => Promise<import("@prisma/client/runtime/library").GetResult<{
id: string;
createdAt: Date;
modifiedAt: Date;
itemID: string;
itemType: CommentItemType;
peerId: string;
parentID: string;
rejectionReason: import(".prisma/client").CommentRejectionReason;
state: CommentState;
source: string;
authorType: CommentAuthorType;
guestUsername: string;
guestUserImageID: string;
userID: string;
}, unknown> & {}>;
export {};