diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 1064161a..777f1c89 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: eed1e14031b7c6a8e5aab140c8de4fc7 + docChecksum: a5576b870f8a296e847a48f510d3a5ed docVersion: 1.0.0 speakeasyVersion: 1.761.1 generationVersion: 2.879.6 - releaseVersion: 2.4.0 - configChecksum: 106560b01230037a615e45a3ba82c612 + releaseVersion: 2.4.1 + configChecksum: 4a73cb94d9298b52588a00f50ab463b8 repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: 02d6816b-7e5c-4764-b044-5ce0c3d87ede - pristine_commit_hash: bcb4cb005b45b822f3b3d8b50ccd4e507683f167 - pristine_tree_hash: 47ff262921294673a501861304400d77fabb4d3d + generation_id: 16fdd9a5-4d4c-4756-8a5a-bde240fceb29 + pristine_commit_hash: f6ad9952436b84ae3d715dbc486d951316292622 + pristine_tree_hash: 530cde84e32ffb37b791db4197782bb43d4e6cb1 features: python: acceptHeaders: 3.0.0 @@ -338,6 +338,14 @@ trackedFiles: id: e510ac107a56 last_write_checksum: sha1:1cfbc35a6112a6eca7b4199c37959a0fef390ca8 pristine_git_object: d0784e66112b8f79036d1acff2a7fc242058e4a0 + docs/models/authenticationconfiguration.md: + id: b470496ac0ad + last_write_checksum: sha1:5895ae27addf9e917660902384d24f48fccfaf79 + pristine_git_object: 081649ea299f852f14b57da69473ab4920a02e4a + docs/models/authenticationtype.md: + id: fc252db73e2a + last_write_checksum: sha1:2f600847a29462d970d753fce461e9e62bc47902 + pristine_git_object: 498bfeaae0b154d448712b8e27cce56750dcec2d docs/models/authorization.md: id: dec4d9809e25 last_write_checksum: sha1:6bf766a7b49ca2b706bb4eb88ba2d56406e06e1e @@ -352,8 +360,8 @@ trackedFiles: pristine_git_object: 3d721d91572e4cdb8d5de5a2cdd294693f552d73 docs/models/basefielddefinitiontype.md: id: e0678603f859 - last_write_checksum: sha1:4c79afbbc22081d7ac18c3de963b92dd2dca0069 - pristine_git_object: efdff2a4bf26336c8f1880683fb2d798ee2d630d + last_write_checksum: sha1:057a88127fff9b9cbee409cf28c865bc22c46d69 + pristine_git_object: 355242b9982ce817900b3f51418ee629775efcf1 docs/models/basemodelcard.md: id: 2f62bfbd650e last_write_checksum: sha1:d42dfe36b103ee95f55e91ac306e3179060dfb3f @@ -634,10 +642,18 @@ trackedFiles: id: 19b9e48a3c2e last_write_checksum: sha1:6e199c756ce35e2bff3b67df5d97b4520518b271 pristine_git_object: c87093846ca27940a08318fb090c60ce56a00651 + docs/models/connectioncredentials.md: + id: 1aa13b29ae25 + last_write_checksum: sha1:1fbc7ca6daa21f093853cda8385fd63b031bb653 + pristine_git_object: 7e89239996c86952aa3ddf7520c0a73858b31725 docs/models/connector.md: id: cbf7c2c53983 - last_write_checksum: sha1:477e81b9e908f8c40e22cffcf4e7cd6ae38fe34e - pristine_git_object: a5d6073ea8da1284bea490d74fec8e6224fc3910 + last_write_checksum: sha1:f176fd1e55ba030a3b5bc0881a0c6c5023f3c46d + pristine_git_object: a0107820b8fdd26474f6e0d48280e5b6d713f7e3 + docs/models/connectorauthenticationheader.md: + id: bb5e842caa63 + last_write_checksum: sha1:7c721f916ed1ce2d4155734bb8190e11de6bf4ac + pristine_git_object: c545b571f921874f7d4a9ffda9331a73eacb6c3f docs/models/connectorcalltoolrequest.md: id: d0f10cee6826 last_write_checksum: sha1:81fa16df68355ba258c66189a2c9b6d0cdb2dfb8 @@ -646,26 +662,66 @@ trackedFiles: id: a7a294c4280c last_write_checksum: sha1:0d8983932c2f4eb6f19e7a81c1e76eeb7ee9bb2f pristine_git_object: dea7083dabf1fe9f5470a5b13d6e65ae234d8aa8 + docs/models/connectorcreateorupdateorganizationcredentialsv1request.md: + id: 215e752e803b + last_write_checksum: sha1:cc72d358588bae1001e4076c77d5e0065977b441 + pristine_git_object: 2797bebf5d8b711bcd7a69f193d40f33ad66d640 + docs/models/connectorcreateorupdateusercredentialsv1request.md: + id: 53bf0f40ddbc + last_write_checksum: sha1:a20627b02d5057def7e491f3af04fcf6770389a9 + pristine_git_object: 3e763722a0ad765af38fffbf938a0b228015c3ae + docs/models/connectorcreateorupdateworkspacecredentialsv1request.md: + id: 10c159720bae + last_write_checksum: sha1:e86b1952360e4f41550603b9dc16fddeff6127e7 + pristine_git_object: 310cdcde0039e9fdb4faa53644265a6a614d9b20 + docs/models/connectordeleteorganizationcredentialsv1request.md: + id: 922f5267f2c0 + last_write_checksum: sha1:23af2d809a20c093ece79bcd1e6ebc551be4b368 + pristine_git_object: eaf4d00cc70f2d15e29634ff99f1cfedcdeea189 + docs/models/connectordeleteusercredentialsv1request.md: + id: 294334281c1c + last_write_checksum: sha1:2dfb1be1e57d3c48c0a5df7c642212e572731b34 + pristine_git_object: fd52cf921a5db428757407e216c918853f5e67cb docs/models/connectordeletev1request.md: id: 8d5621ba6395 last_write_checksum: sha1:881b88b2e0788f7c16938115a6cada5f0ebe144b pristine_git_object: e50c7296f28bbf48daf724af3c848a50e8424ad7 + docs/models/connectordeleteworkspacecredentialsv1request.md: + id: 058a4c7be62f + last_write_checksum: sha1:c5185ed84e0f26596bcc1c573009d694a064f21f + pristine_git_object: 3bc3d7c9e7f25bb3ee716e0fc9011dfa40b844c5 + docs/models/connectorgetauthenticationmethodsv1request.md: + id: 50edde04fff0 + last_write_checksum: sha1:78305fe0052b6b90036ca72302a42dcf9093e3d3 + pristine_git_object: 3a62c0106481edc9d8137689c4d7d7649f812397 docs/models/connectorgetauthurlv1request.md: id: 8a02a6af19ab - last_write_checksum: sha1:ab5433de19756f65450c4fa140a97198f35863dd - pristine_git_object: d041e0c23890973aea61f03901c73caf87d21e5a + last_write_checksum: sha1:517c82f877bbcb4b5a34404cfa9cc51897fc14ed + pristine_git_object: 7d6b94ff09be0d4bf2f062fa039551ab0735fc13 docs/models/connectorgetv1request.md: id: 844c1f489684 last_write_checksum: sha1:e36ac8ff28ee258340868f8aa4f3172ed3b82ef3 pristine_git_object: c45148b97aad128744e0e6ccebb00bf22d400eff + docs/models/connectorlistorganizationcredentialsv1request.md: + id: cc1870566c72 + last_write_checksum: sha1:9f5c605b6bd07b3e9ffac5ae5e61e97e00ea4464 + pristine_git_object: bb1f1c3a5c0fe7d307951c9179c13192f19afb8b docs/models/connectorlisttoolsv1request.md: id: 43698382d3c4 - last_write_checksum: sha1:3c6e01a8fa0283300f3801bf7022599d75d12162 - pristine_git_object: e080455b986aa3aded7613a5654636c1188085d1 + last_write_checksum: sha1:e2ec4a2b6b595941890d400817ca38f996a441e8 + pristine_git_object: e9c2137429509ea9edf43a5f9329208103c2bd11 + docs/models/connectorlistusercredentialsv1request.md: + id: 721da447813a + last_write_checksum: sha1:ef52fd446896bc737782e5c17e2051dbeda4f0f1 + pristine_git_object: 63ec93d546bbfe15823c161af79dcde0b1552b25 docs/models/connectorlistv1request.md: id: 68b7a11faff6 last_write_checksum: sha1:e08effc0f17a95383c3ba96b06b1dba80f4dc767 pristine_git_object: 6b9a287ead2996c402ade5c18368eaff92c76b2a + docs/models/connectorlistworkspacecredentialsv1request.md: + id: c7f5827917c6 + last_write_checksum: sha1:63d4585f79ff1144e691b48ceada5d76d74b01cb + pristine_git_object: 45e90077d22f6d9caf4a8f9ab1889c5c39c82e53 docs/models/connectorsqueryfilters.md: id: d6fb981cad1e last_write_checksum: sha1:3a33088e1e9332318aff437fba7d01239d417d84 @@ -882,6 +938,14 @@ trackedFiles: id: 8935b2ed9d13 last_write_checksum: sha1:c00abfe1abb0f0323e434b084dafa0d451eb3e51 pristine_git_object: 71562806dbec6444dcdd0a19852a31ca00b6229a + docs/models/credentialscreateorupdate.md: + id: b2a0e87b0a91 + last_write_checksum: sha1:6b778120a84c08601b4f2fbba368d3454204d939 + pristine_git_object: c544d7c60332c29fe2c91e8af17282ca689537e2 + docs/models/credentialsresponse.md: + id: 20dd6478c581 + last_write_checksum: sha1:3150b304dcef82b0f1d18b6a33b48e22899a406e + pristine_git_object: 0cd5b336ca1cb55d54a123c283fdbd957ebb1588 docs/models/customconnector.md: id: 7bcc77607afa last_write_checksum: sha1:ce9e8ffac3f83e08269fbed5d2dffbfeb9f8649a @@ -1494,6 +1558,10 @@ trackedFiles: id: 74bd521abc26 last_write_checksum: sha1:a4efe4ff8c52137af47d6ab750d1d2f7cba77e7c pristine_git_object: 72a586bc65f6219abed50105d9df9cb8b6ec8d02 + docs/models/ingestionpipelineconfiguration.md: + id: 95a1d6bf413b + last_write_checksum: sha1:d13948eacf546bd07a8cec91381536c28277144a + pristine_git_object: 5d25ab15ea52894ac28e39e8870bc8fb8043b6ed docs/models/inputentries.md: id: a5c647d5ad90 last_write_checksum: sha1:4231bb97837bdcff4515ae1b00ff5e7712256e53 @@ -1812,8 +1880,8 @@ trackedFiles: pristine_git_object: 537269f7e774b31c45ac75c82c096530c0bd2b4e docs/models/listrunsv1workflowsrunsgetrequest.md: id: 132927390b33 - last_write_checksum: sha1:5ec52640c83f0d560dc8efb39afc50317fa2e31c - pristine_git_object: 259876c68b0c9b5684b3c565b3df4bb3430a76b6 + last_write_checksum: sha1:ac1d4705c77aaf9f96cb97305a3c45da43b7bbdc + pristine_git_object: 319d9ed5923c9e84221f31fb74d82f557b902c9c docs/models/listrunsv1workflowsrunsgetresponse.md: id: da55980ef20d last_write_checksum: sha1:e176049e48a9f78b47be166b6dc8f47bca3e7da7 @@ -1982,6 +2050,10 @@ trackedFiles: id: 44842604e405 last_write_checksum: sha1:50e09dfa5ed838df4a760358c6bf81c04da4910b pristine_git_object: 71e38615fada1e4f3b10e669eb3d8a6b768aa268 + docs/models/oauth2token.md: + id: 409bc5ff306f + last_write_checksum: sha1:cfa4eca0c2a099adf3d365d2bda4fe026d6dc36d + pristine_git_object: 59716ed683a8749e86c05b9c6b161900dafefb63 docs/models/oauth2tokenauth.md: id: f23959dcc4b0 last_write_checksum: sha1:ca434f8479c3f5e868db1269e86efa5e0d9070e2 @@ -2134,6 +2206,10 @@ trackedFiles: id: 1391892fce0a last_write_checksum: sha1:4a82fc483f090e4fc09d19a3f2c0f2a2e022cf3f pristine_git_object: 36b58e9aa80a53dad530cad93fb1d565fdd03b59 + docs/models/publicauthenticationmethod.md: + id: abfb51fdf794 + last_write_checksum: sha1:58c5f7fa4f5ea2eddad8702b87b9af1dd8fa89ac + pristine_git_object: c98413b62ac80443aff52ce344dae41e46012745 docs/models/querydefinition.md: id: 4831b7e558f9 last_write_checksum: sha1:f4983c0963906b3eda13c69e2852b08d662dd744 @@ -2490,6 +2566,18 @@ trackedFiles: id: 6ce2d6cbea6b last_write_checksum: sha1:d296899e9a5fb160925a36382dee30dbe959a106 pristine_git_object: 6061df8649c32a4c4daea648223525a9f870bb2a + docs/models/tempotraceattributearraycontainer.md: + id: d47f0c8b6956 + last_write_checksum: sha1:9e7bb43dbf6f4176284ef5985f8fbbea8efccd5f + pristine_git_object: 049dce7d7b8b7da965af6629e45be77e81aa4302 + docs/models/tempotraceattributearrayelement.md: + id: be9d9005df77 + last_write_checksum: sha1:e970ae3b60c1adaf0bb79e109ec675338f2095de + pristine_git_object: a4b8208099ff361160ad3c403f427eeb5fc143e5 + docs/models/tempotraceattributearrayvalue.md: + id: 619f60780ece + last_write_checksum: sha1:889052cfcc2f44c882bbfe32cfbaeb104b9927f4 + pristine_git_object: b763756f99de3f53af5916c92585ea3b8a09ddba docs/models/tempotraceattributeboolvalue.md: id: 0e2767bf14da last_write_checksum: sha1:6e09bcab345a7cbe376c41fd20955017f54243bc @@ -2504,8 +2592,8 @@ trackedFiles: pristine_git_object: 61e7eb8ac7f91e718e85fd46b7298095300821f5 docs/models/tempotraceattributevalue.md: id: b5a74866dcac - last_write_checksum: sha1:30a7d69df2775d18e110e20dcd6956359a065b54 - pristine_git_object: eb448c3b039475cc18de097e2d90f5700aa136eb + last_write_checksum: sha1:2acdf3c2c1c7e163ded5d12c51eb649f2a11b95d + pristine_git_object: 3b0a18692fce0a107217c3f274626ece86f22aa2 docs/models/tempotracebatch.md: id: 1a73bb7f3ee0 last_write_checksum: sha1:778e8837929ee817567c02653ae9daca8d564ea7 @@ -2876,8 +2964,8 @@ trackedFiles: pristine_git_object: 4ca7333c412ad819e3e02c61debe402e3f9b0af9 docs/models/workflow.md: id: a782201b7327 - last_write_checksum: sha1:0a6dbea734dc94626fb53ab37c619fef48b9db63 - pristine_git_object: 4b245e07d66418614e4eadf09bf6203254f0d91e + last_write_checksum: sha1:b633fce77c3d985b73268fadf161e6ab790e4970 + pristine_git_object: b1765cc45eb62883640c9e7d7e47345fcdeaf819 docs/models/workflowarchiveresponse.md: id: e952228d4f02 last_write_checksum: sha1:49dbb8dd7c8b3a2442de072bd45244540c79954f @@ -2888,8 +2976,8 @@ trackedFiles: pristine_git_object: a534ad34da32c4d8eb93f055e1bbf128c5df7e8a docs/models/workflowcodedefinition.md: id: 16ce7d540f36 - last_write_checksum: sha1:35fce15dd70e7c8eb85b9f54919cca1b0a0e1dcb - pristine_git_object: 2034f81fff68465c568b5d189086094c5635bff8 + last_write_checksum: sha1:96703471ed4249c118cd0d2563182f9300e3bfc9 + pristine_git_object: f8cf3bbd5a9d0aad13daf38d140ffbe9c3df825f docs/models/workfloweventtype.md: id: 0ea616e53d9b last_write_checksum: sha1:97e9654b44b627a610b3a30f14b3dc56dab1d725 @@ -2928,20 +3016,20 @@ trackedFiles: pristine_git_object: 222fbfd75c79bf9868b04affab9d2708f5942f64 docs/models/workflowexecutionlistresponse.md: id: a66878b279ba - last_write_checksum: sha1:fcdc0fa6d385ee938df2127c7026a93634bccacb - pristine_git_object: 3fe61f60d02bb479666a3e589c27c358eb2d4e03 + last_write_checksum: sha1:9fafefc730d10ae17baf0c77462f658f9f15fdcb + pristine_git_object: 0434e94872c5989925f698380b725bfa1c48a00c docs/models/workflowexecutionprogresstraceevent.md: id: 143ceb0718a6 last_write_checksum: sha1:9878b118897957dd4b92163966ea4199c29bc5ff pristine_git_object: ac50a894e5290f07d8531e25663baae090cf533e docs/models/workflowexecutionrequest.md: id: 44a6d9ef046a - last_write_checksum: sha1:fafbe0ccef730faa8a1689ff7525fb439e77dc48 - pristine_git_object: 54f61ea35422b37fa529e0602a338e0248c05f39 + last_write_checksum: sha1:7b89fdc9aad5d00d0bdef187cc59dc89377b780f + pristine_git_object: 08b584f940a741d661be0b4c8df114d018c9ccb8 docs/models/workflowexecutionresponse.md: id: 73595cfc443f - last_write_checksum: sha1:3861cb1972cca17c595d1eb23518bfa54c382e89 - pristine_git_object: e414c47eb7a01e677cef6cc3ebda77fd28566450 + last_write_checksum: sha1:b2aacb271ca655f622ba0c724971620814e0272b + pristine_git_object: 03f1010030defa48eb7d3f98189baab9ff7b1bfe docs/models/workflowexecutionstartedattributesresponse.md: id: 384d48b3e104 last_write_checksum: sha1:be35194c22fa533235fe930bf9aa83acd5b8ca40 @@ -2964,32 +3052,32 @@ trackedFiles: pristine_git_object: b6bb388ca18523ca9b682e5bc4d4cf1c95100fa5 docs/models/workflowexecutiontraceeventsresponse.md: id: 4242880e71fc - last_write_checksum: sha1:52585c82f6588ee57520355320c156348f694695 - pristine_git_object: a0e6e4867f9d3e98b1f34a4f7c9462bd90ae7ced + last_write_checksum: sha1:e240be5e6d57636189c0648f749ea7c2bb1b18bd + pristine_git_object: d24dfcaf0cb9f0c1519b5057263dcb839b61f275 docs/models/workflowexecutiontraceeventsresponseevent.md: id: 40012f3fc374 last_write_checksum: sha1:b7b2a4544e04bda359d226efc6ae4247678bda9a pristine_git_object: 81c4f573a5af75f2ea8356f8bf23da676700ab8d docs/models/workflowexecutiontraceotelresponse.md: id: 358cf8c2556f - last_write_checksum: sha1:b0a9f0bf2236d86d1a6863c2bff41bf58058fa47 - pristine_git_object: 6218877661371cfe62fb4d24fd3a56fb21c77591 + last_write_checksum: sha1:8a518835d45e407d39893fe1493e24bb5931dd86 + pristine_git_object: cc4ff9cab9673bdce6ab31e930224490ad78f6c1 docs/models/workflowexecutiontracesummaryattributesvalues.md: id: 50e4fbfd4cf6 - last_write_checksum: sha1:0486340bda63ec19ddc32dfc49520a4946847321 - pristine_git_object: c01a122f81fd7bcd6c00a746bc5705c66261bdc6 + last_write_checksum: sha1:ee33a4345041c2d8529049f0d04efb410ead4f64 + pristine_git_object: 04bd34abb60485a9fe252a3c3cb125570f6fcc27 docs/models/workflowexecutiontracesummaryresponse.md: id: 5ac68ea4a1a4 - last_write_checksum: sha1:3db91df0b8a7404d5fd0ca7e43554cc7e330ac8b - pristine_git_object: 3c1ab0e51584fae9398d6d9fb64dbc03149f2f5b + last_write_checksum: sha1:57899967680f72b2093c5a1add7fd4e598bc38f5 + pristine_git_object: c0380e7893e43ce2f5e4bef048efb1061ad93fa5 docs/models/workflowexecutiontracesummaryspan.md: id: 3851de52d638 last_write_checksum: sha1:528371799a9c90c9ddaf5315c2d33b89320688b8 pristine_git_object: 8ee487a2091161e674db28a7919d0d3d4cb57e32 docs/models/workflowexecutionwithoutresultresponse.md: id: 612e2645e3a3 - last_write_checksum: sha1:42a987056a79fccc0bf262e46214f5c2f875736a - pristine_git_object: f74414a66874be98f9a7c3ddaf938a0d9c0a598c + last_write_checksum: sha1:a62d8b840c5c769f61ec6e6af3b06dec3aecb044 + pristine_git_object: 47d795898cda1c2ce875b5f46f740d2f6c708c59 docs/models/workflowgetresponse.md: id: aa8fca163259 last_write_checksum: sha1:eba9585e94ebc141c43d39689c31997083dcb615 @@ -3068,8 +3156,8 @@ trackedFiles: pristine_git_object: 68faf7c0932990ae52eb0ff627544bd76bcb1545 docs/models/workflowwithworkerstatus.md: id: 81265aadaf0d - last_write_checksum: sha1:f426a9a3a9ba4ded4ab8f330509b12c7a13e0408 - pristine_git_object: ac6efb9c006c95ffcd50a72710c86140ace4d2c4 + last_write_checksum: sha1:907f0ec1a157e36e002ee5088a2ee1519688e230 + pristine_git_object: daa637fafd39b03b9d6c0b627047be1142f060cc docs/sdks/accesses/README.md: id: 2ea167c2eff2 last_write_checksum: sha1:663516c8c94ca324b938a5d5bd1196663cb1de88 @@ -3104,8 +3192,8 @@ trackedFiles: pristine_git_object: dc0f4984380b5b137266421e87a1505af5260e89 docs/sdks/connectors/README.md: id: 7633a87d946d - last_write_checksum: sha1:fca5196bf515725bb1a75bbc1db99dfc414f62d6 - pristine_git_object: f4a0a09713bf1f1e4d3e7fb7c4479415f79a9dc0 + last_write_checksum: sha1:621a1e3c33c06d38cef7f0c446c8fff3b220f3eb + pristine_git_object: 67005b8f11e68e236e57a5558d4d7a206f9a4fa6 docs/sdks/conversations/README.md: id: e22a9d2c5424 last_write_checksum: sha1:e0b78791f14b76d486688c5aa829877d58ae36da @@ -3150,6 +3238,10 @@ trackedFiles: id: 03d609f6ebdd last_write_checksum: sha1:2d7ff255c1462d5f1dff617a1993e730ec3911ea pristine_git_object: 4262b3a9833180ce86da43a26ee7ab27403f2cd0 + docs/sdks/ingestionpipelineconfigurations/README.md: + id: ead2af7afd1c + last_write_checksum: sha1:27a44e0a0e7ef48fa3053c975d15e5012bf8e13e + pristine_git_object: 30457be25c61740bfccdcb06e91aaaa7eb0076d9 docs/sdks/judges/README.md: id: 330e067ff8b7 last_write_checksum: sha1:e21c7f2201ab3e2ed14c5be687e5291f7c6ee9cb @@ -3176,8 +3268,8 @@ trackedFiles: pristine_git_object: ce8f1f689512a9eac118c05ec1e9acf17e931556 docs/sdks/runs/README.md: id: 4598fd39b715 - last_write_checksum: sha1:1b27c50c01a0754ae978b5e59252193a2bdc03d4 - pristine_git_object: 33a551c5d4d455675e22d5391072cda56252683d + last_write_checksum: sha1:20e849d15916f477bfc94f62d69c50385c0370b1 + pristine_git_object: 7ed914205115222f7ade5a656541af0dba64ff28 docs/sdks/schedules/README.md: id: 2f28c809a225 last_write_checksum: sha1:70cf78f4dd201a70da97aa86a1f5d936dfabbe13 @@ -3192,12 +3284,12 @@ trackedFiles: pristine_git_object: 97703c9b4dc942385ee04ae96cbd100c3f632a17 docs/sdks/voices/README.md: id: 4f1a657c8f68 - last_write_checksum: sha1:8ddfebe91ff50ea863d4c0bd85c75458a482667e - pristine_git_object: 3b4d135f39bdfc3237c36c03367952eae54bdd48 + last_write_checksum: sha1:88be1b4df915b0c4f50f2a54f2c7e93ffd5a5263 + pristine_git_object: 49b8533f85e2c6bf70ff1ea296136f4d18cb8348 docs/sdks/workflows/README.md: id: 80c76ce944c0 - last_write_checksum: sha1:af6d1ec6698a8d58a743d67e897910038bed299a - pristine_git_object: 324c46b14e6d1bebbfe9dda2458201cb799d67d1 + last_write_checksum: sha1:725a6a3cb83d7b7525c5cf4b426e42acf9ba81a1 + pristine_git_object: 0b804d8509311efa636df2fc39a1c79559d202ae docs/sdks/workflowsevents/README.md: id: 514b42269280 last_write_checksum: sha1:34971ab6eef89b115d78375a85142f3d2612f431 @@ -3228,8 +3320,8 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:62503452c03fc40a489df46113bd64d8fb407c56 - pristine_git_object: aa3edd4f8d0b89c2c9890781320b44a52340e511 + last_write_checksum: sha1:5052a82368babc34c9e2ea2cb8195df7532cd1a9 + pristine_git_object: e6e50dc030653f0670c788c55cc394e05b47dd7b src/mistralai/client/accesses.py: id: 76fc53bfcf59 last_write_checksum: sha1:0c417e7a0bf9dfc523dbabee816b73d7a4d52f1d @@ -3256,8 +3348,8 @@ trackedFiles: pristine_git_object: 9c6fd9c268e0d242c63277812bd0b0224ac61475 src/mistralai/client/beta.py: id: 981417f45147 - last_write_checksum: sha1:0971bda6a9024dcbdf8b4aaad1086417b01ee40f - pristine_git_object: 83b8fc8792469efbd03f0bab240d4a6dc8135db5 + last_write_checksum: sha1:1f6972862310651111b52027dd8b4c5519adadfd + pristine_git_object: f9bbb5aed59e7f9505e4bba2ee9c0190d51cf626 src/mistralai/client/beta_agents.py: id: b64ad29b7174 last_write_checksum: sha1:7b5b7ca9dd622067ee3da020687579d7974754c9 @@ -3280,8 +3372,8 @@ trackedFiles: pristine_git_object: 9fd3b3a1b28b155ee397a6edb6da106408c3bade src/mistralai/client/connectors.py: id: 39da03126050 - last_write_checksum: sha1:78489e58ca183c5db5e7c0efaf3351cf104aa452 - pristine_git_object: fc9d6319b4d321e21a7b7d73515f9d13b9ac8a2a + last_write_checksum: sha1:42df853243a50c49ba13da10061dc22cc79e473f + pristine_git_object: 0d1dc703662b401fa56e0e5ee1649292864ada1a src/mistralai/client/conversations.py: id: 40692a878064 last_write_checksum: sha1:9ca47ba2c537b019402fb38be51ebaefc8812457 @@ -3362,6 +3454,10 @@ trackedFiles: id: 3e46bde74327 last_write_checksum: sha1:0f4ecc805be1dc3d6e0ca090f0feb7d988f6eb9d pristine_git_object: 544af7f87d6b7097935290bebd08e30e5f485672 + src/mistralai/client/ingestion_pipeline_configurations.py: + id: f5a994272058 + last_write_checksum: sha1:c1fcdadd2d2fc9391dee1eb8ede14fa5ef5c5baf + pristine_git_object: e795a8ab2f4acaee98203eab16a142521d47abbd src/mistralai/client/judges.py: id: b6024a41ecb4 last_write_checksum: sha1:f79c7d8e28e343cd699cf36a6d53165cc54d8da2 @@ -3376,8 +3472,8 @@ trackedFiles: pristine_git_object: 8c132926e570f913fe57f77d2e8971732464c863 src/mistralai/client/models/__init__.py: id: e0e8dad92725 - last_write_checksum: sha1:f804d34792cb000093bdaf97dc89fc4330b91f94 - pristine_git_object: 34e6bdc1475b321f471f2a42236e33c7409cbf86 + last_write_checksum: sha1:0dfae1e6c946a6e411ef0d03a220df2caafdccbc + pristine_git_object: 7d175613348f6b5b6f8a16a17295dea05aeac4c3 src/mistralai/client/models/activitytaskcompletedattributesresponse.py: id: 8174941767cc last_write_checksum: sha1:8a22b80fbd7e5ea9a72a34016e68fdb4a375ed75 @@ -3570,14 +3666,22 @@ trackedFiles: id: b4d3fb07196e last_write_checksum: sha1:70f8bbaa8d72e5684eb5cda5d95c0f17ed61a8f7 pristine_git_object: fb8b79723f3f0f4485c0c6bb1c52b0a5db2fa1fe + src/mistralai/client/models/authenticationconfiguration.py: + id: 97b5056c29fb + last_write_checksum: sha1:731f7ee5fc0fce68a240341f0cf4d7aeb2313475 + pristine_git_object: c2ea5f94b966cb76ed2b20c67d624243d4bd8e71 + src/mistralai/client/models/authenticationtype.py: + id: b403278039c5 + last_write_checksum: sha1:dcd017f2e96b2d8f06a29f3d085e7f1fbc44af16 + pristine_git_object: f5827174101d03c0a2de45139f76c22af7a11b6f src/mistralai/client/models/authurlresponse.py: id: a2b468c87a8a last_write_checksum: sha1:8ffc0c770c51d7b0cb49770e6829486d0cb82741 pristine_git_object: 1f5a6639b3fae3a5c96cf35bc4417d5d5151a37f src/mistralai/client/models/basefielddefinition.py: id: ffa42818fea3 - last_write_checksum: sha1:a323bc4117cecf4ffcb228cf896e7ceae02f9b6d - pristine_git_object: acf9cf8d6fc3220f736b7c6cfe32d42425febd2a + last_write_checksum: sha1:daf1a595cf333e7ee53378849430e79aba1d253a + pristine_git_object: 2b45183d4d4727551377e12615d216dc8a64f62d src/mistralai/client/models/basemodelcard.py: id: 556ebdc33276 last_write_checksum: sha1:1a1d261bad5394f01bbad562e8eee941014b7d9e @@ -3746,38 +3850,86 @@ trackedFiles: id: be202ea0d5a6 last_write_checksum: sha1:b0c6896368230fd499799cc42b25f9fd51a4d0a1 pristine_git_object: b91ec9dfd51b8e6fa208ef54dc2a22437df3a22d + src/mistralai/client/models/connectioncredentials.py: + id: 2f4a79b452fb + last_write_checksum: sha1:2183abeb08ce54a985d531baac5f67b84f42417d + pristine_git_object: de461057f967b4dbd746cc82321fbed4afbdf145 src/mistralai/client/models/connector.py: id: 1a4facac922d - last_write_checksum: sha1:2648e3e1647fa9ae857961ccda8b0f5f36a6cade - pristine_git_object: 55730274eaa98e7aa53d04ba4b9006a61e427740 + last_write_checksum: sha1:86f06a14b64400dc9994b198fd1dff2a2e8ada03 + pristine_git_object: e7b83ed4167acb3bef2d4c985f095ed92d075f91 src/mistralai/client/models/connector_call_tool_v1op.py: id: 7948899b3068 last_write_checksum: sha1:c4388ac1594641c36f97daaedcf42b0e94753be7 pristine_git_object: 9c77123e18a86efaa7c0055e0c2a1a7226e7ffd9 + src/mistralai/client/models/connector_create_or_update_organization_credentials_v1op.py: + id: 57c711e81d89 + last_write_checksum: sha1:19d272c21834d9273aae754bd821fa5f252c24e5 + pristine_git_object: f66d73d3822fee42507625e5ba1b1ba75c4fda4e + src/mistralai/client/models/connector_create_or_update_user_credentials_v1op.py: + id: 6ededc839b03 + last_write_checksum: sha1:26b00ed504ad3dea28e1ef521bc6ca3d23763211 + pristine_git_object: 338d4f3923cb85adccf725f24235bd6b94d26075 + src/mistralai/client/models/connector_create_or_update_workspace_credentials_v1op.py: + id: 7795b085704b + last_write_checksum: sha1:70bffd65c359d4c295b0f4a419d5a783d50e03ea + pristine_git_object: 43b3c1dc6576d9d9260a220097f52b51029e205a + src/mistralai/client/models/connector_delete_organization_credentials_v1op.py: + id: aab3a70dbbc5 + last_write_checksum: sha1:a53123b18f8dd5a33e777741ab44aac0d5ed64ee + pristine_git_object: 6cdb0c31f9a3d13ee87336fafe85865da6cfcf7e + src/mistralai/client/models/connector_delete_user_credentials_v1op.py: + id: 8bf2075ebdbf + last_write_checksum: sha1:9fbbc77385a362f9a03f9fdd6110d7e77854d16f + pristine_git_object: 40d25aabfd4c0e2c980782afa6cc5c059441045e src/mistralai/client/models/connector_delete_v1op.py: id: a377930b1435 last_write_checksum: sha1:2c9a501ab2e2b05829f2e3fd838f88a610d56781 pristine_git_object: 74134361aeeaf83af57d7edc7d9ae26ab09d96fb + src/mistralai/client/models/connector_delete_workspace_credentials_v1op.py: + id: 4f0993c25ece + last_write_checksum: sha1:d928043c07daf8e170649473bd6cb36b1c928805 + pristine_git_object: a746ff5e09af76bf2aa4135b5fc675c816a8941f src/mistralai/client/models/connector_get_auth_url_v1op.py: id: 2e6b9ab43d1d - last_write_checksum: sha1:97d50ce0011177c9033bb436929fda3ee6109d61 - pristine_git_object: f8f5fd783243a7b6d5b1f14bda2fd6e8c3c43f2e + last_write_checksum: sha1:ad08ab3776eb111a5feac74d06a98c6b7bd9d9d5 + pristine_git_object: 10f42827ca82eb227fc760e1edb806438b745a15 + src/mistralai/client/models/connector_get_authentication_methods_v1op.py: + id: 6861e4d57959 + last_write_checksum: sha1:8114ef46326cfcdadbbcc73fdcdc9ab52f3d8e0d + pristine_git_object: e0c4146d4621eec51f6961f85de95088e7480c08 src/mistralai/client/models/connector_get_v1op.py: id: 73ca3a446dcc last_write_checksum: sha1:74ce85c377be5d7f86506d8a8d97249708c246b8 pristine_git_object: 780afac9281bf78c4263c7bd32faa04a718695d2 + src/mistralai/client/models/connector_list_organization_credentials_v1op.py: + id: a52ee058feab + last_write_checksum: sha1:57cb81c3a5744f83aba43cd35f358e9b0e132c2d + pristine_git_object: a20fa2a4fc5a5809428460a592a81db3b23a8ec5 src/mistralai/client/models/connector_list_tools_v1op.py: id: 4c6ad704479b - last_write_checksum: sha1:3d509db411bf04de04d21360fd2c98cd7adce855 - pristine_git_object: 030ffb2c8f8423d840147bbc7f45f623ccfe3731 + last_write_checksum: sha1:8af274c0304af97a649137075b4fea4acadeb434 + pristine_git_object: 3e9905c30d02fef3e73689b2e8968462dc4b36fa + src/mistralai/client/models/connector_list_user_credentials_v1op.py: + id: 106e8fba762d + last_write_checksum: sha1:7f706dda1feb8a433370bf28dbe6511825a9ae71 + pristine_git_object: 5b47ee83a1608f0dd5e953a69a0e08b0744bf596 src/mistralai/client/models/connector_list_v1op.py: id: 5ec0889995f5 last_write_checksum: sha1:17c0a5965d058a4aacb891d37db3481a907ff091 pristine_git_object: 3cb31bf7fe0b814606b4bbdfbf7e5cbf733984bf + src/mistralai/client/models/connector_list_workspace_credentials_v1op.py: + id: de7c431e8a54 + last_write_checksum: sha1:f13cfb7cffc9ac054a65657c6cb61a284099e6a1 + pristine_git_object: ef0f096e6c05bc63511bde38317f95572b471b8e src/mistralai/client/models/connector_update_v1op.py: id: 6f884d18ac56 last_write_checksum: sha1:be8044958ac76ecfc486dc5cb5f0876e595dcc38 pristine_git_object: 6b00d0b0ca6d83b4ac1fce1ab204ac09ca5ceeb5 + src/mistralai/client/models/connectorauthenticationheader.py: + id: 7271f22f39b0 + last_write_checksum: sha1:0811c183ba11289f038860270ccf622ca51b0a6a + pristine_git_object: 5fc073f040c9fae143383077747e5fad8799a2e7 src/mistralai/client/models/connectorcalltoolrequest.py: id: 7dc7ec295301 last_write_checksum: sha1:8af4bd44caa8ad09180139e7e8a68052c16dce11 @@ -3914,6 +4066,14 @@ trackedFiles: id: 1c489bec2f53 last_write_checksum: sha1:edc78f755094546142934c99ee3a97817e023520 pristine_git_object: 28dda0cb8c5ba2462ed0f68f19747447c6ae401b + src/mistralai/client/models/credentialscreateorupdate.py: + id: 9927546f2487 + last_write_checksum: sha1:e31d3c7fc19e2a7fb49d07cb6f85c5ea73aabb98 + pristine_git_object: 0766a4d3226231936feb478187cf0de3a7af7d47 + src/mistralai/client/models/credentialsresponse.py: + id: 80cc6fb316f9 + last_write_checksum: sha1:73099f8280c3e753d693edb24f773112fefa6538 + pristine_git_object: 4c6a41abca469df0d1dcd92858461b07375a06c9 src/mistralai/client/models/customconnector.py: id: 14f3643f7703 last_write_checksum: sha1:2162c7e4b3a9c747c5da88e72315d138f28dea5d @@ -4466,6 +4626,10 @@ trackedFiles: id: 8d809b14b144 last_write_checksum: sha1:3c858d0475e826d072c96a84d868e97593a399a3 pristine_git_object: f5bd720db16c37504e1993cc6e651712551d2612 + src/mistralai/client/models/ingestionpipelineconfiguration.py: + id: b4746c0f2c1c + last_write_checksum: sha1:3f2f9354886721ec9d6f79dbd8cc8d991ccfc639 + pristine_git_object: 5aaa6a40e03f9ef95258fde6cb66b96687359f29 src/mistralai/client/models/inputentries.py: id: 44727997dacb last_write_checksum: sha1:9e2a776be59c5043ea4179a60ac082faf064cc3d @@ -4696,8 +4860,8 @@ trackedFiles: pristine_git_object: 1a42d9b0828a2e826948641a7b8be3e5d80e94db src/mistralai/client/models/list_runs_v1_workflows_runs_getop.py: id: 2f1b225158c3 - last_write_checksum: sha1:50ac1b78fd3397604cb8d90118c16bb17f6da798 - pristine_git_object: e61140cf55f1284db81359eabc9d9860e2477ea9 + last_write_checksum: sha1:2c2e900a0aa6336031ac08a73ae2dc6fa335e644 + pristine_git_object: 3237a29abcce0972fdc4613ffcfa38eea5e2a0e9 src/mistralai/client/models/list_voices_v1_audio_voices_getop.py: id: 6b3ce5be1294 last_write_checksum: sha1:f11a5135ce79d1913db87f9db7d05b4266630b20 @@ -4870,6 +5034,10 @@ trackedFiles: id: 6dc5321dbe77 last_write_checksum: sha1:5a99ca47003b7bcfee48753dd4683a94eeee1fe1 pristine_git_object: 70d9241431ae75d58435965be03089ab8419d32f + src/mistralai/client/models/oauth2token.py: + id: 6153dd0f41bc + last_write_checksum: sha1:01476e43abf5a755d7d8a3f42a7b662cbb37a949 + pristine_git_object: 0887216bdc99f6cddecfcb48881440b35a48fca6 src/mistralai/client/models/oauth2tokenauth.py: id: 167c3b8a104e last_write_checksum: sha1:146c4ce3a29c0bedcb575cf7fa32cb97aa375c5b @@ -4994,6 +5162,10 @@ trackedFiles: id: e6be33f2cd2d last_write_checksum: sha1:aa71bf6de6316b8754fb18f897b30051a2d4c70e pristine_git_object: 2c5186c02f6b463c12fd7819637b52c8c7ee4cd7 + src/mistralai/client/models/publicauthenticationmethod.py: + id: 545ab7f24523 + last_write_checksum: sha1:34851f4831b0bd8fbe4f6f53cdb642d4d0df54b6 + pristine_git_object: 3351b432a777ca2f584040f9f2968ceefa050979 src/mistralai/client/models/query_workflow_execution_v1_workflows_executions_execution_id_queries_postop.py: id: 73826dbd3f5b last_write_checksum: sha1:5105618697e031bae45cf9f6d7c5227d9c08f155 @@ -5252,8 +5424,20 @@ trackedFiles: pristine_git_object: 8575b95430e10a9b8d7e1df0f0e131cda68bb685 src/mistralai/client/models/tempotraceattribute.py: id: 7d0ec3402dc0 - last_write_checksum: sha1:6d75f1b8a97ca30fbd0d4c56a0e9a42a15c0df5a - pristine_git_object: 71c1b1f2ebb6a8211693d7b58d83a7fee9854cc4 + last_write_checksum: sha1:663896264ac81d443679ca397fdad95a96683455 + pristine_git_object: dea530ea8fc2ee80d5218b3e1437b23fa94daf4b + src/mistralai/client/models/tempotraceattributearraycontainer.py: + id: afca3b2e0b21 + last_write_checksum: sha1:b4f8414e509c84ca90f2d859f222a313b9948b39 + pristine_git_object: 082060373b99b74bfe6c29a30048758f3023bdcb + src/mistralai/client/models/tempotraceattributearrayelement.py: + id: 4f3b1d9264a3 + last_write_checksum: sha1:d1922dd0b17d26b2aa0e4858a35a90662ebba626 + pristine_git_object: 6fa0ec60f028712573e8947ef2d34e526c64ef81 + src/mistralai/client/models/tempotraceattributearrayvalue.py: + id: d75dd416f9e3 + last_write_checksum: sha1:47995b569301c6d8b7a6ca1ad8c04717f16d0868 + pristine_git_object: 95fe337ec35bc6fe4161837b7efe5ff3a59e7cf3 src/mistralai/client/models/tempotraceattributeboolvalue.py: id: c7c383a6c05f last_write_checksum: sha1:a40945504a6845a3e43a80d5f901af9f5c5ee96b @@ -5568,8 +5752,8 @@ trackedFiles: pristine_git_object: f82b6ec1c89cae83ea21d9bae12a1984679262ae src/mistralai/client/models/workflow.py: id: 1548cd73984e - last_write_checksum: sha1:14e1db57af8784d77633d7dc1d22198f2377909b - pristine_git_object: 5edf326ce15c6496607fd15f6362ca7aa1936de7 + last_write_checksum: sha1:fa55b0742593b2b6a4c1bbd688f39b50449746df + pristine_git_object: 2eeac0dcb9d482774b6323b8c0750327b668bf89 src/mistralai/client/models/workflowarchiveresponse.py: id: 64c479b7f9da last_write_checksum: sha1:7e14d02314fcc8dab22a6a908f89122491449151 @@ -5580,8 +5764,8 @@ trackedFiles: pristine_git_object: d2f3db1fb851353d21ce5bbec5e8d2d4b9afabfa src/mistralai/client/models/workflowcodedefinition.py: id: 36fd5b898ddd - last_write_checksum: sha1:70e771dc21affc971eb01de18d3c439c1f3cc8c5 - pristine_git_object: f71b9ff1885114e764665d2620e5c3fc01862ff8 + last_write_checksum: sha1:bd77f4a5e5b32892f806278bcd6dc2d951f10629 + pristine_git_object: 84444ce61006301fb145cc2fefcc577d7a2dc1fe src/mistralai/client/models/workfloweventtype.py: id: b4aeeb03b57a last_write_checksum: sha1:451a78dadc17941f397d73ff83c14d552f7150d7 @@ -5620,20 +5804,20 @@ trackedFiles: pristine_git_object: 687d33a9199612bbb8b5db5f6d2be2421469aeb5 src/mistralai/client/models/workflowexecutionlistresponse.py: id: c2b2e1ab4821 - last_write_checksum: sha1:e264605252d0dc594cafea0e4713015cfa7ca925 - pristine_git_object: 442ed9728bcf2c09fb051b892a7a226b7921e993 + last_write_checksum: sha1:0993e22cc42af96754b46ce7e880b4beb28988dc + pristine_git_object: b992bc8e6656b14122bad4996fa2137363a3afca src/mistralai/client/models/workflowexecutionprogresstraceevent.py: id: 6ea7078aaca3 last_write_checksum: sha1:5af64f5a2d76bde2a1a51e3b543db894c2045a44 pristine_git_object: ffebdb82a1a80d1d086b919da9b33e2f090388c4 src/mistralai/client/models/workflowexecutionrequest.py: id: 806340497ed4 - last_write_checksum: sha1:5270ee18d5eef0a52762ade3d207a8bbaa154f72 - pristine_git_object: 615276d30bf6131df5415a9d1d0476a0a3e16521 + last_write_checksum: sha1:ca40b6f0bc818b277af8a1443b2b728c7a64708e + pristine_git_object: e878b2f4f0eb38d614787ac6d700e70075c3820f src/mistralai/client/models/workflowexecutionresponse.py: id: 758786637be5 - last_write_checksum: sha1:2544bf94e8d64a9bd33f37ff4737f320fcd84733 - pristine_git_object: 84398375dde630f5aa2dd6363bb3fff43c1766f3 + last_write_checksum: sha1:1a06785d691c7bdc9e5d1fe4e2a4e3d5e2d3b96b + pristine_git_object: 83179054bf4ca0e3da6be1644fcb32680a4c43c7 src/mistralai/client/models/workflowexecutionstartedattributesresponse.py: id: d2276919a895 last_write_checksum: sha1:5861816b3b992c9a7e2dd044b56307d677f2fc10 @@ -5656,28 +5840,28 @@ trackedFiles: pristine_git_object: f74cd5ab6aeadf662e90a46b394621a631602372 src/mistralai/client/models/workflowexecutiontraceeventsresponse.py: id: 94d92762ccb7 - last_write_checksum: sha1:2cf2e1cf393c7295af7b32194211b5ff41c6946e - pristine_git_object: 0c24a1eaeb338b14da62ed40a4a7e67e631e1589 + last_write_checksum: sha1:2d46b00c374d7590802c60abee6ea69d1d999ed1 + pristine_git_object: 22853e9b01dea9917dfb6291feb36b32f1e65850 src/mistralai/client/models/workflowexecutiontraceotelresponse.py: id: 7531bf461dc2 - last_write_checksum: sha1:eff6ffecd0fb5643747ef9f87c4c4a6a499c0035 - pristine_git_object: b4320b8324c712380acda8edbc1fedbe49954c73 + last_write_checksum: sha1:284b6d7b90576638656b3493e5ba7429a56fe9c5 + pristine_git_object: 46f5404e4da7d0e40199054cfb5b0dfc15ab1eed src/mistralai/client/models/workflowexecutiontracesummaryattributesvalues.py: id: 5e3448a39a40 - last_write_checksum: sha1:b9c8999af86024aaa6533aed348315326658354e - pristine_git_object: e288146db9dcaf3a7216c7e780f9c98ce75e85a3 + last_write_checksum: sha1:a59ae1b987558f478518c86f93713e174e5e8d19 + pristine_git_object: 1957662cace4c7ca9b7b892b749922a436ca92f0 src/mistralai/client/models/workflowexecutiontracesummaryresponse.py: id: 2ea199810f5f - last_write_checksum: sha1:9746a523ac969574417442960b8d814e04403e25 - pristine_git_object: d2cc7c6bdc90ed15e9091cf038e98762430d33af + last_write_checksum: sha1:8642e0396abaedb1f758df0bc06d8386c024c8c5 + pristine_git_object: 92e9a2a7b0df8a7a6ff1fff5f1aee4cdc04c51c5 src/mistralai/client/models/workflowexecutiontracesummaryspan.py: id: 750353cbd052 last_write_checksum: sha1:ba4f7ecc22fdd36aa3c11af5c1e434bb974d5786 pristine_git_object: e80db90fe890726c75f711ea2b52b3008ef949ca src/mistralai/client/models/workflowexecutionwithoutresultresponse.py: id: dd70ba8def79 - last_write_checksum: sha1:38435a2f9f21037122a13e01d7f036fcfe266e5b - pristine_git_object: 082653c8e7fb5a6830e1457d629991cb9a9d4d56 + last_write_checksum: sha1:c6952b7163b972a0beb868b4407b3780f7ecbbd8 + pristine_git_object: 5e7fe8528de081b2366584af49ab954b93aeea0c src/mistralai/client/models/workflowgetresponse.py: id: 230f55a36ebf last_write_checksum: sha1:935cfce50db82d85ac0e246736c8939bfb015da0 @@ -5756,8 +5940,8 @@ trackedFiles: pristine_git_object: 3336e448baf9f21cf5bfd1369e6268ea3a7d5e24 src/mistralai/client/models/workflowwithworkerstatus.py: id: e1055203af7d - last_write_checksum: sha1:57d7ac9a4e19ddb50d8dad4c2d68695c1c2acbb7 - pristine_git_object: 7f469007b8ceb86f2d4faa09d3335ac874a6fe24 + last_write_checksum: sha1:26d8e9f584293e324a10953cd9aff57644277fb7 + pristine_git_object: 81030e21fe08c8ac1401ac6fb0a105f985985cf0 src/mistralai/client/models_.py: id: 1d277958a843 last_write_checksum: sha1:4247baa39847450e7d4d42678b6199dc83e9f057 @@ -5774,14 +5958,18 @@ trackedFiles: id: d95cd1565e33 last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 + src/mistralai/client/rag.py: + id: 2c2b641de1b6 + last_write_checksum: sha1:d27e705578c277540b90b6a84a4669580170c64e + pristine_git_object: 091b02705ce1bd11ea3dc3602a1ebf8e29815495 src/mistralai/client/records.py: id: 10f90c990bd8 last_write_checksum: sha1:e4d0a85b402c59788843296276dd516b07311d3b pristine_git_object: a47d12c36d50f3b8cd0e56d840e1394647f887ba src/mistralai/client/runs.py: id: 4297d58aeb21 - last_write_checksum: sha1:4dfcc99df0f9951dbebedb7d124096d04f05fed2 - pristine_git_object: 08394802d34bba34d8fcd25285a8a77b5a1b285f + last_write_checksum: sha1:c4df89a6693ea4242c5b3c4f8c1d8333e918a716 + pristine_git_object: 031564ad217349dc89f1b692c438078696c06fd3 src/mistralai/client/schedules.py: id: d3b4fe452390 last_write_checksum: sha1:029d95bc3440ffd3b03a89fd045283d7ddab19a8 @@ -5888,12 +6076,12 @@ trackedFiles: pristine_git_object: 2469a9f310a37a7170b54853715274f13d38901c src/mistralai/client/voices.py: id: ab76b1377d79 - last_write_checksum: sha1:c46a418a865955ab8b72d7d2584ba9b758f75165 - pristine_git_object: c4f1a71e1da1cb4ebda3ef4fb69cbbe98370d2ae + last_write_checksum: sha1:a1b8b30045116c3149e9d1e9e79a31c4016f0773 + pristine_git_object: b95fd11d5fce3ffaede8bf9adc15335d83ae0cb2 src/mistralai/client/workflows.py: id: e2a0381191f6 - last_write_checksum: sha1:643f6debca318789195f27e7ccf9ff959d558f46 - pristine_git_object: cd34603af303f2fc50754a3850aba08678b22277 + last_write_checksum: sha1:d4a0cdc718a6e0d21ba58ad3f0e38444b8c3a5c7 + pristine_git_object: 14d0f1f6b453d6b5d1a4d9644c8fcf5fc62cf8c0 src/mistralai/client/workflows_events.py: id: 6d4f674ce8ef last_write_checksum: sha1:79816d0388e471a4bbb3d09df84794e9405cf3b2 @@ -7905,6 +8093,7 @@ examples: responses: "200": application/json: "" + audio/wav: "x-file: example.file" "422": application/json: {} connector_list_tools_v1: @@ -7986,7 +8175,7 @@ examples: workflow_identifier: "" responses: "200": - application/json: {"workflow": {"id": "7e6d5999-1f66-4311-8059-f056ead70099", "name": "", "display_name": "Clifton98", "type": "code", "customer_id": "7882a879-b763-4980-9480-235734fdf4f4", "workspace_id": "5be5bb5a-4e28-453d-b0f5-a506f3a5cd58", "available_in_chat_assistant": false, "is_technical": false, "archived": false, "active": true}} + application/json: {"workflow": {"id": "7e6d5999-1f66-4311-8059-f056ead70099", "name": "", "display_name": "Clifton98", "type": "code", "customer_id": "7882a879-b763-4980-9480-235734fdf4f4", "workspace_id": "5be5bb5a-4e28-453d-b0f5-a506f3a5cd58", "available_in_chat_assistant": false, "is_technical": false, "on_behalf_of": false, "archived": false, "active": true}} "422": application/json: {} update_workflow_v1_workflows__workflow_identifier__put: @@ -7998,7 +8187,7 @@ examples: application/json: {} responses: "200": - application/json: {"workflow": {"id": "db975768-c873-461d-b3e8-6f22f94c0b20", "name": "", "display_name": "Marilie.Keeling", "type": "code", "customer_id": "89b5718e-e6ee-4eb2-b9bd-53c5f9c1222a", "workspace_id": "2ddcd2cb-4f9d-4897-b286-e08bd0fbd54b", "available_in_chat_assistant": false, "is_technical": false, "archived": false}} + application/json: {"workflow": {"id": "db975768-c873-461d-b3e8-6f22f94c0b20", "name": "", "display_name": "Marilie.Keeling", "type": "code", "customer_id": "89b5718e-e6ee-4eb2-b9bd-53c5f9c1222a", "workspace_id": "2ddcd2cb-4f9d-4897-b286-e08bd0fbd54b", "available_in_chat_assistant": false, "is_technical": false, "on_behalf_of": false, "archived": false}} "422": application/json: {} get_workflow_registration_v1_workflows_registrations__workflow_registration_id__get: @@ -8021,7 +8210,7 @@ examples: workflow_identifier: "" responses: "200": - application/json: {"workflow": {"id": "5efd36dc-5de7-4708-a17b-492eb93650e0", "name": "", "display_name": "Torrey_Rippin32", "type": "code", "customer_id": "93950b7e-25cf-45e9-9e16-558ac052306e", "workspace_id": "61923af7-6896-4605-9c48-c7d3cacb4732", "available_in_chat_assistant": false, "is_technical": false, "archived": false}} + application/json: {"workflow": {"id": "5efd36dc-5de7-4708-a17b-492eb93650e0", "name": "", "display_name": "Torrey_Rippin32", "type": "code", "customer_id": "93950b7e-25cf-45e9-9e16-558ac052306e", "workspace_id": "61923af7-6896-4605-9c48-c7d3cacb4732", "available_in_chat_assistant": false, "is_technical": false, "on_behalf_of": false, "archived": false}} "422": application/json: {} unarchive_workflow_v1_workflows__workflow_identifier__unarchive_put: @@ -8031,7 +8220,7 @@ examples: workflow_identifier: "" responses: "200": - application/json: {"workflow": {"id": "779e3e34-c64a-493c-bcbe-6d70947147e9", "name": "", "display_name": "Hal56", "type": "code", "customer_id": "f4fbcccc-06b3-4d08-9101-3035a013990a", "workspace_id": "ded5993d-1646-4bdb-a4ba-6b4280e38716", "available_in_chat_assistant": false, "is_technical": false, "archived": false}} + application/json: {"workflow": {"id": "779e3e34-c64a-493c-bcbe-6d70947147e9", "name": "", "display_name": "Hal56", "type": "code", "customer_id": "f4fbcccc-06b3-4d08-9101-3035a013990a", "workspace_id": "ded5993d-1646-4bdb-a4ba-6b4280e38716", "available_in_chat_assistant": false, "is_technical": false, "on_behalf_of": false, "archived": false}} "422": application/json: {} get_workflow_execution_v1_workflows_executions__execution_id__get: @@ -8310,8 +8499,127 @@ examples: responses: "200": application/json: {"scheduler_url": "https://closed-passport.info/", "namespace": "", "tls": false} + connector_get_authentication_methods_v1: + speakeasy-default-connector-get-authentication-methods-v1: + parameters: + path: + connector_id_or_name: "" + responses: + "200": + application/json: [{"method_type": "none"}] + connector_list_organization_credentials_v1: + speakeasy-default-connector-list-organization-credentials-v1: + parameters: + path: + connector_id_or_name: "" + query: + fetch_default: false + responses: + "200": + application/json: {"credentials": [{"name": "", "authentication_type": "oauth2", "is_default": false}]} + "422": + application/json: {} + connector_create_or_update_organization_credentials_v1: + speakeasy-default-connector-create-or-update-organization-credentials-v1: + parameters: + path: + connector_id_or_name: "" + requestBody: + application/json: {"name": ""} + responses: + "200": + application/json: {"message": ""} + "422": + application/json: {} + connector_list_workspace_credentials_v1: + speakeasy-default-connector-list-workspace-credentials-v1: + parameters: + path: + connector_id_or_name: "" + query: + fetch_default: false + responses: + "200": + application/json: {"credentials": []} + "422": + application/json: {} + connector_create_or_update_workspace_credentials_v1: + speakeasy-default-connector-create-or-update-workspace-credentials-v1: + parameters: + path: + connector_id_or_name: "" + requestBody: + application/json: {"name": ""} + responses: + "200": + application/json: {"message": ""} + "422": + application/json: {} + connector_list_user_credentials_v1: + speakeasy-default-connector-list-user-credentials-v1: + parameters: + path: + connector_id_or_name: "" + query: + fetch_default: false + responses: + "200": + application/json: {"credentials": []} + "422": + application/json: {} + connector_create_or_update_user_credentials_v1: + speakeasy-default-connector-create-or-update-user-credentials-v1: + parameters: + path: + connector_id_or_name: "" + requestBody: + application/json: {"name": ""} + responses: + "200": + application/json: {"message": ""} + "422": + application/json: {} + connector_delete_organization_credentials_v1: + speakeasy-default-connector-delete-organization-credentials-v1: + parameters: + path: + credentials_name: "" + connector_id_or_name: "" + responses: + "200": + application/json: {"message": ""} + "422": + application/json: {} + connector_delete_workspace_credentials_v1: + speakeasy-default-connector-delete-workspace-credentials-v1: + parameters: + path: + credentials_name: "" + connector_id_or_name: "" + responses: + "200": + application/json: {"message": ""} + "422": + application/json: {} + connector_delete_user_credentials_v1: + speakeasy-default-connector-delete-user-credentials-v1: + parameters: + path: + credentials_name: "" + connector_id_or_name: "" + responses: + "200": + application/json: {"message": ""} + "422": + application/json: {} + get_configs_v1_rag_ingestion_pipeline_configurations_get: + speakeasy-default-get-configs-v1-rag-ingestion-pipeline-configurations-get: + responses: + "200": + application/json: [{"id": "bf1614ea-c74f-4b49-9415-f199d33c3281", "name": "", "created_at": "2026-06-16T10:34:55.929Z", "modified_at": "2026-04-16T03:39:05.055Z"}] examplesVersion: 1.0.2 generatedTests: {} +releaseNotes: "## Python SDK Changes:\n* `mistral.audio.voices.get_sample_audio()`: `response.status[200]` **Changed** (Breaking ⚠️)\n* `mistral.workflows.executions.get_workflow_execution_trace_events()`: `response` **Changed** (Breaking ⚠️)\n* `mistral.workflows.executions.get_workflow_execution_trace_summary()`: `response` **Changed** (Breaking ⚠️)\n* `mistral.workflows.executions.get_workflow_execution_trace_otel()`: `response` **Changed** (Breaking ⚠️)\n* `mistral.beta.connectors.update()`: `response.tools` **Removed** (Breaking ⚠️)\n* `mistral.beta.connectors.get()`: `response.tools` **Removed** (Breaking ⚠️)\n* `mistral.beta.connectors.list()`: `response.items[].tools` **Removed** (Breaking ⚠️)\n* `mistral.beta.connectors.create()`: `response.tools` **Removed** (Breaking ⚠️)\n* `mistral.beta.connectors.list_tools()`: `request.credentials_name` **Added**\n* `mistral.workflows.execute_workflow_registration()`: \n * `request.extensions` **Added**\n * `response.union(WorkflowExecutionResponse).run_id` **Added**\n* `mistral.beta.rag.ingestion_pipeline_configurations.list()`: **Added**\n* `mistral.beta.connectors.delete_workspace_credentials()`: **Added**\n* `mistral.beta.observability.chat_completion_events.fields.list()`: `response.field_definitions[].type.enum(map)` **Added**\n* `mistral.beta.connectors.delete_organization_credentials()`: **Added**\n* `mistral.beta.connectors.create_or_update_user_credentials()`: **Added**\n* `mistral.beta.connectors.get_auth_url()`: `request.credentials_name` **Added**\n* `mistral.beta.connectors.get_authentication_methods()`: **Added**\n* `mistral.beta.connectors.list_user_credentials()`: **Added**\n* `mistral.beta.connectors.create_or_update_workspace_credentials()`: **Added**\n* `mistral.workflows.get_workflow_registrations()`: `response.workflow_registrations[]` **Changed**\n* `mistral.workflows.execute_workflow()`: \n * `request.extensions` **Added**\n * `response.union(WorkflowExecutionResponse).run_id` **Added**\n* `mistral.beta.connectors.delete_user_credentials()`: **Added**\n* `mistral.workflows.get_workflow()`: `response.workflow.on_behalf_of` **Added**\n* `mistral.workflows.update_workflow()`: `response.workflow.on_behalf_of` **Added**\n* `mistral.workflows.get_workflow_registration()`: `response.workflow_registration` **Changed**\n* `mistral.workflows.archive_workflow()`: `response.workflow.on_behalf_of` **Added**\n* `mistral.workflows.unarchive_workflow()`: `response.workflow.on_behalf_of` **Added**\n* `mistral.workflows.executions.get_workflow_execution()`: `response.run_id` **Added**\n* `mistral.beta.connectors.list_workspace_credentials()`: **Added**\n* `mistral.beta.connectors.create_or_update_organization_credentials()`: **Added**\n* `mistral.beta.connectors.list_organization_credentials()`: **Added**\n* `mistral.workflows.runs.list_runs()`: \n * `request.user_id` **Added**\n * `response.executions[].run_id` **Added**\n* `mistral.workflows.runs.get_run()`: `response.run_id` **Added**\n" generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 6a7a51ce..e677629a 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.4.0 + version: 2.4.1 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 9f48eedd..610fcbb8 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -16,8 +16,8 @@ sources: - speakeasy-sdk-regen-1773084660 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:5a5b1104accc69fa8fca26e9abd7e089535bbffd20f667013984cbe9e9cf819d - sourceBlobDigest: sha256:3f88e405b674dc0f964605664fc15629b119a4481b08a5c8ac0e79dddcb19f91 + sourceRevisionDigest: sha256:292e41f215fdb501214117d66f458c91a9a6c36133876c88e33f173d64821bb9 + sourceBlobDigest: sha256:f9fde504222ac34b3d3153f507e7caf192ee8bc554bebb55c06b80f32bf1ef17 tags: - latest targets: @@ -38,10 +38,10 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:5a5b1104accc69fa8fca26e9abd7e089535bbffd20f667013984cbe9e9cf819d - sourceBlobDigest: sha256:3f88e405b674dc0f964605664fc15629b119a4481b08a5c8ac0e79dddcb19f91 + sourceRevisionDigest: sha256:292e41f215fdb501214117d66f458c91a9a6c36133876c88e33f173d64821bb9 + sourceBlobDigest: sha256:f9fde504222ac34b3d3153f507e7caf192ee8bc554bebb55c06b80f32bf1ef17 codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:4f85e638c528b022fb052ca92bb487df74eaa9fff37bc54a8bbe79474891e3d2 + codeSamplesRevisionDigest: sha256:30d5b43bf7c48844afd1bd5fd1b7b611f0096794ec716cef2a3d37165e1188e7 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.761.1 diff --git a/README-PYPI.md b/README-PYPI.md index 703095e4..b8985d3a 100644 --- a/README-PYPI.md +++ b/README-PYPI.md @@ -515,6 +515,16 @@ print(res.choices[0].message.content) * [get_auth_url](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#get_auth_url) - Get the auth URL for a connector. * [call_tool](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#call_tool) - Call Connector Tool * [list_tools](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#list_tools) - List tools for a connector. +* [get_authentication_methods](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#get_authentication_methods) - Get authentication methods for a connector. +* [list_organization_credentials](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#list_organization_credentials) - List organization credentials for a connector. +* [create_or_update_organization_credentials](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#create_or_update_organization_credentials) - Create or update organization credentials for a connector. +* [list_workspace_credentials](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#list_workspace_credentials) - List workspace credentials for a connector. +* [create_or_update_workspace_credentials](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#create_or_update_workspace_credentials) - Create or update workspace credentials for a connector. +* [list_user_credentials](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#list_user_credentials) - List user credentials for a connector. +* [create_or_update_user_credentials](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#create_or_update_user_credentials) - Create or update user credentials for a connector. +* [delete_organization_credentials](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#delete_organization_credentials) - Delete organization credentials for a connector. +* [delete_workspace_credentials](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#delete_workspace_credentials) - Delete workspace credentials for a connector. +* [delete_user_credentials](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#delete_user_credentials) - Delete user credentials for a connector. * [get](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#get) - Get a connector. * [update](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#update) - Update a connector. * [delete](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#delete) - Delete a connector. @@ -619,6 +629,10 @@ print(res.choices[0].message.content) * [update](https://github.com/mistralai/client-python/blob/main/docs/sdks/judges/README.md#update) - Update a judge * [judge_conversation](https://github.com/mistralai/client-python/blob/main/docs/sdks/judges/README.md#judge_conversation) - Run a saved judge on a conversation +### [Beta.Rag.IngestionPipelineConfigurations](https://github.com/mistralai/client-python/blob/main/docs/sdks/ingestionpipelineconfigurations/README.md) + +* [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/ingestionpipelineconfigurations/README.md#list) - List ingestion pipeline configurations + ### [Chat](https://github.com/mistralai/client-python/blob/main/docs/sdks/chat/README.md) * [complete](https://github.com/mistralai/client-python/blob/main/docs/sdks/chat/README.md#complete) - Chat Completion @@ -940,8 +954,8 @@ with Mistral( **Inherit from [`MistralError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/mistralerror.py)**: -* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 103 of 168 methods.* -* [`ObservabilityError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 168 methods.* +* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 112 of 179 methods.* +* [`ObservabilityError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 179 methods.* * [`ResponseValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute. diff --git a/README.md b/README.md index 941ac903..899efa9d 100644 --- a/README.md +++ b/README.md @@ -515,6 +515,16 @@ print(res.choices[0].message.content) * [get_auth_url](docs/sdks/connectors/README.md#get_auth_url) - Get the auth URL for a connector. * [call_tool](docs/sdks/connectors/README.md#call_tool) - Call Connector Tool * [list_tools](docs/sdks/connectors/README.md#list_tools) - List tools for a connector. +* [get_authentication_methods](docs/sdks/connectors/README.md#get_authentication_methods) - Get authentication methods for a connector. +* [list_organization_credentials](docs/sdks/connectors/README.md#list_organization_credentials) - List organization credentials for a connector. +* [create_or_update_organization_credentials](docs/sdks/connectors/README.md#create_or_update_organization_credentials) - Create or update organization credentials for a connector. +* [list_workspace_credentials](docs/sdks/connectors/README.md#list_workspace_credentials) - List workspace credentials for a connector. +* [create_or_update_workspace_credentials](docs/sdks/connectors/README.md#create_or_update_workspace_credentials) - Create or update workspace credentials for a connector. +* [list_user_credentials](docs/sdks/connectors/README.md#list_user_credentials) - List user credentials for a connector. +* [create_or_update_user_credentials](docs/sdks/connectors/README.md#create_or_update_user_credentials) - Create or update user credentials for a connector. +* [delete_organization_credentials](docs/sdks/connectors/README.md#delete_organization_credentials) - Delete organization credentials for a connector. +* [delete_workspace_credentials](docs/sdks/connectors/README.md#delete_workspace_credentials) - Delete workspace credentials for a connector. +* [delete_user_credentials](docs/sdks/connectors/README.md#delete_user_credentials) - Delete user credentials for a connector. * [get](docs/sdks/connectors/README.md#get) - Get a connector. * [update](docs/sdks/connectors/README.md#update) - Update a connector. * [delete](docs/sdks/connectors/README.md#delete) - Delete a connector. @@ -619,6 +629,10 @@ print(res.choices[0].message.content) * [update](docs/sdks/judges/README.md#update) - Update a judge * [judge_conversation](docs/sdks/judges/README.md#judge_conversation) - Run a saved judge on a conversation +### [Beta.Rag.IngestionPipelineConfigurations](docs/sdks/ingestionpipelineconfigurations/README.md) + +* [list](docs/sdks/ingestionpipelineconfigurations/README.md#list) - List ingestion pipeline configurations + ### [Chat](docs/sdks/chat/README.md) * [complete](docs/sdks/chat/README.md#complete) - Chat Completion @@ -940,8 +954,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 103 of 168 methods.* -* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 168 methods.* +* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 112 of 179 methods.* +* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 179 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 1217ae7b..61b26593 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -588,4 +588,14 @@ Based on: ### Generated - [python v2.4.0] . ### Releases -- [PyPI v2.4.0] https://pypi.org/project/mistralai/2.4.0 - . \ No newline at end of file +- [PyPI v2.4.0] https://pypi.org/project/mistralai/2.4.0 - . + +## 2026-04-21 08:05:21 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.761.1 (2.879.6) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.4.1] . +### Releases +- [PyPI v2.4.1] https://pypi.org/project/mistralai/2.4.1 - . \ No newline at end of file diff --git a/docs/models/authenticationconfiguration.md b/docs/models/authenticationconfiguration.md new file mode 100644 index 00000000..081649ea --- /dev/null +++ b/docs/models/authenticationconfiguration.md @@ -0,0 +1,10 @@ +# AuthenticationConfiguration + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `name` | *str* | :heavy_check_mark: | N/A | +| `authentication_type` | [models.AuthenticationType](../models/authenticationtype.md) | :heavy_check_mark: | N/A | +| `is_default` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/authenticationtype.md b/docs/models/authenticationtype.md new file mode 100644 index 00000000..498bfeaa --- /dev/null +++ b/docs/models/authenticationtype.md @@ -0,0 +1,19 @@ +# AuthenticationType + +## Example Usage + +```python +from mistralai.client.models import AuthenticationType + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: AuthenticationType = "oauth2" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"oauth2"` +- `"bearer"` +- `"none"` diff --git a/docs/models/basefielddefinitiontype.md b/docs/models/basefielddefinitiontype.md index efdff2a4..355242b9 100644 --- a/docs/models/basefielddefinitiontype.md +++ b/docs/models/basefielddefinitiontype.md @@ -21,3 +21,4 @@ This is an open enum. Unrecognized values will not fail type checks. - `"BOOL"` - `"TIMESTAMP"` - `"ARRAY"` +- `"MAP"` diff --git a/docs/models/connectioncredentials.md b/docs/models/connectioncredentials.md new file mode 100644 index 00000000..7e892399 --- /dev/null +++ b/docs/models/connectioncredentials.md @@ -0,0 +1,10 @@ +# ConnectionCredentials + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `oauth` | [OptionalNullable[models.OAuth2Token]](../models/oauth2token.md) | :heavy_minus_sign: | N/A | +| `headers` | Dict[str, *str*] | :heavy_minus_sign: | N/A | +| `bearer_token` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/connector.md b/docs/models/connector.md index a5d6073e..a0107820 100644 --- a/docs/models/connector.md +++ b/docs/models/connector.md @@ -11,5 +11,4 @@ | `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | `modified_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | `server` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `auth_type` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `tools` | List[[models.ConnectorTool](../models/connectortool.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file +| `auth_type` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/connectorauthenticationheader.md b/docs/models/connectorauthenticationheader.md new file mode 100644 index 00000000..c545b571 --- /dev/null +++ b/docs/models/connectorauthenticationheader.md @@ -0,0 +1,10 @@ +# ConnectorAuthenticationHeader + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *str* | :heavy_check_mark: | N/A | +| `is_required` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `is_secret` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/connectorcreateorupdateorganizationcredentialsv1request.md b/docs/models/connectorcreateorupdateorganizationcredentialsv1request.md new file mode 100644 index 00000000..2797bebf --- /dev/null +++ b/docs/models/connectorcreateorupdateorganizationcredentialsv1request.md @@ -0,0 +1,9 @@ +# ConnectorCreateOrUpdateOrganizationCredentialsV1Request + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `credentials_create_or_update` | [models.CredentialsCreateOrUpdate](../models/credentialscreateorupdate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectorcreateorupdateusercredentialsv1request.md b/docs/models/connectorcreateorupdateusercredentialsv1request.md new file mode 100644 index 00000000..3e763722 --- /dev/null +++ b/docs/models/connectorcreateorupdateusercredentialsv1request.md @@ -0,0 +1,9 @@ +# ConnectorCreateOrUpdateUserCredentialsV1Request + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `credentials_create_or_update` | [models.CredentialsCreateOrUpdate](../models/credentialscreateorupdate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectorcreateorupdateworkspacecredentialsv1request.md b/docs/models/connectorcreateorupdateworkspacecredentialsv1request.md new file mode 100644 index 00000000..310cdcde --- /dev/null +++ b/docs/models/connectorcreateorupdateworkspacecredentialsv1request.md @@ -0,0 +1,9 @@ +# ConnectorCreateOrUpdateWorkspaceCredentialsV1Request + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `credentials_create_or_update` | [models.CredentialsCreateOrUpdate](../models/credentialscreateorupdate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectordeleteorganizationcredentialsv1request.md b/docs/models/connectordeleteorganizationcredentialsv1request.md new file mode 100644 index 00000000..eaf4d00c --- /dev/null +++ b/docs/models/connectordeleteorganizationcredentialsv1request.md @@ -0,0 +1,9 @@ +# ConnectorDeleteOrganizationCredentialsV1Request + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `credentials_name` | *str* | :heavy_check_mark: | N/A | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectordeleteusercredentialsv1request.md b/docs/models/connectordeleteusercredentialsv1request.md new file mode 100644 index 00000000..fd52cf92 --- /dev/null +++ b/docs/models/connectordeleteusercredentialsv1request.md @@ -0,0 +1,9 @@ +# ConnectorDeleteUserCredentialsV1Request + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `credentials_name` | *str* | :heavy_check_mark: | N/A | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectordeleteworkspacecredentialsv1request.md b/docs/models/connectordeleteworkspacecredentialsv1request.md new file mode 100644 index 00000000..3bc3d7c9 --- /dev/null +++ b/docs/models/connectordeleteworkspacecredentialsv1request.md @@ -0,0 +1,9 @@ +# ConnectorDeleteWorkspaceCredentialsV1Request + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `credentials_name` | *str* | :heavy_check_mark: | N/A | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectorgetauthenticationmethodsv1request.md b/docs/models/connectorgetauthenticationmethodsv1request.md new file mode 100644 index 00000000..3a62c010 --- /dev/null +++ b/docs/models/connectorgetauthenticationmethodsv1request.md @@ -0,0 +1,8 @@ +# ConnectorGetAuthenticationMethodsV1Request + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectorgetauthurlv1request.md b/docs/models/connectorgetauthurlv1request.md index d041e0c2..7d6b94ff 100644 --- a/docs/models/connectorgetauthurlv1request.md +++ b/docs/models/connectorgetauthurlv1request.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ----------------------- | ----------------------- | ----------------------- | ----------------------- | | `app_return_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `credentials_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectorlistorganizationcredentialsv1request.md b/docs/models/connectorlistorganizationcredentialsv1request.md new file mode 100644 index 00000000..bb1f1c3a --- /dev/null +++ b/docs/models/connectorlistorganizationcredentialsv1request.md @@ -0,0 +1,10 @@ +# ConnectorListOrganizationCredentialsV1Request + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `auth_type` | [OptionalNullable[models.AuthenticationType]](../models/authenticationtype.md) | :heavy_minus_sign: | N/A | +| `fetch_default` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectorlisttoolsv1request.md b/docs/models/connectorlisttoolsv1request.md index e080455b..e9c21374 100644 --- a/docs/models/connectorlisttoolsv1request.md +++ b/docs/models/connectorlisttoolsv1request.md @@ -9,4 +9,5 @@ | `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | | `refresh` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `pretty` | *Optional[bool]* | :heavy_minus_sign: | Return a simplified payload with only name, description, annotations, and a compact inputSchema. | +| `credentials_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectorlistusercredentialsv1request.md b/docs/models/connectorlistusercredentialsv1request.md new file mode 100644 index 00000000..63ec93d5 --- /dev/null +++ b/docs/models/connectorlistusercredentialsv1request.md @@ -0,0 +1,10 @@ +# ConnectorListUserCredentialsV1Request + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `auth_type` | [OptionalNullable[models.AuthenticationType]](../models/authenticationtype.md) | :heavy_minus_sign: | N/A | +| `fetch_default` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectorlistworkspacecredentialsv1request.md b/docs/models/connectorlistworkspacecredentialsv1request.md new file mode 100644 index 00000000..45e90077 --- /dev/null +++ b/docs/models/connectorlistworkspacecredentialsv1request.md @@ -0,0 +1,10 @@ +# ConnectorListWorkspaceCredentialsV1Request + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `auth_type` | [OptionalNullable[models.AuthenticationType]](../models/authenticationtype.md) | :heavy_minus_sign: | N/A | +| `fetch_default` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/credentialscreateorupdate.md b/docs/models/credentialscreateorupdate.md new file mode 100644 index 00000000..c544d7c6 --- /dev/null +++ b/docs/models/credentialscreateorupdate.md @@ -0,0 +1,12 @@ +# CredentialsCreateOrUpdate + +Request to create or update non-OAuth2 credentials for a connector. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | Name of the credentials. Use this name to access or modify your credentials. | +| `is_default` | *OptionalNullable[bool]* | :heavy_minus_sign: | Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged. | +| `credentials` | [OptionalNullable[models.ConnectionCredentials]](../models/connectioncredentials.md) | :heavy_minus_sign: | The credential data (headers, bearer_token). | \ No newline at end of file diff --git a/docs/models/credentialsresponse.md b/docs/models/credentialsresponse.md new file mode 100644 index 00000000..0cd5b336 --- /dev/null +++ b/docs/models/credentialsresponse.md @@ -0,0 +1,9 @@ +# CredentialsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `credentials` | List[[models.AuthenticationConfiguration](../models/authenticationconfiguration.md)] | :heavy_check_mark: | N/A | +| `connector_preset_credentials_for_auth` | List[[models.AuthenticationType](../models/authenticationtype.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/ingestionpipelineconfiguration.md b/docs/models/ingestionpipelineconfiguration.md new file mode 100644 index 00000000..5d25ab15 --- /dev/null +++ b/docs/models/ingestionpipelineconfiguration.md @@ -0,0 +1,11 @@ +# IngestionPipelineConfiguration + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | N/A | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `modified_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/listrunsv1workflowsrunsgetrequest.md b/docs/models/listrunsv1workflowsrunsgetrequest.md index 259876c6..319d9ed5 100644 --- a/docs/models/listrunsv1workflowsrunsgetrequest.md +++ b/docs/models/listrunsv1workflowsrunsgetrequest.md @@ -8,5 +8,6 @@ | `workflow_identifier` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by workflow name or id | | `search` | *OptionalNullable[str]* | :heavy_minus_sign: | Search by workflow name, display name or id | | `status` | [OptionalNullable[models.ListRunsV1WorkflowsRunsGetStatus]](../models/listrunsv1workflowsrunsgetstatus.md) | :heavy_minus_sign: | Filter by workflow status | +| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by user id. Use 'current' to filter by the authenticated user | | `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of items per page | | `next_page_token` | *OptionalNullable[str]* | :heavy_minus_sign: | Token for the next page of results | \ No newline at end of file diff --git a/docs/models/oauth2token.md b/docs/models/oauth2token.md new file mode 100644 index 00000000..59716ed6 --- /dev/null +++ b/docs/models/oauth2token.md @@ -0,0 +1,13 @@ +# OAuth2Token + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `access_token` | *str* | :heavy_check_mark: | N/A | +| `token_type` | *Optional[Literal["Bearer"]]* | :heavy_minus_sign: | N/A | +| `expires_in` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `scope` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `refresh_token` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/publicauthenticationmethod.md b/docs/models/publicauthenticationmethod.md new file mode 100644 index 00000000..c98413b6 --- /dev/null +++ b/docs/models/publicauthenticationmethod.md @@ -0,0 +1,11 @@ +# PublicAuthenticationMethod + +Public view of an authentication method, without secrets. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `method_type` | [models.AuthenticationType](../models/authenticationtype.md) | :heavy_check_mark: | N/A | +| `headers` | List[[models.ConnectorAuthenticationHeader](../models/connectorauthenticationheader.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/tempotraceattributearraycontainer.md b/docs/models/tempotraceattributearraycontainer.md new file mode 100644 index 00000000..049dce7d --- /dev/null +++ b/docs/models/tempotraceattributearraycontainer.md @@ -0,0 +1,8 @@ +# TempoTraceAttributeArrayContainer + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `values` | List[[models.TempoTraceAttributeArrayElement](../models/tempotraceattributearrayelement.md)] | :heavy_minus_sign: | The values of the array | \ No newline at end of file diff --git a/docs/models/tempotraceattributearrayelement.md b/docs/models/tempotraceattributearrayelement.md new file mode 100644 index 00000000..a4b82080 --- /dev/null +++ b/docs/models/tempotraceattributearrayelement.md @@ -0,0 +1,10 @@ +# TempoTraceAttributeArrayElement + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `string_value` | *OptionalNullable[str]* | :heavy_minus_sign: | A string element in the array | +| `int_value` | *OptionalNullable[str]* | :heavy_minus_sign: | An integer element in the array | +| `bool_value` | *OptionalNullable[bool]* | :heavy_minus_sign: | A boolean element in the array | \ No newline at end of file diff --git a/docs/models/tempotraceattributearrayvalue.md b/docs/models/tempotraceattributearrayvalue.md new file mode 100644 index 00000000..b763756f --- /dev/null +++ b/docs/models/tempotraceattributearrayvalue.md @@ -0,0 +1,8 @@ +# TempoTraceAttributeArrayValue + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `array_value` | [models.TempoTraceAttributeArrayContainer](../models/tempotraceattributearraycontainer.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/tempotraceattributevalue.md b/docs/models/tempotraceattributevalue.md index eb448c3b..3b0a1869 100644 --- a/docs/models/tempotraceattributevalue.md +++ b/docs/models/tempotraceattributevalue.md @@ -23,3 +23,9 @@ value: models.TempoTraceAttributeIntValue = /* values here */ value: models.TempoTraceAttributeBoolValue = /* values here */ ``` +### `models.TempoTraceAttributeArrayValue` + +```python +value: models.TempoTraceAttributeArrayValue = /* values here */ +``` + diff --git a/docs/models/workflow.md b/docs/models/workflow.md index 4b245e07..b1765cc4 100644 --- a/docs/models/workflow.md +++ b/docs/models/workflow.md @@ -15,4 +15,5 @@ | `shared_namespace` | *OptionalNullable[str]* | :heavy_minus_sign: | Reserved namespace for shared workflows (e.g., 'shared:my-shared-workflow') | | `available_in_chat_assistant` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is available in chat assistant | | `is_technical` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is technical (e.g. SDK-managed) | +| `on_behalf_of` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow must run associated to a user's identity | | `archived` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is archived | \ No newline at end of file diff --git a/docs/models/workflowcodedefinition.md b/docs/models/workflowcodedefinition.md index 2034f81f..f8cf3bbd 100644 --- a/docs/models/workflowcodedefinition.md +++ b/docs/models/workflowcodedefinition.md @@ -11,4 +11,5 @@ | `queries` | List[[models.QueryDefinition](../models/querydefinition.md)] | :heavy_minus_sign: | Query handlers defined by the workflow | | `updates` | List[[models.UpdateDefinition](../models/updatedefinition.md)] | :heavy_minus_sign: | Update handlers defined by the workflow | | `enforce_determinism` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow enforces deterministic execution | -| `execution_timeout` | *Optional[float]* | :heavy_minus_sign: | Maximum total execution time including retries and continue-as-new | \ No newline at end of file +| `execution_timeout` | *Optional[float]* | :heavy_minus_sign: | Maximum total execution time including retries and continue-as-new | +| `plugin_metadata` | Dict[str, *Any*] | :heavy_minus_sign: | Plugin-specific metadata (e.g. connector declarations) | \ No newline at end of file diff --git a/docs/models/workflowexecutionlistresponse.md b/docs/models/workflowexecutionlistresponse.md index 3fe61f60..0434e948 100644 --- a/docs/models/workflowexecutionlistresponse.md +++ b/docs/models/workflowexecutionlistresponse.md @@ -1,5 +1,7 @@ # WorkflowExecutionListResponse +Deprecated: use WorkflowRunListResponse instead. Will be removed in the next major version. + ## Fields diff --git a/docs/models/workflowexecutionrequest.md b/docs/models/workflowexecutionrequest.md index 54f61ea3..08b584f9 100644 --- a/docs/models/workflowexecutionrequest.md +++ b/docs/models/workflowexecutionrequest.md @@ -11,5 +11,6 @@ | `wait_for_result` | *Optional[bool]* | :heavy_minus_sign: | If true, wait for the workflow to complete and return the result directly. | | `timeout_seconds` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum time to wait for completion when wait_for_result is true. | | `custom_tracing_attributes` | Dict[str, *str*] | :heavy_minus_sign: | N/A | +| `extensions` | Dict[str, *Any*] | :heavy_minus_sign: | Plugin-specific data to propagate into WorkflowContext.extensions at execution time. | | ~~`task_queue`~~ | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use deployment_name instead. | | `deployment_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of the deployment to route this execution to | \ No newline at end of file diff --git a/docs/models/workflowexecutionresponse.md b/docs/models/workflowexecutionresponse.md index e414c47e..03f10100 100644 --- a/docs/models/workflowexecutionresponse.md +++ b/docs/models/workflowexecutionresponse.md @@ -9,6 +9,7 @@ | `execution_id` | *str* | :heavy_check_mark: | The ID of the workflow execution | | `parent_execution_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The parent execution ID of the workflow execution | | `root_execution_id` | *str* | :heavy_check_mark: | The root execution ID of the workflow execution | +| `run_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The unique run identifier (database UUID) | | `status` | [Nullable[models.WorkflowExecutionStatus]](../models/workflowexecutionstatus.md) | :heavy_check_mark: | The status of the workflow execution | | `start_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The start time of the workflow execution | | `end_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The end time of the workflow execution, if available | diff --git a/docs/models/workflowexecutiontraceeventsresponse.md b/docs/models/workflowexecutiontraceeventsresponse.md index a0e6e486..d24dfcaf 100644 --- a/docs/models/workflowexecutiontraceeventsresponse.md +++ b/docs/models/workflowexecutiontraceeventsresponse.md @@ -9,6 +9,7 @@ | `execution_id` | *str* | :heavy_check_mark: | The ID of the workflow execution | | `parent_execution_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The parent execution ID of the workflow execution | | `root_execution_id` | *str* | :heavy_check_mark: | The root execution ID of the workflow execution | +| `run_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The unique run identifier (database UUID) | | `status` | [Nullable[models.WorkflowExecutionStatus]](../models/workflowexecutionstatus.md) | :heavy_check_mark: | The status of the workflow execution | | `start_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The start time of the workflow execution | | `end_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The end time of the workflow execution, if available | diff --git a/docs/models/workflowexecutiontraceotelresponse.md b/docs/models/workflowexecutiontraceotelresponse.md index 62188776..cc4ff9ca 100644 --- a/docs/models/workflowexecutiontraceotelresponse.md +++ b/docs/models/workflowexecutiontraceotelresponse.md @@ -9,6 +9,7 @@ | `execution_id` | *str* | :heavy_check_mark: | The ID of the workflow execution | | `parent_execution_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The parent execution ID of the workflow execution | | `root_execution_id` | *str* | :heavy_check_mark: | The root execution ID of the workflow execution | +| `run_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The unique run identifier (database UUID) | | `status` | [Nullable[models.WorkflowExecutionStatus]](../models/workflowexecutionstatus.md) | :heavy_check_mark: | The status of the workflow execution | | `start_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The start time of the workflow execution | | `end_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The end time of the workflow execution, if available | diff --git a/docs/models/workflowexecutiontracesummaryattributesvalues.md b/docs/models/workflowexecutiontracesummaryattributesvalues.md index c01a122f..04bd34ab 100644 --- a/docs/models/workflowexecutiontracesummaryattributesvalues.md +++ b/docs/models/workflowexecutiontracesummaryattributesvalues.md @@ -27,3 +27,9 @@ value: float = /* values here */ value: bool = /* values here */ ``` +### `List[Any]` + +```python +value: List[Any] = /* values here */ +``` + diff --git a/docs/models/workflowexecutiontracesummaryresponse.md b/docs/models/workflowexecutiontracesummaryresponse.md index 3c1ab0e5..c0380e78 100644 --- a/docs/models/workflowexecutiontracesummaryresponse.md +++ b/docs/models/workflowexecutiontracesummaryresponse.md @@ -9,6 +9,7 @@ | `execution_id` | *str* | :heavy_check_mark: | The ID of the workflow execution | | `parent_execution_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The parent execution ID of the workflow execution | | `root_execution_id` | *str* | :heavy_check_mark: | The root execution ID of the workflow execution | +| `run_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The unique run identifier (database UUID) | | `status` | [Nullable[models.WorkflowExecutionStatus]](../models/workflowexecutionstatus.md) | :heavy_check_mark: | The status of the workflow execution | | `start_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The start time of the workflow execution | | `end_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The end time of the workflow execution, if available | diff --git a/docs/models/workflowexecutionwithoutresultresponse.md b/docs/models/workflowexecutionwithoutresultresponse.md index f74414a6..47d79589 100644 --- a/docs/models/workflowexecutionwithoutresultresponse.md +++ b/docs/models/workflowexecutionwithoutresultresponse.md @@ -9,6 +9,7 @@ | `execution_id` | *str* | :heavy_check_mark: | The ID of the workflow execution | | `parent_execution_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The parent execution ID of the workflow execution | | `root_execution_id` | *str* | :heavy_check_mark: | The root execution ID of the workflow execution | +| `run_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The unique run identifier (database UUID) | | `status` | [Nullable[models.WorkflowExecutionStatus]](../models/workflowexecutionstatus.md) | :heavy_check_mark: | The status of the workflow execution | | `start_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The start time of the workflow execution | | `end_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The end time of the workflow execution, if available | diff --git a/docs/models/workflowwithworkerstatus.md b/docs/models/workflowwithworkerstatus.md index ac6efb9c..daa637fa 100644 --- a/docs/models/workflowwithworkerstatus.md +++ b/docs/models/workflowwithworkerstatus.md @@ -15,5 +15,6 @@ | `shared_namespace` | *OptionalNullable[str]* | :heavy_minus_sign: | Reserved namespace for shared workflows (e.g., 'shared:my-shared-workflow') | | `available_in_chat_assistant` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is available in chat assistant | | `is_technical` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is technical (e.g. SDK-managed) | +| `on_behalf_of` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow must run associated to a user's identity | | `archived` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is archived | | `active` | *bool* | :heavy_check_mark: | Whether the workflow is active | \ No newline at end of file diff --git a/docs/sdks/connectors/README.md b/docs/sdks/connectors/README.md index f4a0a097..67005b8f 100644 --- a/docs/sdks/connectors/README.md +++ b/docs/sdks/connectors/README.md @@ -11,6 +11,16 @@ * [get_auth_url](#get_auth_url) - Get the auth URL for a connector. * [call_tool](#call_tool) - Call Connector Tool * [list_tools](#list_tools) - List tools for a connector. +* [get_authentication_methods](#get_authentication_methods) - Get authentication methods for a connector. +* [list_organization_credentials](#list_organization_credentials) - List organization credentials for a connector. +* [create_or_update_organization_credentials](#create_or_update_organization_credentials) - Create or update organization credentials for a connector. +* [list_workspace_credentials](#list_workspace_credentials) - List workspace credentials for a connector. +* [create_or_update_workspace_credentials](#create_or_update_workspace_credentials) - Create or update workspace credentials for a connector. +* [list_user_credentials](#list_user_credentials) - List user credentials for a connector. +* [create_or_update_user_credentials](#create_or_update_user_credentials) - Create or update user credentials for a connector. +* [delete_organization_credentials](#delete_organization_credentials) - Delete organization credentials for a connector. +* [delete_workspace_credentials](#delete_workspace_credentials) - Delete workspace credentials for a connector. +* [delete_user_credentials](#delete_user_credentials) - Delete user credentials for a connector. * [get](#get) - Get a connector. * [update](#update) - Update a connector. * [delete](#delete) - Delete a connector. @@ -135,6 +145,7 @@ with Mistral( | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | | `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | | `app_return_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `credentials_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -224,6 +235,7 @@ with Mistral( | `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | | `refresh` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `pretty` | *Optional[bool]* | :heavy_minus_sign: | Return a simplified payload with only name, description, annotations, and a compact inputSchema. | +| `credentials_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -237,6 +249,433 @@ with Mistral( | errors.HTTPValidationError | 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | +## get_authentication_methods + +Get the authentication schema for a connector. Returns the list of supported authentication methods and their required headers. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.get_authentication_methods(connector_id_or_name="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[List[models.PublicAuthenticationMethod]](../../models/.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## list_organization_credentials + +List all credentials configured at the organization level for a given connector. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.list_organization_credentials(connector_id_or_name="", fetch_default=False) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `auth_type` | [OptionalNullable[models.AuthenticationType]](../../models/authenticationtype.md) | :heavy_minus_sign: | N/A | +| `fetch_default` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.CredentialsResponse](../../models/credentialsresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## create_or_update_organization_credentials + +Create or update credentials at the organization level for a given connector. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.create_or_update_organization_credentials(connector_id_or_name="", name="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | Name of the credentials. Use this name to access or modify your credentials. | +| `is_default` | *OptionalNullable[bool]* | :heavy_minus_sign: | Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged. | +| `credentials` | [OptionalNullable[models.ConnectionCredentials]](../../models/connectioncredentials.md) | :heavy_minus_sign: | The credential data (headers, bearer_token). | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.MessageResponse](../../models/messageresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## list_workspace_credentials + +List all credentials configured at the workspace level for a given connector. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.list_workspace_credentials(connector_id_or_name="", fetch_default=False) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `auth_type` | [OptionalNullable[models.AuthenticationType]](../../models/authenticationtype.md) | :heavy_minus_sign: | N/A | +| `fetch_default` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.CredentialsResponse](../../models/credentialsresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## create_or_update_workspace_credentials + +Create or update credentials at the workspace level for a given connector. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.create_or_update_workspace_credentials(connector_id_or_name="", name="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | Name of the credentials. Use this name to access or modify your credentials. | +| `is_default` | *OptionalNullable[bool]* | :heavy_minus_sign: | Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged. | +| `credentials` | [OptionalNullable[models.ConnectionCredentials]](../../models/connectioncredentials.md) | :heavy_minus_sign: | The credential data (headers, bearer_token). | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.MessageResponse](../../models/messageresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## list_user_credentials + +List all credentials configured at the user level for a given connector. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.list_user_credentials(connector_id_or_name="", fetch_default=False) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `auth_type` | [OptionalNullable[models.AuthenticationType]](../../models/authenticationtype.md) | :heavy_minus_sign: | N/A | +| `fetch_default` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.CredentialsResponse](../../models/credentialsresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## create_or_update_user_credentials + +Create or update credentials at the user level for a given connector. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.create_or_update_user_credentials(connector_id_or_name="", name="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | Name of the credentials. Use this name to access or modify your credentials. | +| `is_default` | *OptionalNullable[bool]* | :heavy_minus_sign: | Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged. | +| `credentials` | [OptionalNullable[models.ConnectionCredentials]](../../models/connectioncredentials.md) | :heavy_minus_sign: | The credential data (headers, bearer_token). | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.MessageResponse](../../models/messageresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## delete_organization_credentials + +Delete credentials at the organization level for a given connector. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.delete_organization_credentials(credentials_name="", connector_id_or_name="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `credentials_name` | *str* | :heavy_check_mark: | N/A | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.MessageResponse](../../models/messageresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## delete_workspace_credentials + +Delete credentials at the workspace level for a given connector. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.delete_workspace_credentials(credentials_name="", connector_id_or_name="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `credentials_name` | *str* | :heavy_check_mark: | N/A | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.MessageResponse](../../models/messageresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## delete_user_credentials + +Delete credentials at the user level for a given connector. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.delete_user_credentials(credentials_name="", connector_id_or_name="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `credentials_name` | *str* | :heavy_check_mark: | N/A | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.MessageResponse](../../models/messageresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + ## get Get a connector by its ID or name. diff --git a/docs/sdks/ingestionpipelineconfigurations/README.md b/docs/sdks/ingestionpipelineconfigurations/README.md new file mode 100644 index 00000000..30457be2 --- /dev/null +++ b/docs/sdks/ingestionpipelineconfigurations/README.md @@ -0,0 +1,46 @@ +# Beta.Rag.IngestionPipelineConfigurations + +## Overview + +### Available Operations + +* [list](#list) - List ingestion pipeline configurations + +## list + +For the current workspace, lists all of the registered ingestion pipeline configurations. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.rag.ingestion_pipeline_configurations.list() + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[List[models.IngestionPipelineConfiguration]](../../models/.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/runs/README.md b/docs/sdks/runs/README.md index 33a551c5..7ed91420 100644 --- a/docs/sdks/runs/README.md +++ b/docs/sdks/runs/README.md @@ -40,6 +40,7 @@ with Mistral( | `workflow_identifier` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by workflow name or id | | `search` | *OptionalNullable[str]* | :heavy_minus_sign: | Search by workflow name, display name or id | | `status` | [OptionalNullable[models.ListRunsV1WorkflowsRunsGetStatus]](../../models/listrunsv1workflowsrunsgetstatus.md) | :heavy_minus_sign: | Filter by workflow status | +| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by user id. Use 'current' to filter by the authenticated user | | `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of items per page | | `next_page_token` | *OptionalNullable[str]* | :heavy_minus_sign: | Token for the next page of results | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | diff --git a/docs/sdks/voices/README.md b/docs/sdks/voices/README.md index 3b4d135f..49b8533f 100644 --- a/docs/sdks/voices/README.md +++ b/docs/sdks/voices/README.md @@ -264,7 +264,7 @@ with Mistral( ### Response -**[str](../../models/responsegetvoicesampleaudiov1audiovoicesvoiceidsampleget.md)** +**[httpx.Response](../../models/.md)** ### Errors diff --git a/docs/sdks/workflows/README.md b/docs/sdks/workflows/README.md index 324c46b1..0b804d85 100644 --- a/docs/sdks/workflows/README.md +++ b/docs/sdks/workflows/README.md @@ -146,6 +146,7 @@ with Mistral( | `wait_for_result` | *Optional[bool]* | :heavy_minus_sign: | If true, wait for the workflow to complete and return the result directly. | | `timeout_seconds` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum time to wait for completion when wait_for_result is true. | | `custom_tracing_attributes` | Dict[str, *str*] | :heavy_minus_sign: | N/A | +| `extensions` | Dict[str, *Any*] | :heavy_minus_sign: | Plugin-specific data to propagate into WorkflowContext.extensions at execution time. | | `task_queue` | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use deployment_name instead. | | `deployment_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of the deployment to route this execution to | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | @@ -197,6 +198,7 @@ with Mistral( | `wait_for_result` | *Optional[bool]* | :heavy_minus_sign: | If true, wait for the workflow to complete and return the result directly. | | `timeout_seconds` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum time to wait for completion when wait_for_result is true. | | `custom_tracing_attributes` | Dict[str, *str*] | :heavy_minus_sign: | N/A | +| `extensions` | Dict[str, *Any*] | :heavy_minus_sign: | Plugin-specific data to propagate into WorkflowContext.extensions at execution time. | | `task_queue` | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use deployment_name instead. | | `deployment_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of the deployment to route this execution to | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | diff --git a/pyproject.toml b/pyproject.toml index e2fffb41..dce32456 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.4.0" +version = "2.4.1" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index aa3edd4f..e6e50dc0 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.4.0" +__version__: str = "2.4.1" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.879.6" -__user_agent__: str = "speakeasy-sdk/python 2.4.0 2.879.6 1.0.0 mistralai" +__user_agent__: str = "speakeasy-sdk/python 2.4.1 2.879.6 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/beta.py b/src/mistralai/client/beta.py index 83b8fc87..f9bbb5ae 100644 --- a/src/mistralai/client/beta.py +++ b/src/mistralai/client/beta.py @@ -8,6 +8,7 @@ from mistralai.client.conversations import Conversations from mistralai.client.libraries import Libraries from mistralai.client.observability import Observability +from mistralai.client.rag import Rag from typing import Optional @@ -21,6 +22,7 @@ class Beta(BaseSDK): observability: Observability connectors: Connectors r"""(beta) Connectors API - manage your connectors""" + rag: Rag def __init__( self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None @@ -39,3 +41,4 @@ def _init_sdks(self): self.sdk_configuration, parent_ref=self.parent_ref ) self.connectors = Connectors(self.sdk_configuration, parent_ref=self.parent_ref) + self.rag = Rag(self.sdk_configuration, parent_ref=self.parent_ref) diff --git a/src/mistralai/client/connectors.py b/src/mistralai/client/connectors.py index fc9d6319..0d1dc703 100644 --- a/src/mistralai/client/connectors.py +++ b/src/mistralai/client/connectors.py @@ -7,7 +7,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, Mapping, Optional, Union +from typing import Any, Dict, List, Mapping, Optional, Union class Connectors(BaseSDK): @@ -466,6 +466,7 @@ def get_auth_url( *, connector_id_or_name: str, app_return_url: OptionalNullable[str] = UNSET, + credentials_name: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -477,6 +478,7 @@ def get_auth_url( :param connector_id_or_name: :param app_return_url: + :param credentials_name: :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 @@ -497,6 +499,7 @@ def get_auth_url( request = models.ConnectorGetAuthURLV1Request( app_return_url=app_return_url, + credentials_name=credentials_name, connector_id_or_name=connector_id_or_name, ) @@ -562,6 +565,7 @@ async def get_auth_url_async( *, connector_id_or_name: str, app_return_url: OptionalNullable[str] = UNSET, + credentials_name: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -573,6 +577,7 @@ async def get_auth_url_async( :param connector_id_or_name: :param app_return_url: + :param credentials_name: :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 @@ -593,6 +598,7 @@ async def get_auth_url_async( request = models.ConnectorGetAuthURLV1Request( app_return_url=app_return_url, + credentials_name=credentials_name, connector_id_or_name=connector_id_or_name, ) @@ -883,6 +889,7 @@ def list_tools( page_size: Optional[int] = 100, refresh: Optional[bool] = False, pretty: Optional[bool] = False, + credentials_name: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -897,6 +904,7 @@ def list_tools( :param page_size: :param refresh: :param pretty: Return a simplified payload with only name, description, annotations, and a compact inputSchema. + :param credentials_name: :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 @@ -920,6 +928,7 @@ def list_tools( page_size=page_size, refresh=refresh, pretty=pretty, + credentials_name=credentials_name, connector_id_or_name=connector_id_or_name, ) @@ -990,6 +999,7 @@ async def list_tools_async( page_size: Optional[int] = 100, refresh: Optional[bool] = False, pretty: Optional[bool] = False, + credentials_name: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -1004,6 +1014,7 @@ async def list_tools_async( :param page_size: :param refresh: :param pretty: Return a simplified payload with only name, description, annotations, and a compact inputSchema. + :param credentials_name: :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 @@ -1027,6 +1038,7 @@ async def list_tools_async( page_size=page_size, refresh=refresh, pretty=pretty, + credentials_name=credentials_name, connector_id_or_name=connector_id_or_name, ) @@ -1089,6 +1101,2044 @@ async def list_tools_async( raise errors.SDKError("Unexpected response received", http_res) + def get_authentication_methods( + self, + *, + connector_id_or_name: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.PublicAuthenticationMethod]: + r"""Get authentication methods for a connector. + + Get the authentication schema for a connector. Returns the list of supported authentication methods and their required headers. + + :param connector_id_or_name: + :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 = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorGetAuthenticationMethodsV1Request( + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request( + method="GET", + path="/v1/connectors/{connector_id_or_name}/authentication_methods", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_get_authentication_methods_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + List[models.PublicAuthenticationMethod], http_res + ) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def get_authentication_methods_async( + self, + *, + connector_id_or_name: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.PublicAuthenticationMethod]: + r"""Get authentication methods for a connector. + + Get the authentication schema for a connector. Returns the list of supported authentication methods and their required headers. + + :param connector_id_or_name: + :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 = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorGetAuthenticationMethodsV1Request( + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request_async( + method="GET", + path="/v1/connectors/{connector_id_or_name}/authentication_methods", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_get_authentication_methods_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + List[models.PublicAuthenticationMethod], http_res + ) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def list_organization_credentials( + self, + *, + connector_id_or_name: str, + auth_type: OptionalNullable[models.AuthenticationType] = UNSET, + fetch_default: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.CredentialsResponse: + r"""List organization credentials for a connector. + + List all credentials configured at the organization level for a given connector. + + :param connector_id_or_name: + :param auth_type: + :param fetch_default: + :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 = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorListOrganizationCredentialsV1Request( + auth_type=auth_type, + fetch_default=fetch_default, + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request( + method="GET", + path="/v1/connectors/{connector_id_or_name}/organization/credentials", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_list_organization_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.CredentialsResponse, 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 list_organization_credentials_async( + self, + *, + connector_id_or_name: str, + auth_type: OptionalNullable[models.AuthenticationType] = UNSET, + fetch_default: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.CredentialsResponse: + r"""List organization credentials for a connector. + + List all credentials configured at the organization level for a given connector. + + :param connector_id_or_name: + :param auth_type: + :param fetch_default: + :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 = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorListOrganizationCredentialsV1Request( + auth_type=auth_type, + fetch_default=fetch_default, + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request_async( + method="GET", + path="/v1/connectors/{connector_id_or_name}/organization/credentials", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_list_organization_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.CredentialsResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def create_or_update_organization_credentials( + self, + *, + connector_id_or_name: str, + name: str, + is_default: OptionalNullable[bool] = UNSET, + credentials: OptionalNullable[ + Union[models.ConnectionCredentials, models.ConnectionCredentialsTypedDict] + ] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Create or update organization credentials for a connector. + + Create or update credentials at the organization level for a given connector. + + :param connector_id_or_name: + :param name: Name of the credentials. Use this name to access or modify your credentials. + :param is_default: Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged. + :param credentials: The credential data (headers, bearer_token). + :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 = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorCreateOrUpdateOrganizationCredentialsV1Request( + connector_id_or_name=connector_id_or_name, + credentials_create_or_update=models.CredentialsCreateOrUpdate( + name=name, + is_default=is_default, + credentials=utils.get_pydantic_model( + credentials, OptionalNullable[models.ConnectionCredentials] + ), + ), + ) + + req = self._build_request( + method="POST", + path="/v1/connectors/{connector_id_or_name}/organization/credentials", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.credentials_create_or_update, + False, + False, + "json", + models.CredentialsCreateOrUpdate, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_create_or_update_organization_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def create_or_update_organization_credentials_async( + self, + *, + connector_id_or_name: str, + name: str, + is_default: OptionalNullable[bool] = UNSET, + credentials: OptionalNullable[ + Union[models.ConnectionCredentials, models.ConnectionCredentialsTypedDict] + ] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Create or update organization credentials for a connector. + + Create or update credentials at the organization level for a given connector. + + :param connector_id_or_name: + :param name: Name of the credentials. Use this name to access or modify your credentials. + :param is_default: Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged. + :param credentials: The credential data (headers, bearer_token). + :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 = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorCreateOrUpdateOrganizationCredentialsV1Request( + connector_id_or_name=connector_id_or_name, + credentials_create_or_update=models.CredentialsCreateOrUpdate( + name=name, + is_default=is_default, + credentials=utils.get_pydantic_model( + credentials, OptionalNullable[models.ConnectionCredentials] + ), + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/connectors/{connector_id_or_name}/organization/credentials", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.credentials_create_or_update, + False, + False, + "json", + models.CredentialsCreateOrUpdate, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_create_or_update_organization_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def list_workspace_credentials( + self, + *, + connector_id_or_name: str, + auth_type: OptionalNullable[models.AuthenticationType] = UNSET, + fetch_default: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.CredentialsResponse: + r"""List workspace credentials for a connector. + + List all credentials configured at the workspace level for a given connector. + + :param connector_id_or_name: + :param auth_type: + :param fetch_default: + :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 = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorListWorkspaceCredentialsV1Request( + auth_type=auth_type, + fetch_default=fetch_default, + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request( + method="GET", + path="/v1/connectors/{connector_id_or_name}/workspace/credentials", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_list_workspace_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.CredentialsResponse, 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 list_workspace_credentials_async( + self, + *, + connector_id_or_name: str, + auth_type: OptionalNullable[models.AuthenticationType] = UNSET, + fetch_default: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.CredentialsResponse: + r"""List workspace credentials for a connector. + + List all credentials configured at the workspace level for a given connector. + + :param connector_id_or_name: + :param auth_type: + :param fetch_default: + :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 = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorListWorkspaceCredentialsV1Request( + auth_type=auth_type, + fetch_default=fetch_default, + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request_async( + method="GET", + path="/v1/connectors/{connector_id_or_name}/workspace/credentials", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_list_workspace_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.CredentialsResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def create_or_update_workspace_credentials( + self, + *, + connector_id_or_name: str, + name: str, + is_default: OptionalNullable[bool] = UNSET, + credentials: OptionalNullable[ + Union[models.ConnectionCredentials, models.ConnectionCredentialsTypedDict] + ] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Create or update workspace credentials for a connector. + + Create or update credentials at the workspace level for a given connector. + + :param connector_id_or_name: + :param name: Name of the credentials. Use this name to access or modify your credentials. + :param is_default: Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged. + :param credentials: The credential data (headers, bearer_token). + :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 = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorCreateOrUpdateWorkspaceCredentialsV1Request( + connector_id_or_name=connector_id_or_name, + credentials_create_or_update=models.CredentialsCreateOrUpdate( + name=name, + is_default=is_default, + credentials=utils.get_pydantic_model( + credentials, OptionalNullable[models.ConnectionCredentials] + ), + ), + ) + + req = self._build_request( + method="POST", + path="/v1/connectors/{connector_id_or_name}/workspace/credentials", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.credentials_create_or_update, + False, + False, + "json", + models.CredentialsCreateOrUpdate, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_create_or_update_workspace_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def create_or_update_workspace_credentials_async( + self, + *, + connector_id_or_name: str, + name: str, + is_default: OptionalNullable[bool] = UNSET, + credentials: OptionalNullable[ + Union[models.ConnectionCredentials, models.ConnectionCredentialsTypedDict] + ] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Create or update workspace credentials for a connector. + + Create or update credentials at the workspace level for a given connector. + + :param connector_id_or_name: + :param name: Name of the credentials. Use this name to access or modify your credentials. + :param is_default: Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged. + :param credentials: The credential data (headers, bearer_token). + :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 = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorCreateOrUpdateWorkspaceCredentialsV1Request( + connector_id_or_name=connector_id_or_name, + credentials_create_or_update=models.CredentialsCreateOrUpdate( + name=name, + is_default=is_default, + credentials=utils.get_pydantic_model( + credentials, OptionalNullable[models.ConnectionCredentials] + ), + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/connectors/{connector_id_or_name}/workspace/credentials", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.credentials_create_or_update, + False, + False, + "json", + models.CredentialsCreateOrUpdate, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_create_or_update_workspace_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def list_user_credentials( + self, + *, + connector_id_or_name: str, + auth_type: OptionalNullable[models.AuthenticationType] = UNSET, + fetch_default: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.CredentialsResponse: + r"""List user credentials for a connector. + + List all credentials configured at the user level for a given connector. + + :param connector_id_or_name: + :param auth_type: + :param fetch_default: + :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 = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorListUserCredentialsV1Request( + auth_type=auth_type, + fetch_default=fetch_default, + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request( + method="GET", + path="/v1/connectors/{connector_id_or_name}/user/credentials", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_list_user_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.CredentialsResponse, 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 list_user_credentials_async( + self, + *, + connector_id_or_name: str, + auth_type: OptionalNullable[models.AuthenticationType] = UNSET, + fetch_default: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.CredentialsResponse: + r"""List user credentials for a connector. + + List all credentials configured at the user level for a given connector. + + :param connector_id_or_name: + :param auth_type: + :param fetch_default: + :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 = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorListUserCredentialsV1Request( + auth_type=auth_type, + fetch_default=fetch_default, + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request_async( + method="GET", + path="/v1/connectors/{connector_id_or_name}/user/credentials", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_list_user_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.CredentialsResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def create_or_update_user_credentials( + self, + *, + connector_id_or_name: str, + name: str, + is_default: OptionalNullable[bool] = UNSET, + credentials: OptionalNullable[ + Union[models.ConnectionCredentials, models.ConnectionCredentialsTypedDict] + ] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Create or update user credentials for a connector. + + Create or update credentials at the user level for a given connector. + + :param connector_id_or_name: + :param name: Name of the credentials. Use this name to access or modify your credentials. + :param is_default: Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged. + :param credentials: The credential data (headers, bearer_token). + :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 = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorCreateOrUpdateUserCredentialsV1Request( + connector_id_or_name=connector_id_or_name, + credentials_create_or_update=models.CredentialsCreateOrUpdate( + name=name, + is_default=is_default, + credentials=utils.get_pydantic_model( + credentials, OptionalNullable[models.ConnectionCredentials] + ), + ), + ) + + req = self._build_request( + method="POST", + path="/v1/connectors/{connector_id_or_name}/user/credentials", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.credentials_create_or_update, + False, + False, + "json", + models.CredentialsCreateOrUpdate, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_create_or_update_user_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def create_or_update_user_credentials_async( + self, + *, + connector_id_or_name: str, + name: str, + is_default: OptionalNullable[bool] = UNSET, + credentials: OptionalNullable[ + Union[models.ConnectionCredentials, models.ConnectionCredentialsTypedDict] + ] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Create or update user credentials for a connector. + + Create or update credentials at the user level for a given connector. + + :param connector_id_or_name: + :param name: Name of the credentials. Use this name to access or modify your credentials. + :param is_default: Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged. + :param credentials: The credential data (headers, bearer_token). + :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 = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorCreateOrUpdateUserCredentialsV1Request( + connector_id_or_name=connector_id_or_name, + credentials_create_or_update=models.CredentialsCreateOrUpdate( + name=name, + is_default=is_default, + credentials=utils.get_pydantic_model( + credentials, OptionalNullable[models.ConnectionCredentials] + ), + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/connectors/{connector_id_or_name}/user/credentials", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.credentials_create_or_update, + False, + False, + "json", + models.CredentialsCreateOrUpdate, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_create_or_update_user_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def delete_organization_credentials( + self, + *, + credentials_name: str, + connector_id_or_name: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Delete organization credentials for a connector. + + Delete credentials at the organization level for a given connector. + + :param credentials_name: + :param connector_id_or_name: + :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 = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorDeleteOrganizationCredentialsV1Request( + credentials_name=credentials_name, + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request( + method="DELETE", + path="/v1/connectors/{connector_id_or_name}/organization/credentials/{credentials_name}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_delete_organization_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def delete_organization_credentials_async( + self, + *, + credentials_name: str, + connector_id_or_name: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Delete organization credentials for a connector. + + Delete credentials at the organization level for a given connector. + + :param credentials_name: + :param connector_id_or_name: + :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 = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorDeleteOrganizationCredentialsV1Request( + credentials_name=credentials_name, + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request_async( + method="DELETE", + path="/v1/connectors/{connector_id_or_name}/organization/credentials/{credentials_name}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_delete_organization_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def delete_workspace_credentials( + self, + *, + credentials_name: str, + connector_id_or_name: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Delete workspace credentials for a connector. + + Delete credentials at the workspace level for a given connector. + + :param credentials_name: + :param connector_id_or_name: + :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 = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorDeleteWorkspaceCredentialsV1Request( + credentials_name=credentials_name, + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request( + method="DELETE", + path="/v1/connectors/{connector_id_or_name}/workspace/credentials/{credentials_name}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_delete_workspace_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def delete_workspace_credentials_async( + self, + *, + credentials_name: str, + connector_id_or_name: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Delete workspace credentials for a connector. + + Delete credentials at the workspace level for a given connector. + + :param credentials_name: + :param connector_id_or_name: + :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 = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorDeleteWorkspaceCredentialsV1Request( + credentials_name=credentials_name, + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request_async( + method="DELETE", + path="/v1/connectors/{connector_id_or_name}/workspace/credentials/{credentials_name}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_delete_workspace_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def delete_user_credentials( + self, + *, + credentials_name: str, + connector_id_or_name: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Delete user credentials for a connector. + + Delete credentials at the user level for a given connector. + + :param credentials_name: + :param connector_id_or_name: + :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 = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorDeleteUserCredentialsV1Request( + credentials_name=credentials_name, + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request( + method="DELETE", + path="/v1/connectors/{connector_id_or_name}/user/credentials/{credentials_name}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_delete_user_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def delete_user_credentials_async( + self, + *, + credentials_name: str, + connector_id_or_name: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Delete user credentials for a connector. + + Delete credentials at the user level for a given connector. + + :param credentials_name: + :param connector_id_or_name: + :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 = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorDeleteUserCredentialsV1Request( + credentials_name=credentials_name, + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request_async( + method="DELETE", + path="/v1/connectors/{connector_id_or_name}/user/credentials/{credentials_name}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_delete_user_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + def get( self, *, diff --git a/src/mistralai/client/ingestion_pipeline_configurations.py b/src/mistralai/client/ingestion_pipeline_configurations.py new file mode 100644 index 00000000..e795a8ab --- /dev/null +++ b/src/mistralai/client/ingestion_pipeline_configurations.py @@ -0,0 +1,176 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: f5a994272058 + +from .basesdk import BaseSDK +from mistralai.client import errors, models, utils +from mistralai.client._hooks import HookContext +from mistralai.client.types import OptionalNullable, UNSET +from mistralai.client.utils import get_security_from_env +from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response +from typing import List, Mapping, Optional + + +class IngestionPipelineConfigurations(BaseSDK): + def list( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.IngestionPipelineConfiguration]: + r"""List ingestion pipeline configurations + + For the current workspace, lists all of the registered ingestion pipeline configurations. + + :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 = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + req = self._build_request( + method="GET", + path="/v1/rag/ingestion_pipeline_configurations", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_configs_v1_rag_ingestion_pipeline_configurations_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + List[models.IngestionPipelineConfiguration], http_res + ) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def list_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.IngestionPipelineConfiguration]: + r"""List ingestion pipeline configurations + + For the current workspace, lists all of the registered ingestion pipeline configurations. + + :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 = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + req = self._build_request_async( + method="GET", + path="/v1/rag/ingestion_pipeline_configurations", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_configs_v1_rag_ingestion_pipeline_configurations_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + List[models.IngestionPipelineConfiguration], 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/models/__init__.py b/src/mistralai/client/models/__init__.py index 34e6bdc1..7d175613 100644 --- a/src/mistralai/client/models/__init__.py +++ b/src/mistralai/client/models/__init__.py @@ -205,6 +205,11 @@ AudioTranscriptionRequestStreamTypedDict, ) from .authdata import AuthData, AuthDataTypedDict + from .authenticationconfiguration import ( + AuthenticationConfiguration, + AuthenticationConfigurationTypedDict, + ) + from .authenticationtype import AuthenticationType from .authurlresponse import AuthURLResponse, AuthURLResponseTypedDict from .basefielddefinition import ( BaseFieldDefinition, @@ -384,37 +389,85 @@ CompletionTrainingParameters, CompletionTrainingParametersTypedDict, ) + from .connectioncredentials import ( + ConnectionCredentials, + ConnectionCredentialsTypedDict, + ) from .connector import Connector, ConnectorTypedDict from .connector_call_tool_v1op import ( ConnectorCallToolV1Request, ConnectorCallToolV1RequestTypedDict, ) + from .connector_create_or_update_organization_credentials_v1op import ( + ConnectorCreateOrUpdateOrganizationCredentialsV1Request, + ConnectorCreateOrUpdateOrganizationCredentialsV1RequestTypedDict, + ) + from .connector_create_or_update_user_credentials_v1op import ( + ConnectorCreateOrUpdateUserCredentialsV1Request, + ConnectorCreateOrUpdateUserCredentialsV1RequestTypedDict, + ) + from .connector_create_or_update_workspace_credentials_v1op import ( + ConnectorCreateOrUpdateWorkspaceCredentialsV1Request, + ConnectorCreateOrUpdateWorkspaceCredentialsV1RequestTypedDict, + ) + from .connector_delete_organization_credentials_v1op import ( + ConnectorDeleteOrganizationCredentialsV1Request, + ConnectorDeleteOrganizationCredentialsV1RequestTypedDict, + ) + from .connector_delete_user_credentials_v1op import ( + ConnectorDeleteUserCredentialsV1Request, + ConnectorDeleteUserCredentialsV1RequestTypedDict, + ) from .connector_delete_v1op import ( ConnectorDeleteV1Request, ConnectorDeleteV1RequestTypedDict, ) + from .connector_delete_workspace_credentials_v1op import ( + ConnectorDeleteWorkspaceCredentialsV1Request, + ConnectorDeleteWorkspaceCredentialsV1RequestTypedDict, + ) from .connector_get_auth_url_v1op import ( ConnectorGetAuthURLV1Request, ConnectorGetAuthURLV1RequestTypedDict, ) + from .connector_get_authentication_methods_v1op import ( + ConnectorGetAuthenticationMethodsV1Request, + ConnectorGetAuthenticationMethodsV1RequestTypedDict, + ) from .connector_get_v1op import ( ConnectorGetV1Request, ConnectorGetV1RequestTypedDict, ) + from .connector_list_organization_credentials_v1op import ( + ConnectorListOrganizationCredentialsV1Request, + ConnectorListOrganizationCredentialsV1RequestTypedDict, + ) from .connector_list_tools_v1op import ( ConnectorListToolsV1Request, ConnectorListToolsV1RequestTypedDict, ResponseConnectorListToolsV1, ResponseConnectorListToolsV1TypedDict, ) + from .connector_list_user_credentials_v1op import ( + ConnectorListUserCredentialsV1Request, + ConnectorListUserCredentialsV1RequestTypedDict, + ) from .connector_list_v1op import ( ConnectorListV1Request, ConnectorListV1RequestTypedDict, ) + from .connector_list_workspace_credentials_v1op import ( + ConnectorListWorkspaceCredentialsV1Request, + ConnectorListWorkspaceCredentialsV1RequestTypedDict, + ) from .connector_update_v1op import ( ConnectorUpdateV1Request, ConnectorUpdateV1RequestTypedDict, ) + from .connectorauthenticationheader import ( + ConnectorAuthenticationHeader, + ConnectorAuthenticationHeaderTypedDict, + ) from .connectorcalltoolrequest import ( ConnectorCallToolRequest, ConnectorCallToolRequestTypedDict, @@ -568,6 +621,11 @@ CreateLibraryRequest, CreateLibraryRequestTypedDict, ) + from .credentialscreateorupdate import ( + CredentialsCreateOrUpdate, + CredentialsCreateOrUpdateTypedDict, + ) + from .credentialsresponse import CredentialsResponse, CredentialsResponseTypedDict from .customconnector import ( Authorization, AuthorizationTypedDict, @@ -1024,6 +1082,10 @@ ImportDatasetFromPlaygroundRequest, ImportDatasetFromPlaygroundRequestTypedDict, ) + from .ingestionpipelineconfiguration import ( + IngestionPipelineConfiguration, + IngestionPipelineConfigurationTypedDict, + ) from .inputentries import InputEntries, InputEntriesTypedDict from .inputs import Inputs, InputsTypedDict from .instructrequest import ( @@ -1381,6 +1443,7 @@ from .moderationobject import ModerationObject, ModerationObjectTypedDict from .moderationresponse import ModerationResponse, ModerationResponseTypedDict from .networkencodedinput import NetworkEncodedInput, NetworkEncodedInputTypedDict + from .oauth2token import OAuth2Token, OAuth2TokenTypedDict from .oauth2tokenauth import OAuth2TokenAuth, OAuth2TokenAuthTypedDict from .observabilityerrorcode import ObservabilityErrorCode from .observabilityerrordetail import ( @@ -1460,6 +1523,10 @@ from .processingstatus import ProcessingStatus, ProcessingStatusTypedDict from .processstatus import ProcessStatus from .prompttokensdetails import PromptTokensDetails, PromptTokensDetailsTypedDict + from .publicauthenticationmethod import ( + PublicAuthenticationMethod, + PublicAuthenticationMethodTypedDict, + ) from .query_workflow_execution_v1_workflows_executions_execution_id_queries_postop import ( QueryWorkflowExecutionV1WorkflowsExecutionsExecutionIDQueriesPostRequest, QueryWorkflowExecutionV1WorkflowsExecutionsExecutionIDQueriesPostRequestTypedDict, @@ -1660,6 +1727,18 @@ TempoTraceAttributeValue, TempoTraceAttributeValueTypedDict, ) + from .tempotraceattributearraycontainer import ( + TempoTraceAttributeArrayContainer, + TempoTraceAttributeArrayContainerTypedDict, + ) + from .tempotraceattributearrayelement import ( + TempoTraceAttributeArrayElement, + TempoTraceAttributeArrayElementTypedDict, + ) + from .tempotraceattributearrayvalue import ( + TempoTraceAttributeArrayValue, + TempoTraceAttributeArrayValueTypedDict, + ) from .tempotraceattributeboolvalue import ( TempoTraceAttributeBoolValue, TempoTraceAttributeBoolValueTypedDict, @@ -2217,6 +2296,9 @@ "AuthDataTypedDict", "AuthURLResponse", "AuthURLResponseTypedDict", + "AuthenticationConfiguration", + "AuthenticationConfigurationTypedDict", + "AuthenticationType", "Authorization", "AuthorizationTypedDict", "BaseFieldDefinition", @@ -2351,21 +2433,45 @@ "CompletionTrainingParametersTypedDict", "ConfidenceScoresGranularity", "Confirmation", + "ConnectionCredentials", + "ConnectionCredentialsTypedDict", "Connector", + "ConnectorAuthenticationHeader", + "ConnectorAuthenticationHeaderTypedDict", "ConnectorCallToolRequest", "ConnectorCallToolRequestTypedDict", "ConnectorCallToolV1Request", "ConnectorCallToolV1RequestTypedDict", + "ConnectorCreateOrUpdateOrganizationCredentialsV1Request", + "ConnectorCreateOrUpdateOrganizationCredentialsV1RequestTypedDict", + "ConnectorCreateOrUpdateUserCredentialsV1Request", + "ConnectorCreateOrUpdateUserCredentialsV1RequestTypedDict", + "ConnectorCreateOrUpdateWorkspaceCredentialsV1Request", + "ConnectorCreateOrUpdateWorkspaceCredentialsV1RequestTypedDict", + "ConnectorDeleteOrganizationCredentialsV1Request", + "ConnectorDeleteOrganizationCredentialsV1RequestTypedDict", + "ConnectorDeleteUserCredentialsV1Request", + "ConnectorDeleteUserCredentialsV1RequestTypedDict", "ConnectorDeleteV1Request", "ConnectorDeleteV1RequestTypedDict", + "ConnectorDeleteWorkspaceCredentialsV1Request", + "ConnectorDeleteWorkspaceCredentialsV1RequestTypedDict", "ConnectorGetAuthURLV1Request", "ConnectorGetAuthURLV1RequestTypedDict", + "ConnectorGetAuthenticationMethodsV1Request", + "ConnectorGetAuthenticationMethodsV1RequestTypedDict", "ConnectorGetV1Request", "ConnectorGetV1RequestTypedDict", + "ConnectorListOrganizationCredentialsV1Request", + "ConnectorListOrganizationCredentialsV1RequestTypedDict", "ConnectorListToolsV1Request", "ConnectorListToolsV1RequestTypedDict", + "ConnectorListUserCredentialsV1Request", + "ConnectorListUserCredentialsV1RequestTypedDict", "ConnectorListV1Request", "ConnectorListV1RequestTypedDict", + "ConnectorListWorkspaceCredentialsV1Request", + "ConnectorListWorkspaceCredentialsV1RequestTypedDict", "ConnectorTool", "ConnectorToolCallMetadata", "ConnectorToolCallMetadataTypedDict", @@ -2468,6 +2574,10 @@ "CreateJudgeRequestTypedDict", "CreateLibraryRequest", "CreateLibraryRequestTypedDict", + "CredentialsCreateOrUpdate", + "CredentialsCreateOrUpdateTypedDict", + "CredentialsResponse", + "CredentialsResponseTypedDict", "CustomConnector", "CustomConnectorTypedDict", "CustomTaskCanceledAttributes", @@ -2758,6 +2868,8 @@ "ImportDatasetFromFileRequestTypedDict", "ImportDatasetFromPlaygroundRequest", "ImportDatasetFromPlaygroundRequestTypedDict", + "IngestionPipelineConfiguration", + "IngestionPipelineConfigurationTypedDict", "InputEntries", "InputEntriesTypedDict", "Inputs", @@ -2997,8 +3109,10 @@ "MultiPartBodyParamsTypedDict", "NetworkEncodedInput", "NetworkEncodedInputTypedDict", + "OAuth2Token", "OAuth2TokenAuth", "OAuth2TokenAuthTypedDict", + "OAuth2TokenTypedDict", "OCRConfidenceScore", "OCRConfidenceScoreTypedDict", "OCRImageObject", @@ -3068,6 +3182,8 @@ "ProcessingStatusTypedDict", "PromptTokensDetails", "PromptTokensDetailsTypedDict", + "PublicAuthenticationMethod", + "PublicAuthenticationMethodTypedDict", "QueryDefinition", "QueryDefinitionTypedDict", "QueryInvocationBody", @@ -3228,6 +3344,12 @@ "TempoGetTraceResponse", "TempoGetTraceResponseTypedDict", "TempoTraceAttribute", + "TempoTraceAttributeArrayContainer", + "TempoTraceAttributeArrayContainerTypedDict", + "TempoTraceAttributeArrayElement", + "TempoTraceAttributeArrayElementTypedDict", + "TempoTraceAttributeArrayValue", + "TempoTraceAttributeArrayValueTypedDict", "TempoTraceAttributeBoolValue", "TempoTraceAttributeBoolValueTypedDict", "TempoTraceAttributeIntValue", @@ -3660,6 +3782,9 @@ "AudioTranscriptionRequestStreamTypedDict": ".audiotranscriptionrequeststream", "AuthData": ".authdata", "AuthDataTypedDict": ".authdata", + "AuthenticationConfiguration": ".authenticationconfiguration", + "AuthenticationConfigurationTypedDict": ".authenticationconfiguration", + "AuthenticationType": ".authenticationtype", "AuthURLResponse": ".authurlresponse", "AuthURLResponseTypedDict": ".authurlresponse", "BaseFieldDefinition": ".basefielddefinition", @@ -3799,24 +3924,48 @@ "CompletionResponseStreamChoiceTypedDict": ".completionresponsestreamchoice", "CompletionTrainingParameters": ".completiontrainingparameters", "CompletionTrainingParametersTypedDict": ".completiontrainingparameters", + "ConnectionCredentials": ".connectioncredentials", + "ConnectionCredentialsTypedDict": ".connectioncredentials", "Connector": ".connector", "ConnectorTypedDict": ".connector", "ConnectorCallToolV1Request": ".connector_call_tool_v1op", "ConnectorCallToolV1RequestTypedDict": ".connector_call_tool_v1op", + "ConnectorCreateOrUpdateOrganizationCredentialsV1Request": ".connector_create_or_update_organization_credentials_v1op", + "ConnectorCreateOrUpdateOrganizationCredentialsV1RequestTypedDict": ".connector_create_or_update_organization_credentials_v1op", + "ConnectorCreateOrUpdateUserCredentialsV1Request": ".connector_create_or_update_user_credentials_v1op", + "ConnectorCreateOrUpdateUserCredentialsV1RequestTypedDict": ".connector_create_or_update_user_credentials_v1op", + "ConnectorCreateOrUpdateWorkspaceCredentialsV1Request": ".connector_create_or_update_workspace_credentials_v1op", + "ConnectorCreateOrUpdateWorkspaceCredentialsV1RequestTypedDict": ".connector_create_or_update_workspace_credentials_v1op", + "ConnectorDeleteOrganizationCredentialsV1Request": ".connector_delete_organization_credentials_v1op", + "ConnectorDeleteOrganizationCredentialsV1RequestTypedDict": ".connector_delete_organization_credentials_v1op", + "ConnectorDeleteUserCredentialsV1Request": ".connector_delete_user_credentials_v1op", + "ConnectorDeleteUserCredentialsV1RequestTypedDict": ".connector_delete_user_credentials_v1op", "ConnectorDeleteV1Request": ".connector_delete_v1op", "ConnectorDeleteV1RequestTypedDict": ".connector_delete_v1op", + "ConnectorDeleteWorkspaceCredentialsV1Request": ".connector_delete_workspace_credentials_v1op", + "ConnectorDeleteWorkspaceCredentialsV1RequestTypedDict": ".connector_delete_workspace_credentials_v1op", "ConnectorGetAuthURLV1Request": ".connector_get_auth_url_v1op", "ConnectorGetAuthURLV1RequestTypedDict": ".connector_get_auth_url_v1op", + "ConnectorGetAuthenticationMethodsV1Request": ".connector_get_authentication_methods_v1op", + "ConnectorGetAuthenticationMethodsV1RequestTypedDict": ".connector_get_authentication_methods_v1op", "ConnectorGetV1Request": ".connector_get_v1op", "ConnectorGetV1RequestTypedDict": ".connector_get_v1op", + "ConnectorListOrganizationCredentialsV1Request": ".connector_list_organization_credentials_v1op", + "ConnectorListOrganizationCredentialsV1RequestTypedDict": ".connector_list_organization_credentials_v1op", "ConnectorListToolsV1Request": ".connector_list_tools_v1op", "ConnectorListToolsV1RequestTypedDict": ".connector_list_tools_v1op", "ResponseConnectorListToolsV1": ".connector_list_tools_v1op", "ResponseConnectorListToolsV1TypedDict": ".connector_list_tools_v1op", + "ConnectorListUserCredentialsV1Request": ".connector_list_user_credentials_v1op", + "ConnectorListUserCredentialsV1RequestTypedDict": ".connector_list_user_credentials_v1op", "ConnectorListV1Request": ".connector_list_v1op", "ConnectorListV1RequestTypedDict": ".connector_list_v1op", + "ConnectorListWorkspaceCredentialsV1Request": ".connector_list_workspace_credentials_v1op", + "ConnectorListWorkspaceCredentialsV1RequestTypedDict": ".connector_list_workspace_credentials_v1op", "ConnectorUpdateV1Request": ".connector_update_v1op", "ConnectorUpdateV1RequestTypedDict": ".connector_update_v1op", + "ConnectorAuthenticationHeader": ".connectorauthenticationheader", + "ConnectorAuthenticationHeaderTypedDict": ".connectorauthenticationheader", "ConnectorCallToolRequest": ".connectorcalltoolrequest", "ConnectorCallToolRequestTypedDict": ".connectorcalltoolrequest", "ConnectorsQueryFilters": ".connectorsqueryfilters", @@ -3923,6 +4072,10 @@ "CreateJudgeRequestTypedDict": ".createjudgerequest", "CreateLibraryRequest": ".createlibraryrequest", "CreateLibraryRequestTypedDict": ".createlibraryrequest", + "CredentialsCreateOrUpdate": ".credentialscreateorupdate", + "CredentialsCreateOrUpdateTypedDict": ".credentialscreateorupdate", + "CredentialsResponse": ".credentialsresponse", + "CredentialsResponseTypedDict": ".credentialsresponse", "Authorization": ".customconnector", "AuthorizationTypedDict": ".customconnector", "CustomConnector": ".customconnector", @@ -4223,6 +4376,8 @@ "ImportDatasetFromFileRequestTypedDict": ".importdatasetfromfilerequest", "ImportDatasetFromPlaygroundRequest": ".importdatasetfromplaygroundrequest", "ImportDatasetFromPlaygroundRequestTypedDict": ".importdatasetfromplaygroundrequest", + "IngestionPipelineConfiguration": ".ingestionpipelineconfiguration", + "IngestionPipelineConfigurationTypedDict": ".ingestionpipelineconfiguration", "InputEntries": ".inputentries", "InputEntriesTypedDict": ".inputentries", "Inputs": ".inputs", @@ -4477,6 +4632,8 @@ "ModerationResponseTypedDict": ".moderationresponse", "NetworkEncodedInput": ".networkencodedinput", "NetworkEncodedInputTypedDict": ".networkencodedinput", + "OAuth2Token": ".oauth2token", + "OAuth2TokenTypedDict": ".oauth2token", "OAuth2TokenAuth": ".oauth2tokenauth", "OAuth2TokenAuthTypedDict": ".oauth2tokenauth", "ObservabilityErrorCode": ".observabilityerrorcode", @@ -4544,6 +4701,8 @@ "ProcessStatus": ".processstatus", "PromptTokensDetails": ".prompttokensdetails", "PromptTokensDetailsTypedDict": ".prompttokensdetails", + "PublicAuthenticationMethod": ".publicauthenticationmethod", + "PublicAuthenticationMethodTypedDict": ".publicauthenticationmethod", "QueryWorkflowExecutionV1WorkflowsExecutionsExecutionIDQueriesPostRequest": ".query_workflow_execution_v1_workflows_executions_execution_id_queries_postop", "QueryWorkflowExecutionV1WorkflowsExecutionsExecutionIDQueriesPostRequestTypedDict": ".query_workflow_execution_v1_workflows_executions_execution_id_queries_postop", "QueryDefinition": ".querydefinition", @@ -4692,6 +4851,12 @@ "TempoTraceAttributeTypedDict": ".tempotraceattribute", "TempoTraceAttributeValue": ".tempotraceattribute", "TempoTraceAttributeValueTypedDict": ".tempotraceattribute", + "TempoTraceAttributeArrayContainer": ".tempotraceattributearraycontainer", + "TempoTraceAttributeArrayContainerTypedDict": ".tempotraceattributearraycontainer", + "TempoTraceAttributeArrayElement": ".tempotraceattributearrayelement", + "TempoTraceAttributeArrayElementTypedDict": ".tempotraceattributearrayelement", + "TempoTraceAttributeArrayValue": ".tempotraceattributearrayvalue", + "TempoTraceAttributeArrayValueTypedDict": ".tempotraceattributearrayvalue", "TempoTraceAttributeBoolValue": ".tempotraceattributeboolvalue", "TempoTraceAttributeBoolValueTypedDict": ".tempotraceattributeboolvalue", "TempoTraceAttributeIntValue": ".tempotraceattributeintvalue", diff --git a/src/mistralai/client/models/authenticationconfiguration.py b/src/mistralai/client/models/authenticationconfiguration.py new file mode 100644 index 00000000..c2ea5f94 --- /dev/null +++ b/src/mistralai/client/models/authenticationconfiguration.py @@ -0,0 +1,39 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 97b5056c29fb + +from __future__ import annotations +from .authenticationtype import AuthenticationType +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class AuthenticationConfigurationTypedDict(TypedDict): + name: str + authentication_type: AuthenticationType + is_default: NotRequired[bool] + + +class AuthenticationConfiguration(BaseModel): + name: str + + authentication_type: AuthenticationType + + is_default: Optional[bool] = False + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["is_default"]) + 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/authenticationtype.py b/src/mistralai/client/models/authenticationtype.py new file mode 100644 index 00000000..f5827174 --- /dev/null +++ b/src/mistralai/client/models/authenticationtype.py @@ -0,0 +1,16 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: b403278039c5 + +from __future__ import annotations +from mistralai.client.types import UnrecognizedStr +from typing import Literal, Union + + +AuthenticationType = Union[ + Literal[ + "oauth2", + "bearer", + "none", + ], + UnrecognizedStr, +] diff --git a/src/mistralai/client/models/basefielddefinition.py b/src/mistralai/client/models/basefielddefinition.py index acf9cf8d..2b45183d 100644 --- a/src/mistralai/client/models/basefielddefinition.py +++ b/src/mistralai/client/models/basefielddefinition.py @@ -24,6 +24,7 @@ "BOOL", "TIMESTAMP", "ARRAY", + "MAP", ], UnrecognizedStr, ] diff --git a/src/mistralai/client/models/connectioncredentials.py b/src/mistralai/client/models/connectioncredentials.py new file mode 100644 index 00000000..de461057 --- /dev/null +++ b/src/mistralai/client/models/connectioncredentials.py @@ -0,0 +1,54 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 2f4a79b452fb + +from __future__ import annotations +from .oauth2token import OAuth2Token, OAuth2TokenTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Dict +from typing_extensions import NotRequired, TypedDict + + +class ConnectionCredentialsTypedDict(TypedDict): + oauth: NotRequired[Nullable[OAuth2TokenTypedDict]] + headers: NotRequired[Nullable[Dict[str, str]]] + bearer_token: NotRequired[Nullable[str]] + + +class ConnectionCredentials(BaseModel): + oauth: OptionalNullable[OAuth2Token] = UNSET + + headers: OptionalNullable[Dict[str, str]] = UNSET + + bearer_token: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["oauth", "headers", "bearer_token"]) + nullable_fields = set(["oauth", "headers", "bearer_token"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/connector.py b/src/mistralai/client/models/connector.py index 55730274..e7b83ed4 100644 --- a/src/mistralai/client/models/connector.py +++ b/src/mistralai/client/models/connector.py @@ -2,7 +2,6 @@ # @generated-id: 1a4facac922d from __future__ import annotations -from .connectortool import ConnectorTool, ConnectorToolTypedDict from datetime import datetime from mistralai.client.types import ( BaseModel, @@ -12,7 +11,6 @@ UNSET_SENTINEL, ) from pydantic import model_serializer -from typing import List from typing_extensions import NotRequired, TypedDict @@ -24,7 +22,6 @@ class ConnectorTypedDict(TypedDict): modified_at: datetime server: NotRequired[Nullable[str]] auth_type: NotRequired[Nullable[str]] - tools: NotRequired[Nullable[List[ConnectorToolTypedDict]]] class Connector(BaseModel): @@ -42,12 +39,10 @@ class Connector(BaseModel): auth_type: OptionalNullable[str] = UNSET - tools: OptionalNullable[List[ConnectorTool]] = UNSET - @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["server", "auth_type", "tools"]) - nullable_fields = set(["server", "auth_type", "tools"]) + optional_fields = set(["server", "auth_type"]) + nullable_fields = set(["server", "auth_type"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/connector_create_or_update_organization_credentials_v1op.py b/src/mistralai/client/models/connector_create_or_update_organization_credentials_v1op.py new file mode 100644 index 00000000..f66d73d3 --- /dev/null +++ b/src/mistralai/client/models/connector_create_or_update_organization_credentials_v1op.py @@ -0,0 +1,27 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 57c711e81d89 + +from __future__ import annotations +from .credentialscreateorupdate import ( + CredentialsCreateOrUpdate, + CredentialsCreateOrUpdateTypedDict, +) +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class ConnectorCreateOrUpdateOrganizationCredentialsV1RequestTypedDict(TypedDict): + connector_id_or_name: str + credentials_create_or_update: CredentialsCreateOrUpdateTypedDict + + +class ConnectorCreateOrUpdateOrganizationCredentialsV1Request(BaseModel): + connector_id_or_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + credentials_create_or_update: Annotated[ + CredentialsCreateOrUpdate, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/connector_create_or_update_user_credentials_v1op.py b/src/mistralai/client/models/connector_create_or_update_user_credentials_v1op.py new file mode 100644 index 00000000..338d4f39 --- /dev/null +++ b/src/mistralai/client/models/connector_create_or_update_user_credentials_v1op.py @@ -0,0 +1,27 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 6ededc839b03 + +from __future__ import annotations +from .credentialscreateorupdate import ( + CredentialsCreateOrUpdate, + CredentialsCreateOrUpdateTypedDict, +) +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class ConnectorCreateOrUpdateUserCredentialsV1RequestTypedDict(TypedDict): + connector_id_or_name: str + credentials_create_or_update: CredentialsCreateOrUpdateTypedDict + + +class ConnectorCreateOrUpdateUserCredentialsV1Request(BaseModel): + connector_id_or_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + credentials_create_or_update: Annotated[ + CredentialsCreateOrUpdate, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/connector_create_or_update_workspace_credentials_v1op.py b/src/mistralai/client/models/connector_create_or_update_workspace_credentials_v1op.py new file mode 100644 index 00000000..43b3c1dc --- /dev/null +++ b/src/mistralai/client/models/connector_create_or_update_workspace_credentials_v1op.py @@ -0,0 +1,27 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 7795b085704b + +from __future__ import annotations +from .credentialscreateorupdate import ( + CredentialsCreateOrUpdate, + CredentialsCreateOrUpdateTypedDict, +) +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class ConnectorCreateOrUpdateWorkspaceCredentialsV1RequestTypedDict(TypedDict): + connector_id_or_name: str + credentials_create_or_update: CredentialsCreateOrUpdateTypedDict + + +class ConnectorCreateOrUpdateWorkspaceCredentialsV1Request(BaseModel): + connector_id_or_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + credentials_create_or_update: Annotated[ + CredentialsCreateOrUpdate, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/connector_delete_organization_credentials_v1op.py b/src/mistralai/client/models/connector_delete_organization_credentials_v1op.py new file mode 100644 index 00000000..6cdb0c31 --- /dev/null +++ b/src/mistralai/client/models/connector_delete_organization_credentials_v1op.py @@ -0,0 +1,22 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: aab3a70dbbc5 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class ConnectorDeleteOrganizationCredentialsV1RequestTypedDict(TypedDict): + credentials_name: str + connector_id_or_name: str + + +class ConnectorDeleteOrganizationCredentialsV1Request(BaseModel): + credentials_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + connector_id_or_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/connector_delete_user_credentials_v1op.py b/src/mistralai/client/models/connector_delete_user_credentials_v1op.py new file mode 100644 index 00000000..40d25aab --- /dev/null +++ b/src/mistralai/client/models/connector_delete_user_credentials_v1op.py @@ -0,0 +1,22 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 8bf2075ebdbf + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class ConnectorDeleteUserCredentialsV1RequestTypedDict(TypedDict): + credentials_name: str + connector_id_or_name: str + + +class ConnectorDeleteUserCredentialsV1Request(BaseModel): + credentials_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + connector_id_or_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/connector_delete_workspace_credentials_v1op.py b/src/mistralai/client/models/connector_delete_workspace_credentials_v1op.py new file mode 100644 index 00000000..a746ff5e --- /dev/null +++ b/src/mistralai/client/models/connector_delete_workspace_credentials_v1op.py @@ -0,0 +1,22 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 4f0993c25ece + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class ConnectorDeleteWorkspaceCredentialsV1RequestTypedDict(TypedDict): + credentials_name: str + connector_id_or_name: str + + +class ConnectorDeleteWorkspaceCredentialsV1Request(BaseModel): + credentials_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + connector_id_or_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/connector_get_auth_url_v1op.py b/src/mistralai/client/models/connector_get_auth_url_v1op.py index f8f5fd78..10f42827 100644 --- a/src/mistralai/client/models/connector_get_auth_url_v1op.py +++ b/src/mistralai/client/models/connector_get_auth_url_v1op.py @@ -17,6 +17,7 @@ class ConnectorGetAuthURLV1RequestTypedDict(TypedDict): connector_id_or_name: str app_return_url: NotRequired[Nullable[str]] + credentials_name: NotRequired[Nullable[str]] class ConnectorGetAuthURLV1Request(BaseModel): @@ -29,10 +30,15 @@ class ConnectorGetAuthURLV1Request(BaseModel): FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = UNSET + credentials_name: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["app_return_url"]) - nullable_fields = set(["app_return_url"]) + optional_fields = set(["app_return_url", "credentials_name"]) + nullable_fields = set(["app_return_url", "credentials_name"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/connector_get_authentication_methods_v1op.py b/src/mistralai/client/models/connector_get_authentication_methods_v1op.py new file mode 100644 index 00000000..e0c4146d --- /dev/null +++ b/src/mistralai/client/models/connector_get_authentication_methods_v1op.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 6861e4d57959 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class ConnectorGetAuthenticationMethodsV1RequestTypedDict(TypedDict): + connector_id_or_name: str + + +class ConnectorGetAuthenticationMethodsV1Request(BaseModel): + connector_id_or_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/connector_list_organization_credentials_v1op.py b/src/mistralai/client/models/connector_list_organization_credentials_v1op.py new file mode 100644 index 00000000..a20fa2a4 --- /dev/null +++ b/src/mistralai/client/models/connector_list_organization_credentials_v1op.py @@ -0,0 +1,63 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: a52ee058feab + +from __future__ import annotations +from .authenticationtype import AuthenticationType +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 import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ConnectorListOrganizationCredentialsV1RequestTypedDict(TypedDict): + connector_id_or_name: str + auth_type: NotRequired[Nullable[AuthenticationType]] + fetch_default: NotRequired[bool] + + +class ConnectorListOrganizationCredentialsV1Request(BaseModel): + connector_id_or_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + auth_type: Annotated[ + OptionalNullable[AuthenticationType], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + fetch_default: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["auth_type", "fetch_default"]) + nullable_fields = set(["auth_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)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/connector_list_tools_v1op.py b/src/mistralai/client/models/connector_list_tools_v1op.py index 030ffb2c..3e9905c3 100644 --- a/src/mistralai/client/models/connector_list_tools_v1op.py +++ b/src/mistralai/client/models/connector_list_tools_v1op.py @@ -4,7 +4,13 @@ from __future__ import annotations from .connectortool import ConnectorTool, ConnectorToolTypedDict from .mcptool import MCPTool, MCPToolTypedDict -from mistralai.client.types import BaseModel, UNSET_SENTINEL +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 import Any, Dict, List, Optional, Union @@ -18,6 +24,7 @@ class ConnectorListToolsV1RequestTypedDict(TypedDict): refresh: NotRequired[bool] pretty: NotRequired[bool] r"""Return a simplified payload with only name, description, annotations, and a compact inputSchema.""" + credentials_name: NotRequired[Nullable[str]] class ConnectorListToolsV1Request(BaseModel): @@ -46,18 +53,34 @@ class ConnectorListToolsV1Request(BaseModel): ] = False r"""Return a simplified payload with only name, description, annotations, and a compact inputSchema.""" + credentials_name: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["page", "page_size", "refresh", "pretty"]) + optional_fields = set( + ["page", "page_size", "refresh", "pretty", "credentials_name"] + ) + nullable_fields = set(["credentials_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: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): m[k] = val return m diff --git a/src/mistralai/client/models/connector_list_user_credentials_v1op.py b/src/mistralai/client/models/connector_list_user_credentials_v1op.py new file mode 100644 index 00000000..5b47ee83 --- /dev/null +++ b/src/mistralai/client/models/connector_list_user_credentials_v1op.py @@ -0,0 +1,63 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 106e8fba762d + +from __future__ import annotations +from .authenticationtype import AuthenticationType +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 import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ConnectorListUserCredentialsV1RequestTypedDict(TypedDict): + connector_id_or_name: str + auth_type: NotRequired[Nullable[AuthenticationType]] + fetch_default: NotRequired[bool] + + +class ConnectorListUserCredentialsV1Request(BaseModel): + connector_id_or_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + auth_type: Annotated[ + OptionalNullable[AuthenticationType], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + fetch_default: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["auth_type", "fetch_default"]) + nullable_fields = set(["auth_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)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/connector_list_workspace_credentials_v1op.py b/src/mistralai/client/models/connector_list_workspace_credentials_v1op.py new file mode 100644 index 00000000..ef0f096e --- /dev/null +++ b/src/mistralai/client/models/connector_list_workspace_credentials_v1op.py @@ -0,0 +1,63 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: de7c431e8a54 + +from __future__ import annotations +from .authenticationtype import AuthenticationType +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 import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ConnectorListWorkspaceCredentialsV1RequestTypedDict(TypedDict): + connector_id_or_name: str + auth_type: NotRequired[Nullable[AuthenticationType]] + fetch_default: NotRequired[bool] + + +class ConnectorListWorkspaceCredentialsV1Request(BaseModel): + connector_id_or_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + auth_type: Annotated[ + OptionalNullable[AuthenticationType], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + fetch_default: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["auth_type", "fetch_default"]) + nullable_fields = set(["auth_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)) + 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/connectorauthenticationheader.py b/src/mistralai/client/models/connectorauthenticationheader.py new file mode 100644 index 00000000..5fc073f0 --- /dev/null +++ b/src/mistralai/client/models/connectorauthenticationheader.py @@ -0,0 +1,38 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 7271f22f39b0 + +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 ConnectorAuthenticationHeaderTypedDict(TypedDict): + name: str + is_required: NotRequired[bool] + is_secret: NotRequired[bool] + + +class ConnectorAuthenticationHeader(BaseModel): + name: str + + is_required: Optional[bool] = True + + is_secret: Optional[bool] = True + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["is_required", "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/credentialscreateorupdate.py b/src/mistralai/client/models/credentialscreateorupdate.py new file mode 100644 index 00000000..0766a4d3 --- /dev/null +++ b/src/mistralai/client/models/credentialscreateorupdate.py @@ -0,0 +1,63 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 9927546f2487 + +from __future__ import annotations +from .connectioncredentials import ConnectionCredentials, ConnectionCredentialsTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class CredentialsCreateOrUpdateTypedDict(TypedDict): + r"""Request to create or update non-OAuth2 credentials for a connector.""" + + name: str + r"""Name of the credentials. Use this name to access or modify your credentials.""" + is_default: NotRequired[Nullable[bool]] + r"""Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged.""" + credentials: NotRequired[Nullable[ConnectionCredentialsTypedDict]] + r"""The credential data (headers, bearer_token).""" + + +class CredentialsCreateOrUpdate(BaseModel): + r"""Request to create or update non-OAuth2 credentials for a connector.""" + + name: str + r"""Name of the credentials. Use this name to access or modify your credentials.""" + + is_default: OptionalNullable[bool] = UNSET + r"""Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged.""" + + credentials: OptionalNullable[ConnectionCredentials] = UNSET + r"""The credential data (headers, bearer_token).""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["is_default", "credentials"]) + nullable_fields = set(["is_default", "credentials"]) + 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/credentialsresponse.py b/src/mistralai/client/models/credentialsresponse.py new file mode 100644 index 00000000..4c6a41ab --- /dev/null +++ b/src/mistralai/client/models/credentialsresponse.py @@ -0,0 +1,40 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 80cc6fb316f9 + +from __future__ import annotations +from .authenticationconfiguration import ( + AuthenticationConfiguration, + AuthenticationConfigurationTypedDict, +) +from .authenticationtype import AuthenticationType +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class CredentialsResponseTypedDict(TypedDict): + credentials: List[AuthenticationConfigurationTypedDict] + connector_preset_credentials_for_auth: NotRequired[List[AuthenticationType]] + + +class CredentialsResponse(BaseModel): + credentials: List[AuthenticationConfiguration] + + connector_preset_credentials_for_auth: Optional[List[AuthenticationType]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["connector_preset_credentials_for_auth"]) + 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/ingestionpipelineconfiguration.py b/src/mistralai/client/models/ingestionpipelineconfiguration.py new file mode 100644 index 00000000..5aaa6a40 --- /dev/null +++ b/src/mistralai/client/models/ingestionpipelineconfiguration.py @@ -0,0 +1,24 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: b4746c0f2c1c + +from __future__ import annotations +from datetime import datetime +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class IngestionPipelineConfigurationTypedDict(TypedDict): + id: str + name: str + created_at: datetime + modified_at: datetime + + +class IngestionPipelineConfiguration(BaseModel): + id: str + + name: str + + created_at: datetime + + modified_at: datetime diff --git a/src/mistralai/client/models/list_runs_v1_workflows_runs_getop.py b/src/mistralai/client/models/list_runs_v1_workflows_runs_getop.py index e61140cf..3237a29a 100644 --- a/src/mistralai/client/models/list_runs_v1_workflows_runs_getop.py +++ b/src/mistralai/client/models/list_runs_v1_workflows_runs_getop.py @@ -41,6 +41,8 @@ class ListRunsV1WorkflowsRunsGetRequestTypedDict(TypedDict): r"""Search by workflow name, display name or id""" status: NotRequired[Nullable[ListRunsV1WorkflowsRunsGetStatusTypedDict]] r"""Filter by workflow status""" + user_id: NotRequired[Nullable[str]] + r"""Filter by user id. Use 'current' to filter by the authenticated user""" page_size: NotRequired[int] r"""Number of items per page""" next_page_token: NotRequired[Nullable[str]] @@ -66,6 +68,12 @@ class ListRunsV1WorkflowsRunsGetRequest(BaseModel): ] = UNSET r"""Filter by workflow status""" + user_id: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Filter by user id. Use 'current' to filter by the authenticated user""" + page_size: Annotated[ Optional[int], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), @@ -81,10 +89,17 @@ class ListRunsV1WorkflowsRunsGetRequest(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( - ["workflow_identifier", "search", "status", "page_size", "next_page_token"] + [ + "workflow_identifier", + "search", + "status", + "user_id", + "page_size", + "next_page_token", + ] ) nullable_fields = set( - ["workflow_identifier", "search", "status", "next_page_token"] + ["workflow_identifier", "search", "status", "user_id", "next_page_token"] ) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/oauth2token.py b/src/mistralai/client/models/oauth2token.py new file mode 100644 index 00000000..0887216b --- /dev/null +++ b/src/mistralai/client/models/oauth2token.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 6153dd0f41bc + +from __future__ import annotations +from datetime import datetime +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + 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, NotRequired, TypedDict + + +class OAuth2TokenTypedDict(TypedDict): + access_token: str + token_type: Literal["Bearer"] + expires_in: NotRequired[Nullable[int]] + scope: NotRequired[Nullable[str]] + refresh_token: NotRequired[Nullable[str]] + expires_at: NotRequired[Nullable[datetime]] + + +class OAuth2Token(BaseModel): + access_token: str + + token_type: Annotated[ + Annotated[ + Optional[Literal["Bearer"]], AfterValidator(validate_const("Bearer")) + ], + pydantic.Field(alias="token_type"), + ] = "Bearer" + + expires_in: OptionalNullable[int] = UNSET + + scope: OptionalNullable[str] = UNSET + + refresh_token: OptionalNullable[str] = UNSET + + expires_at: OptionalNullable[datetime] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["token_type", "expires_in", "scope", "refresh_token", "expires_at"] + ) + nullable_fields = set(["expires_in", "scope", "refresh_token", "expires_at"]) + 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 + + +try: + OAuth2Token.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/publicauthenticationmethod.py b/src/mistralai/client/models/publicauthenticationmethod.py new file mode 100644 index 00000000..3351b432 --- /dev/null +++ b/src/mistralai/client/models/publicauthenticationmethod.py @@ -0,0 +1,59 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 545ab7f24523 + +from __future__ import annotations +from .authenticationtype import AuthenticationType +from .connectorauthenticationheader import ( + ConnectorAuthenticationHeader, + ConnectorAuthenticationHeaderTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class PublicAuthenticationMethodTypedDict(TypedDict): + r"""Public view of an authentication method, without secrets.""" + + method_type: AuthenticationType + headers: NotRequired[Nullable[List[ConnectorAuthenticationHeaderTypedDict]]] + + +class PublicAuthenticationMethod(BaseModel): + r"""Public view of an authentication method, without secrets.""" + + method_type: AuthenticationType + + headers: OptionalNullable[List[ConnectorAuthenticationHeader]] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["headers"]) + nullable_fields = set(["headers"]) + 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/tempotraceattribute.py b/src/mistralai/client/models/tempotraceattribute.py index 71c1b1f2..dea530ea 100644 --- a/src/mistralai/client/models/tempotraceattribute.py +++ b/src/mistralai/client/models/tempotraceattribute.py @@ -2,6 +2,10 @@ # @generated-id: 7d0ec3402dc0 from __future__ import annotations +from .tempotraceattributearrayvalue import ( + TempoTraceAttributeArrayValue, + TempoTraceAttributeArrayValueTypedDict, +) from .tempotraceattributeboolvalue import ( TempoTraceAttributeBoolValue, TempoTraceAttributeBoolValueTypedDict, @@ -25,6 +29,7 @@ TempoTraceAttributeStringValueTypedDict, TempoTraceAttributeIntValueTypedDict, TempoTraceAttributeBoolValueTypedDict, + TempoTraceAttributeArrayValueTypedDict, ], ) r"""The value of the attribute""" @@ -36,6 +41,7 @@ TempoTraceAttributeStringValue, TempoTraceAttributeIntValue, TempoTraceAttributeBoolValue, + TempoTraceAttributeArrayValue, ], ) r"""The value of the attribute""" diff --git a/src/mistralai/client/models/tempotraceattributearraycontainer.py b/src/mistralai/client/models/tempotraceattributearraycontainer.py new file mode 100644 index 00000000..08206037 --- /dev/null +++ b/src/mistralai/client/models/tempotraceattributearraycontainer.py @@ -0,0 +1,38 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: afca3b2e0b21 + +from __future__ import annotations +from .tempotraceattributearrayelement import ( + TempoTraceAttributeArrayElement, + TempoTraceAttributeArrayElementTypedDict, +) +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class TempoTraceAttributeArrayContainerTypedDict(TypedDict): + values: NotRequired[List[TempoTraceAttributeArrayElementTypedDict]] + r"""The values of the array""" + + +class TempoTraceAttributeArrayContainer(BaseModel): + values: Optional[List[TempoTraceAttributeArrayElement]] = None + r"""The values of the array""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["values"]) + 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/tempotraceattributearrayelement.py b/src/mistralai/client/models/tempotraceattributearrayelement.py new file mode 100644 index 00000000..6fa0ec60 --- /dev/null +++ b/src/mistralai/client/models/tempotraceattributearrayelement.py @@ -0,0 +1,71 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 4f3b1d9264a3 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing_extensions import Annotated, NotRequired, TypedDict + + +class TempoTraceAttributeArrayElementTypedDict(TypedDict): + string_value: NotRequired[Nullable[str]] + r"""A string element in the array""" + int_value: NotRequired[Nullable[str]] + r"""An integer element in the array""" + bool_value: NotRequired[Nullable[bool]] + r"""A boolean element in the array""" + + +class TempoTraceAttributeArrayElement(BaseModel): + string_value: Annotated[ + OptionalNullable[str], pydantic.Field(alias="stringValue") + ] = UNSET + r"""A string element in the array""" + + int_value: Annotated[OptionalNullable[str], pydantic.Field(alias="intValue")] = ( + UNSET + ) + r"""An integer element in the array""" + + bool_value: Annotated[OptionalNullable[bool], pydantic.Field(alias="boolValue")] = ( + UNSET + ) + r"""A boolean element in the array""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["stringValue", "intValue", "boolValue"]) + nullable_fields = set(["stringValue", "intValue", "boolValue"]) + 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 + + +try: + TempoTraceAttributeArrayElement.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/tempotraceattributearrayvalue.py b/src/mistralai/client/models/tempotraceattributearrayvalue.py new file mode 100644 index 00000000..95fe337e --- /dev/null +++ b/src/mistralai/client/models/tempotraceattributearrayvalue.py @@ -0,0 +1,27 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: d75dd416f9e3 + +from __future__ import annotations +from .tempotraceattributearraycontainer import ( + TempoTraceAttributeArrayContainer, + TempoTraceAttributeArrayContainerTypedDict, +) +from mistralai.client.types import BaseModel +import pydantic +from typing_extensions import Annotated, TypedDict + + +class TempoTraceAttributeArrayValueTypedDict(TypedDict): + array_value: TempoTraceAttributeArrayContainerTypedDict + + +class TempoTraceAttributeArrayValue(BaseModel): + array_value: Annotated[ + TempoTraceAttributeArrayContainer, pydantic.Field(alias="arrayValue") + ] + + +try: + TempoTraceAttributeArrayValue.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/workflow.py b/src/mistralai/client/models/workflow.py index 5edf326c..2eeac0dc 100644 --- a/src/mistralai/client/models/workflow.py +++ b/src/mistralai/client/models/workflow.py @@ -35,6 +35,8 @@ class WorkflowTypedDict(TypedDict): r"""Whether the workflow is available in chat assistant""" is_technical: NotRequired[bool] r"""Whether the workflow is technical (e.g. SDK-managed)""" + on_behalf_of: NotRequired[bool] + r"""Whether the workflow must run associated to a user's identity""" archived: NotRequired[bool] r"""Whether the workflow is archived""" @@ -69,6 +71,9 @@ class Workflow(BaseModel): is_technical: Optional[bool] = False r"""Whether the workflow is technical (e.g. SDK-managed)""" + on_behalf_of: Optional[bool] = False + r"""Whether the workflow must run associated to a user's identity""" + archived: Optional[bool] = False r"""Whether the workflow is archived""" @@ -80,6 +85,7 @@ def serialize_model(self, handler): "shared_namespace", "available_in_chat_assistant", "is_technical", + "on_behalf_of", "archived", ] ) diff --git a/src/mistralai/client/models/workflowcodedefinition.py b/src/mistralai/client/models/workflowcodedefinition.py index f71b9ff1..84444ce6 100644 --- a/src/mistralai/client/models/workflowcodedefinition.py +++ b/src/mistralai/client/models/workflowcodedefinition.py @@ -32,6 +32,8 @@ class WorkflowCodeDefinitionTypedDict(TypedDict): r"""Whether the workflow enforces deterministic execution""" execution_timeout: NotRequired[float] r"""Maximum total execution time including retries and continue-as-new""" + plugin_metadata: NotRequired[Nullable[Dict[str, Any]]] + r"""Plugin-specific metadata (e.g. connector declarations)""" class WorkflowCodeDefinition(BaseModel): @@ -56,6 +58,9 @@ class WorkflowCodeDefinition(BaseModel): execution_timeout: Optional[float] = None r"""Maximum total execution time including retries and continue-as-new""" + plugin_metadata: OptionalNullable[Dict[str, Any]] = UNSET + r"""Plugin-specific metadata (e.g. connector declarations)""" + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -66,9 +71,10 @@ def serialize_model(self, handler): "updates", "enforce_determinism", "execution_timeout", + "plugin_metadata", ] ) - nullable_fields = set(["output_schema"]) + nullable_fields = set(["output_schema", "plugin_metadata"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/workflowexecutionlistresponse.py b/src/mistralai/client/models/workflowexecutionlistresponse.py index 442ed972..b992bc8e 100644 --- a/src/mistralai/client/models/workflowexecutionlistresponse.py +++ b/src/mistralai/client/models/workflowexecutionlistresponse.py @@ -19,6 +19,8 @@ class WorkflowExecutionListResponseTypedDict(TypedDict): + r"""Deprecated: use WorkflowRunListResponse instead. Will be removed in the next major version.""" + executions: List[WorkflowExecutionWithoutResultResponseTypedDict] r"""A list of workflow executions""" next_page_token: NotRequired[Nullable[str]] @@ -26,6 +28,8 @@ class WorkflowExecutionListResponseTypedDict(TypedDict): class WorkflowExecutionListResponse(BaseModel): + r"""Deprecated: use WorkflowRunListResponse instead. Will be removed in the next major version.""" + executions: List[WorkflowExecutionWithoutResultResponse] r"""A list of workflow executions""" diff --git a/src/mistralai/client/models/workflowexecutionrequest.py b/src/mistralai/client/models/workflowexecutionrequest.py index 615276d3..e878b2f4 100644 --- a/src/mistralai/client/models/workflowexecutionrequest.py +++ b/src/mistralai/client/models/workflowexecutionrequest.py @@ -28,6 +28,8 @@ class WorkflowExecutionRequestTypedDict(TypedDict): timeout_seconds: NotRequired[Nullable[float]] r"""Maximum time to wait for completion when wait_for_result is true.""" custom_tracing_attributes: NotRequired[Nullable[Dict[str, str]]] + extensions: NotRequired[Nullable[Dict[str, Any]]] + r"""Plugin-specific data to propagate into WorkflowContext.extensions at execution time.""" task_queue: NotRequired[Nullable[str]] r"""Deprecated. Use deployment_name instead.""" deployment_name: NotRequired[Nullable[str]] @@ -52,6 +54,9 @@ class WorkflowExecutionRequest(BaseModel): custom_tracing_attributes: OptionalNullable[Dict[str, str]] = UNSET + extensions: OptionalNullable[Dict[str, Any]] = UNSET + r"""Plugin-specific data to propagate into WorkflowContext.extensions at execution time.""" + task_queue: Annotated[ OptionalNullable[str], pydantic.Field( @@ -73,6 +78,7 @@ def serialize_model(self, handler): "wait_for_result", "timeout_seconds", "custom_tracing_attributes", + "extensions", "task_queue", "deployment_name", ] @@ -84,6 +90,7 @@ def serialize_model(self, handler): "encoded_input", "timeout_seconds", "custom_tracing_attributes", + "extensions", "task_queue", "deployment_name", ] diff --git a/src/mistralai/client/models/workflowexecutionresponse.py b/src/mistralai/client/models/workflowexecutionresponse.py index 84398375..83179054 100644 --- a/src/mistralai/client/models/workflowexecutionresponse.py +++ b/src/mistralai/client/models/workflowexecutionresponse.py @@ -33,6 +33,8 @@ class WorkflowExecutionResponseTypedDict(TypedDict): r"""The result of the workflow execution, if available""" parent_execution_id: NotRequired[Nullable[str]] r"""The parent execution ID of the workflow execution""" + run_id: NotRequired[Nullable[str]] + r"""The unique run identifier (database UUID)""" total_duration_ms: NotRequired[Nullable[int]] r"""The total duration of the trace in milliseconds""" @@ -62,14 +64,24 @@ class WorkflowExecutionResponse(BaseModel): parent_execution_id: OptionalNullable[str] = UNSET r"""The parent execution ID of the workflow execution""" + run_id: OptionalNullable[str] = UNSET + r"""The unique run identifier (database UUID)""" + total_duration_ms: OptionalNullable[int] = UNSET r"""The total duration of the trace in milliseconds""" @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["parent_execution_id", "total_duration_ms"]) + optional_fields = set(["parent_execution_id", "run_id", "total_duration_ms"]) nullable_fields = set( - ["parent_execution_id", "status", "end_time", "total_duration_ms", "result"] + [ + "parent_execution_id", + "run_id", + "status", + "end_time", + "total_duration_ms", + "result", + ] ) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/workflowexecutiontraceeventsresponse.py b/src/mistralai/client/models/workflowexecutiontraceeventsresponse.py index 0c24a1ea..22853e9b 100644 --- a/src/mistralai/client/models/workflowexecutiontraceeventsresponse.py +++ b/src/mistralai/client/models/workflowexecutiontraceeventsresponse.py @@ -56,6 +56,8 @@ class WorkflowExecutionTraceEventsResponseTypedDict(TypedDict): r"""The result of the workflow execution, if available""" parent_execution_id: NotRequired[Nullable[str]] r"""The parent execution ID of the workflow execution""" + run_id: NotRequired[Nullable[str]] + r"""The unique run identifier (database UUID)""" total_duration_ms: NotRequired[Nullable[int]] r"""The total duration of the trace in milliseconds""" events: NotRequired[List[WorkflowExecutionTraceEventsResponseEventTypedDict]] @@ -87,6 +89,9 @@ class WorkflowExecutionTraceEventsResponse(BaseModel): parent_execution_id: OptionalNullable[str] = UNSET r"""The parent execution ID of the workflow execution""" + run_id: OptionalNullable[str] = UNSET + r"""The unique run identifier (database UUID)""" + total_duration_ms: OptionalNullable[int] = UNSET r"""The total duration of the trace in milliseconds""" @@ -95,9 +100,18 @@ class WorkflowExecutionTraceEventsResponse(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["parent_execution_id", "total_duration_ms", "events"]) + optional_fields = set( + ["parent_execution_id", "run_id", "total_duration_ms", "events"] + ) nullable_fields = set( - ["parent_execution_id", "status", "end_time", "total_duration_ms", "result"] + [ + "parent_execution_id", + "run_id", + "status", + "end_time", + "total_duration_ms", + "result", + ] ) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/workflowexecutiontraceotelresponse.py b/src/mistralai/client/models/workflowexecutiontraceotelresponse.py index b4320b83..46f5404e 100644 --- a/src/mistralai/client/models/workflowexecutiontraceotelresponse.py +++ b/src/mistralai/client/models/workflowexecutiontraceotelresponse.py @@ -36,6 +36,8 @@ class WorkflowExecutionTraceOTelResponseTypedDict(TypedDict): r"""The data source of the trace""" parent_execution_id: NotRequired[Nullable[str]] r"""The parent execution ID of the workflow execution""" + run_id: NotRequired[Nullable[str]] + r"""The unique run identifier (database UUID)""" total_duration_ms: NotRequired[Nullable[int]] r"""The total duration of the trace in milliseconds""" otel_trace_id: NotRequired[Nullable[str]] @@ -72,6 +74,9 @@ class WorkflowExecutionTraceOTelResponse(BaseModel): parent_execution_id: OptionalNullable[str] = UNSET r"""The parent execution ID of the workflow execution""" + run_id: OptionalNullable[str] = UNSET + r"""The unique run identifier (database UUID)""" + total_duration_ms: OptionalNullable[int] = UNSET r"""The total duration of the trace in milliseconds""" @@ -86,6 +91,7 @@ def serialize_model(self, handler): optional_fields = set( [ "parent_execution_id", + "run_id", "total_duration_ms", "otel_trace_id", "otel_trace_data", @@ -94,6 +100,7 @@ def serialize_model(self, handler): nullable_fields = set( [ "parent_execution_id", + "run_id", "status", "end_time", "total_duration_ms", diff --git a/src/mistralai/client/models/workflowexecutiontracesummaryattributesvalues.py b/src/mistralai/client/models/workflowexecutiontracesummaryattributesvalues.py index e288146d..1957662c 100644 --- a/src/mistralai/client/models/workflowexecutiontracesummaryattributesvalues.py +++ b/src/mistralai/client/models/workflowexecutiontracesummaryattributesvalues.py @@ -2,16 +2,17 @@ # @generated-id: 5e3448a39a40 from __future__ import annotations -from typing import Union +from typing import Any, List, Union from typing_extensions import TypeAliasType WorkflowExecutionTraceSummaryAttributesValuesTypedDict = TypeAliasType( "WorkflowExecutionTraceSummaryAttributesValuesTypedDict", - Union[str, int, float, bool], + Union[str, int, float, bool, List[Any]], ) WorkflowExecutionTraceSummaryAttributesValues = TypeAliasType( - "WorkflowExecutionTraceSummaryAttributesValues", Union[str, int, float, bool] + "WorkflowExecutionTraceSummaryAttributesValues", + Union[str, int, float, bool, List[Any]], ) diff --git a/src/mistralai/client/models/workflowexecutiontracesummaryresponse.py b/src/mistralai/client/models/workflowexecutiontracesummaryresponse.py index d2cc7c6b..92e9a2a7 100644 --- a/src/mistralai/client/models/workflowexecutiontracesummaryresponse.py +++ b/src/mistralai/client/models/workflowexecutiontracesummaryresponse.py @@ -37,6 +37,8 @@ class WorkflowExecutionTraceSummaryResponseTypedDict(TypedDict): r"""The result of the workflow execution, if available""" parent_execution_id: NotRequired[Nullable[str]] r"""The parent execution ID of the workflow execution""" + run_id: NotRequired[Nullable[str]] + r"""The unique run identifier (database UUID)""" total_duration_ms: NotRequired[Nullable[int]] r"""The total duration of the trace in milliseconds""" span_tree: NotRequired[Nullable[WorkflowExecutionTraceSummarySpanTypedDict]] @@ -68,6 +70,9 @@ class WorkflowExecutionTraceSummaryResponse(BaseModel): parent_execution_id: OptionalNullable[str] = UNSET r"""The parent execution ID of the workflow execution""" + run_id: OptionalNullable[str] = UNSET + r"""The unique run identifier (database UUID)""" + total_duration_ms: OptionalNullable[int] = UNSET r"""The total duration of the trace in milliseconds""" @@ -76,10 +81,13 @@ class WorkflowExecutionTraceSummaryResponse(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["parent_execution_id", "total_duration_ms", "span_tree"]) + optional_fields = set( + ["parent_execution_id", "run_id", "total_duration_ms", "span_tree"] + ) nullable_fields = set( [ "parent_execution_id", + "run_id", "status", "end_time", "total_duration_ms", diff --git a/src/mistralai/client/models/workflowexecutionwithoutresultresponse.py b/src/mistralai/client/models/workflowexecutionwithoutresultresponse.py index 082653c8..5e7fe852 100644 --- a/src/mistralai/client/models/workflowexecutionwithoutresultresponse.py +++ b/src/mistralai/client/models/workflowexecutionwithoutresultresponse.py @@ -30,6 +30,8 @@ class WorkflowExecutionWithoutResultResponseTypedDict(TypedDict): r"""The end time of the workflow execution, if available""" parent_execution_id: NotRequired[Nullable[str]] r"""The parent execution ID of the workflow execution""" + run_id: NotRequired[Nullable[str]] + r"""The unique run identifier (database UUID)""" total_duration_ms: NotRequired[Nullable[int]] r"""The total duration of the trace in milliseconds""" @@ -56,14 +58,17 @@ class WorkflowExecutionWithoutResultResponse(BaseModel): parent_execution_id: OptionalNullable[str] = UNSET r"""The parent execution ID of the workflow execution""" + run_id: OptionalNullable[str] = UNSET + r"""The unique run identifier (database UUID)""" + total_duration_ms: OptionalNullable[int] = UNSET r"""The total duration of the trace in milliseconds""" @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["parent_execution_id", "total_duration_ms"]) + optional_fields = set(["parent_execution_id", "run_id", "total_duration_ms"]) nullable_fields = set( - ["parent_execution_id", "status", "end_time", "total_duration_ms"] + ["parent_execution_id", "run_id", "status", "end_time", "total_duration_ms"] ) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/workflowwithworkerstatus.py b/src/mistralai/client/models/workflowwithworkerstatus.py index 7f469007..81030e21 100644 --- a/src/mistralai/client/models/workflowwithworkerstatus.py +++ b/src/mistralai/client/models/workflowwithworkerstatus.py @@ -37,6 +37,8 @@ class WorkflowWithWorkerStatusTypedDict(TypedDict): r"""Whether the workflow is available in chat assistant""" is_technical: NotRequired[bool] r"""Whether the workflow is technical (e.g. SDK-managed)""" + on_behalf_of: NotRequired[bool] + r"""Whether the workflow must run associated to a user's identity""" archived: NotRequired[bool] r"""Whether the workflow is archived""" @@ -74,6 +76,9 @@ class WorkflowWithWorkerStatus(BaseModel): is_technical: Optional[bool] = False r"""Whether the workflow is technical (e.g. SDK-managed)""" + on_behalf_of: Optional[bool] = False + r"""Whether the workflow must run associated to a user's identity""" + archived: Optional[bool] = False r"""Whether the workflow is archived""" @@ -85,6 +90,7 @@ def serialize_model(self, handler): "shared_namespace", "available_in_chat_assistant", "is_technical", + "on_behalf_of", "archived", ] ) diff --git a/src/mistralai/client/rag.py b/src/mistralai/client/rag.py new file mode 100644 index 00000000..091b0270 --- /dev/null +++ b/src/mistralai/client/rag.py @@ -0,0 +1,25 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 2c2b641de1b6 + +from .basesdk import BaseSDK +from .sdkconfiguration import SDKConfiguration +from mistralai.client.ingestion_pipeline_configurations import ( + IngestionPipelineConfigurations, +) +from typing import Optional + + +class Rag(BaseSDK): + ingestion_pipeline_configurations: IngestionPipelineConfigurations + + 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.ingestion_pipeline_configurations = IngestionPipelineConfigurations( + self.sdk_configuration, parent_ref=self.parent_ref + ) diff --git a/src/mistralai/client/runs.py b/src/mistralai/client/runs.py index 08394802..031564ad 100644 --- a/src/mistralai/client/runs.py +++ b/src/mistralai/client/runs.py @@ -23,6 +23,7 @@ def list_runs( models.ListRunsV1WorkflowsRunsGetStatusTypedDict, ] ] = UNSET, + user_id: OptionalNullable[str] = UNSET, page_size: Optional[int] = 50, next_page_token: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -35,6 +36,7 @@ def list_runs( :param workflow_identifier: Filter by workflow name or id :param search: Search by workflow name, display name or id :param status: Filter by workflow status + :param user_id: Filter by user id. Use 'current' to filter by the authenticated user :param page_size: Number of items per page :param next_page_token: Token for the next page of results :param retries: Override the default retry configuration for this method @@ -59,6 +61,7 @@ def list_runs( workflow_identifier=workflow_identifier, search=search, status=status, + user_id=user_id, page_size=page_size, next_page_token=next_page_token, ) @@ -125,6 +128,7 @@ def next_func() -> Optional[models.ListRunsV1WorkflowsRunsGetResponse]: workflow_identifier=workflow_identifier, search=search, status=status, + user_id=user_id, page_size=page_size, next_page_token=next_cursor, retries=retries, @@ -166,6 +170,7 @@ async def list_runs_async( models.ListRunsV1WorkflowsRunsGetStatusTypedDict, ] ] = UNSET, + user_id: OptionalNullable[str] = UNSET, page_size: Optional[int] = 50, next_page_token: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -178,6 +183,7 @@ async def list_runs_async( :param workflow_identifier: Filter by workflow name or id :param search: Search by workflow name, display name or id :param status: Filter by workflow status + :param user_id: Filter by user id. Use 'current' to filter by the authenticated user :param page_size: Number of items per page :param next_page_token: Token for the next page of results :param retries: Override the default retry configuration for this method @@ -202,6 +208,7 @@ async def list_runs_async( workflow_identifier=workflow_identifier, search=search, status=status, + user_id=user_id, page_size=page_size, next_page_token=next_page_token, ) @@ -273,6 +280,7 @@ async def empty_result(): workflow_identifier=workflow_identifier, search=search, status=status, + user_id=user_id, page_size=page_size, next_page_token=next_cursor, retries=retries, diff --git a/src/mistralai/client/voices.py b/src/mistralai/client/voices.py index c4f1a71e..b95fd11d 100644 --- a/src/mistralai/client/voices.py +++ b/src/mistralai/client/voices.py @@ -2,6 +2,7 @@ # @generated-id: ab76b1377d79 from .basesdk import BaseSDK +import httpx from mistralai.client import errors, models, utils from mistralai.client._hooks import HookContext from mistralai.client.types import OptionalNullable, UNSET @@ -1069,7 +1070,7 @@ def get_sample_audio( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> str: + ) -> httpx.Response: r"""Get voice sample audio Get the audio sample for a voice @@ -1107,7 +1108,7 @@ def get_sample_audio( request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", - accept_header_value="application/json", + accept_header_value="audio/wav", http_headers=http_headers, security=self.sdk_configuration.security, allow_empty_value=None, @@ -1134,17 +1135,19 @@ def get_sample_audio( ), request=req, error_status_codes=["422", "4XX", "5XX"], + stream=True, retry_config=retry_config, ) response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(str, http_res) + if utils.match_response(http_res, "200", "audio/wav"): + return http_res if utils.match_response(http_res, "422", "application/json"): + http_res_text = utils.stream_to_text(http_res) response_data = unmarshal_json_response( - errors.HTTPValidationErrorData, http_res + errors.HTTPValidationErrorData, http_res, http_res_text ) - raise errors.HTTPValidationError(response_data, http_res) + raise errors.HTTPValidationError(response_data, http_res, http_res_text) 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) @@ -1152,7 +1155,8 @@ def get_sample_audio( 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) + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("Unexpected response received", http_res, http_res_text) async def get_sample_audio_async( self, @@ -1162,7 +1166,7 @@ async def get_sample_audio_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> str: + ) -> httpx.Response: r"""Get voice sample audio Get the audio sample for a voice @@ -1200,7 +1204,7 @@ async def get_sample_audio_async( request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", - accept_header_value="application/json", + accept_header_value="audio/wav", http_headers=http_headers, security=self.sdk_configuration.security, allow_empty_value=None, @@ -1227,17 +1231,19 @@ async def get_sample_audio_async( ), request=req, error_status_codes=["422", "4XX", "5XX"], + stream=True, retry_config=retry_config, ) response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(str, http_res) + if utils.match_response(http_res, "200", "audio/wav"): + return http_res if utils.match_response(http_res, "422", "application/json"): + http_res_text = await utils.stream_to_text_async(http_res) response_data = unmarshal_json_response( - errors.HTTPValidationErrorData, http_res + errors.HTTPValidationErrorData, http_res, http_res_text ) - raise errors.HTTPValidationError(response_data, http_res) + raise errors.HTTPValidationError(response_data, http_res, http_res_text) 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) @@ -1245,4 +1251,5 @@ async def get_sample_audio_async( 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) + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("Unexpected response received", http_res, http_res_text) diff --git a/src/mistralai/client/workflows.py b/src/mistralai/client/workflows.py index cd34603a..14d0f1f6 100644 --- a/src/mistralai/client/workflows.py +++ b/src/mistralai/client/workflows.py @@ -789,6 +789,7 @@ def execute_workflow( wait_for_result: Optional[bool] = False, timeout_seconds: OptionalNullable[float] = UNSET, custom_tracing_attributes: OptionalNullable[Dict[str, str]] = UNSET, + extensions: OptionalNullable[Dict[str, Any]] = UNSET, task_queue: OptionalNullable[str] = UNSET, deployment_name: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -805,6 +806,7 @@ def execute_workflow( :param wait_for_result: If true, wait for the workflow to complete and return the result directly. :param timeout_seconds: Maximum time to wait for completion when wait_for_result is true. :param custom_tracing_attributes: + :param extensions: Plugin-specific data to propagate into WorkflowContext.extensions at execution time. :param task_queue: Deprecated. Use deployment_name instead. :param deployment_name: Name of the deployment to route this execution to :param retries: Override the default retry configuration for this method @@ -836,6 +838,7 @@ def execute_workflow( wait_for_result=wait_for_result, timeout_seconds=timeout_seconds, custom_tracing_attributes=custom_tracing_attributes, + extensions=extensions, task_queue=task_queue, deployment_name=deployment_name, ), @@ -920,6 +923,7 @@ async def execute_workflow_async( wait_for_result: Optional[bool] = False, timeout_seconds: OptionalNullable[float] = UNSET, custom_tracing_attributes: OptionalNullable[Dict[str, str]] = UNSET, + extensions: OptionalNullable[Dict[str, Any]] = UNSET, task_queue: OptionalNullable[str] = UNSET, deployment_name: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -936,6 +940,7 @@ async def execute_workflow_async( :param wait_for_result: If true, wait for the workflow to complete and return the result directly. :param timeout_seconds: Maximum time to wait for completion when wait_for_result is true. :param custom_tracing_attributes: + :param extensions: Plugin-specific data to propagate into WorkflowContext.extensions at execution time. :param task_queue: Deprecated. Use deployment_name instead. :param deployment_name: Name of the deployment to route this execution to :param retries: Override the default retry configuration for this method @@ -967,6 +972,7 @@ async def execute_workflow_async( wait_for_result=wait_for_result, timeout_seconds=timeout_seconds, custom_tracing_attributes=custom_tracing_attributes, + extensions=extensions, task_queue=task_queue, deployment_name=deployment_name, ), @@ -1054,6 +1060,7 @@ def execute_workflow_registration( wait_for_result: Optional[bool] = False, timeout_seconds: OptionalNullable[float] = UNSET, custom_tracing_attributes: OptionalNullable[Dict[str, str]] = UNSET, + extensions: OptionalNullable[Dict[str, Any]] = UNSET, task_queue: OptionalNullable[str] = UNSET, deployment_name: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1070,6 +1077,7 @@ def execute_workflow_registration( :param wait_for_result: If true, wait for the workflow to complete and return the result directly. :param timeout_seconds: Maximum time to wait for completion when wait_for_result is true. :param custom_tracing_attributes: + :param extensions: Plugin-specific data to propagate into WorkflowContext.extensions at execution time. :param task_queue: Deprecated. Use deployment_name instead. :param deployment_name: Name of the deployment to route this execution to :param retries: Override the default retry configuration for this method @@ -1101,6 +1109,7 @@ def execute_workflow_registration( wait_for_result=wait_for_result, timeout_seconds=timeout_seconds, custom_tracing_attributes=custom_tracing_attributes, + extensions=extensions, task_queue=task_queue, deployment_name=deployment_name, ), @@ -1188,6 +1197,7 @@ async def execute_workflow_registration_async( wait_for_result: Optional[bool] = False, timeout_seconds: OptionalNullable[float] = UNSET, custom_tracing_attributes: OptionalNullable[Dict[str, str]] = UNSET, + extensions: OptionalNullable[Dict[str, Any]] = UNSET, task_queue: OptionalNullable[str] = UNSET, deployment_name: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1204,6 +1214,7 @@ async def execute_workflow_registration_async( :param wait_for_result: If true, wait for the workflow to complete and return the result directly. :param timeout_seconds: Maximum time to wait for completion when wait_for_result is true. :param custom_tracing_attributes: + :param extensions: Plugin-specific data to propagate into WorkflowContext.extensions at execution time. :param task_queue: Deprecated. Use deployment_name instead. :param deployment_name: Name of the deployment to route this execution to :param retries: Override the default retry configuration for this method @@ -1235,6 +1246,7 @@ async def execute_workflow_registration_async( wait_for_result=wait_for_result, timeout_seconds=timeout_seconds, custom_tracing_attributes=custom_tracing_attributes, + extensions=extensions, task_queue=task_queue, deployment_name=deployment_name, ), diff --git a/uv.lock b/uv.lock index 636bfa04..1b081d98 100644 --- a/uv.lock +++ b/uv.lock @@ -1015,7 +1015,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.4.0" +version = "2.4.1" source = { editable = "." } dependencies = [ { name = "eval-type-backport" },