/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { expect, test } from "vitest"; import { Incidentio } from "../index.js"; test("Incident Statuses Incident Statuses V1 #List", async () => { const incidentio = new Incidentio(); const result = await incidentio.incidentStatuses.list(); expect(result).toBeDefined(); expect(result).toBeDefined(); expect(result).toEqual({ incidentStatuses: [ { category: "triage", createdAt: new Date("2021-08-17T13:28:57.801578Z"), description: "Impact has been **fully mitigated**, and we're ready to learn from this incident.", id: "01FCNDV6P870EA6S7TK1DSYD5H", name: "Closed", rank: 4, updatedAt: new Date("2021-08-17T13:28:57.801578Z"), }, ], }); }); test("Incident Statuses Incident Statuses V1 #Create", async () => { const incidentio = new Incidentio(); const result = await incidentio.incidentStatuses.create({ category: "live", description: "Impact has been **fully mitigated**, and we're ready to learn from this incident.", name: "Closed", }); expect(result).toBeDefined(); expect(result).toBeDefined(); expect(result).toEqual({ incidentStatus: { category: "triage", createdAt: new Date("2021-08-17T13:28:57.801578Z"), description: "Impact has been **fully mitigated**, and we're ready to learn from this incident.", id: "01FCNDV6P870EA6S7TK1DSYD5H", name: "Closed", rank: 4, updatedAt: new Date("2021-08-17T13:28:57.801578Z"), }, }); }); test("Incident Statuses Incident Statuses V1 #Delete", async () => { const incidentio = new Incidentio(); await incidentio.incidentStatuses.delete({ id: "01FCNDV6P870EA6S7TK1DSYD5H", }); }); test("Incident Statuses Incident Statuses V1 #Show", async () => { const incidentio = new Incidentio(); const result = await incidentio.incidentStatuses.get({ id: "01FCNDV6P870EA6S7TK1DSYD5H", }); expect(result).toBeDefined(); expect(result).toBeDefined(); expect(result).toEqual({ incidentStatus: { category: "triage", createdAt: new Date("2021-08-17T13:28:57.801578Z"), description: "Impact has been **fully mitigated**, and we're ready to learn from this incident.", id: "01FCNDV6P870EA6S7TK1DSYD5H", name: "Closed", rank: 4, updatedAt: new Date("2021-08-17T13:28:57.801578Z"), }, }); }); test("Incident Statuses Incident Statuses V1 #Update", async () => { const incidentio = new Incidentio(); const result = await incidentio.incidentStatuses.update({ id: "01FCNDV6P870EA6S7TK1DSYD5H", updateRequestBody7: { description: "Impact has been **fully mitigated**, and we're ready to learn from this incident.", name: "Closed", }, }); expect(result).toBeDefined(); expect(result).toBeDefined(); expect(result).toEqual({ incidentStatus: { category: "triage", createdAt: new Date("2021-08-17T13:28:57.801578Z"), description: "Impact has been **fully mitigated**, and we're ready to learn from this incident.", id: "01FCNDV6P870EA6S7TK1DSYD5H", name: "Closed", rank: 4, updatedAt: new Date("2021-08-17T13:28:57.801578Z"), }, }); });