/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { expect, test } from "vitest"; import { Incidentio } from "../index.js"; test("Escalation Paths Escalations V2 #Create Path", async () => { const incidentio = new Incidentio(); const result = await incidentio.escalationPaths.create({ name: "Urgent Support", path: [], workingHours: [ { id: "abc123", name: "abc123", timezone: "abc123", weekdayIntervals: [ { endTime: "17:00", startTime: "09:00", weekday: "abc123", }, ], }, ], }); expect(result).toBeDefined(); expect(result).toBeDefined(); expect(result).toEqual({ escalationPath: { id: "01FCNDV6P870EA6S7TK1DSYDG0", name: "Urgent Support", path: [], workingHours: [ { id: "abc123", name: "abc123", timezone: "abc123", weekdayIntervals: [ { endTime: "17:00", startTime: "09:00", weekday: "abc123", }, ], }, ], }, }); }); test("Escalation Paths Escalations V2 #Destroy Path", async () => { const incidentio = new Incidentio(); await incidentio.escalationPaths.delete({ id: "01FCNDV6P870EA6S7TK1DSYDG0", }); }); test("Escalation Paths Escalations V2 #Show Path", async () => { const incidentio = new Incidentio(); const result = await incidentio.escalationPaths.get({ id: "01FCNDV6P870EA6S7TK1DSYDG0", }); expect(result).toBeDefined(); expect(result).toBeDefined(); expect(result).toEqual({ escalationPath: { id: "01FCNDV6P870EA6S7TK1DSYDG0", name: "Urgent Support", path: [], workingHours: [ { id: "abc123", name: "abc123", timezone: "abc123", weekdayIntervals: [ { endTime: "17:00", startTime: "09:00", weekday: "abc123", }, ], }, ], }, }); }); test("Escalation Paths Escalations V2 #Update Path", async () => { const incidentio = new Incidentio(); const result = await incidentio.escalationPaths.update({ id: "01FCNDV6P870EA6S7TK1DSYDG0", createPathRequestBody: { name: "Urgent Support", path: [], workingHours: [ { id: "abc123", name: "abc123", timezone: "abc123", weekdayIntervals: [ { endTime: "17:00", startTime: "09:00", weekday: "abc123", }, ], }, ], }, }); expect(result).toBeDefined(); expect(result).toBeDefined(); expect(result).toEqual({ escalationPath: { id: "01FCNDV6P870EA6S7TK1DSYDG0", name: "Urgent Support", path: [], workingHours: [ { id: "abc123", name: "abc123", timezone: "abc123", weekdayIntervals: [ { endTime: "17:00", startTime: "09:00", weekday: "abc123", }, ], }, ], }, }); });