Skip to content

Commit 05e10cf

Browse files
authored
feat: add content-hash CRUD routes for incremental reindexing (#5812)
1 parent a369911 commit 05e10cf

23 files changed

+1312
-11
lines changed

fern/apis/fai/openapi.json

Lines changed: 351 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,189 @@
811811
]
812812
}
813813
},
814+
"/content-hash/{domain}/batch-get": {
815+
"post": {
816+
"tags": [
817+
"Content_Hash"
818+
],
819+
"summary": "Batch Get Content Hashes",
820+
"description": "Get content hashes for multiple parent_ids.\nIf parent_ids is empty, returns all content hashes for the domain.",
821+
"operationId": "batch_get_content_hashes",
822+
"parameters": [
823+
{
824+
"name": "domain",
825+
"in": "path",
826+
"required": true,
827+
"schema": {
828+
"type": "string",
829+
"title": "Domain"
830+
}
831+
}
832+
],
833+
"requestBody": {
834+
"required": true,
835+
"content": {
836+
"application/json": {
837+
"schema": {
838+
"$ref": "#/components/schemas/BatchGetContentHashesRequest"
839+
}
840+
}
841+
}
842+
},
843+
"responses": {
844+
"200": {
845+
"description": "Successful Response",
846+
"content": {
847+
"application/json": {
848+
"schema": {
849+
"$ref": "#/components/schemas/BatchGetContentHashesResponse"
850+
}
851+
}
852+
}
853+
},
854+
"422": {
855+
"description": "Validation Error",
856+
"content": {
857+
"application/json": {
858+
"schema": {
859+
"$ref": "#/components/schemas/HTTPValidationError"
860+
}
861+
}
862+
}
863+
}
864+
},
865+
"x-fern-audiences": [
866+
"internal"
867+
],
868+
"security": [
869+
{
870+
"bearerAuth": []
871+
}
872+
]
873+
}
874+
},
875+
"/content-hash/{domain}/batch-upsert": {
876+
"post": {
877+
"tags": [
878+
"Content_Hash"
879+
],
880+
"summary": "Batch Upsert Content Hashes",
881+
"description": "Upsert content hashes for multiple parent_ids.\nCreates new records or updates existing ones.",
882+
"operationId": "batch_upsert_content_hashes",
883+
"parameters": [
884+
{
885+
"name": "domain",
886+
"in": "path",
887+
"required": true,
888+
"schema": {
889+
"type": "string",
890+
"title": "Domain"
891+
}
892+
}
893+
],
894+
"requestBody": {
895+
"required": true,
896+
"content": {
897+
"application/json": {
898+
"schema": {
899+
"$ref": "#/components/schemas/BatchUpsertContentHashesRequest"
900+
}
901+
}
902+
}
903+
},
904+
"responses": {
905+
"200": {
906+
"description": "Successful Response",
907+
"content": {
908+
"application/json": {
909+
"schema": {
910+
"$ref": "#/components/schemas/BatchUpsertContentHashesResponse"
911+
}
912+
}
913+
}
914+
},
915+
"422": {
916+
"description": "Validation Error",
917+
"content": {
918+
"application/json": {
919+
"schema": {
920+
"$ref": "#/components/schemas/HTTPValidationError"
921+
}
922+
}
923+
}
924+
}
925+
},
926+
"x-fern-audiences": [
927+
"internal"
928+
],
929+
"security": [
930+
{
931+
"bearerAuth": []
932+
}
933+
]
934+
}
935+
},
936+
"/content-hash/{domain}/delete": {
937+
"delete": {
938+
"tags": [
939+
"Content_Hash"
940+
],
941+
"summary": "Delete Content Hashes",
942+
"description": "Delete content hashes for multiple parent_ids.",
943+
"operationId": "delete_content_hashes",
944+
"parameters": [
945+
{
946+
"name": "domain",
947+
"in": "path",
948+
"required": true,
949+
"schema": {
950+
"type": "string",
951+
"title": "Domain"
952+
}
953+
}
954+
],
955+
"requestBody": {
956+
"required": true,
957+
"content": {
958+
"application/json": {
959+
"schema": {
960+
"$ref": "#/components/schemas/DeleteContentHashesRequest"
961+
}
962+
}
963+
}
964+
},
965+
"responses": {
966+
"200": {
967+
"description": "Successful Response",
968+
"content": {
969+
"application/json": {
970+
"schema": {
971+
"$ref": "#/components/schemas/DeleteContentHashesResponse"
972+
}
973+
}
974+
}
975+
},
976+
"422": {
977+
"description": "Validation Error",
978+
"content": {
979+
"application/json": {
980+
"schema": {
981+
"$ref": "#/components/schemas/HTTPValidationError"
982+
}
983+
}
984+
}
985+
}
986+
},
987+
"x-fern-audiences": [
988+
"internal"
989+
],
990+
"security": [
991+
{
992+
"bearerAuth": []
993+
}
994+
]
995+
}
996+
},
814997
"/conversation/{domain}/{conversation_id}": {
815998
"get": {
816999
"tags": [
@@ -3621,6 +3804,28 @@
36213804
]
36223805
}
36233806
},
3807+
"/scribe/slack/slash-commands": {
3808+
"post": {
3809+
"tags": [
3810+
"Slack_Scribe"
3811+
],
3812+
"summary": "Handle Scribe Slash Commands",
3813+
"operationId": "handle_scribe_slash_commands",
3814+
"responses": {
3815+
"200": {
3816+
"description": "Successful Response",
3817+
"content": {
3818+
"application/json": {
3819+
"schema": {}
3820+
}
3821+
}
3822+
}
3823+
},
3824+
"x-fern-audiences": [
3825+
"internal"
3826+
]
3827+
}
3828+
},
36243829
"/sources/github/{domain}/index-with-agent": {
36253830
"post": {
36263831
"tags": [
@@ -4300,6 +4505,69 @@
43004505
],
43014506
"title": "AnalyzeCommitDiffResponse"
43024507
},
4508+
"BatchGetContentHashesRequest": {
4509+
"properties": {
4510+
"parent_ids": {
4511+
"items": {
4512+
"type": "string"
4513+
},
4514+
"type": "array",
4515+
"title": "Parent Ids",
4516+
"default": []
4517+
}
4518+
},
4519+
"type": "object",
4520+
"title": "BatchGetContentHashesRequest",
4521+
"description": "Request to get content hashes. If parent_ids is empty, gets all hashes for domain."
4522+
},
4523+
"BatchGetContentHashesResponse": {
4524+
"properties": {
4525+
"entries": {
4526+
"items": {
4527+
"$ref": "#/components/schemas/ContentHashEntry"
4528+
},
4529+
"type": "array",
4530+
"title": "Entries"
4531+
}
4532+
},
4533+
"type": "object",
4534+
"required": [
4535+
"entries"
4536+
],
4537+
"title": "BatchGetContentHashesResponse",
4538+
"description": "Response with content hash entries."
4539+
},
4540+
"BatchUpsertContentHashesRequest": {
4541+
"properties": {
4542+
"entries": {
4543+
"items": {
4544+
"$ref": "#/components/schemas/ContentHashUpsertEntry"
4545+
},
4546+
"type": "array",
4547+
"title": "Entries"
4548+
}
4549+
},
4550+
"type": "object",
4551+
"required": [
4552+
"entries"
4553+
],
4554+
"title": "BatchUpsertContentHashesRequest",
4555+
"description": "Request to upsert multiple content hashes."
4556+
},
4557+
"BatchUpsertContentHashesResponse": {
4558+
"properties": {
4559+
"upserted_count": {
4560+
"type": "integer",
4561+
"title": "Upserted Count"
4562+
}
4563+
},
4564+
"type": "object",
4565+
"required": [
4566+
"upserted_count"
4567+
],
4568+
"title": "BatchUpsertContentHashesResponse",
4569+
"description": "Response after upserting content hashes."
4570+
},
43034571
"ChatMessage": {
43044572
"properties": {
43054573
"role": {
@@ -4431,6 +4699,55 @@
44314699
],
44324700
"title": "Code"
44334701
},
4702+
"ContentHashEntry": {
4703+
"properties": {
4704+
"parent_id": {
4705+
"type": "string",
4706+
"title": "Parent Id"
4707+
},
4708+
"content_hash": {
4709+
"type": "string",
4710+
"title": "Content Hash"
4711+
},
4712+
"indexed_at": {
4713+
"anyOf": [
4714+
{
4715+
"type": "string"
4716+
},
4717+
{
4718+
"type": "null"
4719+
}
4720+
],
4721+
"title": "Indexed At"
4722+
}
4723+
},
4724+
"type": "object",
4725+
"required": [
4726+
"parent_id",
4727+
"content_hash"
4728+
],
4729+
"title": "ContentHashEntry",
4730+
"description": "A single content hash entry."
4731+
},
4732+
"ContentHashUpsertEntry": {
4733+
"properties": {
4734+
"parent_id": {
4735+
"type": "string",
4736+
"title": "Parent Id"
4737+
},
4738+
"content_hash": {
4739+
"type": "string",
4740+
"title": "Content Hash"
4741+
}
4742+
},
4743+
"type": "object",
4744+
"required": [
4745+
"parent_id",
4746+
"content_hash"
4747+
],
4748+
"title": "ContentHashUpsertEntry",
4749+
"description": "Entry for upserting a content hash (without timestamps)."
4750+
},
44344751
"Conversation": {
44354752
"properties": {
44364753
"conversation_id": {
@@ -4917,6 +5234,37 @@
49175234
],
49185235
"title": "DeleteCodeRecordResponse"
49195236
},
5237+
"DeleteContentHashesRequest": {
5238+
"properties": {
5239+
"parent_ids": {
5240+
"items": {
5241+
"type": "string"
5242+
},
5243+
"type": "array",
5244+
"title": "Parent Ids"
5245+
}
5246+
},
5247+
"type": "object",
5248+
"required": [
5249+
"parent_ids"
5250+
],
5251+
"title": "DeleteContentHashesRequest",
5252+
"description": "Request to delete content hashes for specific parent_ids."
5253+
},
5254+
"DeleteContentHashesResponse": {
5255+
"properties": {
5256+
"deleted_count": {
5257+
"type": "integer",
5258+
"title": "Deleted Count"
5259+
}
5260+
},
5261+
"type": "object",
5262+
"required": [
5263+
"deleted_count"
5264+
],
5265+
"title": "DeleteContentHashesResponse",
5266+
"description": "Response after deleting content hashes."
5267+
},
49205268
"DeleteDocumentRequest": {
49215269
"properties": {
49225270
"document_id": {
@@ -6128,10 +6476,10 @@
61286476
"LanguageModel": {
61296477
"type": "string",
61306478
"enum": [
6131-
"claude-4-sonnet-20250514",
6479+
"claude-4-sonnet",
61326480
"command-a-03-2025",
6133-
"claude-haiku-4-5-20251001",
6134-
"claude-sonnet-4-5-20250929"
6481+
"claude-4.5-haiku",
6482+
"claude-4.5-sonnet"
61356483
],
61366484
"title": "LanguageModel"
61376485
},

0 commit comments

Comments
 (0)