@spotable/attio-sdk
Version:
Client for Attio REST API
43 lines (37 loc) • 970 B
text/typescript
import { writeGeneratedFile } from "../../helpers/fs";
import logger from "../../helpers/logger";
import { generateFileHeader } from "./fileHeader";
const FILE_NAME = "comment.ts";
export function generateCommentTypes(outputDir: string): void {
logger.debug(`Generating comment types file: ${FILE_NAME}`);
const commentContent = `
${generateFileHeader(FILE_NAME)}
export interface AttioComment {
id: {
workspace_id: string;
comment_id: string;
};
thread_id: string;
content_plaintext: string;
entry: {
entry_id: string;
list_id: string;
} | null;
record: {
object_id: string;
record_id: string;
};
resolved_at: string | null;
resolved_by: {
id: string;
type: "api-token" | "workspace-member" | "system" | "app";
} | null;
created_at: string;
author: {
id: string;
type: "api-token" | "workspace-member" | "system" | "app";
};
}
`;
writeGeneratedFile(outputDir, FILE_NAME, commentContent);
}