@@ -908,6 +908,120 @@ paths:
908908 $ref : " #/components/responses/429"
909909 " 500 " :
910910 $ref : " #/components/responses/500"
911+ /v1/namespace/{namespaceId}/documents/{documentId}/chunks-download-url :
912+ post :
913+ operationId : " getChunksDownloadUrl"
914+ x-speakeasy-name-override : " getChunksDownloadUrl"
915+ summary : " Get chunks download URL"
916+ description : " Get a presigned download URL for a document's chunks. Only available for completed documents."
917+ tags :
918+ - " Documents"
919+ security :
920+ - token : []
921+ x-codeSamples :
922+ - lang : " TypeScript"
923+ source : " \n import { Agentset } from \" agentset\" ;\n\n const agentset = new Agentset({ apiKey: 'agentset_xxx' });\n const ns = agentset.namespace('ns_xxx');\n\n const { url } = await ns.documents.getChunksDownloadUrl(\" doc_123\" );\n const data = await (await fetch(url)).json();\n console.log(data);\n "
924+ parameters :
925+ - $ref : " #/components/parameters/NamespaceIdRef"
926+ - $ref : " #/components/parameters/DocumentIdRef"
927+ responses :
928+ " 200 " :
929+ description : " The presigned download URL for the chunks"
930+ content :
931+ application/json :
932+ schema :
933+ type : " object"
934+ properties :
935+ success :
936+ type : " boolean"
937+ const : true
938+ data :
939+ type : " object"
940+ properties :
941+ url :
942+ type : " string"
943+ required :
944+ - " url"
945+ additionalProperties : false
946+ required :
947+ - " success"
948+ - " data"
949+ additionalProperties : false
950+ " 400 " :
951+ $ref : " #/components/responses/400"
952+ " 401 " :
953+ $ref : " #/components/responses/401"
954+ " 403 " :
955+ $ref : " #/components/responses/403"
956+ " 404 " :
957+ $ref : " #/components/responses/404"
958+ " 409 " :
959+ $ref : " #/components/responses/409"
960+ " 410 " :
961+ $ref : " #/components/responses/410"
962+ " 422 " :
963+ $ref : " #/components/responses/422"
964+ " 429 " :
965+ $ref : " #/components/responses/429"
966+ " 500 " :
967+ $ref : " #/components/responses/500"
968+ /v1/namespace/{namespaceId}/documents/{documentId}/file-download-url :
969+ post :
970+ operationId : " getFileDownloadUrl"
971+ x-speakeasy-name-override : " getFileDownloadUrl"
972+ summary : " Get file download URL"
973+ description : " Get a presigned download URL for a document's source file. Only available for documents with source type MANAGED_FILE."
974+ tags :
975+ - " Documents"
976+ security :
977+ - token : []
978+ x-codeSamples :
979+ - lang : " TypeScript"
980+ source : " \n import { Agentset } from \" agentset\" ;\n import fs from 'fs';\n\n const agentset = new Agentset({ apiKey: 'agentset_xxx' });\n const ns = agentset.namespace('ns_xxx');\n\n const { url } = await ns.documents.getFileDownloadUrl(\" doc_123\" );\n const file = await fetch(url);\n fs.writeFileSync(\" file.pdf\" , Buffer.from(await file.arrayBuffer()));\n "
981+ parameters :
982+ - $ref : " #/components/parameters/NamespaceIdRef"
983+ - $ref : " #/components/parameters/DocumentIdRef"
984+ responses :
985+ " 200 " :
986+ description : " The presigned download URL for the file"
987+ content :
988+ application/json :
989+ schema :
990+ type : " object"
991+ properties :
992+ success :
993+ type : " boolean"
994+ const : true
995+ data :
996+ type : " object"
997+ properties :
998+ url :
999+ type : " string"
1000+ required :
1001+ - " url"
1002+ additionalProperties : false
1003+ required :
1004+ - " success"
1005+ - " data"
1006+ additionalProperties : false
1007+ " 400 " :
1008+ $ref : " #/components/responses/400"
1009+ " 401 " :
1010+ $ref : " #/components/responses/401"
1011+ " 403 " :
1012+ $ref : " #/components/responses/403"
1013+ " 404 " :
1014+ $ref : " #/components/responses/404"
1015+ " 409 " :
1016+ $ref : " #/components/responses/409"
1017+ " 410 " :
1018+ $ref : " #/components/responses/410"
1019+ " 422 " :
1020+ $ref : " #/components/responses/422"
1021+ " 429 " :
1022+ $ref : " #/components/responses/429"
1023+ " 500 " :
1024+ $ref : " #/components/responses/500"
9111025 /v1/namespace/{namespaceId}/search :
9121026 post :
9131027 operationId : " search"
0 commit comments