@mistralai/mistralai 1.7.3 → 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/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/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/basemodelcard.d.ts +23 -0
- package/models/components/basemodelcard.d.ts.map +1 -1
- package/models/components/basemodelcard.js +19 -1
- package/models/components/basemodelcard.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/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/ftmodelcard.d.ts +23 -0
- package/models/components/ftmodelcard.d.ts.map +1 -1
- package/models/components/ftmodelcard.js +19 -1
- package/models/components/ftmodelcard.js.map +1 -1
- package/models/components/index.d.ts +18 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +18 -0
- package/models/components/index.js.map +1 -1
- package/models/components/inputentries.d.ts +2 -2
- package/models/components/inputentries.d.ts.map +1 -1
- package/models/components/inputentries.js +4 -4
- 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 +10 -8
- package/models/components/messageinputentry.d.ts.map +1 -1
- package/models/components/messageinputentry.js +15 -13
- package/models/components/messageinputentry.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/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/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/lib/config.ts +2 -2
- package/src/models/components/basemodelcard.ts +27 -1
- package/src/models/components/conversationevents.ts +54 -24
- package/src/models/components/conversationhistory.ts +16 -16
- 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/ftmodelcard.ts +28 -1
- package/src/models/components/index.ts +18 -0
- package/src/models/components/inputentries.ts +8 -8
- 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 +20 -15
- 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/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
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
11
|
import {
|
|
@@ -14,6 +15,11 @@ import {
|
|
|
14
15
|
ModelCapabilities$outboundSchema,
|
|
15
16
|
} from "./modelcapabilities.js";
|
|
16
17
|
|
|
18
|
+
export const Type = {
|
|
19
|
+
Base: "base",
|
|
20
|
+
} as const;
|
|
21
|
+
export type Type = ClosedEnum<typeof Type>;
|
|
22
|
+
|
|
17
23
|
export type BaseModelCard = {
|
|
18
24
|
id: string;
|
|
19
25
|
object?: string | undefined;
|
|
@@ -30,6 +36,26 @@ export type BaseModelCard = {
|
|
|
30
36
|
type?: "base" | undefined;
|
|
31
37
|
};
|
|
32
38
|
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const Type$inboundSchema: z.ZodNativeEnum<typeof Type> = z.nativeEnum(
|
|
41
|
+
Type,
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export const Type$outboundSchema: z.ZodNativeEnum<typeof Type> =
|
|
46
|
+
Type$inboundSchema;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @internal
|
|
50
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
51
|
+
*/
|
|
52
|
+
export namespace Type$ {
|
|
53
|
+
/** @deprecated use `Type$inboundSchema` instead. */
|
|
54
|
+
export const inboundSchema = Type$inboundSchema;
|
|
55
|
+
/** @deprecated use `Type$outboundSchema` instead. */
|
|
56
|
+
export const outboundSchema = Type$outboundSchema;
|
|
57
|
+
}
|
|
58
|
+
|
|
33
59
|
/** @internal */
|
|
34
60
|
export const BaseModelCard$inboundSchema: z.ZodType<
|
|
35
61
|
BaseModelCard,
|
|
@@ -95,7 +121,7 @@ export const BaseModelCard$outboundSchema: z.ZodType<
|
|
|
95
121
|
deprecation: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
96
122
|
deprecationReplacementModel: z.nullable(z.string()).optional(),
|
|
97
123
|
defaultModelTemperature: z.nullable(z.number()).optional(),
|
|
98
|
-
type: z.literal("base").default("base"
|
|
124
|
+
type: z.literal("base").default("base"),
|
|
99
125
|
}).transform((v) => {
|
|
100
126
|
return remap$(v, {
|
|
101
127
|
ownedBy: "owned_by",
|
|
@@ -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
|
]),
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type DocumentOut = {
|
|
12
|
+
id: string;
|
|
13
|
+
libraryId: string;
|
|
14
|
+
hash: string;
|
|
15
|
+
mimeType: string;
|
|
16
|
+
extension: string;
|
|
17
|
+
size: number;
|
|
18
|
+
name: string;
|
|
19
|
+
summary?: string | null | undefined;
|
|
20
|
+
createdAt: Date;
|
|
21
|
+
lastProcessedAt?: Date | null | undefined;
|
|
22
|
+
numberOfPages?: number | null | undefined;
|
|
23
|
+
processingStatus: string;
|
|
24
|
+
uploadedById: string;
|
|
25
|
+
uploadedByType: string;
|
|
26
|
+
tokensProcessingMainContent?: number | null | undefined;
|
|
27
|
+
tokensProcessingSummary?: number | null | undefined;
|
|
28
|
+
tokensProcessingTotal: number;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const DocumentOut$inboundSchema: z.ZodType<
|
|
33
|
+
DocumentOut,
|
|
34
|
+
z.ZodTypeDef,
|
|
35
|
+
unknown
|
|
36
|
+
> = z.object({
|
|
37
|
+
id: z.string(),
|
|
38
|
+
library_id: z.string(),
|
|
39
|
+
hash: z.string(),
|
|
40
|
+
mime_type: z.string(),
|
|
41
|
+
extension: z.string(),
|
|
42
|
+
size: z.number().int(),
|
|
43
|
+
name: z.string(),
|
|
44
|
+
summary: z.nullable(z.string()).optional(),
|
|
45
|
+
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
46
|
+
last_processed_at: z.nullable(
|
|
47
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
48
|
+
).optional(),
|
|
49
|
+
number_of_pages: z.nullable(z.number().int()).optional(),
|
|
50
|
+
processing_status: z.string(),
|
|
51
|
+
uploaded_by_id: z.string(),
|
|
52
|
+
uploaded_by_type: z.string(),
|
|
53
|
+
tokens_processing_main_content: z.nullable(z.number().int()).optional(),
|
|
54
|
+
tokens_processing_summary: z.nullable(z.number().int()).optional(),
|
|
55
|
+
tokens_processing_total: z.number().int(),
|
|
56
|
+
}).transform((v) => {
|
|
57
|
+
return remap$(v, {
|
|
58
|
+
"library_id": "libraryId",
|
|
59
|
+
"mime_type": "mimeType",
|
|
60
|
+
"created_at": "createdAt",
|
|
61
|
+
"last_processed_at": "lastProcessedAt",
|
|
62
|
+
"number_of_pages": "numberOfPages",
|
|
63
|
+
"processing_status": "processingStatus",
|
|
64
|
+
"uploaded_by_id": "uploadedById",
|
|
65
|
+
"uploaded_by_type": "uploadedByType",
|
|
66
|
+
"tokens_processing_main_content": "tokensProcessingMainContent",
|
|
67
|
+
"tokens_processing_summary": "tokensProcessingSummary",
|
|
68
|
+
"tokens_processing_total": "tokensProcessingTotal",
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
/** @internal */
|
|
73
|
+
export type DocumentOut$Outbound = {
|
|
74
|
+
id: string;
|
|
75
|
+
library_id: string;
|
|
76
|
+
hash: string;
|
|
77
|
+
mime_type: string;
|
|
78
|
+
extension: string;
|
|
79
|
+
size: number;
|
|
80
|
+
name: string;
|
|
81
|
+
summary?: string | null | undefined;
|
|
82
|
+
created_at: string;
|
|
83
|
+
last_processed_at?: string | null | undefined;
|
|
84
|
+
number_of_pages?: number | null | undefined;
|
|
85
|
+
processing_status: string;
|
|
86
|
+
uploaded_by_id: string;
|
|
87
|
+
uploaded_by_type: string;
|
|
88
|
+
tokens_processing_main_content?: number | null | undefined;
|
|
89
|
+
tokens_processing_summary?: number | null | undefined;
|
|
90
|
+
tokens_processing_total: number;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
/** @internal */
|
|
94
|
+
export const DocumentOut$outboundSchema: z.ZodType<
|
|
95
|
+
DocumentOut$Outbound,
|
|
96
|
+
z.ZodTypeDef,
|
|
97
|
+
DocumentOut
|
|
98
|
+
> = z.object({
|
|
99
|
+
id: z.string(),
|
|
100
|
+
libraryId: z.string(),
|
|
101
|
+
hash: z.string(),
|
|
102
|
+
mimeType: z.string(),
|
|
103
|
+
extension: z.string(),
|
|
104
|
+
size: z.number().int(),
|
|
105
|
+
name: z.string(),
|
|
106
|
+
summary: z.nullable(z.string()).optional(),
|
|
107
|
+
createdAt: z.date().transform(v => v.toISOString()),
|
|
108
|
+
lastProcessedAt: z.nullable(z.date().transform(v => v.toISOString()))
|
|
109
|
+
.optional(),
|
|
110
|
+
numberOfPages: z.nullable(z.number().int()).optional(),
|
|
111
|
+
processingStatus: z.string(),
|
|
112
|
+
uploadedById: z.string(),
|
|
113
|
+
uploadedByType: z.string(),
|
|
114
|
+
tokensProcessingMainContent: z.nullable(z.number().int()).optional(),
|
|
115
|
+
tokensProcessingSummary: z.nullable(z.number().int()).optional(),
|
|
116
|
+
tokensProcessingTotal: z.number().int(),
|
|
117
|
+
}).transform((v) => {
|
|
118
|
+
return remap$(v, {
|
|
119
|
+
libraryId: "library_id",
|
|
120
|
+
mimeType: "mime_type",
|
|
121
|
+
createdAt: "created_at",
|
|
122
|
+
lastProcessedAt: "last_processed_at",
|
|
123
|
+
numberOfPages: "number_of_pages",
|
|
124
|
+
processingStatus: "processing_status",
|
|
125
|
+
uploadedById: "uploaded_by_id",
|
|
126
|
+
uploadedByType: "uploaded_by_type",
|
|
127
|
+
tokensProcessingMainContent: "tokens_processing_main_content",
|
|
128
|
+
tokensProcessingSummary: "tokens_processing_summary",
|
|
129
|
+
tokensProcessingTotal: "tokens_processing_total",
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* @internal
|
|
135
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
136
|
+
*/
|
|
137
|
+
export namespace DocumentOut$ {
|
|
138
|
+
/** @deprecated use `DocumentOut$inboundSchema` instead. */
|
|
139
|
+
export const inboundSchema = DocumentOut$inboundSchema;
|
|
140
|
+
/** @deprecated use `DocumentOut$outboundSchema` instead. */
|
|
141
|
+
export const outboundSchema = DocumentOut$outboundSchema;
|
|
142
|
+
/** @deprecated use `DocumentOut$Outbound` instead. */
|
|
143
|
+
export type Outbound = DocumentOut$Outbound;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export function documentOutToJSON(documentOut: DocumentOut): string {
|
|
147
|
+
return JSON.stringify(DocumentOut$outboundSchema.parse(documentOut));
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export function documentOutFromJSON(
|
|
151
|
+
jsonString: string,
|
|
152
|
+
): SafeParseResult<DocumentOut, SDKValidationError> {
|
|
153
|
+
return safeParse(
|
|
154
|
+
jsonString,
|
|
155
|
+
(x) => DocumentOut$inboundSchema.parse(JSON.parse(x)),
|
|
156
|
+
`Failed to parse 'DocumentOut' from JSON`,
|
|
157
|
+
);
|
|
158
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type DocumentTextContent = {
|
|
11
|
+
text: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const DocumentTextContent$inboundSchema: z.ZodType<
|
|
16
|
+
DocumentTextContent,
|
|
17
|
+
z.ZodTypeDef,
|
|
18
|
+
unknown
|
|
19
|
+
> = z.object({
|
|
20
|
+
text: z.string(),
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export type DocumentTextContent$Outbound = {
|
|
25
|
+
text: string;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const DocumentTextContent$outboundSchema: z.ZodType<
|
|
30
|
+
DocumentTextContent$Outbound,
|
|
31
|
+
z.ZodTypeDef,
|
|
32
|
+
DocumentTextContent
|
|
33
|
+
> = z.object({
|
|
34
|
+
text: z.string(),
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @internal
|
|
39
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
40
|
+
*/
|
|
41
|
+
export namespace DocumentTextContent$ {
|
|
42
|
+
/** @deprecated use `DocumentTextContent$inboundSchema` instead. */
|
|
43
|
+
export const inboundSchema = DocumentTextContent$inboundSchema;
|
|
44
|
+
/** @deprecated use `DocumentTextContent$outboundSchema` instead. */
|
|
45
|
+
export const outboundSchema = DocumentTextContent$outboundSchema;
|
|
46
|
+
/** @deprecated use `DocumentTextContent$Outbound` instead. */
|
|
47
|
+
export type Outbound = DocumentTextContent$Outbound;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function documentTextContentToJSON(
|
|
51
|
+
documentTextContent: DocumentTextContent,
|
|
52
|
+
): string {
|
|
53
|
+
return JSON.stringify(
|
|
54
|
+
DocumentTextContent$outboundSchema.parse(documentTextContent),
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function documentTextContentFromJSON(
|
|
59
|
+
jsonString: string,
|
|
60
|
+
): SafeParseResult<DocumentTextContent, SDKValidationError> {
|
|
61
|
+
return safeParse(
|
|
62
|
+
jsonString,
|
|
63
|
+
(x) => DocumentTextContent$inboundSchema.parse(JSON.parse(x)),
|
|
64
|
+
`Failed to parse 'DocumentTextContent' from JSON`,
|
|
65
|
+
);
|
|
66
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type DocumentUpdateIn = {
|
|
11
|
+
name?: string | null | undefined;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const DocumentUpdateIn$inboundSchema: z.ZodType<
|
|
16
|
+
DocumentUpdateIn,
|
|
17
|
+
z.ZodTypeDef,
|
|
18
|
+
unknown
|
|
19
|
+
> = z.object({
|
|
20
|
+
name: z.nullable(z.string()).optional(),
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export type DocumentUpdateIn$Outbound = {
|
|
25
|
+
name?: string | null | undefined;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const DocumentUpdateIn$outboundSchema: z.ZodType<
|
|
30
|
+
DocumentUpdateIn$Outbound,
|
|
31
|
+
z.ZodTypeDef,
|
|
32
|
+
DocumentUpdateIn
|
|
33
|
+
> = z.object({
|
|
34
|
+
name: z.nullable(z.string()).optional(),
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @internal
|
|
39
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
40
|
+
*/
|
|
41
|
+
export namespace DocumentUpdateIn$ {
|
|
42
|
+
/** @deprecated use `DocumentUpdateIn$inboundSchema` instead. */
|
|
43
|
+
export const inboundSchema = DocumentUpdateIn$inboundSchema;
|
|
44
|
+
/** @deprecated use `DocumentUpdateIn$outboundSchema` instead. */
|
|
45
|
+
export const outboundSchema = DocumentUpdateIn$outboundSchema;
|
|
46
|
+
/** @deprecated use `DocumentUpdateIn$Outbound` instead. */
|
|
47
|
+
export type Outbound = DocumentUpdateIn$Outbound;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function documentUpdateInToJSON(
|
|
51
|
+
documentUpdateIn: DocumentUpdateIn,
|
|
52
|
+
): string {
|
|
53
|
+
return JSON.stringify(
|
|
54
|
+
DocumentUpdateIn$outboundSchema.parse(documentUpdateIn),
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function documentUpdateInFromJSON(
|
|
59
|
+
jsonString: string,
|
|
60
|
+
): SafeParseResult<DocumentUpdateIn, SDKValidationError> {
|
|
61
|
+
return safeParse(
|
|
62
|
+
jsonString,
|
|
63
|
+
(x) => DocumentUpdateIn$inboundSchema.parse(JSON.parse(x)),
|
|
64
|
+
`Failed to parse 'DocumentUpdateIn' from JSON`,
|
|
65
|
+
);
|
|
66
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import {
|
|
7
|
+
catchUnrecognizedEnum,
|
|
8
|
+
OpenEnum,
|
|
9
|
+
Unrecognized,
|
|
10
|
+
} from "../../types/enums.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The type of entity, used to share a library.
|
|
14
|
+
*/
|
|
15
|
+
export const EntityType = {
|
|
16
|
+
User: "User",
|
|
17
|
+
Workspace: "Workspace",
|
|
18
|
+
Org: "Org",
|
|
19
|
+
} as const;
|
|
20
|
+
/**
|
|
21
|
+
* The type of entity, used to share a library.
|
|
22
|
+
*/
|
|
23
|
+
export type EntityType = OpenEnum<typeof EntityType>;
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const EntityType$inboundSchema: z.ZodType<
|
|
27
|
+
EntityType,
|
|
28
|
+
z.ZodTypeDef,
|
|
29
|
+
unknown
|
|
30
|
+
> = z
|
|
31
|
+
.union([
|
|
32
|
+
z.nativeEnum(EntityType),
|
|
33
|
+
z.string().transform(catchUnrecognizedEnum),
|
|
34
|
+
]);
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const EntityType$outboundSchema: z.ZodType<
|
|
38
|
+
EntityType,
|
|
39
|
+
z.ZodTypeDef,
|
|
40
|
+
EntityType
|
|
41
|
+
> = z.union([
|
|
42
|
+
z.nativeEnum(EntityType),
|
|
43
|
+
z.string().and(z.custom<Unrecognized<string>>()),
|
|
44
|
+
]);
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @internal
|
|
48
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
49
|
+
*/
|
|
50
|
+
export namespace EntityType$ {
|
|
51
|
+
/** @deprecated use `EntityType$inboundSchema` instead. */
|
|
52
|
+
export const inboundSchema = EntityType$inboundSchema;
|
|
53
|
+
/** @deprecated use `EntityType$outboundSchema` instead. */
|
|
54
|
+
export const outboundSchema = EntityType$outboundSchema;
|
|
55
|
+
}
|