diff --git a/fern/apis/fai/openapi.json b/fern/apis/fai/openapi.json index 013020a8..8fd4afb4 100644 --- a/fern/apis/fai/openapi.json +++ b/fern/apis/fai/openapi.json @@ -424,6 +424,393 @@ ] } }, + "/code/{domain}/create": { + "post": { + "tags": [ + "Code" + ], + "summary": "Create Code", + "operationId": "create_code", + "parameters": [ + { + "name": "domain", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Domain" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCodeRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CreateCodeResponse" + }, + "title": "Response Create Code Code Domain Create Post" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-audiences": [ + "customers" + ], + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/code/{domain}/batch-create": { + "post": { + "tags": [ + "Code" + ], + "summary": "Batch Create Code", + "operationId": "batch_create_code", + "parameters": [ + { + "name": "domain", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Domain" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CreateCodeRequest" + }, + "title": "Body" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CreateCodeResponse" + }, + "title": "Response Batch Create Code Code Domain Batch Create Post" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-audiences": [ + "customers" + ], + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/code/{domain}/{code_id}": { + "get": { + "tags": [ + "Code" + ], + "summary": "Get Code By Id", + "operationId": "get_code_by_id", + "parameters": [ + { + "name": "domain", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Domain" + } + }, + { + "name": "code_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Code Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetCodeResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-audiences": [ + "customers" + ], + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/code/{domain}": { + "get": { + "tags": [ + "Code" + ], + "summary": "Get Code", + "operationId": "get_code", + "parameters": [ + { + "name": "domain", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Domain" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "The page number for pagination", + "title": "Page" + }, + "description": "The page number for pagination" + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "The number of code entries per page", + "title": "Limit" + }, + "description": "The number of code entries per page" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetCodeEntriesResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-audiences": [ + "customers" + ], + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/code/{domain}/delete": { + "delete": { + "tags": [ + "Code" + ], + "summary": "Delete Code By Id", + "operationId": "delete_code_by_id", + "parameters": [ + { + "name": "domain", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Domain" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteCodeRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteCodeResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-audiences": [ + "customers" + ], + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/code/{domain}/delete-all": { + "delete": { + "tags": [ + "Code" + ], + "summary": "Delete All Code", + "operationId": "delete_all_code", + "parameters": [ + { + "name": "domain", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Domain" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteCodeResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-audiences": [ + "customers" + ], + "security": [ + { + "bearerAuth": [] + } + ] + } + }, "/conversation/{domain}/{conversation_id}": { "get": { "tags": [ @@ -3855,6 +4242,115 @@ ], "title": "ChatMessage" }, + "Code": { + "properties": { + "code_id": { + "type": "string", + "title": "Code Id" + }, + "domain": { + "type": "string", + "title": "Domain" + }, + "chunk": { + "type": "string", + "title": "Chunk" + }, + "document": { + "type": "string", + "title": "Document" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Url" + }, + "version": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Version" + }, + "product": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Product" + }, + "keywords": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Keywords" + }, + "authed": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Authed" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Updated At" + } + }, + "type": "object", + "required": [ + "code_id", + "domain", + "chunk", + "document", + "created_at", + "updated_at" + ], + "title": "Code" + }, "Conversation": { "properties": { "conversation_id": { @@ -3940,6 +4436,121 @@ ], "title": "ConversationTurnFeedback" }, + "CreateCodeRequest": { + "properties": { + "document": { + "type": "string", + "title": "Document", + "description": "The content of the code document that will be returned to Ask Fern during retrieval." + }, + "chunk": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Chunk", + "description": "The textual content that should be vectorized when indexing the code. If not provided, the full document will be vectorized." + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title", + "description": "The title of the code document. This will be used with the `url` when Ask Fern cites this code." + }, + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Url", + "description": "The url of the code document. This will be used as the source when Ask Fern cites it." + }, + "version": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Version", + "description": "The version of the code. This will be compared against when running Ask Fern with version filters. If null, the code will be retrievable by all versions." + }, + "product": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Product", + "description": "The product of the code. This will be used to filter code when running Ask Fern with product filters. If null, the code will be retrievable by all products." + }, + "keywords": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Keywords", + "description": "The keywords of the code. Adding keywords can improve code matching." + }, + "authed": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Authed", + "description": "Whether the code is authed. If true, the code will be retrievable by all users." + } + }, + "type": "object", + "required": [ + "document" + ], + "title": "CreateCodeRequest" + }, + "CreateCodeResponse": { + "properties": { + "code_id": { + "type": "string", + "title": "Code Id", + "description": "The unique identifier of the created code entry" + } + }, + "type": "object", + "required": [ + "code_id" + ], + "title": "CreateCodeResponse" + }, "CreateDocumentRequest": { "properties": { "document": { @@ -4230,6 +4841,34 @@ ], "title": "DeleteAllWebsitesResponse" }, + "DeleteCodeRequest": { + "properties": { + "code_id": { + "type": "string", + "title": "Code Id", + "description": "The unique identifier of the code to delete" + } + }, + "type": "object", + "required": [ + "code_id" + ], + "title": "DeleteCodeRequest" + }, + "DeleteCodeResponse": { + "properties": { + "success": { + "type": "boolean", + "title": "Success", + "description": "Whether the code was successfully deleted" + } + }, + "type": "object", + "required": [ + "success" + ], + "title": "DeleteCodeResponse" + }, "DeleteDocumentRequest": { "properties": { "document_id": { @@ -4628,6 +5267,41 @@ ], "title": "Feedback" }, + "GetCodeEntriesResponse": { + "properties": { + "documents": { + "items": { + "$ref": "#/components/schemas/Code" + }, + "type": "array", + "title": "Documents", + "description": "List of code entries for the domain" + }, + "pagination": { + "$ref": "#/components/schemas/PaginationResponse", + "description": "Pagination information for the code list" + } + }, + "type": "object", + "required": [ + "documents", + "pagination" + ], + "title": "GetCodeEntriesResponse" + }, + "GetCodeResponse": { + "properties": { + "document": { + "$ref": "#/components/schemas/Code", + "description": "The requested code" + } + }, + "type": "object", + "required": [ + "document" + ], + "title": "GetCodeResponse" + }, "GetConversationResolutionResponse": { "properties": { "total_conversations": {