/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { escalationPathsCreate } from "../funcs/escalationPathsCreate.js"; import { escalationPathsDelete } from "../funcs/escalationPathsDelete.js"; import { escalationPathsGet } from "../funcs/escalationPathsGet.js"; import { escalationPathsUpdate } from "../funcs/escalationPathsUpdate.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class EscalationPaths extends ClientSDK { /** * CreatePath Escalations V2 * * @remarks * Create an escalation path. * * An escalation path is a series of steps that describe how a page should be escalated, * represented as graph, supporting conditional branches based on alert priority and working * intervals. * * We recommend you create escalation paths in the incident.io dashboard where our path * builder makes it easy to use conditions and visualise the path. */ async create( request: components.CreatePathRequestBody, options?: RequestOptions, ): Promise { return unwrapAsync(escalationPathsCreate( this, request, options, )); } /** * DestroyPath Escalations V2 * * @remarks * Archives an escalation path. * * We recommend you create escalation paths in the incident.io dashboard where our path * builder makes it easy to use conditions and visualise the path. */ async delete( request: operations.EscalationsV2NumberDestroyPathRequest, options?: RequestOptions, ): Promise { return unwrapAsync(escalationPathsDelete( this, request, options, )); } /** * ShowPath Escalations V2 * * @remarks * Show an escalation path. * * We recommend you create escalation paths in the incident.io dashboard where our path * builder makes it easy to use conditions and visualise the path. */ async get( request: operations.EscalationsV2NumberShowPathRequest, options?: RequestOptions, ): Promise { return unwrapAsync(escalationPathsGet( this, request, options, )); } /** * UpdatePath Escalations V2 * * @remarks * Updates an escalation path. * * We recommend you create escalation paths in the incident.io dashboard where our path * builder makes it easy to use conditions and visualise the path. */ async update( request: operations.EscalationsV2NumberUpdatePathRequest, options?: RequestOptions, ): Promise { return unwrapAsync(escalationPathsUpdate( this, request, options, )); } }