/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { expect, test } from "vitest"; import { Incidentio } from "../index.js"; test("Incident Roles Incident Roles V2 #List", async () => { const incidentio = new Incidentio(); const result = await incidentio.incidentRoles.list(); expect(result).toBeDefined(); expect(result).toBeDefined(); expect(result).toEqual({ incidentRoles: [ { createdAt: new Date("2021-08-17T13:28:57.801578Z"), description: "The person currently coordinating the incident", id: "01FCNDV6P870EA6S7TK1DSYDG0", instructions: "Take point on the incident; Make sure people are clear on responsibilities", name: "Incident Lead", roleType: "lead", shortform: "lead", updatedAt: new Date("2021-08-17T13:28:57.801578Z"), }, ], }); }); test("Incident Roles Incident Roles V2 #Create", async () => { const incidentio = new Incidentio(); const result = await incidentio.incidentRoles.create({ description: "The person currently coordinating the incident", instructions: "Take point on the incident; Make sure people are clear on responsibilities", name: "Incident Lead", shortform: "lead", }); expect(result).toBeDefined(); expect(result).toBeDefined(); expect(result).toEqual({ incidentRole: { createdAt: new Date("2021-08-17T13:28:57.801578Z"), description: "The person currently coordinating the incident", id: "01FCNDV6P870EA6S7TK1DSYDG0", instructions: "Take point on the incident; Make sure people are clear on responsibilities", name: "Incident Lead", roleType: "lead", shortform: "lead", updatedAt: new Date("2021-08-17T13:28:57.801578Z"), }, }); }); test("Incident Roles Incident Roles V2 #Delete", async () => { const incidentio = new Incidentio(); await incidentio.incidentRoles.delete({ id: "01FCNDV6P870EA6S7TK1DSYDG0", }); }); test("Incident Roles Incident Roles V2 #Show", async () => { const incidentio = new Incidentio(); const result = await incidentio.incidentRoles.get({ id: "01FCNDV6P870EA6S7TK1DSYDG0", }); expect(result).toBeDefined(); expect(result).toBeDefined(); expect(result).toEqual({ incidentRole: { createdAt: new Date("2021-08-17T13:28:57.801578Z"), description: "The person currently coordinating the incident", id: "01FCNDV6P870EA6S7TK1DSYDG0", instructions: "Take point on the incident; Make sure people are clear on responsibilities", name: "Incident Lead", roleType: "lead", shortform: "lead", updatedAt: new Date("2021-08-17T13:28:57.801578Z"), }, }); }); test("Incident Roles Incident Roles V2 #Update", async () => { const incidentio = new Incidentio(); const result = await incidentio.incidentRoles.update({ id: "01FCNDV6P870EA6S7TK1DSYDG0", updateRequestBody6: { description: "The person currently coordinating the incident", instructions: "Take point on the incident; Make sure people are clear on responsibilities", name: "Incident Lead", shortform: "lead", }, }); expect(result).toBeDefined(); expect(result).toBeDefined(); expect(result).toEqual({ incidentRole: { createdAt: new Date("2021-08-17T13:28:57.801578Z"), description: "The person currently coordinating the incident", id: "01FCNDV6P870EA6S7TK1DSYDG0", instructions: "Take point on the incident; Make sure people are clear on responsibilities", name: "Incident Lead", roleType: "lead", shortform: "lead", updatedAt: new Date("2021-08-17T13:28:57.801578Z"), }, }); });