UNPKG

@mintlify/models

Version:

Mintlify models

38 lines (37 loc) 1.23 kB
export declare const feedbackSources: readonly ["code_snippet", "contextual"]; export declare const feedbackStates: readonly ["pending", "in_progress", "resolved", "dismissed"]; export type FeedbackSource = (typeof feedbackSources)[number]; export type FeedbackState = (typeof feedbackStates)[number]; export type BaseFeedback<T extends FeedbackSource> = { _id: string; orgId: string; subdomain: string; source: T; path: string; state: FeedbackState; createdAt: Date; updatedAt: Date; resolvedAt?: Date; internalNotes?: string; }; export type CodeSnippetFeedbackSubmission = { code: string; path: string; feedback: string; filename?: string; lang?: string; }; export type ContextualFeedbackSubmission = { path: string; helpful: boolean; feedback?: string; contact?: string; }; export type CodeSnippetFeedback = BaseFeedback<'code_snippet'> & { data: CodeSnippetFeedbackSubmission; }; export type ContextualFeedback = BaseFeedback<'contextual'> & { data: ContextualFeedbackSubmission; }; export type UserFeedbackData = CodeSnippetFeedbackSubmission | ContextualFeedbackSubmission; export type UserFeedback = CodeSnippetFeedback | ContextualFeedback;