/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { expect, test } from "vitest"; import { Incidentio } from "../index.js"; test("Incident Attachments Incident Attachments V1 #List", async () => { const incidentio = new Incidentio(); const result = await incidentio.incidentAttachments.list({ incidentId: "01G0J1EXE7AXZ2C93K61WBPYEH", externalId: "123", resourceType: "pager_duty_incident", }); expect(result).toBeDefined(); expect(result).toBeDefined(); expect(result).toEqual({ incidentAttachments: [ { id: "01FCNDV6P870EA6S7TK1DSYD5H", incidentId: "01FCNDV6P870EA6S7TK1DSYD5H", resource: { externalId: "123", permalink: "https://my.pagerduty.com/incidents/ABC", resourceType: "pager_duty_incident", title: "The database has gone down", }, }, ], }); }); test("Incident Attachments Incident Attachments V1 #List Default", async () => { const incidentio = new Incidentio(); const result = await incidentio.incidentAttachments.list({ incidentId: "01G0J1EXE7AXZ2C93K61WBPYEH", externalId: "123", resourceType: "pager_duty_incident", }); expect(result).toBeDefined(); expect(result).toBeDefined(); expect(result).toEqual({ incidentAttachments: [ { id: "01FCNDV6P870EA6S7TK1DSYD5H", incidentId: "01FCNDV6P870EA6S7TK1DSYD5H", resource: { externalId: "123", permalink: "https://my.pagerduty.com/incidents/ABC", resourceType: "pager_duty_incident", title: "The database has gone down", }, }, ], }); }); test("Incident Attachments Incident Attachments V1 #Create", async () => { const incidentio = new Incidentio(); const result = await incidentio.incidentAttachments.create({ incidentId: "01FDAG4SAP5TYPT98WGR2N7W91", resource: { externalId: "123", resourceType: "pager_duty_incident", }, }); expect(result).toBeDefined(); expect(result).toBeDefined(); expect(result).toEqual({ incidentAttachment: { id: "01FCNDV6P870EA6S7TK1DSYD5H", incidentId: "01FCNDV6P870EA6S7TK1DSYD5H", resource: { externalId: "123", permalink: "https://my.pagerduty.com/incidents/ABC", resourceType: "pager_duty_incident", title: "The database has gone down", }, }, }); }); test("Incident Attachments Incident Attachments V1 #Delete", async () => { const incidentio = new Incidentio(); await incidentio.incidentAttachments.delete({ id: "01FCNDV6P870EA6S7TK1DSYD5H", }); });