diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 5587955b..50de0fcc 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 2d045ec7-2ebb-4f4d-ad25-40953b132161 management: - docChecksum: a0fa9ebdce4c9ca7549f9dce826a2169 + docChecksum: 3b20f990abcfeb4ad934580af6e0d7b1 docVersion: 1.0.0 speakeasyVersion: 1.761.1 generationVersion: 2.879.6 - releaseVersion: 2.4.5 - configChecksum: f6852fb59e3bcc9a7750210521f2c2d4 + releaseVersion: 2.4.6 + configChecksum: 49adf68e99fa9f97295f7d2573756c6b repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: bcab0c88-1877-4209-a77d-49b4681f030e - pristine_commit_hash: 56d30233849b5a3cb3d207e646ee849c77835f70 - pristine_tree_hash: 3feb3429dfead0d0228262509f23a6c5e9c9c7a2 + generation_id: dffd048d-209e-4b40-ac91-bcdd5e54d79f + pristine_commit_hash: eedcec2234f58968606e37ebb74bfc1d076de172 + pristine_tree_hash: a84a676c9047f0e847a57db96a86c59e47d35ed9 features: python: acceptHeaders: 3.0.0 @@ -61,7 +61,6 @@ trackedFiles: id: 89aa447020cd last_write_checksum: sha1:f84632c81029fcdda8c3b0c768d02b836fc80526 pristine_git_object: 8d79f0abb72526f1fb34a4c03e5bba612c6ba2ae - deleted: true USAGE.md: id: 3aed33ce6e6f last_write_checksum: sha1:d172deb3ee1630f16b279de22aec1f8f68d7565f @@ -340,8 +339,8 @@ trackedFiles: pristine_git_object: d0784e66112b8f79036d1acff2a7fc242058e4a0 docs/models/authenticationconfiguration.md: id: b470496ac0ad - last_write_checksum: sha1:650e1e889d037f79a87c8ab0a679e245c2ddbb4b - pristine_git_object: 6644875efdc48b462a98193b391dc23e1f31b2c3 + last_write_checksum: sha1:0ea76a9e5fb98d46a27be52d95a0195fa9ee2df0 + pristine_git_object: cdd1e55fed41e8bc8914e90f912d9cc4a04920f1 docs/models/authorization.md: id: dec4d9809e25 last_write_checksum: sha1:6bf766a7b49ca2b706bb4eb88ba2d56406e06e1e @@ -646,6 +645,18 @@ trackedFiles: id: cbf7c2c53983 last_write_checksum: sha1:933fcdfbded00c65d36e46d6b2e18e56540802fe pristine_git_object: 29f8ad0771bf8da6999345b78322001c3821a6ca + docs/models/connectoractivatefororganizationv1request.md: + id: 3a15b69f7e51 + last_write_checksum: sha1:ae29bb24fdf11ccf8c08e2a1a2909d55d4cbaf6c + pristine_git_object: 40469996995ac4e446584780ac77981a0a5c67bc + docs/models/connectoractivateforuserv1request.md: + id: a4645ace44a1 + last_write_checksum: sha1:c4302c00ee924529d626c75ecb9374b416bcb028 + pristine_git_object: bdf73b8aca4293b69ef96f3c72f0acbf5d7546b7 + docs/models/connectoractivateforworkspacev1request.md: + id: da9da37e67ba + last_write_checksum: sha1:c7b677341c095afaac4adaeacd9e7337307e3174 + pristine_git_object: e4dbaf1dbf5632919eb3cc8fac7aa67ceee01e1c docs/models/connectorauthenticationheader.md: id: bb5e842caa63 last_write_checksum: sha1:7c721f916ed1ce2d4155734bb8190e11de6bf4ac @@ -670,6 +681,18 @@ trackedFiles: id: 10c159720bae last_write_checksum: sha1:e86b1952360e4f41550603b9dc16fddeff6127e7 pristine_git_object: 310cdcde0039e9fdb4faa53644265a6a614d9b20 + docs/models/connectordeactivatefororganizationv1request.md: + id: c4310041f3ab + last_write_checksum: sha1:a1ae31f8e5b836d9300ff4e64ecc2a11c9db7a7f + pristine_git_object: 1fd64004b3bd61e1ff3f789566bc3e587f2e2cf8 + docs/models/connectordeactivateforuserv1request.md: + id: 72bcb9fcabe5 + last_write_checksum: sha1:02be33e6a0ed87d60d7e8130c80e85426b2f1db7 + pristine_git_object: 992603b0f86d60714acded1498c661d170b0e40a + docs/models/connectordeactivateforworkspacev1request.md: + id: 42c92923f1ae + last_write_checksum: sha1:f4f8dbfde3ca68ae68028ddce150dc9761bf3a24 + pristine_git_object: 15033f293dcbb35daef48119419bedd779d8f06a docs/models/connectordeleteorganizationcredentialsv1request.md: id: 922f5267f2c0 last_write_checksum: sha1:23af2d809a20c093ece79bcd1e6ebc551be4b368 @@ -696,8 +719,8 @@ trackedFiles: pristine_git_object: 7d6b94ff09be0d4bf2f062fa039551ab0735fc13 docs/models/connectorgetv1request.md: id: 844c1f489684 - last_write_checksum: sha1:e36ac8ff28ee258340868f8aa4f3172ed3b82ef3 - pristine_git_object: c45148b97aad128744e0e6ccebb00bf22d400eff + last_write_checksum: sha1:ea08e4921a2131bf240d4c04cfed65a5dec3dd63 + pristine_git_object: e82a03adca6faaf3448ae81cb730a4c2bf5b2e01 docs/models/connectorlistorganizationcredentialsv1request.md: id: cc1870566c72 last_write_checksum: sha1:633bb13df6fa25f746a9aa905da3f3beb75ff91a @@ -720,8 +743,8 @@ trackedFiles: pristine_git_object: 573869b2483b15da829b25e1863652680deb6a36 docs/models/connectorsqueryfilters.md: id: d6fb981cad1e - last_write_checksum: sha1:3a33088e1e9332318aff437fba7d01239d417d84 - pristine_git_object: aea47e14f02b61dbbd726bc11f6197b6854bb358 + last_write_checksum: sha1:01782d52446d8e7e53c72094b2ff86b6fe600ee4 + pristine_git_object: 37c19e7a9d2c4bb41a77a8c13936024c9d218d08 docs/models/connectortool.md: id: 1c640bab9aeb last_write_checksum: sha1:ab4ad137330bda6699043da2337aea477c33241e @@ -750,6 +773,10 @@ trackedFiles: id: fdbeb5fee83e last_write_checksum: sha1:9082d8f0cfe9f950d129971b152d37f936f7aaea pristine_git_object: db9cc9b4c4379865ad15292c5385dce864b5935b + docs/models/consumertype.md: + id: d7e5c7974261 + last_write_checksum: sha1:4012cffe5553431d50539a9e4663a935b5cb00cb + pristine_git_object: 9ac4df3f4993e81c99ddfcb91c0b32b04730da7f docs/models/contentchunk.md: id: d2d3a32080cd last_write_checksum: sha1:b253e4b802adb5b66d896bfc6245ac4d21a0c67c @@ -936,8 +963,28 @@ trackedFiles: pristine_git_object: a72676719b90a7b840a2b21d043c61bdf83ce294 docs/models/createlibraryrequest.md: id: 8935b2ed9d13 - last_write_checksum: sha1:14480a2eb03a9e5076a866a21bff0dfd80bb585d - pristine_git_object: 07ff97d0cbaf4f3e260cce4b80fcbd637cc6b488 + last_write_checksum: sha1:1bc8b8f3827425b63bf25b6662d959274f266679 + pristine_git_object: fd94c1caf6dbe31da9b0494879027cba9dbbb6c3 + docs/models/createsearchindexinforequest.md: + id: 886f7c48f467 + last_write_checksum: sha1:f39f0c2d8fe71a32795f7dfbb7536749f7b411bf + pristine_git_object: 4b32c8c9c80fb6f285a7c1dbe57cb61863a7b649 + docs/models/createsearchindexinforequestindex.md: + id: 846e92f3d7f2 + last_write_checksum: sha1:abb7ce51a4a6f86ab5b5e7e6cf484b4061fa7022 + pristine_git_object: 42d99fcb5ef07be40f6d7f34dd08dd56165a69ca + docs/models/createsearchindexinforequeststatus.md: + id: 79a895401c56 + last_write_checksum: sha1:8388b45338b7744a8da74f019c0552eb1172cdaa + pristine_git_object: 1e477acc2610b127f09ced4748e72d5886812b3e + docs/models/createvespaschemarequest.md: + id: 5d582f9abac3 + last_write_checksum: sha1:f760192840beb2436d5505ea2d095501956a08be + pristine_git_object: 3098a2b9dc2ca9c592fce287daae7e5b6a6ed974 + docs/models/createvespasearchindexinforequest.md: + id: a34bf5ca3f0b + last_write_checksum: sha1:562b8ae886bafa4ae587b724007ff3a6205dd20b + pristine_git_object: 0bd47c383aa7df413c1a63dfaeec09582b7bd8d6 docs/models/credentialscreateorupdate.md: id: b2a0e87b0a91 last_write_checksum: sha1:6b778120a84c08601b4f2fbba368d3454204d939 @@ -1084,8 +1131,8 @@ trackedFiles: pristine_git_object: afdcca834da74cc33711b1aa229f5ccf66eceefd docs/models/document.md: id: cd1d2a444370 - last_write_checksum: sha1:c10641b02547bedcc982b8997097083dfc562598 - pristine_git_object: 42c639a6a9b235ab4c754286486fa7e8872a0e7e + last_write_checksum: sha1:7aeb84c1a0efa2b3bf15808714405fe29b930296 + pristine_git_object: ff0238ea7afcba3ef690a303574f74744ba31ecd docs/models/documentlibrarytool.md: id: 68083b0ef8f3 last_write_checksum: sha1:76b9f47c399915a338abe929cb10c1b37282eadf @@ -1182,6 +1229,10 @@ trackedFiles: id: 16660f92d7d1 last_write_checksum: sha1:fa22e53a929291e6b057283482ca7871fb6d2062 pristine_git_object: efe4bbb058c168ad531be27cc135f09464d0da13 + docs/models/expression.md: + id: 84d49a7056b1 + last_write_checksum: sha1:8f871b9f64754b138edaabbd8f64895376694881 + pristine_git_object: d7de83a9d4fad318d2e30f7718bf9b529a367158 docs/models/failure.md: id: 3f79c7d64eac last_write_checksum: sha1:344f1cea9b786a399a0dd974d4df010714031b2a @@ -1434,6 +1485,10 @@ trackedFiles: id: ac9de7c67a5f last_write_checksum: sha1:40fa492321f18e77792d49cb9142b0293be7ffe3 pristine_git_object: 6b03369064e2bb2fedffa606d8bff20d9fceae00 + docs/models/getschedulev1workflowsschedulesscheduleidgetrequest.md: + id: 52b58a6705e8 + last_write_checksum: sha1:d4af59b2276baf70a151680d2276c71a6944fe43 + pristine_git_object: e681e674a011fcd31373c4885c862717a04a6b6f docs/models/getsignedurlresponse.md: id: 5539e5d7c3d4 last_write_checksum: sha1:7198474f48bfba6d47326cd436e4a00a8ba70ce3 @@ -1776,8 +1831,12 @@ trackedFiles: pristine_git_object: 6febc058425bb38857c391ee4c40d600858e6058 docs/models/librariesdocumentslistv1request.md: id: 7b5756e50d64 - last_write_checksum: sha1:2605b7972a3d7b4f73ab8052be4bf740f44f6f6f - pristine_git_object: 44f6300115853053214639982516a60b3268e778 + last_write_checksum: sha1:b01fbfcbdb622ba35e52cfd0884d75d7ef5a192b + pristine_git_object: 6149336fc296c6ff3c61e4f61f36fe4c33c8c465 + docs/models/librariesdocumentspatchv1request.md: + id: 2815453b5023 + last_write_checksum: sha1:0ded124e8b094e78b404d1a1cdc1e7b5cffef555 + pristine_git_object: 511aee46a2ed2db98101c10d69288732807b0132 docs/models/librariesdocumentsreprocessv1request.md: id: 1b8bf57b3f0a last_write_checksum: sha1:8528785c1b4ae18d6ec6f261d29d5daac0d420a3 @@ -1796,8 +1855,12 @@ trackedFiles: pristine_git_object: 6e1e04c39c15a85d96710f8d3a8ed11a22412816 docs/models/librarieslistv1request.md: id: eb6047c126d3 - last_write_checksum: sha1:7bd4a00dfe54162bd3c315ca0ab2990133969390 - pristine_git_object: 37352ee1277aa9576da968ce44b0ffda772715f7 + last_write_checksum: sha1:dd42520f540d9e5c1820d517be4e4a894475ece1 + pristine_git_object: 5efdb897a19d6ad920a031472ba88098c4f80630 + docs/models/librariespatchv1request.md: + id: a5c8a22e9d7c + last_write_checksum: sha1:fc18a3c812d877f8bd47f6a34bbc3d29e5420519 + pristine_git_object: 4764808653f0d841f87e58ca71ec9549f2c1af1f docs/models/librariessharecreatev1request.md: id: 99e7bb8f7fed last_write_checksum: sha1:f37578c7882eab83cca3cb2aaf1ac17b9a21934c @@ -1816,8 +1879,8 @@ trackedFiles: pristine_git_object: c5c142db7aaa49990135c21eabde43b8c0fdf756 docs/models/library.md: id: e8ec114dd107 - last_write_checksum: sha1:5434149d101255cb5135f8726acdcfb29c4381bd - pristine_git_object: a07d3afac18faccb504c51f1a54cf5addc3faab3 + last_write_checksum: sha1:9331e004d3587e261e9f7496525dc698db37db3f + pristine_git_object: 5b9aa658712ffad94a9c2b7f1595d1c232868870 docs/models/listbatchjobsresponse.md: id: e03025d58630 last_write_checksum: sha1:de42c9396546fc8487d0bd6ed15b4076599fa83f @@ -1918,6 +1981,14 @@ trackedFiles: id: e25e2392c4c9 last_write_checksum: sha1:647413204680efd677ce7746101b74e2ad7d59d5 pristine_git_object: 6daecdd1eb31ad2d80400b4eb9032f635f0bc889 + docs/models/logicalexpression.md: + id: f222e869e12b + last_write_checksum: sha1:cec26b10026b2245d92356fbe81cece3645de577 + pristine_git_object: 675368e79b0723713a27064cc56814c951d91616 + docs/models/logicalexpressiontype.md: + id: 61eee1af8d4c + last_write_checksum: sha1:7324d8e11489ed6c7a98d24bcee69c0196affd7d + pristine_git_object: 453285d5468ed1a7cb3ee51201b32732ae8a6994 docs/models/mcpservericon.md: id: 0b20f03adab8 last_write_checksum: sha1:d66113a4b0486f144b1f73f423559360ec751631 @@ -2166,6 +2237,10 @@ trackedFiles: id: 592cf80526b8 last_write_checksum: sha1:e72a2238fe984cc4fa0d2522b462aa9ad247af78 pristine_git_object: 7ed17a697771f10febe2b893f092865b09dc04c7 + docs/models/partialscheduledefinition.md: + id: f5bb5dc0cf18 + last_write_checksum: sha1:a0a8d6c43c0231c0e2061de78f5b6e9e233e7c23 + pristine_git_object: e66ee671440d90abcd15860144e6826f5835110b docs/models/pauseschedulev1workflowsschedulesscheduleidpausepostrequest.md: id: 56f6ceab8262 last_write_checksum: sha1:3b5c8e341c685a7f4b2789a9d051eef54ff8cfda @@ -2200,8 +2275,8 @@ trackedFiles: pristine_git_object: fae3c1ca4ba2c2ddb3b7de401ecdc8d56dcc7740 docs/models/processingstatus.md: id: 06047222d2ff - last_write_checksum: sha1:fd2f5d605c6e5f8aa86461e8442c50db3fbea07d - pristine_git_object: 514caa50e524ae5afab802b8394cb27189b2bfbe + last_write_checksum: sha1:81a11724ad214bab81874167854e6cbcb55a6cc0 + pristine_git_object: 1d472b881d684f47ac76edff663ab5fc84581e10 docs/models/processstatus.md: id: "336054835357" last_write_checksum: sha1:43253d2ef4badf3a5e8e5981becfb558c934359a @@ -2294,6 +2369,10 @@ trackedFiles: id: 8857ab6025c4 last_write_checksum: sha1:5634447d01c483713dad3d6d39df182007e6181b pristine_git_object: b710cc1f394e04ecc93c9fc6daddddec366254ad + docs/models/requiresconfirmation.md: + id: 68573b1b41ed + last_write_checksum: sha1:2d0a6d67c74253551cccf3015d599b9557ba5ad1 + pristine_git_object: e7f1e4a653cd7dc5d7f9d9ee4a8661867bea3368 docs/models/resetinvocationbody.md: id: 4063ca65ac51 last_write_checksum: sha1:94c7cd498cba13d4da784c4be76ddbb5b1b64cd9 @@ -2392,8 +2471,8 @@ trackedFiles: pristine_git_object: 4166bef5ded04c323f5644b80305ed5bb4159fb4 docs/models/scheduledefinition.md: id: 5a795fa1c041 - last_write_checksum: sha1:cbe6e2f2ebaf6bb52be56ffbca6b9d966fdbc2e3 - pristine_git_object: 7d0509f6263ae04d3eb99b65cef0b85adf71aeae + last_write_checksum: sha1:75666aa609a516ed239cfc0f76d8e87df9ebcb5b + pristine_git_object: 93c587409c628018888caa634db7117d86f56c37 docs/models/scheduledefinitionoutput.md: id: e5f8d9d43716 last_write_checksum: sha1:a41e2d99be8b57984e9db632fb17af0212b51e60 @@ -2442,6 +2521,18 @@ trackedFiles: id: e7cb0de862bc last_write_checksum: sha1:d8e860c666fe6b152d3944e9182e90be539c3ce2 pristine_git_object: 9474c1109d62fc5f7ff0bae32d386d54951d7fa2 + docs/models/searchindexresponse.md: + id: 37a2b2687f02 + last_write_checksum: sha1:63e0d70206fe3096911694cabaf293c6fac62ab9 + pristine_git_object: 452d8a08c731fff95b91a13a9a350da3e53ebae2 + docs/models/searchindexresponseindex.md: + id: 328fcf6e4d24 + last_write_checksum: sha1:2665208de61f9db51eff5018a2a987d2dcc23b9b + pristine_git_object: 3093f4d48f8e527a37a7875bf91356ebaa6cc0b3 + docs/models/searchindexresponsestatus.md: + id: 78dbf9d2a629 + last_write_checksum: sha1:794e6f89be8778c11490fa69bdca3925819e4862 + pristine_git_object: c2200101050e96907f3b4b0d4ea8128ba36328d1 docs/models/security.md: id: 452e4d4eb67a last_write_checksum: sha1:45b7b8881a6560a468153662d61b99605a492edf @@ -2452,16 +2543,16 @@ trackedFiles: pristine_git_object: d471b7c3c6700146dc02e20d3aa6205a5025d134 docs/models/sharing.md: id: 9f1e88417a87 - last_write_checksum: sha1:876fd514d08a6987646bf0fec636bf3fef89155b - pristine_git_object: fc718632594e04c682c6d6a3931a94d8b1fd4059 + last_write_checksum: sha1:723c9e8222979149c54d86e1f5bb2c07b5d2963a + pristine_git_object: 922506d31484d7ff3dbd24a696191452222054df docs/models/sharingdelete.md: id: 165cac179416 - last_write_checksum: sha1:1a0b3c95f4b56173510e234d7a76df85c593f360 - pristine_git_object: 1dcec0950c7fcd264ea9369c24244b54ba2bcfbf + last_write_checksum: sha1:ea12c9bfd1f065b9afd882d067d6b50f673c34ae + pristine_git_object: e6e0732bbb1b31e53ea7c4ccd4dad3aa80ccbc19 docs/models/sharingrequest.md: id: cd53ce3913a5 - last_write_checksum: sha1:380d0621a0a8ec9cd4be2b53a6e326b8c9c3d201 - pristine_git_object: 21b8ec1f74c1f903aa087cd3b4d13918c0ea9dad + last_write_checksum: sha1:90a59e17eba146ddc5ccceedc76b65df8235ee31 + pristine_git_object: e92318f812f8fbe66f9a258b68daa38cd1819bbf docs/models/signaldefinition.md: id: 4627d2840cb7 last_write_checksum: sha1:3606a41b67a27350c22aa2bf234d8a8696b23404 @@ -2486,6 +2577,10 @@ trackedFiles: id: 38c985ca6ede last_write_checksum: sha1:f82ac07d517e89bfa8044eebff6f9f7aa56f6c77 pristine_git_object: f65d7924388b842863deddb0e52d4376f2e28925 + docs/models/skipconfirmation.md: + id: 1bf623cd7bb3 + last_write_checksum: sha1:e514f325543c209b0d86b9a445f2c8696f171cfd + pristine_git_object: 48eade7acba08e0189f7405636d67dd0284b8ab6 docs/models/source.md: id: 6541ef7b41e7 last_write_checksum: sha1:00d43797d0155945ec39d4aff068a3ac7bad5ad5 @@ -2710,6 +2805,10 @@ trackedFiles: id: 0c47c08eaa46 last_write_checksum: sha1:1af09b39f042e21e47ac09f73301ca9bbb521029 pristine_git_object: 8d385132baca782d1a7ec0d586136a29751f6ec8 + docs/models/toolexecutionconfiguration.md: + id: 24c733cfd29b + last_write_checksum: sha1:41b2d1a96b02852ee366092e9d78194370ed0881 + pristine_git_object: 04981b892381cddd436a5392569a22e2f089b1bf docs/models/toolexecutiondeltaevent.md: id: f2fc876ef7c6 last_write_checksum: sha1:ae1462a9b5cb56002b41f477ce262cb64ccf2f4e @@ -2758,6 +2857,10 @@ trackedFiles: id: f0522d2d3c93 last_write_checksum: sha1:783769c0200baa1b6751327aa3e009fa83da72ee pristine_git_object: 5c76091fbd2c8e0d768921fab19c7b761df73411 + docs/models/toolproperties.md: + id: 02fc3247a741 + last_write_checksum: sha1:9e9d42579412eecb812839ce507788c80ce17533 + pristine_git_object: d85fd8214553575469384250e546e766c9c9aa9c docs/models/toolreferencechunk.md: id: 10414b39b7b3 last_write_checksum: sha1:ea3bdfc83177c6b7183ad51fddb2d15aee0f0729 @@ -2872,8 +2975,8 @@ trackedFiles: pristine_git_object: 8cf62617303949d2633773af0268447befb04af2 docs/models/updatedocumentrequest.md: id: ee4e094a6aa7 - last_write_checksum: sha1:09171d42fdac0060276af58c5f036cb5714709d3 - pristine_git_object: dd06dd4b43b72ee73faf0bb2d39edf22889c0780 + last_write_checksum: sha1:33a21ce8b03db36d05ec02f7f3fdc5d5ab95f344 + pristine_git_object: 5a3c93afc4a894134e45c2b333b23d6c3a30207b docs/models/updateinvocationbody.md: id: d8b3b9cca5ae last_write_checksum: sha1:0fed6d77626ec76d3584e8d38b97ee228218a390 @@ -2910,6 +3013,10 @@ trackedFiles: id: fef8641b24c8 last_write_checksum: sha1:4c9532d96f40fc0b406e3c8e34b40d2b457963bf pristine_git_object: c675adeffe4da132426b8002b45d4c290bdd97bc + docs/models/updateschedulev1workflowsschedulesscheduleidpatchrequest.md: + id: 0146d71cfe07 + last_write_checksum: sha1:944b765fd6ed75e9939cf93cc3947d130cd55f91 + pristine_git_object: 68ffe15a622ad79f1581a52624efffb33fc0d5ba docs/models/updatevoicev1audiovoicesvoiceidpatchrequest.md: id: 0b7dfc68573f last_write_checksum: sha1:53d5d07d53d184d68b57185d251c8d68ff3cf4d4 @@ -2950,6 +3057,14 @@ trackedFiles: id: 304bdf06ef8b last_write_checksum: sha1:1f297f34069668f6107f2c0389606efe413ff5a8 pristine_git_object: 5bcea5b5d12e72222720af2c014d64ec4bdfee4a + docs/models/vespaschemaresponse.md: + id: 989810d8633d + last_write_checksum: sha1:96ff3c52987ca630d03822936dfa792f928473c4 + pristine_git_object: 1cb7277be00681b0f1fbe6bc2e83317242d56152 + docs/models/vespasearchindexinforesponse.md: + id: 4e902564cfe0 + last_write_checksum: sha1:8744908c4282bb2be98b8eb3ac92a86d10587f7c + pristine_git_object: 16272fce2395ef0834eabb12fdb661fb72ca7d2e docs/models/visibility.md: id: 69ecc096de1e last_write_checksum: sha1:30226db515dbfeef9316552cf871cf6882f597d2 @@ -3150,6 +3265,10 @@ trackedFiles: id: ef0b813976ad last_write_checksum: sha1:2da7d2a8519fe915554fdcebc25915ad11fbb203 pristine_git_object: 96d7ced717099cc1bbff4ac38d60e7552e9c6204 + docs/models/workflowscheduleupdaterequest.md: + id: 0eed547c9a4b + last_write_checksum: sha1:d71e300642a6ef23687318f53c8fe32b38320a0f + pristine_git_object: 24357f65c73cc9ace2a51eb549434c40333dea9c docs/models/workflowtaskfailedattributes.md: id: 7f329c44d7fb last_write_checksum: sha1:432c70ec990e81e2de79c14efbbb6161b60e1b3e @@ -3188,8 +3307,8 @@ trackedFiles: pristine_git_object: daa637fafd39b03b9d6c0b627047be1142f060cc docs/sdks/accesses/README.md: id: 2ea167c2eff2 - last_write_checksum: sha1:663516c8c94ca324b938a5d5bd1196663cb1de88 - pristine_git_object: 51051e2f8def9bfd6032617530ba9bead989404f + last_write_checksum: sha1:c9daf160ffc706a9be9e2e86855d97227fc25373 + pristine_git_object: 3acf0566daa202fbc8c3c182ff9405d9812a38bd docs/sdks/agents/README.md: id: 5965d8232fd8 last_write_checksum: sha1:962df50ddc8aa1f501ad596313ee590ba704ff8a @@ -3220,8 +3339,8 @@ trackedFiles: pristine_git_object: dc0f4984380b5b137266421e87a1505af5260e89 docs/sdks/connectors/README.md: id: 7633a87d946d - last_write_checksum: sha1:f4c8a2ee577cae1b8b1e9551bb873bf34fe0f403 - pristine_git_object: 753c1cf3974ff3be77dc3b401d27ec5c0ef8bced + last_write_checksum: sha1:0cc9eb9edd5c4719a9698379ae7a2a60a28d7e77 + pristine_git_object: 7e5f68600807120d7da420c937c5bacc0651e2b9 docs/sdks/conversations/README.md: id: e22a9d2c5424 last_write_checksum: sha1:d0a4e55b1f1c9acc6e9b7cf5925faf930a911d26 @@ -3236,8 +3355,8 @@ trackedFiles: pristine_git_object: 941b5538a57b3b693914d6b0d2acad2e8bb47611 docs/sdks/documents/README.md: id: 9758e88a0a9d - last_write_checksum: sha1:c3ee7c987ddaa856fa0a2f1040a2592edb0b82f1 - pristine_git_object: 2efbc3488ec4b4b6bc5d30d9ae1b5a344a0fe79b + last_write_checksum: sha1:57b97c82e4a26a51efa5fdf1995f8f55b6947f78 + pristine_git_object: 2a4787d0bb340be626208900ab7d72c2232792eb docs/sdks/embeddings/README.md: id: 15b5b04486c1 last_write_checksum: sha1:4a279bf9bcd84a9878ef979c78b8b75af3d52f02 @@ -3276,8 +3395,8 @@ trackedFiles: pristine_git_object: 34d167398ac81ce78d50c1498c01f4c74917ce7f docs/sdks/libraries/README.md: id: df9a982905a3 - last_write_checksum: sha1:3cd3aef0294fb5b421a2b64baa7a53cfc1ad4f31 - pristine_git_object: 08606189680228ca4f4d30b6fc626c2d0c4b9287 + last_write_checksum: sha1:7c243957505398930a10aa0348f299c9c5724a78 + pristine_git_object: 863cb9f410ff082cd09bb04bc52b0e2628804289 docs/sdks/metrics/README.md: id: a8545d964e21 last_write_checksum: sha1:0c559bd570e162c994c6125058f3712e24bc576b @@ -3300,8 +3419,12 @@ trackedFiles: pristine_git_object: 7ed914205115222f7ade5a656541af0dba64ff28 docs/sdks/schedules/README.md: id: 2f28c809a225 - last_write_checksum: sha1:cb4f7d988d25d87b8c18443c6cf64b5cb31146df - pristine_git_object: 7bf59931141869fc2797586fb6cdcb8adb9f0b7b + last_write_checksum: sha1:e2c16182a3abfc1a650ded0ed2ca1eb45f5266b4 + pristine_git_object: 6c6f96d04950e0e685aace8ccbfaf0e3133bfbd5 + docs/sdks/searchindexes/README.md: + id: b58e7a6ab4f1 + last_write_checksum: sha1:4409b7020f1e14be1ae993fb7b6c56321bcab760 + pristine_git_object: 85145507d1d2ff2186f45fdfe8db5e990e85ace0 docs/sdks/speech/README.md: id: d5924688d48c last_write_checksum: sha1:7128863f5b445f343d4fde121c78de3a8ee4cc11 @@ -3348,12 +3471,12 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:6b2772cd63b60cddf4ea95d94cfc44f81a878a73 - pristine_git_object: 9f9ae8c6224af17b3e22410b33f5a5ad37389e33 + last_write_checksum: sha1:b60d9f81024f0a37e4137751a7e7e9e323f2b9b8 + pristine_git_object: d4969426e57c58605d8874bcb7418d7eecdd9dd7 src/mistralai/client/accesses.py: id: 76fc53bfcf59 - last_write_checksum: sha1:de197fbbfea8bc95f44b4e7ee1b39e68fdde8bc7 - pristine_git_object: 5d859a399cb62144f5e47ae879407907427d56fc + last_write_checksum: sha1:7218f70e8997da6ddebd72c5d9cc4ddc1340ed82 + pristine_git_object: e5e799b756846d6b4e44d75de33c25eaae4a525d src/mistralai/client/agents.py: id: e946546e3eaa last_write_checksum: sha1:02f7e2c669dba9f1d29f41bc6427357e9d04be5c @@ -3400,8 +3523,8 @@ trackedFiles: pristine_git_object: ddb2d0b1abaff5f267320779bf9ae64d5ae0adf3 src/mistralai/client/connectors.py: id: 39da03126050 - last_write_checksum: sha1:16a6fe8ffbf14828b1b930d7dda7a001d4780ea4 - pristine_git_object: 793c9f8ae726f86fc82de044e8a09b6931bb2592 + last_write_checksum: sha1:5a60b64832e18d123f260a6fdd087861bf1bab1c + pristine_git_object: f6558efa73e58d7f15f9645b5e62980543c738de src/mistralai/client/conversations.py: id: 40692a878064 last_write_checksum: sha1:501da7474cc0bc6fd627150f15870dd3acf70235 @@ -3416,8 +3539,8 @@ trackedFiles: pristine_git_object: 26e9c5658068de85878942b444538e0e58f706f5 src/mistralai/client/documents.py: id: bcc17286c31c - last_write_checksum: sha1:27beb1104b009c5237d37f11e11b589fadf3838b - pristine_git_object: 2a555d3e3d34afe673de231bd1fcadb8fc36b59b + last_write_checksum: sha1:8de44de3ed607d8cead27df6cd4f2c3bf62cac32 + pristine_git_object: ff38aca6993ae6fc036449beb0f18d9e30f05a5e src/mistralai/client/embeddings.py: id: f9c17258207e last_write_checksum: sha1:737e09a794867ea7242fb7c9e09cdff5f837fbf4 @@ -3492,16 +3615,16 @@ trackedFiles: pristine_git_object: 52c8899eb8c8ec092be454aca929012a62fec337 src/mistralai/client/libraries.py: id: d43a5f78045f - last_write_checksum: sha1:db5cab2f824979cfe953e31f465c30fa322a4cff - pristine_git_object: 928c1ea8a79f1f838a6ea4c7a23826f5bdb82445 + last_write_checksum: sha1:71df640103e4ecba34bb30cce08864cdd779cfe1 + pristine_git_object: cded7a3669cebd8d959aaf6e19b23eee1d6e2e93 src/mistralai/client/metrics.py: id: 937cb03f8130 last_write_checksum: sha1:491be33059fb0bbccff73b2a3bb0a66fb7a5ba9b pristine_git_object: 60597c40f00705b4758827fb7d119f33ae2ad1b9 src/mistralai/client/models/__init__.py: id: e0e8dad92725 - last_write_checksum: sha1:c072eedd54264d94cc39317fd40433adf40f6fa9 - pristine_git_object: ab36240c66a1da2d58318b7155af6a803e2e1e13 + last_write_checksum: sha1:8d7e3da831c7bd680f9997ede61aacf5de5233d2 + pristine_git_object: 0f58dab1c5570657995e30caf94c6a689fefbf70 src/mistralai/client/models/activitytaskcompletedattributesresponse.py: id: 8174941767cc last_write_checksum: sha1:b5246e203765ba0532a6a65d391bdd237ab2c891 @@ -3696,8 +3819,8 @@ trackedFiles: pristine_git_object: fb8b79723f3f0f4485c0c6bb1c52b0a5db2fa1fe src/mistralai/client/models/authenticationconfiguration.py: id: 97b5056c29fb - last_write_checksum: sha1:95b12ce07e5656f40d1fcf4566af5336f5279cf3 - pristine_git_object: 84f665915ad716ce97cd9219f59ffa9cefc68bbd + last_write_checksum: sha1:e8465381456454f427238fc42a60305b3e5f55d9 + pristine_git_object: 79c6964176ebff18657b02abd16985737e6eef35 src/mistralai/client/models/authurlresponse.py: id: a2b468c87a8a last_write_checksum: sha1:8ffc0c770c51d7b0cb49770e6829486d0cb82741 @@ -3882,6 +4005,18 @@ trackedFiles: id: 1a4facac922d last_write_checksum: sha1:dc5989fda6b4a5f49e2e5febae8ebf8ddfc5b33a pristine_git_object: 9d8b600032db4f260a96140433bce3f7e4c21f3a + src/mistralai/client/models/connector_activate_for_organization_v1op.py: + id: 9b35397dd5cc + last_write_checksum: sha1:310d5c74ef6b89e604e94bec61efa51f853e7c88 + pristine_git_object: 1b0ec3b0bda16c406d70a8a8e97cbb92ee427f51 + src/mistralai/client/models/connector_activate_for_user_v1op.py: + id: 6bf45c78cfea + last_write_checksum: sha1:a821db048f3e675f4593d0355c1e361c49311e42 + pristine_git_object: e30126d48d593fc5c240fd58b98fbf6aba314caf + src/mistralai/client/models/connector_activate_for_workspace_v1op.py: + id: b6392712ddaf + last_write_checksum: sha1:b361b01a898a446d2ed9a953c8cfc95812341a9e + pristine_git_object: 00fe6699d18db79d9943dc55775eb337b3ad2846 src/mistralai/client/models/connector_call_tool_v1op.py: id: 7948899b3068 last_write_checksum: sha1:c4388ac1594641c36f97daaedcf42b0e94753be7 @@ -3898,6 +4033,18 @@ trackedFiles: id: 7795b085704b last_write_checksum: sha1:70bffd65c359d4c295b0f4a419d5a783d50e03ea pristine_git_object: 43b3c1dc6576d9d9260a220097f52b51029e205a + src/mistralai/client/models/connector_deactivate_for_organization_v1op.py: + id: 850bece829b0 + last_write_checksum: sha1:b9dc305c9bc09d5979d650b5734d86eb416e23fd + pristine_git_object: 4c5c5458e79a3fcabf1b608895364e5aee21a536 + src/mistralai/client/models/connector_deactivate_for_user_v1op.py: + id: 1df4227a54f7 + last_write_checksum: sha1:8d2b440ae4983f8b43b9dd7fed5c97a5cd9c17a5 + pristine_git_object: 5d998877241cc05f2e67e6b28b8a349f18d866ef + src/mistralai/client/models/connector_deactivate_for_workspace_v1op.py: + id: d82c1a5321cc + last_write_checksum: sha1:5edfc695ffd5acfc57f2a08af655b609ffbdb05d + pristine_git_object: 9f02d887f7be47f64fdbb0d00f7e2d3be2f23517 src/mistralai/client/models/connector_delete_organization_credentials_v1op.py: id: aab3a70dbbc5 last_write_checksum: sha1:a53123b18f8dd5a33e777741ab44aac0d5ed64ee @@ -3924,8 +4071,8 @@ trackedFiles: pristine_git_object: e0c4146d4621eec51f6961f85de95088e7480c08 src/mistralai/client/models/connector_get_v1op.py: id: 73ca3a446dcc - last_write_checksum: sha1:74ce85c377be5d7f86506d8a8d97249708c246b8 - pristine_git_object: 780afac9281bf78c4263c7bd32faa04a718695d2 + last_write_checksum: sha1:65a583017e1042e7eacfb4115b3f7c22b1b52090 + pristine_git_object: aed640198aec34e7ef96c5937587bae34e8f5067 src/mistralai/client/models/connector_list_organization_credentials_v1op.py: id: a52ee058feab last_write_checksum: sha1:2abf099d7a6ea68134d38c3a95dfec08d37e9ed9 @@ -3960,8 +4107,8 @@ trackedFiles: pristine_git_object: 85366bb6acaa0724a907803c689a2caeb431bf7b src/mistralai/client/models/connectorsqueryfilters.py: id: 3b9fc81aa726 - last_write_checksum: sha1:399567eb362a40f1225f7d8adb820aabc6b9df99 - pristine_git_object: f10d689771d50077bc35193a39a94672a9f09ac2 + last_write_checksum: sha1:ab7df6cf281f7bea870663783924d113309348fa + pristine_git_object: 860caf43e0a61363933058d72819e03f4be86477 src/mistralai/client/models/connectortool.py: id: 41ca596b44f8 last_write_checksum: sha1:0306b9a607d59afe042aac018df6e2bc0cff0d8a @@ -3982,6 +4129,10 @@ trackedFiles: id: 86730e16aa67 last_write_checksum: sha1:fae6e84b040a1c8bcb25b94041f990525529472a pristine_git_object: 8c92f2f8d4c25eac7f3c95e0ae425942829390d0 + src/mistralai/client/models/consumertype.py: + id: d18230da2fdd + last_write_checksum: sha1:4fc648452051b1dc9ef496b54e75d18396807158 + pristine_git_object: ac091e5e905d0985ce7286389f46c308c53ebb82 src/mistralai/client/models/contentchunk.py: id: c007f5ee0325 last_write_checksum: sha1:b921b03b4c1e300b0e3f51ea9eadd4d7c4b7a0ea @@ -4092,8 +4243,20 @@ trackedFiles: pristine_git_object: 7c30aa5ffde4e23ce9ebcb0d67a0e1a3c875c698 src/mistralai/client/models/createlibraryrequest.py: id: 1c489bec2f53 - last_write_checksum: sha1:0d98f058dc61560790d2bde49026dd631845218b - pristine_git_object: e0357e9252a4911292e5dce370c808350b6da0ec + last_write_checksum: sha1:ebee21e3ac561b490513d6ebcb79efea070e1597 + pristine_git_object: 2bbb1e18c3ee495db44df95e47046b6f1285e54e + src/mistralai/client/models/createsearchindexinforequest.py: + id: 3f424a7063b0 + last_write_checksum: sha1:31b4d6ac2ce77493a6e545f2ecc3c179367a24fa + pristine_git_object: a23fd2e2de11bdf3150128d44287765d2c145694 + src/mistralai/client/models/createvespaschemarequest.py: + id: d44c0c466535 + last_write_checksum: sha1:048cbca6e8aad11561e9a42a5a8b0a31f50a0ca6 + pristine_git_object: cac99bc3735d8be742a5aa12a65cf40a7ba974d3 + src/mistralai/client/models/createvespasearchindexinforequest.py: + id: "866143560866" + last_write_checksum: sha1:553b15776ecaf0d3a58f0c99459429f60a51215e + pristine_git_object: 50006d38bb822c1cb5eb90ed8e8f577184dc2cc2 src/mistralai/client/models/credentialscreateorupdate.py: id: 9927546f2487 last_write_checksum: sha1:e31d3c7fc19e2a7fb49d07cb6f85c5ea73aabb98 @@ -4236,8 +4399,8 @@ trackedFiles: pristine_git_object: 2955dc485bbf1017a728cb0562baf948083e1b13 src/mistralai/client/models/document.py: id: fbbf7428328c - last_write_checksum: sha1:bc290f10562aaf9c24bd14ab3d2a31e62f535042 - pristine_git_object: 8d1aea883e579ff1677949573f43dddc362bd35d + last_write_checksum: sha1:3cdd40229b126132d3eb60505cd1d635325a8372 + pristine_git_object: c04512c130ee295c80548a2215b0f6bb428667bc src/mistralai/client/models/documentlibrarytool.py: id: 3eb3c218f457 last_write_checksum: sha1:a84295aba7b9e7f70b68f279934d1a5ca0817f77 @@ -4542,6 +4705,10 @@ trackedFiles: id: 60463c59ff01 last_write_checksum: sha1:a851312a3e0c91273ad444c6e2cc81c8c541c9cd pristine_git_object: d9b6758f1622c76ad41092f4dbb9c6cf392b299c + src/mistralai/client/models/get_schedule_v1_workflows_schedules_schedule_id_getop.py: + id: cb775bc63ffd + last_write_checksum: sha1:29edc18fcca86b478702fa9ab632c93e63868a11 + pristine_git_object: d22d0515070d71858367cacdca0e2b83ee2a4cc0 ? src/mistralai/client/models/get_similar_chat_completion_events_v1_observability_chat_completion_events_event_id_similar_events_getop.py : id: d651bdc06c1b last_write_checksum: sha1:25331ac322d230cb7d9fc2a6aff2d7db561fdf2f @@ -4844,8 +5011,12 @@ trackedFiles: pristine_git_object: 857dfbe60c57af8b0fa6655a049ed336d70fb941 src/mistralai/client/models/libraries_documents_list_v1op.py: id: 756f26de3cbe - last_write_checksum: sha1:565872ef17a53cc9751fa2c8fc1267dac2d01e76 - pristine_git_object: afc474cbe6c571ac36fe0800d4c1e5ffd07eb207 + last_write_checksum: sha1:3c0fc8976932ac7c537a7a0183e87a6505a84336 + pristine_git_object: 57e2736b9994d071455b95bfe349c3bef60eac87 + src/mistralai/client/models/libraries_documents_patch_v1op.py: + id: 31b2201bbfe2 + last_write_checksum: sha1:625739e50a05c7164436063994869e725ab48972 + pristine_git_object: 0ae4efaf7cc7a05f1150a266b8d10d52341ef32a src/mistralai/client/models/libraries_documents_reprocess_v1op.py: id: dbbeb02fc336 last_write_checksum: sha1:bd5013cb1581dd13642ce7edf1e701f5b0c967c4 @@ -4864,8 +5035,12 @@ trackedFiles: pristine_git_object: 7a51d6053aa2cf2e6524a80487fe9549eec3dfa1 src/mistralai/client/models/libraries_list_v1op.py: id: 2d9b1b4deeb0 - last_write_checksum: sha1:1c99dd9165c57ca19d94daf81f31c378125d280b - pristine_git_object: cac06dadbb33c7bf28b276b4c51f569a885ac44e + last_write_checksum: sha1:0c0958ecc928ba180cc265c4b0558eb62db3edb3 + pristine_git_object: 328ac72c2e09158a7e31a445370a4dc2ccc46aef + src/mistralai/client/models/libraries_patch_v1op.py: + id: 2b189be3c57a + last_write_checksum: sha1:6df3bb4ff0c163061963bbf1db9a8c239bfbaa68 + pristine_git_object: 2fbaea6755cad1b0106320a9a058fb02c48edcc6 src/mistralai/client/models/libraries_share_create_v1op.py: id: feaacfd46dd3 last_write_checksum: sha1:cdb7e60f1aceb2c7aa54fe2b9ba5dafc2bb70995 @@ -4884,8 +5059,8 @@ trackedFiles: pristine_git_object: 54b0ab708c665ccb841b1c8d0f2748c390850506 src/mistralai/client/models/library.py: id: 028a34b08f9c - last_write_checksum: sha1:82eb895302f95f3f1a1adf85070027e22ab22350 - pristine_git_object: 0e09cfaa14040397a37ac72810521fb14fe6562f + last_write_checksum: sha1:b15f423354d9f938b6f39cc8ab19095f3203d74f + pristine_git_object: 4ec8604c50da4154796b4267bb639cc4d377f6e6 src/mistralai/client/models/list_deployments_v1_workflows_deployments_getop.py: id: 0c6586ffcab0 last_write_checksum: sha1:c7d7be66560be5bb813316f958a3fecdf7813156 @@ -4962,6 +5137,10 @@ trackedFiles: id: 72a73946b20e last_write_checksum: sha1:18a2d1aeb07ed9d84a1854bb7186e5d32783cb58 pristine_git_object: 4e2ff2f6869517202f4f0c435ce4a6435c5cc571 + src/mistralai/client/models/logicalexpression.py: + id: 48d46c10b453 + last_write_checksum: sha1:7d05ab02a6adcbff569da59fbac4c3e8bc81546f + pristine_git_object: 9c3847fc6f8db40002f1fa794827c5822c7c8e02 src/mistralai/client/models/mcpservericon.py: id: a5b508a322d7 last_write_checksum: sha1:0dd9bac0684864bf6264ddded7f27c8c88b804f5 @@ -5158,6 +5337,10 @@ trackedFiles: id: d64678967bf0 last_write_checksum: sha1:693e9b575e0da721b15363db1e381d19f8766efb pristine_git_object: a60640aae96b54f7f8e7561029fda45a165007c4 + src/mistralai/client/models/partialscheduledefinition.py: + id: ce1ded792ff5 + last_write_checksum: sha1:e4f50d9cb285dade8dc732547f03908e0b1a9834 + pristine_git_object: 1120dd141a1f7ddadcf0cbe578078496c9287236 src/mistralai/client/models/pause_schedule_v1_workflows_schedules_schedule_id_pause_postop.py: id: "53799174e259" last_write_checksum: sha1:0d12062b4884937e8100490414a29842da524c5f @@ -5188,8 +5371,8 @@ trackedFiles: pristine_git_object: 614f481174e58eb7ba28cae5238b532d1d66ef9c src/mistralai/client/models/processingstatus.py: id: 28146eaecfcf - last_write_checksum: sha1:a3e3ebeae169441cf430c302c9fe278de79ce215 - pristine_git_object: 7e93308f4cf6af8f968e93f20765c41694b8fad9 + last_write_checksum: sha1:4c053b54f4e154e016b1592dfe1de70bfd3699c3 + pristine_git_object: 73308b4658b84ad4a064b3ce18fd96eaeccdd918 src/mistralai/client/models/processstatus.py: id: "0205512146e6" last_write_checksum: sha1:22ad3d5fc80fbf3f83db61512e7bc79295c5fc91 @@ -5332,8 +5515,8 @@ trackedFiles: pristine_git_object: 2cb179eb22e9ac10e820ed276187cd863fc7a440 src/mistralai/client/models/scheduledefinition.py: id: 6ea58a356f77 - last_write_checksum: sha1:a394dee8c49c4a6c6ede7e27ca256a3c376e137b - pristine_git_object: 5810229349e4b84c88458fa729b4b1bce4d761cc + last_write_checksum: sha1:4102a73a034dc19c4ea209104a5531ab4bba9b11 + pristine_git_object: 3c018552dc5b883cc92ced39d4646fc6f13a1da2 src/mistralai/client/models/scheduledefinitionoutput.py: id: 69dc15b9a0d6 last_write_checksum: sha1:4dd8612486768de992731c044cb13b4c52f4622a @@ -5378,6 +5561,10 @@ trackedFiles: id: f96acbcd45f7 last_write_checksum: sha1:539caf622ef9e7579fdc82e7986dcc3a2aedae53 pristine_git_object: 8b9b10b51fe76de43895168df11e5bbcdfc29a62 + src/mistralai/client/models/searchindexresponse.py: + id: 054688d20a3b + last_write_checksum: sha1:3b3740cfda82682cf94b5c6bb3ce3399e85e9672 + pristine_git_object: 1eebb6e706c7cebf2305869550731ae63c8c6184 src/mistralai/client/models/security.py: id: c2ca0e2a36b7 last_write_checksum: sha1:28496d4ff921e8c2186072aad170c65836a4b8f8 @@ -5388,16 +5575,16 @@ trackedFiles: pristine_git_object: 08ffeb7e46fbbc28b7c93ef2aa4a49aff7c0d35e src/mistralai/client/models/sharing.py: id: 324f5ac27249 - last_write_checksum: sha1:b67aa68e320269e0f6da9da23ed35cd1c41f2879 - pristine_git_object: efa16203021055e1f704b2fd3683eeee0a49ba07 + last_write_checksum: sha1:287adc1c670f242ce722c20bd182f6313fa2b372 + pristine_git_object: 4260f1751826195f574a6b84bfdbd4d55b0a617f src/mistralai/client/models/sharingdelete.py: id: f5ecce372e06 - last_write_checksum: sha1:f993f4cc819a14985a70a31af7896115ee80af8a - pristine_git_object: 3472a50637d4582fa8945ec70b57ed12de88b99d + last_write_checksum: sha1:87b3c6e270147260b011eb3d705f84b0fbac1938 + pristine_git_object: 67399831d1f1ff7d7173ea5bf120b114caba6a06 src/mistralai/client/models/sharingrequest.py: id: 2439b732dfae - last_write_checksum: sha1:05e36cba36203bcc579a3b02538aed570cf22352 - pristine_git_object: 7c2d435c363bcd98aba97e120954ec1357524e34 + last_write_checksum: sha1:7439e7d30b6cb676f1edfa86148e4b5e3a8065a6 + pristine_git_object: 94de31c1d2072adfc838e0684cb3573d93df6f8a src/mistralai/client/models/signal_workflow_execution_v1_workflows_executions_execution_id_signals_postop.py: id: 16c54f54e60f last_write_checksum: sha1:57437b8a9d284f7e77459c319908ad0b8db33720 @@ -5586,6 +5773,10 @@ trackedFiles: id: 69fcb691327a last_write_checksum: sha1:85bcd4a5d30aab54425bccec9c2374137fad6736 pristine_git_object: 9c55e7bb9db0be106d30b9bf37153aaf8d7b61ff + src/mistralai/client/models/toolexecutionconfiguration.py: + id: 1c9369616b21 + last_write_checksum: sha1:b802788ceb7246914638b2b26f5b053d33913306 + pristine_git_object: ce65ad31408abe1b8bbaa042b176b8555dbf8480 src/mistralai/client/models/toolexecutiondeltaevent.py: id: df8f17cf3e07 last_write_checksum: sha1:77da4c0bca920d4ea77a64faa039fb3c07df46ed @@ -5610,6 +5801,10 @@ trackedFiles: id: 15f1af161031 last_write_checksum: sha1:9557c9f6b7be4b6ac94d3316eb605e42aa8dc03c pristine_git_object: 0dc9e92f5dd27ff93d6de62a6879699ace4300a8 + src/mistralai/client/models/toolproperties.py: + id: 3a33561f76fc + last_write_checksum: sha1:b2059b8c5d6a619f4e637b2395a54a281178282b + pristine_git_object: d3bf9789b77b305a669833ba873fb70231c4c690 src/mistralai/client/models/toolreferencechunk.py: id: 822e9f3e70de last_write_checksum: sha1:2e489c4b2360741a3e4a20710361511a0d9158ea @@ -5694,6 +5889,10 @@ trackedFiles: id: 2a14ebf4ef57 last_write_checksum: sha1:dc63747af5ef650f6d5f5a99e447bebc41450e46 pristine_git_object: 6b7d24d465d34289f97aeb83dc036501883c9c7e + src/mistralai/client/models/update_schedule_v1_workflows_schedules_schedule_id_patchop.py: + id: 6aaa918af7f4 + last_write_checksum: sha1:7bb83c6f98e4314061724c7793e979a47b3f5af7 + pristine_git_object: 5e3a1be42867c2ca00f4c5103ac318dcd5909e44 src/mistralai/client/models/update_voice_v1_audio_voices_voice_id_patchop.py: id: 399da05bd75e last_write_checksum: sha1:aca7b6539571a8111e8f1abb7f90dde1e461d4bc @@ -5732,8 +5931,8 @@ trackedFiles: pristine_git_object: e878c8764774e4420a85145196cfb93c32d108fa src/mistralai/client/models/updatedocumentrequest.py: id: a8cfda07d337 - last_write_checksum: sha1:612b16cee373b0e395f51eb03b3dff70d7988148 - pristine_git_object: 5f67ea697ac8d4449c76863a8e4f42e0bd197908 + last_write_checksum: sha1:f282948c29e5ef5bdb598e02923a44c0c4215e7a + pristine_git_object: 07c6f5e36119b84fab821967d0b054572fd9d45c src/mistralai/client/models/updateinvocationbody.py: id: b8558eff0be0 last_write_checksum: sha1:ea486ca10c1165b9f3dd40c005cc98bc6b0e937f @@ -5774,6 +5973,14 @@ trackedFiles: id: 15df3c7368ab last_write_checksum: sha1:4acbbd9e47cf9b351336d552488d617270d37758 pristine_git_object: 5fe796db923badd9fb85dc4080a30496ed2b419b + src/mistralai/client/models/vespaschemaresponse.py: + id: fbab188e672e + last_write_checksum: sha1:ad669056fa9c61f0ef7f33430a643fd09a41a788 + pristine_git_object: 440967d1aa77338d7526df06a7322d07fcfaf45d + src/mistralai/client/models/vespasearchindexinforesponse.py: + id: ee7484f75a7c + last_write_checksum: sha1:08714193f3bca9099c051dc3799e04fef2a03b52 + pristine_git_object: a3cce35408346525219693f6b19ae706b20fd743 src/mistralai/client/models/voicecreaterequest.py: id: 9a1752117dec last_write_checksum: sha1:6ddd5af32737a8b0597f3fff476f151dbd039e50 @@ -5966,6 +6173,10 @@ trackedFiles: id: c77172c4a9f6 last_write_checksum: sha1:dd347319557279367f8ccde9158dec6c4586f528 pristine_git_object: d74ba1dae81bccffa812df2a64babad0a61af787 + src/mistralai/client/models/workflowscheduleupdaterequest.py: + id: 72ca0f5e6c08 + last_write_checksum: sha1:ad25f903339edb6d9d018ba280a39789b81ffb28 + pristine_git_object: b43dc96f32704b4821936189a3f6a8bdcbd77799 src/mistralai/client/models/workflowtaskfailedattributes.py: id: c4c09c4d5ea7 last_write_checksum: sha1:b1faee3ed43b88829ca68f5cd642f24d8f1fe9f5 @@ -6020,8 +6231,8 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 src/mistralai/client/rag.py: id: 2c2b641de1b6 - last_write_checksum: sha1:d27e705578c277540b90b6a84a4669580170c64e - pristine_git_object: 091b02705ce1bd11ea3dc3602a1ebf8e29815495 + last_write_checksum: sha1:77d6bd45daba9879a753768896dac249eb645996 + pristine_git_object: 934b2374571b475a573d38e59c8fdf40aa5ba3b8 src/mistralai/client/records.py: id: 10f90c990bd8 last_write_checksum: sha1:3b54fb25751ef4d12a8263bc6f29999a42ac4f61 @@ -6032,8 +6243,8 @@ trackedFiles: pristine_git_object: d1a242fb2bd517b27656e2f60eef07421418cb6e src/mistralai/client/schedules.py: id: d3b4fe452390 - last_write_checksum: sha1:946fac6872a9994efbea349a91c0fd14485859b0 - pristine_git_object: 9b013acdc092797cd78e9be3f50666f4a8203fd9 + last_write_checksum: sha1:6c79449a4388272aeb01b801eb7dd0d1c40341a3 + pristine_git_object: 3eb7d3262b648033b6775a27a28e078315a24baf src/mistralai/client/sdk.py: id: 48edbcb38d7e last_write_checksum: sha1:a606046063cd946633918efa1662846c987c9b7e @@ -6042,6 +6253,10 @@ trackedFiles: id: b7dd68a0235e last_write_checksum: sha1:c6944f12c6fdc992d43db943b24c8c90854cde5e pristine_git_object: 712e92e05c7fd3016431ec62ecb7b7789c8b7071 + src/mistralai/client/search_indexes.py: + id: c5a0a7df993a + last_write_checksum: sha1:b68d2f2babafdf3d553fbd1b7b336ea32d7c00c5 + pristine_git_object: a4e9887d99113f4200021b60f0b58a6324e13227 src/mistralai/client/speech.py: id: 5c1f1109aa5e last_write_checksum: sha1:3cbd55d0df062a0de6e93c32816dd6e805018150 @@ -8576,7 +8791,7 @@ examples: fetch_default: false responses: "200": - application/json: {"credentials": [{"name": "", "authentication_type": "oauth2", "is_default": false}]} + application/json: {"credentials": [{"name": "", "authentication_type": "oauth2", "scope": "workspace", "is_default": false}]} "422": application/json: {} connector_create_or_update_organization_credentials_v1: @@ -8714,16 +8929,129 @@ examples: responses: "422": application/json: {} + libraries_patch_v1: + speakeasy-default-libraries-patch-v1: + parameters: + path: + library_id: "74a30b7a-ba52-49f7-a8a3-7157e1adf565" + requestBody: + application/json: {} + responses: + "200": + application/json: {"id": "29be96b0-9e62-49f2-ad68-ea214dda839a", "name": "", "created_at": "2025-01-03T19:54:12.078Z", "updated_at": "2025-08-14T09:50:03.685Z", "owner_id": "5d60a792-57b9-45a8-9099-d3a656c15c5e", "owner_type": "", "total_size": 102530, "nb_documents": 298019, "chunk_size": 87858} + "422": + application/json: {} + libraries_documents_patch_v1: + speakeasy-default-libraries-documents-patch-v1: + parameters: + path: + library_id: "2a41249e-52ca-4436-b755-25ce3a9bfb53" + document_id: "bc26fa54-e5d9-4269-bedf-86bed5471c7d" + requestBody: + application/json: {} + responses: + "200": + application/json: {"id": "765f96ad-ca4d-443c-8614-0787ad1baedc", "library_id": "3ef9de21-c727-4a66-8495-9174b23092a7", "hash": "", "mime_type": "", "extension": null, "size": 756040, "name": "", "created_at": "2026-06-24T13:02:34.703Z", "process_status": "noop", "uploaded_by_id": "7048d94f-55be-4b1f-ab73-3f0f5a005ed9", "uploaded_by_type": "", "processing_status": "", "tokens_processing_total": 943369} + "422": + application/json: {} + connector_activate_for_organization_v1: + speakeasy-default-connector-activate-for-organization-v1: + parameters: + path: + connector_id: "a91bb4ec-caab-4cf2-be03-84b8343f4643" + responses: + "200": + application/json: {"message": ""} + "422": + application/json: {} + connector_deactivate_for_organization_v1: + speakeasy-default-connector-deactivate-for-organization-v1: + parameters: + path: + connector_id: "8f4c1089-2a37-44b3-a3c4-830ca7a0e439" + responses: + "200": + application/json: {"message": ""} + "422": + application/json: {} + connector_activate_for_workspace_v1: + speakeasy-default-connector-activate-for-workspace-v1: + parameters: + path: + connector_id: "2adfa8af-3618-41a9-8980-e5ea1486e58e" + responses: + "200": + application/json: {"message": ""} + "422": + application/json: {} + connector_deactivate_for_workspace_v1: + speakeasy-default-connector-deactivate-for-workspace-v1: + parameters: + path: + connector_id: "15b00e98-a9e7-4582-b0fc-87d28c3dac04" + responses: + "200": + application/json: {"message": ""} + "422": + application/json: {} + connector_activate_for_user_v1: + speakeasy-default-connector-activate-for-user-v1: + parameters: + path: + connector_id: "cd4fb4d2-de68-451f-8f2a-57fe39b33d96" + responses: + "200": + application/json: {"message": ""} + "422": + application/json: {} + connector_deactivate_for_user_v1: + speakeasy-default-connector-deactivate-for-user-v1: + parameters: + path: + connector_id: "99c6ed86-e6bb-40ed-b6ee-d22ba791a68f" + responses: + "200": + application/json: {"message": ""} + "422": + application/json: {} + get_search_indexes_v1_rag_search_index_get: + speakeasy-default-get-search-indexes-v1-rag-search-index-get: + responses: + "200": + application/json: [{"id": "07d38908-4a10-4d0f-96d0-001229ae40a6", "creator_id": "", "document_count": 47250, "status": "online", "created_at": "2025-05-05T18:06:12.781Z", "modified_at": "2024-11-11T19:44:30.545Z", "index": {"type": "vespa", "k8s_cluster": "", "k8s_namespace": "", "vespa_instance_name": "", "schemas": []}}] + register_search_index_v1_rag_search_index_put: + speakeasy-default-register-search-index-v1-rag-search-index-put: + requestBody: + application/json: {"status": "offline", "index": {"type": "vespa", "k8s_cluster": "", "k8s_namespace": "", "vespa_instance_name": "", "schemas": []}} + responses: + "200": + application/json: {"id": "aeab57c4-7bc2-4d90-b739-da6d58fffa60", "creator_id": "", "document_count": 577632, "status": "offline", "created_at": "2024-12-18T16:38:29.006Z", "modified_at": "2025-12-02T12:13:54.773Z", "index": {"type": "vespa", "k8s_cluster": "", "k8s_namespace": "", "vespa_instance_name": "", "schemas": [{"name": "", "document_count": 745815}]}} + "422": + application/json: {} + get_schedule_v1_workflows_schedules__schedule_id__get: + speakeasy-default-get-schedule-v1-workflows-schedules-schedule-id-get: + parameters: + path: + schedule_id: "" + responses: + "200": + application/json: {"input": "", "schedule_id": "", "workflow_name": "", "paused": false} + "422": + application/json: {} + update_schedule_v1_workflows_schedules__schedule_id__patch: + speakeasy-default-update-schedule-v1-workflows-schedules-schedule-id-patch: + parameters: + path: + schedule_id: "" + requestBody: + application/json: {"schedule": {}} + responses: + "200": + application/json: {"schedule_id": ""} + "422": + application/json: {} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: | - ## Python SDK Changes: - * `mistral.workflows.executions.stream()`: `response.[].data.data.union(CustomTaskInProgressResponse).attributes.payload` **Changed** (Breaking ⚠️) - * `mistral.workflows.events.get_stream_events()`: `response.[].data.data` **Changed** (Breaking ⚠️) - * `mistral.workflows.events.get_workflow_events()`: `response.events[]` **Changed** (Breaking ⚠️) - * `mistral.events.get_stream_events()`: `response.[].data.data.union(CustomTaskInProgressResponse).attributes.payload` **Changed** (Breaking ⚠️) - * `mistral.events.get_workflow_events()`: `response.events[]` **Changed** (Breaking ⚠️) - * `mistral.beta.connectors.get_authentication_methods()`: `response.[].has_default_credentials` **Added** generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index a246d5a7..ff877688 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.4.5 + version: 2.4.6 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index aa443ef1..f85e9d8b 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -16,8 +16,8 @@ sources: - speakeasy-sdk-regen-1773084660 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:6b325264f8e8a60caa875776438b07d4eb5b56283da0796b283e9c5597810e22 - sourceBlobDigest: sha256:11d21b003c903f5539d5d7a79cf8fe17d1d284b48e47da0009eac3866ad58899 + sourceRevisionDigest: sha256:12afca2d0478a935106f607242264d76f9dc7eb1e61df81bf001cff6c4783e0c + sourceBlobDigest: sha256:27cafa52ca6e89b28a669dd472ff60abf3e5c21194ad262e53f19503dc22168e tags: - latest targets: @@ -38,10 +38,10 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:6b325264f8e8a60caa875776438b07d4eb5b56283da0796b283e9c5597810e22 - sourceBlobDigest: sha256:11d21b003c903f5539d5d7a79cf8fe17d1d284b48e47da0009eac3866ad58899 + sourceRevisionDigest: sha256:12afca2d0478a935106f607242264d76f9dc7eb1e61df81bf001cff6c4783e0c + sourceBlobDigest: sha256:27cafa52ca6e89b28a669dd472ff60abf3e5c21194ad262e53f19503dc22168e codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:95c443855a95966259bd108beec0cbdb8238f6f753dc4b021bf833d398e86c0c + codeSamplesRevisionDigest: sha256:3491eaa84993dc4bfae4d71248104f4053751a84c3573ee7dbaf095f2235c3a2 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.761.1 diff --git a/README-PYPI.md b/README-PYPI.md index 67cd2cbe..9a60e5ec 100644 --- a/README-PYPI.md +++ b/README-PYPI.md @@ -513,6 +513,12 @@ print(res.choices[0].message.content) * [create](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#create) - Create a new connector. * [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#list) - List all connectors. * [get_auth_url](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#get_auth_url) - Get the auth URL for a connector. +* [activate_for_organization](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#activate_for_organization) - Activate a connector for an organization. +* [deactivate_for_organization](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#deactivate_for_organization) - Deactivate a connector for an organization. +* [activate_for_workspace](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#activate_for_workspace) - Activate a connector for a workspace. +* [deactivate_for_workspace](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#deactivate_for_workspace) - Deactivate a connector for a workspace. +* [activate_for_user](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#activate_for_user) - Activate a connector for the current user. +* [deactivate_for_user](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#deactivate_for_user) - Deactivate a connector for the current user. * [call_tool](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#call_tool) - Call Connector Tool * [list_tools](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#list_tools) - List tools for a connector. * [get_authentication_methods](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#get_authentication_methods) - Get authentication methods for a connector. @@ -550,6 +556,7 @@ print(res.choices[0].message.content) * [get](https://github.com/mistralai/client-python/blob/main/docs/sdks/libraries/README.md#get) - Detailed information about a specific Library. * [delete](https://github.com/mistralai/client-python/blob/main/docs/sdks/libraries/README.md#delete) - Delete a library and all of it's document. * [update](https://github.com/mistralai/client-python/blob/main/docs/sdks/libraries/README.md#update) - Update a library. +* [~~libraries_update_v1~~](https://github.com/mistralai/client-python/blob/main/docs/sdks/libraries/README.md#libraries_update_v1) - Update a library. :warning: **Deprecated** #### [Beta.Libraries.Accesses](https://github.com/mistralai/client-python/blob/main/docs/sdks/accesses/README.md) @@ -563,6 +570,7 @@ print(res.choices[0].message.content) * [upload](https://github.com/mistralai/client-python/blob/main/docs/sdks/documents/README.md#upload) - Upload a new document. * [get](https://github.com/mistralai/client-python/blob/main/docs/sdks/documents/README.md#get) - Retrieve the metadata of a specific document. * [update](https://github.com/mistralai/client-python/blob/main/docs/sdks/documents/README.md#update) - Update the metadata of a specific document. +* [~~libraries_documents_update_v1~~](https://github.com/mistralai/client-python/blob/main/docs/sdks/documents/README.md#libraries_documents_update_v1) - Update the metadata of a specific document. :warning: **Deprecated** * [delete](https://github.com/mistralai/client-python/blob/main/docs/sdks/documents/README.md#delete) - Delete a document. * [text_content](https://github.com/mistralai/client-python/blob/main/docs/sdks/documents/README.md#text_content) - Retrieve the text content of a specific document. * [status](https://github.com/mistralai/client-python/blob/main/docs/sdks/documents/README.md#status) - Retrieve the processing status of a specific document. @@ -635,6 +643,11 @@ print(res.choices[0].message.content) * [register](https://github.com/mistralai/client-python/blob/main/docs/sdks/ingestionpipelineconfigurations/README.md#register) - Register Config * [update_run_info](https://github.com/mistralai/client-python/blob/main/docs/sdks/ingestionpipelineconfigurations/README.md#update_run_info) - Update Run Info +### [Beta.Rag.SearchIndexes](https://github.com/mistralai/client-python/blob/main/docs/sdks/searchindexes/README.md) + +* [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/searchindexes/README.md#list) - Get Search Indexes +* [register](https://github.com/mistralai/client-python/blob/main/docs/sdks/searchindexes/README.md#register) - Register Search Index + ### [Chat](https://github.com/mistralai/client-python/blob/main/docs/sdks/chat/README.md) * [complete](https://github.com/mistralai/client-python/blob/main/docs/sdks/chat/README.md#complete) - Chat Completion @@ -744,7 +757,9 @@ print(res.choices[0].message.content) * [get_schedules](https://github.com/mistralai/client-python/blob/main/docs/sdks/schedules/README.md#get_schedules) - Get Schedules * [schedule_workflow](https://github.com/mistralai/client-python/blob/main/docs/sdks/schedules/README.md#schedule_workflow) - Schedule Workflow +* [get_schedule](https://github.com/mistralai/client-python/blob/main/docs/sdks/schedules/README.md#get_schedule) - Get Schedule * [unschedule_workflow](https://github.com/mistralai/client-python/blob/main/docs/sdks/schedules/README.md#unschedule_workflow) - Unschedule Workflow +* [update_schedule](https://github.com/mistralai/client-python/blob/main/docs/sdks/schedules/README.md#update_schedule) - Update Schedule * [pause_schedule](https://github.com/mistralai/client-python/blob/main/docs/sdks/schedules/README.md#pause_schedule) - Pause Schedule * [resume_schedule](https://github.com/mistralai/client-python/blob/main/docs/sdks/schedules/README.md#resume_schedule) - Resume Schedule @@ -958,8 +973,8 @@ with Mistral( **Inherit from [`MistralError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/mistralerror.py)**: -* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 116 of 183 methods.* -* [`ObservabilityError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 183 methods.* +* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 127 of 195 methods.* +* [`ObservabilityError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 195 methods.* * [`ResponseValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute. diff --git a/README.md b/README.md index 2a3bedff..7270fbff 100644 --- a/README.md +++ b/README.md @@ -513,6 +513,12 @@ print(res.choices[0].message.content) * [create](docs/sdks/connectors/README.md#create) - Create a new connector. * [list](docs/sdks/connectors/README.md#list) - List all connectors. * [get_auth_url](docs/sdks/connectors/README.md#get_auth_url) - Get the auth URL for a connector. +* [activate_for_organization](docs/sdks/connectors/README.md#activate_for_organization) - Activate a connector for an organization. +* [deactivate_for_organization](docs/sdks/connectors/README.md#deactivate_for_organization) - Deactivate a connector for an organization. +* [activate_for_workspace](docs/sdks/connectors/README.md#activate_for_workspace) - Activate a connector for a workspace. +* [deactivate_for_workspace](docs/sdks/connectors/README.md#deactivate_for_workspace) - Deactivate a connector for a workspace. +* [activate_for_user](docs/sdks/connectors/README.md#activate_for_user) - Activate a connector for the current user. +* [deactivate_for_user](docs/sdks/connectors/README.md#deactivate_for_user) - Deactivate a connector for the current user. * [call_tool](docs/sdks/connectors/README.md#call_tool) - Call Connector Tool * [list_tools](docs/sdks/connectors/README.md#list_tools) - List tools for a connector. * [get_authentication_methods](docs/sdks/connectors/README.md#get_authentication_methods) - Get authentication methods for a connector. @@ -550,6 +556,7 @@ print(res.choices[0].message.content) * [get](docs/sdks/libraries/README.md#get) - Detailed information about a specific Library. * [delete](docs/sdks/libraries/README.md#delete) - Delete a library and all of it's document. * [update](docs/sdks/libraries/README.md#update) - Update a library. +* [~~libraries_update_v1~~](docs/sdks/libraries/README.md#libraries_update_v1) - Update a library. :warning: **Deprecated** #### [Beta.Libraries.Accesses](docs/sdks/accesses/README.md) @@ -563,6 +570,7 @@ print(res.choices[0].message.content) * [upload](docs/sdks/documents/README.md#upload) - Upload a new document. * [get](docs/sdks/documents/README.md#get) - Retrieve the metadata of a specific document. * [update](docs/sdks/documents/README.md#update) - Update the metadata of a specific document. +* [~~libraries_documents_update_v1~~](docs/sdks/documents/README.md#libraries_documents_update_v1) - Update the metadata of a specific document. :warning: **Deprecated** * [delete](docs/sdks/documents/README.md#delete) - Delete a document. * [text_content](docs/sdks/documents/README.md#text_content) - Retrieve the text content of a specific document. * [status](docs/sdks/documents/README.md#status) - Retrieve the processing status of a specific document. @@ -635,6 +643,11 @@ print(res.choices[0].message.content) * [register](docs/sdks/ingestionpipelineconfigurations/README.md#register) - Register Config * [update_run_info](docs/sdks/ingestionpipelineconfigurations/README.md#update_run_info) - Update Run Info +### [Beta.Rag.SearchIndexes](docs/sdks/searchindexes/README.md) + +* [list](docs/sdks/searchindexes/README.md#list) - Get Search Indexes +* [register](docs/sdks/searchindexes/README.md#register) - Register Search Index + ### [Chat](docs/sdks/chat/README.md) * [complete](docs/sdks/chat/README.md#complete) - Chat Completion @@ -744,7 +757,9 @@ print(res.choices[0].message.content) * [get_schedules](docs/sdks/schedules/README.md#get_schedules) - Get Schedules * [schedule_workflow](docs/sdks/schedules/README.md#schedule_workflow) - Schedule Workflow +* [get_schedule](docs/sdks/schedules/README.md#get_schedule) - Get Schedule * [unschedule_workflow](docs/sdks/schedules/README.md#unschedule_workflow) - Unschedule Workflow +* [update_schedule](docs/sdks/schedules/README.md#update_schedule) - Update Schedule * [pause_schedule](docs/sdks/schedules/README.md#pause_schedule) - Pause Schedule * [resume_schedule](docs/sdks/schedules/README.md#resume_schedule) - Resume Schedule @@ -958,8 +973,8 @@ with Mistral( **Inherit from [`MistralError`](./src/mistralai/client/errors/mistralerror.py)**: -* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 116 of 183 methods.* -* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 183 methods.* +* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 127 of 195 methods.* +* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 195 methods.* * [`ResponseValidationError`](./src/mistralai/client/errors/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute. diff --git a/docs/models/authenticationconfiguration.md b/docs/models/authenticationconfiguration.md index 6644875e..cdd1e55f 100644 --- a/docs/models/authenticationconfiguration.md +++ b/docs/models/authenticationconfiguration.md @@ -7,4 +7,5 @@ | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | | `name` | *str* | :heavy_check_mark: | N/A | | `authentication_type` | [models.OutboundAuthenticationType](../models/outboundauthenticationtype.md) | :heavy_check_mark: | N/A | +| `scope` | [models.ConsumerType](../models/consumertype.md) | :heavy_check_mark: | N/A | | `is_default` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/connectoractivatefororganizationv1request.md b/docs/models/connectoractivatefororganizationv1request.md new file mode 100644 index 00000000..40469996 --- /dev/null +++ b/docs/models/connectoractivatefororganizationv1request.md @@ -0,0 +1,9 @@ +# ConnectorActivateForOrganizationV1Request + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `connector_id` | *str* | :heavy_check_mark: | N/A | +| `tool_execution_configuration` | [OptionalNullable[models.ToolExecutionConfiguration]](../models/toolexecutionconfiguration.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/connectoractivateforuserv1request.md b/docs/models/connectoractivateforuserv1request.md new file mode 100644 index 00000000..bdf73b8a --- /dev/null +++ b/docs/models/connectoractivateforuserv1request.md @@ -0,0 +1,9 @@ +# ConnectorActivateForUserV1Request + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `connector_id` | *str* | :heavy_check_mark: | N/A | +| `tool_execution_configuration` | [OptionalNullable[models.ToolExecutionConfiguration]](../models/toolexecutionconfiguration.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/connectoractivateforworkspacev1request.md b/docs/models/connectoractivateforworkspacev1request.md new file mode 100644 index 00000000..e4dbaf1d --- /dev/null +++ b/docs/models/connectoractivateforworkspacev1request.md @@ -0,0 +1,9 @@ +# ConnectorActivateForWorkspaceV1Request + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `connector_id` | *str* | :heavy_check_mark: | N/A | +| `tool_execution_configuration` | [OptionalNullable[models.ToolExecutionConfiguration]](../models/toolexecutionconfiguration.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/connectordeactivatefororganizationv1request.md b/docs/models/connectordeactivatefororganizationv1request.md new file mode 100644 index 00000000..1fd64004 --- /dev/null +++ b/docs/models/connectordeactivatefororganizationv1request.md @@ -0,0 +1,8 @@ +# ConnectorDeactivateForOrganizationV1Request + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `connector_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectordeactivateforuserv1request.md b/docs/models/connectordeactivateforuserv1request.md new file mode 100644 index 00000000..992603b0 --- /dev/null +++ b/docs/models/connectordeactivateforuserv1request.md @@ -0,0 +1,8 @@ +# ConnectorDeactivateForUserV1Request + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `connector_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectordeactivateforworkspacev1request.md b/docs/models/connectordeactivateforworkspacev1request.md new file mode 100644 index 00000000..15033f29 --- /dev/null +++ b/docs/models/connectordeactivateforworkspacev1request.md @@ -0,0 +1,8 @@ +# ConnectorDeactivateForWorkspaceV1Request + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `connector_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectorgetv1request.md b/docs/models/connectorgetv1request.md index c45148b9..e82a03ad 100644 --- a/docs/models/connectorgetv1request.md +++ b/docs/models/connectorgetv1request.md @@ -6,5 +6,4 @@ | Field | Type | Required | Description | | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | | `fetch_customer_data` | *Optional[bool]* | :heavy_minus_sign: | Fetch the customer data associated with the connector (e.g. customer secrets / config). | -| `fetch_connection_secrets` | *Optional[bool]* | :heavy_minus_sign: | Fetch the general connection secrets associated with the connector. | | `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectorsqueryfilters.md b/docs/models/connectorsqueryfilters.md index aea47e14..37c19e7a 100644 --- a/docs/models/connectorsqueryfilters.md +++ b/docs/models/connectorsqueryfilters.md @@ -5,5 +5,4 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `active` | *OptionalNullable[bool]* | :heavy_minus_sign: | Filter for active connectors for a given user, workspace and organization. | -| `fetch_connection_secrets` | *Optional[bool]* | :heavy_minus_sign: | Fetch connection secrets. | \ No newline at end of file +| `active` | *OptionalNullable[bool]* | :heavy_minus_sign: | Filter for active connectors for a given user, workspace and organization. | \ No newline at end of file diff --git a/docs/models/consumertype.md b/docs/models/consumertype.md new file mode 100644 index 00000000..9ac4df3f --- /dev/null +++ b/docs/models/consumertype.md @@ -0,0 +1,20 @@ +# ConsumerType + +## Example Usage + +```python +from mistralai.client.models import ConsumerType + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ConsumerType = "user" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"user"` +- `"org"` +- `"workspace"` +- `"system"` diff --git a/docs/models/createlibraryrequest.md b/docs/models/createlibraryrequest.md index 07ff97d0..fd94c1ca 100644 --- a/docs/models/createlibraryrequest.md +++ b/docs/models/createlibraryrequest.md @@ -7,5 +7,5 @@ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `name` | *str* | :heavy_check_mark: | N/A | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `chunk_size` | *OptionalNullable[int]* | :heavy_minus_sign: | The size of the chunks (in characters) to split document text into. Must be between 256 and 32768. | +| ~~`chunk_size`~~ | *OptionalNullable[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The size of the chunks (in characters) to split document text into. Must be between 256 and 32768. | | `owner_type` | [OptionalNullable[models.OwnerType]](../models/ownertype.md) | :heavy_minus_sign: | Determines who owns the created library. 'User' creates a private library accessible only to its owner. 'Workspace' creates a library shared with the workspace. Defaults to 'Workspace' for API key sessions. Only API keys with the 'Private and shared connectors' connector access scope can create private, user-owned libraries. | \ No newline at end of file diff --git a/docs/models/createsearchindexinforequest.md b/docs/models/createsearchindexinforequest.md new file mode 100644 index 00000000..4b32c8c9 --- /dev/null +++ b/docs/models/createsearchindexinforequest.md @@ -0,0 +1,10 @@ +# CreateSearchIndexInfoRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `document_count` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `status` | [Optional[models.CreateSearchIndexInfoRequestStatus]](../models/createsearchindexinforequeststatus.md) | :heavy_minus_sign: | N/A | +| `index` | [models.CreateSearchIndexInfoRequestIndex](../models/createsearchindexinforequestindex.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/createsearchindexinforequestindex.md b/docs/models/createsearchindexinforequestindex.md new file mode 100644 index 00000000..42d99fcb --- /dev/null +++ b/docs/models/createsearchindexinforequestindex.md @@ -0,0 +1,11 @@ +# CreateSearchIndexInfoRequestIndex + + +## Supported Types + +### `models.CreateVespaSearchIndexInfoRequest` + +```python +value: models.CreateVespaSearchIndexInfoRequest = /* values here */ +``` + diff --git a/docs/models/createsearchindexinforequeststatus.md b/docs/models/createsearchindexinforequeststatus.md new file mode 100644 index 00000000..1e477acc --- /dev/null +++ b/docs/models/createsearchindexinforequeststatus.md @@ -0,0 +1,14 @@ +# CreateSearchIndexInfoRequestStatus + +## Example Usage + +```python +from mistralai.client.models import CreateSearchIndexInfoRequestStatus +value: CreateSearchIndexInfoRequestStatus = "online" +``` + + +## Values + +- `"online"` +- `"offline"` diff --git a/docs/models/createvespaschemarequest.md b/docs/models/createvespaschemarequest.md new file mode 100644 index 00000000..3098a2b9 --- /dev/null +++ b/docs/models/createvespaschemarequest.md @@ -0,0 +1,9 @@ +# CreateVespaSchemaRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | +| `document_count` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/createvespasearchindexinforequest.md b/docs/models/createvespasearchindexinforequest.md new file mode 100644 index 00000000..0bd47c38 --- /dev/null +++ b/docs/models/createvespasearchindexinforequest.md @@ -0,0 +1,12 @@ +# CreateVespaSearchIndexInfoRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `type` | *Literal["vespa"]* | :heavy_check_mark: | N/A | +| `k8s_cluster` | *str* | :heavy_check_mark: | N/A | +| `k8s_namespace` | *str* | :heavy_check_mark: | N/A | +| `vespa_instance_name` | *str* | :heavy_check_mark: | N/A | +| `schemas` | List[[models.CreateVespaSchemaRequest](../models/createvespaschemarequest.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/document.md b/docs/models/document.md index 42c639a6..ff0238ea 100644 --- a/docs/models/document.md +++ b/docs/models/document.md @@ -3,25 +3,26 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | N/A | -| `library_id` | *str* | :heavy_check_mark: | N/A | -| `hash` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `mime_type` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `extension` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `size` | *Nullable[int]* | :heavy_check_mark: | N/A | -| `name` | *str* | :heavy_check_mark: | N/A | -| `summary` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | -| `last_processed_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | -| `number_of_pages` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `process_status` | [models.ProcessStatus](../models/processstatus.md) | :heavy_check_mark: | N/A | -| `uploaded_by_id` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `uploaded_by_type` | *str* | :heavy_check_mark: | N/A | -| `tokens_processing_main_content` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `tokens_processing_summary` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `attributes` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | -| `processing_status` | *str* | :heavy_check_mark: | N/A | -| `tokens_processing_total` | *int* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `library_id` | *str* | :heavy_check_mark: | N/A | +| ~~`hash`~~ | *Nullable[str]* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| `mime_type` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `extension` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `size` | *Nullable[int]* | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | N/A | +| `summary` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `last_processed_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `number_of_pages` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `process_status` | [models.ProcessStatus](../models/processstatus.md) | :heavy_check_mark: | N/A | +| `uploaded_by_id` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `uploaded_by_type` | *str* | :heavy_check_mark: | N/A | +| ~~`tokens_processing_main_content`~~ | *OptionalNullable[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| ~~`tokens_processing_summary`~~ | *OptionalNullable[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| `url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `attributes` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | If set, the document will be automatically deleted after this date. | +| ~~`processing_status`~~ | *str* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| `tokens_processing_total` | *int* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/expression.md b/docs/models/expression.md new file mode 100644 index 00000000..d7de83a9 --- /dev/null +++ b/docs/models/expression.md @@ -0,0 +1,23 @@ +# Expression + + +## Supported Types + +### `List[str]` + +```python +value: List[str] = /* values here */ +``` + +### `models.LogicalExpression` + +```python +value: models.LogicalExpression = /* values here */ +``` + +### `models.ToolProperties` + +```python +value: models.ToolProperties = /* values here */ +``` + diff --git a/docs/models/getschedulev1workflowsschedulesscheduleidgetrequest.md b/docs/models/getschedulev1workflowsschedulesscheduleidgetrequest.md new file mode 100644 index 00000000..e681e674 --- /dev/null +++ b/docs/models/getschedulev1workflowsschedulesscheduleidgetrequest.md @@ -0,0 +1,8 @@ +# GetScheduleV1WorkflowsSchedulesScheduleIDGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `schedule_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/librariesdocumentslistv1request.md b/docs/models/librariesdocumentslistv1request.md index 44f63001..6149336f 100644 --- a/docs/models/librariesdocumentslistv1request.md +++ b/docs/models/librariesdocumentslistv1request.md @@ -3,12 +3,12 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------- | ----------------------- | ----------------------- | ----------------------- | -| `library_id` | *str* | :heavy_check_mark: | N/A | -| `search` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `filters_attributes` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `sort_by` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sort_order` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `library_id` | *str* | :heavy_check_mark: | N/A | +| `search` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | +| ~~`filters_attributes`~~ | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated: this parameter will be removed in a future version. | +| `sort_by` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `sort_order` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/librariesdocumentspatchv1request.md b/docs/models/librariesdocumentspatchv1request.md new file mode 100644 index 00000000..511aee46 --- /dev/null +++ b/docs/models/librariesdocumentspatchv1request.md @@ -0,0 +1,10 @@ +# LibrariesDocumentsPatchV1Request + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `library_id` | *str* | :heavy_check_mark: | N/A | +| `document_id` | *str* | :heavy_check_mark: | N/A | +| `update_document_request` | [models.UpdateDocumentRequest](../models/updatedocumentrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/librarieslistv1request.md b/docs/models/librarieslistv1request.md index 37352ee1..5efdb897 100644 --- a/docs/models/librarieslistv1request.md +++ b/docs/models/librarieslistv1request.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `search` | *OptionalNullable[str]* | :heavy_minus_sign: | Case-insensitive search on the library name. | -| `filter_owned_by_me` | *OptionalNullable[bool]* | :heavy_minus_sign: | Filter libraries by whether they were created by the current authenticated identity. Set to true for created by me, false for only libraries shared with me, or None to disable this filter. | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `search` | *OptionalNullable[str]* | :heavy_minus_sign: | Case-insensitive search on the library name. | +| ~~`filter_owned_by_me`~~ | *OptionalNullable[bool]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated: this parameter will be removed in a future version. | \ No newline at end of file diff --git a/docs/models/librariespatchv1request.md b/docs/models/librariespatchv1request.md new file mode 100644 index 00000000..47648086 --- /dev/null +++ b/docs/models/librariespatchv1request.md @@ -0,0 +1,9 @@ +# LibrariesPatchV1Request + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `library_id` | *str* | :heavy_check_mark: | N/A | +| `update_library_request` | [models.UpdateLibraryRequest](../models/updatelibraryrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/library.md b/docs/models/library.md index a07d3afa..5b9aa658 100644 --- a/docs/models/library.md +++ b/docs/models/library.md @@ -3,21 +3,21 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | N/A | -| `name` | *str* | :heavy_check_mark: | N/A | -| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | -| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | -| `owner_id` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `owner_type` | *str* | :heavy_check_mark: | N/A | -| `total_size` | *int* | :heavy_check_mark: | N/A | -| `nb_documents` | *int* | :heavy_check_mark: | N/A | -| `chunk_size` | *Nullable[int]* | :heavy_check_mark: | N/A | -| `emoji` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `generated_description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `explicit_user_members_count` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `explicit_workspace_members_count` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| ~~`org_sharing_role`~~ | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | -| `generated_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Generated Name | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | N/A | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `owner_id` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `owner_type` | *str* | :heavy_check_mark: | N/A | +| `total_size` | *int* | :heavy_check_mark: | N/A | +| `nb_documents` | *int* | :heavy_check_mark: | N/A | +| ~~`chunk_size`~~ | *Nullable[int]* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| ~~`emoji`~~ | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| ~~`generated_description`~~ | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| ~~`explicit_user_members_count`~~ | *OptionalNullable[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| ~~`explicit_workspace_members_count`~~ | *OptionalNullable[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| ~~`org_sharing_role`~~ | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| ~~`generated_name`~~ | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Generated Name | \ No newline at end of file diff --git a/docs/models/logicalexpression.md b/docs/models/logicalexpression.md new file mode 100644 index 00000000..675368e7 --- /dev/null +++ b/docs/models/logicalexpression.md @@ -0,0 +1,9 @@ +# LogicalExpression + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `type` | [models.LogicalExpressionType](../models/logicalexpressiontype.md) | :heavy_check_mark: | N/A | +| `expressions` | List[[models.Expression](../models/expression.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/logicalexpressiontype.md b/docs/models/logicalexpressiontype.md new file mode 100644 index 00000000..453285d5 --- /dev/null +++ b/docs/models/logicalexpressiontype.md @@ -0,0 +1,14 @@ +# LogicalExpressionType + +## Example Usage + +```python +from mistralai.client.models import LogicalExpressionType +value: LogicalExpressionType = "and" +``` + + +## Values + +- `"and"` +- `"or"` diff --git a/docs/models/partialscheduledefinition.md b/docs/models/partialscheduledefinition.md new file mode 100644 index 00000000..e66ee671 --- /dev/null +++ b/docs/models/partialscheduledefinition.md @@ -0,0 +1,23 @@ +# PartialScheduleDefinition + +Schedule definition for partial updates. + +All fields are optional (inherited from _ScheduleRequestBase). Only explicitly-set +fields are applied during an update; unset fields preserve the existing schedule values. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `input` | *Optional[Any]* | :heavy_minus_sign: | Input to provide to the workflow when starting it. | +| `calendars` | List[[models.ScheduleCalendar](../models/schedulecalendar.md)] | :heavy_minus_sign: | Calendar-based specification of times. | +| `intervals` | List[[models.ScheduleInterval](../models/scheduleinterval.md)] | :heavy_minus_sign: | Interval-based specification of times. | +| `cron_expressions` | List[*str*] | :heavy_minus_sign: | Cron-based specification of times. | +| `skip` | List[[models.ScheduleCalendar](../models/schedulecalendar.md)] | :heavy_minus_sign: | Set of calendar times to skip. | +| `start_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Time after which the first action may be run. | +| `end_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Time after which no more actions will be run. | +| `jitter` | *OptionalNullable[str]* | :heavy_minus_sign: | Jitter to apply each action.

