From e932f302bbe074d2b4d5b4925174c64036457aac Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 13 Aug 2026 15:37:25 +0000 Subject: [PATCH 1/2] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.763.6 --- .speakeasy/gen.lock | 288 ++++++++-- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 12 +- README.md | 10 +- RELEASES.md | 12 +- ...thenticationmethodcreateorupdaterequest.md | 15 +- docs/models/body.md | 11 + docs/models/clientsecret.md | 9 + docs/models/clientsessionpurpose.md | 15 + docs/models/createconnectorrequest.md | 1 + ...teingestionpipelineconfigurationrequest.md | 9 +- docs/models/createrealtimesessionrequest.md | 11 + docs/models/createrealtimesessionresponse.md | 11 + docs/models/deploymentdetailresponse.md | 28 +- docs/models/deploymentresponse.md | 26 +- docs/models/extendedoauthservermetadata.md | 53 +- ...entv1workflowsdeploymentsnamegetrequest.md | 7 +- docs/models/globalheadervalue.md | 13 + .../models/ingestionpipelinetargetindexref.md | 9 + docs/models/listorganizationsresponse.md | 8 + docs/models/listworkspacesresponse.md | 8 + docs/models/oauthmetadatasource.md | 20 + docs/models/publicauthenticationmethod.md | 12 +- docs/models/userorganization.md | 9 + .../usersapilistorganizationsrequest.md | 9 + .../usersapilistorganizationsresponse.md | 8 + .../usersapilistorganizationssecurity.md | 8 + docs/models/usersapilistworkspacesrequest.md | 10 + docs/models/usersapilistworkspacesresponse.md | 8 + docs/models/usersapilistworkspacessecurity.md | 8 + docs/models/userworkspace.md | 10 + docs/sdks/connectors/README.md | 1 + docs/sdks/deployments/README.md | 1 + .../ingestionpipelineconfigurations/README.md | 11 +- docs/sdks/sessions/README.md | 51 ++ docs/sdks/users/README.md | 95 ++++ src/mistralai/client/_version.py | 4 +- src/mistralai/client/connectors.py | 20 + src/mistralai/client/deployments.py | 6 + .../ingestion_pipeline_configurations.py | 24 +- src/mistralai/client/models/__init__.py | 111 ++++ ...thenticationmethodcreateorupdaterequest.py | 9 +- src/mistralai/client/models/clientsecret.py | 18 + .../client/models/clientsessionpurpose.py | 9 + ...lient_session_v1_client_sessions_postop.py | 14 + .../client/models/createconnectorrequest.py | 7 + ...teingestionpipelineconfigurationrequest.py | 15 +- .../models/createrealtimesessionrequest.py | 34 ++ .../models/createrealtimesessionresponse.py | 61 ++ .../client/models/deploymentdetailresponse.py | 10 +- .../client/models/deploymentresponse.py | 10 +- .../models/extendedoauthservermetadata.py | 6 + ...ent_v1_workflows_deployments_name_getop.py | 46 +- .../client/models/globalheadervalue.py | 45 ++ .../models/ingestionpipelinetargetindexref.py | 47 ++ .../models/listorganizationsresponse.py | 18 + .../client/models/listworkspacesresponse.py | 18 + .../client/models/oauthmetadatasource.py | 16 + .../models/publicauthenticationmethod.py | 17 +- .../client/models/userorganization.py | 21 + .../models/users_api_list_organizationsop.py | 81 +++ .../models/users_api_list_workspacesop.py | 104 ++++ src/mistralai/client/models/userworkspace.py | 26 + src/mistralai/client/realtime.py | 21 + src/mistralai/client/sdk.py | 3 + src/mistralai/client/sessions.py | 204 +++++++ src/mistralai/client/users.py | 523 +++++++++++++++++- 67 files changed, 2202 insertions(+), 165 deletions(-) create mode 100644 docs/models/body.md create mode 100644 docs/models/clientsecret.md create mode 100644 docs/models/clientsessionpurpose.md create mode 100644 docs/models/createrealtimesessionrequest.md create mode 100644 docs/models/createrealtimesessionresponse.md create mode 100644 docs/models/globalheadervalue.md create mode 100644 docs/models/ingestionpipelinetargetindexref.md create mode 100644 docs/models/listorganizationsresponse.md create mode 100644 docs/models/listworkspacesresponse.md create mode 100644 docs/models/oauthmetadatasource.md create mode 100644 docs/models/userorganization.md create mode 100644 docs/models/usersapilistorganizationsrequest.md create mode 100644 docs/models/usersapilistorganizationsresponse.md create mode 100644 docs/models/usersapilistorganizationssecurity.md create mode 100644 docs/models/usersapilistworkspacesrequest.md create mode 100644 docs/models/usersapilistworkspacesresponse.md create mode 100644 docs/models/usersapilistworkspacessecurity.md create mode 100644 docs/models/userworkspace.md create mode 100644 docs/sdks/sessions/README.md create mode 100644 src/mistralai/client/models/clientsecret.py create mode 100644 src/mistralai/client/models/clientsessionpurpose.py create mode 100644 src/mistralai/client/models/create_client_session_v1_client_sessions_postop.py create mode 100644 src/mistralai/client/models/createrealtimesessionrequest.py create mode 100644 src/mistralai/client/models/createrealtimesessionresponse.py create mode 100644 src/mistralai/client/models/globalheadervalue.py create mode 100644 src/mistralai/client/models/ingestionpipelinetargetindexref.py create mode 100644 src/mistralai/client/models/listorganizationsresponse.py create mode 100644 src/mistralai/client/models/listworkspacesresponse.py create mode 100644 src/mistralai/client/models/oauthmetadatasource.py create mode 100644 src/mistralai/client/models/userorganization.py create mode 100644 src/mistralai/client/models/users_api_list_organizationsop.py create mode 100644 src/mistralai/client/models/users_api_list_workspacesop.py create mode 100644 src/mistralai/client/models/userworkspace.py create mode 100644 src/mistralai/client/realtime.py create mode 100644 src/mistralai/client/sessions.py diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index f20f7a0e1..bf55a93ca 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: 16908c882034b7a030c353316cab5a14 + docChecksum: d31579d67584c7ae3e4757057ff737bb docVersion: 1.0.0 speakeasyVersion: 1.763.6 generationVersion: 2.884.13 - releaseVersion: 2.9.2 - configChecksum: 8402d417235190f47a95e1096497e1cc + releaseVersion: 2.9.3 + configChecksum: 7083e0ed928566c2c43a9f501c3291b5 repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: a998fd63-4a22-4bcb-85a7-ef83676b4529 - pristine_commit_hash: eb58db4d51328f793773a14230234dbb2943be4a - pristine_tree_hash: 630c3d7082c107a6a3a819f0ab684cf7a0559516 + generation_id: ed4a7adf-e447-41b1-92c8-7ec4b97f7935 + pristine_commit_hash: e26f8994eba9afd57e65b7482d30643dff1a2e16 + pristine_tree_hash: 5e0d4db2cc74696ce363a4045768104029d15f9f features: python: acceptHeaders: 3.0.0 @@ -390,8 +390,8 @@ trackedFiles: pristine_git_object: d52b558f299a57878ef1102dd99890cbf32c711c docs/models/authenticationmethodcreateorupdaterequest.md: id: b64367bcb5e8 - last_write_checksum: sha1:58dd78fcb9dd88892210780619d27c761de8564e - pristine_git_object: 727f7fa59de36d7320c2ad6b1d2371488120fb79 + last_write_checksum: sha1:8b4e262a662826f5be71b656af8112e771114dc0 + pristine_git_object: 6618f1e4f7c070c2941cd6a64212382b8ba1be63 docs/models/authorization.md: id: dec4d9809e25 last_write_checksum: sha1:6bf766a7b49ca2b706bb4eb88ba2d56406e06e1e @@ -460,6 +460,10 @@ trackedFiles: id: 37aeed3d7dc4 last_write_checksum: sha1:3a3d663edfa4a812a9c06daad87a4143dff9d7e5 pristine_git_object: 087bec2ac5a1821720cfde579c9ec8214a3d35d3 + docs/models/body.md: + id: 3612a7201bb5 + last_write_checksum: sha1:a746d85e7ea05774bfe868a90a416c16f22c202d + pristine_git_object: 4ba9bb4e7b488424d4b9882bdbf1a179c212b2d1 docs/models/builtinconnectors.md: id: 9d14e972f08a last_write_checksum: sha1:ad790344ffc177d10a7eff06482c39d722cd7b95 @@ -592,6 +596,14 @@ trackedFiles: id: e1f291b21fc8 last_write_checksum: sha1:4647f66510f48e7c2199a8c3c50f7e664fbbb485 pristine_git_object: 236bb0c43de9d7de80cc85e48b1f1fe9b13daaec + docs/models/clientsecret.md: + id: 81427db59727 + last_write_checksum: sha1:da8effcc8a60e55ef6bec168f2502f955b24c66b + pristine_git_object: 19f880dfdbb1e352345e2dd187c0d2dd8b66e2f6 + docs/models/clientsessionpurpose.md: + id: cb7381a9ec13 + last_write_checksum: sha1:b532c599e8e9cd78d729793de68d6c1193f12d66 + pristine_git_object: 02a75441c86baf002dbecd13aab19682c669d2e7 docs/models/clienttaskscapability.md: id: addb004fe61a last_write_checksum: sha1:0e28bfef73308db54d12e8ce6e6f4a82a8513990 @@ -934,8 +946,8 @@ trackedFiles: pristine_git_object: 2e81d26d19950ef6c1bc7186b8497e1f739e8f0b docs/models/createconnectorrequest.md: id: 7a0ef9d82658 - last_write_checksum: sha1:327db73561ba59c09ecce8d9b9d06d1b30953eea - pristine_git_object: 9be7f2f5e9260f7470b96266534ff8131c744ce6 + last_write_checksum: sha1:fb3e7c3c35d9229c216054f704f769813916e0be + pristine_git_object: fd4ccca2dd5cc1bdfbfcb3100f5403e00bd0703c docs/models/createdatasetrecordrequest.md: id: e2c8a858a8e6 last_write_checksum: sha1:9b93d8087fca92dfa4bf1e681ecd2fbb61520e86 @@ -958,8 +970,8 @@ trackedFiles: pristine_git_object: 84be4dc64637998c25005d98ef335576a3db7f00 docs/models/createingestionpipelineconfigurationrequest.md: id: fec0e339a487 - last_write_checksum: sha1:1a3dad0fa0f5ac30494c6207a11e027c3bf1a349 - pristine_git_object: f6aeb2105adebedd85c3242c693616b14816ec63 + last_write_checksum: sha1:63b042068e1302be85e2103376742fc054c20564 + pristine_git_object: 96b788481e09169f07796eb9e074a1fcac46a6b0 docs/models/createjudgerequest.md: id: 13683829ce5d last_write_checksum: sha1:84122cf178b65c87a11a9c012d8d066441e2401d @@ -984,6 +996,14 @@ trackedFiles: id: 521f4aa23399 last_write_checksum: sha1:580e5074f38e08a9af0565ce185a70c65facc0ef pristine_git_object: b6ea6b5d9049d0ddc0e73325d88171ce773b2371 + docs/models/createrealtimesessionrequest.md: + id: 430cc39e70f1 + last_write_checksum: sha1:641a1914e6f302cd5704fc3d7f8c877be39365b7 + pristine_git_object: fecfa68a41fc4c9f0f0d77d62e94a5a0ad7d9820 + docs/models/createrealtimesessionresponse.md: + id: 4608ebc5e4af + last_write_checksum: sha1:d0050833b12d7f25d71639e1b9bbf90283b50812 + pristine_git_object: a948c04d0a04cf03da244f6327b703e6358e394f docs/models/createskillrequest.md: id: 8696f3d3db5b last_write_checksum: sha1:a634321de86ec5bcb875374a709b388529803ea3 @@ -1150,8 +1170,8 @@ trackedFiles: pristine_git_object: 9dff582203770fbdb9628cbb9893a962923e297b docs/models/deploymentdetailresponse.md: id: 712f7bbc8cc0 - last_write_checksum: sha1:752f0b9056d02c7daf68a26d6e298f547e4b6766 - pristine_git_object: 48e4f07fc5f968dc91e2eb46fdccfed072e7ac20 + last_write_checksum: sha1:16e45c9be1d1b656919911fafdc8d9637d41c46c + pristine_git_object: b9a2b36de9e343d2ac9c4431c6cb64759740bb87 docs/models/deploymentlistresponse.md: id: 45a11caf1008 last_write_checksum: sha1:e0d0d588f994f72dd7adcc096129cfdac50efb33 @@ -1182,8 +1202,8 @@ trackedFiles: pristine_git_object: e11a8275410eab9849577f7fe6b86665f86a04e6 docs/models/deploymentresponse.md: id: a9da842850c4 - last_write_checksum: sha1:4cf4e2a2710086051f2af7b4b97e9e40a10218b0 - pristine_git_object: cabf9f8d66eb62a9a6ccab1db6245581d3d299fb + last_write_checksum: sha1:855f482c39deeb021aec29fa088c57262c7a7788 + pristine_git_object: 91981f66383914f6332962bc0ebc6986f90c4a9f docs/models/deploymentstatus.md: id: b039895c72a9 last_write_checksum: sha1:fe2f0489b2fea1fa58454ea8abe7426d01b17794 @@ -1334,8 +1354,8 @@ trackedFiles: pristine_git_object: d7de83a9d4fad318d2e30f7718bf9b529a367158 docs/models/extendedoauthservermetadata.md: id: f204f1d46efe - last_write_checksum: sha1:36e6cefde0958cc831b0426541c0fd01c3045e7e - pristine_git_object: 601d9df6b27d9a63e9e1a2e786cab3afc3ee6370 + last_write_checksum: sha1:eec027ef1046d8d51f22c14009281b2006ed5997 + pristine_git_object: 661f85421166e79f29c6e72de56da96e76b984ae docs/models/failure.md: id: 3f79c7d64eac last_write_checksum: sha1:344f1cea9b786a399a0dd974d4df010714031b2a @@ -1610,8 +1630,8 @@ trackedFiles: pristine_git_object: cd6f7e832900fbda562dc9f9b5de4d390a5e73e3 docs/models/getdeploymentv1workflowsdeploymentsnamegetrequest.md: id: 655b59bc906d - last_write_checksum: sha1:2a98869f76afaf5be8d93482613027600f0d4039 - pristine_git_object: 6af056b16a647cf9e4e541cf433cf5ee2d3a8a80 + last_write_checksum: sha1:b3651f4e3d37de228f196c5e12fac239cdde379d + pristine_git_object: f54301f15d03a0708c1aa59c1417b7aa883e8056 docs/models/getfileresponse.md: id: a983b3c8acd6 last_write_checksum: sha1:643a3c92ce26f21a915bd485fc4af7817e79f864 @@ -1852,6 +1872,10 @@ trackedFiles: id: 285e970f4e99 last_write_checksum: sha1:f8567f25ee0db35a31d8a9de7ad953917ceee53e pristine_git_object: 1daf512a523516e03021d668c000733fa9e732c4 + docs/models/globalheadervalue.md: + id: 8d497a2b5d19 + last_write_checksum: sha1:c95ac0a4b90d29a6cc0ad3aa8f9660b21587914f + pristine_git_object: 56cefd67e15ba32a246d3a4815786239a7c4d0af docs/models/granularity.md: id: 3cee51c03dea last_write_checksum: sha1:7ac3b029b14105672460c3fab1b8ae56637fb979 @@ -1916,6 +1940,10 @@ trackedFiles: id: 95a1d6bf413b last_write_checksum: sha1:ba9e052c6ab8b13b4108ff395ac0e20181326f0b pristine_git_object: 16fde9c6a161526de8a86ccd330803f590285586 + docs/models/ingestionpipelinetargetindexref.md: + id: 3008f8f0680c + last_write_checksum: sha1:f4e9f55f9e14805b26cdf64376934e5acfcac0e5 + pristine_git_object: e6fcfe30d433752b8118267d32e2814421126738 docs/models/inputentries.md: id: a5c647d5ad90 last_write_checksum: sha1:4231bb97837bdcff4515ae1b00ff5e7712256e53 @@ -2204,6 +2232,10 @@ trackedFiles: id: ade37f6d014a last_write_checksum: sha1:10d4e1242cdac6cdc7597881e0d25ce06760971f pristine_git_object: 537269f7e774b31c45ac75c82c096530c0bd2b4e + docs/models/listorganizationsresponse.md: + id: 40564e9f4990 + last_write_checksum: sha1:549104cc1913e880eb80eca3a9ef9e05aa050b07 + pristine_git_object: 8a6a6d3a6c3252e4cc11af5cbcf570a2358f3fe9 docs/models/listpromptsresponse.md: id: cd6fa906e61b last_write_checksum: sha1:de70326e508f9d5e0cd58b316fbfb4969c38ecf7 @@ -2264,6 +2296,10 @@ trackedFiles: id: b7e837f50a09 last_write_checksum: sha1:f7a335daf57910fbc5bf435d43023271772bfc8f pristine_git_object: 2b8cb1e461c146faeb06a940781803a008ea2173 + docs/models/listworkspacesresponse.md: + id: fd657130fbe9 + last_write_checksum: sha1:981bd42ff0de16724cc334291280fd9189c2df2c + pristine_git_object: 0ea88aa13886b50674be4bb465fb271ec80640cd docs/models/loc.md: id: b071d5a509cc last_write_checksum: sha1:09a04749333ab50ae806c3ac6adcaa90d54df0f1 @@ -2480,6 +2516,10 @@ trackedFiles: id: f23959dcc4b0 last_write_checksum: sha1:ca434f8479c3f5e868db1269e86efa5e0d9070e2 pristine_git_object: 89f80436474e3c2293bb4fcafce11e626e2cdf79 + docs/models/oauthmetadatasource.md: + id: f6e4d57831a6 + last_write_checksum: sha1:99919c4ae0fbb417f6b917b835922677d4fb88f4 + pristine_git_object: 22e2804a4424325ad07c264a61463635299fc254 docs/models/observabilityerrorcode.md: id: 61d16ff95b87 last_write_checksum: sha1:1f31417a16dc83c9a1ddcd467f592e12d9cd9331 @@ -2782,8 +2822,8 @@ trackedFiles: pristine_git_object: 66cd6dc29e6a94856302a7c1bf624efaaab6a082 docs/models/publicauthenticationmethod.md: id: abfb51fdf794 - last_write_checksum: sha1:9be30607f8c895958f33b5be25fc1b8b4cb3d328 - pristine_git_object: 59de7076ce05ff71ba4bd5f22112459f4500bf4d + last_write_checksum: sha1:aa2c63309d0bb8183e0e5760c6084d9d8dd2298e + pristine_git_object: d810911a3a0bbccd6d40e5ef4263d63a989ac01f docs/models/publicconnectionconfig.md: id: e05a024f162c last_write_checksum: sha1:ab9dd73817a606e22c4d526910771158070e0e4e @@ -3872,10 +3912,42 @@ trackedFiles: id: 52c072c851e8 last_write_checksum: sha1:1de02bcf7082768ebe1bb912fdbebbec5a577b5a pristine_git_object: 8350f9e8f8996c136093e38760990f62fd01f8cf + docs/models/userorganization.md: + id: d193e07745fc + last_write_checksum: sha1:497ec11f8c5a5f93cbf9c2ff21d9f58b0003753a + pristine_git_object: 5de1a616ce1ed838b26e0f1119d5ae153b44097b docs/models/usersapigetidentitysecurity.md: id: 8af75bda1bc5 last_write_checksum: sha1:7ffc5e81badd66a9bc039618ff736cab0e34cc61 pristine_git_object: 3c8bc6ca66228a0f5e08c339316c1b5d31988fbb + docs/models/usersapilistorganizationsrequest.md: + id: 1a4c0d2d029b + last_write_checksum: sha1:407236f9a8771967b197620fd9655cd03b6b14fc + pristine_git_object: 2906cd66f331b571358b48a0f4a3c9a39cad79c5 + docs/models/usersapilistorganizationsresponse.md: + id: 1bb9b32a15d2 + last_write_checksum: sha1:90007bce26cff6737c7f6bff17d5f5c3c244297f + pristine_git_object: 5198158a7a84860bd7c71af433897477e602400c + docs/models/usersapilistorganizationssecurity.md: + id: 42ae3ba6301b + last_write_checksum: sha1:c78e2449126ea18b458dbf1449612f2d44f3b195 + pristine_git_object: 49414a0cededa483e1f3fc8c2e1a9ddab24f3dbe + docs/models/usersapilistworkspacesrequest.md: + id: 6a72fcd8ee5d + last_write_checksum: sha1:3790dd770a96442acb7ed115f82634aacb7ce7ae + pristine_git_object: 0c2dfeae0375d2c9948189370fcf14dbaaa2c71b + docs/models/usersapilistworkspacesresponse.md: + id: 8354631890bb + last_write_checksum: sha1:d008cc9c46c5e4e07e0bb3034d339259536237dc + pristine_git_object: 31c88d9238c04305c88a8aff873668400e09693a + docs/models/usersapilistworkspacessecurity.md: + id: 2f546e515eb8 + last_write_checksum: sha1:b794d7dd14e5ad8646e6afc6a73974b9521af8ec + pristine_git_object: 1c00dffac2e0386b57417214d1106724bd6191a3 + docs/models/userworkspace.md: + id: e35426656a3c + last_write_checksum: sha1:8aee61aa245bd3a4392f74faea4cab26933e11a8 + pristine_git_object: 88fb5a7cd63403a383bbd4aaef03a9f195f5dc6d docs/models/utils/retryconfig.md: id: 4343ac43161c last_write_checksum: sha1:562c0f21e308ad10c27f85f75704c15592c6929d @@ -4186,8 +4258,8 @@ trackedFiles: pristine_git_object: dc0f4984380b5b137266421e87a1505af5260e89 docs/sdks/connectors/README.md: id: 7633a87d946d - last_write_checksum: sha1:e9a2602ff5ba916c70a6c8aeffb77a13093e1185 - pristine_git_object: 1aca6ef31d813d660e9eb385ca4a3f98764b4533 + last_write_checksum: sha1:92b08df5d27e762195b93385f5aeb4494fe6e7b4 + pristine_git_object: a78167e66acf7b0c2f6c69e432c44a6237773d20 docs/sdks/conversations/README.md: id: e22a9d2c5424 last_write_checksum: sha1:68ede193fd35a89ab226aa92a92edaecf1eebb1a @@ -4198,8 +4270,8 @@ trackedFiles: pristine_git_object: 4fdc17180296cf2f6f36257e304dca2eef12cfdb docs/sdks/deployments/README.md: id: e7c5559ab768 - last_write_checksum: sha1:d886fea23530948ea23a8f6a3cd396d31f537be3 - pristine_git_object: e37a188282fd7a8f398ce2d56e7ae02535b7acb4 + last_write_checksum: sha1:4ea3776c7b06cb65c95618b6b2cf426cad9f7d9b + pristine_git_object: 1b3940989749aa3748054602e98a6d8ee1d6393b docs/sdks/documents/README.md: id: 9758e88a0a9d last_write_checksum: sha1:7f1540110547b0ddb1350dc24422bb94bdf3bdd8 @@ -4230,8 +4302,8 @@ trackedFiles: pristine_git_object: 7bf8908378c764c58cca2eddc6a4a97574c3709f docs/sdks/ingestionpipelineconfigurations/README.md: id: ead2af7afd1c - last_write_checksum: sha1:77adda7a00ccea31ceca1aadde96141a1462dc94 - pristine_git_object: 671a7182a9fb2622b68db2826640d6eeae93e6b0 + last_write_checksum: sha1:3850c939c469c96a73abb57b4438f176fcc9fa80 + pristine_git_object: 750ba36d903cd8f40cc1b6447c578f77818ee471 docs/sdks/jobs/README.md: id: 7371cdc8b89a last_write_checksum: sha1:2840eb2f036a54814db35ef37a924317f32f57d1 @@ -4276,6 +4348,10 @@ trackedFiles: id: b58e7a6ab4f1 last_write_checksum: sha1:bf6259fabb8f7d65993f073e58f58d831bfdaabd pristine_git_object: bf6c052b2dd3f473524a6401bfac46670dca2241 + docs/sdks/sessions/README.md: + id: 57ad62844f79 + last_write_checksum: sha1:a843e0a07a040ed50e5c26ae79a1a67af592ef7c + pristine_git_object: 79d3c546e72598117a207e1caedd0cdcd6c92761 docs/sdks/skills/README.md: id: 3a14a5c90791 last_write_checksum: sha1:5e498f1ec501078a518eda8eac0b54e5f3c06b21 @@ -4298,8 +4374,8 @@ trackedFiles: pristine_git_object: 97703c9b4dc942385ee04ae96cbd100c3f632a17 docs/sdks/users/README.md: id: 5d80027045fe - last_write_checksum: sha1:173b16e6f195fd9796ac9399b7fef2be614d7ca9 - pristine_git_object: ac52c633b9f3981e8a729aa0185f5e185cf50021 + last_write_checksum: sha1:b9e7a083aa34479ca5f66c49b320dcc517fcf333 + pristine_git_object: a7c2bd7324612444b808198b6541f20b165a1b1e docs/sdks/voices/README.md: id: 4f1a657c8f68 last_write_checksum: sha1:b275bbda782ec5000b44f95961288f872c68b4e2 @@ -4338,8 +4414,8 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:95b70f4ebe56fab844e6b827d2819195da1d7d63 - pristine_git_object: 67f6c3f0adc5acb784357f9783687dff6a2ecc23 + last_write_checksum: sha1:0eb57e3022495b4758b082c3e051422892d5142d + pristine_git_object: e57779051a9ecf145e958ca205451c7de260eced src/mistralai/client/accesses.py: id: 76fc53bfcf59 last_write_checksum: sha1:33d8a0663a647b7a7e1946064d05c3b40e538816 @@ -4390,8 +4466,8 @@ trackedFiles: pristine_git_object: a19206185ab23809971b395c522a34da4e399eea src/mistralai/client/connectors.py: id: 39da03126050 - last_write_checksum: sha1:089028395699263b3a7940e0797c1b1e63bbba2c - pristine_git_object: 63e74079bd83987f825dc8f19a4cc4237af5d9a9 + last_write_checksum: sha1:205549aa9893f7c7cf674921ce964fbed9652177 + pristine_git_object: f4c74ad2d1eb6b0182258308c5df91ea20914bce src/mistralai/client/conversations.py: id: 40692a878064 last_write_checksum: sha1:b56c051f97ec84539028d736409289579b8df48d @@ -4402,8 +4478,8 @@ trackedFiles: pristine_git_object: 8736de9f794df7a9b1d9871a5417dc981666b7fa src/mistralai/client/deployments.py: id: a874b267fcb9 - last_write_checksum: sha1:41576b7ec508d5ae7fa20f98951cb4ce4eb76b3e - pristine_git_object: 91c4fb6f5fda28b5fd663ca46e91f305ccea36a5 + last_write_checksum: sha1:15c1f4adf2c6711c540bec57dd8ad86ab7fd0caa + pristine_git_object: ed1825f28e84689b55afbdeee09a7569edd45c79 src/mistralai/client/documents.py: id: bcc17286c31c last_write_checksum: sha1:4261eeb474387959cbf359911e8ff3cfe706f75f @@ -4466,8 +4542,8 @@ trackedFiles: pristine_git_object: 544af7f87d6b7097935290bebd08e30e5f485672 src/mistralai/client/ingestion_pipeline_configurations.py: id: f5a994272058 - last_write_checksum: sha1:488eb32dd87e85077624d25296d7ed84f640dfce - pristine_git_object: 07606ff20b06e8fae71405675e835bab46aa412d + last_write_checksum: sha1:8ce2d5d89c9efc5aa0c3ff5e494dd8c7c8560665 + pristine_git_object: 2c9247eb9e6e77f56265a902c9a12b10fb3c220b src/mistralai/client/jobs.py: id: 22e6e695e52b last_write_checksum: sha1:949a64171d4838c803aa8ae29e93f0c10d835f2f @@ -4490,8 +4566,8 @@ trackedFiles: pristine_git_object: d0b6b4fc091393e6e8a75f158363baa8e2ea21d4 src/mistralai/client/models/__init__.py: id: e0e8dad92725 - last_write_checksum: sha1:9302958dc9e6bdbadadcba5b289dd653036b9d89 - pristine_git_object: 341e9723affb668d05c9f7244b2ee8e8ac7caa6a + last_write_checksum: sha1:c21173f2a0b39ce671fd13f5f5b832fbb4962b1e + pristine_git_object: b24fd3fa3e2cf4b254fcda6d835db1e7a35d17b9 src/mistralai/client/models/activitytaskcompletedattributesresponse.py: id: 8174941767cc last_write_checksum: sha1:b5246e203765ba0532a6a65d391bdd237ab2c891 @@ -4730,8 +4806,8 @@ trackedFiles: pristine_git_object: bbb7a7a1378adae39e1ba7543d3363f8ebcab2ca src/mistralai/client/models/authenticationmethodcreateorupdaterequest.py: id: 240c643113bb - last_write_checksum: sha1:51361d72df48d4c719bdde24f36c067502405ce2 - pristine_git_object: de0c3f82d4654f759e74ae654867738e682c5592 + last_write_checksum: sha1:eee0372d19bb1d8c5081bff282e0fff64301dc7b + pristine_git_object: b9a01eecf25e43736c5c73f00f72a78058b8e3ab src/mistralai/client/models/authstatus.py: id: 0f25b817bca6 last_write_checksum: sha1:2be578532e4a239c298d4d534f59023b40f2d86b @@ -4856,6 +4932,14 @@ trackedFiles: id: b2ad660c5c9b last_write_checksum: sha1:9e9ab4cfed5487f3ba336de7465efcbe7891fdcb pristine_git_object: 772711601752ec07d571befea5b51a30abed1650 + src/mistralai/client/models/clientsecret.py: + id: c56702dc45ce + last_write_checksum: sha1:a88fbc67c6e9d94495ac92a66870fecf641b4d2b + pristine_git_object: 1b2e1aeda69b567939ea796b1e6bb2c480b983e5 + src/mistralai/client/models/clientsessionpurpose.py: + id: 650b94028268 + last_write_checksum: sha1:c446ab93e25f54e18cb8387cc6b4c3b14f03a5e5 + pristine_git_object: 9548b7091b193d229df8371f1d221b4d74eae258 src/mistralai/client/models/clienttaskscapability.py: id: 83aeca444b21 last_write_checksum: sha1:1aac7c99f18f0449acbe46ab38e0012f7a4b1862 @@ -5096,6 +5180,10 @@ trackedFiles: id: 6685e3b50b50 last_write_checksum: sha1:ee993afc39cece27caf99ee60258f45980d86cbc pristine_git_object: e717284f15a4f3c88768f96d98007b95aa2b7922 + src/mistralai/client/models/create_client_session_v1_client_sessions_postop.py: + id: 6faae4a19392 + last_write_checksum: sha1:ac709658afb44c0412969ba55dc09dbabfe64b8b + pristine_git_object: b07a04449a1bcb954ef60ffc890aabf6f041d592 src/mistralai/client/models/create_dataset_record_v1_observability_datasets_dataset_id_records_postop.py: id: 1ddc53a46c74 last_write_checksum: sha1:5df5b6676f6c115da0b1c242a6f3cc7f8c077927 @@ -5114,8 +5202,8 @@ trackedFiles: pristine_git_object: b3957df9ef369ecc1746ee3efd1b463bc10b4be7 src/mistralai/client/models/createconnectorrequest.py: id: 3da192d6491a - last_write_checksum: sha1:bc4f8a032d0b03b5747e329f45bf24e346fc3653 - pristine_git_object: fb79e2a00ca4fc6a8966441bd72547d18913fd9a + last_write_checksum: sha1:2698016e646bdd5f539b3652c31e54dcc5733271 + pristine_git_object: 04642fc2b60ba537c82ccbdefdc35d6a35369cd8 src/mistralai/client/models/createdatasetrecordrequest.py: id: 9455e38a8c31 last_write_checksum: sha1:dbd1103182457884a9208109e8547728265e7ee6 @@ -5134,8 +5222,8 @@ trackedFiles: pristine_git_object: bafefc372e35f21c38e45b0055610f19e7efad44 src/mistralai/client/models/createingestionpipelineconfigurationrequest.py: id: 480f219c27e5 - last_write_checksum: sha1:1cb2730b7d0c680c180eff4b285242bb198d29bc - pristine_git_object: 068c8db95da3561ae993c5d780c54bdbbdba29c7 + last_write_checksum: sha1:709685e6f602e2badcd3e594b60b8a2d1be01e35 + pristine_git_object: 8e6bdffe885c295e8df1606b22e09f264236583f src/mistralai/client/models/createjudgerequest.py: id: e606837a626e last_write_checksum: sha1:d5c16104089075af1b8b2fe922006aea9d74b0e3 @@ -5152,6 +5240,14 @@ trackedFiles: id: 53a2fee8bd20 last_write_checksum: sha1:c10c1e63bdda716c762b749333e7a3d63ed0fde9 pristine_git_object: 32c96a41aef6c5f592c660c2107cd5948d582822 + src/mistralai/client/models/createrealtimesessionrequest.py: + id: 285bf15f71b1 + last_write_checksum: sha1:4dd0aef3412b0662e47842214fff3f0805e461ed + pristine_git_object: fc5c1f8cf5f21dc85c9c29f4ebb31fff735f1f77 + src/mistralai/client/models/createrealtimesessionresponse.py: + id: 9183c3301002 + last_write_checksum: sha1:88de386c1e96d4e5fc0c5d8a0771b8d0523680b6 + pristine_git_object: 0da83ea6ab07a1422d28f622f4e87346842cb974 src/mistralai/client/models/createskillrequest.py: id: 226c4222df28 last_write_checksum: sha1:d4a56ecc8762fc503d63ce37d605a8460813bb57 @@ -5310,8 +5406,8 @@ trackedFiles: pristine_git_object: 53f4e05984410b65529e0e53c117bdcc0388bb78 src/mistralai/client/models/deploymentdetailresponse.py: id: 7f4a17a1c7ca - last_write_checksum: sha1:f2516aa4034fde8b7afcb310db027c65f859954e - pristine_git_object: 2da9fcb0e3a3c7e6a8b0fd1b8d94a01cdca8515a + last_write_checksum: sha1:d3bde8a0b8742854f0d57b5da005de8d016d3972 + pristine_git_object: 7035aaca469b73bd24ea0c80011f17e971386ce1 src/mistralai/client/models/deploymentlistresponse.py: id: 1f0b404ba621 last_write_checksum: sha1:828203fc1426550d9b7f6e9d3288f921eec9bfb1 @@ -5342,8 +5438,8 @@ trackedFiles: pristine_git_object: bafd7796692153ed78c6b374f4672c2d73b95009 src/mistralai/client/models/deploymentresponse.py: id: ea15ddd64402 - last_write_checksum: sha1:ab885c9d02a2f6029981e2d102254724a89f9dc3 - pristine_git_object: c43d77e567ab0e64dfbbf7d5a0bf64494edb28d2 + last_write_checksum: sha1:68fc45c3d3e81c00d6b15e68d2fad135cc0fefc0 + pristine_git_object: 2945cbbd5c77c432520a7812a1783d64fc7ae783 src/mistralai/client/models/deploymentworkerlistresponse.py: id: 29dddd42d9cc last_write_checksum: sha1:edfb69f1c0ca8d33d7db792ea37299d7ef87db7e @@ -5466,8 +5562,8 @@ trackedFiles: pristine_git_object: f1600cac74e1d50979277d3eb6830ea5e84b69ec src/mistralai/client/models/extendedoauthservermetadata.py: id: 967e2e08f18c - last_write_checksum: sha1:e2f79f2591669eb0f4d7542cd6a0b97dd1e7bd8d - pristine_git_object: 91033c6a6dd76744f917ff8eb093ca8d4f0b4ffa + last_write_checksum: sha1:d9c14319ef10e58c3924afbe512cb7fb01580ee1 + pristine_git_object: 0600c38ca894e34e40c8e8caea2de6cf7b2c57e8 src/mistralai/client/models/failure.py: id: 596e38493eaa last_write_checksum: sha1:5077e5660c7192e2123fc26059f1786f9d75e273 @@ -5690,8 +5786,8 @@ trackedFiles: pristine_git_object: cf63c308dda3961008a08d8689ae2e22d1d9ec54 src/mistralai/client/models/get_deployment_v1_workflows_deployments_name_getop.py: id: 3fae92e2573a - last_write_checksum: sha1:2257627743f50ff58107762a69aae40ef5528214 - pristine_git_object: 1f699bed56b6a40166274492d7b2ca4ff84a8f61 + last_write_checksum: sha1:1060d40b6d833ce2ee6136184d3bdfce77504bfb + pristine_git_object: 412b09fb7f0a342e5b505572e564f7f6c9000978 src/mistralai/client/models/get_judge_by_id_v1_observability_judges_judge_id_getop.py: id: 4201c3c5a891 last_write_checksum: sha1:44c9a7d21ea727e0f849cfc5dc4a02220bcf6e74 @@ -5908,6 +6004,10 @@ trackedFiles: id: 74d6a74eca43 last_write_checksum: sha1:3529a243753f0136b314fb525c78dc48a57ea9a7 pristine_git_object: da5a5ead73d00d737b7b81c3d50750ae76947577 + src/mistralai/client/models/globalheadervalue.py: + id: 8f50c772664e + last_write_checksum: sha1:4e4b6b35f8f1824ea61ff9171fcd4e91adf7f057 + pristine_git_object: e6dfdc89e95e2c7e8733b2179faa9edac3a78465 src/mistralai/client/models/granularity.py: id: 5230c577800b last_write_checksum: sha1:1cad36e5e3a6cd71a3e761bf22ecdcc80f1179a8 @@ -5968,6 +6068,10 @@ trackedFiles: id: b4746c0f2c1c last_write_checksum: sha1:f256b78196bde2b5bf39f15ed65b1daba784680a pristine_git_object: 5289c66d7097548dc5d434f639eaefe2ceb7e504 + src/mistralai/client/models/ingestionpipelinetargetindexref.py: + id: 1fd3655ff376 + last_write_checksum: sha1:449511f0e1ee02cdd31ddb9bf31ead49fd16bc16 + pristine_git_object: 419c42e293095fb12cba53673ec89596b99aba95 src/mistralai/client/models/inputentries.py: id: 44727997dacb last_write_checksum: sha1:9e2a776be59c5043ea4179a60ac082faf064cc3d @@ -6236,6 +6340,10 @@ trackedFiles: id: df556a618365 last_write_checksum: sha1:7cc4c035b76fcf43410e26161b0fba9a9ea82b6e pristine_git_object: dc3b3afc2fb383056a447fd6d7505301cc8de6a4 + src/mistralai/client/models/listorganizationsresponse.py: + id: 521126214ce3 + last_write_checksum: sha1:83e6b6ff69517b0499f5c81a25d496d2e08b23e2 + pristine_git_object: 164489da9544181fbb8ca5f89a2d7f00bba3af82 src/mistralai/client/models/listpromptsresponse.py: id: 45e30bdd1633 last_write_checksum: sha1:899b3455c54802beb8df6004a4a0759426004678 @@ -6268,6 +6376,10 @@ trackedFiles: id: 20a423148117 last_write_checksum: sha1:bdf75230150022794f0268453c9f59952580c524 pristine_git_object: be99ccea41922c73c7209fbc78393c7ae47e1a3e + src/mistralai/client/models/listworkspacesresponse.py: + id: 42d87f615991 + last_write_checksum: sha1:2bff90b2c3111176c29c320b682c3cf1cc7c10a2 + pristine_git_object: de1edb1b85741c66375605dc75dcfe7f1a5bcda6 src/mistralai/client/models/locationtype.py: id: 72a73946b20e last_write_checksum: sha1:94cc8f7569401b43e03267e53d9634a3384980a5 @@ -6436,6 +6548,10 @@ trackedFiles: id: 167c3b8a104e last_write_checksum: sha1:146c4ce3a29c0bedcb575cf7fa32cb97aa375c5b pristine_git_object: 76ebfd0de6c7457bcecb1aee026ea16ffa8a7cbd + src/mistralai/client/models/oauthmetadatasource.py: + id: eacda6ae7dda + last_write_checksum: sha1:0d047fc700d71915d706a0ca9ccec24c0028a8f4 + pristine_git_object: 5bbbb21b9e97dc4a7a6324a07d87d7d26eb4683e src/mistralai/client/models/observabilityerrorcode.py: id: ae572b470a30 last_write_checksum: sha1:d6aa26a0792aed34f4171516599194edd4a5b867 @@ -6690,8 +6806,8 @@ trackedFiles: pristine_git_object: 2591f8862d1acd160c2674981d2881bf73714bd1 src/mistralai/client/models/publicauthenticationmethod.py: id: 545ab7f24523 - last_write_checksum: sha1:5256ee8833f1e44717f19b6d2ee3aeff6dbe2dc4 - pristine_git_object: 42e943a6f63dcfcfcfc3e994080e318c21a5e619 + last_write_checksum: sha1:a8069a27a9d3d9a0d6ec9acc8e0b9ccb9c6aee14 + pristine_git_object: 5f9f32f105c27b91e88cd073b7b102002bc8941e src/mistralai/client/models/publicconnectionconfig.py: id: 03c2460e04ac last_write_checksum: sha1:faea37686e78fd3cc8a74371a3004d59ca57f4e9 @@ -7544,10 +7660,26 @@ trackedFiles: id: cb583483acf4 last_write_checksum: sha1:b97161e1abd159d5a0c5757cac2a97bd6a5f1ef0 pristine_git_object: 7b4b55630022708db7a53476dc7111416594df46 + src/mistralai/client/models/userorganization.py: + id: 14366f8fb1a5 + last_write_checksum: sha1:7c04658683cf2e2e1a1ee8c1bd08034886315ca0 + pristine_git_object: e6330933c9c564c41bc2d458f915d6392afb969b src/mistralai/client/models/users_api_get_identityop.py: id: c2f2ad3f3d91 last_write_checksum: sha1:998604d802f33911f2bd18f059901aee60172617 pristine_git_object: f15cb2ee4a034b559f6097559e328bab8364aab8 + src/mistralai/client/models/users_api_list_organizationsop.py: + id: ee2d958ab1cb + last_write_checksum: sha1:35e569ebcab437533d76206bbbb3b045a3f551bd + pristine_git_object: 0cc969b3c3b8b441bf83cb98c299dc21a643191c + src/mistralai/client/models/users_api_list_workspacesop.py: + id: 71c247d21aeb + last_write_checksum: sha1:53ff3bfd3817a74f6b3658ad0b3ef7a030e871e3 + pristine_git_object: 6feda78949d3d0e2353c43545e8c3532e28ddfb1 + src/mistralai/client/models/userworkspace.py: + id: 66ffd9d93482 + last_write_checksum: sha1:b384e1286ae04002daca4fb7f0e0dd0e83fa5c8c + pristine_git_object: 6f9f9787f77b7cfa7fc3d1717c8dfeda6fa02563 src/mistralai/client/models/validationerror.py: id: 15df3c7368ab last_write_checksum: sha1:4acbbd9e47cf9b351336d552488d617270d37758 @@ -7828,6 +7960,10 @@ trackedFiles: id: 2c2b641de1b6 last_write_checksum: sha1:77d6bd45daba9879a753768896dac249eb645996 pristine_git_object: 934b2374571b475a573d38e59c8fdf40aa5ba3b8 + src/mistralai/client/realtime.py: + id: 9d55a65b4bc9 + last_write_checksum: sha1:72a213d6426bc1a4cd76141aa12e046a4eab3614 + pristine_git_object: 1c5795b36d26ac70125bcf387a563ca8aabdcd89 src/mistralai/client/records.py: id: 10f90c990bd8 last_write_checksum: sha1:7e6562deb51ae6e18f36ac0a50da5c62b32c1e96 @@ -7842,8 +7978,8 @@ trackedFiles: pristine_git_object: 09c046b60e1a6af4e18b279a98bf6eb45f8f0623 src/mistralai/client/sdk.py: id: 48edbcb38d7e - last_write_checksum: sha1:7c5dca6d4587ce1642f4488b38995f8418ae4d0b - pristine_git_object: 9b7eb230d362e626d2a3529154872d7cfe5be5cf + last_write_checksum: sha1:bb48556821cf7deacdc3272d23e0753965239c9e + pristine_git_object: a5ff2a8517cc3b96b4400e616c0665298a2edb64 src/mistralai/client/sdkconfiguration.py: id: b7dd68a0235e last_write_checksum: sha1:db990e218c174af83f0ba770da7e4f8da4e54157 @@ -7852,6 +7988,10 @@ trackedFiles: id: c5a0a7df993a last_write_checksum: sha1:68806bde623a9f4ebb1240f118a97824f8722579 pristine_git_object: 94ca614ff8346a2acd1f3ec479b07dc0d286b678 + src/mistralai/client/sessions.py: + id: 6387fd8f7623 + last_write_checksum: sha1:ea2ae46e6755e4a239ff08cf3c2d63c67ff0fbca + pristine_git_object: 62914daeb0e03c3a12e7d5208cebb643ffe93baf src/mistralai/client/skills.py: id: d00f9eb877ec last_write_checksum: sha1:84e01c84a8a3bf3d31a6b204d846d244c0fd2f11 @@ -7882,8 +8022,8 @@ trackedFiles: pristine_git_object: 4e889aa0ffbb4402e416a40fa6259334cb0a3c5c src/mistralai/client/users.py: id: 81be4772253e - last_write_checksum: sha1:9d23e17e2668086f186b4878d12259da9be7e8a2 - pristine_git_object: 6112a1f50b2a4bfc4fb043a6e39cb051fd1b8f96 + last_write_checksum: sha1:4bfe0a11afb2d30602438292e93345148842f28a + pristine_git_object: d01a2a0cb780c73c620735cc74316feba228b6a9 src/mistralai/client/utils/__init__.py: id: b69505f4b269 last_write_checksum: sha1:98698da73839db7c258fd1afd45ccacff86c64be @@ -11529,6 +11669,34 @@ examples: responses: "200": application/json: "" + users_api_list_organizations: + speakeasy-default-users-api-list-organizations: + parameters: + query: + offset: 0 + limit: 100 + responses: + "200": + application/json: {"organizations": []} + users_api_list_workspaces: + speakeasy-default-users-api-list-workspaces: + parameters: + query: + organization_id: "1a2b3c4d-5e6f-4a8b-9c0d-1e2f3a4b5c6d" + offset: 0 + limit: 100 + responses: + "200": + application/json: {"workspaces": [{"id": "7f8e9d0c-1b2a-4c3d-8e9f-0a1b2c3d4e5f", "name": "production", "organization_id": "1a2b3c4d-5e6f-4a8b-9c0d-1e2f3a4b5c6d"}]} + create_client_session_v1_client_sessions_post: + speakeasy-default-create-client-session-v1-client-sessions-post: + requestBody: + application/json: {"purpose": "realtime", "model": "Ranchero"} + responses: + "201": + application/json: {"object": "client.session", "purpose": "realtime", "expires_at": "2025-08-27T00:12:05.151Z", "client_secret": {"value": "cQ6tjM8OdNwo74N", "expires_at": "2025-06-05T23:20:26.933Z"}} + "422": + application/json: {} examplesVersion: 1.0.2 generatedTests: {} generatedFiles: diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 516542935..d4912251b 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.9.2 + version: 2.9.3 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index e0ef16b70..e24f644e1 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -16,11 +16,11 @@ sources: - speakeasy-mistralai-gcp-sdk-26292830187-1 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:5d604f8bee46f59eae32165470d5fa10143ecdd76da683b5a2f1df148f31b19e - sourceBlobDigest: sha256:7697ea237b99d8b459a7f3853b08046e1f94f07d1478196486c259f17697d135 + sourceRevisionDigest: sha256:d0ce984b4c030ab9d532545d8935f6e4e12ab160e77dc5ca0b8d5924f7d78480 + sourceBlobDigest: sha256:72d88796291d78aaa55ee4eb609cfc5f62065ee3795180d4d57404c72aa19657 tags: - latest - - speakeasy-mistralai-sdk-31439429658-1 + - speakeasy-mistralai-sdk-31716300632-1 targets: mistralai-azure-sdk: source: mistral-azure-source @@ -39,10 +39,10 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:5d604f8bee46f59eae32165470d5fa10143ecdd76da683b5a2f1df148f31b19e - sourceBlobDigest: sha256:7697ea237b99d8b459a7f3853b08046e1f94f07d1478196486c259f17697d135 + sourceRevisionDigest: sha256:d0ce984b4c030ab9d532545d8935f6e4e12ab160e77dc5ca0b8d5924f7d78480 + sourceBlobDigest: sha256:72d88796291d78aaa55ee4eb609cfc5f62065ee3795180d4d57404c72aa19657 codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:a59cce64a521156ff070c23b436edcf77ffd6354b2e74b07f3194918dab44007 + codeSamplesRevisionDigest: sha256:724b545fa704fae1cf00637e8707f37543ddfa00bf96ed4a2d81198eca9715f4 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.763.6 diff --git a/README.md b/README.md index bf3075b11..f613df8d9 100644 --- a/README.md +++ b/README.md @@ -705,6 +705,8 @@ print(res.choices[0].message.content) ### [Beta.Users](docs/sdks/users/README.md) * [get_identity](docs/sdks/users/README.md#get_identity) - Get Identity +* [list_organizations](docs/sdks/users/README.md#list_organizations) - List Organizations +* [list_workspaces](docs/sdks/users/README.md#list_workspaces) - List Workspaces ### [Chat](docs/sdks/chat/README.md) @@ -754,6 +756,10 @@ print(res.choices[0].message.content) * [process](docs/sdks/ocr/README.md#process) - OCR +### [Realtime.Sessions](docs/sdks/sessions/README.md) + +* [create](docs/sdks/sessions/README.md#create) - Create Client Session + ### [Workflows](docs/sdks/workflows/README.md) * [get_workflows](docs/sdks/workflows/README.md#get_workflows) - Get Workflows @@ -1046,8 +1052,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 145 of 244 methods.* -* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 59 of 244 methods.* +* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 146 of 247 methods.* +* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 59 of 247 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/RELEASES.md b/RELEASES.md index eb22ed53b..9e57f7d48 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -828,4 +828,14 @@ Based on: ### Generated - [python v2.9.2] . ### Releases -- [PyPI v2.9.2] https://pypi.org/project/mistralai/2.9.2 - . \ No newline at end of file +- [PyPI v2.9.2] https://pypi.org/project/mistralai/2.9.2 - . + +## 2026-08-13 15:36:45 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.763.6 (2.884.13) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.9.3] . +### Releases +- [PyPI v2.9.3] https://pypi.org/project/mistralai/2.9.3 - . \ No newline at end of file diff --git a/docs/models/authenticationmethodcreateorupdaterequest.md b/docs/models/authenticationmethodcreateorupdaterequest.md index 727f7fa59..6618f1e4f 100644 --- a/docs/models/authenticationmethodcreateorupdaterequest.md +++ b/docs/models/authenticationmethodcreateorupdaterequest.md @@ -3,10 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `method_type` | [models.MethodType](../models/methodtype.md) | :heavy_check_mark: | The type of authentication method (e.g. oauth2, bearer, none). | -| `auth_direction` | [Optional[models.AuthDirection]](../models/authdirection.md) | :heavy_minus_sign: | N/A | -| `headers` | List[[models.ConnectorAuthenticationHeader](../models/connectorauthenticationheader.md)] | :heavy_minus_sign: | Set of headers to connect to the connector | -| `oauth2_metadata_secrets` | [OptionalNullable[models.Oauth2MetadataSecrets]](../models/oauth2metadatasecrets.md) | :heavy_minus_sign: | New OAuth2 client credentials (client_id and client_secret). | -| `oauth2_server_metadata` | [OptionalNullable[models.ExtendedOAuthServerMetadata]](../models/extendedoauthservermetadata.md) | :heavy_minus_sign: | New OAuth2 authorization server metadata. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | +| `method_type` | [models.MethodType](../models/methodtype.md) | :heavy_check_mark: | The type of authentication method (e.g. oauth2, bearer, none). | +| `auth_direction` | [Optional[models.AuthDirection]](../models/authdirection.md) | :heavy_minus_sign: | N/A | +| `headers` | List[[models.ConnectorAuthenticationHeader](../models/connectorauthenticationheader.md)] | :heavy_minus_sign: | Set of headers to connect to the connector | +| `global_headers` | Dict[str, [models.GlobalHeaderValue](../models/globalheadervalue.md)] | :heavy_minus_sign: | Connector-wide headers keyed by header name, applied to every credential. Secret values are encrypted at rest and never returned in clear. | +| `oauth2_metadata_secrets` | [OptionalNullable[models.Oauth2MetadataSecrets]](../models/oauth2metadatasecrets.md) | :heavy_minus_sign: | New OAuth2 client credentials (client_id and client_secret). | +| `oauth2_server_metadata` | [OptionalNullable[models.ExtendedOAuthServerMetadata]](../models/extendedoauthservermetadata.md) | :heavy_minus_sign: | New OAuth2 authorization server metadata. | \ No newline at end of file diff --git a/docs/models/body.md b/docs/models/body.md new file mode 100644 index 000000000..4ba9bb4e7 --- /dev/null +++ b/docs/models/body.md @@ -0,0 +1,11 @@ +# Body + + +## Supported Types + +### `models.CreateRealtimeSessionRequest` + +```python +value: models.CreateRealtimeSessionRequest = /* values here */ +``` + diff --git a/docs/models/clientsecret.md b/docs/models/clientsecret.md new file mode 100644 index 000000000..19f880dfd --- /dev/null +++ b/docs/models/clientsecret.md @@ -0,0 +1,9 @@ +# ClientSecret + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `value` | *str* | :heavy_check_mark: | N/A | +| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/clientsessionpurpose.md b/docs/models/clientsessionpurpose.md new file mode 100644 index 000000000..02a75441c --- /dev/null +++ b/docs/models/clientsessionpurpose.md @@ -0,0 +1,15 @@ +# ClientSessionPurpose + +Supported purposes for client sessions. + +## Example Usage + +```python +from mistralai.client.models import ClientSessionPurpose +value: ClientSessionPurpose = "realtime" +``` + + +## Values + +- `"realtime"` diff --git a/docs/models/createconnectorrequest.md b/docs/models/createconnectorrequest.md index 9be7f2f5e..fd4ccca2d 100644 --- a/docs/models/createconnectorrequest.md +++ b/docs/models/createconnectorrequest.md @@ -20,6 +20,7 @@ Standalone model that excludes internal-only fields (``hosted_internally``, | `visibility` | [Optional[models.PublicResourceVisibility]](../models/publicresourcevisibility.md) | :heavy_minus_sign: | Visibility options available to public API callers.

