@mistralai/mistralai 1.7.2 → 1.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -2
- package/docs/sdks/accesses/README.md +263 -0
- package/docs/sdks/documents/README.md +809 -0
- package/docs/sdks/libraries/README.md +395 -0
- package/docs/sdks/models/README.md +1 -1
- package/examples/src/async_ocr_process_from_file.ts +2 -4
- package/funcs/betaLibrariesAccessesDelete.d.ts +18 -0
- package/funcs/betaLibrariesAccessesDelete.d.ts.map +1 -0
- package/funcs/betaLibrariesAccessesDelete.js +113 -0
- package/funcs/betaLibrariesAccessesDelete.js.map +1 -0
- package/funcs/betaLibrariesAccessesList.d.ts +18 -0
- package/funcs/betaLibrariesAccessesList.d.ts.map +1 -0
- package/funcs/betaLibrariesAccessesList.js +112 -0
- package/funcs/betaLibrariesAccessesList.js.map +1 -0
- package/funcs/betaLibrariesAccessesUpdateOrCreate.d.ts +18 -0
- package/funcs/betaLibrariesAccessesUpdateOrCreate.d.ts.map +1 -0
- package/funcs/betaLibrariesAccessesUpdateOrCreate.js +113 -0
- package/funcs/betaLibrariesAccessesUpdateOrCreate.js.map +1 -0
- package/funcs/betaLibrariesCreate.d.ts +17 -0
- package/funcs/betaLibrariesCreate.d.ts.map +1 -0
- package/funcs/betaLibrariesCreate.js +106 -0
- package/funcs/betaLibrariesCreate.js.map +1 -0
- package/funcs/betaLibrariesDelete.d.ts +18 -0
- package/funcs/betaLibrariesDelete.d.ts.map +1 -0
- package/funcs/betaLibrariesDelete.js +112 -0
- package/funcs/betaLibrariesDelete.js.map +1 -0
- package/funcs/betaLibrariesDocumentsDelete.d.ts +17 -0
- package/funcs/betaLibrariesDocumentsDelete.d.ts.map +1 -0
- package/funcs/betaLibrariesDocumentsDelete.js +116 -0
- package/funcs/betaLibrariesDocumentsDelete.js.map +1 -0
- package/funcs/betaLibrariesDocumentsExtractedTextSignedUrl.d.ts +17 -0
- package/funcs/betaLibrariesDocumentsExtractedTextSignedUrl.d.ts.map +1 -0
- package/funcs/betaLibrariesDocumentsExtractedTextSignedUrl.js +118 -0
- package/funcs/betaLibrariesDocumentsExtractedTextSignedUrl.js.map +1 -0
- package/funcs/betaLibrariesDocumentsGet.d.ts +18 -0
- package/funcs/betaLibrariesDocumentsGet.d.ts.map +1 -0
- package/funcs/betaLibrariesDocumentsGet.js +116 -0
- package/funcs/betaLibrariesDocumentsGet.js.map +1 -0
- package/funcs/betaLibrariesDocumentsGetSignedUrl.d.ts +17 -0
- package/funcs/betaLibrariesDocumentsGetSignedUrl.d.ts.map +1 -0
- package/funcs/betaLibrariesDocumentsGetSignedUrl.js +116 -0
- package/funcs/betaLibrariesDocumentsGetSignedUrl.js.map +1 -0
- package/funcs/betaLibrariesDocumentsList.d.ts +18 -0
- package/funcs/betaLibrariesDocumentsList.d.ts.map +1 -0
- package/funcs/betaLibrariesDocumentsList.js +120 -0
- package/funcs/betaLibrariesDocumentsList.js.map +1 -0
- package/funcs/betaLibrariesDocumentsReprocess.d.ts +17 -0
- package/funcs/betaLibrariesDocumentsReprocess.d.ts.map +1 -0
- package/funcs/betaLibrariesDocumentsReprocess.js +116 -0
- package/funcs/betaLibrariesDocumentsReprocess.js.map +1 -0
- package/funcs/betaLibrariesDocumentsStatus.d.ts +18 -0
- package/funcs/betaLibrariesDocumentsStatus.d.ts.map +1 -0
- package/funcs/betaLibrariesDocumentsStatus.js +116 -0
- package/funcs/betaLibrariesDocumentsStatus.js.map +1 -0
- package/funcs/betaLibrariesDocumentsTextContent.d.ts +18 -0
- package/funcs/betaLibrariesDocumentsTextContent.d.ts.map +1 -0
- package/funcs/betaLibrariesDocumentsTextContent.js +116 -0
- package/funcs/betaLibrariesDocumentsTextContent.js.map +1 -0
- package/funcs/betaLibrariesDocumentsUpdate.d.ts +18 -0
- package/funcs/betaLibrariesDocumentsUpdate.d.ts.map +1 -0
- package/funcs/betaLibrariesDocumentsUpdate.js +117 -0
- package/funcs/betaLibrariesDocumentsUpdate.js.map +1 -0
- package/funcs/betaLibrariesDocumentsUpload.d.ts +18 -0
- package/funcs/betaLibrariesDocumentsUpload.d.ts.map +1 -0
- package/funcs/betaLibrariesDocumentsUpload.js +128 -0
- package/funcs/betaLibrariesDocumentsUpload.js.map +1 -0
- package/funcs/betaLibrariesGet.d.ts +18 -0
- package/funcs/betaLibrariesGet.d.ts.map +1 -0
- package/funcs/betaLibrariesGet.js +112 -0
- package/funcs/betaLibrariesGet.js.map +1 -0
- package/funcs/betaLibrariesList.d.ts +16 -0
- package/funcs/betaLibrariesList.d.ts.map +1 -0
- package/funcs/betaLibrariesList.js +92 -0
- package/funcs/betaLibrariesList.js.map +1 -0
- package/funcs/betaLibrariesUpdate.d.ts +18 -0
- package/funcs/betaLibrariesUpdate.d.ts.map +1 -0
- package/funcs/betaLibrariesUpdate.js +113 -0
- package/funcs/betaLibrariesUpdate.js.map +1 -0
- package/funcs/modelsRetrieve.d.ts +1 -1
- package/funcs/modelsRetrieve.js +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/agentscompletionrequest.d.ts +3 -0
- package/models/components/agentscompletionrequest.d.ts.map +1 -1
- package/models/components/agentscompletionrequest.js.map +1 -1
- package/models/components/agentscompletionstreamrequest.d.ts +3 -0
- package/models/components/agentscompletionstreamrequest.d.ts.map +1 -1
- package/models/components/agentscompletionstreamrequest.js.map +1 -1
- package/models/components/basemodelcard.d.ts +2 -0
- package/models/components/basemodelcard.d.ts.map +1 -1
- package/models/components/basemodelcard.js +4 -0
- package/models/components/basemodelcard.js.map +1 -1
- package/models/components/chatcompletionrequest.d.ts +3 -0
- package/models/components/chatcompletionrequest.d.ts.map +1 -1
- package/models/components/chatcompletionrequest.js.map +1 -1
- package/models/components/chatcompletionstreamrequest.d.ts +3 -0
- package/models/components/chatcompletionstreamrequest.d.ts.map +1 -1
- package/models/components/chatcompletionstreamrequest.js.map +1 -1
- package/models/components/contentchunk.d.ts +5 -0
- package/models/components/contentchunk.d.ts.map +1 -1
- package/models/components/contentchunk.js +3 -0
- package/models/components/contentchunk.js.map +1 -1
- package/models/components/conversationevents.d.ts +17 -8
- package/models/components/conversationevents.d.ts.map +1 -1
- package/models/components/conversationevents.js +19 -8
- package/models/components/conversationevents.js.map +1 -1
- package/models/components/conversationhistory.d.ts +4 -4
- package/models/components/conversationhistory.d.ts.map +1 -1
- package/models/components/conversationhistory.js +8 -8
- package/models/components/conversationhistory.js.map +1 -1
- package/models/components/conversationrestartrequest.d.ts +2 -2
- package/models/components/conversationrestartrequest.d.ts.map +1 -1
- package/models/components/conversationrestartrequest.js +4 -4
- package/models/components/conversationrestartrequest.js.map +1 -1
- package/models/components/conversationrestartstreamrequest.d.ts +2 -2
- package/models/components/conversationrestartstreamrequest.d.ts.map +1 -1
- package/models/components/conversationrestartstreamrequest.js +4 -4
- package/models/components/conversationrestartstreamrequest.js.map +1 -1
- package/models/components/documentout.d.ts +61 -0
- package/models/components/documentout.d.ts.map +1 -0
- package/models/components/documentout.js +121 -0
- package/models/components/documentout.js.map +1 -0
- package/models/components/documenttextcontent.d.ts +29 -0
- package/models/components/documenttextcontent.d.ts.map +1 -0
- package/models/components/documenttextcontent.js +59 -0
- package/models/components/documenttextcontent.js.map +1 -0
- package/models/components/documentupdatein.d.ts +29 -0
- package/models/components/documentupdatein.d.ts.map +1 -0
- package/models/components/documentupdatein.js +59 -0
- package/models/components/documentupdatein.js.map +1 -0
- package/models/components/entitytype.d.ts +29 -0
- package/models/components/entitytype.d.ts.map +1 -0
- package/models/components/entitytype.js +62 -0
- package/models/components/entitytype.js.map +1 -0
- package/models/components/file.d.ts +31 -0
- package/models/components/file.d.ts.map +1 -0
- package/models/components/file.js +72 -0
- package/models/components/file.js.map +1 -0
- package/models/components/filechunk.d.ts +31 -0
- package/models/components/filechunk.d.ts.map +1 -0
- package/models/components/filechunk.js +70 -0
- package/models/components/filechunk.js.map +1 -0
- package/models/components/ftmodelcard.d.ts +2 -0
- package/models/components/ftmodelcard.d.ts.map +1 -1
- package/models/components/ftmodelcard.js +4 -0
- package/models/components/ftmodelcard.js.map +1 -1
- package/models/components/index.d.ts +19 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +19 -0
- package/models/components/index.js.map +1 -1
- package/models/components/inputentries.d.ts +6 -2
- package/models/components/inputentries.d.ts.map +1 -1
- package/models/components/inputentries.js +14 -2
- package/models/components/inputentries.js.map +1 -1
- package/models/components/libraryin.d.ts +33 -0
- package/models/components/libraryin.d.ts.map +1 -0
- package/models/components/libraryin.js +72 -0
- package/models/components/libraryin.js.map +1 -0
- package/models/components/libraryinupdate.d.ts +31 -0
- package/models/components/libraryinupdate.d.ts.map +1 -0
- package/models/components/libraryinupdate.js +61 -0
- package/models/components/libraryinupdate.js.map +1 -0
- package/models/components/libraryout.d.ts +59 -0
- package/models/components/libraryout.d.ts.map +1 -0
- package/models/components/libraryout.js +120 -0
- package/models/components/libraryout.js.map +1 -0
- package/models/components/listdocumentout.d.ts +33 -0
- package/models/components/listdocumentout.d.ts.map +1 -0
- package/models/components/listdocumentout.js +63 -0
- package/models/components/listdocumentout.js.map +1 -0
- package/models/components/listlibraryout.d.ts +30 -0
- package/models/components/listlibraryout.d.ts.map +1 -0
- package/models/components/listlibraryout.js +60 -0
- package/models/components/listlibraryout.js.map +1 -0
- package/models/components/listsharingout.d.ts +30 -0
- package/models/components/listsharingout.d.ts.map +1 -0
- package/models/components/listsharingout.js +60 -0
- package/models/components/listsharingout.js.map +1 -0
- package/models/components/messageinputentry.d.ts +2 -0
- package/models/components/messageinputentry.d.ts.map +1 -1
- package/models/components/messageinputentry.js +2 -0
- package/models/components/messageinputentry.js.map +1 -1
- package/models/components/modelcapabilities.d.ts +2 -0
- package/models/components/modelcapabilities.d.ts.map +1 -1
- package/models/components/modelcapabilities.js +2 -0
- package/models/components/modelcapabilities.js.map +1 -1
- package/models/components/ocrrequest.d.ts +5 -4
- package/models/components/ocrrequest.d.ts.map +1 -1
- package/models/components/ocrrequest.js +13 -2
- package/models/components/ocrrequest.js.map +1 -1
- package/models/components/paginationinfo.d.ts +37 -0
- package/models/components/paginationinfo.d.ts.map +1 -0
- package/models/components/paginationinfo.js +84 -0
- package/models/components/paginationinfo.js.map +1 -0
- package/models/components/processingstatusout.d.ts +31 -0
- package/models/components/processingstatusout.d.ts.map +1 -0
- package/models/components/processingstatusout.js +72 -0
- package/models/components/processingstatusout.js.map +1 -0
- package/models/components/shareenum.d.ts +22 -0
- package/models/components/shareenum.d.ts.map +1 -0
- package/models/components/shareenum.js +58 -0
- package/models/components/shareenum.js.map +1 -0
- package/models/components/sharingdelete.d.ts +40 -0
- package/models/components/sharingdelete.d.ts.map +1 -0
- package/models/components/sharingdelete.js +77 -0
- package/models/components/sharingdelete.js.map +1 -0
- package/models/components/sharingin.d.ts +43 -0
- package/models/components/sharingin.d.ts.map +1 -0
- package/models/components/sharingin.js +80 -0
- package/models/components/sharingin.js.map +1 -0
- package/models/components/sharingout.d.ts +39 -0
- package/models/components/sharingout.d.ts.map +1 -0
- package/models/components/sharingout.js +86 -0
- package/models/components/sharingout.js.map +1 -0
- package/models/components/ssetypes.d.ts +3 -0
- package/models/components/ssetypes.d.ts.map +1 -1
- package/models/components/ssetypes.js +1 -0
- package/models/components/ssetypes.js.map +1 -1
- package/models/components/toolexecutiondeltaevent.d.ts +63 -0
- package/models/components/toolexecutiondeltaevent.d.ts.map +1 -0
- package/models/components/toolexecutiondeltaevent.js +100 -0
- package/models/components/toolexecutiondeltaevent.js.map +1 -0
- package/models/components/toolexecutionentry.d.ts +2 -0
- package/models/components/toolexecutionentry.d.ts.map +1 -1
- package/models/components/toolexecutionentry.js +2 -0
- package/models/components/toolexecutionentry.js.map +1 -1
- package/models/components/toolexecutionstartedevent.d.ts +2 -0
- package/models/components/toolexecutionstartedevent.d.ts.map +1 -1
- package/models/components/toolexecutionstartedevent.js +2 -0
- package/models/components/toolexecutionstartedevent.js.map +1 -1
- package/models/components/toolreferencechunk.d.ts +4 -2
- package/models/components/toolreferencechunk.d.ts.map +1 -1
- package/models/components/toolreferencechunk.js +4 -2
- package/models/components/toolreferencechunk.js.map +1 -1
- package/models/operations/agentsapiv1conversationsget.d.ts +3 -0
- package/models/operations/agentsapiv1conversationsget.d.ts.map +1 -1
- package/models/operations/agentsapiv1conversationsget.js.map +1 -1
- package/models/operations/agentsapiv1conversationshistory.d.ts +3 -0
- package/models/operations/agentsapiv1conversationshistory.d.ts.map +1 -1
- package/models/operations/agentsapiv1conversationshistory.js.map +1 -1
- package/models/operations/agentsapiv1conversationsmessages.d.ts +3 -0
- package/models/operations/agentsapiv1conversationsmessages.d.ts.map +1 -1
- package/models/operations/agentsapiv1conversationsmessages.js.map +1 -1
- package/models/operations/agentsapiv1conversationsrestart.d.ts +3 -0
- package/models/operations/agentsapiv1conversationsrestart.d.ts.map +1 -1
- package/models/operations/agentsapiv1conversationsrestart.js.map +1 -1
- package/models/operations/agentsapiv1conversationsrestartstream.d.ts +3 -0
- package/models/operations/agentsapiv1conversationsrestartstream.d.ts.map +1 -1
- package/models/operations/agentsapiv1conversationsrestartstream.js.map +1 -1
- package/models/operations/filesapiroutesuploadfile.d.ts +2 -29
- package/models/operations/filesapiroutesuploadfile.d.ts.map +1 -1
- package/models/operations/filesapiroutesuploadfile.js +3 -43
- package/models/operations/filesapiroutesuploadfile.js.map +1 -1
- package/models/operations/index.d.ts +16 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +16 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/librariesdeletev1.d.ts +29 -0
- package/models/operations/librariesdeletev1.d.ts.map +1 -0
- package/models/operations/librariesdeletev1.js +68 -0
- package/models/operations/librariesdeletev1.js.map +1 -0
- package/models/operations/librariesdocumentsdeletev1.d.ts +31 -0
- package/models/operations/librariesdocumentsdeletev1.d.ts.map +1 -0
- package/models/operations/librariesdocumentsdeletev1.js +72 -0
- package/models/operations/librariesdocumentsdeletev1.js.map +1 -0
- package/models/operations/librariesdocumentsgetextractedtextsignedurlv1.d.ts +31 -0
- package/models/operations/librariesdocumentsgetextractedtextsignedurlv1.d.ts.map +1 -0
- package/models/operations/librariesdocumentsgetextractedtextsignedurlv1.js +72 -0
- package/models/operations/librariesdocumentsgetextractedtextsignedurlv1.js.map +1 -0
- package/models/operations/librariesdocumentsgetsignedurlv1.d.ts +31 -0
- package/models/operations/librariesdocumentsgetsignedurlv1.d.ts.map +1 -0
- package/models/operations/librariesdocumentsgetsignedurlv1.js +72 -0
- package/models/operations/librariesdocumentsgetsignedurlv1.js.map +1 -0
- package/models/operations/librariesdocumentsgetstatusv1.d.ts +31 -0
- package/models/operations/librariesdocumentsgetstatusv1.d.ts.map +1 -0
- package/models/operations/librariesdocumentsgetstatusv1.js +72 -0
- package/models/operations/librariesdocumentsgetstatusv1.js.map +1 -0
- package/models/operations/librariesdocumentsgettextcontentv1.d.ts +31 -0
- package/models/operations/librariesdocumentsgettextcontentv1.d.ts.map +1 -0
- package/models/operations/librariesdocumentsgettextcontentv1.js +72 -0
- package/models/operations/librariesdocumentsgettextcontentv1.js.map +1 -0
- package/models/operations/librariesdocumentsgetv1.d.ts +31 -0
- package/models/operations/librariesdocumentsgetv1.d.ts.map +1 -0
- package/models/operations/librariesdocumentsgetv1.js +72 -0
- package/models/operations/librariesdocumentsgetv1.js.map +1 -0
- package/models/operations/librariesdocumentslistv1.d.ts +39 -0
- package/models/operations/librariesdocumentslistv1.d.ts.map +1 -0
- package/models/operations/librariesdocumentslistv1.js +84 -0
- package/models/operations/librariesdocumentslistv1.js.map +1 -0
- package/models/operations/librariesdocumentsreprocessv1.d.ts +31 -0
- package/models/operations/librariesdocumentsreprocessv1.d.ts.map +1 -0
- package/models/operations/librariesdocumentsreprocessv1.js +72 -0
- package/models/operations/librariesdocumentsreprocessv1.js.map +1 -0
- package/models/operations/librariesdocumentsupdatev1.d.ts +34 -0
- package/models/operations/librariesdocumentsupdatev1.d.ts.map +1 -0
- package/models/operations/librariesdocumentsupdatev1.js +77 -0
- package/models/operations/librariesdocumentsupdatev1.js.map +1 -0
- package/models/operations/librariesdocumentsuploadv1.d.ts +70 -0
- package/models/operations/librariesdocumentsuploadv1.d.ts.map +1 -0
- package/models/operations/librariesdocumentsuploadv1.js +101 -0
- package/models/operations/librariesdocumentsuploadv1.js.map +1 -0
- package/models/operations/librariesgetv1.d.ts +29 -0
- package/models/operations/librariesgetv1.d.ts.map +1 -0
- package/models/operations/librariesgetv1.js +68 -0
- package/models/operations/librariesgetv1.js.map +1 -0
- package/models/operations/librariessharecreatev1.d.ts +32 -0
- package/models/operations/librariessharecreatev1.d.ts.map +1 -0
- package/models/operations/librariessharecreatev1.js +73 -0
- package/models/operations/librariessharecreatev1.js.map +1 -0
- package/models/operations/librariessharedeletev1.d.ts +32 -0
- package/models/operations/librariessharedeletev1.d.ts.map +1 -0
- package/models/operations/librariessharedeletev1.js +73 -0
- package/models/operations/librariessharedeletev1.js.map +1 -0
- package/models/operations/librariessharelistv1.d.ts +29 -0
- package/models/operations/librariessharelistv1.d.ts.map +1 -0
- package/models/operations/librariessharelistv1.js +68 -0
- package/models/operations/librariessharelistv1.js.map +1 -0
- package/models/operations/librariesupdatev1.d.ts +32 -0
- package/models/operations/librariesupdatev1.d.ts.map +1 -0
- package/models/operations/librariesupdatev1.js +73 -0
- package/models/operations/librariesupdatev1.js.map +1 -0
- package/package.json +1 -1
- package/sdk/accesses.d.ts +27 -0
- package/sdk/accesses.d.ts.map +1 -0
- package/sdk/accesses.js +42 -0
- package/sdk/accesses.js.map +1 -0
- package/sdk/beta.d.ts +3 -0
- package/sdk/beta.d.ts.map +1 -1
- package/sdk/beta.js +4 -0
- package/sdk/beta.js.map +1 -1
- package/sdk/documents.d.ts +76 -0
- package/sdk/documents.d.ts.map +1 -0
- package/sdk/documents.js +112 -0
- package/sdk/documents.js.map +1 -0
- package/sdk/libraries.d.ts +47 -0
- package/sdk/libraries.d.ts.map +1 -0
- package/sdk/libraries.js +70 -0
- package/sdk/libraries.js.map +1 -0
- package/sdk/models.d.ts +1 -1
- package/sdk/models.js +1 -1
- package/src/funcs/betaLibrariesAccessesDelete.ts +172 -0
- package/src/funcs/betaLibrariesAccessesList.ts +171 -0
- package/src/funcs/betaLibrariesAccessesUpdateOrCreate.ts +172 -0
- package/src/funcs/betaLibrariesCreate.ts +163 -0
- package/src/funcs/betaLibrariesDelete.ts +170 -0
- package/src/funcs/betaLibrariesDocumentsDelete.ts +177 -0
- package/src/funcs/betaLibrariesDocumentsExtractedTextSignedUrl.ts +179 -0
- package/src/funcs/betaLibrariesDocumentsGet.ts +177 -0
- package/src/funcs/betaLibrariesDocumentsGetSignedUrl.ts +179 -0
- package/src/funcs/betaLibrariesDocumentsList.ts +180 -0
- package/src/funcs/betaLibrariesDocumentsReprocess.ts +179 -0
- package/src/funcs/betaLibrariesDocumentsStatus.ts +179 -0
- package/src/funcs/betaLibrariesDocumentsTextContent.ts +179 -0
- package/src/funcs/betaLibrariesDocumentsUpdate.ts +178 -0
- package/src/funcs/betaLibrariesDocumentsUpload.ts +193 -0
- package/src/funcs/betaLibrariesGet.ts +170 -0
- package/src/funcs/betaLibrariesList.ts +136 -0
- package/src/funcs/betaLibrariesUpdate.ts +171 -0
- package/src/funcs/modelsRetrieve.ts +1 -1
- package/src/lib/config.ts +2 -2
- package/src/models/components/agentscompletionrequest.ts +3 -0
- package/src/models/components/agentscompletionstreamrequest.ts +3 -0
- package/src/models/components/basemodelcard.ts +6 -0
- package/src/models/components/chatcompletionrequest.ts +3 -0
- package/src/models/components/chatcompletionstreamrequest.ts +3 -0
- package/src/models/components/contentchunk.ts +14 -0
- package/src/models/components/conversationevents.ts +54 -24
- package/src/models/components/conversationhistory.ts +16 -16
- package/src/models/components/conversationrestartrequest.ts +6 -6
- package/src/models/components/conversationrestartstreamrequest.ts +6 -6
- package/src/models/components/documentout.ts +158 -0
- package/src/models/components/documenttextcontent.ts +66 -0
- package/src/models/components/documentupdatein.ts +66 -0
- package/src/models/components/entitytype.ts +55 -0
- package/src/models/components/file.ts +73 -0
- package/src/models/components/filechunk.ts +75 -0
- package/src/models/components/ftmodelcard.ts +6 -0
- package/src/models/components/index.ts +19 -0
- package/src/models/components/inputentries.ts +46 -4
- package/src/models/components/libraryin.ts +79 -0
- package/src/models/components/libraryinupdate.ts +68 -0
- package/src/models/components/libraryout.ts +153 -0
- package/src/models/components/listdocumentout.ts +80 -0
- package/src/models/components/listlibraryout.ts +68 -0
- package/src/models/components/listsharingout.ts +68 -0
- package/src/models/components/messageinputentry.ts +4 -0
- package/src/models/components/modelcapabilities.ts +4 -0
- package/src/models/components/ocrrequest.ts +25 -5
- package/src/models/components/paginationinfo.ts +95 -0
- package/src/models/components/processingstatusout.ts +81 -0
- package/src/models/components/shareenum.ts +48 -0
- package/src/models/components/sharingdelete.ts +94 -0
- package/src/models/components/sharingin.ts +103 -0
- package/src/models/components/sharingout.ts +99 -0
- package/src/models/components/ssetypes.ts +1 -0
- package/src/models/components/toolexecutiondeltaevent.ts +136 -0
- package/src/models/components/toolexecutionentry.ts +4 -0
- package/src/models/components/toolexecutionstartedevent.ts +4 -0
- package/src/models/components/toolreferencechunk.ts +8 -4
- package/src/models/operations/agentsapiv1conversationsget.ts +3 -0
- package/src/models/operations/agentsapiv1conversationshistory.ts +3 -0
- package/src/models/operations/agentsapiv1conversationsmessages.ts +3 -0
- package/src/models/operations/agentsapiv1conversationsrestart.ts +3 -0
- package/src/models/operations/agentsapiv1conversationsrestartstream.ts +3 -0
- package/src/models/operations/filesapiroutesuploadfile.ts +4 -69
- package/src/models/operations/index.ts +16 -0
- package/src/models/operations/librariesdeletev1.ts +75 -0
- package/src/models/operations/librariesdocumentsdeletev1.ts +84 -0
- package/src/models/operations/librariesdocumentsgetextractedtextsignedurlv1.ts +95 -0
- package/src/models/operations/librariesdocumentsgetsignedurlv1.ts +92 -0
- package/src/models/operations/librariesdocumentsgetstatusv1.ts +86 -0
- package/src/models/operations/librariesdocumentsgettextcontentv1.ts +93 -0
- package/src/models/operations/librariesdocumentsgetv1.ts +83 -0
- package/src/models/operations/librariesdocumentslistv1.ts +103 -0
- package/src/models/operations/librariesdocumentsreprocessv1.ts +86 -0
- package/src/models/operations/librariesdocumentsupdatev1.ts +91 -0
- package/src/models/operations/librariesdocumentsuploadv1.ts +172 -0
- package/src/models/operations/librariesgetv1.ts +75 -0
- package/src/models/operations/librariessharecreatev1.ts +84 -0
- package/src/models/operations/librariessharedeletev1.ts +84 -0
- package/src/models/operations/librariessharelistv1.ts +77 -0
- package/src/models/operations/librariesupdatev1.ts +82 -0
- package/src/sdk/accesses.ts +64 -0
- package/src/sdk/beta.ts +6 -0
- package/src/sdk/documents.ts +190 -0
- package/src/sdk/libraries.ts +110 -0
- package/src/sdk/models.ts +1 -1
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { MistralCore } from "../core.js";
|
|
6
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import * as components from "../models/components/index.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import * as errors from "../models/errors/index.js";
|
|
22
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Update a library.
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Given a library id, you can update the name and description.
|
|
33
|
+
*/
|
|
34
|
+
export function betaLibrariesUpdate(
|
|
35
|
+
client: MistralCore,
|
|
36
|
+
request: operations.LibrariesUpdateV1Request,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<
|
|
39
|
+
Result<
|
|
40
|
+
components.LibraryOut,
|
|
41
|
+
| errors.HTTPValidationError
|
|
42
|
+
| SDKError
|
|
43
|
+
| SDKValidationError
|
|
44
|
+
| UnexpectedClientError
|
|
45
|
+
| InvalidRequestError
|
|
46
|
+
| RequestAbortedError
|
|
47
|
+
| RequestTimeoutError
|
|
48
|
+
| ConnectionError
|
|
49
|
+
>
|
|
50
|
+
> {
|
|
51
|
+
return new APIPromise($do(
|
|
52
|
+
client,
|
|
53
|
+
request,
|
|
54
|
+
options,
|
|
55
|
+
));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async function $do(
|
|
59
|
+
client: MistralCore,
|
|
60
|
+
request: operations.LibrariesUpdateV1Request,
|
|
61
|
+
options?: RequestOptions,
|
|
62
|
+
): Promise<
|
|
63
|
+
[
|
|
64
|
+
Result<
|
|
65
|
+
components.LibraryOut,
|
|
66
|
+
| errors.HTTPValidationError
|
|
67
|
+
| SDKError
|
|
68
|
+
| SDKValidationError
|
|
69
|
+
| UnexpectedClientError
|
|
70
|
+
| InvalidRequestError
|
|
71
|
+
| RequestAbortedError
|
|
72
|
+
| RequestTimeoutError
|
|
73
|
+
| ConnectionError
|
|
74
|
+
>,
|
|
75
|
+
APICall,
|
|
76
|
+
]
|
|
77
|
+
> {
|
|
78
|
+
const parsed = safeParse(
|
|
79
|
+
request,
|
|
80
|
+
(value) => operations.LibrariesUpdateV1Request$outboundSchema.parse(value),
|
|
81
|
+
"Input validation failed",
|
|
82
|
+
);
|
|
83
|
+
if (!parsed.ok) {
|
|
84
|
+
return [parsed, { status: "invalid" }];
|
|
85
|
+
}
|
|
86
|
+
const payload = parsed.value;
|
|
87
|
+
const body = encodeJSON("body", payload.LibraryInUpdate, { explode: true });
|
|
88
|
+
|
|
89
|
+
const pathParams = {
|
|
90
|
+
library_id: encodeSimple("library_id", payload.library_id, {
|
|
91
|
+
explode: false,
|
|
92
|
+
charEncoding: "percent",
|
|
93
|
+
}),
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
const path = pathToFunc("/v1/libraries/{library_id}")(pathParams);
|
|
97
|
+
|
|
98
|
+
const headers = new Headers(compactMap({
|
|
99
|
+
"Content-Type": "application/json",
|
|
100
|
+
Accept: "application/json",
|
|
101
|
+
}));
|
|
102
|
+
|
|
103
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
104
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
105
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
106
|
+
|
|
107
|
+
const context = {
|
|
108
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
109
|
+
operationID: "libraries_update_v1",
|
|
110
|
+
oAuth2Scopes: [],
|
|
111
|
+
|
|
112
|
+
resolvedSecurity: requestSecurity,
|
|
113
|
+
|
|
114
|
+
securitySource: client._options.apiKey,
|
|
115
|
+
retryConfig: options?.retries
|
|
116
|
+
|| client._options.retryConfig
|
|
117
|
+
|| { strategy: "none" },
|
|
118
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
const requestRes = client._createRequest(context, {
|
|
122
|
+
security: requestSecurity,
|
|
123
|
+
method: "PUT",
|
|
124
|
+
baseURL: options?.serverURL,
|
|
125
|
+
path: path,
|
|
126
|
+
headers: headers,
|
|
127
|
+
body: body,
|
|
128
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
129
|
+
}, options);
|
|
130
|
+
if (!requestRes.ok) {
|
|
131
|
+
return [requestRes, { status: "invalid" }];
|
|
132
|
+
}
|
|
133
|
+
const req = requestRes.value;
|
|
134
|
+
|
|
135
|
+
const doResult = await client._do(req, {
|
|
136
|
+
context,
|
|
137
|
+
errorCodes: ["422", "4XX", "5XX"],
|
|
138
|
+
retryConfig: context.retryConfig,
|
|
139
|
+
retryCodes: context.retryCodes,
|
|
140
|
+
});
|
|
141
|
+
if (!doResult.ok) {
|
|
142
|
+
return [doResult, { status: "request-error", request: req }];
|
|
143
|
+
}
|
|
144
|
+
const response = doResult.value;
|
|
145
|
+
|
|
146
|
+
const responseFields = {
|
|
147
|
+
HttpMeta: { Response: response, Request: req },
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
const [result] = await M.match<
|
|
151
|
+
components.LibraryOut,
|
|
152
|
+
| errors.HTTPValidationError
|
|
153
|
+
| SDKError
|
|
154
|
+
| SDKValidationError
|
|
155
|
+
| UnexpectedClientError
|
|
156
|
+
| InvalidRequestError
|
|
157
|
+
| RequestAbortedError
|
|
158
|
+
| RequestTimeoutError
|
|
159
|
+
| ConnectionError
|
|
160
|
+
>(
|
|
161
|
+
M.json(200, components.LibraryOut$inboundSchema),
|
|
162
|
+
M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
|
|
163
|
+
M.fail("4XX"),
|
|
164
|
+
M.fail("5XX"),
|
|
165
|
+
)(response, { extraFields: responseFields });
|
|
166
|
+
if (!result.ok) {
|
|
167
|
+
return [result, { status: "complete", request: req, response }];
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
return [result, { status: "complete", request: req, response }];
|
|
171
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -55,8 +55,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
55
55
|
export const SDK_METADATA = {
|
|
56
56
|
language: "typescript",
|
|
57
57
|
openapiDocVersion: "1.0.0",
|
|
58
|
-
sdkVersion: "1.7.
|
|
58
|
+
sdkVersion: "1.7.4",
|
|
59
59
|
genVersion: "2.548.6",
|
|
60
60
|
userAgent:
|
|
61
|
-
"speakeasy-sdk/typescript 1.7.
|
|
61
|
+
"speakeasy-sdk/typescript 1.7.4 2.548.6 1.0.0 @mistralai/mistralai",
|
|
62
62
|
} as const;
|
|
@@ -122,6 +122,9 @@ export type AgentsCompletionRequest = {
|
|
|
122
122
|
n?: number | null | undefined;
|
|
123
123
|
prediction?: Prediction | undefined;
|
|
124
124
|
parallelToolCalls?: boolean | undefined;
|
|
125
|
+
/**
|
|
126
|
+
* Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.
|
|
127
|
+
*/
|
|
125
128
|
promptMode?: MistralPromptMode | null | undefined;
|
|
126
129
|
/**
|
|
127
130
|
* The ID of the agent to use for this completion.
|
|
@@ -121,6 +121,9 @@ export type AgentsCompletionStreamRequest = {
|
|
|
121
121
|
n?: number | null | undefined;
|
|
122
122
|
prediction?: Prediction | undefined;
|
|
123
123
|
parallelToolCalls?: boolean | undefined;
|
|
124
|
+
/**
|
|
125
|
+
* Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.
|
|
126
|
+
*/
|
|
124
127
|
promptMode?: MistralPromptMode | null | undefined;
|
|
125
128
|
/**
|
|
126
129
|
* The ID of the agent to use for this completion.
|
|
@@ -31,6 +31,7 @@ export type BaseModelCard = {
|
|
|
31
31
|
maxContextLength?: number | undefined;
|
|
32
32
|
aliases?: Array<string> | undefined;
|
|
33
33
|
deprecation?: Date | null | undefined;
|
|
34
|
+
deprecationReplacementModel?: string | null | undefined;
|
|
34
35
|
defaultModelTemperature?: number | null | undefined;
|
|
35
36
|
type?: "base" | undefined;
|
|
36
37
|
};
|
|
@@ -73,12 +74,14 @@ export const BaseModelCard$inboundSchema: z.ZodType<
|
|
|
73
74
|
deprecation: z.nullable(
|
|
74
75
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
75
76
|
).optional(),
|
|
77
|
+
deprecation_replacement_model: z.nullable(z.string()).optional(),
|
|
76
78
|
default_model_temperature: z.nullable(z.number()).optional(),
|
|
77
79
|
type: z.literal("base").default("base"),
|
|
78
80
|
}).transform((v) => {
|
|
79
81
|
return remap$(v, {
|
|
80
82
|
"owned_by": "ownedBy",
|
|
81
83
|
"max_context_length": "maxContextLength",
|
|
84
|
+
"deprecation_replacement_model": "deprecationReplacementModel",
|
|
82
85
|
"default_model_temperature": "defaultModelTemperature",
|
|
83
86
|
});
|
|
84
87
|
});
|
|
@@ -95,6 +98,7 @@ export type BaseModelCard$Outbound = {
|
|
|
95
98
|
max_context_length: number;
|
|
96
99
|
aliases?: Array<string> | undefined;
|
|
97
100
|
deprecation?: string | null | undefined;
|
|
101
|
+
deprecation_replacement_model?: string | null | undefined;
|
|
98
102
|
default_model_temperature?: number | null | undefined;
|
|
99
103
|
type: "base";
|
|
100
104
|
};
|
|
@@ -115,12 +119,14 @@ export const BaseModelCard$outboundSchema: z.ZodType<
|
|
|
115
119
|
maxContextLength: z.number().int().default(32768),
|
|
116
120
|
aliases: z.array(z.string()).optional(),
|
|
117
121
|
deprecation: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
122
|
+
deprecationReplacementModel: z.nullable(z.string()).optional(),
|
|
118
123
|
defaultModelTemperature: z.nullable(z.number()).optional(),
|
|
119
124
|
type: z.literal("base").default("base"),
|
|
120
125
|
}).transform((v) => {
|
|
121
126
|
return remap$(v, {
|
|
122
127
|
ownedBy: "owned_by",
|
|
123
128
|
maxContextLength: "max_context_length",
|
|
129
|
+
deprecationReplacementModel: "deprecation_replacement_model",
|
|
124
130
|
defaultModelTemperature: "default_model_temperature",
|
|
125
131
|
});
|
|
126
132
|
});
|
|
@@ -134,6 +134,9 @@ export type ChatCompletionRequest = {
|
|
|
134
134
|
n?: number | null | undefined;
|
|
135
135
|
prediction?: Prediction | undefined;
|
|
136
136
|
parallelToolCalls?: boolean | undefined;
|
|
137
|
+
/**
|
|
138
|
+
* Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.
|
|
139
|
+
*/
|
|
137
140
|
promptMode?: MistralPromptMode | null | undefined;
|
|
138
141
|
/**
|
|
139
142
|
* Whether to inject a safety prompt before all conversations.
|
|
@@ -131,6 +131,9 @@ export type ChatCompletionStreamRequest = {
|
|
|
131
131
|
n?: number | null | undefined;
|
|
132
132
|
prediction?: Prediction | undefined;
|
|
133
133
|
parallelToolCalls?: boolean | undefined;
|
|
134
|
+
/**
|
|
135
|
+
* Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.
|
|
136
|
+
*/
|
|
134
137
|
promptMode?: MistralPromptMode | null | undefined;
|
|
135
138
|
/**
|
|
136
139
|
* Whether to inject a safety prompt before all conversations.
|
|
@@ -12,6 +12,12 @@ import {
|
|
|
12
12
|
DocumentURLChunk$Outbound,
|
|
13
13
|
DocumentURLChunk$outboundSchema,
|
|
14
14
|
} from "./documenturlchunk.js";
|
|
15
|
+
import {
|
|
16
|
+
FileChunk,
|
|
17
|
+
FileChunk$inboundSchema,
|
|
18
|
+
FileChunk$Outbound,
|
|
19
|
+
FileChunk$outboundSchema,
|
|
20
|
+
} from "./filechunk.js";
|
|
15
21
|
import {
|
|
16
22
|
ImageURLChunk,
|
|
17
23
|
ImageURLChunk$inboundSchema,
|
|
@@ -35,6 +41,7 @@ export type ContentChunk =
|
|
|
35
41
|
| (ImageURLChunk & { type: "image_url" })
|
|
36
42
|
| (TextChunk & { type: "text" })
|
|
37
43
|
| (ReferenceChunk & { type: "reference" })
|
|
44
|
+
| (FileChunk & { type: "file" })
|
|
38
45
|
| (DocumentURLChunk & { type: "document_url" });
|
|
39
46
|
|
|
40
47
|
/** @internal */
|
|
@@ -56,6 +63,9 @@ export const ContentChunk$inboundSchema: z.ZodType<
|
|
|
56
63
|
type: v.type,
|
|
57
64
|
})),
|
|
58
65
|
),
|
|
66
|
+
FileChunk$inboundSchema.and(
|
|
67
|
+
z.object({ type: z.literal("file") }).transform((v) => ({ type: v.type })),
|
|
68
|
+
),
|
|
59
69
|
DocumentURLChunk$inboundSchema.and(
|
|
60
70
|
z.object({ type: z.literal("document_url") }).transform((v) => ({
|
|
61
71
|
type: v.type,
|
|
@@ -68,6 +78,7 @@ export type ContentChunk$Outbound =
|
|
|
68
78
|
| (ImageURLChunk$Outbound & { type: "image_url" })
|
|
69
79
|
| (TextChunk$Outbound & { type: "text" })
|
|
70
80
|
| (ReferenceChunk$Outbound & { type: "reference" })
|
|
81
|
+
| (FileChunk$Outbound & { type: "file" })
|
|
71
82
|
| (DocumentURLChunk$Outbound & { type: "document_url" });
|
|
72
83
|
|
|
73
84
|
/** @internal */
|
|
@@ -89,6 +100,9 @@ export const ContentChunk$outboundSchema: z.ZodType<
|
|
|
89
100
|
type: v.type,
|
|
90
101
|
})),
|
|
91
102
|
),
|
|
103
|
+
FileChunk$outboundSchema.and(
|
|
104
|
+
z.object({ type: z.literal("file") }).transform((v) => ({ type: v.type })),
|
|
105
|
+
),
|
|
92
106
|
DocumentURLChunk$outboundSchema.and(
|
|
93
107
|
z.object({ type: z.literal("document_url") }).transform((v) => ({
|
|
94
108
|
type: v.type,
|
|
@@ -53,6 +53,12 @@ import {
|
|
|
53
53
|
SSETypes$inboundSchema,
|
|
54
54
|
SSETypes$outboundSchema,
|
|
55
55
|
} from "./ssetypes.js";
|
|
56
|
+
import {
|
|
57
|
+
ToolExecutionDeltaEvent,
|
|
58
|
+
ToolExecutionDeltaEvent$inboundSchema,
|
|
59
|
+
ToolExecutionDeltaEvent$Outbound,
|
|
60
|
+
ToolExecutionDeltaEvent$outboundSchema,
|
|
61
|
+
} from "./toolexecutiondeltaevent.js";
|
|
56
62
|
import {
|
|
57
63
|
ToolExecutionDoneEvent,
|
|
58
64
|
ToolExecutionDoneEvent$inboundSchema,
|
|
@@ -70,10 +76,11 @@ export type ConversationEventsData =
|
|
|
70
76
|
| (ResponseDoneEvent & { type: "conversation.response.done" })
|
|
71
77
|
| (ResponseStartedEvent & { type: "conversation.response.started" })
|
|
72
78
|
| (ResponseErrorEvent & { type: "conversation.response.error" })
|
|
73
|
-
| (ToolExecutionStartedEvent & { type: "tool.execution.started" })
|
|
74
79
|
| (AgentHandoffDoneEvent & { type: "agent.handoff.done" })
|
|
75
80
|
| (AgentHandoffStartedEvent & { type: "agent.handoff.started" })
|
|
81
|
+
| (ToolExecutionDeltaEvent & { type: "tool.execution.delta" })
|
|
76
82
|
| (ToolExecutionDoneEvent & { type: "tool.execution.done" })
|
|
83
|
+
| (ToolExecutionStartedEvent & { type: "tool.execution.started" })
|
|
77
84
|
| (FunctionCallEvent & { type: "function.call.delta" })
|
|
78
85
|
| (MessageOutputEvent & { type: "message.output.delta" });
|
|
79
86
|
|
|
@@ -86,10 +93,11 @@ export type ConversationEvents = {
|
|
|
86
93
|
| (ResponseDoneEvent & { type: "conversation.response.done" })
|
|
87
94
|
| (ResponseStartedEvent & { type: "conversation.response.started" })
|
|
88
95
|
| (ResponseErrorEvent & { type: "conversation.response.error" })
|
|
89
|
-
| (ToolExecutionStartedEvent & { type: "tool.execution.started" })
|
|
90
96
|
| (AgentHandoffDoneEvent & { type: "agent.handoff.done" })
|
|
91
97
|
| (AgentHandoffStartedEvent & { type: "agent.handoff.started" })
|
|
98
|
+
| (ToolExecutionDeltaEvent & { type: "tool.execution.delta" })
|
|
92
99
|
| (ToolExecutionDoneEvent & { type: "tool.execution.done" })
|
|
100
|
+
| (ToolExecutionStartedEvent & { type: "tool.execution.started" })
|
|
93
101
|
| (FunctionCallEvent & { type: "function.call.delta" })
|
|
94
102
|
| (MessageOutputEvent & { type: "message.output.delta" });
|
|
95
103
|
};
|
|
@@ -115,11 +123,6 @@ export const ConversationEventsData$inboundSchema: z.ZodType<
|
|
|
115
123
|
v,
|
|
116
124
|
) => ({ type: v.type })),
|
|
117
125
|
),
|
|
118
|
-
ToolExecutionStartedEvent$inboundSchema.and(
|
|
119
|
-
z.object({ type: z.literal("tool.execution.started") }).transform((v) => ({
|
|
120
|
-
type: v.type,
|
|
121
|
-
})),
|
|
122
|
-
),
|
|
123
126
|
AgentHandoffDoneEvent$inboundSchema.and(
|
|
124
127
|
z.object({ type: z.literal("agent.handoff.done") }).transform((v) => ({
|
|
125
128
|
type: v.type,
|
|
@@ -130,11 +133,21 @@ export const ConversationEventsData$inboundSchema: z.ZodType<
|
|
|
130
133
|
type: v.type,
|
|
131
134
|
})),
|
|
132
135
|
),
|
|
136
|
+
ToolExecutionDeltaEvent$inboundSchema.and(
|
|
137
|
+
z.object({ type: z.literal("tool.execution.delta") }).transform((v) => ({
|
|
138
|
+
type: v.type,
|
|
139
|
+
})),
|
|
140
|
+
),
|
|
133
141
|
ToolExecutionDoneEvent$inboundSchema.and(
|
|
134
142
|
z.object({ type: z.literal("tool.execution.done") }).transform((v) => ({
|
|
135
143
|
type: v.type,
|
|
136
144
|
})),
|
|
137
145
|
),
|
|
146
|
+
ToolExecutionStartedEvent$inboundSchema.and(
|
|
147
|
+
z.object({ type: z.literal("tool.execution.started") }).transform((v) => ({
|
|
148
|
+
type: v.type,
|
|
149
|
+
})),
|
|
150
|
+
),
|
|
138
151
|
FunctionCallEvent$inboundSchema.and(
|
|
139
152
|
z.object({ type: z.literal("function.call.delta") }).transform((v) => ({
|
|
140
153
|
type: v.type,
|
|
@@ -152,10 +165,11 @@ export type ConversationEventsData$Outbound =
|
|
|
152
165
|
| (ResponseDoneEvent$Outbound & { type: "conversation.response.done" })
|
|
153
166
|
| (ResponseStartedEvent$Outbound & { type: "conversation.response.started" })
|
|
154
167
|
| (ResponseErrorEvent$Outbound & { type: "conversation.response.error" })
|
|
155
|
-
| (ToolExecutionStartedEvent$Outbound & { type: "tool.execution.started" })
|
|
156
168
|
| (AgentHandoffDoneEvent$Outbound & { type: "agent.handoff.done" })
|
|
157
169
|
| (AgentHandoffStartedEvent$Outbound & { type: "agent.handoff.started" })
|
|
170
|
+
| (ToolExecutionDeltaEvent$Outbound & { type: "tool.execution.delta" })
|
|
158
171
|
| (ToolExecutionDoneEvent$Outbound & { type: "tool.execution.done" })
|
|
172
|
+
| (ToolExecutionStartedEvent$Outbound & { type: "tool.execution.started" })
|
|
159
173
|
| (FunctionCallEvent$Outbound & { type: "function.call.delta" })
|
|
160
174
|
| (MessageOutputEvent$Outbound & { type: "message.output.delta" });
|
|
161
175
|
|
|
@@ -180,11 +194,6 @@ export const ConversationEventsData$outboundSchema: z.ZodType<
|
|
|
180
194
|
v,
|
|
181
195
|
) => ({ type: v.type })),
|
|
182
196
|
),
|
|
183
|
-
ToolExecutionStartedEvent$outboundSchema.and(
|
|
184
|
-
z.object({ type: z.literal("tool.execution.started") }).transform((v) => ({
|
|
185
|
-
type: v.type,
|
|
186
|
-
})),
|
|
187
|
-
),
|
|
188
197
|
AgentHandoffDoneEvent$outboundSchema.and(
|
|
189
198
|
z.object({ type: z.literal("agent.handoff.done") }).transform((v) => ({
|
|
190
199
|
type: v.type,
|
|
@@ -195,11 +204,21 @@ export const ConversationEventsData$outboundSchema: z.ZodType<
|
|
|
195
204
|
type: v.type,
|
|
196
205
|
})),
|
|
197
206
|
),
|
|
207
|
+
ToolExecutionDeltaEvent$outboundSchema.and(
|
|
208
|
+
z.object({ type: z.literal("tool.execution.delta") }).transform((v) => ({
|
|
209
|
+
type: v.type,
|
|
210
|
+
})),
|
|
211
|
+
),
|
|
198
212
|
ToolExecutionDoneEvent$outboundSchema.and(
|
|
199
213
|
z.object({ type: z.literal("tool.execution.done") }).transform((v) => ({
|
|
200
214
|
type: v.type,
|
|
201
215
|
})),
|
|
202
216
|
),
|
|
217
|
+
ToolExecutionStartedEvent$outboundSchema.and(
|
|
218
|
+
z.object({ type: z.literal("tool.execution.started") }).transform((v) => ({
|
|
219
|
+
type: v.type,
|
|
220
|
+
})),
|
|
221
|
+
),
|
|
203
222
|
FunctionCallEvent$outboundSchema.and(
|
|
204
223
|
z.object({ type: z.literal("function.call.delta") }).transform((v) => ({
|
|
205
224
|
type: v.type,
|
|
@@ -276,11 +295,6 @@ export const ConversationEvents$inboundSchema: z.ZodType<
|
|
|
276
295
|
v,
|
|
277
296
|
) => ({ type: v.type })),
|
|
278
297
|
),
|
|
279
|
-
ToolExecutionStartedEvent$inboundSchema.and(
|
|
280
|
-
z.object({ type: z.literal("tool.execution.started") }).transform((
|
|
281
|
-
v,
|
|
282
|
-
) => ({ type: v.type })),
|
|
283
|
-
),
|
|
284
298
|
AgentHandoffDoneEvent$inboundSchema.and(
|
|
285
299
|
z.object({ type: z.literal("agent.handoff.done") }).transform((v) => ({
|
|
286
300
|
type: v.type,
|
|
@@ -291,11 +305,21 @@ export const ConversationEvents$inboundSchema: z.ZodType<
|
|
|
291
305
|
v,
|
|
292
306
|
) => ({ type: v.type })),
|
|
293
307
|
),
|
|
308
|
+
ToolExecutionDeltaEvent$inboundSchema.and(
|
|
309
|
+
z.object({ type: z.literal("tool.execution.delta") }).transform((
|
|
310
|
+
v,
|
|
311
|
+
) => ({ type: v.type })),
|
|
312
|
+
),
|
|
294
313
|
ToolExecutionDoneEvent$inboundSchema.and(
|
|
295
314
|
z.object({ type: z.literal("tool.execution.done") }).transform((v) => ({
|
|
296
315
|
type: v.type,
|
|
297
316
|
})),
|
|
298
317
|
),
|
|
318
|
+
ToolExecutionStartedEvent$inboundSchema.and(
|
|
319
|
+
z.object({ type: z.literal("tool.execution.started") }).transform((
|
|
320
|
+
v,
|
|
321
|
+
) => ({ type: v.type })),
|
|
322
|
+
),
|
|
299
323
|
FunctionCallEvent$inboundSchema.and(
|
|
300
324
|
z.object({ type: z.literal("function.call.delta") }).transform((v) => ({
|
|
301
325
|
type: v.type,
|
|
@@ -319,10 +343,11 @@ export type ConversationEvents$Outbound = {
|
|
|
319
343
|
type: "conversation.response.started";
|
|
320
344
|
})
|
|
321
345
|
| (ResponseErrorEvent$Outbound & { type: "conversation.response.error" })
|
|
322
|
-
| (ToolExecutionStartedEvent$Outbound & { type: "tool.execution.started" })
|
|
323
346
|
| (AgentHandoffDoneEvent$Outbound & { type: "agent.handoff.done" })
|
|
324
347
|
| (AgentHandoffStartedEvent$Outbound & { type: "agent.handoff.started" })
|
|
348
|
+
| (ToolExecutionDeltaEvent$Outbound & { type: "tool.execution.delta" })
|
|
325
349
|
| (ToolExecutionDoneEvent$Outbound & { type: "tool.execution.done" })
|
|
350
|
+
| (ToolExecutionStartedEvent$Outbound & { type: "tool.execution.started" })
|
|
326
351
|
| (FunctionCallEvent$Outbound & { type: "function.call.delta" })
|
|
327
352
|
| (MessageOutputEvent$Outbound & { type: "message.output.delta" });
|
|
328
353
|
};
|
|
@@ -350,11 +375,6 @@ export const ConversationEvents$outboundSchema: z.ZodType<
|
|
|
350
375
|
v,
|
|
351
376
|
) => ({ type: v.type })),
|
|
352
377
|
),
|
|
353
|
-
ToolExecutionStartedEvent$outboundSchema.and(
|
|
354
|
-
z.object({ type: z.literal("tool.execution.started") }).transform((
|
|
355
|
-
v,
|
|
356
|
-
) => ({ type: v.type })),
|
|
357
|
-
),
|
|
358
378
|
AgentHandoffDoneEvent$outboundSchema.and(
|
|
359
379
|
z.object({ type: z.literal("agent.handoff.done") }).transform((v) => ({
|
|
360
380
|
type: v.type,
|
|
@@ -365,11 +385,21 @@ export const ConversationEvents$outboundSchema: z.ZodType<
|
|
|
365
385
|
type: v.type,
|
|
366
386
|
})),
|
|
367
387
|
),
|
|
388
|
+
ToolExecutionDeltaEvent$outboundSchema.and(
|
|
389
|
+
z.object({ type: z.literal("tool.execution.delta") }).transform((v) => ({
|
|
390
|
+
type: v.type,
|
|
391
|
+
})),
|
|
392
|
+
),
|
|
368
393
|
ToolExecutionDoneEvent$outboundSchema.and(
|
|
369
394
|
z.object({ type: z.literal("tool.execution.done") }).transform((v) => ({
|
|
370
395
|
type: v.type,
|
|
371
396
|
})),
|
|
372
397
|
),
|
|
398
|
+
ToolExecutionStartedEvent$outboundSchema.and(
|
|
399
|
+
z.object({ type: z.literal("tool.execution.started") }).transform((
|
|
400
|
+
v,
|
|
401
|
+
) => ({ type: v.type })),
|
|
402
|
+
),
|
|
373
403
|
FunctionCallEvent$outboundSchema.and(
|
|
374
404
|
z.object({ type: z.literal("function.call.delta") }).transform((v) => ({
|
|
375
405
|
type: v.type,
|
|
@@ -53,10 +53,10 @@ export type ConversationHistoryObject = ClosedEnum<
|
|
|
53
53
|
>;
|
|
54
54
|
|
|
55
55
|
export type Entries =
|
|
56
|
-
| MessageInputEntry
|
|
57
56
|
| FunctionResultEntry
|
|
58
|
-
|
|
|
57
|
+
| MessageInputEntry
|
|
59
58
|
| FunctionCallEntry
|
|
59
|
+
| ToolExecutionEntry
|
|
60
60
|
| MessageOutputEntry
|
|
61
61
|
| AgentHandoffEntry;
|
|
62
62
|
|
|
@@ -67,10 +67,10 @@ export type ConversationHistory = {
|
|
|
67
67
|
object?: ConversationHistoryObject | undefined;
|
|
68
68
|
conversationId: string;
|
|
69
69
|
entries: Array<
|
|
70
|
-
| MessageInputEntry
|
|
71
70
|
| FunctionResultEntry
|
|
72
|
-
|
|
|
71
|
+
| MessageInputEntry
|
|
73
72
|
| FunctionCallEntry
|
|
73
|
+
| ToolExecutionEntry
|
|
74
74
|
| MessageOutputEntry
|
|
75
75
|
| AgentHandoffEntry
|
|
76
76
|
>;
|
|
@@ -100,20 +100,20 @@ export namespace ConversationHistoryObject$ {
|
|
|
100
100
|
/** @internal */
|
|
101
101
|
export const Entries$inboundSchema: z.ZodType<Entries, z.ZodTypeDef, unknown> =
|
|
102
102
|
z.union([
|
|
103
|
-
MessageInputEntry$inboundSchema,
|
|
104
103
|
FunctionResultEntry$inboundSchema,
|
|
105
|
-
|
|
104
|
+
MessageInputEntry$inboundSchema,
|
|
106
105
|
FunctionCallEntry$inboundSchema,
|
|
106
|
+
ToolExecutionEntry$inboundSchema,
|
|
107
107
|
MessageOutputEntry$inboundSchema,
|
|
108
108
|
AgentHandoffEntry$inboundSchema,
|
|
109
109
|
]);
|
|
110
110
|
|
|
111
111
|
/** @internal */
|
|
112
112
|
export type Entries$Outbound =
|
|
113
|
-
| MessageInputEntry$Outbound
|
|
114
113
|
| FunctionResultEntry$Outbound
|
|
115
|
-
|
|
|
114
|
+
| MessageInputEntry$Outbound
|
|
116
115
|
| FunctionCallEntry$Outbound
|
|
116
|
+
| ToolExecutionEntry$Outbound
|
|
117
117
|
| MessageOutputEntry$Outbound
|
|
118
118
|
| AgentHandoffEntry$Outbound;
|
|
119
119
|
|
|
@@ -123,10 +123,10 @@ export const Entries$outboundSchema: z.ZodType<
|
|
|
123
123
|
z.ZodTypeDef,
|
|
124
124
|
Entries
|
|
125
125
|
> = z.union([
|
|
126
|
-
MessageInputEntry$outboundSchema,
|
|
127
126
|
FunctionResultEntry$outboundSchema,
|
|
128
|
-
|
|
127
|
+
MessageInputEntry$outboundSchema,
|
|
129
128
|
FunctionCallEntry$outboundSchema,
|
|
129
|
+
ToolExecutionEntry$outboundSchema,
|
|
130
130
|
MessageOutputEntry$outboundSchema,
|
|
131
131
|
AgentHandoffEntry$outboundSchema,
|
|
132
132
|
]);
|
|
@@ -170,10 +170,10 @@ export const ConversationHistory$inboundSchema: z.ZodType<
|
|
|
170
170
|
conversation_id: z.string(),
|
|
171
171
|
entries: z.array(
|
|
172
172
|
z.union([
|
|
173
|
-
MessageInputEntry$inboundSchema,
|
|
174
173
|
FunctionResultEntry$inboundSchema,
|
|
175
|
-
|
|
174
|
+
MessageInputEntry$inboundSchema,
|
|
176
175
|
FunctionCallEntry$inboundSchema,
|
|
176
|
+
ToolExecutionEntry$inboundSchema,
|
|
177
177
|
MessageOutputEntry$inboundSchema,
|
|
178
178
|
AgentHandoffEntry$inboundSchema,
|
|
179
179
|
]),
|
|
@@ -189,10 +189,10 @@ export type ConversationHistory$Outbound = {
|
|
|
189
189
|
object: string;
|
|
190
190
|
conversation_id: string;
|
|
191
191
|
entries: Array<
|
|
192
|
-
| MessageInputEntry$Outbound
|
|
193
192
|
| FunctionResultEntry$Outbound
|
|
194
|
-
|
|
|
193
|
+
| MessageInputEntry$Outbound
|
|
195
194
|
| FunctionCallEntry$Outbound
|
|
195
|
+
| ToolExecutionEntry$Outbound
|
|
196
196
|
| MessageOutputEntry$Outbound
|
|
197
197
|
| AgentHandoffEntry$Outbound
|
|
198
198
|
>;
|
|
@@ -210,10 +210,10 @@ export const ConversationHistory$outboundSchema: z.ZodType<
|
|
|
210
210
|
conversationId: z.string(),
|
|
211
211
|
entries: z.array(
|
|
212
212
|
z.union([
|
|
213
|
-
MessageInputEntry$outboundSchema,
|
|
214
213
|
FunctionResultEntry$outboundSchema,
|
|
215
|
-
|
|
214
|
+
MessageInputEntry$outboundSchema,
|
|
216
215
|
FunctionCallEntry$outboundSchema,
|
|
216
|
+
ToolExecutionEntry$outboundSchema,
|
|
217
217
|
MessageOutputEntry$outboundSchema,
|
|
218
218
|
AgentHandoffEntry$outboundSchema,
|
|
219
219
|
]),
|
|
@@ -40,11 +40,11 @@ export type ConversationRestartRequest = {
|
|
|
40
40
|
*/
|
|
41
41
|
store?: boolean | undefined;
|
|
42
42
|
handoffExecution?: ConversationRestartRequestHandoffExecution | undefined;
|
|
43
|
-
fromEntryId: string;
|
|
44
43
|
/**
|
|
45
44
|
* White-listed arguments from the completion API
|
|
46
45
|
*/
|
|
47
46
|
completionArgs?: CompletionArgs | undefined;
|
|
47
|
+
fromEntryId: string;
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
/** @internal */
|
|
@@ -81,13 +81,13 @@ export const ConversationRestartRequest$inboundSchema: z.ZodType<
|
|
|
81
81
|
store: z.boolean().default(true),
|
|
82
82
|
handoff_execution: ConversationRestartRequestHandoffExecution$inboundSchema
|
|
83
83
|
.default("server"),
|
|
84
|
-
from_entry_id: z.string(),
|
|
85
84
|
completion_args: CompletionArgs$inboundSchema.optional(),
|
|
85
|
+
from_entry_id: z.string(),
|
|
86
86
|
}).transform((v) => {
|
|
87
87
|
return remap$(v, {
|
|
88
88
|
"handoff_execution": "handoffExecution",
|
|
89
|
-
"from_entry_id": "fromEntryId",
|
|
90
89
|
"completion_args": "completionArgs",
|
|
90
|
+
"from_entry_id": "fromEntryId",
|
|
91
91
|
});
|
|
92
92
|
});
|
|
93
93
|
|
|
@@ -97,8 +97,8 @@ export type ConversationRestartRequest$Outbound = {
|
|
|
97
97
|
stream: boolean;
|
|
98
98
|
store: boolean;
|
|
99
99
|
handoff_execution: string;
|
|
100
|
-
from_entry_id: string;
|
|
101
100
|
completion_args?: CompletionArgs$Outbound | undefined;
|
|
101
|
+
from_entry_id: string;
|
|
102
102
|
};
|
|
103
103
|
|
|
104
104
|
/** @internal */
|
|
@@ -112,13 +112,13 @@ export const ConversationRestartRequest$outboundSchema: z.ZodType<
|
|
|
112
112
|
store: z.boolean().default(true),
|
|
113
113
|
handoffExecution: ConversationRestartRequestHandoffExecution$outboundSchema
|
|
114
114
|
.default("server"),
|
|
115
|
-
fromEntryId: z.string(),
|
|
116
115
|
completionArgs: CompletionArgs$outboundSchema.optional(),
|
|
116
|
+
fromEntryId: z.string(),
|
|
117
117
|
}).transform((v) => {
|
|
118
118
|
return remap$(v, {
|
|
119
119
|
handoffExecution: "handoff_execution",
|
|
120
|
-
fromEntryId: "from_entry_id",
|
|
121
120
|
completionArgs: "completion_args",
|
|
121
|
+
fromEntryId: "from_entry_id",
|
|
122
122
|
});
|
|
123
123
|
});
|
|
124
124
|
|