File size: 651 Bytes
64648ce
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { api } from "./client";

export interface SkillChange {
  id: string;
  companyId: string;
  skillId: string;
  agentId: string | null;
  changeType: "created" | "updated" | "deleted" | "enabled" | "disabled";
  summary: string | null;
  diff: string | null;
  createdAt: string;
}

export const skillChangesApi = {
  listForSkill: (companyId: string, skillId: string) =>
    api.get<SkillChange[]>(
      `/companies/${encodeURIComponent(companyId)}/skills/${encodeURIComponent(skillId)}/changes`,
    ),
  listForAgent: (agentId: string) =>
    api.get<SkillChange[]>(
      `/agents/${encodeURIComponent(agentId)}/skill-changes`,
    ),
};