Excludes ``shared_global`` which is reserved for system-owned connectors. | | `server` | *str* | :heavy_check_mark: | The url of the MCP server. | | `headers` | Dict[str, *Any*] | :heavy_minus_sign: | Optional organization-level headers to be sent with the request to the mcp server. | +| `global_headers` | Dict[str, [models.GlobalHeaderValue](../models/globalheadervalue.md)] | :heavy_minus_sign: | Optional connector-wide headers, keyed by header name, set at creation and applied to every credential. Secret values are encrypted at rest and never returned in clear. | | `auth_data` | [OptionalNullable[models.AuthData]](../models/authdata.md) | :heavy_minus_sign: | Optional additional authentication data for the connector. | | `oauth2_server_metadata` | [OptionalNullable[models.ExtendedOAuthServerMetadata]](../models/extendedoauthservermetadata.md) | :heavy_minus_sign: | Optional OAuth2 authorization server metadata (authorization_endpoint, token_endpoint, etc.). When provided, skips .well-known discovery and uses these endpoints directly. | | `oauth2_server_metadata_url` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional URL to fetch OAuth2 authorization server metadata from (RFC 8414). When provided, the metadata is fetched from this URL and used instead of .well-known discovery. Mutually exclusive with oauth2_server_metadata. | diff --git a/docs/models/createingestionpipelineconfigurationrequest.md b/docs/models/createingestionpipelineconfigurationrequest.md index f6aeb2105..96b788481 100644 --- a/docs/models/createingestionpipelineconfigurationrequest.md +++ b/docs/models/createingestionpipelineconfigurationrequest.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `name` | *str* | :heavy_check_mark: | N/A | -| `pipeline_composition` | Dict[str, *str*] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | +| `pipeline_composition` | Dict[str, *str*] | :heavy_minus_sign: | N/A | +| `target_indexes` | List[[models.IngestionPipelineTargetIndexRef](../models/ingestionpipelinetargetindexref.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/createrealtimesessionrequest.md b/docs/models/createrealtimesessionrequest.md new file mode 100644 index 000000000..fecfa68a4 --- /dev/null +++ b/docs/models/createrealtimesessionrequest.md @@ -0,0 +1,11 @@ +# CreateRealtimeSessionRequest + +Payload used to create realtime client sessions. + + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `purpose` | *Literal["realtime"]* | :heavy_check_mark: | N/A | +| `model` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/createrealtimesessionresponse.md b/docs/models/createrealtimesessionresponse.md new file mode 100644 index 000000000..a948c04d0 --- /dev/null +++ b/docs/models/createrealtimesessionresponse.md @@ -0,0 +1,11 @@ +# CreateRealtimeSessionResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `object` | *Optional[Literal["client.session"]]* | :heavy_minus_sign: | N/A | +| `purpose` | [models.ClientSessionPurpose](../models/clientsessionpurpose.md) | :heavy_check_mark: | Supported purposes for client sessions. | +| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `client_secret` | [models.ClientSecret](../models/clientsecret.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/deploymentdetailresponse.md b/docs/models/deploymentdetailresponse.md index 48e4f07fc..b9a2b36de 100644 --- a/docs/models/deploymentdetailresponse.md +++ b/docs/models/deploymentdetailresponse.md @@ -3,17 +3,17 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | Unique identifier of the deployment | -| `name` | *str* | :heavy_check_mark: | Deployment name | -| `is_active` | *bool* | :heavy_check_mark: | Whether at least one worker is currently live | -| `is_hardened` | *Optional[bool]* | :heavy_minus_sign: | Whether the deployment has at least one authorized credential | -| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | When the deployment was first registered | -| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | When the deployment was last updated | -| `location` | [OptionalNullable[models.DeploymentLocation]](../models/deploymentlocation.md) | :heavy_minus_sign: | Where the deployment is running | -| `worker_count` | *Optional[int]* | :heavy_minus_sign: | Number of workers registered to the deployment | -| `active_worker_count` | *Optional[int]* | :heavy_minus_sign: | Number of workers currently live within the liveness cutoff | -| `locations` | List[[models.LocationType](../models/locationtype.md)] | :heavy_minus_sign: | Distinct location types reported by the deployment's workers | -| `managed` | [OptionalNullable[models.ManagedDeploymentResponse]](../models/manageddeploymentresponse.md) | :heavy_minus_sign: | Live managed service state for managed deployments; null for self-hosted deployments or when managed services are unavailable | -| `workers` | List[[models.DeploymentWorkerResponse](../models/deploymentworkerresponse.md)] | :heavy_check_mark: | Workers registered for the deployment | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | Unique identifier of the deployment | +| `name` | *str* | :heavy_check_mark: | Deployment name | +| `is_active` | *bool* | :heavy_check_mark: | Whether at least one worker is currently live | +| `is_hardened` | *Optional[bool]* | :heavy_minus_sign: | Whether the deployment has at least one authorized credential | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | When the deployment was first registered | +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | When the deployment was last updated | +| ~~`location`~~ | [OptionalNullable[models.DeploymentLocation]](../models/deploymentlocation.md) | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Where the deployment is running | +| `worker_count` | *Optional[int]* | :heavy_minus_sign: | Number of workers registered to the deployment | +| `active_worker_count` | *Optional[int]* | :heavy_minus_sign: | Number of workers currently live within the liveness cutoff | +| `locations` | List[[models.LocationType](../models/locationtype.md)] | :heavy_minus_sign: | Distinct location types reported by the deployment's workers | +| `managed` | [OptionalNullable[models.ManagedDeploymentResponse]](../models/manageddeploymentresponse.md) | :heavy_minus_sign: | Live managed service state for managed deployments; null for self-hosted deployments or when managed services are unavailable | +| `workers` | List[[models.DeploymentWorkerResponse](../models/deploymentworkerresponse.md)] | :heavy_check_mark: | Workers registered for the deployment | \ No newline at end of file diff --git a/docs/models/deploymentresponse.md b/docs/models/deploymentresponse.md index cabf9f8d6..91981f663 100644 --- a/docs/models/deploymentresponse.md +++ b/docs/models/deploymentresponse.md @@ -3,16 +3,16 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | Unique identifier of the deployment | -| `name` | *str* | :heavy_check_mark: | Deployment name | -| `is_active` | *bool* | :heavy_check_mark: | Whether at least one worker is currently live | -| `is_hardened` | *Optional[bool]* | :heavy_minus_sign: | Whether the deployment has at least one authorized credential | -| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | When the deployment was first registered | -| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | When the deployment was last updated | -| `location` | [OptionalNullable[models.DeploymentLocation]](../models/deploymentlocation.md) | :heavy_minus_sign: | Where the deployment is running | -| `worker_count` | *Optional[int]* | :heavy_minus_sign: | Number of workers registered to the deployment | -| `active_worker_count` | *Optional[int]* | :heavy_minus_sign: | Number of workers currently live within the liveness cutoff | -| `locations` | List[[models.LocationType](../models/locationtype.md)] | :heavy_minus_sign: | Distinct location types reported by the deployment's workers | -| `managed` | [OptionalNullable[models.ManagedDeploymentResponse]](../models/manageddeploymentresponse.md) | :heavy_minus_sign: | Live managed service state for managed deployments; null for self-hosted deployments or when managed services are unavailable | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | Unique identifier of the deployment | +| `name` | *str* | :heavy_check_mark: | Deployment name | +| `is_active` | *bool* | :heavy_check_mark: | Whether at least one worker is currently live | +| `is_hardened` | *Optional[bool]* | :heavy_minus_sign: | Whether the deployment has at least one authorized credential | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | When the deployment was first registered | +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | When the deployment was last updated | +| ~~`location`~~ | [OptionalNullable[models.DeploymentLocation]](../models/deploymentlocation.md) | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Where the deployment is running | +| `worker_count` | *Optional[int]* | :heavy_minus_sign: | Number of workers registered to the deployment | +| `active_worker_count` | *Optional[int]* | :heavy_minus_sign: | Number of workers currently live within the liveness cutoff | +| `locations` | List[[models.LocationType](../models/locationtype.md)] | :heavy_minus_sign: | Distinct location types reported by the deployment's workers | +| `managed` | [OptionalNullable[models.ManagedDeploymentResponse]](../models/manageddeploymentresponse.md) | :heavy_minus_sign: | Live managed service state for managed deployments; null for self-hosted deployments or when managed services are unavailable | \ No newline at end of file diff --git a/docs/models/extendedoauthservermetadata.md b/docs/models/extendedoauthservermetadata.md index 601d9df6b..661f85421 100644 --- a/docs/models/extendedoauthservermetadata.md +++ b/docs/models/extendedoauthservermetadata.md @@ -8,29 +8,30 @@ Mirrors the shape of .well-known/oauth-authorization-server responses. ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `issuer` | *str* | :heavy_check_mark: | N/A | -| `authorization_endpoint` | *str* | :heavy_check_mark: | N/A | -| `token_endpoint` | *str* | :heavy_check_mark: | N/A | -| `registration_endpoint` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `scopes_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `response_types_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `response_modes_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `grant_types_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `token_endpoint_auth_methods_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `token_endpoint_auth_signing_alg_values_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `service_documentation` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `ui_locales_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `op_policy_uri` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `op_tos_uri` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `revocation_endpoint` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `revocation_endpoint_auth_methods_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `revocation_endpoint_auth_signing_alg_values_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `introspection_endpoint` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `introspection_endpoint_auth_methods_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `introspection_endpoint_auth_signing_alg_values_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `code_challenge_methods_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `client_id_metadata_document_supported` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | -| `x_resource_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `x_scope` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `issuer` | *str* | :heavy_check_mark: | N/A | +| `authorization_endpoint` | *str* | :heavy_check_mark: | N/A | +| `token_endpoint` | *str* | :heavy_check_mark: | N/A | +| `registration_endpoint` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `scopes_supported` | List[*str*] | :heavy_minus_sign: | N/A | +| `response_types_supported` | List[*str*] | :heavy_minus_sign: | N/A | +| `response_modes_supported` | List[*str*] | :heavy_minus_sign: | N/A | +| `grant_types_supported` | List[*str*] | :heavy_minus_sign: | N/A | +| `token_endpoint_auth_methods_supported` | List[*str*] | :heavy_minus_sign: | N/A | +| `token_endpoint_auth_signing_alg_values_supported` | List[*str*] | :heavy_minus_sign: | N/A | +| `service_documentation` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `ui_locales_supported` | List[*str*] | :heavy_minus_sign: | N/A | +| `op_policy_uri` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `op_tos_uri` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `revocation_endpoint` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `revocation_endpoint_auth_methods_supported` | List[*str*] | :heavy_minus_sign: | N/A | +| `revocation_endpoint_auth_signing_alg_values_supported` | List[*str*] | :heavy_minus_sign: | N/A | +| `introspection_endpoint` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `introspection_endpoint_auth_methods_supported` | List[*str*] | :heavy_minus_sign: | N/A | +| `introspection_endpoint_auth_signing_alg_values_supported` | List[*str*] | :heavy_minus_sign: | N/A | +| `code_challenge_methods_supported` | List[*str*] | :heavy_minus_sign: | N/A | +| `client_id_metadata_document_supported` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | +| `x_source` | [OptionalNullable[models.OAuthMetadataSource]](../models/oauthmetadatasource.md) | :heavy_minus_sign: | N/A | +| `x_resource_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `x_scope` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/getdeploymentv1workflowsdeploymentsnamegetrequest.md b/docs/models/getdeploymentv1workflowsdeploymentsnamegetrequest.md index 6af056b16..f54301f15 100644 --- a/docs/models/getdeploymentv1workflowsdeploymentsnamegetrequest.md +++ b/docs/models/getdeploymentv1workflowsdeploymentsnamegetrequest.md @@ -3,6 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | +| `workflow_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Scope serving status to this workflow | \ No newline at end of file diff --git a/docs/models/globalheadervalue.md b/docs/models/globalheadervalue.md new file mode 100644 index 000000000..56cefd67e --- /dev/null +++ b/docs/models/globalheadervalue.md @@ -0,0 +1,13 @@ +# GlobalHeaderValue + +Value of a connector-wide header. ``value`` is plaintext in memory so create +round-trips and encryption-at-rest keep the real value; secrets are redacted only +on JSON serialization (API responses). + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `is_secret` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `value` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/ingestionpipelinetargetindexref.md b/docs/models/ingestionpipelinetargetindexref.md new file mode 100644 index 000000000..e6fcfe30d --- /dev/null +++ b/docs/models/ingestionpipelinetargetindexref.md @@ -0,0 +1,9 @@ +# IngestionPipelineTargetIndexRef + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `type` | *Optional[Literal["vespa"]]* | :heavy_minus_sign: | N/A | +| `name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/listorganizationsresponse.md b/docs/models/listorganizationsresponse.md new file mode 100644 index 000000000..8a6a6d3a6 --- /dev/null +++ b/docs/models/listorganizationsresponse.md @@ -0,0 +1,8 @@ +# ListOrganizationsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `organizations` | List[[models.UserOrganization](../models/userorganization.md)] | :heavy_check_mark: | The organizations the authenticated user is a member of. | \ No newline at end of file diff --git a/docs/models/listworkspacesresponse.md b/docs/models/listworkspacesresponse.md new file mode 100644 index 000000000..0ea88aa13 --- /dev/null +++ b/docs/models/listworkspacesresponse.md @@ -0,0 +1,8 @@ +# ListWorkspacesResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `workspaces` | List[[models.UserWorkspace](../models/userworkspace.md)] | :heavy_check_mark: | The workspaces the authenticated user is a member of, each tagged with the organization it belongs to. | \ No newline at end of file diff --git a/docs/models/oauthmetadatasource.md b/docs/models/oauthmetadatasource.md new file mode 100644 index 000000000..22e2804a4 --- /dev/null +++ b/docs/models/oauthmetadatasource.md @@ -0,0 +1,20 @@ +# OAuthMetadataSource + +How a connector's OAuth server metadata was obtained. + +## Example Usage + +```python +from mistralai.client.models import OAuthMetadataSource + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: OAuthMetadataSource = "autodiscovery" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"autodiscovery"` +- `"provided"` diff --git a/docs/models/publicauthenticationmethod.md b/docs/models/publicauthenticationmethod.md index 59de7076c..d810911a3 100644 --- a/docs/models/publicauthenticationmethod.md +++ b/docs/models/publicauthenticationmethod.md @@ -5,8 +5,10 @@ Public view of an authentication method, without secrets. ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `method_type` | [models.OutboundAuthenticationType](../models/outboundauthenticationtype.md) | :heavy_check_mark: | N/A | -| `headers` | List[[models.ConnectorAuthenticationHeader](../models/connectorauthenticationheader.md)] | :heavy_minus_sign: | N/A | -| `has_default_credentials` | *bool* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `method_type` | [models.OutboundAuthenticationType](../models/outboundauthenticationtype.md) | :heavy_check_mark: | N/A | +| `headers` | List[[models.ConnectorAuthenticationHeader](../models/connectorauthenticationheader.md)] | :heavy_minus_sign: | N/A | +| `global_headers` | Dict[str, [models.GlobalHeaderValue](../models/globalheadervalue.md)] | :heavy_minus_sign: | N/A | +| `has_default_credentials` | *bool* | :heavy_check_mark: | N/A | +| `oauth2_server_metadata` | [OptionalNullable[models.ExtendedOAuthServerMetadata]](../models/extendedoauthservermetadata.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/userorganization.md b/docs/models/userorganization.md new file mode 100644 index 000000000..5de1a616c --- /dev/null +++ b/docs/models/userorganization.md @@ -0,0 +1,9 @@ +# UserOrganization + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The organization's unique identifier. | 1a2b3c4d-5e6f-4a8b-9c0d-1e2f3a4b5c6d | +| `name` | *str* | :heavy_check_mark: | The organization's display name. | Acme Corp | \ No newline at end of file diff --git a/docs/models/usersapilistorganizationsrequest.md b/docs/models/usersapilistorganizationsrequest.md new file mode 100644 index 000000000..2906cd66f --- /dev/null +++ b/docs/models/usersapilistorganizationsrequest.md @@ -0,0 +1,9 @@ +# UsersAPIListOrganizationsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `offset` | *Optional[int]* | :heavy_minus_sign: | Number of organizations to skip before returning results. | 0 | +| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of organizations to return. | 100 | \ No newline at end of file diff --git a/docs/models/usersapilistorganizationsresponse.md b/docs/models/usersapilistorganizationsresponse.md new file mode 100644 index 000000000..5198158a7 --- /dev/null +++ b/docs/models/usersapilistorganizationsresponse.md @@ -0,0 +1,8 @@ +# UsersAPIListOrganizationsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `result` | [models.ListOrganizationsResponse](../models/listorganizationsresponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/usersapilistorganizationssecurity.md b/docs/models/usersapilistorganizationssecurity.md new file mode 100644 index 000000000..49414a0ce --- /dev/null +++ b/docs/models/usersapilistorganizationssecurity.md @@ -0,0 +1,8 @@ +# UsersAPIListOrganizationsSecurity + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `dashboard_user_context_auth` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/usersapilistworkspacesrequest.md b/docs/models/usersapilistworkspacesrequest.md new file mode 100644 index 000000000..0c2dfeae0 --- /dev/null +++ b/docs/models/usersapilistworkspacesrequest.md @@ -0,0 +1,10 @@ +# UsersAPIListWorkspacesRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `organization_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Return only workspaces belonging to this organization. | 1a2b3c4d-5e6f-4a8b-9c0d-1e2f3a4b5c6d | +| `offset` | *Optional[int]* | :heavy_minus_sign: | Number of workspaces to skip before returning results. | 0 | +| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of workspaces to return. | 100 | \ No newline at end of file diff --git a/docs/models/usersapilistworkspacesresponse.md b/docs/models/usersapilistworkspacesresponse.md new file mode 100644 index 000000000..31c88d923 --- /dev/null +++ b/docs/models/usersapilistworkspacesresponse.md @@ -0,0 +1,8 @@ +# UsersAPIListWorkspacesResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `result` | [models.ListWorkspacesResponse](../models/listworkspacesresponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/usersapilistworkspacessecurity.md b/docs/models/usersapilistworkspacessecurity.md new file mode 100644 index 000000000..1c00dffac --- /dev/null +++ b/docs/models/usersapilistworkspacessecurity.md @@ -0,0 +1,8 @@ +# UsersAPIListWorkspacesSecurity + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `dashboard_user_context_auth` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/userworkspace.md b/docs/models/userworkspace.md new file mode 100644 index 000000000..88fb5a7cd --- /dev/null +++ b/docs/models/userworkspace.md @@ -0,0 +1,10 @@ +# UserWorkspace + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The workspace's unique identifier. | 7f8e9d0c-1b2a-4c3d-8e9f-0a1b2c3d4e5f | +| `name` | *str* | :heavy_check_mark: | The workspace's display name. | production | +| `organization_id` | *str* | :heavy_check_mark: | The identifier of the organization this workspace belongs to. | 1a2b3c4d-5e6f-4a8b-9c0d-1e2f3a4b5c6d | \ No newline at end of file diff --git a/docs/sdks/connectors/README.md b/docs/sdks/connectors/README.md index 1aca6ef31..a78167e66 100644 --- a/docs/sdks/connectors/README.md +++ b/docs/sdks/connectors/README.md @@ -64,6 +64,7 @@ with Mistral( | `icon_url` | *OptionalNullable[str]* | :heavy_minus_sign: | The optional url of the icon you want to associate to the connector. | | `visibility` | [Optional[models.PublicResourceVisibility]](../../models/publicresourcevisibility.md) | :heavy_minus_sign: | Visibility options available to public API callers.

Excludes ``shared_global`` which is reserved for system-owned connectors. | | `headers` | Dict[str, *Any*] | :heavy_minus_sign: | Optional organization-level headers to be sent with the request to the mcp server. | +| `global_headers` | Dict[str, [models.GlobalHeaderValue](../../models/globalheadervalue.md)] | :heavy_minus_sign: | Optional connector-wide headers, keyed by header name, set at creation and applied to every credential. Secret values are encrypted at rest and never returned in clear. | | `auth_data` | [OptionalNullable[models.AuthData]](../../models/authdata.md) | :heavy_minus_sign: | Optional additional authentication data for the connector. | | `oauth2_server_metadata` | [OptionalNullable[models.ExtendedOAuthServerMetadata]](../../models/extendedoauthservermetadata.md) | :heavy_minus_sign: | Optional OAuth2 authorization server metadata (authorization_endpoint, token_endpoint, etc.). When provided, skips .well-known discovery and uses these endpoints directly. | | `oauth2_server_metadata_url` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional URL to fetch OAuth2 authorization server metadata from (RFC 8414). When provided, the metadata is fetched from this URL and used instead of .well-known discovery. Mutually exclusive with oauth2_server_metadata. | diff --git a/docs/sdks/deployments/README.md b/docs/sdks/deployments/README.md index e37a18828..1b3940989 100644 --- a/docs/sdks/deployments/README.md +++ b/docs/sdks/deployments/README.md @@ -223,6 +223,7 @@ with Mistral( | Parameter | Type | Required | Description | | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | | `name` | *str* | :heavy_check_mark: | N/A | +| `workflow_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Scope serving status to this workflow | | `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/ingestionpipelineconfigurations/README.md b/docs/sdks/ingestionpipelineconfigurations/README.md index 671a7182a..750ba36d9 100644 --- a/docs/sdks/ingestionpipelineconfigurations/README.md +++ b/docs/sdks/ingestionpipelineconfigurations/README.md @@ -72,11 +72,12 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `name` | *str* | :heavy_check_mark: | N/A | -| `pipeline_composition` | Dict[str, *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 | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | +| `pipeline_composition` | Dict[str, *str*] | :heavy_minus_sign: | N/A | +| `target_indexes` | List[[models.IngestionPipelineTargetIndexRef](../../models/ingestionpipelinetargetindexref.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 diff --git a/docs/sdks/sessions/README.md b/docs/sdks/sessions/README.md new file mode 100644 index 000000000..79d3c546e --- /dev/null +++ b/docs/sdks/sessions/README.md @@ -0,0 +1,51 @@ +# Realtime.Sessions + +## Overview + +### Available Operations + +* [create](#create) - Create Client Session + +## create + +Create Client Session + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.realtime.sessions.create(request={ + "purpose": "realtime", + "model": "Ranchero", + }) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `request` | [models.Body](../../models/body.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.CreateRealtimeSessionResponse](../../models/createrealtimesessionresponse.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/docs/sdks/users/README.md b/docs/sdks/users/README.md index ac52c633b..a7c2bd732 100644 --- a/docs/sdks/users/README.md +++ b/docs/sdks/users/README.md @@ -5,6 +5,8 @@ ### Available Operations * [get_identity](#get_identity) - Get Identity +* [list_organizations](#list_organizations) - List Organizations +* [list_workspaces](#list_workspaces) - List Workspaces ## get_identity @@ -42,6 +44,99 @@ with Mistral() as mistral: ### Errors +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## list_organizations + +List every organization the authenticated user is a member of. + +Identity-only: the caller need not have selected an organization, so this +reads only the user and never scopes by the active org. + +### Example Usage + + +```python +from mistralai.client import Mistral, models +import os + + +with Mistral() as mistral: + + res = mistral.beta.users.list_organizations(security=models.UsersAPIListOrganizationsSecurity( + dashboard_user_context_auth=os.getenv("MISTRAL_DASHBOARD_USER_CONTEXT_AUTH", ""), + ), offset=0, limit=100) + + while res is not None: + # Handle items + + res = res.next() + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `security` | [models.UsersAPIListOrganizationsSecurity](../../models/usersapilistorganizationssecurity.md) | :heavy_check_mark: | N/A | | +| `offset` | *Optional[int]* | :heavy_minus_sign: | Number of organizations to skip before returning results. | 0 | +| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of organizations to return. | 100 | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.UsersAPIListOrganizationsResponse](../../models/usersapilistorganizationsresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## list_workspaces + +List every workspace the authenticated user is a member of, across all +their organizations, each tagged with the organization it belongs to. + +### Example Usage + + +```python +from mistralai.client import Mistral, models +import os + + +with Mistral() as mistral: + + res = mistral.beta.users.list_workspaces(security=models.UsersAPIListWorkspacesSecurity( + dashboard_user_context_auth=os.getenv("MISTRAL_DASHBOARD_USER_CONTEXT_AUTH", ""), + ), organization_id="1a2b3c4d-5e6f-4a8b-9c0d-1e2f3a4b5c6d", offset=0, limit=100) + + while res is not None: + # Handle items + + res = res.next() + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `security` | [models.UsersAPIListWorkspacesSecurity](../../models/usersapilistworkspacessecurity.md) | :heavy_check_mark: | N/A | | +| `organization_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Return only workspaces belonging to this organization. | 1a2b3c4d-5e6f-4a8b-9c0d-1e2f3a4b5c6d | +| `offset` | *Optional[int]* | :heavy_minus_sign: | Number of workspaces to skip before returning results. | 0 | +| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of workspaces to return. | 100 | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.UsersAPIListWorkspacesResponse](../../models/usersapilistworkspacesresponse.md)** + +### Errors + | Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | | errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index 67f6c3f0a..e57779051 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.9.2" +__version__: str = "2.9.3" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.884.13" -__user_agent__: str = "speakeasy-sdk/python 2.9.2 2.884.13 1.0.0 mistralai" +__user_agent__: str = "speakeasy-sdk/python 2.9.3 2.884.13 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/connectors.py b/src/mistralai/client/connectors.py index 63e74079b..f4c74ad2d 100644 --- a/src/mistralai/client/connectors.py +++ b/src/mistralai/client/connectors.py @@ -23,6 +23,12 @@ def create( icon_url: OptionalNullable[str] = UNSET, visibility: Optional[models.PublicResourceVisibility] = None, headers: OptionalNullable[Dict[str, Any]] = UNSET, + global_headers: Optional[ + Union[ + Dict[str, models.GlobalHeaderValue], + Dict[str, models.GlobalHeaderValueTypedDict], + ] + ] = None, auth_data: OptionalNullable[ Union[models.AuthData, models.AuthDataTypedDict] ] = UNSET, @@ -52,6 +58,7 @@ def create( Excludes ``shared_global`` which is reserved for system-owned connectors. :param headers: Optional organization-level headers to be sent with the request to the mcp server. + :param global_headers: Optional connector-wide headers, keyed by header name, set at creation and applied to every credential. Secret values are encrypted at rest and never returned in clear. :param auth_data: Optional additional authentication data for the connector. :param oauth2_server_metadata: Optional OAuth2 authorization server metadata (authorization_endpoint, token_endpoint, etc.). When provided, skips .well-known discovery and uses these endpoints directly. :param oauth2_server_metadata_url: Optional URL to fetch OAuth2 authorization server metadata from (RFC 8414). When provided, the metadata is fetched from this URL and used instead of .well-known discovery. Mutually exclusive with oauth2_server_metadata. @@ -82,6 +89,9 @@ def create( visibility=visibility, server=server, headers=headers, + global_headers=utils.get_pydantic_model( + global_headers, Optional[Dict[str, models.GlobalHeaderValue]] + ), auth_data=utils.get_pydantic_model( auth_data, OptionalNullable[models.AuthData] ), @@ -163,6 +173,12 @@ async def create_async( icon_url: OptionalNullable[str] = UNSET, visibility: Optional[models.PublicResourceVisibility] = None, headers: OptionalNullable[Dict[str, Any]] = UNSET, + global_headers: Optional[ + Union[ + Dict[str, models.GlobalHeaderValue], + Dict[str, models.GlobalHeaderValueTypedDict], + ] + ] = None, auth_data: OptionalNullable[ Union[models.AuthData, models.AuthDataTypedDict] ] = UNSET, @@ -192,6 +208,7 @@ async def create_async( Excludes ``shared_global`` which is reserved for system-owned connectors. :param headers: Optional organization-level headers to be sent with the request to the mcp server. + :param global_headers: Optional connector-wide headers, keyed by header name, set at creation and applied to every credential. Secret values are encrypted at rest and never returned in clear. :param auth_data: Optional additional authentication data for the connector. :param oauth2_server_metadata: Optional OAuth2 authorization server metadata (authorization_endpoint, token_endpoint, etc.). When provided, skips .well-known discovery and uses these endpoints directly. :param oauth2_server_metadata_url: Optional URL to fetch OAuth2 authorization server metadata from (RFC 8414). When provided, the metadata is fetched from this URL and used instead of .well-known discovery. Mutually exclusive with oauth2_server_metadata. @@ -222,6 +239,9 @@ async def create_async( visibility=visibility, server=server, headers=headers, + global_headers=utils.get_pydantic_model( + global_headers, Optional[Dict[str, models.GlobalHeaderValue]] + ), auth_data=utils.get_pydantic_model( auth_data, OptionalNullable[models.AuthData] ), diff --git a/src/mistralai/client/deployments.py b/src/mistralai/client/deployments.py index 91c4fb6f5..ed1825f28 100644 --- a/src/mistralai/client/deployments.py +++ b/src/mistralai/client/deployments.py @@ -896,6 +896,7 @@ def get_deployment( self, *, name: str, + workflow_name: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -904,6 +905,7 @@ def get_deployment( r"""Get Deployment :param name: + :param workflow_name: Scope serving status to this workflow :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 @@ -924,6 +926,7 @@ def get_deployment( request = models.GetDeploymentV1WorkflowsDeploymentsNameGetRequest( name=name, + workflow_name=workflow_name, ) req = self._build_request( @@ -987,6 +990,7 @@ async def get_deployment_async( self, *, name: str, + workflow_name: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -995,6 +999,7 @@ async def get_deployment_async( r"""Get Deployment :param name: + :param workflow_name: Scope serving status to this workflow :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 @@ -1015,6 +1020,7 @@ async def get_deployment_async( request = models.GetDeploymentV1WorkflowsDeploymentsNameGetRequest( name=name, + workflow_name=workflow_name, ) req = self._build_request_async( diff --git a/src/mistralai/client/ingestion_pipeline_configurations.py b/src/mistralai/client/ingestion_pipeline_configurations.py index 07606ff20..2c9247eb9 100644 --- a/src/mistralai/client/ingestion_pipeline_configurations.py +++ b/src/mistralai/client/ingestion_pipeline_configurations.py @@ -8,7 +8,7 @@ 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, List, Mapping, Optional +from typing import Any, Dict, List, Mapping, Optional, Union class IngestionPipelineConfigurations(BaseSDK): @@ -181,6 +181,12 @@ def register( *, name: str, pipeline_composition: OptionalNullable[Dict[str, str]] = UNSET, + target_indexes: OptionalNullable[ + Union[ + List[models.IngestionPipelineTargetIndexRef], + List[models.IngestionPipelineTargetIndexRefTypedDict], + ] + ] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -192,6 +198,7 @@ def register( :param name: :param pipeline_composition: + :param target_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 @@ -213,6 +220,10 @@ def register( request = models.CreateIngestionPipelineConfigurationRequest( name=name, pipeline_composition=pipeline_composition, + target_indexes=utils.get_pydantic_model( + target_indexes, + OptionalNullable[List[models.IngestionPipelineTargetIndexRef]], + ), ) req = self._build_request( @@ -286,6 +297,12 @@ async def register_async( *, name: str, pipeline_composition: OptionalNullable[Dict[str, str]] = UNSET, + target_indexes: OptionalNullable[ + Union[ + List[models.IngestionPipelineTargetIndexRef], + List[models.IngestionPipelineTargetIndexRefTypedDict], + ] + ] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -297,6 +314,7 @@ async def register_async( :param name: :param pipeline_composition: + :param target_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 @@ -318,6 +336,10 @@ async def register_async( request = models.CreateIngestionPipelineConfigurationRequest( name=name, pipeline_composition=pipeline_composition, + target_indexes=utils.get_pydantic_model( + target_indexes, + OptionalNullable[List[models.IngestionPipelineTargetIndexRef]], + ), ) req = self._build_request_async( diff --git a/src/mistralai/client/models/__init__.py b/src/mistralai/client/models/__init__.py index 341e9723a..b24fd3fa3 100644 --- a/src/mistralai/client/models/__init__.py +++ b/src/mistralai/client/models/__init__.py @@ -367,6 +367,8 @@ ClassifierTargetResultTypedDict, ) from .clientcapabilities import ClientCapabilities, ClientCapabilitiesTypedDict + from .clientsecret import ClientSecret, ClientSecretTypedDict + from .clientsessionpurpose import ClientSessionPurpose from .clienttaskscapability import ( ClientTasksCapability, ClientTasksCapabilityTypedDict, @@ -598,6 +600,7 @@ ConversationUsageInfo, ConversationUsageInfoTypedDict, ) + from .create_client_session_v1_client_sessions_postop import Body, BodyTypedDict from .create_dataset_record_v1_observability_datasets_dataset_id_records_postop import ( CreateDatasetRecordV1ObservabilityDatasetsDatasetIDRecordsPostRequest, CreateDatasetRecordV1ObservabilityDatasetsDatasetIDRecordsPostRequestTypedDict, @@ -653,6 +656,14 @@ CreatePromptVersionResponse, CreatePromptVersionResponseTypedDict, ) + from .createrealtimesessionrequest import ( + CreateRealtimeSessionRequest, + CreateRealtimeSessionRequestTypedDict, + ) + from .createrealtimesessionresponse import ( + CreateRealtimeSessionResponse, + CreateRealtimeSessionResponseTypedDict, + ) from .createskillrequest import CreateSkillRequest, CreateSkillRequestTypedDict from .createskillversionresponse import ( CreateSkillVersionResponse, @@ -1263,6 +1274,7 @@ from .gettraces import GetTraces, GetTracesTypedDict from .gitcommitauthor import GitCommitAuthor, GitCommitAuthorTypedDict from .gitcommitmetadata import GitCommitMetadata, GitCommitMetadataTypedDict + from .globalheadervalue import GlobalHeaderValue, GlobalHeaderValueTypedDict from .granularity import Granularity from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from .httpstatus import HTTPStatus @@ -1301,6 +1313,10 @@ IngestionPipelineConfiguration, IngestionPipelineConfigurationTypedDict, ) + from .ingestionpipelinetargetindexref import ( + IngestionPipelineTargetIndexRef, + IngestionPipelineTargetIndexRefTypedDict, + ) from .inputentries import InputEntries, InputEntriesTypedDict from .inputs import Inputs, InputsTypedDict from .instructrequest import ( @@ -1553,6 +1569,10 @@ ListLibrariesResponse, ListLibrariesResponseTypedDict, ) + from .listorganizationsresponse import ( + ListOrganizationsResponse, + ListOrganizationsResponseTypedDict, + ) from .listpromptsresponse import ListPromptsResponse, ListPromptsResponseTypedDict from .listpromptversionsresponse import ( ListPromptVersionsResponse, @@ -1572,6 +1592,10 @@ ListWorkflowEventResponseEventTypedDict, ListWorkflowEventResponseTypedDict, ) + from .listworkspacesresponse import ( + ListWorkspacesResponse, + ListWorkspacesResponseTypedDict, + ) from .locationtype import LocationType from .logsrequest import LogsRequest, LogsRequestTypedDict, Order from .manageddeploymentresponse import ( @@ -1684,6 +1708,7 @@ ) from .oauth2token import OAuth2Token, OAuth2TokenTypedDict from .oauth2tokenauth import OAuth2TokenAuth, OAuth2TokenAuthTypedDict + from .oauthmetadatasource import OAuthMetadataSource from .observabilityerrorcode import ObservabilityErrorCode from .observabilityerrordetail import ( ObservabilityErrorDetail, @@ -2537,10 +2562,28 @@ UserMessageContentTypedDict, UserMessageTypedDict, ) + from .userorganization import UserOrganization, UserOrganizationTypedDict from .users_api_get_identityop import ( UsersAPIGetIdentitySecurity, UsersAPIGetIdentitySecurityTypedDict, ) + from .users_api_list_organizationsop import ( + UsersAPIListOrganizationsRequest, + UsersAPIListOrganizationsRequestTypedDict, + UsersAPIListOrganizationsResponse, + UsersAPIListOrganizationsResponseTypedDict, + UsersAPIListOrganizationsSecurity, + UsersAPIListOrganizationsSecurityTypedDict, + ) + from .users_api_list_workspacesop import ( + UsersAPIListWorkspacesRequest, + UsersAPIListWorkspacesRequestTypedDict, + UsersAPIListWorkspacesResponse, + UsersAPIListWorkspacesResponseTypedDict, + UsersAPIListWorkspacesSecurity, + UsersAPIListWorkspacesSecurityTypedDict, + ) + from .userworkspace import UserWorkspace, UserWorkspaceTypedDict from .validationerror import ( Context, ContextTypedDict, @@ -2953,6 +2996,8 @@ "BlobResourceContentsTypedDict", "Block", "BlockTypedDict", + "Body", + "BodyTypedDict", "BuiltInConnectors", "Campaign", "CampaignTypedDict", @@ -3017,6 +3062,9 @@ "ClassifierTargetResultTypedDict", "ClientCapabilities", "ClientCapabilitiesTypedDict", + "ClientSecret", + "ClientSecretTypedDict", + "ClientSessionPurpose", "ClientTasksCapability", "ClientTasksCapabilityTypedDict", "ClientTasksRequestsCapability", @@ -3199,6 +3247,10 @@ "CreatePromptVersionRequestTypedDict", "CreatePromptVersionResponse", "CreatePromptVersionResponseTypedDict", + "CreateRealtimeSessionRequest", + "CreateRealtimeSessionRequestTypedDict", + "CreateRealtimeSessionResponse", + "CreateRealtimeSessionResponseTypedDict", "CreateSkillRequest", "CreateSkillRequestTypedDict", "CreateSkillVersionRequest", @@ -3608,6 +3660,8 @@ "GitCommitAuthorTypedDict", "GitCommitMetadata", "GitCommitMetadataTypedDict", + "GlobalHeaderValue", + "GlobalHeaderValueTypedDict", "Granularity", "GuardrailConfig", "GuardrailConfigTypedDict", @@ -3636,6 +3690,8 @@ "InboundAuthenticationType", "IngestionPipelineConfiguration", "IngestionPipelineConfigurationTypedDict", + "IngestionPipelineTargetIndexRef", + "IngestionPipelineTargetIndexRefTypedDict", "InputEntries", "InputEntriesTypedDict", "Inputs", @@ -3776,6 +3832,8 @@ "ListLibrariesResponseTypedDict", "ListModelsV1ModelsGetRequest", "ListModelsV1ModelsGetRequestTypedDict", + "ListOrganizationsResponse", + "ListOrganizationsResponseTypedDict", "ListPromptVersionsResponse", "ListPromptVersionsResponseTypedDict", "ListPromptsResponse", @@ -3802,6 +3860,8 @@ "ListWorkflowEventResponseEvent", "ListWorkflowEventResponseEventTypedDict", "ListWorkflowEventResponseTypedDict", + "ListWorkspacesResponse", + "ListWorkspacesResponseTypedDict", "Loc", "LocTypedDict", "LocationType", @@ -3902,6 +3962,7 @@ "OAuth2TokenAuth", "OAuth2TokenAuthTypedDict", "OAuth2TokenTypedDict", + "OAuthMetadataSource", "OCRAsideTextBlock", "OCRAsideTextBlockTypedDict", "OCRBlockConfidenceScores", @@ -4574,8 +4635,24 @@ "UserMessageContent", "UserMessageContentTypedDict", "UserMessageTypedDict", + "UserOrganization", + "UserOrganizationTypedDict", + "UserWorkspace", + "UserWorkspaceTypedDict", "UsersAPIGetIdentitySecurity", "UsersAPIGetIdentitySecurityTypedDict", + "UsersAPIListOrganizationsRequest", + "UsersAPIListOrganizationsRequestTypedDict", + "UsersAPIListOrganizationsResponse", + "UsersAPIListOrganizationsResponseTypedDict", + "UsersAPIListOrganizationsSecurity", + "UsersAPIListOrganizationsSecurityTypedDict", + "UsersAPIListWorkspacesRequest", + "UsersAPIListWorkspacesRequestTypedDict", + "UsersAPIListWorkspacesResponse", + "UsersAPIListWorkspacesResponseTypedDict", + "UsersAPIListWorkspacesSecurity", + "UsersAPIListWorkspacesSecurityTypedDict", "ValidationError", "ValidationErrorTypedDict", "Visibility", @@ -4952,6 +5029,9 @@ "ClassifierTargetResultTypedDict": ".classifiertargetresult", "ClientCapabilities": ".clientcapabilities", "ClientCapabilitiesTypedDict": ".clientcapabilities", + "ClientSecret": ".clientsecret", + "ClientSecretTypedDict": ".clientsecret", + "ClientSessionPurpose": ".clientsessionpurpose", "ClientTasksCapability": ".clienttaskscapability", "ClientTasksCapabilityTypedDict": ".clienttaskscapability", "ClientTasksRequestsCapability": ".clienttasksrequestscapability", @@ -5103,6 +5183,8 @@ "ConversationStreamRequestTypedDict": ".conversationstreamrequest", "ConversationUsageInfo": ".conversationusageinfo", "ConversationUsageInfoTypedDict": ".conversationusageinfo", + "Body": ".create_client_session_v1_client_sessions_postop", + "BodyTypedDict": ".create_client_session_v1_client_sessions_postop", "CreateDatasetRecordV1ObservabilityDatasetsDatasetIDRecordsPostRequest": ".create_dataset_record_v1_observability_datasets_dataset_id_records_postop", "CreateDatasetRecordV1ObservabilityDatasetsDatasetIDRecordsPostRequestTypedDict": ".create_dataset_record_v1_observability_datasets_dataset_id_records_postop", "CreateAgentRequest": ".createagentrequest", @@ -5136,6 +5218,10 @@ "CreatePromptRequestTypedDict": ".createpromptrequest", "CreatePromptVersionResponse": ".createpromptversionresponse", "CreatePromptVersionResponseTypedDict": ".createpromptversionresponse", + "CreateRealtimeSessionRequest": ".createrealtimesessionrequest", + "CreateRealtimeSessionRequestTypedDict": ".createrealtimesessionrequest", + "CreateRealtimeSessionResponse": ".createrealtimesessionresponse", + "CreateRealtimeSessionResponseTypedDict": ".createrealtimesessionresponse", "CreateSkillRequest": ".createskillrequest", "CreateSkillRequestTypedDict": ".createskillrequest", "CreateSkillVersionResponse": ".createskillversionresponse", @@ -5553,6 +5639,8 @@ "GitCommitAuthorTypedDict": ".gitcommitauthor", "GitCommitMetadata": ".gitcommitmetadata", "GitCommitMetadataTypedDict": ".gitcommitmetadata", + "GlobalHeaderValue": ".globalheadervalue", + "GlobalHeaderValueTypedDict": ".globalheadervalue", "Granularity": ".granularity", "GuardrailConfig": ".guardrailconfig", "GuardrailConfigTypedDict": ".guardrailconfig", @@ -5581,6 +5669,8 @@ "InboundAuthenticationType": ".inboundauthenticationtype", "IngestionPipelineConfiguration": ".ingestionpipelineconfiguration", "IngestionPipelineConfigurationTypedDict": ".ingestionpipelineconfiguration", + "IngestionPipelineTargetIndexRef": ".ingestionpipelinetargetindexref", + "IngestionPipelineTargetIndexRefTypedDict": ".ingestionpipelinetargetindexref", "InputEntries": ".inputentries", "InputEntriesTypedDict": ".inputentries", "Inputs": ".inputs", @@ -5740,6 +5830,8 @@ "ListJudgesResponseTypedDict": ".listjudgesresponse", "ListLibrariesResponse": ".listlibrariesresponse", "ListLibrariesResponseTypedDict": ".listlibrariesresponse", + "ListOrganizationsResponse": ".listorganizationsresponse", + "ListOrganizationsResponseTypedDict": ".listorganizationsresponse", "ListPromptsResponse": ".listpromptsresponse", "ListPromptsResponseTypedDict": ".listpromptsresponse", "ListPromptVersionsResponse": ".listpromptversionsresponse", @@ -5756,6 +5848,8 @@ "ListWorkflowEventResponseEvent": ".listworkfloweventresponse", "ListWorkflowEventResponseEventTypedDict": ".listworkfloweventresponse", "ListWorkflowEventResponseTypedDict": ".listworkfloweventresponse", + "ListWorkspacesResponse": ".listworkspacesresponse", + "ListWorkspacesResponseTypedDict": ".listworkspacesresponse", "LocationType": ".locationtype", "LogsRequest": ".logsrequest", "LogsRequestTypedDict": ".logsrequest", @@ -5856,6 +5950,7 @@ "OAuth2TokenTypedDict": ".oauth2token", "OAuth2TokenAuth": ".oauth2tokenauth", "OAuth2TokenAuthTypedDict": ".oauth2tokenauth", + "OAuthMetadataSource": ".oauthmetadatasource", "ObservabilityErrorCode": ".observabilityerrorcode", "ObservabilityErrorDetail": ".observabilityerrordetail", "ObservabilityErrorDetailTypedDict": ".observabilityerrordetail", @@ -6501,8 +6596,24 @@ "UserMessageContent": ".usermessage", "UserMessageContentTypedDict": ".usermessage", "UserMessageTypedDict": ".usermessage", + "UserOrganization": ".userorganization", + "UserOrganizationTypedDict": ".userorganization", "UsersAPIGetIdentitySecurity": ".users_api_get_identityop", "UsersAPIGetIdentitySecurityTypedDict": ".users_api_get_identityop", + "UsersAPIListOrganizationsRequest": ".users_api_list_organizationsop", + "UsersAPIListOrganizationsRequestTypedDict": ".users_api_list_organizationsop", + "UsersAPIListOrganizationsResponse": ".users_api_list_organizationsop", + "UsersAPIListOrganizationsResponseTypedDict": ".users_api_list_organizationsop", + "UsersAPIListOrganizationsSecurity": ".users_api_list_organizationsop", + "UsersAPIListOrganizationsSecurityTypedDict": ".users_api_list_organizationsop", + "UsersAPIListWorkspacesRequest": ".users_api_list_workspacesop", + "UsersAPIListWorkspacesRequestTypedDict": ".users_api_list_workspacesop", + "UsersAPIListWorkspacesResponse": ".users_api_list_workspacesop", + "UsersAPIListWorkspacesResponseTypedDict": ".users_api_list_workspacesop", + "UsersAPIListWorkspacesSecurity": ".users_api_list_workspacesop", + "UsersAPIListWorkspacesSecurityTypedDict": ".users_api_list_workspacesop", + "UserWorkspace": ".userworkspace", + "UserWorkspaceTypedDict": ".userworkspace", "Context": ".validationerror", "ContextTypedDict": ".validationerror", "Loc": ".validationerror", diff --git a/src/mistralai/client/models/authenticationmethodcreateorupdaterequest.py b/src/mistralai/client/models/authenticationmethodcreateorupdaterequest.py index de0c3f82d..b9a01eecf 100644 --- a/src/mistralai/client/models/authenticationmethodcreateorupdaterequest.py +++ b/src/mistralai/client/models/authenticationmethodcreateorupdaterequest.py @@ -11,6 +11,7 @@ ExtendedOAuthServerMetadata, ExtendedOAuthServerMetadataTypedDict, ) +from .globalheadervalue import GlobalHeaderValue, GlobalHeaderValueTypedDict from .inboundauthenticationtype import InboundAuthenticationType from .oauth2metadatasecrets import Oauth2MetadataSecrets, Oauth2MetadataSecretsTypedDict from .outboundauthenticationtype import OutboundAuthenticationType @@ -22,7 +23,7 @@ UNSET_SENTINEL, ) from pydantic import model_serializer -from typing import List, Optional, Union +from typing import Dict, List, Optional, Union from typing_extensions import NotRequired, TypeAliasType, TypedDict @@ -44,6 +45,8 @@ class AuthenticationMethodCreateOrUpdateRequestTypedDict(TypedDict): auth_direction: NotRequired[AuthDirection] headers: NotRequired[Nullable[List[ConnectorAuthenticationHeaderTypedDict]]] r"""Set of headers to connect to the connector""" + global_headers: NotRequired[Dict[str, GlobalHeaderValueTypedDict]] + r"""Connector-wide headers keyed by header name, applied to every credential. Secret values are encrypted at rest and never returned in clear.""" oauth2_metadata_secrets: NotRequired[Nullable[Oauth2MetadataSecretsTypedDict]] r"""New OAuth2 client credentials (client_id and client_secret).""" oauth2_server_metadata: NotRequired[Nullable[ExtendedOAuthServerMetadataTypedDict]] @@ -59,6 +62,9 @@ class AuthenticationMethodCreateOrUpdateRequest(BaseModel): headers: OptionalNullable[List[ConnectorAuthenticationHeader]] = UNSET r"""Set of headers to connect to the connector""" + global_headers: Optional[Dict[str, GlobalHeaderValue]] = None + r"""Connector-wide headers keyed by header name, applied to every credential. Secret values are encrypted at rest and never returned in clear.""" + oauth2_metadata_secrets: OptionalNullable[Oauth2MetadataSecrets] = UNSET r"""New OAuth2 client credentials (client_id and client_secret).""" @@ -71,6 +77,7 @@ def serialize_model(self, handler): [ "auth_direction", "headers", + "global_headers", "oauth2_metadata_secrets", "oauth2_server_metadata", ] diff --git a/src/mistralai/client/models/clientsecret.py b/src/mistralai/client/models/clientsecret.py new file mode 100644 index 000000000..1b2e1aeda --- /dev/null +++ b/src/mistralai/client/models/clientsecret.py @@ -0,0 +1,18 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: c56702dc45ce + +from __future__ import annotations +from datetime import datetime +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class ClientSecretTypedDict(TypedDict): + value: str + expires_at: datetime + + +class ClientSecret(BaseModel): + value: str + + expires_at: datetime diff --git a/src/mistralai/client/models/clientsessionpurpose.py b/src/mistralai/client/models/clientsessionpurpose.py new file mode 100644 index 000000000..9548b7091 --- /dev/null +++ b/src/mistralai/client/models/clientsessionpurpose.py @@ -0,0 +1,9 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 650b94028268 + +from __future__ import annotations +from typing import Literal + + +ClientSessionPurpose = Literal["realtime",] +r"""Supported purposes for client sessions.""" diff --git a/src/mistralai/client/models/create_client_session_v1_client_sessions_postop.py b/src/mistralai/client/models/create_client_session_v1_client_sessions_postop.py new file mode 100644 index 000000000..b07a04449 --- /dev/null +++ b/src/mistralai/client/models/create_client_session_v1_client_sessions_postop.py @@ -0,0 +1,14 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 6faae4a19392 + +from __future__ import annotations +from .createrealtimesessionrequest import ( + CreateRealtimeSessionRequest, + CreateRealtimeSessionRequestTypedDict, +) + + +BodyTypedDict = CreateRealtimeSessionRequestTypedDict + + +Body = CreateRealtimeSessionRequest diff --git a/src/mistralai/client/models/createconnectorrequest.py b/src/mistralai/client/models/createconnectorrequest.py index fb79e2a00..04642fc2b 100644 --- a/src/mistralai/client/models/createconnectorrequest.py +++ b/src/mistralai/client/models/createconnectorrequest.py @@ -7,6 +7,7 @@ ExtendedOAuthServerMetadata, ExtendedOAuthServerMetadataTypedDict, ) +from .globalheadervalue import GlobalHeaderValue, GlobalHeaderValueTypedDict from .publicresourcevisibility import PublicResourceVisibility from mistralai.client.types import ( BaseModel, @@ -51,6 +52,8 @@ class CreateConnectorRequestTypedDict(TypedDict): """ headers: NotRequired[Nullable[Dict[str, Any]]] r"""Optional organization-level headers to be sent with the request to the mcp server.""" + global_headers: NotRequired[Dict[str, GlobalHeaderValueTypedDict]] + r"""Optional connector-wide headers, keyed by header name, set at creation and applied to every credential. Secret values are encrypted at rest and never returned in clear.""" auth_data: NotRequired[Nullable[AuthDataTypedDict]] r"""Optional additional authentication data for the connector.""" oauth2_server_metadata: NotRequired[Nullable[ExtendedOAuthServerMetadataTypedDict]] @@ -100,6 +103,9 @@ class CreateConnectorRequest(BaseModel): headers: OptionalNullable[Dict[str, Any]] = UNSET r"""Optional organization-level headers to be sent with the request to the mcp server.""" + global_headers: Optional[Dict[str, GlobalHeaderValue]] = None + r"""Optional connector-wide headers, keyed by header name, set at creation and applied to every credential. Secret values are encrypted at rest and never returned in clear.""" + auth_data: OptionalNullable[AuthData] = UNSET r"""Optional additional authentication data for the connector.""" @@ -121,6 +127,7 @@ def serialize_model(self, handler): "icon_url", "visibility", "headers", + "global_headers", "auth_data", "oauth2_server_metadata", "oauth2_server_metadata_url", diff --git a/src/mistralai/client/models/createingestionpipelineconfigurationrequest.py b/src/mistralai/client/models/createingestionpipelineconfigurationrequest.py index 068c8db95..8e6bdffe8 100644 --- a/src/mistralai/client/models/createingestionpipelineconfigurationrequest.py +++ b/src/mistralai/client/models/createingestionpipelineconfigurationrequest.py @@ -2,6 +2,10 @@ # @generated-id: 480f219c27e5 from __future__ import annotations +from .ingestionpipelinetargetindexref import ( + IngestionPipelineTargetIndexRef, + IngestionPipelineTargetIndexRefTypedDict, +) from mistralai.client.types import ( BaseModel, Nullable, @@ -10,13 +14,16 @@ UNSET_SENTINEL, ) from pydantic import model_serializer -from typing import Dict +from typing import Dict, List from typing_extensions import NotRequired, TypedDict class CreateIngestionPipelineConfigurationRequestTypedDict(TypedDict): name: str pipeline_composition: NotRequired[Nullable[Dict[str, str]]] + target_indexes: NotRequired[ + Nullable[List[IngestionPipelineTargetIndexRefTypedDict]] + ] class CreateIngestionPipelineConfigurationRequest(BaseModel): @@ -24,10 +31,12 @@ class CreateIngestionPipelineConfigurationRequest(BaseModel): pipeline_composition: OptionalNullable[Dict[str, str]] = UNSET + target_indexes: OptionalNullable[List[IngestionPipelineTargetIndexRef]] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["pipeline_composition"]) - nullable_fields = set(["pipeline_composition"]) + optional_fields = set(["pipeline_composition", "target_indexes"]) + nullable_fields = set(["pipeline_composition", "target_indexes"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/createrealtimesessionrequest.py b/src/mistralai/client/models/createrealtimesessionrequest.py new file mode 100644 index 000000000..fc5c1f8cf --- /dev/null +++ b/src/mistralai/client/models/createrealtimesessionrequest.py @@ -0,0 +1,34 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 285bf15f71b1 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import validate_const +import pydantic +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, TypedDict + + +class CreateRealtimeSessionRequestTypedDict(TypedDict): + r"""Payload used to create realtime client sessions.""" + + model: str + purpose: Literal["realtime"] + + +class CreateRealtimeSessionRequest(BaseModel): + r"""Payload used to create realtime client sessions.""" + + model: str + + purpose: Annotated[ + Annotated[Literal["realtime"], AfterValidator(validate_const("realtime"))], + pydantic.Field(alias="purpose"), + ] = "realtime" + + +try: + CreateRealtimeSessionRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/createrealtimesessionresponse.py b/src/mistralai/client/models/createrealtimesessionresponse.py new file mode 100644 index 000000000..0da83ea6a --- /dev/null +++ b/src/mistralai/client/models/createrealtimesessionresponse.py @@ -0,0 +1,61 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 9183c3301002 + +from __future__ import annotations +from .clientsecret import ClientSecret, ClientSecretTypedDict +from .clientsessionpurpose import ClientSessionPurpose +from datetime import datetime +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class CreateRealtimeSessionResponseTypedDict(TypedDict): + purpose: ClientSessionPurpose + r"""Supported purposes for client sessions.""" + expires_at: datetime + client_secret: ClientSecretTypedDict + object: Literal["client.session"] + + +class CreateRealtimeSessionResponse(BaseModel): + purpose: ClientSessionPurpose + r"""Supported purposes for client sessions.""" + + expires_at: datetime + + client_secret: ClientSecret + + object: Annotated[ + Annotated[ + Optional[Literal["client.session"]], + AfterValidator(validate_const("client.session")), + ], + pydantic.Field(alias="object"), + ] = "client.session" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["object"]) + 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: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + CreateRealtimeSessionResponse.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/deploymentdetailresponse.py b/src/mistralai/client/models/deploymentdetailresponse.py index 2da9fcb0e..7035aaca4 100644 --- a/src/mistralai/client/models/deploymentdetailresponse.py +++ b/src/mistralai/client/models/deploymentdetailresponse.py @@ -20,9 +20,10 @@ UNSET, UNSET_SENTINEL, ) +import pydantic from pydantic import model_serializer from typing import List, Optional -from typing_extensions import NotRequired, TypedDict +from typing_extensions import Annotated, NotRequired, TypedDict class DeploymentDetailResponseTypedDict(TypedDict): @@ -74,7 +75,12 @@ class DeploymentDetailResponse(BaseModel): is_hardened: Optional[bool] = False r"""Whether the deployment has at least one authorized credential""" - location: OptionalNullable[DeploymentLocation] = UNSET + location: Annotated[ + OptionalNullable[DeploymentLocation], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET r"""Where the deployment is running""" worker_count: Optional[int] = 0 diff --git a/src/mistralai/client/models/deploymentresponse.py b/src/mistralai/client/models/deploymentresponse.py index c43d77e56..2945cbbd5 100644 --- a/src/mistralai/client/models/deploymentresponse.py +++ b/src/mistralai/client/models/deploymentresponse.py @@ -16,9 +16,10 @@ UNSET, UNSET_SENTINEL, ) +import pydantic from pydantic import model_serializer from typing import List, Optional -from typing_extensions import NotRequired, TypedDict +from typing_extensions import Annotated, NotRequired, TypedDict class DeploymentResponseTypedDict(TypedDict): @@ -65,7 +66,12 @@ class DeploymentResponse(BaseModel): is_hardened: Optional[bool] = False r"""Whether the deployment has at least one authorized credential""" - location: OptionalNullable[DeploymentLocation] = UNSET + location: Annotated[ + OptionalNullable[DeploymentLocation], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET r"""Where the deployment is running""" worker_count: Optional[int] = 0 diff --git a/src/mistralai/client/models/extendedoauthservermetadata.py b/src/mistralai/client/models/extendedoauthservermetadata.py index 91033c6a6..0600c38ca 100644 --- a/src/mistralai/client/models/extendedoauthservermetadata.py +++ b/src/mistralai/client/models/extendedoauthservermetadata.py @@ -2,6 +2,7 @@ # @generated-id: 967e2e08f18c from __future__ import annotations +from .oauthmetadatasource import OAuthMetadataSource from mistralai.client.types import ( BaseModel, Nullable, @@ -47,6 +48,7 @@ class ExtendedOAuthServerMetadataTypedDict(TypedDict): ] code_challenge_methods_supported: NotRequired[Nullable[List[str]]] client_id_metadata_document_supported: NotRequired[Nullable[bool]] + x_source: NotRequired[Nullable[OAuthMetadataSource]] x_resource_url: NotRequired[Nullable[str]] x_scope: NotRequired[Nullable[str]] @@ -108,6 +110,8 @@ class ExtendedOAuthServerMetadata(BaseModel): client_id_metadata_document_supported: OptionalNullable[bool] = UNSET + x_source: OptionalNullable[OAuthMetadataSource] = UNSET + x_resource_url: OptionalNullable[str] = UNSET x_scope: OptionalNullable[str] = UNSET @@ -135,6 +139,7 @@ def serialize_model(self, handler): "introspection_endpoint_auth_signing_alg_values_supported", "code_challenge_methods_supported", "client_id_metadata_document_supported", + "x_source", "x_resource_url", "x_scope", ] @@ -159,6 +164,7 @@ def serialize_model(self, handler): "introspection_endpoint_auth_signing_alg_values_supported", "code_challenge_methods_supported", "client_id_metadata_document_supported", + "x_source", "x_resource_url", "x_scope", ] diff --git a/src/mistralai/client/models/get_deployment_v1_workflows_deployments_name_getop.py b/src/mistralai/client/models/get_deployment_v1_workflows_deployments_name_getop.py index 1f699bed5..412b09fb7 100644 --- a/src/mistralai/client/models/get_deployment_v1_workflows_deployments_name_getop.py +++ b/src/mistralai/client/models/get_deployment_v1_workflows_deployments_name_getop.py @@ -2,16 +2,56 @@ # @generated-id: 3fae92e2573a from __future__ import annotations -from mistralai.client.types import BaseModel -from mistralai.client.utils import FieldMetadata, PathParamMetadata -from typing_extensions import Annotated, TypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing_extensions import Annotated, NotRequired, TypedDict class GetDeploymentV1WorkflowsDeploymentsNameGetRequestTypedDict(TypedDict): name: str + workflow_name: NotRequired[Nullable[str]] + r"""Scope serving status to this workflow""" class GetDeploymentV1WorkflowsDeploymentsNameGetRequest(BaseModel): name: Annotated[ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) ] + + workflow_name: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Scope serving status to this workflow""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["workflow_name"]) + nullable_fields = set(["workflow_name"]) + 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/globalheadervalue.py b/src/mistralai/client/models/globalheadervalue.py new file mode 100644 index 000000000..e6dfdc89e --- /dev/null +++ b/src/mistralai/client/models/globalheadervalue.py @@ -0,0 +1,45 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 8f50c772664e + +from __future__ import annotations +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class GlobalHeaderValueTypedDict(TypedDict): + r"""Value of a connector-wide header. ``value`` is plaintext in memory so create + round-trips and encryption-at-rest keep the real value; secrets are redacted only + on JSON serialization (API responses). + """ + + value: str + is_secret: NotRequired[bool] + + +class GlobalHeaderValue(BaseModel): + r"""Value of a connector-wide header. ``value`` is plaintext in memory so create + round-trips and encryption-at-rest keep the real value; secrets are redacted only + on JSON serialization (API responses). + """ + + value: str + + is_secret: Optional[bool] = True + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["is_secret"]) + 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: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/ingestionpipelinetargetindexref.py b/src/mistralai/client/models/ingestionpipelinetargetindexref.py new file mode 100644 index 000000000..419c42e29 --- /dev/null +++ b/src/mistralai/client/models/ingestionpipelinetargetindexref.py @@ -0,0 +1,47 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 1fd3655ff376 + +from __future__ import annotations +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class IngestionPipelineTargetIndexRefTypedDict(TypedDict): + name: str + type: Literal["vespa"] + + +class IngestionPipelineTargetIndexRef(BaseModel): + name: str + + type: Annotated[ + Annotated[Optional[Literal["vespa"]], AfterValidator(validate_const("vespa"))], + pydantic.Field(alias="type"), + ] = "vespa" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + 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: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + IngestionPipelineTargetIndexRef.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/listorganizationsresponse.py b/src/mistralai/client/models/listorganizationsresponse.py new file mode 100644 index 000000000..164489da9 --- /dev/null +++ b/src/mistralai/client/models/listorganizationsresponse.py @@ -0,0 +1,18 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 521126214ce3 + +from __future__ import annotations +from .userorganization import UserOrganization, UserOrganizationTypedDict +from mistralai.client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class ListOrganizationsResponseTypedDict(TypedDict): + organizations: List[UserOrganizationTypedDict] + r"""The organizations the authenticated user is a member of.""" + + +class ListOrganizationsResponse(BaseModel): + organizations: List[UserOrganization] + r"""The organizations the authenticated user is a member of.""" diff --git a/src/mistralai/client/models/listworkspacesresponse.py b/src/mistralai/client/models/listworkspacesresponse.py new file mode 100644 index 000000000..de1edb1b8 --- /dev/null +++ b/src/mistralai/client/models/listworkspacesresponse.py @@ -0,0 +1,18 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 42d87f615991 + +from __future__ import annotations +from .userworkspace import UserWorkspace, UserWorkspaceTypedDict +from mistralai.client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class ListWorkspacesResponseTypedDict(TypedDict): + workspaces: List[UserWorkspaceTypedDict] + r"""The workspaces the authenticated user is a member of, each tagged with the organization it belongs to.""" + + +class ListWorkspacesResponse(BaseModel): + workspaces: List[UserWorkspace] + r"""The workspaces the authenticated user is a member of, each tagged with the organization it belongs to.""" diff --git a/src/mistralai/client/models/oauthmetadatasource.py b/src/mistralai/client/models/oauthmetadatasource.py new file mode 100644 index 000000000..5bbbb21b9 --- /dev/null +++ b/src/mistralai/client/models/oauthmetadatasource.py @@ -0,0 +1,16 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: eacda6ae7dda + +from __future__ import annotations +from mistralai.client.types import UnrecognizedStr +from typing import Literal, Union + + +OAuthMetadataSource = Union[ + Literal[ + "autodiscovery", + "provided", + ], + UnrecognizedStr, +] +r"""How a connector's OAuth server metadata was obtained.""" diff --git a/src/mistralai/client/models/publicauthenticationmethod.py b/src/mistralai/client/models/publicauthenticationmethod.py index 42e943a6f..5f9f32f10 100644 --- a/src/mistralai/client/models/publicauthenticationmethod.py +++ b/src/mistralai/client/models/publicauthenticationmethod.py @@ -6,6 +6,11 @@ ConnectorAuthenticationHeader, ConnectorAuthenticationHeaderTypedDict, ) +from .extendedoauthservermetadata import ( + ExtendedOAuthServerMetadata, + ExtendedOAuthServerMetadataTypedDict, +) +from .globalheadervalue import GlobalHeaderValue, GlobalHeaderValueTypedDict from .outboundauthenticationtype import OutboundAuthenticationType from mistralai.client.types import ( BaseModel, @@ -15,7 +20,7 @@ UNSET_SENTINEL, ) from pydantic import model_serializer -from typing import List +from typing import Dict, List, Optional from typing_extensions import NotRequired, TypedDict @@ -25,6 +30,8 @@ class PublicAuthenticationMethodTypedDict(TypedDict): method_type: OutboundAuthenticationType has_default_credentials: bool headers: NotRequired[Nullable[List[ConnectorAuthenticationHeaderTypedDict]]] + global_headers: NotRequired[Dict[str, GlobalHeaderValueTypedDict]] + oauth2_server_metadata: NotRequired[Nullable[ExtendedOAuthServerMetadataTypedDict]] class PublicAuthenticationMethod(BaseModel): @@ -36,10 +43,14 @@ class PublicAuthenticationMethod(BaseModel): headers: OptionalNullable[List[ConnectorAuthenticationHeader]] = UNSET + global_headers: Optional[Dict[str, GlobalHeaderValue]] = None + + oauth2_server_metadata: OptionalNullable[ExtendedOAuthServerMetadata] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["headers"]) - nullable_fields = set(["headers"]) + optional_fields = set(["headers", "global_headers", "oauth2_server_metadata"]) + nullable_fields = set(["headers", "oauth2_server_metadata"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/userorganization.py b/src/mistralai/client/models/userorganization.py new file mode 100644 index 000000000..e6330933c --- /dev/null +++ b/src/mistralai/client/models/userorganization.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 14366f8fb1a5 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class UserOrganizationTypedDict(TypedDict): + id: str + r"""The organization's unique identifier.""" + name: str + r"""The organization's display name.""" + + +class UserOrganization(BaseModel): + id: str + r"""The organization's unique identifier.""" + + name: str + r"""The organization's display name.""" diff --git a/src/mistralai/client/models/users_api_list_organizationsop.py b/src/mistralai/client/models/users_api_list_organizationsop.py new file mode 100644 index 000000000..0cc969b3c --- /dev/null +++ b/src/mistralai/client/models/users_api_list_organizationsop.py @@ -0,0 +1,81 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: ee2d958ab1cb + +from __future__ import annotations +from .listorganizationsresponse import ( + ListOrganizationsResponse, + ListOrganizationsResponseTypedDict, +) +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from mistralai.client.utils import FieldMetadata, QueryParamMetadata, SecurityMetadata +from pydantic import model_serializer +from typing import Awaitable, Callable, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +class UsersAPIListOrganizationsSecurityTypedDict(TypedDict): + dashboard_user_context_auth: str + + +class UsersAPIListOrganizationsSecurity(BaseModel): + dashboard_user_context_auth: Annotated[ + str, + FieldMetadata( + security=SecurityMetadata( + scheme=True, + scheme_type="apiKey", + sub_type="header", + field_name="x-api-key", + ) + ), + ] + + +class UsersAPIListOrganizationsRequestTypedDict(TypedDict): + offset: NotRequired[int] + r"""Number of organizations to skip before returning results.""" + limit: NotRequired[int] + r"""Maximum number of organizations to return.""" + + +class UsersAPIListOrganizationsRequest(BaseModel): + offset: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 0 + r"""Number of organizations to skip before returning results.""" + + limit: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 100 + r"""Maximum number of organizations to return.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["offset", "limit"]) + 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: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +class UsersAPIListOrganizationsResponseTypedDict(TypedDict): + result: ListOrganizationsResponseTypedDict + + +class UsersAPIListOrganizationsResponse(BaseModel): + next: Union[ + Callable[[], Optional[UsersAPIListOrganizationsResponse]], + Callable[[], Awaitable[Optional[UsersAPIListOrganizationsResponse]]], + ] + + result: ListOrganizationsResponse diff --git a/src/mistralai/client/models/users_api_list_workspacesop.py b/src/mistralai/client/models/users_api_list_workspacesop.py new file mode 100644 index 000000000..6feda7894 --- /dev/null +++ b/src/mistralai/client/models/users_api_list_workspacesop.py @@ -0,0 +1,104 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 71c247d21aeb + +from __future__ import annotations +from .listworkspacesresponse import ( + ListWorkspacesResponse, + ListWorkspacesResponseTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, QueryParamMetadata, SecurityMetadata +from pydantic import model_serializer +from typing import Awaitable, Callable, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +class UsersAPIListWorkspacesSecurityTypedDict(TypedDict): + dashboard_user_context_auth: str + + +class UsersAPIListWorkspacesSecurity(BaseModel): + dashboard_user_context_auth: Annotated[ + str, + FieldMetadata( + security=SecurityMetadata( + scheme=True, + scheme_type="apiKey", + sub_type="header", + field_name="x-api-key", + ) + ), + ] + + +class UsersAPIListWorkspacesRequestTypedDict(TypedDict): + organization_id: NotRequired[Nullable[str]] + r"""Return only workspaces belonging to this organization.""" + offset: NotRequired[int] + r"""Number of workspaces to skip before returning results.""" + limit: NotRequired[int] + r"""Maximum number of workspaces to return.""" + + +class UsersAPIListWorkspacesRequest(BaseModel): + organization_id: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Return only workspaces belonging to this organization.""" + + offset: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 0 + r"""Number of workspaces to skip before returning results.""" + + limit: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 100 + r"""Maximum number of workspaces to return.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["organization_id", "offset", "limit"]) + nullable_fields = set(["organization_id"]) + 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 + + +class UsersAPIListWorkspacesResponseTypedDict(TypedDict): + result: ListWorkspacesResponseTypedDict + + +class UsersAPIListWorkspacesResponse(BaseModel): + next: Union[ + Callable[[], Optional[UsersAPIListWorkspacesResponse]], + Callable[[], Awaitable[Optional[UsersAPIListWorkspacesResponse]]], + ] + + result: ListWorkspacesResponse diff --git a/src/mistralai/client/models/userworkspace.py b/src/mistralai/client/models/userworkspace.py new file mode 100644 index 000000000..6f9f9787f --- /dev/null +++ b/src/mistralai/client/models/userworkspace.py @@ -0,0 +1,26 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 66ffd9d93482 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class UserWorkspaceTypedDict(TypedDict): + id: str + r"""The workspace's unique identifier.""" + name: str + r"""The workspace's display name.""" + organization_id: str + r"""The identifier of the organization this workspace belongs to.""" + + +class UserWorkspace(BaseModel): + id: str + r"""The workspace's unique identifier.""" + + name: str + r"""The workspace's display name.""" + + organization_id: str + r"""The identifier of the organization this workspace belongs to.""" diff --git a/src/mistralai/client/realtime.py b/src/mistralai/client/realtime.py new file mode 100644 index 000000000..1c5795b36 --- /dev/null +++ b/src/mistralai/client/realtime.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 9d55a65b4bc9 + +from .basesdk import BaseSDK +from .sdkconfiguration import SDKConfiguration +from mistralai.client.sessions import Sessions +from typing import Optional + + +class Realtime(BaseSDK): + sessions: Sessions + + def __init__( + self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None + ) -> None: + BaseSDK.__init__(self, sdk_config, parent_ref=parent_ref) + self.sdk_configuration = sdk_config + self._init_sdks() + + def _init_sdks(self): + self.sessions = Sessions(self.sdk_configuration, parent_ref=self.parent_ref) diff --git a/src/mistralai/client/sdk.py b/src/mistralai/client/sdk.py index 9b7eb230d..a5ff2a851 100644 --- a/src/mistralai/client/sdk.py +++ b/src/mistralai/client/sdk.py @@ -28,6 +28,7 @@ from mistralai.client.fim import Fim from mistralai.client.models_ import Models from mistralai.client.ocr import Ocr + from mistralai.client.realtime import Realtime from mistralai.client.workflows import Workflows @@ -38,6 +39,7 @@ class Mistral(BaseSDK): audio: "Audio" models: "Models" r"""Model Management API""" + realtime: "Realtime" files: "Files" r"""Files API""" batch: "Batch" @@ -59,6 +61,7 @@ class Mistral(BaseSDK): "beta": ("mistralai.client.beta", "Beta"), "audio": ("mistralai.client.audio", "Audio"), "models": ("mistralai.client.models_", "Models"), + "realtime": ("mistralai.client.realtime", "Realtime"), "files": ("mistralai.client.files", "Files"), "batch": ("mistralai.client.batch", "Batch"), "chat": ("mistralai.client.chat", "Chat"), diff --git a/src/mistralai/client/sessions.py b/src/mistralai/client/sessions.py new file mode 100644 index 000000000..62914daeb --- /dev/null +++ b/src/mistralai/client/sessions.py @@ -0,0 +1,204 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 6387fd8f7623 + +from .basesdk import BaseSDK +from mistralai.client import errors, models, utils +from mistralai.client._hooks import HookContext +from mistralai.client.types import BaseModel, 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, Mapping, Optional, Union, cast + + +class Sessions(BaseSDK): + def create( + self, + *, + request: Union[models.Body, models.BodyTypedDict], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.CreateRealtimeSessionResponse: + r"""Create Client Session + + :param request: The request object to send. + :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 = 300000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, models.Body) + request = cast(models.Body, request) + + req = self._build_request( + method="POST", + path="/v1/client/sessions", + 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.Body + ), + 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="create_client_session_v1_client_sessions_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response( + models.CreateRealtimeSessionResponse, 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 create_async( + self, + *, + request: Union[models.Body, models.BodyTypedDict], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.CreateRealtimeSessionResponse: + r"""Create Client Session + + :param request: The request object to send. + :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 = 300000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, models.Body) + request = cast(models.Body, request) + + req = self._build_request_async( + method="POST", + path="/v1/client/sessions", + 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.Body + ), + 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="create_client_session_v1_client_sessions_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response( + models.CreateRealtimeSessionResponse, 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/src/mistralai/client/users.py b/src/mistralai/client/users.py index 6112a1f50..d01a2a0cb 100644 --- a/src/mistralai/client/users.py +++ b/src/mistralai/client/users.py @@ -2,12 +2,13 @@ # @generated-id: 81be4772253e from .basesdk import BaseSDK +from jsonpath import JSONPath 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 Mapping, Optional, Union +from typing import Any, Awaitable, Dict, List, Mapping, Optional, Union class Users(BaseSDK): @@ -176,3 +177,523 @@ async def get_identity_async( raise errors.SDKError("API error occurred", http_res, http_res_text) raise errors.SDKError("Unexpected response received", http_res) + + def list_organizations( + self, + *, + security: Union[ + models.UsersAPIListOrganizationsSecurity, + models.UsersAPIListOrganizationsSecurityTypedDict, + ], + offset: Optional[int] = 0, + limit: Optional[int] = 100, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Optional[models.UsersAPIListOrganizationsResponse]: + r"""List Organizations + + List every organization the authenticated user is a member of. + + Identity-only: the caller need not have selected an organization, so this + reads only the user and never scopes by the active org. + + :param security: + :param offset: Number of organizations to skip before returning results. + :param limit: Maximum number of organizations to return. + :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 = 300000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.UsersAPIListOrganizationsRequest( + offset=offset, + limit=limit, + ) + + req = self._build_request( + method="GET", + path="/v1/users/me/organizations", + base_url=base_url, + url_variables=url_variables, + request=request, + 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=utils.get_pydantic_model( + security, models.UsersAPIListOrganizationsSecurity + ), + 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="users_api_list_organizations", + oauth2_scopes=None, + security_source=get_security_from_env(security, models.Security), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + def next_func() -> Optional[models.UsersAPIListOrganizationsResponse]: + body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) + + offset = request.offset if isinstance(request.offset, int) else 0 + + if not http_res.text: + return None + results = JSONPath("$.organizations").parse(body) + if len(results) == 0 or len(results[0]) == 0: + return None + limit_ = request.limit if isinstance(request.limit, int) else 100 + if len(results[0]) < limit_: + return None + next_offset = offset + len(results[0]) + + return self.list_organizations( + security=security, + offset=next_offset, + limit=limit, + retries=retries, + server_url=server_url, + timeout_ms=timeout_ms, + http_headers=http_headers, + ) + + if utils.match_response(http_res, "200", "application/json"): + return models.UsersAPIListOrganizationsResponse( + result=unmarshal_json_response( + models.ListOrganizationsResponse, http_res + ), + next=next_func, + ) + 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_organizations_async( + self, + *, + security: Union[ + models.UsersAPIListOrganizationsSecurity, + models.UsersAPIListOrganizationsSecurityTypedDict, + ], + offset: Optional[int] = 0, + limit: Optional[int] = 100, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Optional[models.UsersAPIListOrganizationsResponse]: + r"""List Organizations + + List every organization the authenticated user is a member of. + + Identity-only: the caller need not have selected an organization, so this + reads only the user and never scopes by the active org. + + :param security: + :param offset: Number of organizations to skip before returning results. + :param limit: Maximum number of organizations to return. + :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 = 300000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.UsersAPIListOrganizationsRequest( + offset=offset, + limit=limit, + ) + + req = self._build_request_async( + method="GET", + path="/v1/users/me/organizations", + base_url=base_url, + url_variables=url_variables, + request=request, + 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=utils.get_pydantic_model( + security, models.UsersAPIListOrganizationsSecurity + ), + 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="users_api_list_organizations", + oauth2_scopes=None, + security_source=get_security_from_env(security, models.Security), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + def next_func() -> ( + Awaitable[Optional[models.UsersAPIListOrganizationsResponse]] + ): + body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) + + async def empty_result(): + return None + + offset = request.offset if isinstance(request.offset, int) else 0 + + if not http_res.text: + return empty_result() + results = JSONPath("$.organizations").parse(body) + if len(results) == 0 or len(results[0]) == 0: + return empty_result() + limit_ = request.limit if isinstance(request.limit, int) else 100 + if len(results[0]) < limit_: + return empty_result() + next_offset = offset + len(results[0]) + + return self.list_organizations_async( + security=security, + offset=next_offset, + limit=limit, + retries=retries, + server_url=server_url, + timeout_ms=timeout_ms, + http_headers=http_headers, + ) + + if utils.match_response(http_res, "200", "application/json"): + return models.UsersAPIListOrganizationsResponse( + result=unmarshal_json_response( + models.ListOrganizationsResponse, http_res + ), + next=next_func, + ) + 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 list_workspaces( + self, + *, + security: Union[ + models.UsersAPIListWorkspacesSecurity, + models.UsersAPIListWorkspacesSecurityTypedDict, + ], + organization_id: OptionalNullable[str] = UNSET, + offset: Optional[int] = 0, + limit: Optional[int] = 100, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Optional[models.UsersAPIListWorkspacesResponse]: + r"""List Workspaces + + List every workspace the authenticated user is a member of, across all + their organizations, each tagged with the organization it belongs to. + + :param security: + :param organization_id: Return only workspaces belonging to this organization. + :param offset: Number of workspaces to skip before returning results. + :param limit: Maximum number of workspaces to return. + :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 = 300000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.UsersAPIListWorkspacesRequest( + organization_id=organization_id, + offset=offset, + limit=limit, + ) + + req = self._build_request( + method="GET", + path="/v1/users/me/workspaces", + base_url=base_url, + url_variables=url_variables, + request=request, + 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=utils.get_pydantic_model( + security, models.UsersAPIListWorkspacesSecurity + ), + 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="users_api_list_workspaces", + oauth2_scopes=None, + security_source=get_security_from_env(security, models.Security), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + def next_func() -> Optional[models.UsersAPIListWorkspacesResponse]: + body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) + + offset = request.offset if isinstance(request.offset, int) else 0 + + if not http_res.text: + return None + results = JSONPath("$.workspaces").parse(body) + if len(results) == 0 or len(results[0]) == 0: + return None + limit_ = request.limit if isinstance(request.limit, int) else 100 + if len(results[0]) < limit_: + return None + next_offset = offset + len(results[0]) + + return self.list_workspaces( + security=security, + organization_id=organization_id, + offset=next_offset, + limit=limit, + retries=retries, + server_url=server_url, + timeout_ms=timeout_ms, + http_headers=http_headers, + ) + + if utils.match_response(http_res, "200", "application/json"): + return models.UsersAPIListWorkspacesResponse( + result=unmarshal_json_response(models.ListWorkspacesResponse, http_res), + next=next_func, + ) + 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_workspaces_async( + self, + *, + security: Union[ + models.UsersAPIListWorkspacesSecurity, + models.UsersAPIListWorkspacesSecurityTypedDict, + ], + organization_id: OptionalNullable[str] = UNSET, + offset: Optional[int] = 0, + limit: Optional[int] = 100, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Optional[models.UsersAPIListWorkspacesResponse]: + r"""List Workspaces + + List every workspace the authenticated user is a member of, across all + their organizations, each tagged with the organization it belongs to. + + :param security: + :param organization_id: Return only workspaces belonging to this organization. + :param offset: Number of workspaces to skip before returning results. + :param limit: Maximum number of workspaces to return. + :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 = 300000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.UsersAPIListWorkspacesRequest( + organization_id=organization_id, + offset=offset, + limit=limit, + ) + + req = self._build_request_async( + method="GET", + path="/v1/users/me/workspaces", + base_url=base_url, + url_variables=url_variables, + request=request, + 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=utils.get_pydantic_model( + security, models.UsersAPIListWorkspacesSecurity + ), + 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="users_api_list_workspaces", + oauth2_scopes=None, + security_source=get_security_from_env(security, models.Security), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + def next_func() -> Awaitable[Optional[models.UsersAPIListWorkspacesResponse]]: + body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) + + async def empty_result(): + return None + + offset = request.offset if isinstance(request.offset, int) else 0 + + if not http_res.text: + return empty_result() + results = JSONPath("$.workspaces").parse(body) + if len(results) == 0 or len(results[0]) == 0: + return empty_result() + limit_ = request.limit if isinstance(request.limit, int) else 100 + if len(results[0]) < limit_: + return empty_result() + next_offset = offset + len(results[0]) + + return self.list_workspaces_async( + security=security, + organization_id=organization_id, + offset=next_offset, + limit=limit, + retries=retries, + server_url=server_url, + timeout_ms=timeout_ms, + http_headers=http_headers, + ) + + if utils.match_response(http_res, "200", "application/json"): + return models.UsersAPIListWorkspacesResponse( + result=unmarshal_json_response(models.ListWorkspacesResponse, http_res), + next=next_func, + ) + 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) From eeca8f860b04066b7e6274cf2b9f2bb33d4550ce Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 13 Aug 2026 15:37:51 +0000 Subject: [PATCH 2/2] chore: align package version files to version 2.9.3 --- pyproject.toml | 2 +- uv.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index de862b054..ee70921be 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.9.2" +version = "2.9.3" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/uv.lock b/uv.lock index ab8f935b5..24778a0dc 100644 --- a/uv.lock +++ b/uv.lock @@ -1047,7 +1047,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.9.2" +version = "2.9.3" source = { editable = "." } dependencies = [ { name = "eval-type-backport" },