declare type TFeedback = {
  _id?: string;
  description?: string;
  subject?: string;
  service?: string;
  provider?: string | null;
  location: string;
  status?: string;
  createdBy?: any;
  createdByName?: string;
  creaetdByEmail?: string;
  attachments?: TAttachment[];
  workOrders?: object[];
  workOrder?: Record<string, any>;
  organization: string;
  site: string;
  createdAt?: string | Date;
  updatedAt?: string | Date;
  app: string;
  assignee?: string;
  assigneeName?: string;
  assigneeInfo?: Record<string, any>;
  statusUpdates?: any[];
  attachedIR?: Array<Record<string, any>>;
};

declare type TGetFeedbacksByPageSearchResponse = {
  items: TFeedback[];
  pageRange: string;
  pages: number;
};

declare type TAssignee = {
  _id: string;
  givenName: string;
  middleName: string;
  surname: string;
  organization: string;
  role: string;
};

declare type TCreatedBy = {
  _id: string;
  givenName: string;
  middleName: string;
  surname: string;
  organization: string;
  role: string;
};

declare type TUpdateFeedbackDescriptionOptions = {
  _id: string;
  description: string;
};

declare type TAttachment = {
  name: string;
  _id?: string;
  id: string;
  url: string;
  type: string;
};

declare type TFeedbackMetadata = {
  serviceProvider: string;
  assignee: string;
  organization: string;
  site: string;
  name: string;
  signature: string;
  attachments: string;
  completedAt: string;
};

declare type TFeedbackCreate = Pick<
  TFeedback,
  | "subject"
  | "location"
  | "description"
  | "attachments"
  | "highPriority"
  | "serviceProvider"
  | "assignee"
  | "organization"
  | "site"
  | "createdBy"
  | "app"
> & {
  category?: string;
};

declare type TFeedbackUpdate = Pick<
  TFeedback,
  "subject" | "category" | "location" | "description" | "attachments"
>;

declare type TFeedbackUpdate = Pick<
  TFeedback,
  "attachments" | "category" | "subject" | "location" | "description"
>;

declare type TFeedbackStatusComplete = Pick<
  TFeedback,
  "status" | "name" | "signature" | "attachments"
>;

declare type TFeedbackUpdateStatus = Pick<TFeedback, "status">;
