For TypeScript, the GraphQL SDK gives you a fully typed client for these operations.
serviceLevelAgreement:createserviceLevelAgreement:editserviceLevelAgreement:delete
Create an SLA policy
Each target needs atype, a minutes value, and a warnBefore period that is shorter than the target. Pass businessHoursScheduleIds for a target to count only while one of those schedules is open, including the schedules’ overrides. Leave it out or pass an empty array for the target to count around the clock. List schedule IDs with businessHoursSchedules.
For a FIRST_RESOLUTION_TIME or TOTAL_RESOLUTION_TIME target, pauseOnStatusDetailTypes lists the thread status types that pause the clock. It defaults to ["WAITING_FOR_CUSTOMER"] when omitted, and an empty array keeps the clock running in every status. A policy only starts tracking once it’s applied to a thread.
Mutation
Variables
Update an SLA policy
targets is the full set the policy should have after the update. A target whose type already exists is updated in place, and trackers already counting down keep the minutes they started with. A new type is added, and a type you leave out is removed along with its trackers. Leave businessHoursScheduleIds out of a target for it to keep the schedules it already has.
Changing a target’s businessHoursScheduleIds moves the deadlines of its running trackers: the time they’ve used stays, and the time left counts against the new schedules. See How SLA time is counted.
Field-level wrapper inputs apply to name and description: pass { "value": ... } for the fields you want to change and omit the rest.
Mutation
Variables
Delete an SLA policy
Deleting a policy deletes its targets and their trackers, and threads it was applied to stop tracking SLAs. If your workspace still has legacy tier SLAs, those threads return to their tier’s SLAs.Mutation
Variables