An action's scheduled time will be incremented by a random value between 0
and this value if present (but not past the next schedule).
| +| `time_zone_name` | *OptionalNullable[str]* | :heavy_minus_sign: | IANA time zone name, for example ``US/Central``. | +| `policy` | [Optional[models.SchedulePolicy]](../models/schedulepolicy.md) | :heavy_minus_sign: | N/A | +| `max_executions` | *OptionalNullable[int]* | :heavy_minus_sign: | Maximum number of times this schedule will trigger a workflow execution. Once this limit is reached, no further executions are triggered automatically. null means unlimited. | \ No newline at end of file diff --git a/docs/models/processingstatus.md b/docs/models/processingstatus.md index 514caa50..1d472b88 100644 --- a/docs/models/processingstatus.md +++ b/docs/models/processingstatus.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -| `document_id` | *str* | :heavy_check_mark: | N/A | -| `process_status` | [models.ProcessStatus](../models/processstatus.md) | :heavy_check_mark: | N/A | -| `processing_status` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `document_id` | *str* | :heavy_check_mark: | N/A | +| `process_status` | [models.ProcessStatus](../models/processstatus.md) | :heavy_check_mark: | N/A | +| ~~`processing_status`~~ | *str* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | \ No newline at end of file diff --git a/docs/models/requiresconfirmation.md b/docs/models/requiresconfirmation.md new file mode 100644 index 00000000..e7f1e4a6 --- /dev/null +++ b/docs/models/requiresconfirmation.md @@ -0,0 +1,23 @@ +# RequiresConfirmation + + +## Supported Types + +### `List[str]` + +```python +value: List[str] = /* values here */ +``` + +### `models.LogicalExpression` + +```python +value: models.LogicalExpression = /* values here */ +``` + +### `models.ToolProperties` + +```python +value: models.ToolProperties = /* values here */ +``` + diff --git a/docs/models/scheduledefinition.md b/docs/models/scheduledefinition.md index 7d0509f6..93c58740 100644 --- a/docs/models/scheduledefinition.md +++ b/docs/models/scheduledefinition.md @@ -22,5 +22,5 @@ Used for input where schedule_id is optional (can be provided or auto-generated) | `jitter` | *OptionalNullable[str]* | :heavy_minus_sign: | Jitter to apply each action.

