refactor: distribute types from crm-types.ts to owning composables
Each composable now owns its types and exports them. Other composables import types from the owning composable. Deleted centralized crm-types.ts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,23 @@
|
||||
import { ref, computed, watch, type ComputedRef } from "vue";
|
||||
import { useQuery } from "@vue/apollo-composable";
|
||||
import { GetClientTimelineQueryDocument } from "~~/graphql/generated";
|
||||
import type { ClientTimelineItem } from "~/composables/crm-types";
|
||||
|
||||
import type { CommItem } from "~/composables/useContacts";
|
||||
import type { CalendarEvent } from "~/composables/useCalendar";
|
||||
import type { FeedCard } from "~/composables/useFeed";
|
||||
import type { WorkspaceDocument } from "~/composables/useDocuments";
|
||||
|
||||
export type ClientTimelineItem = {
|
||||
id: string;
|
||||
contactId: string;
|
||||
contentType: "message" | "calendar_event" | "document" | "recommendation" | string;
|
||||
contentId: string;
|
||||
datetime: string;
|
||||
message?: CommItem | null;
|
||||
calendarEvent?: CalendarEvent | null;
|
||||
recommendation?: FeedCard | null;
|
||||
document?: WorkspaceDocument | null;
|
||||
};
|
||||
|
||||
export function useTimeline(opts: { apolloAuthReady: ComputedRef<boolean> }) {
|
||||
const timelineContactId = ref("");
|
||||
|
||||
Reference in New Issue
Block a user