From d3b7b1de9ab91eaf01b59465414b7c7399bab2f1 Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 21 Jan 2026 00:31:14 +0000 Subject: [PATCH] Update API specifications with fern api update --- fern/apis/api/openapi.json | 3347 ++++++++++++++++++------------------ 1 file changed, 1647 insertions(+), 1700 deletions(-) diff --git a/fern/apis/api/openapi.json b/fern/apis/api/openapi.json index fcb86d3c1..91da0e7e4 100644 --- a/fern/apis/api/openapi.json +++ b/fern/apis/api/openapi.json @@ -2743,6 +2743,14 @@ { "$ref": "#/components/schemas/CreateGoHighLevelContactGetToolDTO", "title": "GoHighLevelContactGetTool" + }, + { + "$ref": "#/components/schemas/CreateSipRequestToolDTO", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/CreateVoicemailToolDTO", + "title": "VoicemailTool" } ], "discriminator": { @@ -2767,7 +2775,9 @@ "gohighlevel.calendar.availability.check": "#/components/schemas/CreateGoHighLevelCalendarAvailabilityToolDTO", "gohighlevel.calendar.event.create": "#/components/schemas/CreateGoHighLevelCalendarEventCreateToolDTO", "gohighlevel.contact.create": "#/components/schemas/CreateGoHighLevelContactCreateToolDTO", - "gohighlevel.contact.get": "#/components/schemas/CreateGoHighLevelContactGetToolDTO" + "gohighlevel.contact.get": "#/components/schemas/CreateGoHighLevelContactGetToolDTO", + "sipRequest": "#/components/schemas/CreateSipRequestToolDTO", + "voicemail": "#/components/schemas/CreateVoicemailToolDTO" } } } @@ -2868,6 +2878,14 @@ { "$ref": "#/components/schemas/GoHighLevelContactGetTool", "title": "GoHighLevelContactGetTool" + }, + { + "$ref": "#/components/schemas/SipRequestTool", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/VoicemailTool", + "title": "VoicemailTool" } ], "discriminator": { @@ -2893,7 +2911,9 @@ "gohighlevel.calendar.availability.check": "#/components/schemas/GoHighLevelCalendarAvailabilityTool", "gohighlevel.calendar.event.create": "#/components/schemas/GoHighLevelCalendarEventCreateTool", "gohighlevel.contact.create": "#/components/schemas/GoHighLevelContactCreateTool", - "gohighlevel.contact.get": "#/components/schemas/GoHighLevelContactGetTool" + "gohighlevel.contact.get": "#/components/schemas/GoHighLevelContactGetTool", + "sipRequest": "#/components/schemas/SipRequestTool", + "voicemail": "#/components/schemas/VoicemailTool" } } } @@ -3102,6 +3122,14 @@ { "$ref": "#/components/schemas/GoHighLevelContactGetTool", "title": "GoHighLevelContactGetTool" + }, + { + "$ref": "#/components/schemas/SipRequestTool", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/VoicemailTool", + "title": "VoicemailTool" } ], "discriminator": { @@ -3127,7 +3155,9 @@ "gohighlevel.calendar.availability.check": "#/components/schemas/GoHighLevelCalendarAvailabilityTool", "gohighlevel.calendar.event.create": "#/components/schemas/GoHighLevelCalendarEventCreateTool", "gohighlevel.contact.create": "#/components/schemas/GoHighLevelContactCreateTool", - "gohighlevel.contact.get": "#/components/schemas/GoHighLevelContactGetTool" + "gohighlevel.contact.get": "#/components/schemas/GoHighLevelContactGetTool", + "sipRequest": "#/components/schemas/SipRequestTool", + "voicemail": "#/components/schemas/VoicemailTool" } } } @@ -3254,6 +3284,14 @@ { "$ref": "#/components/schemas/GoHighLevelContactGetTool", "title": "GoHighLevelContactGetTool" + }, + { + "$ref": "#/components/schemas/SipRequestTool", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/VoicemailTool", + "title": "VoicemailTool" } ], "discriminator": { @@ -3279,7 +3317,9 @@ "gohighlevel.calendar.availability.check": "#/components/schemas/GoHighLevelCalendarAvailabilityTool", "gohighlevel.calendar.event.create": "#/components/schemas/GoHighLevelCalendarEventCreateTool", "gohighlevel.contact.create": "#/components/schemas/GoHighLevelContactCreateTool", - "gohighlevel.contact.get": "#/components/schemas/GoHighLevelContactGetTool" + "gohighlevel.contact.get": "#/components/schemas/GoHighLevelContactGetTool", + "sipRequest": "#/components/schemas/SipRequestTool", + "voicemail": "#/components/schemas/VoicemailTool" } } } @@ -3398,6 +3438,14 @@ { "$ref": "#/components/schemas/UpdateGoHighLevelContactGetToolDTO", "title": "GoHighLevelContactGetTool" + }, + { + "$ref": "#/components/schemas/UpdateSipRequestToolDTO", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/UpdateVoicemailToolDTO", + "title": "VoicemailTool" } ], "discriminator": { @@ -3422,7 +3470,9 @@ "gohighlevel.calendar.availability.check": "#/components/schemas/UpdateGoHighLevelCalendarAvailabilityToolDTO", "gohighlevel.calendar.event.create": "#/components/schemas/UpdateGoHighLevelCalendarEventCreateToolDTO", "gohighlevel.contact.create": "#/components/schemas/UpdateGoHighLevelContactCreateToolDTO", - "gohighlevel.contact.get": "#/components/schemas/UpdateGoHighLevelContactGetToolDTO" + "gohighlevel.contact.get": "#/components/schemas/UpdateGoHighLevelContactGetToolDTO", + "sipRequest": "#/components/schemas/UpdateSipRequestToolDTO", + "voicemail": "#/components/schemas/UpdateVoicemailToolDTO" } } } @@ -3523,6 +3573,14 @@ { "$ref": "#/components/schemas/GoHighLevelContactGetTool", "title": "GoHighLevelContactGetTool" + }, + { + "$ref": "#/components/schemas/SipRequestTool", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/VoicemailTool", + "title": "VoicemailTool" } ], "discriminator": { @@ -3548,7 +3606,9 @@ "gohighlevel.calendar.availability.check": "#/components/schemas/GoHighLevelCalendarAvailabilityTool", "gohighlevel.calendar.event.create": "#/components/schemas/GoHighLevelCalendarEventCreateTool", "gohighlevel.contact.create": "#/components/schemas/GoHighLevelContactCreateTool", - "gohighlevel.contact.get": "#/components/schemas/GoHighLevelContactGetTool" + "gohighlevel.contact.get": "#/components/schemas/GoHighLevelContactGetTool", + "sipRequest": "#/components/schemas/SipRequestTool", + "voicemail": "#/components/schemas/VoicemailTool" } } } @@ -3672,6 +3732,14 @@ { "$ref": "#/components/schemas/GoHighLevelContactGetTool", "title": "GoHighLevelContactGetTool" + }, + { + "$ref": "#/components/schemas/SipRequestTool", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/VoicemailTool", + "title": "VoicemailTool" } ], "discriminator": { @@ -3697,7 +3765,9 @@ "gohighlevel.calendar.availability.check": "#/components/schemas/GoHighLevelCalendarAvailabilityTool", "gohighlevel.calendar.event.create": "#/components/schemas/GoHighLevelCalendarEventCreateTool", "gohighlevel.contact.create": "#/components/schemas/GoHighLevelContactCreateTool", - "gohighlevel.contact.get": "#/components/schemas/GoHighLevelContactGetTool" + "gohighlevel.contact.get": "#/components/schemas/GoHighLevelContactGetTool", + "sipRequest": "#/components/schemas/SipRequestTool", + "voicemail": "#/components/schemas/VoicemailTool" } } } @@ -5739,697 +5809,105 @@ ] } }, - "/monitoring/issue": { - "get": { - "operationId": "IssueController_findAll", - "summary": "List Issues", + "/provider/{provider}/{resourceName}": { + "post": { + "operationId": "ProviderResourceController_createProviderResource", + "summary": "Create Provider Resource", "parameters": [ { - "name": "id", - "required": false, - "in": "query", - "description": "This will return issues with the specified id.", - "schema": { - "type": "string" - } - }, - { - "name": "monitorId", - "required": false, - "in": "query", - "description": "This will return issues with the specified monitor ID.", - "schema": { - "type": "string" - } - }, - { - "name": "policyId", - "required": false, - "in": "query", - "description": "This will return issues with the specified policy ID.", + "name": "content-type", + "required": true, + "in": "header", "schema": { "type": "string" } }, { - "name": "status", - "required": false, - "in": "query", - "description": "This will return issues with the specified status.", + "name": "provider", + "required": true, + "in": "path", + "description": "The provider (e.g., 11labs)", "schema": { "enum": [ - "created", - "acknowledged", - "resolved" + "cartesia", + "11labs" ], "type": "string" } }, { - "name": "page", - "required": false, - "in": "query", - "description": "This is the page number to return. Defaults to 1.", - "schema": { - "minimum": 1, - "type": "number" - } - }, - { - "name": "sortOrder", - "required": false, - "in": "query", - "description": "This is the sort order for pagination. Defaults to 'DESC'.", + "name": "resourceName", + "required": true, + "in": "path", + "description": "The resource name (e.g., pronunciation-dictionary)", "schema": { "enum": [ - "ASC", - "DESC" + "pronunciation-dictionary" ], "type": "string" } - }, - { - "name": "limit", - "required": false, - "in": "query", - "description": "This is the maximum number of items to return. Defaults to 100.", - "schema": { - "minimum": 0, - "maximum": 1000, - "type": "number" - } - }, - { - "name": "createdAtGt", - "required": false, - "in": "query", - "description": "This will return items where the createdAt is greater than the specified value.", - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "name": "createdAtLt", - "required": false, - "in": "query", - "description": "This will return items where the createdAt is less than the specified value.", - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "name": "createdAtGe", - "required": false, - "in": "query", - "description": "This will return items where the createdAt is greater than or equal to the specified value.", - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "name": "createdAtLe", - "required": false, - "in": "query", - "description": "This will return items where the createdAt is less than or equal to the specified value.", - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "name": "updatedAtGt", - "required": false, - "in": "query", - "description": "This will return items where the updatedAt is greater than the specified value.", - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "name": "updatedAtLt", - "required": false, - "in": "query", - "description": "This will return items where the updatedAt is less than the specified value.", - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "name": "updatedAtGe", - "required": false, - "in": "query", - "description": "This will return items where the updatedAt is greater than or equal to the specified value.", - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "name": "updatedAtLe", - "required": false, - "in": "query", - "description": "This will return items where the updatedAt is less than or equal to the specified value.", - "schema": { - "format": "date-time", - "type": "string" - } } ], "responses": { - "200": { - "description": "", + "201": { + "description": "Successfully created provider resource", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Issue" - } + "$ref": "#/components/schemas/ProviderResource" } } } } }, "tags": [ - "Monitoring" + "Provider Resources" ], "security": [ { "bearer": [] } ] - } - }, - "/monitoring/issue/{id}": { + }, "get": { - "operationId": "IssueController_findOne", - "summary": "Get Issue", + "operationId": "ProviderResourceController_getProviderResourcesPaginated", + "summary": "List Provider Resources", "parameters": [ { - "name": "id", + "name": "provider", "required": true, "in": "path", + "description": "The provider (e.g., 11labs)", "schema": { + "enum": [ + "cartesia", + "11labs" + ], "type": "string" } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Issue" - } - } - } - } - }, - "tags": [ - "Monitoring" - ], - "security": [ - { - "bearer": [] - } - ] - }, - "patch": { - "operationId": "IssueController_update", - "summary": "Update Issue", - "parameters": [ + }, { - "name": "id", + "name": "resourceName", "required": true, "in": "path", + "description": "The resource name (e.g., pronunciation-dictionary)", "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateIssueDTO" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Issue" - } - } - } - } - }, - "tags": [ - "Monitoring" - ], - "security": [ - { - "bearer": [] - } - ] - } - }, - "/monitoring/policy": { - "get": { - "operationId": "PolicyController_findAll", - "summary": "List Policies", - "parameters": [ - { - "name": "id", - "required": false, - "in": "query", - "description": "This will return policies with the specified id.", - "schema": { + "enum": [ + "pronunciation-dictionary" + ], "type": "string" } }, { - "name": "severity", + "name": "id", "required": false, "in": "query", - "description": "This will return policies with the specified severity.", "schema": { - "enum": [ - "error", - "warning", - "info" - ], "type": "string" } }, { - "name": "monitorId", - "required": false, - "in": "query", - "description": "This will return policies associated with the specified monitor ID.", - "schema": { - "type": "string" - } - }, - { - "name": "page", - "required": false, - "in": "query", - "description": "This is the page number to return. Defaults to 1.", - "schema": { - "minimum": 1, - "type": "number" - } - }, - { - "name": "sortOrder", - "required": false, - "in": "query", - "description": "This is the sort order for pagination. Defaults to 'DESC'.", - "schema": { - "enum": [ - "ASC", - "DESC" - ], - "type": "string" - } - }, - { - "name": "limit", - "required": false, - "in": "query", - "description": "This is the maximum number of items to return. Defaults to 100.", - "schema": { - "minimum": 0, - "maximum": 1000, - "type": "number" - } - }, - { - "name": "createdAtGt", - "required": false, - "in": "query", - "description": "This will return items where the createdAt is greater than the specified value.", - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "name": "createdAtLt", - "required": false, - "in": "query", - "description": "This will return items where the createdAt is less than the specified value.", - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "name": "createdAtGe", - "required": false, - "in": "query", - "description": "This will return items where the createdAt is greater than or equal to the specified value.", - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "name": "createdAtLe", - "required": false, - "in": "query", - "description": "This will return items where the createdAt is less than or equal to the specified value.", - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "name": "updatedAtGt", - "required": false, - "in": "query", - "description": "This will return items where the updatedAt is greater than the specified value.", - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "name": "updatedAtLt", - "required": false, - "in": "query", - "description": "This will return items where the updatedAt is less than the specified value.", - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "name": "updatedAtGe", - "required": false, - "in": "query", - "description": "This will return items where the updatedAt is greater than or equal to the specified value.", - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "name": "updatedAtLe", - "required": false, - "in": "query", - "description": "This will return items where the updatedAt is less than or equal to the specified value.", - "schema": { - "format": "date-time", - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Policy" - } - } - } - } - } - }, - "tags": [ - "Monitoring" - ], - "security": [ - { - "bearer": [] - } - ] - }, - "post": { - "operationId": "PolicyController_create", - "summary": "Create Policy", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreatePolicyDTO" - } - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Policy" - } - } - } - } - }, - "tags": [ - "Monitoring" - ], - "security": [ - { - "bearer": [] - } - ] - } - }, - "/monitoring/policy/{id}": { - "get": { - "operationId": "PolicyController_findOne", - "summary": "Get Policy", - "parameters": [ - { - "name": "id", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Policy" - } - } - } - } - }, - "tags": [ - "Monitoring" - ], - "security": [ - { - "bearer": [] - } - ] - }, - "patch": { - "operationId": "PolicyController_update", - "summary": "Update Policy", - "parameters": [ - { - "name": "id", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdatePolicyDTO" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Policy" - } - } - } - } - }, - "tags": [ - "Monitoring" - ], - "security": [ - { - "bearer": [] - } - ] - }, - "delete": { - "operationId": "PolicyController_delete", - "summary": "Delete Policy", - "parameters": [ - { - "name": "id", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Policy" - } - } - } - } - }, - "tags": [ - "Monitoring" - ], - "security": [ - { - "bearer": [] - } - ] - } - }, - "/provider/{provider}/{resourceName}": { - "post": { - "operationId": "ProviderResourceController_createProviderResource", - "summary": "Create Provider Resource", - "parameters": [ - { - "name": "content-type", - "required": true, - "in": "header", - "schema": { - "type": "string" - } - }, - { - "name": "provider", - "required": true, - "in": "path", - "description": "The provider (e.g., 11labs)", - "schema": { - "enum": [ - "cartesia", - "11labs" - ], - "type": "string" - } - }, - { - "name": "resourceName", - "required": true, - "in": "path", - "description": "The resource name (e.g., pronunciation-dictionary)", - "schema": { - "enum": [ - "pronunciation-dictionary" - ], - "type": "string" - } - } - ], - "responses": { - "201": { - "description": "Successfully created provider resource", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProviderResource" - } - } - } - } - }, - "tags": [ - "Provider Resources" - ], - "security": [ - { - "bearer": [] - } - ] - }, - "get": { - "operationId": "ProviderResourceController_getProviderResourcesPaginated", - "summary": "List Provider Resources", - "parameters": [ - { - "name": "provider", - "required": true, - "in": "path", - "description": "The provider (e.g., 11labs)", - "schema": { - "enum": [ - "cartesia", - "11labs" - ], - "type": "string" - } - }, - { - "name": "resourceName", - "required": true, - "in": "path", - "description": "The resource name (e.g., pronunciation-dictionary)", - "schema": { - "enum": [ - "pronunciation-dictionary" - ], - "type": "string" - } - }, - { - "name": "id", - "required": false, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "resourceId", + "name": "resourceId", "required": false, "in": "query", "schema": { @@ -7769,6 +7247,7 @@ { "enum": [ "scribe_v1", + "scribe_v2", "scribe_v2_realtime" ] } @@ -9627,6 +9106,7 @@ { "enum": [ "scribe_v1", + "scribe_v2", "scribe_v2_realtime" ] } @@ -10673,6 +10153,15 @@ "langfuse" ] }, + "promptName": { + "type": "string", + "description": "The name of a Langfuse prompt to link generations to. This enables tracking which prompt version was used for each generation. https://langfuse.com/docs/prompt-management/features/link-to-traces" + }, + "promptVersion": { + "type": "number", + "description": "The version number of the Langfuse prompt to link generations to. Used together with promptName to identify the exact prompt version. https://langfuse.com/docs/prompt-management/features/link-to-traces", + "minimum": 1 + }, "tags": { "description": "This is an array of tags to be added to the Langfuse trace. Tags allow you to categorize and filter traces. https://langfuse.com/docs/tracing-features/tags", "type": "array", @@ -13757,6 +13246,14 @@ { "$ref": "#/components/schemas/CreateTransferCallToolDTO", "title": "TransferCallTool" + }, + { + "$ref": "#/components/schemas/CreateSipRequestToolDTO", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/CreateVoicemailToolDTO", + "title": "VoicemailTool" } ] } @@ -13933,6 +13430,14 @@ { "$ref": "#/components/schemas/CreateTransferCallToolDTO", "title": "TransferCallTool" + }, + { + "$ref": "#/components/schemas/CreateSipRequestToolDTO", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/CreateVoicemailToolDTO", + "title": "VoicemailTool" } ] } @@ -14111,6 +13616,14 @@ { "$ref": "#/components/schemas/CreateTransferCallToolDTO", "title": "TransferCallTool" + }, + { + "$ref": "#/components/schemas/CreateSipRequestToolDTO", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/CreateVoicemailToolDTO", + "title": "VoicemailTool" } ] } @@ -14270,6 +13783,14 @@ { "$ref": "#/components/schemas/CreateTransferCallToolDTO", "title": "TransferCallTool" + }, + { + "$ref": "#/components/schemas/CreateSipRequestToolDTO", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/CreateVoicemailToolDTO", + "title": "VoicemailTool" } ] } @@ -14460,6 +13981,14 @@ { "$ref": "#/components/schemas/CreateTransferCallToolDTO", "title": "TransferCallTool" + }, + { + "$ref": "#/components/schemas/CreateSipRequestToolDTO", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/CreateVoicemailToolDTO", + "title": "VoicemailTool" } ] } @@ -14615,6 +14144,14 @@ { "$ref": "#/components/schemas/CreateTransferCallToolDTO", "title": "TransferCallTool" + }, + { + "$ref": "#/components/schemas/CreateSipRequestToolDTO", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/CreateVoicemailToolDTO", + "title": "VoicemailTool" } ] } @@ -14843,6 +14380,14 @@ { "$ref": "#/components/schemas/CreateTransferCallToolDTO", "title": "TransferCallTool" + }, + { + "$ref": "#/components/schemas/CreateSipRequestToolDTO", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/CreateVoicemailToolDTO", + "title": "VoicemailTool" } ] } @@ -15023,6 +14568,14 @@ { "$ref": "#/components/schemas/CreateTransferCallToolDTO", "title": "TransferCallTool" + }, + { + "$ref": "#/components/schemas/CreateSipRequestToolDTO", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/CreateVoicemailToolDTO", + "title": "VoicemailTool" } ] } @@ -15195,6 +14748,14 @@ { "$ref": "#/components/schemas/CreateTransferCallToolDTO", "title": "TransferCallTool" + }, + { + "$ref": "#/components/schemas/CreateSipRequestToolDTO", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/CreateVoicemailToolDTO", + "title": "VoicemailTool" } ] } @@ -15353,6 +14914,14 @@ { "$ref": "#/components/schemas/CreateTransferCallToolDTO", "title": "TransferCallTool" + }, + { + "$ref": "#/components/schemas/CreateSipRequestToolDTO", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/CreateVoicemailToolDTO", + "title": "VoicemailTool" } ] } @@ -15773,6 +15342,14 @@ { "$ref": "#/components/schemas/CreateTransferCallToolDTO", "title": "TransferCallTool" + }, + { + "$ref": "#/components/schemas/CreateSipRequestToolDTO", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/CreateVoicemailToolDTO", + "title": "VoicemailTool" } ] } @@ -15928,6 +15505,14 @@ { "$ref": "#/components/schemas/CreateTransferCallToolDTO", "title": "TransferCallTool" + }, + { + "$ref": "#/components/schemas/CreateSipRequestToolDTO", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/CreateVoicemailToolDTO", + "title": "VoicemailTool" } ] } @@ -16083,6 +15668,14 @@ { "$ref": "#/components/schemas/CreateTransferCallToolDTO", "title": "TransferCallTool" + }, + { + "$ref": "#/components/schemas/CreateSipRequestToolDTO", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/CreateVoicemailToolDTO", + "title": "VoicemailTool" } ] } @@ -16735,6 +16328,14 @@ { "$ref": "#/components/schemas/CreateTransferCallToolDTO", "title": "TransferCallTool" + }, + { + "$ref": "#/components/schemas/CreateSipRequestToolDTO", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/CreateVoicemailToolDTO", + "title": "VoicemailTool" } ] } @@ -16880,6 +16481,14 @@ { "$ref": "#/components/schemas/CreateTransferCallToolDTO", "title": "TransferCallTool" + }, + { + "$ref": "#/components/schemas/CreateSipRequestToolDTO", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/CreateVoicemailToolDTO", + "title": "VoicemailTool" } ] }, @@ -17276,6 +16885,39 @@ "type" ] }, + "MessageAddHookAction": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "This is the type of action - must be \"message.add\"", + "enum": [ + "message.add" + ] + }, + "message": { + "description": "The message to add to the conversation in OpenAI format", + "example": { + "role": "system", + "content": "Context update from hook" + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAIMessage" + } + ] + }, + "triggerResponseEnabled": { + "type": "boolean", + "description": "Whether to trigger an assistant response after adding the message", + "default": true + } + }, + "required": [ + "type", + "message" + ] + }, "CallHookFilter": { "type": "object", "properties": { @@ -17326,6 +16968,10 @@ { "$ref": "#/components/schemas/ToolCallHookAction", "title": "ToolCallHookAction" + }, + { + "$ref": "#/components/schemas/MessageAddHookAction", + "title": "MessageAddHookAction" } ] } @@ -17366,6 +17012,10 @@ { "$ref": "#/components/schemas/ToolCallHookAction", "title": "ToolCallHookAction" + }, + { + "$ref": "#/components/schemas/MessageAddHookAction", + "title": "MessageAddHookAction" } ] } @@ -17399,6 +17049,10 @@ { "$ref": "#/components/schemas/ToolCallHookAction", "title": "ToolCallHookAction" + }, + { + "$ref": "#/components/schemas/MessageAddHookAction", + "title": "MessageAddHookAction" } ] } @@ -17505,6 +17159,14 @@ { "$ref": "#/components/schemas/CreateTransferCallToolDTO", "title": "TransferCallTool" + }, + { + "$ref": "#/components/schemas/CreateSipRequestToolDTO", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/CreateVoicemailToolDTO", + "title": "VoicemailTool" } ] }, @@ -17561,6 +17223,10 @@ { "$ref": "#/components/schemas/ToolCallHookAction", "title": "ToolCallHookAction" + }, + { + "$ref": "#/components/schemas/MessageAddHookAction", + "title": "MessageAddHookAction" } ] } @@ -17607,6 +17273,10 @@ { "$ref": "#/components/schemas/ToolCallHookAction", "title": "ToolCallHookAction" + }, + { + "$ref": "#/components/schemas/MessageAddHookAction", + "title": "MessageAddHookAction" } ] } @@ -18124,6 +17794,89 @@ } } }, + "ComplianceOverride": { + "type": "object", + "properties": { + "forceStoreOnHipaaEnabled": { + "type": "boolean", + "description": "Force storage for this output under HIPAA. Only enable if output contains no sensitive data.", + "example": false + } + } + }, + "CreateStructuredOutputDTO": { + "type": "object", + "properties": { + "model": { + "description": "This is the model that will be used to extract the structured output.\n\nTo provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages.\nBetween the system or user messages, you must reference either 'transcript' or 'messages' with the '{{}}' syntax to access the conversation history.\nBetween the system or user messages, you must reference a variation of the structured output with the '{{}}' syntax to access the structured output definition.\ni.e.:\n{{structuredOutput}}\n{{structuredOutput.name}}\n{{structuredOutput.description}}\n{{structuredOutput.schema}}\n\nIf model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts.\nIf messages or required fields are not specified, the default system and user prompts will be used.", + "oneOf": [ + { + "$ref": "#/components/schemas/WorkflowOpenAIModel", + "title": "WorkflowOpenAIModel" + }, + { + "$ref": "#/components/schemas/WorkflowAnthropicModel", + "title": "WorkflowAnthropicModel" + }, + { + "$ref": "#/components/schemas/WorkflowGoogleModel", + "title": "WorkflowGoogleModel" + }, + { + "$ref": "#/components/schemas/WorkflowCustomModel", + "title": "WorkflowCustomModel" + } + ] + }, + "compliancePlan": { + "description": "Compliance configuration for this output. Only enable overrides if no sensitive data will be stored.", + "example": { + "forceStoreOnHipaaEnabled": false + }, + "allOf": [ + { + "$ref": "#/components/schemas/ComplianceOverride" + } + ] + }, + "name": { + "type": "string", + "description": "This is the name of the structured output.", + "minLength": 1, + "maxLength": 40 + }, + "schema": { + "description": "This is the JSON Schema definition for the structured output.\n\nThis is required when creating a structured output. Defines the structure and validation rules for the data that will be extracted. Supports all JSON Schema features including:\n- Objects and nested properties\n- Arrays and array validation\n- String, number, boolean, and null types\n- Enums and const values\n- Validation constraints (min/max, patterns, etc.)\n- Composition with allOf, anyOf, oneOf", + "allOf": [ + { + "$ref": "#/components/schemas/JsonSchema" + } + ] + }, + "description": { + "type": "string", + "description": "This is the description of what the structured output extracts.\n\nUse this to provide context about what data will be extracted and how it will be used." + }, + "assistantIds": { + "description": "These are the assistant IDs that this structured output is linked to.\n\nWhen linked to assistants, this structured output will be available for extraction during those assistant's calls.", + "type": "array", + "items": { + "type": "string" + } + }, + "workflowIds": { + "description": "These are the workflow IDs that this structured output is linked to.\n\nWhen linked to workflows, this structured output will be available for extraction during those workflow's execution.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "name", + "schema" + ] + }, "ScorecardMetric": { "type": "object", "properties": { @@ -18251,6 +18004,13 @@ "type": "string" } }, + "structuredOutputs": { + "description": "This is an array of transient structured outputs to be calculated during the call.\nThe outputs will be extracted and stored in `call.artifact.structuredOutputs` after the call is ended.\nUse this to provide inline structured output configurations instead of referencing existing ones via structuredOutputIds.", + "type": "array", + "items": { + "$ref": "#/components/schemas/CreateStructuredOutputDTO" + } + }, "scorecardIds": { "description": "This is an array of scorecard IDs that will be evaluated based on the structured outputs extracted during the call.\nThe scorecards will be evaluated and the results will be stored in `call.artifact.scorecards` after the call has ended.", "type": "array", @@ -19278,6 +19038,14 @@ { "$ref": "#/components/schemas/CreateTransferCallToolDTO", "title": "TransferCallTool" + }, + { + "$ref": "#/components/schemas/CreateSipRequestToolDTO", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/CreateVoicemailToolDTO", + "title": "VoicemailTool" } ] } @@ -19445,6 +19213,14 @@ { "$ref": "#/components/schemas/CreateTransferCallToolDTO", "title": "TransferCallTool" + }, + { + "$ref": "#/components/schemas/CreateSipRequestToolDTO", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/CreateVoicemailToolDTO", + "title": "VoicemailTool" } ] } @@ -25920,6 +25696,10 @@ { "$ref": "#/components/schemas/ToolCallHookAction", "title": "ToolCallHookAction" + }, + { + "$ref": "#/components/schemas/MessageAddHookAction", + "title": "MessageAddHookAction" } ] } @@ -26853,6 +26633,14 @@ { "$ref": "#/components/schemas/CreateTransferCallToolDTO", "title": "TransferCallTool" + }, + { + "$ref": "#/components/schemas/CreateSipRequestToolDTO", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/CreateVoicemailToolDTO", + "title": "VoicemailTool" } ] } @@ -34225,6 +34013,10 @@ } ] }, + "customerId": { + "type": "string", + "description": "This is the customerId of the customer who will receive the SMS." + }, "useLLMGeneratedMessageForOutbound": { "type": "boolean", "description": "Whether to use LLM-generated messages for outbound SMS.\nWhen true (default), input is processed by the assistant for a response.\nWhen false, the input text is forwarded directly as the SMS message without LLM processing.\nUseful for sending pre-defined messages or notifications.", @@ -35550,6 +35342,194 @@ } } }, + "RelayTargetAssistant": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "assistant" + ], + "description": "The type of relay target" + }, + "assistantId": { + "type": "string", + "description": "The unique identifier of the assistant" + }, + "assistantName": { + "type": "string", + "description": "The name of the assistant" + } + }, + "required": [ + "type" + ] + }, + "RelayTargetSquad": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "squad" + ], + "description": "The type of relay target" + }, + "squadId": { + "type": "string", + "description": "The unique identifier of the squad" + }, + "squadName": { + "type": "string", + "description": "The name of the squad" + } + }, + "required": [ + "type" + ] + }, + "RelayTargetOptions": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "assistant", + "squad" + ] + } + }, + "required": [ + "type" + ] + }, + "RelayCommandSay": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "say" + ], + "description": "The type of relay command" + }, + "content": { + "type": "string", + "description": "The content for the assistant to speak" + } + }, + "required": [ + "type", + "content" + ] + }, + "RelayCommandNote": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "message.add" + ], + "description": "The type of relay command" + }, + "content": { + "type": "string", + "description": "The note content to add to the conversation" + } + }, + "required": [ + "type", + "content" + ] + }, + "RelayCommandOptions": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "say", + "message.add" + ] + } + }, + "required": [ + "type" + ] + }, + "RelayRequest": { + "type": "object", + "properties": { + "source": { + "type": "string", + "description": "The source identifier of the relay request" + }, + "target": { + "oneOf": [ + { + "$ref": "#/components/schemas/RelayTargetAssistant" + }, + { + "$ref": "#/components/schemas/RelayTargetSquad" + } + ], + "description": "The target assistant or squad to relay the commands to" + }, + "customerId": { + "type": "string", + "description": "The unique identifier of the customer" + }, + "commands": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/RelayCommandSay" + }, + { + "$ref": "#/components/schemas/RelayCommandNote" + } + ] + }, + "description": "The list of commands to relay to the target" + } + }, + "required": [ + "source", + "target", + "customerId", + "commands" + ] + }, + "RelayResponse": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "deliveredLive", + "deliveredHeadless", + "failed" + ], + "description": "The status of the relay request" + }, + "callId": { + "type": "string", + "description": "The unique identifier of the call, if delivered to a live call" + }, + "sessionId": { + "type": "string", + "description": "The unique identifier of the session, if delivered to a headless session" + }, + "chatId": { + "type": "string" + } + }, + "required": [ + "status" + ] + }, "Session": { "type": "object", "properties": { @@ -35627,6 +35607,14 @@ } ] }, + "assistantOverrides": { + "description": "These are the overrides for the assistant configuration.\nUse this to provide variable values and other overrides when using assistantId.\nVariable substitution will be applied to the assistant's messages and other text-based fields.", + "allOf": [ + { + "$ref": "#/components/schemas/AssistantOverrides" + } + ] + }, "squadId": { "type": "string", "description": "This is the squad ID associated with this session. Use this when referencing an existing squad." @@ -35675,6 +35663,10 @@ } ] }, + "customerId": { + "type": "string", + "description": "This is the customerId of the customer associated with this session." + }, "phoneNumberId": { "type": "string", "description": "This is the ID of the phone number associated with this session." @@ -35738,6 +35730,14 @@ } ] }, + "assistantOverrides": { + "description": "These are the overrides for the assistant configuration.\nUse this to provide variable values and other overrides when using assistantId.\nVariable substitution will be applied to the assistant's messages and other text-based fields.", + "allOf": [ + { + "$ref": "#/components/schemas/AssistantOverrides" + } + ] + }, "squadId": { "type": "string", "description": "This is the squad ID associated with this session. Use this when referencing an existing squad." @@ -35786,6 +35786,10 @@ } ] }, + "customerId": { + "type": "string", + "description": "This is the customerId of the customer associated with this session." + }, "phoneNumberId": { "type": "string", "description": "This is the ID of the phone number associated with this session." @@ -39646,6 +39650,179 @@ "updatedAt" ] }, + "SipRequestTool": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ToolMessageStart", + "title": "ToolMessageStart" + }, + { + "$ref": "#/components/schemas/ToolMessageComplete", + "title": "ToolMessageComplete" + }, + { + "$ref": "#/components/schemas/ToolMessageFailed", + "title": "ToolMessageFailed" + }, + { + "$ref": "#/components/schemas/ToolMessageDelayed", + "title": "ToolMessageDelayed" + } + ] + } + }, + "type": { + "type": "string", + "enum": [ + "sipRequest" + ], + "description": "The type of tool. \"sipRequest\" for SIP request tool." + }, + "verb": { + "type": "string", + "enum": [ + "INFO", + "MESSAGE", + "NOTIFY" + ], + "description": "The SIP method to send." + }, + "headers": { + "description": "JSON schema for headers the model should populate when sending the SIP request.", + "allOf": [ + { + "$ref": "#/components/schemas/JsonSchema" + } + ] + }, + "body": { + "description": "Body to include in the SIP request. Either a literal string body, or a JSON schema describing a structured body that the model should populate.", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/JsonSchema" + } + ] + }, + "id": { + "type": "string", + "description": "This is the unique identifier for the tool." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the organization that this tool belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the tool was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the tool was last updated." + }, + "rejectionPlan": { + "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + "allOf": [ + { + "$ref": "#/components/schemas/ToolRejectionPlan" + } + ] + } + }, + "required": [ + "type", + "verb", + "id", + "orgId", + "createdAt", + "updatedAt" + ] + }, + "VoicemailTool": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ToolMessageStart", + "title": "ToolMessageStart" + }, + { + "$ref": "#/components/schemas/ToolMessageComplete", + "title": "ToolMessageComplete" + }, + { + "$ref": "#/components/schemas/ToolMessageFailed", + "title": "ToolMessageFailed" + }, + { + "$ref": "#/components/schemas/ToolMessageDelayed", + "title": "ToolMessageDelayed" + } + ] + } + }, + "type": { + "type": "string", + "description": "The type of tool. \"voicemail\" for Voicemail tool.", + "enum": [ + "voicemail" + ] + }, + "beepDetectionEnabled": { + "type": "boolean", + "description": "This is the flag that enables beep detection for voicemail detection and applies only for twilio based calls.\n\n@default false", + "default": false, + "example": false + }, + "id": { + "type": "string", + "description": "This is the unique identifier for the tool." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the organization that this tool belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the tool was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the tool was last updated." + }, + "rejectionPlan": { + "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + "allOf": [ + { + "$ref": "#/components/schemas/ToolRejectionPlan" + } + ] + } + }, + "required": [ + "type", + "id", + "orgId", + "createdAt", + "updatedAt" + ] + }, "CreateApiRequestToolDTO": { "type": "object", "properties": { @@ -40195,7 +40372,7 @@ "type" ] }, - "UpdateApiRequestToolDTO": { + "CreateSipRequestToolDTO": { "type": "object", "properties": { "messages": { @@ -40222,92 +40399,168 @@ ] } }, - "method": { + "type": { "type": "string", "enum": [ - "POST", - "GET", - "PUT", - "PATCH", - "DELETE" - ] - }, - "timeoutSeconds": { - "type": "number", - "description": "This is the timeout in seconds for the request. Defaults to 20 seconds.\n\n@default 20", - "minimum": 1, - "maximum": 300, - "example": 20 + "sipRequest" + ], + "description": "The type of tool. \"sipRequest\" for SIP request tool." }, - "credentialId": { + "verb": { "type": "string", - "description": "The credential ID for API request authentication", - "example": "550e8400-e29b-41d4-a716-446655440000" - }, - "encryptedPaths": { - "type": "array", - "description": "This is the paths to encrypt in the request body if credentialId and encryptionPlan are defined.", - "items": { - "type": "string" - } + "enum": [ + "INFO", + "MESSAGE", + "NOTIFY" + ], + "description": "The SIP method to send." }, - "rejectionPlan": { - "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + "headers": { + "description": "JSON schema for headers the model should populate when sending the SIP request.", "allOf": [ { - "$ref": "#/components/schemas/ToolRejectionPlan" + "$ref": "#/components/schemas/JsonSchema" } ] }, - "name": { - "type": "string", - "description": "This is the name of the tool. This will be passed to the model.\n\nMust be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 40.", - "maxLength": 40, - "pattern": "/^[a-zA-Z0-9_-]{1,40}$/" - }, - "description": { - "type": "string", - "description": "This is the description of the tool. This will be passed to the model." - }, - "url": { - "type": "string", - "description": "This is where the request will be sent." - }, "body": { - "description": "This is the body of the request.", - "allOf": [ + "description": "Body to include in the SIP request. Either a literal string body, or a JSON schema describing a structured body that the model should populate.", + "oneOf": [ { - "$ref": "#/components/schemas/JsonSchema" - } - ] - }, - "headers": { - "description": "These are the headers to send with the request.", - "allOf": [ + "type": "string" + }, { "$ref": "#/components/schemas/JsonSchema" } ] }, - "backoffPlan": { - "description": "This is the backoff plan if the request fails. Defaults to undefined (the request will not be retried).\n\n@default undefined (the request will not be retried)", - "allOf": [ - { - "$ref": "#/components/schemas/BackoffPlan" - } - ] - }, - "variableExtractionPlan": { - "description": "This is the plan to extract variables from the tool's response. These will be accessible during the call and stored in `call.artifact.variableValues` after the call.\n\nUsage:\n1. Use `aliases` to extract variables from the tool's response body. (Most common case)\n\n```json\n{\n \"aliases\": [\n {\n \"key\": \"customerName\",\n \"value\": \"{{customer.name}}\"\n },\n {\n \"key\": \"customerAge\",\n \"value\": \"{{customer.age}}\"\n }\n ]\n}\n```\n\nThe tool response body is made available to the liquid template.\n\n2. Use `aliases` to extract variables from the tool's response body if the response is an array.\n\n```json\n{\n \"aliases\": [\n {\n \"key\": \"customerName\",\n \"value\": \"{{$[0].name}}\"\n },\n {\n \"key\": \"customerAge\",\n \"value\": \"{{$[0].age}}\"\n }\n ]\n}\n```\n\n$ is a shorthand for the tool's response body. `$[0]` is the first item in the array. `$[n]` is the nth item in the array. Note, $ is available regardless of the response body type (both object and array).\n\n3. Use `aliases` to extract variables from the tool's response headers.\n\n```json\n{\n \"aliases\": [\n {\n \"key\": \"customerName\",\n \"value\": \"{{tool.response.headers.customer-name}}\"\n },\n {\n \"key\": \"customerAge\",\n \"value\": \"{{tool.response.headers.customer-age}}\"\n }\n ]\n}\n```\n\n`tool.response` is made available to the liquid template. Particularly, both `tool.response.headers` and `tool.response.body` are available. Note, `tool.response` is available regardless of the response body type (both object and array).\n\n4. Use `schema` to extract a large portion of the tool's response body.\n\n4.1. If you hit example.com and it returns `{\"name\": \"John\", \"age\": 30}`, then you can specify the schema as:\n\n```json\n{\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"age\": {\n \"type\": \"number\"\n }\n }\n }\n}\n```\nThese will be extracted as `{{ name }}` and `{{ age }}` respectively. To emphasize, object properties are extracted as direct global variables.\n\n4.2. If you hit example.com and it returns `{\"name\": {\"first\": \"John\", \"last\": \"Doe\"}}`, then you can specify the schema as:\n\n```json\n{\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"object\",\n \"properties\": {\n \"first\": {\n \"type\": \"string\"\n },\n \"last\": {\n \"type\": \"string\"\n }\n }\n }\n }\n }\n}\n```\n\nThese will be extracted as `{{ name }}`. And, `{{ name.first }}` and `{{ name.last }}` will be accessible.\n\n4.3. If you hit example.com and it returns `[\"94123\", \"94124\"]`, then you can specify the schema as:\n\n```json\n{\n \"schema\": {\n \"type\": \"array\",\n \"title\": \"zipCodes\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n}\n```\n\nThis will be extracted as `{{ zipCodes }}`. To access the array items, you can use `{{ zipCodes[0] }}` and `{{ zipCodes[1] }}`.\n\n4.4. If you hit example.com and it returns `[{\"name\": \"John\", \"age\": 30, \"zipCodes\": [\"94123\", \"94124\"]}, {\"name\": \"Jane\", \"age\": 25, \"zipCodes\": [\"94125\", \"94126\"]}]`, then you can specify the schema as:\n\n```json\n{\n \"schema\": {\n \"type\": \"array\",\n \"title\": \"people\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"age\": {\n \"type\": \"number\"\n },\n \"zipCodes\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n }\n }\n }\n}\n```\n\nThis will be extracted as `{{ people }}`. To access the array items, you can use `{{ people[n].name }}`, `{{ people[n].age }}`, `{{ people[n].zipCodes }}`, `{{ people[n].zipCodes[0] }}` and `{{ people[n].zipCodes[1] }}`.\n\nNote: Both `aliases` and `schema` can be used together.", + "rejectionPlan": { + "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", "allOf": [ { - "$ref": "#/components/schemas/VariableExtractionPlan" + "$ref": "#/components/schemas/ToolRejectionPlan" } ] } - } + }, + "required": [ + "type", + "verb" + ] }, - "UpdateCodeToolDTO": { + "UpdateApiRequestToolDTO": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ToolMessageStart", + "title": "ToolMessageStart" + }, + { + "$ref": "#/components/schemas/ToolMessageComplete", + "title": "ToolMessageComplete" + }, + { + "$ref": "#/components/schemas/ToolMessageFailed", + "title": "ToolMessageFailed" + }, + { + "$ref": "#/components/schemas/ToolMessageDelayed", + "title": "ToolMessageDelayed" + } + ] + } + }, + "method": { + "type": "string", + "enum": [ + "POST", + "GET", + "PUT", + "PATCH", + "DELETE" + ] + }, + "timeoutSeconds": { + "type": "number", + "description": "This is the timeout in seconds for the request. Defaults to 20 seconds.\n\n@default 20", + "minimum": 1, + "maximum": 300, + "example": 20 + }, + "credentialId": { + "type": "string", + "description": "The credential ID for API request authentication", + "example": "550e8400-e29b-41d4-a716-446655440000" + }, + "encryptedPaths": { + "type": "array", + "description": "This is the paths to encrypt in the request body if credentialId and encryptionPlan are defined.", + "items": { + "type": "string" + } + }, + "rejectionPlan": { + "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + "allOf": [ + { + "$ref": "#/components/schemas/ToolRejectionPlan" + } + ] + }, + "name": { + "type": "string", + "description": "This is the name of the tool. This will be passed to the model.\n\nMust be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 40.", + "maxLength": 40, + "pattern": "/^[a-zA-Z0-9_-]{1,40}$/" + }, + "description": { + "type": "string", + "description": "This is the description of the tool. This will be passed to the model." + }, + "url": { + "type": "string", + "description": "This is where the request will be sent." + }, + "body": { + "description": "This is the body of the request.", + "allOf": [ + { + "$ref": "#/components/schemas/JsonSchema" + } + ] + }, + "headers": { + "description": "These are the headers to send with the request.", + "allOf": [ + { + "$ref": "#/components/schemas/JsonSchema" + } + ] + }, + "backoffPlan": { + "description": "This is the backoff plan if the request fails. Defaults to undefined (the request will not be retried).\n\n@default undefined (the request will not be retried)", + "allOf": [ + { + "$ref": "#/components/schemas/BackoffPlan" + } + ] + }, + "variableExtractionPlan": { + "description": "This is the plan to extract variables from the tool's response. These will be accessible during the call and stored in `call.artifact.variableValues` after the call.\n\nUsage:\n1. Use `aliases` to extract variables from the tool's response body. (Most common case)\n\n```json\n{\n \"aliases\": [\n {\n \"key\": \"customerName\",\n \"value\": \"{{customer.name}}\"\n },\n {\n \"key\": \"customerAge\",\n \"value\": \"{{customer.age}}\"\n }\n ]\n}\n```\n\nThe tool response body is made available to the liquid template.\n\n2. Use `aliases` to extract variables from the tool's response body if the response is an array.\n\n```json\n{\n \"aliases\": [\n {\n \"key\": \"customerName\",\n \"value\": \"{{$[0].name}}\"\n },\n {\n \"key\": \"customerAge\",\n \"value\": \"{{$[0].age}}\"\n }\n ]\n}\n```\n\n$ is a shorthand for the tool's response body. `$[0]` is the first item in the array. `$[n]` is the nth item in the array. Note, $ is available regardless of the response body type (both object and array).\n\n3. Use `aliases` to extract variables from the tool's response headers.\n\n```json\n{\n \"aliases\": [\n {\n \"key\": \"customerName\",\n \"value\": \"{{tool.response.headers.customer-name}}\"\n },\n {\n \"key\": \"customerAge\",\n \"value\": \"{{tool.response.headers.customer-age}}\"\n }\n ]\n}\n```\n\n`tool.response` is made available to the liquid template. Particularly, both `tool.response.headers` and `tool.response.body` are available. Note, `tool.response` is available regardless of the response body type (both object and array).\n\n4. Use `schema` to extract a large portion of the tool's response body.\n\n4.1. If you hit example.com and it returns `{\"name\": \"John\", \"age\": 30}`, then you can specify the schema as:\n\n```json\n{\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"age\": {\n \"type\": \"number\"\n }\n }\n }\n}\n```\nThese will be extracted as `{{ name }}` and `{{ age }}` respectively. To emphasize, object properties are extracted as direct global variables.\n\n4.2. If you hit example.com and it returns `{\"name\": {\"first\": \"John\", \"last\": \"Doe\"}}`, then you can specify the schema as:\n\n```json\n{\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"object\",\n \"properties\": {\n \"first\": {\n \"type\": \"string\"\n },\n \"last\": {\n \"type\": \"string\"\n }\n }\n }\n }\n }\n}\n```\n\nThese will be extracted as `{{ name }}`. And, `{{ name.first }}` and `{{ name.last }}` will be accessible.\n\n4.3. If you hit example.com and it returns `[\"94123\", \"94124\"]`, then you can specify the schema as:\n\n```json\n{\n \"schema\": {\n \"type\": \"array\",\n \"title\": \"zipCodes\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n}\n```\n\nThis will be extracted as `{{ zipCodes }}`. To access the array items, you can use `{{ zipCodes[0] }}` and `{{ zipCodes[1] }}`.\n\n4.4. If you hit example.com and it returns `[{\"name\": \"John\", \"age\": 30, \"zipCodes\": [\"94123\", \"94124\"]}, {\"name\": \"Jane\", \"age\": 25, \"zipCodes\": [\"94125\", \"94126\"]}]`, then you can specify the schema as:\n\n```json\n{\n \"schema\": {\n \"type\": \"array\",\n \"title\": \"people\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"age\": {\n \"type\": \"number\"\n },\n \"zipCodes\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n }\n }\n }\n}\n```\n\nThis will be extracted as `{{ people }}`. To access the array items, you can use `{{ people[n].name }}`, `{{ people[n].age }}`, `{{ people[n].zipCodes }}`, `{{ people[n].zipCodes[0] }}` and `{{ people[n].zipCodes[1] }}`.\n\nNote: Both `aliases` and `schema` can be used together.", + "allOf": [ + { + "$ref": "#/components/schemas/VariableExtractionPlan" + } + ] + } + } + }, + "UpdateCodeToolDTO": { "type": "object", "properties": { "messages": { @@ -41386,6 +41639,114 @@ } } }, + "UpdateSipRequestToolDTO": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ToolMessageStart", + "title": "ToolMessageStart" + }, + { + "$ref": "#/components/schemas/ToolMessageComplete", + "title": "ToolMessageComplete" + }, + { + "$ref": "#/components/schemas/ToolMessageFailed", + "title": "ToolMessageFailed" + }, + { + "$ref": "#/components/schemas/ToolMessageDelayed", + "title": "ToolMessageDelayed" + } + ] + } + }, + "verb": { + "type": "string", + "enum": [ + "INFO", + "MESSAGE", + "NOTIFY" + ], + "description": "The SIP method to send." + }, + "headers": { + "description": "JSON schema for headers the model should populate when sending the SIP request.", + "allOf": [ + { + "$ref": "#/components/schemas/JsonSchema" + } + ] + }, + "body": { + "description": "Body to include in the SIP request. Either a literal string body, or a JSON schema describing a structured body that the model should populate.", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/JsonSchema" + } + ] + }, + "rejectionPlan": { + "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + "allOf": [ + { + "$ref": "#/components/schemas/ToolRejectionPlan" + } + ] + } + } + }, + "UpdateVoicemailToolDTO": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ToolMessageStart", + "title": "ToolMessageStart" + }, + { + "$ref": "#/components/schemas/ToolMessageComplete", + "title": "ToolMessageComplete" + }, + { + "$ref": "#/components/schemas/ToolMessageFailed", + "title": "ToolMessageFailed" + }, + { + "$ref": "#/components/schemas/ToolMessageDelayed", + "title": "ToolMessageDelayed" + } + ] + } + }, + "beepDetectionEnabled": { + "type": "boolean", + "description": "This is the flag that enables beep detection for voicemail detection and applies only for twilio based calls.\n\n@default false", + "default": false, + "example": false + }, + "rejectionPlan": { + "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + "allOf": [ + { + "$ref": "#/components/schemas/ToolRejectionPlan" + } + ] + } + } + }, "CreateFileDTO": { "type": "object", "properties": { @@ -41753,16 +42114,6 @@ "providerId" ] }, - "ComplianceOverride": { - "type": "object", - "properties": { - "forceStoreOnHipaaEnabled": { - "type": "boolean", - "description": "Force storage for this output under HIPAA. Only enable if output contains no sensitive data.", - "example": false - } - } - }, "StructuredOutput": { "type": "object", "properties": { @@ -41876,79 +42227,6 @@ "metadata" ] }, - "CreateStructuredOutputDTO": { - "type": "object", - "properties": { - "model": { - "description": "This is the model that will be used to extract the structured output.\n\nTo provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages.\nBetween the system or user messages, you must reference either 'transcript' or 'messages' with the '{{}}' syntax to access the conversation history.\nBetween the system or user messages, you must reference a variation of the structured output with the '{{}}' syntax to access the structured output definition.\ni.e.:\n{{structuredOutput}}\n{{structuredOutput.name}}\n{{structuredOutput.description}}\n{{structuredOutput.schema}}\n\nIf model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts.\nIf messages or required fields are not specified, the default system and user prompts will be used.", - "oneOf": [ - { - "$ref": "#/components/schemas/WorkflowOpenAIModel", - "title": "WorkflowOpenAIModel" - }, - { - "$ref": "#/components/schemas/WorkflowAnthropicModel", - "title": "WorkflowAnthropicModel" - }, - { - "$ref": "#/components/schemas/WorkflowGoogleModel", - "title": "WorkflowGoogleModel" - }, - { - "$ref": "#/components/schemas/WorkflowCustomModel", - "title": "WorkflowCustomModel" - } - ] - }, - "compliancePlan": { - "description": "Compliance configuration for this output. Only enable overrides if no sensitive data will be stored.", - "example": { - "forceStoreOnHipaaEnabled": false - }, - "allOf": [ - { - "$ref": "#/components/schemas/ComplianceOverride" - } - ] - }, - "name": { - "type": "string", - "description": "This is the name of the structured output.", - "minLength": 1, - "maxLength": 40 - }, - "schema": { - "description": "This is the JSON Schema definition for the structured output.\n\nThis is required when creating a structured output. Defines the structure and validation rules for the data that will be extracted. Supports all JSON Schema features including:\n- Objects and nested properties\n- Arrays and array validation\n- String, number, boolean, and null types\n- Enums and const values\n- Validation constraints (min/max, patterns, etc.)\n- Composition with allOf, anyOf, oneOf", - "allOf": [ - { - "$ref": "#/components/schemas/JsonSchema" - } - ] - }, - "description": { - "type": "string", - "description": "This is the description of what the structured output extracts.\n\nUse this to provide context about what data will be extracted and how it will be used." - }, - "assistantIds": { - "description": "These are the assistant IDs that this structured output is linked to.\n\nWhen linked to assistants, this structured output will be available for extraction during those assistant's calls.", - "type": "array", - "items": { - "type": "string" - } - }, - "workflowIds": { - "description": "These are the workflow IDs that this structured output is linked to.\n\nWhen linked to workflows, this structured output will be available for extraction during those workflow's execution.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "name", - "schema" - ] - }, "UpdateStructuredOutputDTO": { "type": "object", "properties": { @@ -42882,7 +43160,7 @@ "name": { "type": "string", "minLength": 1, - "maxLength": 40 + "maxLength": 255 } } }, @@ -42925,7 +43203,7 @@ "type": "string", "description": "This is the name of the Insight.", "minLength": 1, - "maxLength": 40 + "maxLength": 255 }, "type": { "type": "string", @@ -42985,6 +43263,10 @@ { "$ref": "#/components/schemas/JSONQueryOnCallTableWithStructuredOutputColumn", "title": "JSONQueryOnCallTableWithStructuredOutputColumn" + }, + { + "$ref": "#/components/schemas/JSONQueryOnEventsTable", + "title": "JSONQueryOnEventsTable" } ] } @@ -43043,7 +43325,7 @@ "type": "string", "description": "This is the name of the Insight.", "minLength": 1, - "maxLength": 40 + "maxLength": 255 }, "type": { "type": "string", @@ -43149,7 +43431,7 @@ "name": { "type": "string", "minLength": 1, - "maxLength": 40 + "maxLength": 255 } } }, @@ -43160,7 +43442,7 @@ "type": "string", "description": "This is the name of the Insight.", "minLength": 1, - "maxLength": 40 + "maxLength": 255 }, "type": { "type": "string", @@ -43259,7 +43541,7 @@ "type": "string", "description": "This is the name of the Insight.", "minLength": 1, - "maxLength": 40 + "maxLength": 255 }, "type": { "type": "string", @@ -43333,7 +43615,7 @@ "type": "string", "description": "This is the name of the Insight.", "minLength": 1, - "maxLength": 40 + "maxLength": 255 }, "type": { "type": "string", @@ -43393,283 +43675,291 @@ { "$ref": "#/components/schemas/JSONQueryOnCallTableWithStructuredOutputColumn", "title": "JSONQueryOnCallTableWithStructuredOutputColumn" - } - ] - } - } - } - }, - "UpdatePieInsightFromCallTableDTO": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "This is the name of the Insight.", - "minLength": 1, - "maxLength": 40 - }, - "type": { - "type": "string", - "description": "This is the type of the Insight.\nIt is required to be `pie` to create a pie insight.", - "enum": [ - "pie" - ] - }, - "formulas": { - "type": "array", - "description": "Formulas are mathematical expressions applied on the data returned by the queries to transform them before being used to create the insight.\nThe formulas needs to be a valid mathematical expression, supported by MathJS - https://mathjs.org/docs/expressions/syntax.html\nA formula is created by using the query names as the variable.\nThe formulas must contain at least one query name in the LiquidJS format {{query_name}} or {{['query name']}} which will be substituted with the query result.\nFor example, if you have 2 queries, 'Was Booking Made' and 'Average Call Duration', you can create a formula like this:\n```\n{{['Query 1']}} / {{['Query 2']}} * 100\n```\n\n```\n({{[Query 1]}} * 10) + {{[Query 2]}}\n```\nThis will take the\n\nYou can also use the query names as the variable in the formula.", - "items": { - "$ref": "#/components/schemas/InsightFormula" - } - }, - "timeRange": { - "$ref": "#/components/schemas/InsightTimeRange" - }, - "groupBy": { - "type": "string", - "description": "This is the group by column for the insight when table is `call`.\nThese are the columns to group the results by.\nAll results are grouped by the time range step by default.", - "example": [ - "assistant_id" - ], - "enum": [ - "assistantId", - "workflowId", - "squadId", - "phoneNumberId", - "type", - "endedReason", - "campaignId", - "artifact.structuredOutputs[OutputID]" - ] - }, - "queries": { - "type": "array", - "description": "These are the queries to run to generate the insight.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/JSONQueryOnCallTableWithStringTypeColumn", - "title": "JSONQueryOnCallTableWithStringTypeColumn" }, { - "$ref": "#/components/schemas/JSONQueryOnCallTableWithNumberTypeColumn", - "title": "JSONQueryOnCallTableWithNumberTypeColumn" - }, - { - "$ref": "#/components/schemas/JSONQueryOnCallTableWithStructuredOutputColumn", - "title": "JSONQueryOnCallTableWithStructuredOutputColumn" + "$ref": "#/components/schemas/JSONQueryOnEventsTable", + "title": "JSONQueryOnEventsTable" } ] } } } }, - "UpdateLineInsightFromCallTableDTO": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "This is the name of the Insight.", - "minLength": 1, - "maxLength": 40 - }, - "type": { - "type": "string", - "description": "This is the type of the Insight.\nIt is required to be `line` to create a line insight.", - "enum": [ - "line" - ] - }, - "formulas": { - "type": "array", - "description": "Formulas are mathematical expressions applied on the data returned by the queries to transform them before being used to create the insight.\nThe formulas needs to be a valid mathematical expression, supported by MathJS - https://mathjs.org/docs/expressions/syntax.html\nA formula is created by using the query names as the variable.\nThe formulas must contain at least one query name in the LiquidJS format {{query_name}} or {{['query name']}} which will be substituted with the query result.\nFor example, if you have 2 queries, 'Was Booking Made' and 'Average Call Duration', you can create a formula like this:\n```\n{{['Query 1']}} / {{['Query 2']}} * 100\n```\n\n```\n({{[Query 1]}} * 10) + {{[Query 2]}}\n```\nThis will take the\n\nYou can also use the query names as the variable in the formula.", - "items": { - "$ref": "#/components/schemas/InsightFormula" - } - }, - "metadata": { - "description": "This is the metadata for the insight.", - "allOf": [ - { - "$ref": "#/components/schemas/LineInsightMetadata" - } - ] - }, - "timeRange": { - "$ref": "#/components/schemas/InsightTimeRangeWithStep" - }, - "groupBy": { - "type": "string", - "description": "This is the group by column for the insight when table is `call`.\nThese are the columns to group the results by.\nAll results are grouped by the time range step by default.", - "example": [ - "assistant_id" - ], - "enum": [ - "assistantId", - "workflowId", - "squadId", - "phoneNumberId", - "type", - "endedReason", - "campaignId", - "artifact.structuredOutputs[OutputID]" - ] - }, - "queries": { - "type": "array", - "description": "These are the queries to run to generate the insight.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/JSONQueryOnCallTableWithStringTypeColumn", - "title": "JSONQueryOnCallTableWithStringTypeColumn" - }, - { - "$ref": "#/components/schemas/JSONQueryOnCallTableWithNumberTypeColumn", - "title": "JSONQueryOnCallTableWithNumberTypeColumn" - }, - { - "$ref": "#/components/schemas/JSONQueryOnCallTableWithStructuredOutputColumn", - "title": "JSONQueryOnCallTableWithStructuredOutputColumn" - } - ] - } - } - } - }, - "UpdateTextInsightFromCallTableDTO": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "This is the name of the Insight.", - "minLength": 1, - "maxLength": 40 - }, - "type": { - "type": "string", - "description": "This is the type of the Insight.\nIt is required to be `text` to create a text insight.", - "enum": [ - "text" - ] - }, - "formula": { - "type": "object", - "description": "Formulas are mathematical expressions applied on the data returned by the queries to transform them before being used to create the insight.\nThe formulas needs to be a valid mathematical expression, supported by MathJS - https://mathjs.org/docs/expressions/syntax.html\nA formula is created by using the query names as the variable.\nThe formulas must contain at least one query name in the LiquidJS format {{query_name}} or {{['query name']}} which will be substituted with the query result.\nFor example, if you have 2 queries, 'Was Booking Made' and 'Average Call Duration', you can create a formula like this:\n```\n{{['Query 1']}} / {{['Query 2']}} * 100\n```\n\n```\n({{[Query 1]}} * 10) + {{[Query 2]}}\n```\nThis will take the\n\nYou can also use the query names as the variable in the formula.", - "items": { - "$ref": "#/components/schemas/InsightFormula" - } - }, - "timeRange": { - "$ref": "#/components/schemas/InsightTimeRange" - }, - "queries": { - "type": "array", - "description": "These are the queries to run to generate the insight.\nFor Text Insights, we only allow a single query, or require a formula if multiple queries are provided", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/JSONQueryOnCallTableWithStringTypeColumn", - "title": "JSONQueryOnCallTableWithStringTypeColumn" - }, - { - "$ref": "#/components/schemas/JSONQueryOnCallTableWithNumberTypeColumn", - "title": "JSONQueryOnCallTableWithNumberTypeColumn" - }, - { - "$ref": "#/components/schemas/JSONQueryOnCallTableWithStructuredOutputColumn", - "title": "JSONQueryOnCallTableWithStructuredOutputColumn" - } - ] - } - } - } - }, - "CreateBarInsightFromCallTableDTO": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "This is the name of the Insight.", - "minLength": 1, - "maxLength": 40 - }, - "type": { - "type": "string", - "description": "This is the type of the Insight.\nIt is required to be `bar` to create a bar insight.", - "enum": [ - "bar" - ] - }, - "formulas": { - "type": "array", - "description": "Formulas are mathematical expressions applied on the data returned by the queries to transform them before being used to create the insight.\nThe formulas needs to be a valid mathematical expression, supported by MathJS - https://mathjs.org/docs/expressions/syntax.html\nA formula is created by using the query names as the variable.\nThe formulas must contain at least one query name in the LiquidJS format {{query_name}} or {{['query name']}} which will be substituted with the query result.\nFor example, if you have 2 queries, 'Was Booking Made' and 'Average Call Duration', you can create a formula like this:\n```\n{{['Query 1']}} / {{['Query 2']}} * 100\n```\n\n```\n({{[Query 1]}} * 10) + {{[Query 2]}}\n```\nThis will take the\n\nYou can also use the query names as the variable in the formula.", - "items": { - "$ref": "#/components/schemas/InsightFormula" - } - }, - "metadata": { - "description": "This is the metadata for the insight.", - "allOf": [ - { - "$ref": "#/components/schemas/BarInsightMetadata" - } - ] - }, - "timeRange": { - "$ref": "#/components/schemas/InsightTimeRangeWithStep" - }, - "groupBy": { - "type": "string", - "description": "This is the group by column for the insight when table is `call`.\nThese are the columns to group the results by.\nAll results are grouped by the time range step by default.", - "example": [ - "assistant_id" - ], - "enum": [ - "assistantId", - "workflowId", - "squadId", - "phoneNumberId", - "type", - "endedReason", - "campaignId", - "artifact.structuredOutputs[OutputID]" - ] - }, - "queries": { - "type": "array", - "description": "These are the queries to run to generate the insight.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/JSONQueryOnCallTableWithStringTypeColumn", - "title": "JSONQueryOnCallTableWithStringTypeColumn" - }, - { - "$ref": "#/components/schemas/JSONQueryOnCallTableWithNumberTypeColumn", - "title": "JSONQueryOnCallTableWithNumberTypeColumn" - }, - { - "$ref": "#/components/schemas/JSONQueryOnCallTableWithStructuredOutputColumn", - "title": "JSONQueryOnCallTableWithStructuredOutputColumn" - } - ] - } - } - }, - "required": [ - "type", - "queries" - ] - }, - "CreatePieInsightFromCallTableDTO": { + "UpdatePieInsightFromCallTableDTO": { "type": "object", "properties": { "name": { "type": "string", "description": "This is the name of the Insight.", "minLength": 1, - "maxLength": 40 + "maxLength": 255 + }, + "type": { + "type": "string", + "description": "This is the type of the Insight.\nIt is required to be `pie` to create a pie insight.", + "enum": [ + "pie" + ] + }, + "formulas": { + "type": "array", + "description": "Formulas are mathematical expressions applied on the data returned by the queries to transform them before being used to create the insight.\nThe formulas needs to be a valid mathematical expression, supported by MathJS - https://mathjs.org/docs/expressions/syntax.html\nA formula is created by using the query names as the variable.\nThe formulas must contain at least one query name in the LiquidJS format {{query_name}} or {{['query name']}} which will be substituted with the query result.\nFor example, if you have 2 queries, 'Was Booking Made' and 'Average Call Duration', you can create a formula like this:\n```\n{{['Query 1']}} / {{['Query 2']}} * 100\n```\n\n```\n({{[Query 1]}} * 10) + {{[Query 2]}}\n```\nThis will take the\n\nYou can also use the query names as the variable in the formula.", + "items": { + "$ref": "#/components/schemas/InsightFormula" + } + }, + "timeRange": { + "$ref": "#/components/schemas/InsightTimeRange" + }, + "groupBy": { + "type": "string", + "description": "This is the group by column for the insight when table is `call`.\nThese are the columns to group the results by.\nAll results are grouped by the time range step by default.", + "example": [ + "assistant_id" + ], + "enum": [ + "assistantId", + "workflowId", + "squadId", + "phoneNumberId", + "type", + "endedReason", + "campaignId", + "artifact.structuredOutputs[OutputID]" + ] + }, + "queries": { + "type": "array", + "description": "These are the queries to run to generate the insight.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/JSONQueryOnCallTableWithStringTypeColumn", + "title": "JSONQueryOnCallTableWithStringTypeColumn" + }, + { + "$ref": "#/components/schemas/JSONQueryOnCallTableWithNumberTypeColumn", + "title": "JSONQueryOnCallTableWithNumberTypeColumn" + }, + { + "$ref": "#/components/schemas/JSONQueryOnCallTableWithStructuredOutputColumn", + "title": "JSONQueryOnCallTableWithStructuredOutputColumn" + } + ] + } + } + } + }, + "UpdateLineInsightFromCallTableDTO": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "This is the name of the Insight.", + "minLength": 1, + "maxLength": 255 + }, + "type": { + "type": "string", + "description": "This is the type of the Insight.\nIt is required to be `line` to create a line insight.", + "enum": [ + "line" + ] + }, + "formulas": { + "type": "array", + "description": "Formulas are mathematical expressions applied on the data returned by the queries to transform them before being used to create the insight.\nThe formulas needs to be a valid mathematical expression, supported by MathJS - https://mathjs.org/docs/expressions/syntax.html\nA formula is created by using the query names as the variable.\nThe formulas must contain at least one query name in the LiquidJS format {{query_name}} or {{['query name']}} which will be substituted with the query result.\nFor example, if you have 2 queries, 'Was Booking Made' and 'Average Call Duration', you can create a formula like this:\n```\n{{['Query 1']}} / {{['Query 2']}} * 100\n```\n\n```\n({{[Query 1]}} * 10) + {{[Query 2]}}\n```\nThis will take the\n\nYou can also use the query names as the variable in the formula.", + "items": { + "$ref": "#/components/schemas/InsightFormula" + } + }, + "metadata": { + "description": "This is the metadata for the insight.", + "allOf": [ + { + "$ref": "#/components/schemas/LineInsightMetadata" + } + ] + }, + "timeRange": { + "$ref": "#/components/schemas/InsightTimeRangeWithStep" + }, + "groupBy": { + "type": "string", + "description": "This is the group by column for the insight when table is `call`.\nThese are the columns to group the results by.\nAll results are grouped by the time range step by default.", + "example": [ + "assistant_id" + ], + "enum": [ + "assistantId", + "workflowId", + "squadId", + "phoneNumberId", + "type", + "endedReason", + "campaignId", + "artifact.structuredOutputs[OutputID]" + ] + }, + "queries": { + "type": "array", + "description": "These are the queries to run to generate the insight.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/JSONQueryOnCallTableWithStringTypeColumn", + "title": "JSONQueryOnCallTableWithStringTypeColumn" + }, + { + "$ref": "#/components/schemas/JSONQueryOnCallTableWithNumberTypeColumn", + "title": "JSONQueryOnCallTableWithNumberTypeColumn" + }, + { + "$ref": "#/components/schemas/JSONQueryOnCallTableWithStructuredOutputColumn", + "title": "JSONQueryOnCallTableWithStructuredOutputColumn" + } + ] + } + } + } + }, + "UpdateTextInsightFromCallTableDTO": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "This is the name of the Insight.", + "minLength": 1, + "maxLength": 255 + }, + "type": { + "type": "string", + "description": "This is the type of the Insight.\nIt is required to be `text` to create a text insight.", + "enum": [ + "text" + ] + }, + "formula": { + "type": "object", + "description": "Formulas are mathematical expressions applied on the data returned by the queries to transform them before being used to create the insight.\nThe formulas needs to be a valid mathematical expression, supported by MathJS - https://mathjs.org/docs/expressions/syntax.html\nA formula is created by using the query names as the variable.\nThe formulas must contain at least one query name in the LiquidJS format {{query_name}} or {{['query name']}} which will be substituted with the query result.\nFor example, if you have 2 queries, 'Was Booking Made' and 'Average Call Duration', you can create a formula like this:\n```\n{{['Query 1']}} / {{['Query 2']}} * 100\n```\n\n```\n({{[Query 1]}} * 10) + {{[Query 2]}}\n```\nThis will take the\n\nYou can also use the query names as the variable in the formula.", + "items": { + "$ref": "#/components/schemas/InsightFormula" + } + }, + "timeRange": { + "$ref": "#/components/schemas/InsightTimeRange" + }, + "queries": { + "type": "array", + "description": "These are the queries to run to generate the insight.\nFor Text Insights, we only allow a single query, or require a formula if multiple queries are provided", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/JSONQueryOnCallTableWithStringTypeColumn", + "title": "JSONQueryOnCallTableWithStringTypeColumn" + }, + { + "$ref": "#/components/schemas/JSONQueryOnCallTableWithNumberTypeColumn", + "title": "JSONQueryOnCallTableWithNumberTypeColumn" + }, + { + "$ref": "#/components/schemas/JSONQueryOnCallTableWithStructuredOutputColumn", + "title": "JSONQueryOnCallTableWithStructuredOutputColumn" + } + ] + } + } + } + }, + "CreateBarInsightFromCallTableDTO": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "This is the name of the Insight.", + "minLength": 1, + "maxLength": 255 + }, + "type": { + "type": "string", + "description": "This is the type of the Insight.\nIt is required to be `bar` to create a bar insight.", + "enum": [ + "bar" + ] + }, + "formulas": { + "type": "array", + "description": "Formulas are mathematical expressions applied on the data returned by the queries to transform them before being used to create the insight.\nThe formulas needs to be a valid mathematical expression, supported by MathJS - https://mathjs.org/docs/expressions/syntax.html\nA formula is created by using the query names as the variable.\nThe formulas must contain at least one query name in the LiquidJS format {{query_name}} or {{['query name']}} which will be substituted with the query result.\nFor example, if you have 2 queries, 'Was Booking Made' and 'Average Call Duration', you can create a formula like this:\n```\n{{['Query 1']}} / {{['Query 2']}} * 100\n```\n\n```\n({{[Query 1]}} * 10) + {{[Query 2]}}\n```\nThis will take the\n\nYou can also use the query names as the variable in the formula.", + "items": { + "$ref": "#/components/schemas/InsightFormula" + } + }, + "metadata": { + "description": "This is the metadata for the insight.", + "allOf": [ + { + "$ref": "#/components/schemas/BarInsightMetadata" + } + ] + }, + "timeRange": { + "$ref": "#/components/schemas/InsightTimeRangeWithStep" + }, + "groupBy": { + "type": "string", + "description": "This is the group by column for the insight when table is `call`.\nThese are the columns to group the results by.\nAll results are grouped by the time range step by default.", + "example": [ + "assistant_id" + ], + "enum": [ + "assistantId", + "workflowId", + "squadId", + "phoneNumberId", + "type", + "endedReason", + "campaignId", + "artifact.structuredOutputs[OutputID]" + ] + }, + "queries": { + "type": "array", + "description": "These are the queries to run to generate the insight.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/JSONQueryOnCallTableWithStringTypeColumn", + "title": "JSONQueryOnCallTableWithStringTypeColumn" + }, + { + "$ref": "#/components/schemas/JSONQueryOnCallTableWithNumberTypeColumn", + "title": "JSONQueryOnCallTableWithNumberTypeColumn" + }, + { + "$ref": "#/components/schemas/JSONQueryOnCallTableWithStructuredOutputColumn", + "title": "JSONQueryOnCallTableWithStructuredOutputColumn" + }, + { + "$ref": "#/components/schemas/JSONQueryOnEventsTable", + "title": "JSONQueryOnEventsTable" + } + ] + } + } + }, + "required": [ + "type", + "queries" + ] + }, + "CreatePieInsightFromCallTableDTO": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "This is the name of the Insight.", + "minLength": 1, + "maxLength": 255 }, "type": { "type": "string", @@ -43738,7 +44028,7 @@ "type": "string", "description": "This is the name of the Insight.", "minLength": 1, - "maxLength": 40 + "maxLength": 255 }, "type": { "type": "string", @@ -43815,7 +44105,7 @@ "type": "string", "description": "This is the name of the Insight.", "minLength": 1, - "maxLength": 40 + "maxLength": 255 }, "type": { "type": "string", @@ -44094,6 +44384,151 @@ "operation" ] }, + "JSONQueryOnEventsTable": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "This is the type of query. Only allowed type is \"vapiql-json\".", + "example": "vapiql-json", + "enum": [ + "vapiql-json" + ] + }, + "table": { + "type": "string", + "description": "This is the table that will be queried.\nMust be \"events\" for event-based insights.", + "enum": [ + "events" + ] + }, + "on": { + "type": "string", + "description": "The event type to query", + "example": "assistant.model.requestFailed", + "enum": [ + "call.started", + "call.ended", + "call.inProgress", + "call.queued", + "call.transportConnected", + "call.transportDisconnected", + "call.transportReconnected", + "call.transferInitiated", + "call.transferCompleted", + "call.transferFailed", + "call.transferCancelled", + "call.handoffInitiated", + "call.handoffCompleted", + "call.handoffFailed", + "call.assistantSwapped", + "call.assistantStarted", + "call.customerJoined", + "call.customerLeft", + "call.controlReceived", + "call.listenStarted", + "call.recordingStarted", + "call.recordingPaused", + "call.recordingResumed", + "call.voicemailDetected", + "call.voicemailNotDetected", + "call.dtmfReceived", + "call.dtmfSent", + "call.amdDetected", + "call.hookTriggered", + "call.hookSucceeded", + "call.hookFailed", + "call.statusReceived", + "call.silenceTimeout", + "call.microphoneTimeout", + "call.maxDurationReached", + "assistant.voice.requestStarted", + "assistant.voice.requestSucceeded", + "assistant.voice.requestFailed", + "assistant.voice.connectionOpened", + "assistant.voice.connectionClosed", + "assistant.voice.firstAudioReceived", + "assistant.voice.audioChunkReceived", + "assistant.voice.generationSucceeded", + "assistant.voice.generationFailed", + "assistant.voice.textPushed", + "assistant.voice.reconnecting", + "assistant.voice.cleanup", + "assistant.voice.clearing", + "assistant.voice.voiceSwitched", + "assistant.model.requestStarted", + "assistant.model.requestSucceeded", + "assistant.model.requestFailed", + "assistant.model.connectionOpened", + "assistant.model.connectionClosed", + "assistant.model.firstTokenReceived", + "assistant.model.tokenReceived", + "assistant.model.responseSucceeded", + "assistant.model.responseFailed", + "assistant.model.toolCallsReceived", + "assistant.model.reconnecting", + "assistant.model.cleanup", + "assistant.model.clearing", + "assistant.tool.started", + "assistant.tool.completed", + "assistant.tool.failed", + "assistant.tool.delayedMessageSent", + "assistant.tool.timeout", + "assistant.tool.asyncCallbackReceived", + "assistant.transcriber.requestStarted", + "assistant.transcriber.requestSucceeded", + "assistant.transcriber.requestFailed", + "assistant.transcriber.connectionOpened", + "assistant.transcriber.connectionClosed", + "assistant.transcriber.partialTranscript", + "assistant.transcriber.finalTranscript", + "assistant.transcriber.keepAlive", + "assistant.transcriber.reconnecting", + "assistant.transcriber.cleanup", + "assistant.transcriber.clearing", + "assistant.transcriber.transcriptIgnored", + "assistant.transcriber.languageSwitched" + ] + }, + "operation": { + "type": "string", + "description": "This is the operation to perform on matching events.\n- \"count\": Returns the raw count of matching events\n- \"percentage\": Returns (count of matching events / total calls) * 100", + "example": "count", + "enum": [ + "count", + "percentage" + ] + }, + "filters": { + "type": "array", + "description": "These are the filters to apply to the events query.\nEach filter filters on a field specific to the event type.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/EventsTableStringCondition" + }, + { + "$ref": "#/components/schemas/EventsTableNumberCondition" + }, + { + "$ref": "#/components/schemas/EventsTableBooleanCondition" + } + ] + } + }, + "name": { + "type": "string", + "description": "This is the name of the query.\nIt will be used to label the query in the insight board on the UI.", + "example": "Model Failures" + } + }, + "required": [ + "type", + "table", + "on", + "operation" + ] + }, "FilterStringTypeColumnOnCallTable": { "type": "object", "properties": { @@ -44239,7 +44674,9 @@ "in", "not_in", "contains", - "not_contains" + "not_contains", + "is_empty", + "is_not_empty" ] }, "value": { @@ -44279,7 +44716,9 @@ "example": "\"in\" or \"not_in\"", "enum": [ "in", - "not_in" + "not_in", + "is_empty", + "is_not_empty" ] }, "value": { @@ -44319,7 +44758,9 @@ "example": "\"in\" or \"not_in\"", "enum": [ "in", - "not_in" + "not_in", + "is_empty", + "is_not_empty" ] }, "value": { @@ -44336,6 +44777,98 @@ "value" ] }, + "EventsTableStringCondition": { + "type": "object", + "properties": { + "column": { + "type": "string", + "description": "The string field name from the event data", + "example": "provider" + }, + "operator": { + "type": "string", + "description": "String comparison operator", + "example": "=", + "enum": [ + "=", + "!=", + "contains", + "notContains" + ] + }, + "value": { + "type": "string", + "description": "The string value to compare", + "example": "openai" + } + }, + "required": [ + "column", + "operator", + "value" + ] + }, + "EventsTableNumberCondition": { + "type": "object", + "properties": { + "column": { + "type": "string", + "description": "The number field name from the event data", + "example": "latency" + }, + "operator": { + "type": "string", + "description": "Number comparison operator", + "example": ">=", + "enum": [ + "=", + "!=", + ">", + ">=", + "<", + "<=" + ] + }, + "value": { + "type": "number", + "description": "The number value to compare", + "example": 1000 + } + }, + "required": [ + "column", + "operator", + "value" + ] + }, + "EventsTableBooleanCondition": { + "type": "object", + "properties": { + "column": { + "type": "string", + "description": "The boolean field name from the event data", + "example": "success" + }, + "operator": { + "type": "string", + "description": "Boolean comparison operator", + "example": "=", + "enum": [ + "=" + ] + }, + "value": { + "type": "boolean", + "description": "The boolean value to compare", + "example": true + } + }, + "required": [ + "column", + "operator", + "value" + ] + }, "BarInsightFromCallTable": { "type": "object", "properties": { @@ -44343,7 +44876,7 @@ "type": "string", "description": "This is the name of the Insight.", "minLength": 1, - "maxLength": 40 + "maxLength": 255 }, "type": { "type": "string", @@ -44403,6 +44936,10 @@ { "$ref": "#/components/schemas/JSONQueryOnCallTableWithStructuredOutputColumn", "title": "JSONQueryOnCallTableWithStructuredOutputColumn" + }, + { + "$ref": "#/components/schemas/JSONQueryOnEventsTable", + "title": "JSONQueryOnEventsTable" } ] } @@ -44420,7 +44957,7 @@ "type": "string", "description": "This is the name of the Insight.", "minLength": 1, - "maxLength": 40 + "maxLength": 255 }, "type": { "type": "string", @@ -44489,7 +45026,7 @@ "type": "string", "description": "This is the name of the Insight.", "minLength": 1, - "maxLength": 40 + "maxLength": 255 }, "type": { "type": "string", @@ -44566,7 +45103,7 @@ "type": "string", "description": "This is the name of the Insight.", "minLength": 1, - "maxLength": 40 + "maxLength": 255 }, "type": { "type": "string", @@ -44619,7 +45156,7 @@ "description": "This is the name of the formula.\nIt will be used to label the formula in the insight board on the UI.", "example": "Booking Rate", "minLength": 1, - "maxLength": 40 + "maxLength": 255 }, "formula": { "type": "string", @@ -44699,7 +45236,7 @@ "type": "string", "description": "This is the name of the Insight.", "minLength": 1, - "maxLength": 40 + "maxLength": 255 }, "type": { "type": "string", @@ -46300,664 +46837,50 @@ "id", "orgId", "createdAt", - "updatedAt", - "metrics" - ] - }, - "ScorecardPaginatedResponse": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Scorecard" - } - }, - "metadata": { - "$ref": "#/components/schemas/PaginationMeta" - } - }, - "required": [ - "results", - "metadata" - ] - }, - "UpdateScorecardDTO": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "This is the name of the scorecard. It is only for user reference and will not be used for any evaluation.", - "maxLength": 80 - }, - "description": { - "type": "string", - "description": "This is the description of the scorecard. It is only for user reference and will not be used for any evaluation.", - "maxLength": 500 - }, - "metrics": { - "description": "These are the metrics that will be used to evaluate the scorecard.\nEach metric will have a set of conditions and points that will be used to generate the score.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ScorecardMetric" - } - }, - "assistantIds": { - "description": "These are the assistant IDs that this scorecard is linked to.\nWhen linked to assistants, this scorecard will be available for evaluation during those assistants' calls.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "IssueCall": { - "type": "object", - "properties": { - "callId": { - "type": "string", - "description": "This is the ID of the call associated with this issue." - }, - "failedAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the call failed/triggered the issue." - } - }, - "required": [ - "callId" - ] - }, - "Issue": { - "type": "object", - "properties": { - "monitorId": { - "type": "string", - "description": "This is the ID of the monitor that triggered this issue." - }, - "policyId": { - "type": "string", - "description": "This is the ID of the policy that triggered this issue." - }, - "totalCalls": { - "type": "number", - "description": "This is the total number of calls made since evaluationStartAt to determine percentage of calls affected." - }, - "evaluationStartAt": { - "format": "date-time", - "type": "string", - "description": "This is the start of the lookback window from the evaluation that first triggered this issue." - }, - "calls": { - "description": "These are the calls associated with this issue.\nThis is only present when retrieving a single issue by ID.", - "type": "array", - "items": { - "$ref": "#/components/schemas/IssueCall" - } - }, - "status": { - "type": "string", - "description": "This is the status of the issue.", - "enum": [ - "created", - "acknowledged", - "resolved" - ] - }, - "acknowledgedBy": { - "type": "string", - "description": "This is the email/name of the user who acknowledged the issue.", - "maxLength": 255 - }, - "resolvedBy": { - "type": "string", - "description": "This is the email/name of the user who resolved the issue.", - "maxLength": 255 - }, - "id": { - "type": "string", - "description": "This is the unique identifier for the issue." - }, - "orgId": { - "type": "string", - "description": "This is the unique identifier for the org that this issue belongs to." - }, - "acknowledgedAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the issue was acknowledged." - }, - "resolvedAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the issue was resolved." - }, - "createdAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the issue was first detected." - }, - "updatedAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the issue was last updated." - } - }, - "required": [ - "monitorId", - "policyId", - "totalCalls", - "evaluationStartAt", - "status", - "id", - "orgId", - "createdAt", - "updatedAt" - ] - }, - "UpdateIssueDTO": { - "type": "object", - "properties": { - "status": { - "type": "string", - "description": "This is the status of the issue.", - "enum": [ - "created", - "acknowledged", - "resolved" - ] - }, - "acknowledgedBy": { - "type": "string", - "description": "This is the email/name of the user who acknowledged the issue.", - "maxLength": 255 - }, - "resolvedBy": { - "type": "string", - "description": "This is the email/name of the user who resolved the issue.", - "maxLength": 255 - } - } - }, - "PolicyThreshold": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "This is the type of threshold evaluation.", - "enum": [ - "count", - "percentage" - ], - "example": "percentage" - }, - "comparator": { - "type": "string", - "description": "This is the comparator operator for the threshold.", - "enum": [ - "lt", - "gt", - "eq", - "lte", - "gte", - "neq" - ], - "example": "gt" - }, - "value": { - "type": "number", - "description": "This is the value to compare against.", - "minimum": 0, - "example": 50 - } - }, - "required": [ - "type", - "comparator", - "value" - ] - }, - "PolicySchedule": { - "type": "object", - "properties": { - "second": { - "description": "Second(s) of the minute. Valid values: 0-59 or '*' for any second.\nCan be a single number, an array, or '*'.\n@default 0", - "oneOf": [ - { - "type": "number" - }, - { - "type": "array", - "items": { - "type": "number" - } - }, - { - "type": "string", - "enum": [ - "*" - ] - } - ], - "example": 0, - "default": 0 - }, - "minute": { - "description": "Minute(s) of the hour. Valid values: 0-59 or '*' for any minute.\nCan be a single number, an array, or '*'.\n@default 0", - "oneOf": [ - { - "type": "number" - }, - { - "type": "array", - "items": { - "type": "number" - } - }, - { - "type": "string", - "enum": [ - "*" - ] - } - ], - "example": 30, - "default": 0 - }, - "hour": { - "description": "Hour(s) of the day. Valid values: 0-23 or '*' for any hour.\nCan be a single number, an array, or '*'.\n@default 0", - "oneOf": [ - { - "type": "number" - }, - { - "type": "array", - "items": { - "type": "number" - } - }, - { - "type": "string", - "enum": [ - "*" - ] - } - ], - "example": [ - 9, - 14, - 18 - ], - "default": 0 - }, - "dayOfMonth": { - "description": "Day(s) of the month. Valid values: 1-31 or '*' for any day.\nCan be a single number, an array, or '*'.", - "oneOf": [ - { - "type": "number" - }, - { - "type": "array", - "items": { - "type": "number" - } - }, - { - "type": "string", - "enum": [ - "*" - ] - } - ], - "example": [ - 1, - 15 - ] - }, - "month": { - "description": "Month(s) of the year. Use uppercase full names: JANUARY, FEBRUARY, etc., or '*' for any month.\nCan be a single month, an array, or '*'.", - "oneOf": [ - { - "type": "string", - "enum": [ - "JANUARY", - "FEBRUARY", - "MARCH", - "APRIL", - "MAY", - "JUNE", - "JULY", - "AUGUST", - "SEPTEMBER", - "OCTOBER", - "NOVEMBER", - "DECEMBER", - "*" - ] - }, - { - "type": "array", - "items": { - "type": "string", - "enum": [ - "JANUARY", - "FEBRUARY", - "MARCH", - "APRIL", - "MAY", - "JUNE", - "JULY", - "AUGUST", - "SEPTEMBER", - "OCTOBER", - "NOVEMBER", - "DECEMBER" - ] - } - } - ], - "example": [ - "JANUARY", - "APRIL", - "JULY" - ] - }, - "dayOfWeek": { - "description": "Day(s) of the week. Use uppercase full names: SUNDAY, MONDAY, etc., or '*' for any day.\nCan be a single day, an array, or '*'.", - "oneOf": [ - { - "type": "string", - "enum": [ - "SUNDAY", - "MONDAY", - "TUESDAY", - "WEDNESDAY", - "THURSDAY", - "FRIDAY", - "SATURDAY", - "*" - ] - }, - { - "type": "array", - "items": { - "type": "string", - "enum": [ - "SUNDAY", - "MONDAY", - "TUESDAY", - "WEDNESDAY", - "THURSDAY", - "FRIDAY", - "SATURDAY" - ] - } - } - ], - "example": [ - "MONDAY", - "WEDNESDAY", - "FRIDAY" - ] - }, - "year": { - "description": "Year(s). Use full years like 2025 or '*' for any year.\nCan be a single number, an array, or '*'.", - "oneOf": [ - { - "type": "number" - }, - { - "type": "array", - "items": { - "type": "number" - } - }, - { - "type": "string", - "enum": [ - "*" - ] - } - ], - "example": 2025 - } - } - }, - "PolicyInterval": { - "type": "object", - "properties": { - "every": { - "type": "number", - "description": "Interval in minutes", - "example": 60, - "minimum": 1 - }, - "offset": { - "type": "number", - "description": "Offset in minutes", - "example": 15, - "minimum": 0 - } - }, - "required": [ - "every" + "updatedAt", + "metrics" ] }, - "Policy": { + "ScorecardPaginatedResponse": { "type": "object", "properties": { - "monitorIds": { - "description": "These are the monitor IDs associated with this policy.\nThis is only present when retrieving a single policy by ID.", + "results": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/Scorecard" } }, - "name": { - "type": "string", - "description": "This is the name of the policy.", - "maxLength": 100, - "example": "High Error Rate Policy" - }, - "threshold": { - "description": "This is the threshold configuration for the policy.", - "allOf": [ - { - "$ref": "#/components/schemas/PolicyThreshold" - } - ] - }, - "lookbackWindowMinutes": { - "type": "number", - "description": "This is the lookback window in minutes. The policy will query events from the last N minutes.", - "minimum": 1, - "maximum": 1440, - "example": 60 - }, - "severity": { - "type": "string", - "description": "This is the severity level of issues created by this policy.", - "enum": [ - "error", - "warning", - "info" - ], - "example": "error" - }, - "schedule": { - "description": "This is the schedule configuration for when the policy should run.\nUse either schedule or interval, not both.", - "allOf": [ - { - "$ref": "#/components/schemas/PolicySchedule" - } - ] - }, - "interval": { - "description": "This is the interval configuration for when the policy should run.\nUse either schedule or interval, not both.", - "allOf": [ - { - "$ref": "#/components/schemas/PolicyInterval" - } - ] - }, - "id": { - "type": "string", - "description": "This is the unique identifier for the policy." - }, - "orgId": { - "type": "string", - "description": "This is the unique identifier for the org that this policy belongs to." - }, - "lastRunAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the policy was last run." - }, - "createdAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the policy was created." - }, - "updatedAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the policy was last updated." + "metadata": { + "$ref": "#/components/schemas/PaginationMeta" } }, "required": [ - "name", - "threshold", - "lookbackWindowMinutes", - "severity", - "id", - "orgId", - "createdAt", - "updatedAt" + "results", + "metadata" ] }, - "CreatePolicyDTO": { + "UpdateScorecardDTO": { "type": "object", "properties": { "name": { "type": "string", - "description": "This is the name of the policy.", - "maxLength": 100, - "example": "High Error Rate Policy" - }, - "threshold": { - "description": "This is the threshold configuration for the policy.", - "allOf": [ - { - "$ref": "#/components/schemas/PolicyThreshold" - } - ] - }, - "lookbackWindowMinutes": { - "type": "number", - "description": "This is the lookback window in minutes. The policy will query events from the last N minutes.", - "minimum": 1, - "maximum": 1440, - "example": 60 + "description": "This is the name of the scorecard. It is only for user reference and will not be used for any evaluation.", + "maxLength": 80 }, - "severity": { + "description": { "type": "string", - "description": "This is the severity level of issues created by this policy.", - "enum": [ - "error", - "warning", - "info" - ], - "example": "error" - }, - "schedule": { - "description": "This is the schedule configuration for when the policy should run.\nUse either schedule or interval, not both.", - "allOf": [ - { - "$ref": "#/components/schemas/PolicySchedule" - } - ] - }, - "interval": { - "description": "This is the interval configuration for when the policy should run.\nUse either schedule or interval, not both.", - "allOf": [ - { - "$ref": "#/components/schemas/PolicyInterval" - } - ] + "description": "This is the description of the scorecard. It is only for user reference and will not be used for any evaluation.", + "maxLength": 500 }, - "monitorIds": { - "description": "These are the monitor IDs to associate with this policy.\nThis creates entries in the monitor-policy join table.", - "example": [ - "550e8400-e29b-41d4-a716-446655440000" - ], + "metrics": { + "description": "These are the metrics that will be used to evaluate the scorecard.\nEach metric will have a set of conditions and points that will be used to generate the score.", "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/ScorecardMetric" } - } - }, - "required": [ - "name", - "threshold", - "lookbackWindowMinutes", - "severity" - ] - }, - "UpdatePolicyDTO": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "This is the name of the policy.", - "maxLength": 100, - "example": "High Error Rate Policy" - }, - "threshold": { - "description": "This is the threshold configuration for the policy.", - "allOf": [ - { - "$ref": "#/components/schemas/PolicyThreshold" - } - ] - }, - "lookbackWindowMinutes": { - "type": "number", - "description": "This is the lookback window in minutes. The policy will query events from the last N minutes.", - "minimum": 1, - "maximum": 1440, - "example": 60 - }, - "severity": { - "type": "string", - "description": "This is the severity level of issues created by this policy.", - "enum": [ - "error", - "warning", - "info" - ], - "example": "error" - }, - "schedule": { - "description": "This is the schedule configuration for when the policy should run.\nUse either schedule or interval, not both.", - "allOf": [ - { - "$ref": "#/components/schemas/PolicySchedule" - } - ] - }, - "interval": { - "description": "This is the interval configuration for when the policy should run.\nUse either schedule or interval, not both.", - "allOf": [ - { - "$ref": "#/components/schemas/PolicyInterval" - } - ] }, - "monitorIds": { - "description": "These are the monitor IDs to associate with this policy.\nThis creates entries in the monitor-policy join table.", - "example": [ - "550e8400-e29b-41d4-a716-446655440000" - ], + "assistantIds": { + "description": "These are the assistant IDs that this scorecard is linked to.\nWhen linked to assistants, this scorecard will be available for evaluation during those assistants' calls.", "type": "array", "items": { "type": "string" @@ -52559,6 +52482,14 @@ { "$ref": "#/components/schemas/CreateTransferCallToolDTO", "title": "TransferCallTool" + }, + { + "$ref": "#/components/schemas/CreateSipRequestToolDTO", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/CreateVoicemailToolDTO", + "title": "VoicemailTool" } ] }, @@ -52726,6 +52657,14 @@ { "$ref": "#/components/schemas/CreateTransferCallToolDTO", "title": "TransferCallTool" + }, + { + "$ref": "#/components/schemas/CreateSipRequestToolDTO", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/CreateVoicemailToolDTO", + "title": "VoicemailTool" } ] }, @@ -52915,6 +52854,14 @@ { "$ref": "#/components/schemas/CreateTransferCallToolDTO", "title": "TransferCallTool" + }, + { + "$ref": "#/components/schemas/CreateSipRequestToolDTO", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/CreateVoicemailToolDTO", + "title": "VoicemailTool" } ] },