An action's scheduled time will be incremented by a random value between 0
and this value if present (but not past the next schedule).
| | `time_zone_name` | *OptionalNullable[str]* | :heavy_minus_sign: | IANA time zone name, for example ``US/Central``. | | `policy` | [Optional[models.SchedulePolicy]](../models/schedulepolicy.md) | :heavy_minus_sign: | N/A | -| `schedule_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Unique identifier for the schedule. | -| `max_executions` | *OptionalNullable[int]* | :heavy_minus_sign: | Maximum number of times this schedule will trigger a workflow execution. Once this limit is reached, no further executions are triggered automatically. null means unlimited. | \ No newline at end of file +| `max_executions` | *OptionalNullable[int]* | :heavy_minus_sign: | Maximum number of times this schedule will trigger a workflow execution. Once this limit is reached, no further executions are triggered automatically. null means unlimited. | +| `schedule_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Unique identifier for the schedule. | \ No newline at end of file diff --git a/docs/models/searchindexresponse.md b/docs/models/searchindexresponse.md new file mode 100644 index 00000000..452d8a08 --- /dev/null +++ b/docs/models/searchindexresponse.md @@ -0,0 +1,14 @@ +# SearchIndexResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `creator_id` | *str* | :heavy_check_mark: | N/A | +| `document_count` | *int* | :heavy_check_mark: | N/A | +| `status` | [models.SearchIndexResponseStatus](../models/searchindexresponsestatus.md) | :heavy_check_mark: | N/A | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `modified_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `index` | [models.SearchIndexResponseIndex](../models/searchindexresponseindex.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/searchindexresponseindex.md b/docs/models/searchindexresponseindex.md new file mode 100644 index 00000000..3093f4d4 --- /dev/null +++ b/docs/models/searchindexresponseindex.md @@ -0,0 +1,11 @@ +# SearchIndexResponseIndex + + +## Supported Types + +### `models.VespaSearchIndexInfoResponse` + +```python +value: models.VespaSearchIndexInfoResponse = /* values here */ +``` + diff --git a/docs/models/searchindexresponsestatus.md b/docs/models/searchindexresponsestatus.md new file mode 100644 index 00000000..c2200101 --- /dev/null +++ b/docs/models/searchindexresponsestatus.md @@ -0,0 +1,18 @@ +# SearchIndexResponseStatus + +## Example Usage + +```python +from mistralai.client.models import SearchIndexResponseStatus + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: SearchIndexResponseStatus = "online" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"online"` +- `"offline"` diff --git a/docs/models/sharing.md b/docs/models/sharing.md index fc718632..922506d3 100644 --- a/docs/models/sharing.md +++ b/docs/models/sharing.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------- | ----------------------- | ----------------------- | ----------------------- | -| `library_id` | *str* | :heavy_check_mark: | N/A | -| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `org_id` | *str* | :heavy_check_mark: | N/A | -| `role` | *str* | :heavy_check_mark: | N/A | -| `share_with_type` | *str* | :heavy_check_mark: | N/A | -| `share_with_uuid` | *Nullable[str]* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `library_id` | *str* | :heavy_check_mark: | N/A | +| ~~`user_id`~~ | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| ~~`org_id`~~ | *str* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| `role` | *str* | :heavy_check_mark: | N/A | +| `share_with_type` | *str* | :heavy_check_mark: | N/A | +| `share_with_uuid` | *Nullable[str]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/sharingdelete.md b/docs/models/sharingdelete.md index 1dcec095..e6e0732b 100644 --- a/docs/models/sharingdelete.md +++ b/docs/models/sharingdelete.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `org_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `share_with_uuid` | *str* | :heavy_check_mark: | The id of the entity (user, workspace or organization) to share with | -| `share_with_type` | [models.EntityType](../models/entitytype.md) | :heavy_check_mark: | The type of entity, used to share a library. | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| ~~`org_id`~~ | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| `share_with_uuid` | *str* | :heavy_check_mark: | The id of the entity (user, workspace or organization) to share with | +| `share_with_type` | [models.EntityType](../models/entitytype.md) | :heavy_check_mark: | The type of entity, used to share a library. | \ No newline at end of file diff --git a/docs/models/sharingrequest.md b/docs/models/sharingrequest.md index 21b8ec1f..e92318f8 100644 --- a/docs/models/sharingrequest.md +++ b/docs/models/sharingrequest.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `org_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `level` | [models.ShareEnum](../models/shareenum.md) | :heavy_check_mark: | N/A | -| `share_with_uuid` | *str* | :heavy_check_mark: | The id of the entity (user, workspace or organization) to share with | -| `share_with_type` | [models.EntityType](../models/entitytype.md) | :heavy_check_mark: | The type of entity, used to share a library. | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| ~~`org_id`~~ | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| `level` | [models.ShareEnum](../models/shareenum.md) | :heavy_check_mark: | N/A | +| `share_with_uuid` | *str* | :heavy_check_mark: | The id of the entity (user, workspace or organization) to share with | +| `share_with_type` | [models.EntityType](../models/entitytype.md) | :heavy_check_mark: | The type of entity, used to share a library. | \ No newline at end of file diff --git a/docs/models/skipconfirmation.md b/docs/models/skipconfirmation.md new file mode 100644 index 00000000..48eade7a --- /dev/null +++ b/docs/models/skipconfirmation.md @@ -0,0 +1,23 @@ +# SkipConfirmation + + +## Supported Types + +### `List[str]` + +```python +value: List[str] = /* values here */ +``` + +### `models.LogicalExpression` + +```python +value: models.LogicalExpression = /* values here */ +``` + +### `models.ToolProperties` + +```python +value: models.ToolProperties = /* values here */ +``` + diff --git a/docs/models/toolexecutionconfiguration.md b/docs/models/toolexecutionconfiguration.md new file mode 100644 index 00000000..04981b89 --- /dev/null +++ b/docs/models/toolexecutionconfiguration.md @@ -0,0 +1,11 @@ +# ToolExecutionConfiguration + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `requires_confirmation` | [OptionalNullable[models.RequiresConfirmation]](../models/requiresconfirmation.md) | :heavy_minus_sign: | N/A | +| `skip_confirmation` | [OptionalNullable[models.SkipConfirmation]](../models/skipconfirmation.md) | :heavy_minus_sign: | N/A | +| `include` | List[*str*] | :heavy_minus_sign: | N/A | +| `exclude` | List[*str*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/toolproperties.md b/docs/models/toolproperties.md new file mode 100644 index 00000000..d85fd821 --- /dev/null +++ b/docs/models/toolproperties.md @@ -0,0 +1,8 @@ +# ToolProperties + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `read_only` | *Nullable[bool]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/updatedocumentrequest.md b/docs/models/updatedocumentrequest.md index dd06dd4b..5a3c93af 100644 --- a/docs/models/updatedocumentrequest.md +++ b/docs/models/updatedocumentrequest.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `attributes` | Dict[str, [models.Attributes](../models/attributes.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `attributes` | Dict[str, [models.Attributes](../models/attributes.md)] | :heavy_minus_sign: | N/A | +| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | If set, the document will be automatically deleted after this date. | \ No newline at end of file diff --git a/docs/models/updateschedulev1workflowsschedulesscheduleidpatchrequest.md b/docs/models/updateschedulev1workflowsschedulesscheduleidpatchrequest.md new file mode 100644 index 00000000..68ffe15a --- /dev/null +++ b/docs/models/updateschedulev1workflowsschedulesscheduleidpatchrequest.md @@ -0,0 +1,9 @@ +# UpdateScheduleV1WorkflowsSchedulesScheduleIDPatchRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `schedule_id` | *str* | :heavy_check_mark: | N/A | +| `workflow_schedule_update_request` | [models.WorkflowScheduleUpdateRequest](../models/workflowscheduleupdaterequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/vespaschemaresponse.md b/docs/models/vespaschemaresponse.md new file mode 100644 index 00000000..1cb7277b --- /dev/null +++ b/docs/models/vespaschemaresponse.md @@ -0,0 +1,9 @@ +# VespaSchemaResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *str* | :heavy_check_mark: | N/A | +| `document_count` | *Nullable[int]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/vespasearchindexinforesponse.md b/docs/models/vespasearchindexinforesponse.md new file mode 100644 index 00000000..16272fce --- /dev/null +++ b/docs/models/vespasearchindexinforesponse.md @@ -0,0 +1,12 @@ +# VespaSearchIndexInfoResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `type` | *Literal["vespa"]* | :heavy_check_mark: | N/A | +| `k8s_cluster` | *str* | :heavy_check_mark: | N/A | +| `k8s_namespace` | *str* | :heavy_check_mark: | N/A | +| `vespa_instance_name` | *str* | :heavy_check_mark: | N/A | +| `schemas` | List[[models.VespaSchemaResponse](../models/vespaschemaresponse.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/workflowscheduleupdaterequest.md b/docs/models/workflowscheduleupdaterequest.md new file mode 100644 index 00000000..24357f65 --- /dev/null +++ b/docs/models/workflowscheduleupdaterequest.md @@ -0,0 +1,8 @@ +# WorkflowScheduleUpdateRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `schedule` | [models.PartialScheduleDefinition](../models/partialscheduledefinition.md) | :heavy_check_mark: | Schedule definition for partial updates.

