diff --git a/fern/apis/fai/openapi.json b/fern/apis/fai/openapi.json index 8ff9abecd..0843753f1 100644 --- a/fern/apis/fai/openapi.json +++ b/fern/apis/fai/openapi.json @@ -94,7 +94,10 @@ } } } - } + }, + "x-fern-audiences": [ + "internal" + ] } }, "/analytics/insights/{domain}": { @@ -174,7 +177,10 @@ } } } - } + }, + "x-fern-audiences": [ + "internal" + ] } }, "/chat/{domain}": { @@ -226,7 +232,10 @@ } } } - } + }, + "x-fern-audiences": [ + "customers" + ] } }, "/conversation/{domain}/{conversation_id}": { @@ -234,8 +243,8 @@ "tags": [ "Conversation" ], - "summary": "Get Conversation", - "operationId": "get_conversation", + "summary": "Get Conversation By Id", + "operationId": "get_conversation_by_id", "parameters": [ { "name": "domain", @@ -329,7 +338,10 @@ } } } - } + }, + "x-fern-audiences": [ + "customers" + ] } }, "/document/{domain}/{document_id}": { @@ -390,7 +402,10 @@ } } } - } + }, + "x-fern-audiences": [ + "customers" + ] }, "delete": { "tags": [ @@ -439,7 +454,10 @@ } } } - } + }, + "x-fern-audiences": [ + "customers" + ] }, "get": { "tags": [ @@ -488,7 +506,10 @@ } } } - } + }, + "x-fern-audiences": [ + "customers" + ] } }, "/document/{domain}": { @@ -566,7 +587,179 @@ } } } - } + }, + "x-fern-audiences": [ + "customers" + ] + } + }, + "/feedback/{domain}": { + "post": { + "tags": [ + "Feedback" + ], + "summary": "Create Feedback", + "operationId": "create_feedback", + "parameters": [ + { + "name": "domain", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Domain" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFeedbackRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFeedbackResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-audiences": [ + "internal" + ] + } + }, + "/feedback/{domain}/{conversation_id}": { + "get": { + "tags": [ + "Feedback" + ], + "summary": "Get Feedback By Id", + "operationId": "get_feedback_by_id", + "parameters": [ + { + "name": "domain", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Domain" + } + }, + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetFeedbackResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-audiences": [ + "internal" + ] + } + }, + "/github/{domain}/reference-md/index": { + "post": { + "tags": [ + "Github" + ], + "summary": "Index Reference Md", + "description": "Index an SDK repository's reference.md file.", + "operationId": "index_reference_md", + "parameters": [ + { + "name": "domain", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Domain" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GitHubFileInfoRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReferenceSnippet" + }, + "title": "Response Index Reference Md Github Domain Reference Md Index Post" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-audiences": [ + "customers" + ] } }, "/guidance/{domain}/create": { @@ -618,7 +811,10 @@ } } } - } + }, + "x-fern-audiences": [ + "customers" + ] } }, "/guidance/{domain}/{guidance_id}": { @@ -679,7 +875,10 @@ } } } - } + }, + "x-fern-audiences": [ + "customers" + ] }, "delete": { "tags": [ @@ -728,7 +927,10 @@ } } } - } + }, + "x-fern-audiences": [ + "customers" + ] }, "get": { "tags": [ @@ -777,7 +979,10 @@ } } } - } + }, + "x-fern-audiences": [ + "customers" + ] } }, "/guidance/{domain}": { @@ -855,7 +1060,10 @@ } } } - } + }, + "x-fern-audiences": [ + "customers" + ] } }, "/health": { @@ -875,7 +1083,10 @@ } } } - } + }, + "x-fern-audiences": [ + "internal" + ] } }, "/index/{domain}/reconstruct": { @@ -917,7 +1128,10 @@ } } } - } + }, + "x-fern-audiences": [ + "internal" + ] } }, "/index/{domain}/sync": { @@ -969,7 +1183,55 @@ } } } - } + }, + "x-fern-audiences": [ + "internal" + ] + } + }, + "/jobs/{job_id}/status": { + "get": { + "tags": [ + "Index" + ], + "summary": "Get Job Status", + "operationId": "get_job_status", + "parameters": [ + { + "name": "job_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Job Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobStatusResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "x-fern-audiences": [ + "internal" + ] } }, "/mcp/semantic/{domain}": { @@ -1021,7 +1283,10 @@ } } } - } + }, + "x-fern-audiences": [ + "internal" + ] } }, "/mcp/bmf/{domain}": { @@ -1073,7 +1338,10 @@ } } } - } + }, + "x-fern-audiences": [ + "internal" + ] } }, "/queries": { @@ -1114,7 +1382,10 @@ } } } - } + }, + "x-fern-audiences": [ + "internal" + ] } }, "/queries/{domain}": { @@ -1267,7 +1538,10 @@ } } } - } + }, + "x-fern-audiences": [ + "internal" + ] } } }, @@ -1336,6 +1610,16 @@ "type": "string", "format": "date-time", "title": "Created At" + }, + "feedback": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationTurnFeedback" + }, + { + "type": "null" + } + ] } }, "type": "object", @@ -1346,6 +1630,30 @@ ], "title": "ConversationTurn" }, + "ConversationTurnFeedback": { + "properties": { + "is_helpful": { + "type": "boolean", + "title": "Is Helpful" + }, + "feedback_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Feedback Message" + } + }, + "type": "object", + "required": [ + "is_helpful" + ], + "title": "ConversationTurnFeedback" + }, "CreateDocumentRequest": { "properties": { "document": { @@ -1461,6 +1769,78 @@ ], "title": "CreateDocumentResponse" }, + "CreateFeedbackRequest": { + "properties": { + "conversation_id": { + "type": "string", + "title": "Conversation Id", + "description": "The ID of the conversation" + }, + "query_id": { + "type": "string", + "title": "Query Id", + "description": "The ID of the query" + }, + "domain": { + "type": "string", + "title": "Domain", + "description": "The domain of the conversation" + }, + "is_helpful": { + "type": "boolean", + "title": "Is Helpful", + "description": "Whether the conversation was helpful" + }, + "feedback_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Feedback Message", + "description": "The feedback message from the user" + }, + "user_email": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "User Email", + "description": "The email of the user" + } + }, + "type": "object", + "required": [ + "conversation_id", + "query_id", + "domain", + "is_helpful", + "feedback_message", + "user_email" + ], + "title": "CreateFeedbackRequest" + }, + "CreateFeedbackResponse": { + "properties": { + "feedback_id": { + "type": "string", + "title": "Feedback Id", + "description": "The ID of the created feedback" + } + }, + "type": "object", + "required": [ + "feedback_id" + ], + "title": "CreateFeedbackResponse" + }, "CreateGuidanceRequest": { "properties": { "context": { @@ -1649,6 +2029,62 @@ ], "title": "Document" }, + "Feedback": { + "properties": { + "query_id": { + "type": "string", + "title": "Query Id" + }, + "conversation_id": { + "type": "string", + "title": "Conversation Id" + }, + "domain": { + "type": "string", + "title": "Domain" + }, + "is_helpful": { + "type": "boolean", + "title": "Is Helpful" + }, + "feedback_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Feedback Message" + }, + "user_email": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "User Email" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + } + }, + "type": "object", + "required": [ + "query_id", + "conversation_id", + "domain", + "is_helpful", + "created_at" + ], + "title": "Feedback" + }, "GetConversationResponse": { "properties": { "conversation": { @@ -1697,6 +2133,19 @@ ], "title": "GetDocumentsResponse" }, + "GetFeedbackResponse": { + "properties": { + "feedback": { + "$ref": "#/components/schemas/Feedback", + "description": "The returned feedback" + } + }, + "type": "object", + "required": [ + "feedback" + ], + "title": "GetFeedbackResponse" + }, "GetGuidanceResponse": { "properties": { "guidance": { @@ -1850,6 +2299,23 @@ ], "title": "GetQueriesResponse" }, + "GitHubFileInfoRequest": { + "properties": { + "url": { + "type": "string", + "maxLength": 2083, + "minLength": 1, + "format": "uri", + "title": "Url", + "description": "The GitHub repository URL (e.g., https://github.com/owner/repo)" + } + }, + "type": "object", + "required": [ + "url" + ], + "title": "GitHubFileInfoRequest" + }, "GroupBy": { "type": "string", "enum": [ @@ -1928,13 +2394,23 @@ "conversationCount": { "type": "integer", "title": "Conversationcount" + }, + "conversationsPositiveCount": { + "type": "integer", + "title": "Conversationspositivecount" + }, + "conversationsNegativeCount": { + "type": "integer", + "title": "Conversationsnegativecount" } }, "type": "object", "required": [ "label", "queryCount", - "conversationCount" + "conversationCount", + "conversationsPositiveCount", + "conversationsNegativeCount" ], "title": "HistogramAnalyticsBar" }, @@ -1964,6 +2440,83 @@ ], "title": "InsightWithCount" }, + "JobStatusResponse": { + "properties": { + "job_id": { + "type": "string", + "title": "Job Id", + "description": "The job ID" + }, + "status": { + "type": "string", + "title": "Status", + "description": "Current status of the job" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At", + "description": "When the job was created" + }, + "started_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Started At", + "description": "When the job started" + }, + "completed_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Completed At", + "description": "When the job completed" + }, + "success": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Success", + "description": "Whether the job succeeded (only set when completed)" + }, + "error": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Error", + "description": "Error message if the job failed" + } + }, + "type": "object", + "required": [ + "job_id", + "status", + "created_at" + ], + "title": "JobStatusResponse" + }, "LanguageModel": { "type": "string", "enum": [ @@ -2130,6 +2683,71 @@ ], "title": "ReconstructIndexResponse" }, + "ReferenceSnippet": { + "properties": { + "method_header": { + "type": "string", + "title": "Method Header", + "description": "The header of the method or function, e.g., 'def foo(bar):'" + }, + "language": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Language", + "description": "The language of the code snippet" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "A description of what the method does" + }, + "usage": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Usage", + "description": "A code snippet showing how to use the method" + }, + "parameters": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Parameters", + "description": "A list of parameter names for the method" + } + }, + "type": "object", + "required": [ + "method_header" + ], + "title": "ReferenceSnippet" + }, "SyncIndexRequest": { "properties": { "index_name": { @@ -2146,15 +2764,15 @@ }, "SyncIndexResponse": { "properties": { - "success": { - "type": "boolean", - "title": "Success", - "description": "Whether the index sync was successful" + "job_id": { + "type": "string", + "title": "Job Id", + "description": "The ID of the sync job" } }, "type": "object", "required": [ - "success" + "job_id" ], "title": "SyncIndexResponse" },