All fields are optional (inherited from _ScheduleRequestBase). Only explicitly-set
fields are applied during an update; unset fields preserve the existing schedule values. | \ No newline at end of file diff --git a/docs/sdks/accesses/README.md b/docs/sdks/accesses/README.md index 09515e0b..3acf0566 100644 --- a/docs/sdks/accesses/README.md +++ b/docs/sdks/accesses/README.md @@ -76,14 +76,14 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `library_id` | *str* | :heavy_check_mark: | N/A | -| `level` | [models.ShareEnum](../../models/shareenum.md) | :heavy_check_mark: | N/A | -| `share_with_uuid` | *str* | :heavy_check_mark: | The id of the entity (user, workspace or organization) to share with | -| `share_with_type` | [models.EntityType](../../models/entitytype.md) | :heavy_check_mark: | The type of entity, used to share a library. | -| `org_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `library_id` | *str* | :heavy_check_mark: | N/A | +| `level` | [models.ShareEnum](../../models/shareenum.md) | :heavy_check_mark: | N/A | +| `share_with_uuid` | *str* | :heavy_check_mark: | The id of the entity (user, workspace or organization) to share with | +| `share_with_type` | [models.EntityType](../../models/entitytype.md) | :heavy_check_mark: | The type of entity, used to share a library. | +| `org_id` | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -98,7 +98,7 @@ with Mistral( ## delete -Given a library id, you can delete the access level of an entity. An owner cannot delete its own access. You have to be the owner of the library to delete an access other than yours. +Given a library id, you can delete the access level of an entity. An owner cannot delete their own access. You have to be the owner of the library to delete an access other than yours. Warning: the response will change from 200 (returning the deleted sharing) to 204 No Content in a future version. ### Example Usage @@ -121,13 +121,13 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `library_id` | *str* | :heavy_check_mark: | N/A | -| `share_with_uuid` | *str* | :heavy_check_mark: | The id of the entity (user, workspace or organization) to share with | -| `share_with_type` | [models.EntityType](../../models/entitytype.md) | :heavy_check_mark: | The type of entity, used to share a library. | -| `org_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `library_id` | *str* | :heavy_check_mark: | N/A | +| `share_with_uuid` | *str* | :heavy_check_mark: | The id of the entity (user, workspace or organization) to share with | +| `share_with_type` | [models.EntityType](../../models/entitytype.md) | :heavy_check_mark: | The type of entity, used to share a library. | +| `org_id` | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/connectors/README.md b/docs/sdks/connectors/README.md index 753c1cf3..7e5f6860 100644 --- a/docs/sdks/connectors/README.md +++ b/docs/sdks/connectors/README.md @@ -9,6 +9,12 @@ * [create](#create) - Create a new connector. * [list](#list) - List all connectors. * [get_auth_url](#get_auth_url) - Get the auth URL for a connector. +* [activate_for_organization](#activate_for_organization) - Activate a connector for an organization. +* [deactivate_for_organization](#deactivate_for_organization) - Deactivate a connector for an organization. +* [activate_for_workspace](#activate_for_workspace) - Activate a connector for a workspace. +* [deactivate_for_workspace](#deactivate_for_workspace) - Deactivate a connector for a workspace. +* [activate_for_user](#activate_for_user) - Activate a connector for the current user. +* [deactivate_for_user](#deactivate_for_user) - Deactivate a connector for the current user. * [call_tool](#call_tool) - Call Connector Tool * [list_tools](#list_tools) - List tools for a connector. * [get_authentication_methods](#get_authentication_methods) - Get authentication methods for a connector. @@ -160,6 +166,264 @@ with Mistral( | errors.HTTPValidationError | 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | +## activate_for_organization + +Enable a connector at the organization level so all members can use it. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.activate_for_organization(connector_id="a91bb4ec-caab-4cf2-be03-84b8343f4643") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `connector_id` | *str* | :heavy_check_mark: | N/A | +| `requires_confirmation` | [OptionalNullable[models.RequiresConfirmation]](../../models/requiresconfirmation.md) | :heavy_minus_sign: | N/A | +| `skip_confirmation` | [OptionalNullable[models.SkipConfirmation]](../../models/skipconfirmation.md) | :heavy_minus_sign: | N/A | +| `include` | List[*str*] | :heavy_minus_sign: | N/A | +| `exclude` | List[*str*] | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.MessageResponse](../../models/messageresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## deactivate_for_organization + +Disable a connector at the organization level. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.deactivate_for_organization(connector_id="8f4c1089-2a37-44b3-a3c4-830ca7a0e439") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `connector_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.MessageResponse](../../models/messageresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## activate_for_workspace + +Enable a connector at the workspace level so all members of the workspace can use it. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.activate_for_workspace(connector_id="2adfa8af-3618-41a9-8980-e5ea1486e58e") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `connector_id` | *str* | :heavy_check_mark: | N/A | +| `requires_confirmation` | [OptionalNullable[models.RequiresConfirmation]](../../models/requiresconfirmation.md) | :heavy_minus_sign: | N/A | +| `skip_confirmation` | [OptionalNullable[models.SkipConfirmation]](../../models/skipconfirmation.md) | :heavy_minus_sign: | N/A | +| `include` | List[*str*] | :heavy_minus_sign: | N/A | +| `exclude` | List[*str*] | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.MessageResponse](../../models/messageresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## deactivate_for_workspace + +Disable a connector at the workspace level. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.deactivate_for_workspace(connector_id="15b00e98-a9e7-4582-b0fc-87d28c3dac04") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `connector_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.MessageResponse](../../models/messageresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## activate_for_user + +Enable a connector for the calling user only. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.activate_for_user(connector_id="cd4fb4d2-de68-451f-8f2a-57fe39b33d96") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `connector_id` | *str* | :heavy_check_mark: | N/A | +| `requires_confirmation` | [OptionalNullable[models.RequiresConfirmation]](../../models/requiresconfirmation.md) | :heavy_minus_sign: | N/A | +| `skip_confirmation` | [OptionalNullable[models.SkipConfirmation]](../../models/skipconfirmation.md) | :heavy_minus_sign: | N/A | +| `include` | List[*str*] | :heavy_minus_sign: | N/A | +| `exclude` | List[*str*] | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.MessageResponse](../../models/messageresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## deactivate_for_user + +Disable a connector for the calling user only. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.deactivate_for_user(connector_id="99c6ed86-e6bb-40ed-b6ee-d22ba791a68f") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `connector_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.MessageResponse](../../models/messageresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + ## call_tool Call a tool on an MCP connector. @@ -693,7 +957,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.connectors.get(connector_id_or_name="", fetch_customer_data=False, fetch_connection_secrets=False) + res = mistral.beta.connectors.get(connector_id_or_name="", fetch_customer_data=False) # Handle response print(res) @@ -706,7 +970,6 @@ with Mistral( | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | | `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | | `fetch_customer_data` | *Optional[bool]* | :heavy_minus_sign: | Fetch the customer data associated with the connector (e.g. customer secrets / config). | -| `fetch_connection_secrets` | *Optional[bool]* | :heavy_minus_sign: | Fetch the general connection secrets associated with the connector. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/documents/README.md b/docs/sdks/documents/README.md index eabe9976..e7c70307 100644 --- a/docs/sdks/documents/README.md +++ b/docs/sdks/documents/README.md @@ -10,6 +10,7 @@ * [upload](#upload) - Upload a new document. * [get](#get) - Retrieve the metadata of a specific document. * [update](#update) - Update the metadata of a specific document. +* [~~libraries_documents_update_v1~~](#libraries_documents_update_v1) - Update the metadata of a specific document. :warning: **Deprecated** * [delete](#delete) - Delete a document. * [text_content](#text_content) - Retrieve the text content of a specific document. * [status](#status) - Retrieve the processing status of a specific document. @@ -42,16 +43,16 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `library_id` | *str* | :heavy_check_mark: | N/A | -| `search` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `filters_attributes` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `sort_by` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sort_order` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `library_id` | *str* | :heavy_check_mark: | N/A | +| `search` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `filters_attributes` | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated: this parameter will be removed in a future version. | +| `sort_by` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `sort_order` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -153,8 +154,55 @@ with Mistral( ## update +Given a library and a document in that library, update the name and/or attributes of that document. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.libraries.documents.update(library_id="2a41249e-52ca-4436-b755-25ce3a9bfb53", document_id="bc26fa54-e5d9-4269-bedf-86bed5471c7d") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `library_id` | *str* | :heavy_check_mark: | N/A | +| `document_id` | *str* | :heavy_check_mark: | N/A | +| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `attributes` | Dict[str, [models.Attributes](../../models/attributes.md)] | :heavy_minus_sign: | N/A | +| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | If set, the document will be automatically deleted after this date. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.Document](../../models/document.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## ~~libraries_documents_update_v1~~ + Given a library and a document in that library, update the name of that document. +> :warning: **DEPRECATED**: Use the PATCH method instead. This PUT endpoint will be removed in a future version.. + ### Example Usage @@ -167,7 +215,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.libraries.documents.update(library_id="3ddd8d93-dca5-4a6d-980d-173226c35742", document_id="2a25e44c-b160-40ca-b5c2-b65fb2fcae34") + res = mistral.beta.libraries.documents.libraries_documents_update_v1(library_id="3ddd8d93-dca5-4a6d-980d-173226c35742", document_id="2a25e44c-b160-40ca-b5c2-b65fb2fcae34") # Handle response print(res) @@ -176,13 +224,14 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `library_id` | *str* | :heavy_check_mark: | N/A | -| `document_id` | *str* | :heavy_check_mark: | N/A | -| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `attributes` | Dict[str, [models.Attributes](../../models/attributes.md)] | :heavy_minus_sign: | N/A | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `library_id` | *str* | :heavy_check_mark: | N/A | +| `document_id` | *str* | :heavy_check_mark: | N/A | +| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `attributes` | Dict[str, [models.Attributes](../../models/attributes.md)] | :heavy_minus_sign: | N/A | +| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | If set, the document will be automatically deleted after this date. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/libraries/README.md b/docs/sdks/libraries/README.md index d282f541..42c3323e 100644 --- a/docs/sdks/libraries/README.md +++ b/docs/sdks/libraries/README.md @@ -11,6 +11,7 @@ * [get](#get) - Detailed information about a specific Library. * [delete](#delete) - Delete a library and all of its documents. * [update](#update) - Update a library. +* [~~libraries_update_v1~~](#libraries_update_v1) - Update a library. :warning: **Deprecated** ## list @@ -37,13 +38,13 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `search` | *OptionalNullable[str]* | :heavy_minus_sign: | Case-insensitive search on the library name. | -| `filter_owned_by_me` | *OptionalNullable[bool]* | :heavy_minus_sign: | Filter libraries by whether they were created by the current authenticated identity. Set to true for created by me, false for only libraries shared with me, or None to disable this filter. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `search` | *OptionalNullable[str]* | :heavy_minus_sign: | Case-insensitive search on the library name. | +| `filter_owned_by_me` | *OptionalNullable[bool]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated: this parameter will be removed in a future version. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -85,7 +86,7 @@ with Mistral( | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `name` | *str* | :heavy_check_mark: | N/A | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `chunk_size` | *OptionalNullable[int]* | :heavy_minus_sign: | The size of the chunks (in characters) to split document text into. Must be between 256 and 32768. | +| `chunk_size` | *OptionalNullable[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The size of the chunks (in characters) to split document text into. Must be between 256 and 32768. | | `owner_type` | [OptionalNullable[models.OwnerType]](../../models/ownertype.md) | :heavy_minus_sign: | Determines who owns the created library. 'User' creates a private library accessible only to its owner. 'Workspace' creates a library shared with the workspace. Defaults to 'Workspace' for API key sessions. Only API keys with the 'Private and shared connectors' connector access scope can create private, user-owned libraries. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | @@ -143,7 +144,7 @@ with Mistral( ## delete -Given a library id, deletes it together with all documents that have been uploaded to that library. +Given a library id, deletes it together with all documents that have been uploaded to that library. Warning: the response will change from 200 (returning the deleted library) to 204 No Content in a future version. ### Example Usage @@ -188,6 +189,51 @@ Given a library id, you can update the name and description. ### Example Usage + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.libraries.update(library_id="74a30b7a-ba52-49f7-a8a3-7157e1adf565") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `library_id` | *str* | :heavy_check_mark: | N/A | +| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.Library](../../models/library.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## ~~libraries_update_v1~~ + +Given a library id, you can update the name and description. + +> :warning: **DEPRECATED**: Use the PATCH method instead. This PUT endpoint will be removed in a future version.. + +### Example Usage + ```python from mistralai.client import Mistral @@ -198,7 +244,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.libraries.update(library_id="e01880c3-d0b5-4a29-8b1b-abdb8ce917e4") + res = mistral.beta.libraries.libraries_update_v1(library_id="e01880c3-d0b5-4a29-8b1b-abdb8ce917e4") # Handle response print(res) diff --git a/docs/sdks/schedules/README.md b/docs/sdks/schedules/README.md index 7bf59931..6c6f96d0 100644 --- a/docs/sdks/schedules/README.md +++ b/docs/sdks/schedules/README.md @@ -6,7 +6,9 @@ * [get_schedules](#get_schedules) - Get Schedules * [schedule_workflow](#schedule_workflow) - Schedule Workflow +* [get_schedule](#get_schedule) - Get Schedule * [unschedule_workflow](#unschedule_workflow) - Unschedule Workflow +* [update_schedule](#update_schedule) - Update Schedule * [pause_schedule](#pause_schedule) - Pause Schedule * [resume_schedule](#resume_schedule) - Resume Schedule @@ -98,6 +100,47 @@ with Mistral( | errors.HTTPValidationError | 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | +## get_schedule + +Get Schedule + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.schedules.get_schedule(schedule_id="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `schedule_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.ScheduleDefinitionOutput](../../models/scheduledefinitionoutput.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + ## unschedule_workflow Unschedule Workflow @@ -134,6 +177,48 @@ with Mistral( | errors.HTTPValidationError | 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | +## update_schedule + +Update Schedule + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.schedules.update_schedule(schedule_id="", schedule={}) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `schedule_id` | *str* | :heavy_check_mark: | N/A | +| `schedule` | [models.PartialScheduleDefinition](../../models/partialscheduledefinition.md) | :heavy_check_mark: | Schedule definition for partial updates.

All fields are optional (inherited from _ScheduleRequestBase). Only explicitly-set
fields are applied during an update; unset fields preserve the existing schedule values. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.WorkflowScheduleResponse](../../models/workflowscheduleresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + ## pause_schedule Pause Schedule diff --git a/docs/sdks/searchindexes/README.md b/docs/sdks/searchindexes/README.md new file mode 100644 index 00000000..85145507 --- /dev/null +++ b/docs/sdks/searchindexes/README.md @@ -0,0 +1,96 @@ +# Beta.Rag.SearchIndexes + +## Overview + +### Available Operations + +* [list](#list) - Get Search Indexes +* [register](#register) - Register Search Index + +## list + +Get Search Indexes + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.rag.search_indexes.list() + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[List[models.SearchIndexResponse]](../../models/.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## register + +Register Search Index + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.rag.search_indexes.register(index={ + "type": "vespa", + "k8s_cluster": "", + "k8s_namespace": "", + "vespa_instance_name": "", + "schemas": [], + }, status="offline") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `index` | [models.CreateSearchIndexInfoRequestIndex](../../models/createsearchindexinforequestindex.md) | :heavy_check_mark: | N/A | +| `document_count` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `status` | [Optional[models.CreateSearchIndexInfoRequestStatus]](../../models/createsearchindexinforequeststatus.md) | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.SearchIndexResponse](../../models/searchindexresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index f79b279f..f3d58127 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.4.5" +version = "2.4.6" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index 9f9ae8c6..d4969426 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.4.5" +__version__: str = "2.4.6" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.879.6" -__user_agent__: str = "speakeasy-sdk/python 2.4.5 2.879.6 1.0.0 mistralai" +__user_agent__: str = "speakeasy-sdk/python 2.4.6 2.879.6 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/accesses.py b/src/mistralai/client/accesses.py index 5d859a39..e5e799b7 100644 --- a/src/mistralai/client/accesses.py +++ b/src/mistralai/client/accesses.py @@ -433,7 +433,7 @@ def delete( ) -> models.Sharing: r"""Delete an access level. - Given a library id, you can delete the access level of an entity. An owner cannot delete it's own access. You have to be the owner of the library to delete an acces other than yours. + Given a library id, you can delete the access level of an entity. An owner cannot delete their own access. You have to be the owner of the library to delete an access other than yours. Warning: the response will change from 200 (returning the deleted sharing) to 204 No Content in a future version. :param library_id: :param share_with_uuid: The id of the entity (user, workspace or organization) to share with @@ -540,7 +540,7 @@ async def delete_async( ) -> models.Sharing: r"""Delete an access level. - Given a library id, you can delete the access level of an entity. An owner cannot delete it's own access. You have to be the owner of the library to delete an acces other than yours. + Given a library id, you can delete the access level of an entity. An owner cannot delete their own access. You have to be the owner of the library to delete an access other than yours. Warning: the response will change from 200 (returning the deleted sharing) to 204 No Content in a future version. :param library_id: :param share_with_uuid: The id of the entity (user, workspace or organization) to share with diff --git a/src/mistralai/client/connectors.py b/src/mistralai/client/connectors.py index 793c9f8a..f6558efa 100644 --- a/src/mistralai/client/connectors.py +++ b/src/mistralai/client/connectors.py @@ -665,6 +665,1296 @@ async def get_auth_url_async( raise errors.SDKError("Unexpected response received", http_res) + def activate_for_organization( + self, + *, + connector_id: str, + requires_confirmation: OptionalNullable[ + Union[models.RequiresConfirmation, models.RequiresConfirmationTypedDict] + ] = UNSET, + skip_confirmation: OptionalNullable[ + Union[models.SkipConfirmation, models.SkipConfirmationTypedDict] + ] = UNSET, + include: OptionalNullable[List[str]] = UNSET, + exclude: OptionalNullable[List[str]] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Activate a connector for an organization. + + Enable a connector at the organization level so all members can use it. + + :param connector_id: + :param requires_confirmation: + :param skip_confirmation: + :param include: + :param exclude: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorActivateForOrganizationV1Request( + connector_id=connector_id, + tool_execution_configuration=models.ToolExecutionConfiguration( + requires_confirmation=utils.get_pydantic_model( + requires_confirmation, OptionalNullable[models.RequiresConfirmation] + ), + skip_confirmation=utils.get_pydantic_model( + skip_confirmation, OptionalNullable[models.SkipConfirmation] + ), + include=include, + exclude=exclude, + ), + ) + + req = self._build_request( + method="POST", + path="/v1/connectors/{connector_id}/organization/activate", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.tool_execution_configuration if request is not None else None, + True, + True, + "json", + OptionalNullable[models.ToolExecutionConfiguration], + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_activate_for_organization_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def activate_for_organization_async( + self, + *, + connector_id: str, + requires_confirmation: OptionalNullable[ + Union[models.RequiresConfirmation, models.RequiresConfirmationTypedDict] + ] = UNSET, + skip_confirmation: OptionalNullable[ + Union[models.SkipConfirmation, models.SkipConfirmationTypedDict] + ] = UNSET, + include: OptionalNullable[List[str]] = UNSET, + exclude: OptionalNullable[List[str]] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Activate a connector for an organization. + + Enable a connector at the organization level so all members can use it. + + :param connector_id: + :param requires_confirmation: + :param skip_confirmation: + :param include: + :param exclude: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorActivateForOrganizationV1Request( + connector_id=connector_id, + tool_execution_configuration=models.ToolExecutionConfiguration( + requires_confirmation=utils.get_pydantic_model( + requires_confirmation, OptionalNullable[models.RequiresConfirmation] + ), + skip_confirmation=utils.get_pydantic_model( + skip_confirmation, OptionalNullable[models.SkipConfirmation] + ), + include=include, + exclude=exclude, + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/connectors/{connector_id}/organization/activate", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.tool_execution_configuration if request is not None else None, + True, + True, + "json", + OptionalNullable[models.ToolExecutionConfiguration], + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_activate_for_organization_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def deactivate_for_organization( + self, + *, + connector_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Deactivate a connector for an organization. + + Disable a connector at the organization level. + + :param connector_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorDeactivateForOrganizationV1Request( + connector_id=connector_id, + ) + + req = self._build_request( + method="POST", + path="/v1/connectors/{connector_id}/organization/deactivate", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_deactivate_for_organization_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def deactivate_for_organization_async( + self, + *, + connector_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Deactivate a connector for an organization. + + Disable a connector at the organization level. + + :param connector_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorDeactivateForOrganizationV1Request( + connector_id=connector_id, + ) + + req = self._build_request_async( + method="POST", + path="/v1/connectors/{connector_id}/organization/deactivate", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_deactivate_for_organization_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def activate_for_workspace( + self, + *, + connector_id: str, + requires_confirmation: OptionalNullable[ + Union[models.RequiresConfirmation, models.RequiresConfirmationTypedDict] + ] = UNSET, + skip_confirmation: OptionalNullable[ + Union[models.SkipConfirmation, models.SkipConfirmationTypedDict] + ] = UNSET, + include: OptionalNullable[List[str]] = UNSET, + exclude: OptionalNullable[List[str]] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Activate a connector for a workspace. + + Enable a connector at the workspace level so all members of the workspace can use it. + + :param connector_id: + :param requires_confirmation: + :param skip_confirmation: + :param include: + :param exclude: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorActivateForWorkspaceV1Request( + connector_id=connector_id, + tool_execution_configuration=models.ToolExecutionConfiguration( + requires_confirmation=utils.get_pydantic_model( + requires_confirmation, OptionalNullable[models.RequiresConfirmation] + ), + skip_confirmation=utils.get_pydantic_model( + skip_confirmation, OptionalNullable[models.SkipConfirmation] + ), + include=include, + exclude=exclude, + ), + ) + + req = self._build_request( + method="POST", + path="/v1/connectors/{connector_id}/workspace/activate", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.tool_execution_configuration if request is not None else None, + True, + True, + "json", + OptionalNullable[models.ToolExecutionConfiguration], + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_activate_for_workspace_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def activate_for_workspace_async( + self, + *, + connector_id: str, + requires_confirmation: OptionalNullable[ + Union[models.RequiresConfirmation, models.RequiresConfirmationTypedDict] + ] = UNSET, + skip_confirmation: OptionalNullable[ + Union[models.SkipConfirmation, models.SkipConfirmationTypedDict] + ] = UNSET, + include: OptionalNullable[List[str]] = UNSET, + exclude: OptionalNullable[List[str]] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Activate a connector for a workspace. + + Enable a connector at the workspace level so all members of the workspace can use it. + + :param connector_id: + :param requires_confirmation: + :param skip_confirmation: + :param include: + :param exclude: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorActivateForWorkspaceV1Request( + connector_id=connector_id, + tool_execution_configuration=models.ToolExecutionConfiguration( + requires_confirmation=utils.get_pydantic_model( + requires_confirmation, OptionalNullable[models.RequiresConfirmation] + ), + skip_confirmation=utils.get_pydantic_model( + skip_confirmation, OptionalNullable[models.SkipConfirmation] + ), + include=include, + exclude=exclude, + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/connectors/{connector_id}/workspace/activate", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.tool_execution_configuration if request is not None else None, + True, + True, + "json", + OptionalNullable[models.ToolExecutionConfiguration], + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_activate_for_workspace_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def deactivate_for_workspace( + self, + *, + connector_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Deactivate a connector for a workspace. + + Disable a connector at the workspace level. + + :param connector_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorDeactivateForWorkspaceV1Request( + connector_id=connector_id, + ) + + req = self._build_request( + method="POST", + path="/v1/connectors/{connector_id}/workspace/deactivate", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_deactivate_for_workspace_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def deactivate_for_workspace_async( + self, + *, + connector_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Deactivate a connector for a workspace. + + Disable a connector at the workspace level. + + :param connector_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorDeactivateForWorkspaceV1Request( + connector_id=connector_id, + ) + + req = self._build_request_async( + method="POST", + path="/v1/connectors/{connector_id}/workspace/deactivate", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_deactivate_for_workspace_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def activate_for_user( + self, + *, + connector_id: str, + requires_confirmation: OptionalNullable[ + Union[models.RequiresConfirmation, models.RequiresConfirmationTypedDict] + ] = UNSET, + skip_confirmation: OptionalNullable[ + Union[models.SkipConfirmation, models.SkipConfirmationTypedDict] + ] = UNSET, + include: OptionalNullable[List[str]] = UNSET, + exclude: OptionalNullable[List[str]] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Activate a connector for the current user. + + Enable a connector for the calling user only. + + :param connector_id: + :param requires_confirmation: + :param skip_confirmation: + :param include: + :param exclude: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorActivateForUserV1Request( + connector_id=connector_id, + tool_execution_configuration=models.ToolExecutionConfiguration( + requires_confirmation=utils.get_pydantic_model( + requires_confirmation, OptionalNullable[models.RequiresConfirmation] + ), + skip_confirmation=utils.get_pydantic_model( + skip_confirmation, OptionalNullable[models.SkipConfirmation] + ), + include=include, + exclude=exclude, + ), + ) + + req = self._build_request( + method="POST", + path="/v1/connectors/{connector_id}/user/activate", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.tool_execution_configuration if request is not None else None, + True, + True, + "json", + OptionalNullable[models.ToolExecutionConfiguration], + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_activate_for_user_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def activate_for_user_async( + self, + *, + connector_id: str, + requires_confirmation: OptionalNullable[ + Union[models.RequiresConfirmation, models.RequiresConfirmationTypedDict] + ] = UNSET, + skip_confirmation: OptionalNullable[ + Union[models.SkipConfirmation, models.SkipConfirmationTypedDict] + ] = UNSET, + include: OptionalNullable[List[str]] = UNSET, + exclude: OptionalNullable[List[str]] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Activate a connector for the current user. + + Enable a connector for the calling user only. + + :param connector_id: + :param requires_confirmation: + :param skip_confirmation: + :param include: + :param exclude: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorActivateForUserV1Request( + connector_id=connector_id, + tool_execution_configuration=models.ToolExecutionConfiguration( + requires_confirmation=utils.get_pydantic_model( + requires_confirmation, OptionalNullable[models.RequiresConfirmation] + ), + skip_confirmation=utils.get_pydantic_model( + skip_confirmation, OptionalNullable[models.SkipConfirmation] + ), + include=include, + exclude=exclude, + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/connectors/{connector_id}/user/activate", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.tool_execution_configuration if request is not None else None, + True, + True, + "json", + OptionalNullable[models.ToolExecutionConfiguration], + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_activate_for_user_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def deactivate_for_user( + self, + *, + connector_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Deactivate a connector for the current user. + + Disable a connector for the calling user only. + + :param connector_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorDeactivateForUserV1Request( + connector_id=connector_id, + ) + + req = self._build_request( + method="POST", + path="/v1/connectors/{connector_id}/user/deactivate", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_deactivate_for_user_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def deactivate_for_user_async( + self, + *, + connector_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Deactivate a connector for the current user. + + Disable a connector for the calling user only. + + :param connector_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorDeactivateForUserV1Request( + connector_id=connector_id, + ) + + req = self._build_request_async( + method="POST", + path="/v1/connectors/{connector_id}/user/deactivate", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_deactivate_for_user_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + def call_tool( self, *, @@ -3150,7 +4440,6 @@ def get( *, connector_id_or_name: str, fetch_customer_data: Optional[bool] = False, - fetch_connection_secrets: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -3162,7 +4451,6 @@ def get( :param connector_id_or_name: :param fetch_customer_data: Fetch the customer data associated with the connector (e.g. customer secrets / config). - :param fetch_connection_secrets: Fetch the general connection secrets associated with the connector. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -3183,7 +4471,6 @@ def get( request = models.ConnectorGetV1Request( fetch_customer_data=fetch_customer_data, - fetch_connection_secrets=fetch_connection_secrets, connector_id_or_name=connector_id_or_name, ) @@ -3249,7 +4536,6 @@ async def get_async( *, connector_id_or_name: str, fetch_customer_data: Optional[bool] = False, - fetch_connection_secrets: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -3261,7 +4547,6 @@ async def get_async( :param connector_id_or_name: :param fetch_customer_data: Fetch the customer data associated with the connector (e.g. customer secrets / config). - :param fetch_connection_secrets: Fetch the general connection secrets associated with the connector. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -3282,7 +4567,6 @@ async def get_async( request = models.ConnectorGetV1Request( fetch_customer_data=fetch_customer_data, - fetch_connection_secrets=fetch_connection_secrets, connector_id_or_name=connector_id_or_name, ) diff --git a/src/mistralai/client/documents.py b/src/mistralai/client/documents.py index 2a555d3e..ff38aca6 100644 --- a/src/mistralai/client/documents.py +++ b/src/mistralai/client/documents.py @@ -2,12 +2,14 @@ # @generated-id: bcc17286c31c from .basesdk import BaseSDK +from datetime import datetime from mistralai.client import errors, models, utils from mistralai.client._hooks import HookContext from mistralai.client.types import OptionalNullable, UNSET from mistralai.client.utils import get_security_from_env from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, Dict, Mapping, Optional, Union +from typing_extensions import deprecated class Documents(BaseSDK): @@ -36,7 +38,7 @@ def list( :param search: :param page_size: :param page: - :param filters_attributes: + :param filters_attributes: Deprecated: this parameter will be removed in a future version. :param sort_by: :param sort_order: :param retries: Override the default retry configuration for this method @@ -147,7 +149,7 @@ async def list_async( :param search: :param page_size: :param page: - :param filters_attributes: + :param filters_attributes: Deprecated: this parameter will be removed in a future version. :param sort_by: :param sort_order: :param retries: Override the default retry configuration for this method @@ -654,6 +656,242 @@ def update( attributes: OptionalNullable[ Union[Dict[str, models.Attributes], Dict[str, models.AttributesTypedDict]] ] = UNSET, + expires_at: OptionalNullable[datetime] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Document: + r"""Update the metadata of a specific document. + + Given a library and a document in that library, update the name and/or attributes of that document. + + :param library_id: + :param document_id: + :param name: + :param attributes: + :param expires_at: If set, the document will be automatically deleted after this date. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.LibrariesDocumentsPatchV1Request( + library_id=library_id, + document_id=document_id, + update_document_request=models.UpdateDocumentRequest( + name=name, + attributes=attributes, + expires_at=expires_at, + ), + ) + + req = self._build_request( + method="PATCH", + path="/v1/libraries/{library_id}/documents/{document_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.update_document_request, + False, + False, + "json", + models.UpdateDocumentRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="libraries_documents_patch_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.Document, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def update_async( + self, + *, + library_id: str, + document_id: str, + name: Optional[str] = None, + attributes: OptionalNullable[ + Union[Dict[str, models.Attributes], Dict[str, models.AttributesTypedDict]] + ] = UNSET, + expires_at: OptionalNullable[datetime] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Document: + r"""Update the metadata of a specific document. + + Given a library and a document in that library, update the name and/or attributes of that document. + + :param library_id: + :param document_id: + :param name: + :param attributes: + :param expires_at: If set, the document will be automatically deleted after this date. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.LibrariesDocumentsPatchV1Request( + library_id=library_id, + document_id=document_id, + update_document_request=models.UpdateDocumentRequest( + name=name, + attributes=attributes, + expires_at=expires_at, + ), + ) + + req = self._build_request_async( + method="PATCH", + path="/v1/libraries/{library_id}/documents/{document_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.update_document_request, + False, + False, + "json", + models.UpdateDocumentRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="libraries_documents_patch_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.Document, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + @deprecated( + "warning: ** DEPRECATED ** - Use the PATCH method instead. This PUT endpoint will be removed in a future version.." + ) + def libraries_documents_update_v1( + self, + *, + library_id: str, + document_id: str, + name: Optional[str] = None, + attributes: OptionalNullable[ + Union[Dict[str, models.Attributes], Dict[str, models.AttributesTypedDict]] + ] = UNSET, + expires_at: OptionalNullable[datetime] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -667,6 +905,7 @@ def update( :param document_id: :param name: :param attributes: + :param expires_at: If set, the document will be automatically deleted after this date. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -691,6 +930,7 @@ def update( update_document_request=models.UpdateDocumentRequest( name=name, attributes=attributes, + expires_at=expires_at, ), ) @@ -758,7 +998,10 @@ def update( raise errors.SDKError("Unexpected response received", http_res) - async def update_async( + @deprecated( + "warning: ** DEPRECATED ** - Use the PATCH method instead. This PUT endpoint will be removed in a future version.." + ) + async def libraries_documents_update_v1_async( self, *, library_id: str, @@ -767,6 +1010,7 @@ async def update_async( attributes: OptionalNullable[ Union[Dict[str, models.Attributes], Dict[str, models.AttributesTypedDict]] ] = UNSET, + expires_at: OptionalNullable[datetime] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -780,6 +1024,7 @@ async def update_async( :param document_id: :param name: :param attributes: + :param expires_at: If set, the document will be automatically deleted after this date. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -804,6 +1049,7 @@ async def update_async( update_document_request=models.UpdateDocumentRequest( name=name, attributes=attributes, + expires_at=expires_at, ), ) diff --git a/src/mistralai/client/libraries.py b/src/mistralai/client/libraries.py index 928c1ea8..cded7a36 100644 --- a/src/mistralai/client/libraries.py +++ b/src/mistralai/client/libraries.py @@ -11,6 +11,7 @@ from mistralai.client.utils import get_security_from_env from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, Mapping, Optional +from typing_extensions import deprecated class Libraries(BaseSDK): @@ -51,7 +52,7 @@ def list( :param page_size: :param page: :param search: Case-insensitive search on the library name. - :param filter_owned_by_me: Filter libraries by whether they were created by the current authenticated identity. Set to true for created by me, false for only libraries shared with me, or None to disable this filter. + :param filter_owned_by_me: Deprecated: this parameter will be removed in a future version. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -153,7 +154,7 @@ async def list_async( :param page_size: :param page: :param search: Case-insensitive search on the library name. - :param filter_owned_by_me: Filter libraries by whether they were created by the current authenticated identity. Set to true for created by me, false for only libraries shared with me, or None to disable this filter. + :param filter_owned_by_me: Deprecated: this parameter will be removed in a future version. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -643,7 +644,7 @@ def delete( ) -> models.Library: r"""Delete a library and all of it's document. - Given a library id, deletes it together with all documents that have been uploaded to that library. + Given a library id, deletes it together with all documents that have been uploaded to that library. Warning: the response will change from 200 (returning the deleted library) to 204 No Content in a future version. :param library_id: :param retries: Override the default retry configuration for this method @@ -736,7 +737,7 @@ async def delete_async( ) -> models.Library: r"""Delete a library and all of it's document. - Given a library id, deletes it together with all documents that have been uploaded to that library. + Given a library id, deletes it together with all documents that have been uploaded to that library. Warning: the response will change from 200 (returning the deleted library) to 204 No Content in a future version. :param library_id: :param retries: Override the default retry configuration for this method @@ -833,6 +834,225 @@ def update( Given a library id, you can update the name and description. + :param library_id: + :param name: + :param description: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.LibrariesPatchV1Request( + library_id=library_id, + update_library_request=models.UpdateLibraryRequest( + name=name, + description=description, + ), + ) + + req = self._build_request( + method="PATCH", + path="/v1/libraries/{library_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.update_library_request, + False, + False, + "json", + models.UpdateLibraryRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="libraries_patch_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.Library, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def update_async( + self, + *, + library_id: str, + name: Optional[str] = None, + description: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Library: + r"""Update a library. + + Given a library id, you can update the name and description. + + :param library_id: + :param name: + :param description: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.LibrariesPatchV1Request( + library_id=library_id, + update_library_request=models.UpdateLibraryRequest( + name=name, + description=description, + ), + ) + + req = self._build_request_async( + method="PATCH", + path="/v1/libraries/{library_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.update_library_request, + False, + False, + "json", + models.UpdateLibraryRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="libraries_patch_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.Library, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + @deprecated( + "warning: ** DEPRECATED ** - Use the PATCH method instead. This PUT endpoint will be removed in a future version.." + ) + def libraries_update_v1( + self, + *, + library_id: str, + name: Optional[str] = None, + description: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Library: + r"""Update a library. + + Given a library id, you can update the name and description. + :param library_id: :param name: :param description: @@ -926,7 +1146,10 @@ def update( raise errors.SDKError("Unexpected response received", http_res) - async def update_async( + @deprecated( + "warning: ** DEPRECATED ** - Use the PATCH method instead. This PUT endpoint will be removed in a future version.." + ) + async def libraries_update_v1_async( self, *, library_id: str, diff --git a/src/mistralai/client/models/__init__.py b/src/mistralai/client/models/__init__.py index ab36240c..0f58dab1 100644 --- a/src/mistralai/client/models/__init__.py +++ b/src/mistralai/client/models/__init__.py @@ -9,6 +9,13 @@ Or, OrTypedDict, ) +from .logicalexpression import ( + Expression, + ExpressionTypedDict, + LogicalExpression, + LogicalExpressionType, + LogicalExpressionTypedDict, +) from typing import Any, TYPE_CHECKING from mistralai.client.utils.dynamic_imports import lazy_getattr, lazy_dir @@ -393,6 +400,18 @@ ConnectionCredentialsTypedDict, ) from .connector import Connector, ConnectorTypedDict + from .connector_activate_for_organization_v1op import ( + ConnectorActivateForOrganizationV1Request, + ConnectorActivateForOrganizationV1RequestTypedDict, + ) + from .connector_activate_for_user_v1op import ( + ConnectorActivateForUserV1Request, + ConnectorActivateForUserV1RequestTypedDict, + ) + from .connector_activate_for_workspace_v1op import ( + ConnectorActivateForWorkspaceV1Request, + ConnectorActivateForWorkspaceV1RequestTypedDict, + ) from .connector_call_tool_v1op import ( ConnectorCallToolV1Request, ConnectorCallToolV1RequestTypedDict, @@ -409,6 +428,18 @@ ConnectorCreateOrUpdateWorkspaceCredentialsV1Request, ConnectorCreateOrUpdateWorkspaceCredentialsV1RequestTypedDict, ) + from .connector_deactivate_for_organization_v1op import ( + ConnectorDeactivateForOrganizationV1Request, + ConnectorDeactivateForOrganizationV1RequestTypedDict, + ) + from .connector_deactivate_for_user_v1op import ( + ConnectorDeactivateForUserV1Request, + ConnectorDeactivateForUserV1RequestTypedDict, + ) + from .connector_deactivate_for_workspace_v1op import ( + ConnectorDeactivateForWorkspaceV1Request, + ConnectorDeactivateForWorkspaceV1RequestTypedDict, + ) from .connector_delete_organization_credentials_v1op import ( ConnectorDeleteOrganizationCredentialsV1Request, ConnectorDeleteOrganizationCredentialsV1RequestTypedDict, @@ -492,6 +523,7 @@ ConnectorToolResultMetadata, ConnectorToolResultMetadataTypedDict, ) + from .consumertype import ConsumerType from .contentchunk import ContentChunk, ContentChunkTypedDict, UnknownContentChunk from .conversationappendrequest import ( ConversationAppendRequest, @@ -625,6 +657,21 @@ CreateLibraryRequestTypedDict, OwnerType, ) + from .createsearchindexinforequest import ( + CreateSearchIndexInfoRequest, + CreateSearchIndexInfoRequestIndex, + CreateSearchIndexInfoRequestIndexTypedDict, + CreateSearchIndexInfoRequestStatus, + CreateSearchIndexInfoRequestTypedDict, + ) + from .createvespaschemarequest import ( + CreateVespaSchemaRequest, + CreateVespaSchemaRequestTypedDict, + ) + from .createvespasearchindexinforequest import ( + CreateVespaSearchIndexInfoRequest, + CreateVespaSearchIndexInfoRequestTypedDict, + ) from .credentialscreateorupdate import ( CredentialsCreateOrUpdate, CredentialsCreateOrUpdateTypedDict, @@ -985,6 +1032,10 @@ GetRunV1WorkflowsRunsRunIDGetRequest, GetRunV1WorkflowsRunsRunIDGetRequestTypedDict, ) + from .get_schedule_v1_workflows_schedules_schedule_id_getop import ( + GetScheduleV1WorkflowsSchedulesScheduleIDGetRequest, + GetScheduleV1WorkflowsSchedulesScheduleIDGetRequestTypedDict, + ) from .get_similar_chat_completion_events_v1_observability_chat_completion_events_event_id_similar_events_getop import ( GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequest, GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequestTypedDict, @@ -1258,6 +1309,10 @@ LibrariesDocumentsListV1Request, LibrariesDocumentsListV1RequestTypedDict, ) + from .libraries_documents_patch_v1op import ( + LibrariesDocumentsPatchV1Request, + LibrariesDocumentsPatchV1RequestTypedDict, + ) from .libraries_documents_reprocess_v1op import ( LibrariesDocumentsReprocessV1Request, LibrariesDocumentsReprocessV1RequestTypedDict, @@ -1280,6 +1335,10 @@ LibrariesListV1Request, LibrariesListV1RequestTypedDict, ) + from .libraries_patch_v1op import ( + LibrariesPatchV1Request, + LibrariesPatchV1RequestTypedDict, + ) from .libraries_share_create_v1op import ( LibrariesShareCreateV1Request, LibrariesShareCreateV1RequestTypedDict, @@ -1499,6 +1558,10 @@ ) from .paginationinfo import PaginationInfo, PaginationInfoTypedDict from .paginationresponse import PaginationResponse, PaginationResponseTypedDict + from .partialscheduledefinition import ( + PartialScheduleDefinition, + PartialScheduleDefinitionTypedDict, + ) from .pause_schedule_v1_workflows_schedules_schedule_id_pause_postop import ( PauseScheduleV1WorkflowsSchedulesScheduleIDPausePostRequest, PauseScheduleV1WorkflowsSchedulesScheduleIDPausePostRequestTypedDict, @@ -1664,6 +1727,14 @@ SearchChatCompletionEventsResponse, SearchChatCompletionEventsResponseTypedDict, ) + from .searchindexresponse import ( + SearchIndexResponse, + SearchIndexResponseIndex, + SearchIndexResponseIndexTypedDict, + SearchIndexResponseStatus, + SearchIndexResponseTypedDict, + UnknownSearchIndexResponseIndex, + ) from .security import Security, SecurityTypedDict from .shareenum import ShareEnum from .sharing import Sharing, SharingTypedDict @@ -1806,6 +1877,14 @@ from .toolchoiceenum import ToolChoiceEnum from .toolconfiguration import ToolConfiguration, ToolConfigurationTypedDict from .toolexecution import TaskSupport, ToolExecution, ToolExecutionTypedDict + from .toolexecutionconfiguration import ( + RequiresConfirmation, + RequiresConfirmationTypedDict, + SkipConfirmation, + SkipConfirmationTypedDict, + ToolExecutionConfiguration, + ToolExecutionConfigurationTypedDict, + ) from .toolexecutiondeltaevent import ( ToolExecutionDeltaEvent, ToolExecutionDeltaEventName, @@ -1842,6 +1921,7 @@ ToolMessageContentTypedDict, ToolMessageTypedDict, ) + from .toolproperties import ToolProperties, ToolPropertiesTypedDict from .toolreferencechunk import ( ToolReferenceChunk, ToolReferenceChunkTool, @@ -1916,6 +1996,10 @@ UpdateRunInfoV1RagIngestionPipelineConfigurationsIDRunInfoPutRequest, UpdateRunInfoV1RagIngestionPipelineConfigurationsIDRunInfoPutRequestTypedDict, ) + from .update_schedule_v1_workflows_schedules_schedule_id_patchop import ( + UpdateScheduleV1WorkflowsSchedulesScheduleIDPatchRequest, + UpdateScheduleV1WorkflowsSchedulesScheduleIDPatchRequestTypedDict, + ) from .update_voice_v1_audio_voices_voice_id_patchop import ( UpdateVoiceV1AudioVoicesVoiceIDPatchRequest, UpdateVoiceV1AudioVoicesVoiceIDPatchRequestTypedDict, @@ -1995,6 +2079,11 @@ ValidationError, ValidationErrorTypedDict, ) + from .vespaschemaresponse import VespaSchemaResponse, VespaSchemaResponseTypedDict + from .vespasearchindexinforesponse import ( + VespaSearchIndexInfoResponse, + VespaSearchIndexInfoResponseTypedDict, + ) from .voicecreaterequest import VoiceCreateRequest, VoiceCreateRequestTypedDict from .voicelistresponse import VoiceListResponse, VoiceListResponseTypedDict from .voiceresponse import VoiceResponse, VoiceResponseTypedDict @@ -2153,6 +2242,10 @@ WorkflowScheduleResponse, WorkflowScheduleResponseTypedDict, ) + from .workflowscheduleupdaterequest import ( + WorkflowScheduleUpdateRequest, + WorkflowScheduleUpdateRequestTypedDict, + ) from .workflowtaskfailedattributes import ( WorkflowTaskFailedAttributes, WorkflowTaskFailedAttributesTypedDict, @@ -2187,6 +2280,7 @@ WorkflowWithWorkerStatusTypedDict, ) # Pydantic models with forward references FilterGroup.model_rebuild() +LogicalExpression.model_rebuild() __all__ = [ @@ -2460,6 +2554,12 @@ "ConnectionCredentials", "ConnectionCredentialsTypedDict", "Connector", + "ConnectorActivateForOrganizationV1Request", + "ConnectorActivateForOrganizationV1RequestTypedDict", + "ConnectorActivateForUserV1Request", + "ConnectorActivateForUserV1RequestTypedDict", + "ConnectorActivateForWorkspaceV1Request", + "ConnectorActivateForWorkspaceV1RequestTypedDict", "ConnectorAuthenticationHeader", "ConnectorAuthenticationHeaderTypedDict", "ConnectorCallToolRequest", @@ -2472,6 +2572,12 @@ "ConnectorCreateOrUpdateUserCredentialsV1RequestTypedDict", "ConnectorCreateOrUpdateWorkspaceCredentialsV1Request", "ConnectorCreateOrUpdateWorkspaceCredentialsV1RequestTypedDict", + "ConnectorDeactivateForOrganizationV1Request", + "ConnectorDeactivateForOrganizationV1RequestTypedDict", + "ConnectorDeactivateForUserV1Request", + "ConnectorDeactivateForUserV1RequestTypedDict", + "ConnectorDeactivateForWorkspaceV1Request", + "ConnectorDeactivateForWorkspaceV1RequestTypedDict", "ConnectorDeleteOrganizationCredentialsV1Request", "ConnectorDeleteOrganizationCredentialsV1RequestTypedDict", "ConnectorDeleteUserCredentialsV1Request", @@ -2513,6 +2619,7 @@ "ConnectorUpdateV1RequestTypedDict", "ConnectorsQueryFilters", "ConnectorsQueryFiltersTypedDict", + "ConsumerType", "ContentChunk", "ContentChunkTypedDict", "Context", @@ -2600,6 +2707,15 @@ "CreateJudgeRequestTypedDict", "CreateLibraryRequest", "CreateLibraryRequestTypedDict", + "CreateSearchIndexInfoRequest", + "CreateSearchIndexInfoRequestIndex", + "CreateSearchIndexInfoRequestIndexTypedDict", + "CreateSearchIndexInfoRequestStatus", + "CreateSearchIndexInfoRequestTypedDict", + "CreateVespaSchemaRequest", + "CreateVespaSchemaRequestTypedDict", + "CreateVespaSearchIndexInfoRequest", + "CreateVespaSearchIndexInfoRequestTypedDict", "CredentialsCreateOrUpdate", "CredentialsCreateOrUpdateTypedDict", "CredentialsResponse", @@ -2715,6 +2831,8 @@ "ExportDatasetResponseTypedDict", "ExportDatasetToJsonlV1ObservabilityDatasetsDatasetIDExportsToJsonlGetRequest", "ExportDatasetToJsonlV1ObservabilityDatasetsDatasetIDExportsToJsonlGetRequestTypedDict", + "Expression", + "ExpressionTypedDict", "FIMCompletionRequest", "FIMCompletionRequestStop", "FIMCompletionRequestStopTypedDict", @@ -2833,6 +2951,8 @@ "GetRunHistoryV1WorkflowsRunsRunIDHistoryGetRequestTypedDict", "GetRunV1WorkflowsRunsRunIDGetRequest", "GetRunV1WorkflowsRunsRunIDGetRequestTypedDict", + "GetScheduleV1WorkflowsSchedulesScheduleIDGetRequest", + "GetScheduleV1WorkflowsSchedulesScheduleIDGetRequestTypedDict", "GetSignedURLResponse", "GetSignedURLResponseTypedDict", "GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequest", @@ -3002,6 +3122,8 @@ "LibrariesDocumentsGetV1RequestTypedDict", "LibrariesDocumentsListV1Request", "LibrariesDocumentsListV1RequestTypedDict", + "LibrariesDocumentsPatchV1Request", + "LibrariesDocumentsPatchV1RequestTypedDict", "LibrariesDocumentsReprocessV1Request", "LibrariesDocumentsReprocessV1RequestTypedDict", "LibrariesDocumentsUpdateV1Request", @@ -3012,6 +3134,8 @@ "LibrariesGetV1RequestTypedDict", "LibrariesListV1Request", "LibrariesListV1RequestTypedDict", + "LibrariesPatchV1Request", + "LibrariesPatchV1RequestTypedDict", "LibrariesShareCreateV1Request", "LibrariesShareCreateV1RequestTypedDict", "LibrariesShareDeleteV1Request", @@ -3070,6 +3194,9 @@ "Loc", "LocTypedDict", "LocationType", + "LogicalExpression", + "LogicalExpressionType", + "LogicalExpressionTypedDict", "MCPServerIcon", "MCPServerIconTypedDict", "MCPTool", @@ -3186,6 +3313,8 @@ "PaginationInfoTypedDict", "PaginationResponse", "PaginationResponseTypedDict", + "PartialScheduleDefinition", + "PartialScheduleDefinitionTypedDict", "PauseScheduleV1WorkflowsSchedulesScheduleIDPausePostRequest", "PauseScheduleV1WorkflowsSchedulesScheduleIDPausePostRequestTypedDict", "Payload", @@ -3247,6 +3376,8 @@ "ReferenceID", "ReferenceIDTypedDict", "RequestSource", + "RequiresConfirmation", + "RequiresConfirmationTypedDict", "ResetInvocationBody", "ResetInvocationBodyTypedDict", "ResetWorkflowV1WorkflowsExecutionsExecutionIDResetPostRequest", @@ -3315,6 +3446,11 @@ "SearchChatCompletionEventsRequestTypedDict", "SearchChatCompletionEventsResponse", "SearchChatCompletionEventsResponseTypedDict", + "SearchIndexResponse", + "SearchIndexResponseIndex", + "SearchIndexResponseIndexTypedDict", + "SearchIndexResponseStatus", + "SearchIndexResponseTypedDict", "Security", "SecurityTypedDict", "ShareEnum", @@ -3336,6 +3472,8 @@ "SignalWorkflowExecutionV1WorkflowsExecutionsExecutionIDSignalsPostRequestTypedDict", "SignalWorkflowResponse", "SignalWorkflowResponseTypedDict", + "SkipConfirmation", + "SkipConfirmationTypedDict", "Source", "SpeechOutputFormat", "SpeechRequest", @@ -3435,6 +3573,8 @@ "ToolConfiguration", "ToolConfigurationTypedDict", "ToolExecution", + "ToolExecutionConfiguration", + "ToolExecutionConfigurationTypedDict", "ToolExecutionDeltaEvent", "ToolExecutionDeltaEventName", "ToolExecutionDeltaEventNameTypedDict", @@ -3460,6 +3600,8 @@ "ToolMessageContent", "ToolMessageContentTypedDict", "ToolMessageTypedDict", + "ToolProperties", + "ToolPropertiesTypedDict", "ToolReferenceChunk", "ToolReferenceChunkTool", "ToolReferenceChunkToolTypedDict", @@ -3516,6 +3658,7 @@ "UnknownPayload", "UnknownResponse", "UnknownResponseRetrieveModelV1ModelsModelIDGet", + "UnknownSearchIndexResponseIndex", "UnknownSpeechV1AudioSpeechPostData", "UnknownTranscriptionStreamEventsData", "UnscheduleWorkflowV1WorkflowsSchedulesScheduleIDDeleteRequest", @@ -3560,6 +3703,8 @@ "UpdateRunInfoTypedDict", "UpdateRunInfoV1RagIngestionPipelineConfigurationsIDRunInfoPutRequest", "UpdateRunInfoV1RagIngestionPipelineConfigurationsIDRunInfoPutRequestTypedDict", + "UpdateScheduleV1WorkflowsSchedulesScheduleIDPatchRequest", + "UpdateScheduleV1WorkflowsSchedulesScheduleIDPatchRequestTypedDict", "UpdateVoiceV1AudioVoicesVoiceIDPatchRequest", "UpdateVoiceV1AudioVoicesVoiceIDPatchRequestTypedDict", "UpdateWorkflowExecutionV1WorkflowsExecutionsExecutionIDUpdatesPostRequest", @@ -3578,6 +3723,10 @@ "UserMessageTypedDict", "ValidationError", "ValidationErrorTypedDict", + "VespaSchemaResponse", + "VespaSchemaResponseTypedDict", + "VespaSearchIndexInfoResponse", + "VespaSearchIndexInfoResponseTypedDict", "Visibility", "VoiceCreateRequest", "VoiceCreateRequestTypedDict", @@ -3674,6 +3823,8 @@ "WorkflowScheduleRequestTypedDict", "WorkflowScheduleResponse", "WorkflowScheduleResponseTypedDict", + "WorkflowScheduleUpdateRequest", + "WorkflowScheduleUpdateRequestTypedDict", "WorkflowTaskFailedAttributes", "WorkflowTaskFailedAttributesTypedDict", "WorkflowTaskFailedResponse", @@ -3964,6 +4115,12 @@ "ConnectionCredentialsTypedDict": ".connectioncredentials", "Connector": ".connector", "ConnectorTypedDict": ".connector", + "ConnectorActivateForOrganizationV1Request": ".connector_activate_for_organization_v1op", + "ConnectorActivateForOrganizationV1RequestTypedDict": ".connector_activate_for_organization_v1op", + "ConnectorActivateForUserV1Request": ".connector_activate_for_user_v1op", + "ConnectorActivateForUserV1RequestTypedDict": ".connector_activate_for_user_v1op", + "ConnectorActivateForWorkspaceV1Request": ".connector_activate_for_workspace_v1op", + "ConnectorActivateForWorkspaceV1RequestTypedDict": ".connector_activate_for_workspace_v1op", "ConnectorCallToolV1Request": ".connector_call_tool_v1op", "ConnectorCallToolV1RequestTypedDict": ".connector_call_tool_v1op", "ConnectorCreateOrUpdateOrganizationCredentialsV1Request": ".connector_create_or_update_organization_credentials_v1op", @@ -3972,6 +4129,12 @@ "ConnectorCreateOrUpdateUserCredentialsV1RequestTypedDict": ".connector_create_or_update_user_credentials_v1op", "ConnectorCreateOrUpdateWorkspaceCredentialsV1Request": ".connector_create_or_update_workspace_credentials_v1op", "ConnectorCreateOrUpdateWorkspaceCredentialsV1RequestTypedDict": ".connector_create_or_update_workspace_credentials_v1op", + "ConnectorDeactivateForOrganizationV1Request": ".connector_deactivate_for_organization_v1op", + "ConnectorDeactivateForOrganizationV1RequestTypedDict": ".connector_deactivate_for_organization_v1op", + "ConnectorDeactivateForUserV1Request": ".connector_deactivate_for_user_v1op", + "ConnectorDeactivateForUserV1RequestTypedDict": ".connector_deactivate_for_user_v1op", + "ConnectorDeactivateForWorkspaceV1Request": ".connector_deactivate_for_workspace_v1op", + "ConnectorDeactivateForWorkspaceV1RequestTypedDict": ".connector_deactivate_for_workspace_v1op", "ConnectorDeleteOrganizationCredentialsV1Request": ".connector_delete_organization_credentials_v1op", "ConnectorDeleteOrganizationCredentialsV1RequestTypedDict": ".connector_delete_organization_credentials_v1op", "ConnectorDeleteUserCredentialsV1Request": ".connector_delete_user_credentials_v1op", @@ -4019,6 +4182,7 @@ "ConnectorToolLocaleTypedDict": ".connectortoollocale", "ConnectorToolResultMetadata": ".connectortoolresultmetadata", "ConnectorToolResultMetadataTypedDict": ".connectortoolresultmetadata", + "ConsumerType": ".consumertype", "ContentChunk": ".contentchunk", "ContentChunkTypedDict": ".contentchunk", "UnknownContentChunk": ".contentchunk", @@ -4111,6 +4275,15 @@ "CreateLibraryRequest": ".createlibraryrequest", "CreateLibraryRequestTypedDict": ".createlibraryrequest", "OwnerType": ".createlibraryrequest", + "CreateSearchIndexInfoRequest": ".createsearchindexinforequest", + "CreateSearchIndexInfoRequestIndex": ".createsearchindexinforequest", + "CreateSearchIndexInfoRequestIndexTypedDict": ".createsearchindexinforequest", + "CreateSearchIndexInfoRequestStatus": ".createsearchindexinforequest", + "CreateSearchIndexInfoRequestTypedDict": ".createsearchindexinforequest", + "CreateVespaSchemaRequest": ".createvespaschemarequest", + "CreateVespaSchemaRequestTypedDict": ".createvespaschemarequest", + "CreateVespaSearchIndexInfoRequest": ".createvespasearchindexinforequest", + "CreateVespaSearchIndexInfoRequestTypedDict": ".createvespasearchindexinforequest", "CredentialsCreateOrUpdate": ".credentialscreateorupdate", "CredentialsCreateOrUpdateTypedDict": ".credentialscreateorupdate", "CredentialsResponse": ".credentialsresponse", @@ -4353,6 +4526,8 @@ "GetRunHistoryV1WorkflowsRunsRunIDHistoryGetRequestTypedDict": ".get_run_history_v1_workflows_runs_run_id_history_getop", "GetRunV1WorkflowsRunsRunIDGetRequest": ".get_run_v1_workflows_runs_run_id_getop", "GetRunV1WorkflowsRunsRunIDGetRequestTypedDict": ".get_run_v1_workflows_runs_run_id_getop", + "GetScheduleV1WorkflowsSchedulesScheduleIDGetRequest": ".get_schedule_v1_workflows_schedules_schedule_id_getop", + "GetScheduleV1WorkflowsSchedulesScheduleIDGetRequestTypedDict": ".get_schedule_v1_workflows_schedules_schedule_id_getop", "GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequest": ".get_similar_chat_completion_events_v1_observability_chat_completion_events_event_id_similar_events_getop", "GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequestTypedDict": ".get_similar_chat_completion_events_v1_observability_chat_completion_events_event_id_similar_events_getop", "GetStreamEventsV1WorkflowsEventsStreamGetRequest": ".get_stream_events_v1_workflows_events_stream_getop", @@ -4535,6 +4710,8 @@ "LibrariesDocumentsGetV1RequestTypedDict": ".libraries_documents_get_v1op", "LibrariesDocumentsListV1Request": ".libraries_documents_list_v1op", "LibrariesDocumentsListV1RequestTypedDict": ".libraries_documents_list_v1op", + "LibrariesDocumentsPatchV1Request": ".libraries_documents_patch_v1op", + "LibrariesDocumentsPatchV1RequestTypedDict": ".libraries_documents_patch_v1op", "LibrariesDocumentsReprocessV1Request": ".libraries_documents_reprocess_v1op", "LibrariesDocumentsReprocessV1RequestTypedDict": ".libraries_documents_reprocess_v1op", "LibrariesDocumentsUpdateV1Request": ".libraries_documents_update_v1op", @@ -4547,6 +4724,8 @@ "LibrariesGetV1RequestTypedDict": ".libraries_get_v1op", "LibrariesListV1Request": ".libraries_list_v1op", "LibrariesListV1RequestTypedDict": ".libraries_list_v1op", + "LibrariesPatchV1Request": ".libraries_patch_v1op", + "LibrariesPatchV1RequestTypedDict": ".libraries_patch_v1op", "LibrariesShareCreateV1Request": ".libraries_share_create_v1op", "LibrariesShareCreateV1RequestTypedDict": ".libraries_share_create_v1op", "LibrariesShareDeleteV1Request": ".libraries_share_delete_v1op", @@ -4719,6 +4898,8 @@ "PaginationInfoTypedDict": ".paginationinfo", "PaginationResponse": ".paginationresponse", "PaginationResponseTypedDict": ".paginationresponse", + "PartialScheduleDefinition": ".partialscheduledefinition", + "PartialScheduleDefinitionTypedDict": ".partialscheduledefinition", "PauseScheduleV1WorkflowsSchedulesScheduleIDPausePostRequest": ".pause_schedule_v1_workflows_schedules_schedule_id_pause_postop", "PauseScheduleV1WorkflowsSchedulesScheduleIDPausePostRequestTypedDict": ".pause_schedule_v1_workflows_schedules_schedule_id_pause_postop", "PostDatasetRecordsFromCampaignV1ObservabilityDatasetsDatasetIDImportsFromCampaignPostRequest": ".post_dataset_records_from_campaign_v1_observability_datasets_dataset_id_imports_from_campaign_postop", @@ -4832,6 +5013,12 @@ "SearchChatCompletionEventsRequestTypedDict": ".searchchatcompletioneventsrequest", "SearchChatCompletionEventsResponse": ".searchchatcompletioneventsresponse", "SearchChatCompletionEventsResponseTypedDict": ".searchchatcompletioneventsresponse", + "SearchIndexResponse": ".searchindexresponse", + "SearchIndexResponseIndex": ".searchindexresponse", + "SearchIndexResponseIndexTypedDict": ".searchindexresponse", + "SearchIndexResponseStatus": ".searchindexresponse", + "SearchIndexResponseTypedDict": ".searchindexresponse", + "UnknownSearchIndexResponseIndex": ".searchindexresponse", "Security": ".security", "SecurityTypedDict": ".security", "ShareEnum": ".shareenum", @@ -4955,6 +5142,12 @@ "TaskSupport": ".toolexecution", "ToolExecution": ".toolexecution", "ToolExecutionTypedDict": ".toolexecution", + "RequiresConfirmation": ".toolexecutionconfiguration", + "RequiresConfirmationTypedDict": ".toolexecutionconfiguration", + "SkipConfirmation": ".toolexecutionconfiguration", + "SkipConfirmationTypedDict": ".toolexecutionconfiguration", + "ToolExecutionConfiguration": ".toolexecutionconfiguration", + "ToolExecutionConfigurationTypedDict": ".toolexecutionconfiguration", "ToolExecutionDeltaEvent": ".toolexecutiondeltaevent", "ToolExecutionDeltaEventName": ".toolexecutiondeltaevent", "ToolExecutionDeltaEventNameTypedDict": ".toolexecutiondeltaevent", @@ -4979,6 +5172,8 @@ "ToolMessageContent": ".toolmessage", "ToolMessageContentTypedDict": ".toolmessage", "ToolMessageTypedDict": ".toolmessage", + "ToolProperties": ".toolproperties", + "ToolPropertiesTypedDict": ".toolproperties", "ToolReferenceChunk": ".toolreferencechunk", "ToolReferenceChunkTool": ".toolreferencechunk", "ToolReferenceChunkToolTypedDict": ".toolreferencechunk", @@ -5024,6 +5219,8 @@ "UpdateJudgeV1ObservabilityJudgesJudgeIDPutRequestTypedDict": ".update_judge_v1_observability_judges_judge_id_putop", "UpdateRunInfoV1RagIngestionPipelineConfigurationsIDRunInfoPutRequest": ".update_run_info_v1_rag_ingestion_pipeline_configurations_id_run_info_putop", "UpdateRunInfoV1RagIngestionPipelineConfigurationsIDRunInfoPutRequestTypedDict": ".update_run_info_v1_rag_ingestion_pipeline_configurations_id_run_info_putop", + "UpdateScheduleV1WorkflowsSchedulesScheduleIDPatchRequest": ".update_schedule_v1_workflows_schedules_schedule_id_patchop", + "UpdateScheduleV1WorkflowsSchedulesScheduleIDPatchRequestTypedDict": ".update_schedule_v1_workflows_schedules_schedule_id_patchop", "UpdateVoiceV1AudioVoicesVoiceIDPatchRequest": ".update_voice_v1_audio_voices_voice_id_patchop", "UpdateVoiceV1AudioVoicesVoiceIDPatchRequestTypedDict": ".update_voice_v1_audio_voices_voice_id_patchop", "UpdateWorkflowExecutionV1WorkflowsExecutionsExecutionIDUpdatesPostRequest": ".update_workflow_execution_v1_workflows_executions_execution_id_updates_postop", @@ -5078,6 +5275,10 @@ "LocTypedDict": ".validationerror", "ValidationError": ".validationerror", "ValidationErrorTypedDict": ".validationerror", + "VespaSchemaResponse": ".vespaschemaresponse", + "VespaSchemaResponseTypedDict": ".vespaschemaresponse", + "VespaSearchIndexInfoResponse": ".vespasearchindexinforesponse", + "VespaSearchIndexInfoResponseTypedDict": ".vespasearchindexinforesponse", "VoiceCreateRequest": ".voicecreaterequest", "VoiceCreateRequestTypedDict": ".voicecreaterequest", "VoiceListResponse": ".voicelistresponse", @@ -5174,6 +5375,8 @@ "WorkflowScheduleRequestTypedDict": ".workflowschedulerequest", "WorkflowScheduleResponse": ".workflowscheduleresponse", "WorkflowScheduleResponseTypedDict": ".workflowscheduleresponse", + "WorkflowScheduleUpdateRequest": ".workflowscheduleupdaterequest", + "WorkflowScheduleUpdateRequestTypedDict": ".workflowscheduleupdaterequest", "WorkflowTaskFailedAttributes": ".workflowtaskfailedattributes", "WorkflowTaskFailedAttributesTypedDict": ".workflowtaskfailedattributes", "WorkflowTaskFailedResponse": ".workflowtaskfailedresponse", diff --git a/src/mistralai/client/models/authenticationconfiguration.py b/src/mistralai/client/models/authenticationconfiguration.py index 84f66591..79c69641 100644 --- a/src/mistralai/client/models/authenticationconfiguration.py +++ b/src/mistralai/client/models/authenticationconfiguration.py @@ -2,6 +2,7 @@ # @generated-id: 97b5056c29fb from __future__ import annotations +from .consumertype import ConsumerType from .outboundauthenticationtype import OutboundAuthenticationType from mistralai.client.types import BaseModel, UNSET_SENTINEL from pydantic import model_serializer @@ -12,6 +13,7 @@ class AuthenticationConfigurationTypedDict(TypedDict): name: str authentication_type: OutboundAuthenticationType + scope: ConsumerType is_default: NotRequired[bool] @@ -20,6 +22,8 @@ class AuthenticationConfiguration(BaseModel): authentication_type: OutboundAuthenticationType + scope: ConsumerType + is_default: Optional[bool] = False @model_serializer(mode="wrap") diff --git a/src/mistralai/client/models/connector_activate_for_organization_v1op.py b/src/mistralai/client/models/connector_activate_for_organization_v1op.py new file mode 100644 index 00000000..1b0ec3b0 --- /dev/null +++ b/src/mistralai/client/models/connector_activate_for_organization_v1op.py @@ -0,0 +1,61 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 9b35397dd5cc + +from __future__ import annotations +from .toolexecutionconfiguration import ( + ToolExecutionConfiguration, + ToolExecutionConfigurationTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from pydantic import model_serializer +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ConnectorActivateForOrganizationV1RequestTypedDict(TypedDict): + connector_id: str + tool_execution_configuration: NotRequired[ + Nullable[ToolExecutionConfigurationTypedDict] + ] + + +class ConnectorActivateForOrganizationV1Request(BaseModel): + connector_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + tool_execution_configuration: Annotated[ + OptionalNullable[ToolExecutionConfiguration], + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["ToolExecutionConfiguration"]) + nullable_fields = set(["ToolExecutionConfiguration"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/connector_activate_for_user_v1op.py b/src/mistralai/client/models/connector_activate_for_user_v1op.py new file mode 100644 index 00000000..e30126d4 --- /dev/null +++ b/src/mistralai/client/models/connector_activate_for_user_v1op.py @@ -0,0 +1,61 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 6bf45c78cfea + +from __future__ import annotations +from .toolexecutionconfiguration import ( + ToolExecutionConfiguration, + ToolExecutionConfigurationTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from pydantic import model_serializer +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ConnectorActivateForUserV1RequestTypedDict(TypedDict): + connector_id: str + tool_execution_configuration: NotRequired[ + Nullable[ToolExecutionConfigurationTypedDict] + ] + + +class ConnectorActivateForUserV1Request(BaseModel): + connector_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + tool_execution_configuration: Annotated[ + OptionalNullable[ToolExecutionConfiguration], + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["ToolExecutionConfiguration"]) + nullable_fields = set(["ToolExecutionConfiguration"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/connector_activate_for_workspace_v1op.py b/src/mistralai/client/models/connector_activate_for_workspace_v1op.py new file mode 100644 index 00000000..00fe6699 --- /dev/null +++ b/src/mistralai/client/models/connector_activate_for_workspace_v1op.py @@ -0,0 +1,61 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: b6392712ddaf + +from __future__ import annotations +from .toolexecutionconfiguration import ( + ToolExecutionConfiguration, + ToolExecutionConfigurationTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from pydantic import model_serializer +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ConnectorActivateForWorkspaceV1RequestTypedDict(TypedDict): + connector_id: str + tool_execution_configuration: NotRequired[ + Nullable[ToolExecutionConfigurationTypedDict] + ] + + +class ConnectorActivateForWorkspaceV1Request(BaseModel): + connector_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + tool_execution_configuration: Annotated[ + OptionalNullable[ToolExecutionConfiguration], + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["ToolExecutionConfiguration"]) + nullable_fields = set(["ToolExecutionConfiguration"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/connector_deactivate_for_organization_v1op.py b/src/mistralai/client/models/connector_deactivate_for_organization_v1op.py new file mode 100644 index 00000000..4c5c5458 --- /dev/null +++ b/src/mistralai/client/models/connector_deactivate_for_organization_v1op.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 850bece829b0 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class ConnectorDeactivateForOrganizationV1RequestTypedDict(TypedDict): + connector_id: str + + +class ConnectorDeactivateForOrganizationV1Request(BaseModel): + connector_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/connector_deactivate_for_user_v1op.py b/src/mistralai/client/models/connector_deactivate_for_user_v1op.py new file mode 100644 index 00000000..5d998877 --- /dev/null +++ b/src/mistralai/client/models/connector_deactivate_for_user_v1op.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 1df4227a54f7 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class ConnectorDeactivateForUserV1RequestTypedDict(TypedDict): + connector_id: str + + +class ConnectorDeactivateForUserV1Request(BaseModel): + connector_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/connector_deactivate_for_workspace_v1op.py b/src/mistralai/client/models/connector_deactivate_for_workspace_v1op.py new file mode 100644 index 00000000..9f02d887 --- /dev/null +++ b/src/mistralai/client/models/connector_deactivate_for_workspace_v1op.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: d82c1a5321cc + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class ConnectorDeactivateForWorkspaceV1RequestTypedDict(TypedDict): + connector_id: str + + +class ConnectorDeactivateForWorkspaceV1Request(BaseModel): + connector_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/connector_get_v1op.py b/src/mistralai/client/models/connector_get_v1op.py index 780afac9..aed64019 100644 --- a/src/mistralai/client/models/connector_get_v1op.py +++ b/src/mistralai/client/models/connector_get_v1op.py @@ -13,8 +13,6 @@ class ConnectorGetV1RequestTypedDict(TypedDict): connector_id_or_name: str fetch_customer_data: NotRequired[bool] r"""Fetch the customer data associated with the connector (e.g. customer secrets / config).""" - fetch_connection_secrets: NotRequired[bool] - r"""Fetch the general connection secrets associated with the connector.""" class ConnectorGetV1Request(BaseModel): @@ -28,15 +26,9 @@ class ConnectorGetV1Request(BaseModel): ] = False r"""Fetch the customer data associated with the connector (e.g. customer secrets / config).""" - fetch_connection_secrets: Annotated[ - Optional[bool], - FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), - ] = False - r"""Fetch the general connection secrets associated with the connector.""" - @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["fetch_customer_data", "fetch_connection_secrets"]) + optional_fields = set(["fetch_customer_data"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/connectorsqueryfilters.py b/src/mistralai/client/models/connectorsqueryfilters.py index f10d6897..860caf43 100644 --- a/src/mistralai/client/models/connectorsqueryfilters.py +++ b/src/mistralai/client/models/connectorsqueryfilters.py @@ -11,29 +11,21 @@ ) from mistralai.client.utils import FieldMetadata from pydantic import model_serializer -from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict class ConnectorsQueryFiltersTypedDict(TypedDict): active: NotRequired[Nullable[bool]] r"""Filter for active connectors for a given user, workspace and organization.""" - fetch_connection_secrets: NotRequired[bool] - r"""Fetch connection secrets.""" class ConnectorsQueryFilters(BaseModel): active: Annotated[OptionalNullable[bool], FieldMetadata(query=True)] = UNSET r"""Filter for active connectors for a given user, workspace and organization.""" - fetch_connection_secrets: Annotated[Optional[bool], FieldMetadata(query=True)] = ( - False - ) - r"""Fetch connection secrets.""" - @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["active", "fetch_connection_secrets"]) + optional_fields = set(["active"]) nullable_fields = set(["active"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/consumertype.py b/src/mistralai/client/models/consumertype.py new file mode 100644 index 00000000..ac091e5e --- /dev/null +++ b/src/mistralai/client/models/consumertype.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: d18230da2fdd + +from __future__ import annotations +from mistralai.client.types import UnrecognizedStr +from typing import Literal, Union + + +ConsumerType = Union[ + Literal[ + "user", + "org", + "workspace", + "system", + ], + UnrecognizedStr, +] diff --git a/src/mistralai/client/models/createlibraryrequest.py b/src/mistralai/client/models/createlibraryrequest.py index e0357e92..2bbb1e18 100644 --- a/src/mistralai/client/models/createlibraryrequest.py +++ b/src/mistralai/client/models/createlibraryrequest.py @@ -9,9 +9,10 @@ UNSET, UNSET_SENTINEL, ) +import pydantic from pydantic import model_serializer from typing import Literal -from typing_extensions import NotRequired, TypedDict +from typing_extensions import Annotated, NotRequired, TypedDict OwnerType = Literal[ @@ -34,7 +35,12 @@ class CreateLibraryRequest(BaseModel): description: OptionalNullable[str] = UNSET - chunk_size: OptionalNullable[int] = UNSET + chunk_size: Annotated[ + OptionalNullable[int], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET r"""The size of the chunks (in characters) to split document text into. Must be between 256 and 32768.""" owner_type: OptionalNullable[OwnerType] = UNSET diff --git a/src/mistralai/client/models/createsearchindexinforequest.py b/src/mistralai/client/models/createsearchindexinforequest.py new file mode 100644 index 00000000..a23fd2e2 --- /dev/null +++ b/src/mistralai/client/models/createsearchindexinforequest.py @@ -0,0 +1,69 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 3f424a7063b0 + +from __future__ import annotations +from .createvespasearchindexinforequest import ( + CreateVespaSearchIndexInfoRequest, + CreateVespaSearchIndexInfoRequestTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Literal, Optional +from typing_extensions import NotRequired, TypedDict + + +CreateSearchIndexInfoRequestStatus = Literal[ + "online", + "offline", +] + + +CreateSearchIndexInfoRequestIndexTypedDict = CreateVespaSearchIndexInfoRequestTypedDict + + +CreateSearchIndexInfoRequestIndex = CreateVespaSearchIndexInfoRequest + + +class CreateSearchIndexInfoRequestTypedDict(TypedDict): + index: CreateSearchIndexInfoRequestIndexTypedDict + document_count: NotRequired[Nullable[int]] + status: NotRequired[CreateSearchIndexInfoRequestStatus] + + +class CreateSearchIndexInfoRequest(BaseModel): + index: CreateSearchIndexInfoRequestIndex + + document_count: OptionalNullable[int] = UNSET + + status: Optional[CreateSearchIndexInfoRequestStatus] = "offline" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["document_count", "status"]) + nullable_fields = set(["document_count"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/createvespaschemarequest.py b/src/mistralai/client/models/createvespaschemarequest.py new file mode 100644 index 00000000..cac99bc3 --- /dev/null +++ b/src/mistralai/client/models/createvespaschemarequest.py @@ -0,0 +1,49 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: d44c0c466535 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class CreateVespaSchemaRequestTypedDict(TypedDict): + name: str + document_count: NotRequired[Nullable[int]] + + +class CreateVespaSchemaRequest(BaseModel): + name: str + + document_count: OptionalNullable[int] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["document_count"]) + nullable_fields = set(["document_count"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/createvespasearchindexinforequest.py b/src/mistralai/client/models/createvespasearchindexinforequest.py new file mode 100644 index 00000000..50006d38 --- /dev/null +++ b/src/mistralai/client/models/createvespasearchindexinforequest.py @@ -0,0 +1,43 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 866143560866 + +from __future__ import annotations +from .createvespaschemarequest import ( + CreateVespaSchemaRequest, + CreateVespaSchemaRequestTypedDict, +) +from mistralai.client.types import BaseModel +from mistralai.client.utils import validate_const +import pydantic +from pydantic.functional_validators import AfterValidator +from typing import List, Literal +from typing_extensions import Annotated, TypedDict + + +class CreateVespaSearchIndexInfoRequestTypedDict(TypedDict): + k8s_cluster: str + k8s_namespace: str + vespa_instance_name: str + schemas: List[CreateVespaSchemaRequestTypedDict] + type: Literal["vespa"] + + +class CreateVespaSearchIndexInfoRequest(BaseModel): + k8s_cluster: str + + k8s_namespace: str + + vespa_instance_name: str + + schemas: List[CreateVespaSchemaRequest] + + type: Annotated[ + Annotated[Literal["vespa"], AfterValidator(validate_const("vespa"))], + pydantic.Field(alias="type"), + ] = "vespa" + + +try: + CreateVespaSearchIndexInfoRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/document.py b/src/mistralai/client/models/document.py index 8d1aea88..c04512c1 100644 --- a/src/mistralai/client/models/document.py +++ b/src/mistralai/client/models/document.py @@ -11,9 +11,10 @@ UNSET, UNSET_SENTINEL, ) +import pydantic from pydantic import model_serializer from typing import Any, Dict -from typing_extensions import NotRequired, TypedDict +from typing_extensions import Annotated, NotRequired, TypedDict class DocumentTypedDict(TypedDict): @@ -37,6 +38,8 @@ class DocumentTypedDict(TypedDict): tokens_processing_summary: NotRequired[Nullable[int]] url: NotRequired[Nullable[str]] attributes: NotRequired[Nullable[Dict[str, Any]]] + expires_at: NotRequired[Nullable[datetime]] + r"""If set, the document will be automatically deleted after this date.""" class Document(BaseModel): @@ -44,7 +47,12 @@ class Document(BaseModel): library_id: str - hash: Nullable[str] + hash: Annotated[ + Nullable[str], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] mime_type: Nullable[str] @@ -62,7 +70,12 @@ class Document(BaseModel): uploaded_by_type: str - processing_status: str + processing_status: Annotated[ + str, + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] tokens_processing_total: int @@ -72,14 +85,27 @@ class Document(BaseModel): number_of_pages: OptionalNullable[int] = UNSET - tokens_processing_main_content: OptionalNullable[int] = UNSET + tokens_processing_main_content: Annotated[ + OptionalNullable[int], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET - tokens_processing_summary: OptionalNullable[int] = UNSET + tokens_processing_summary: Annotated[ + OptionalNullable[int], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET url: OptionalNullable[str] = UNSET attributes: OptionalNullable[Dict[str, Any]] = UNSET + expires_at: OptionalNullable[datetime] = UNSET + r"""If set, the document will be automatically deleted after this date.""" + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -91,6 +117,7 @@ def serialize_model(self, handler): "tokens_processing_summary", "url", "attributes", + "expires_at", ] ) nullable_fields = set( @@ -107,6 +134,7 @@ def serialize_model(self, handler): "tokens_processing_summary", "url", "attributes", + "expires_at", ] ) serialized = handler(self) diff --git a/src/mistralai/client/models/get_schedule_v1_workflows_schedules_schedule_id_getop.py b/src/mistralai/client/models/get_schedule_v1_workflows_schedules_schedule_id_getop.py new file mode 100644 index 00000000..d22d0515 --- /dev/null +++ b/src/mistralai/client/models/get_schedule_v1_workflows_schedules_schedule_id_getop.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: cb775bc63ffd + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class GetScheduleV1WorkflowsSchedulesScheduleIDGetRequestTypedDict(TypedDict): + schedule_id: str + + +class GetScheduleV1WorkflowsSchedulesScheduleIDGetRequest(BaseModel): + schedule_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/libraries_documents_list_v1op.py b/src/mistralai/client/models/libraries_documents_list_v1op.py index afc474cb..57e2736b 100644 --- a/src/mistralai/client/models/libraries_documents_list_v1op.py +++ b/src/mistralai/client/models/libraries_documents_list_v1op.py @@ -10,6 +10,7 @@ UNSET_SENTINEL, ) from mistralai.client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +import pydantic from pydantic import model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,7 @@ class LibrariesDocumentsListV1RequestTypedDict(TypedDict): page_size: NotRequired[int] page: NotRequired[int] filters_attributes: NotRequired[Nullable[str]] + r"""Deprecated: this parameter will be removed in a future version.""" sort_by: NotRequired[str] sort_order: NotRequired[str] @@ -47,8 +49,12 @@ class LibrariesDocumentsListV1Request(BaseModel): filters_attributes: Annotated[ OptionalNullable[str], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = UNSET + r"""Deprecated: this parameter will be removed in a future version.""" sort_by: Annotated[ Optional[str], diff --git a/src/mistralai/client/models/libraries_documents_patch_v1op.py b/src/mistralai/client/models/libraries_documents_patch_v1op.py new file mode 100644 index 00000000..0ae4efaf --- /dev/null +++ b/src/mistralai/client/models/libraries_documents_patch_v1op.py @@ -0,0 +1,29 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 31b2201bbfe2 + +from __future__ import annotations +from .updatedocumentrequest import UpdateDocumentRequest, UpdateDocumentRequestTypedDict +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class LibrariesDocumentsPatchV1RequestTypedDict(TypedDict): + library_id: str + document_id: str + update_document_request: UpdateDocumentRequestTypedDict + + +class LibrariesDocumentsPatchV1Request(BaseModel): + library_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + document_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + update_document_request: Annotated[ + UpdateDocumentRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/libraries_list_v1op.py b/src/mistralai/client/models/libraries_list_v1op.py index cac06dad..328ac72c 100644 --- a/src/mistralai/client/models/libraries_list_v1op.py +++ b/src/mistralai/client/models/libraries_list_v1op.py @@ -10,6 +10,7 @@ UNSET_SENTINEL, ) from mistralai.client.utils import FieldMetadata, QueryParamMetadata +import pydantic from pydantic import model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,7 +22,7 @@ class LibrariesListV1RequestTypedDict(TypedDict): search: NotRequired[Nullable[str]] r"""Case-insensitive search on the library name.""" filter_owned_by_me: NotRequired[Nullable[bool]] - r"""Filter libraries by whether they were created by the current authenticated identity. Set to true for created by me, false for only libraries shared with me, or None to disable this filter.""" + r"""Deprecated: this parameter will be removed in a future version.""" class LibrariesListV1Request(BaseModel): @@ -43,9 +44,12 @@ class LibrariesListV1Request(BaseModel): filter_owned_by_me: Annotated[ OptionalNullable[bool], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = UNSET - r"""Filter libraries by whether they were created by the current authenticated identity. Set to true for created by me, false for only libraries shared with me, or None to disable this filter.""" + r"""Deprecated: this parameter will be removed in a future version.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/mistralai/client/models/libraries_patch_v1op.py b/src/mistralai/client/models/libraries_patch_v1op.py new file mode 100644 index 00000000..2fbaea67 --- /dev/null +++ b/src/mistralai/client/models/libraries_patch_v1op.py @@ -0,0 +1,24 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 2b189be3c57a + +from __future__ import annotations +from .updatelibraryrequest import UpdateLibraryRequest, UpdateLibraryRequestTypedDict +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class LibrariesPatchV1RequestTypedDict(TypedDict): + library_id: str + update_library_request: UpdateLibraryRequestTypedDict + + +class LibrariesPatchV1Request(BaseModel): + library_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + update_library_request: Annotated[ + UpdateLibraryRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/library.py b/src/mistralai/client/models/library.py index 0e09cfaa..4ec8604c 100644 --- a/src/mistralai/client/models/library.py +++ b/src/mistralai/client/models/library.py @@ -52,17 +52,42 @@ class Library(BaseModel): nb_documents: int - chunk_size: Nullable[int] + chunk_size: Annotated[ + Nullable[int], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] - emoji: OptionalNullable[str] = UNSET + emoji: Annotated[ + OptionalNullable[str], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET description: OptionalNullable[str] = UNSET - generated_description: OptionalNullable[str] = UNSET + generated_description: Annotated[ + OptionalNullable[str], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET - explicit_user_members_count: OptionalNullable[int] = UNSET + explicit_user_members_count: Annotated[ + OptionalNullable[int], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET - explicit_workspace_members_count: OptionalNullable[int] = UNSET + explicit_workspace_members_count: Annotated[ + OptionalNullable[int], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET org_sharing_role: Annotated[ OptionalNullable[str], @@ -71,7 +96,12 @@ class Library(BaseModel): ), ] = UNSET - generated_name: OptionalNullable[str] = UNSET + generated_name: Annotated[ + OptionalNullable[str], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET r"""Generated Name""" @model_serializer(mode="wrap") diff --git a/src/mistralai/client/models/logicalexpression.py b/src/mistralai/client/models/logicalexpression.py new file mode 100644 index 00000000..9c3847fc --- /dev/null +++ b/src/mistralai/client/models/logicalexpression.py @@ -0,0 +1,36 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 48d46c10b453 + +from __future__ import annotations +from .toolproperties import ToolProperties, ToolPropertiesTypedDict +from mistralai.client.types import BaseModel +from typing import List, Literal, Union +from typing_extensions import TypeAliasType, TypedDict + + +LogicalExpressionType = Literal[ + "and", + "or", +] + + +class LogicalExpressionTypedDict(TypedDict): + type: LogicalExpressionType + expressions: List[ExpressionTypedDict] + + +class LogicalExpression(BaseModel): + type: LogicalExpressionType + + expressions: List[Expression] + + +ExpressionTypedDict = TypeAliasType( + "ExpressionTypedDict", + Union[ToolPropertiesTypedDict, "LogicalExpressionTypedDict", List[str]], +) + + +Expression = TypeAliasType( + "Expression", Union[ToolProperties, "LogicalExpression", List[str]] +) diff --git a/src/mistralai/client/models/partialscheduledefinition.py b/src/mistralai/client/models/partialscheduledefinition.py new file mode 100644 index 00000000..1120dd14 --- /dev/null +++ b/src/mistralai/client/models/partialscheduledefinition.py @@ -0,0 +1,139 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: ce1ded792ff5 + +from __future__ import annotations +from .schedulecalendar import ScheduleCalendar, ScheduleCalendarTypedDict +from .scheduleinterval import ScheduleInterval, ScheduleIntervalTypedDict +from .schedulepolicy import SchedulePolicy, SchedulePolicyTypedDict +from datetime import datetime +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Any, List, Optional +from typing_extensions import NotRequired, TypedDict + + +class PartialScheduleDefinitionTypedDict(TypedDict): + r"""Schedule definition for partial updates. + + All fields are optional (inherited from _ScheduleRequestBase). Only explicitly-set + fields are applied during an update; unset fields preserve the existing schedule values. + """ + + input: NotRequired[Any] + r"""Input to provide to the workflow when starting it.""" + calendars: NotRequired[List[ScheduleCalendarTypedDict]] + r"""Calendar-based specification of times.""" + intervals: NotRequired[List[ScheduleIntervalTypedDict]] + r"""Interval-based specification of times.""" + cron_expressions: NotRequired[List[str]] + r"""Cron-based specification of times.""" + skip: NotRequired[List[ScheduleCalendarTypedDict]] + r"""Set of calendar times to skip.""" + start_at: NotRequired[Nullable[datetime]] + r"""Time after which the first action may be run.""" + end_at: NotRequired[Nullable[datetime]] + r"""Time after which no more actions will be run.""" + jitter: NotRequired[Nullable[str]] + r"""Jitter to apply each action. + + An action's scheduled time will be incremented by a random value between 0 + and this value if present (but not past the next schedule). + + """ + time_zone_name: NotRequired[Nullable[str]] + r"""IANA time zone name, for example ``US/Central``.""" + policy: NotRequired[SchedulePolicyTypedDict] + max_executions: NotRequired[Nullable[int]] + r"""Maximum number of times this schedule will trigger a workflow execution. Once this limit is reached, no further executions are triggered automatically. null means unlimited.""" + + +class PartialScheduleDefinition(BaseModel): + r"""Schedule definition for partial updates. + + All fields are optional (inherited from _ScheduleRequestBase). Only explicitly-set + fields are applied during an update; unset fields preserve the existing schedule values. + """ + + input: Optional[Any] = None + r"""Input to provide to the workflow when starting it.""" + + calendars: Optional[List[ScheduleCalendar]] = None + r"""Calendar-based specification of times.""" + + intervals: Optional[List[ScheduleInterval]] = None + r"""Interval-based specification of times.""" + + cron_expressions: Optional[List[str]] = None + r"""Cron-based specification of times.""" + + skip: Optional[List[ScheduleCalendar]] = None + r"""Set of calendar times to skip.""" + + start_at: OptionalNullable[datetime] = UNSET + r"""Time after which the first action may be run.""" + + end_at: OptionalNullable[datetime] = UNSET + r"""Time after which no more actions will be run.""" + + jitter: OptionalNullable[str] = UNSET + r"""Jitter to apply each action. + + An action's scheduled time will be incremented by a random value between 0 + and this value if present (but not past the next schedule). + + """ + + time_zone_name: OptionalNullable[str] = UNSET + r"""IANA time zone name, for example ``US/Central``.""" + + policy: Optional[SchedulePolicy] = None + + max_executions: OptionalNullable[int] = UNSET + r"""Maximum number of times this schedule will trigger a workflow execution. Once this limit is reached, no further executions are triggered automatically. null means unlimited.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "input", + "calendars", + "intervals", + "cron_expressions", + "skip", + "start_at", + "end_at", + "jitter", + "time_zone_name", + "policy", + "max_executions", + ] + ) + nullable_fields = set( + ["start_at", "end_at", "jitter", "time_zone_name", "max_executions"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/processingstatus.py b/src/mistralai/client/models/processingstatus.py index 7e93308f..73308b46 100644 --- a/src/mistralai/client/models/processingstatus.py +++ b/src/mistralai/client/models/processingstatus.py @@ -4,7 +4,8 @@ from __future__ import annotations from .processstatus import ProcessStatus from mistralai.client.types import BaseModel -from typing_extensions import TypedDict +import pydantic +from typing_extensions import Annotated, TypedDict class ProcessingStatusTypedDict(TypedDict): @@ -18,4 +19,9 @@ class ProcessingStatus(BaseModel): process_status: ProcessStatus - processing_status: str + processing_status: Annotated[ + str, + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] diff --git a/src/mistralai/client/models/scheduledefinition.py b/src/mistralai/client/models/scheduledefinition.py index 58102293..3c018552 100644 --- a/src/mistralai/client/models/scheduledefinition.py +++ b/src/mistralai/client/models/scheduledefinition.py @@ -51,10 +51,10 @@ class ScheduleDefinitionTypedDict(TypedDict): time_zone_name: NotRequired[Nullable[str]] r"""IANA time zone name, for example ``US/Central``.""" policy: NotRequired[SchedulePolicyTypedDict] - schedule_id: NotRequired[Nullable[str]] - r"""Unique identifier for the schedule.""" max_executions: NotRequired[Nullable[int]] r"""Maximum number of times this schedule will trigger a workflow execution. Once this limit is reached, no further executions are triggered automatically. null means unlimited.""" + schedule_id: NotRequired[Nullable[str]] + r"""Unique identifier for the schedule.""" class ScheduleDefinition(BaseModel): @@ -100,12 +100,12 @@ class ScheduleDefinition(BaseModel): policy: Optional[SchedulePolicy] = None - schedule_id: OptionalNullable[str] = UNSET - r"""Unique identifier for the schedule.""" - max_executions: OptionalNullable[int] = UNSET r"""Maximum number of times this schedule will trigger a workflow execution. Once this limit is reached, no further executions are triggered automatically. null means unlimited.""" + schedule_id: OptionalNullable[str] = UNSET + r"""Unique identifier for the schedule.""" + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -119,8 +119,8 @@ def serialize_model(self, handler): "jitter", "time_zone_name", "policy", - "schedule_id", "max_executions", + "schedule_id", ] ) nullable_fields = set( @@ -129,8 +129,8 @@ def serialize_model(self, handler): "end_at", "jitter", "time_zone_name", - "schedule_id", "max_executions", + "schedule_id", ] ) serialized = handler(self) diff --git a/src/mistralai/client/models/searchindexresponse.py b/src/mistralai/client/models/searchindexresponse.py new file mode 100644 index 00000000..1eebb6e7 --- /dev/null +++ b/src/mistralai/client/models/searchindexresponse.py @@ -0,0 +1,69 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 054688d20a3b + +from __future__ import annotations +from .vespasearchindexinforesponse import ( + VespaSearchIndexInfoResponse, + VespaSearchIndexInfoResponseTypedDict, +) +from datetime import datetime +from mistralai.client.types import BaseModel, UnrecognizedStr +from pydantic import ConfigDict +from typing import Any, Literal, Union +from typing_extensions import TypedDict + + +SearchIndexResponseStatus = Union[ + Literal[ + "online", + "offline", + ], + UnrecognizedStr, +] + + +SearchIndexResponseIndexTypedDict = VespaSearchIndexInfoResponseTypedDict + + +class UnknownSearchIndexResponseIndex(BaseModel): + r"""A SearchIndexResponseIndex variant the SDK doesn't recognize. Preserves the raw payload.""" + + type: Literal["UNKNOWN"] = "UNKNOWN" + raw: Any + is_unknown: Literal[True] = True + + model_config = ConfigDict(frozen=True) + + +_SEARCH_INDEX_RESPONSE_INDEX_VARIANTS: dict[str, Any] = { + "vespa": VespaSearchIndexInfoResponse, +} + + +SearchIndexResponseIndex = VespaSearchIndexInfoResponse + + +class SearchIndexResponseTypedDict(TypedDict): + id: str + creator_id: str + document_count: int + status: SearchIndexResponseStatus + created_at: datetime + modified_at: datetime + index: SearchIndexResponseIndexTypedDict + + +class SearchIndexResponse(BaseModel): + id: str + + creator_id: str + + document_count: int + + status: SearchIndexResponseStatus + + created_at: datetime + + modified_at: datetime + + index: SearchIndexResponseIndex diff --git a/src/mistralai/client/models/sharing.py b/src/mistralai/client/models/sharing.py index efa16203..4260f175 100644 --- a/src/mistralai/client/models/sharing.py +++ b/src/mistralai/client/models/sharing.py @@ -9,8 +9,9 @@ UNSET, UNSET_SENTINEL, ) +import pydantic from pydantic import model_serializer -from typing_extensions import NotRequired, TypedDict +from typing_extensions import Annotated, NotRequired, TypedDict class SharingTypedDict(TypedDict): @@ -25,7 +26,12 @@ class SharingTypedDict(TypedDict): class Sharing(BaseModel): library_id: str - org_id: str + org_id: Annotated[ + str, + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] role: str @@ -33,7 +39,12 @@ class Sharing(BaseModel): share_with_uuid: Nullable[str] - user_id: OptionalNullable[str] = UNSET + user_id: Annotated[ + OptionalNullable[str], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/mistralai/client/models/sharingdelete.py b/src/mistralai/client/models/sharingdelete.py index 3472a506..67399831 100644 --- a/src/mistralai/client/models/sharingdelete.py +++ b/src/mistralai/client/models/sharingdelete.py @@ -10,8 +10,9 @@ UNSET, UNSET_SENTINEL, ) +import pydantic from pydantic import model_serializer -from typing_extensions import NotRequired, TypedDict +from typing_extensions import Annotated, NotRequired, TypedDict class SharingDeleteTypedDict(TypedDict): @@ -29,7 +30,12 @@ class SharingDelete(BaseModel): share_with_type: EntityType r"""The type of entity, used to share a library.""" - org_id: OptionalNullable[str] = UNSET + org_id: Annotated[ + OptionalNullable[str], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/mistralai/client/models/sharingrequest.py b/src/mistralai/client/models/sharingrequest.py index 7c2d435c..94de31c1 100644 --- a/src/mistralai/client/models/sharingrequest.py +++ b/src/mistralai/client/models/sharingrequest.py @@ -11,8 +11,9 @@ UNSET, UNSET_SENTINEL, ) +import pydantic from pydantic import model_serializer -from typing_extensions import NotRequired, TypedDict +from typing_extensions import Annotated, NotRequired, TypedDict class SharingRequestTypedDict(TypedDict): @@ -33,7 +34,12 @@ class SharingRequest(BaseModel): share_with_type: EntityType r"""The type of entity, used to share a library.""" - org_id: OptionalNullable[str] = UNSET + org_id: Annotated[ + OptionalNullable[str], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/mistralai/client/models/toolexecutionconfiguration.py b/src/mistralai/client/models/toolexecutionconfiguration.py new file mode 100644 index 00000000..ce65ad31 --- /dev/null +++ b/src/mistralai/client/models/toolexecutionconfiguration.py @@ -0,0 +1,84 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 1c9369616b21 + +from __future__ import annotations +from .logicalexpression import LogicalExpression, LogicalExpressionTypedDict +from .toolproperties import ToolProperties, ToolPropertiesTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List, Union +from typing_extensions import NotRequired, TypeAliasType, TypedDict + + +RequiresConfirmationTypedDict = TypeAliasType( + "RequiresConfirmationTypedDict", + Union[ToolPropertiesTypedDict, LogicalExpressionTypedDict, List[str]], +) + + +RequiresConfirmation = TypeAliasType( + "RequiresConfirmation", Union[ToolProperties, LogicalExpression, List[str]] +) + + +SkipConfirmationTypedDict = TypeAliasType( + "SkipConfirmationTypedDict", + Union[ToolPropertiesTypedDict, LogicalExpressionTypedDict, List[str]], +) + + +SkipConfirmation = TypeAliasType( + "SkipConfirmation", Union[ToolProperties, LogicalExpression, List[str]] +) + + +class ToolExecutionConfigurationTypedDict(TypedDict): + requires_confirmation: NotRequired[Nullable[RequiresConfirmationTypedDict]] + skip_confirmation: NotRequired[Nullable[SkipConfirmationTypedDict]] + include: NotRequired[Nullable[List[str]]] + exclude: NotRequired[Nullable[List[str]]] + + +class ToolExecutionConfiguration(BaseModel): + requires_confirmation: OptionalNullable[RequiresConfirmation] = UNSET + + skip_confirmation: OptionalNullable[SkipConfirmation] = UNSET + + include: OptionalNullable[List[str]] = UNSET + + exclude: OptionalNullable[List[str]] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["requires_confirmation", "skip_confirmation", "include", "exclude"] + ) + nullable_fields = set( + ["requires_confirmation", "skip_confirmation", "include", "exclude"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/toolproperties.py b/src/mistralai/client/models/toolproperties.py new file mode 100644 index 00000000..d3bf9789 --- /dev/null +++ b/src/mistralai/client/models/toolproperties.py @@ -0,0 +1,29 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 3a33561f76fc + +from __future__ import annotations +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing_extensions import TypedDict + + +class ToolPropertiesTypedDict(TypedDict): + read_only: Nullable[bool] + + +class ToolProperties(BaseModel): + read_only: Nullable[bool] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/mistralai/client/models/update_schedule_v1_workflows_schedules_schedule_id_patchop.py b/src/mistralai/client/models/update_schedule_v1_workflows_schedules_schedule_id_patchop.py new file mode 100644 index 00000000..5e3a1be4 --- /dev/null +++ b/src/mistralai/client/models/update_schedule_v1_workflows_schedules_schedule_id_patchop.py @@ -0,0 +1,27 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 6aaa918af7f4 + +from __future__ import annotations +from .workflowscheduleupdaterequest import ( + WorkflowScheduleUpdateRequest, + WorkflowScheduleUpdateRequestTypedDict, +) +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class UpdateScheduleV1WorkflowsSchedulesScheduleIDPatchRequestTypedDict(TypedDict): + schedule_id: str + workflow_schedule_update_request: WorkflowScheduleUpdateRequestTypedDict + + +class UpdateScheduleV1WorkflowsSchedulesScheduleIDPatchRequest(BaseModel): + schedule_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + workflow_schedule_update_request: Annotated[ + WorkflowScheduleUpdateRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/updatedocumentrequest.py b/src/mistralai/client/models/updatedocumentrequest.py index 5f67ea69..07c6f5e3 100644 --- a/src/mistralai/client/models/updatedocumentrequest.py +++ b/src/mistralai/client/models/updatedocumentrequest.py @@ -34,6 +34,8 @@ class UpdateDocumentRequestTypedDict(TypedDict): name: NotRequired[str] attributes: NotRequired[Nullable[Dict[str, AttributesTypedDict]]] + expires_at: NotRequired[Nullable[datetime]] + r"""If set, the document will be automatically deleted after this date.""" class UpdateDocumentRequest(BaseModel): @@ -41,10 +43,13 @@ class UpdateDocumentRequest(BaseModel): attributes: OptionalNullable[Dict[str, Attributes]] = UNSET + expires_at: OptionalNullable[datetime] = UNSET + r"""If set, the document will be automatically deleted after this date.""" + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["name", "attributes"]) - nullable_fields = set(["attributes"]) + optional_fields = set(["name", "attributes", "expires_at"]) + nullable_fields = set(["attributes", "expires_at"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/vespaschemaresponse.py b/src/mistralai/client/models/vespaschemaresponse.py new file mode 100644 index 00000000..440967d1 --- /dev/null +++ b/src/mistralai/client/models/vespaschemaresponse.py @@ -0,0 +1,32 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: fbab188e672e + +from __future__ import annotations +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing_extensions import TypedDict + + +class VespaSchemaResponseTypedDict(TypedDict): + name: str + document_count: Nullable[int] + + +class VespaSchemaResponse(BaseModel): + name: str + + document_count: Nullable[int] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/mistralai/client/models/vespasearchindexinforesponse.py b/src/mistralai/client/models/vespasearchindexinforesponse.py new file mode 100644 index 00000000..a3cce354 --- /dev/null +++ b/src/mistralai/client/models/vespasearchindexinforesponse.py @@ -0,0 +1,40 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: ee7484f75a7c + +from __future__ import annotations +from .vespaschemaresponse import VespaSchemaResponse, VespaSchemaResponseTypedDict +from mistralai.client.types import BaseModel +from mistralai.client.utils import validate_const +import pydantic +from pydantic.functional_validators import AfterValidator +from typing import List, Literal +from typing_extensions import Annotated, TypedDict + + +class VespaSearchIndexInfoResponseTypedDict(TypedDict): + k8s_cluster: str + k8s_namespace: str + vespa_instance_name: str + schemas: List[VespaSchemaResponseTypedDict] + type: Literal["vespa"] + + +class VespaSearchIndexInfoResponse(BaseModel): + k8s_cluster: str + + k8s_namespace: str + + vespa_instance_name: str + + schemas: List[VespaSchemaResponse] + + type: Annotated[ + Annotated[Literal["vespa"], AfterValidator(validate_const("vespa"))], + pydantic.Field(alias="type"), + ] = "vespa" + + +try: + VespaSearchIndexInfoResponse.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/workflowscheduleupdaterequest.py b/src/mistralai/client/models/workflowscheduleupdaterequest.py new file mode 100644 index 00000000..b43dc96f --- /dev/null +++ b/src/mistralai/client/models/workflowscheduleupdaterequest.py @@ -0,0 +1,28 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 72ca0f5e6c08 + +from __future__ import annotations +from .partialscheduledefinition import ( + PartialScheduleDefinition, + PartialScheduleDefinitionTypedDict, +) +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class WorkflowScheduleUpdateRequestTypedDict(TypedDict): + schedule: PartialScheduleDefinitionTypedDict + r"""Schedule definition for partial updates. + + All fields are optional (inherited from _ScheduleRequestBase). Only explicitly-set + fields are applied during an update; unset fields preserve the existing schedule values. + """ + + +class WorkflowScheduleUpdateRequest(BaseModel): + schedule: PartialScheduleDefinition + r"""Schedule definition for partial updates. + + All fields are optional (inherited from _ScheduleRequestBase). Only explicitly-set + fields are applied during an update; unset fields preserve the existing schedule values. + """ diff --git a/src/mistralai/client/rag.py b/src/mistralai/client/rag.py index 091b0270..934b2374 100644 --- a/src/mistralai/client/rag.py +++ b/src/mistralai/client/rag.py @@ -6,11 +6,13 @@ from mistralai.client.ingestion_pipeline_configurations import ( IngestionPipelineConfigurations, ) +from mistralai.client.search_indexes import SearchIndexes from typing import Optional class Rag(BaseSDK): ingestion_pipeline_configurations: IngestionPipelineConfigurations + search_indexes: SearchIndexes def __init__( self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None @@ -23,3 +25,6 @@ def _init_sdks(self): self.ingestion_pipeline_configurations = IngestionPipelineConfigurations( self.sdk_configuration, parent_ref=self.parent_ref ) + self.search_indexes = SearchIndexes( + self.sdk_configuration, parent_ref=self.parent_ref + ) diff --git a/src/mistralai/client/schedules.py b/src/mistralai/client/schedules.py index 9b013acd..3eb7d326 100644 --- a/src/mistralai/client/schedules.py +++ b/src/mistralai/client/schedules.py @@ -405,6 +405,188 @@ async def schedule_workflow_async( raise errors.SDKError("Unexpected response received", http_res) + def get_schedule( + self, + *, + schedule_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ScheduleDefinitionOutput: + r"""Get Schedule + + :param schedule_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetScheduleV1WorkflowsSchedulesScheduleIDGetRequest( + schedule_id=schedule_id, + ) + + req = self._build_request( + method="GET", + path="/v1/workflows/schedules/{schedule_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_schedule_v1_workflows_schedules__schedule_id__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ScheduleDefinitionOutput, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def get_schedule_async( + self, + *, + schedule_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ScheduleDefinitionOutput: + r"""Get Schedule + + :param schedule_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetScheduleV1WorkflowsSchedulesScheduleIDGetRequest( + schedule_id=schedule_id, + ) + + req = self._build_request_async( + method="GET", + path="/v1/workflows/schedules/{schedule_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_schedule_v1_workflows_schedules__schedule_id__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ScheduleDefinitionOutput, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + def unschedule_workflow( self, *, @@ -587,6 +769,226 @@ async def unschedule_workflow_async( raise errors.SDKError("Unexpected response received", http_res) + def update_schedule( + self, + *, + schedule_id: str, + schedule: Union[ + models.PartialScheduleDefinition, models.PartialScheduleDefinitionTypedDict + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowScheduleResponse: + r"""Update Schedule + + :param schedule_id: + :param schedule: Schedule definition for partial updates. + + All fields are optional (inherited from _ScheduleRequestBase). Only explicitly-set + fields are applied during an update; unset fields preserve the existing schedule values. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.UpdateScheduleV1WorkflowsSchedulesScheduleIDPatchRequest( + schedule_id=schedule_id, + workflow_schedule_update_request=models.WorkflowScheduleUpdateRequest( + schedule=utils.get_pydantic_model( + schedule, models.PartialScheduleDefinition + ), + ), + ) + + req = self._build_request( + method="PATCH", + path="/v1/workflows/schedules/{schedule_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.workflow_schedule_update_request, + False, + False, + "json", + models.WorkflowScheduleUpdateRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="update_schedule_v1_workflows_schedules__schedule_id__patch", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WorkflowScheduleResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def update_schedule_async( + self, + *, + schedule_id: str, + schedule: Union[ + models.PartialScheduleDefinition, models.PartialScheduleDefinitionTypedDict + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowScheduleResponse: + r"""Update Schedule + + :param schedule_id: + :param schedule: Schedule definition for partial updates. + + All fields are optional (inherited from _ScheduleRequestBase). Only explicitly-set + fields are applied during an update; unset fields preserve the existing schedule values. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.UpdateScheduleV1WorkflowsSchedulesScheduleIDPatchRequest( + schedule_id=schedule_id, + workflow_schedule_update_request=models.WorkflowScheduleUpdateRequest( + schedule=utils.get_pydantic_model( + schedule, models.PartialScheduleDefinition + ), + ), + ) + + req = self._build_request_async( + method="PATCH", + path="/v1/workflows/schedules/{schedule_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.workflow_schedule_update_request, + False, + False, + "json", + models.WorkflowScheduleUpdateRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="update_schedule_v1_workflows_schedules__schedule_id__patch", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WorkflowScheduleResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + def pause_schedule( self, *, diff --git a/src/mistralai/client/search_indexes.py b/src/mistralai/client/search_indexes.py new file mode 100644 index 00000000..a4e9887d --- /dev/null +++ b/src/mistralai/client/search_indexes.py @@ -0,0 +1,378 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: c5a0a7df993a + +from .basesdk import BaseSDK +from mistralai.client import errors, models, utils +from mistralai.client._hooks import HookContext +from mistralai.client.types import OptionalNullable, UNSET +from mistralai.client.utils import get_security_from_env +from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, List, Mapping, Optional, Union + + +class SearchIndexes(BaseSDK): + def list( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.SearchIndexResponse]: + r"""Get Search Indexes + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + req = self._build_request( + method="GET", + path="/v1/rag/search_index", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_search_indexes_v1_rag_search_index_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(List[models.SearchIndexResponse], http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def list_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.SearchIndexResponse]: + r"""Get Search Indexes + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + req = self._build_request_async( + method="GET", + path="/v1/rag/search_index", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_search_indexes_v1_rag_search_index_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(List[models.SearchIndexResponse], http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def register( + self, + *, + index: Union[ + models.CreateSearchIndexInfoRequestIndex, + models.CreateSearchIndexInfoRequestIndexTypedDict, + ], + document_count: OptionalNullable[int] = UNSET, + status: Optional[models.CreateSearchIndexInfoRequestStatus] = "offline", + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.SearchIndexResponse: + r"""Register Search Index + + :param index: + :param document_count: + :param status: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.CreateSearchIndexInfoRequest( + document_count=document_count, + status=status, + index=utils.get_pydantic_model( + index, models.CreateSearchIndexInfoRequestIndex + ), + ) + + req = self._build_request( + method="PUT", + path="/v1/rag/search_index", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.CreateSearchIndexInfoRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="register_search_index_v1_rag_search_index_put", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.SearchIndexResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def register_async( + self, + *, + index: Union[ + models.CreateSearchIndexInfoRequestIndex, + models.CreateSearchIndexInfoRequestIndexTypedDict, + ], + document_count: OptionalNullable[int] = UNSET, + status: Optional[models.CreateSearchIndexInfoRequestStatus] = "offline", + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.SearchIndexResponse: + r"""Register Search Index + + :param index: + :param document_count: + :param status: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.CreateSearchIndexInfoRequest( + document_count=document_count, + status=status, + index=utils.get_pydantic_model( + index, models.CreateSearchIndexInfoRequestIndex + ), + ) + + req = self._build_request_async( + method="PUT", + path="/v1/rag/search_index", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.CreateSearchIndexInfoRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="register_search_index_v1_rag_search_index_put", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.SearchIndexResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/uv.lock b/uv.lock index 2f23fc8b..4fd91372 100644 --- a/uv.lock +++ b/uv.lock @@ -1015,7 +1015,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.4.5" +version = "2.4.6" source = { editable = "." } dependencies = [ { name = "eval-type-backport" },