From 900f7f74d91cb626e4fb657009fc7e07024a2299 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Wed, 29 Apr 2026 03:01:00 +0000 Subject: [PATCH 1/2] =?UTF-8?q?##=20Python=20SDK=20Changes:=20*=20`glean.c?= =?UTF-8?q?lient.collections.add=5Fitems()`:=20=20`response.error.error=5F?= =?UTF-8?q?type.enum(corrupt=5Fitem)`=20**Added**=20(Breaking=20=E2=9A=A0?= =?UTF-8?q?=EF=B8=8F)=20*=20`glean.datasources.get=5Fdatasource=5Fcredenti?= =?UTF-8?q?al=5Fstatus()`:=20**Added**=20*=20`glean.datasources.rotate=5Fd?= =?UTF-8?q?atasource=5Fcredentials()`:=20**Added**=20*=20`glean.client.col?= =?UTF-8?q?lections.create()`:=20=20=20*=20=20`response.union(class=20(0))?= =?UTF-8?q?.error.error=5Fcode.enum(corrupt=5Fitem)`=20**Added**=20=20=20*?= =?UTF-8?q?=20=20`error=5Fcode.enum(corrupt=5Fitem)`=20**Added**=20*=20`gl?= =?UTF-8?q?ean.client.collections.delete()`:=20=20`error=5Fcode.enum(corru?= =?UTF-8?q?pt=5Fitem)`=20**Added**=20*=20`glean.client.collections.update(?= =?UTF-8?q?)`:=20=20=20*=20=20`response`=20**Changed**=20=20=20*=20=20`err?= =?UTF-8?q?or=5Fcode.enum(corrupt=5Fitem)`=20**Added**=20*=20`glean.client?= =?UTF-8?q?.collections.retrieve()`:=20=20`response.error.error=5Fcode.enu?= =?UTF-8?q?m(corrupt=5Fitem)`=20**Added**=20*=20`glean.client.insights.ret?= =?UTF-8?q?rieve()`:=20=20=20*=20=20`request.mcp=5Fbreakdown=5Frequest`=20?= =?UTF-8?q?**Added**=20=20=20*=20=20`response.agents=5Fresponse.top=5Fuse?= =?UTF-8?q?=5Fcases=5Finsights`=20**Added**=20*=20`glean.client.search.ret?= =?UTF-8?q?rieve=5Ffeed()`:=20=20=20*=20=20`request.categories[].enum(proj?= =?UTF-8?q?ect=5Ffocus=5Fblock)`=20**Added**=20=20=20*=20=20`response.resu?= =?UTF-8?q?lts[]`=20**Changed**?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .speakeasy/gen.lock | 299 ++++++++----- .speakeasy/gen.yaml | 2 +- .speakeasy/glean-merged-spec.yaml | 220 +++++++++- .speakeasy/tests.arazzo.yaml | 40 ++ .speakeasy/workflow.lock | 12 +- README.md | 2 + RELEASES.md | 12 +- .../addcollectionitemserrorerrortype.md | 5 +- docs/models/agentsinsightsv2response.md | 5 +- docs/models/agentusecaseinsight.md | 15 + docs/models/assistantinsightsresponse.md | 4 +- docs/models/breakdowntype.md | 21 + docs/models/collectionerrorerrorcode.md | 3 +- docs/models/currentactiveusers.md | 8 +- docs/models/datasourcecredentialstatus.md | 25 ++ .../datasourcecredentialstatusresponse.md | 13 + .../models/editcollectionresponseerrorcode.md | 3 +- docs/models/feedrequestcategory.md | 1 + docs/models/feedresultcategory.md | 1 + .../getdatasourcecredentialstatusrequest.md | 8 + docs/models/insightschatsummary.md | 4 +- docs/models/insightsoverviewresponse.md | 4 +- docs/models/insightsrequest.md | 1 + docs/models/insightssearchsummary.md | 4 +- docs/models/justificationtype.md | 1 + docs/models/mcpbreakdowninsightsrequest.md | 14 + .../rotatedatasourcecredentialsrequest.md | 12 + ...tatedatasourcecredentialsrequestrequest.md | 9 + docs/models/ugctype.md | 1 + docs/sdks/datasources/README.md | 92 ++++ docs/sdks/insights/README.md | 1 + pyproject.toml | 2 +- src/glean/api_client/_version.py | 6 +- src/glean/api_client/datasources.py | 400 ++++++++++++++++++ src/glean/api_client/insights.py | 20 + src/glean/api_client/models/__init__.py | 51 +++ .../models/addcollectionitemserror.py | 15 +- .../models/agentsinsightsv2response.py | 15 +- .../api_client/models/agentusecaseinsight.py | 95 +++++ .../models/assistantinsightsresponse.py | 8 +- .../api_client/models/collectionerror.py | 1 + .../api_client/models/currentactiveusers.py | 8 +- .../models/datasourcecredentialstatus.py | 15 + .../datasourcecredentialstatusresponse.py | 81 ++++ .../models/editcollectionresponse.py | 1 + src/glean/api_client/models/feedentry.py | 1 + src/glean/api_client/models/feedrequest.py | 1 + src/glean/api_client/models/feedresult.py | 1 + .../models/getdatasourcecredentialstatusop.py | 21 + .../api_client/models/insightschatsummary.py | 8 +- .../models/insightsoverviewresponse.py | 8 +- .../api_client/models/insightsrequest.py | 11 + .../models/insightssearchsummary.py | 8 +- .../models/mcpbreakdowninsightsrequest.py | 95 +++++ .../models/rotatedatasourcecredentialsop.py | 31 ++ .../rotatedatasourcecredentialsrequest.py | 29 ++ src/glean/api_client/models/ugctype.py | 1 + .../internal/handler/generated_handlers.go | 2 + ...rcedatasourceinstanceidcredentialstatus.go | 64 +++ ...tasourcedatasourceinstanceidcredentials.go | 69 +++ .../components/addcollectionitemserror.go | 3 + .../components/agentsinsightsv2response.go | 12 +- .../models/components/agentusecaseinsight.go | 78 ++++ .../components/assistantinsightsresponse.go | 4 +- .../sdk/models/components/collectionerror.go | 3 + .../models/components/currentactiveusers.go | 4 +- .../components/datasourcecredentialstatus.go | 44 ++ .../datasourcecredentialstatusresponse.go | 61 +++ .../components/editcollectionresponse.go | 3 + .../sdk/models/components/feedentry.go | 3 + .../sdk/models/components/feedrequest.go | 3 + .../sdk/models/components/feedresult.go | 3 + .../models/components/insightschatsummary.go | 4 +- .../components/insightsoverviewresponse.go | 4 +- .../sdk/models/components/insightsrequest.go | 14 +- .../components/insightssearchsummary.go | 4 +- .../components/mcpbreakdowninsightsrequest.go | 106 +++++ .../rotatedatasourcecredentialsrequest.go | 17 + .../internal/sdk/models/components/ugctype.go | 3 + .../getdatasourcecredentialstatus.go | 39 ++ .../operations/rotatedatasourcecredentials.go | 47 ++ tests/test_datasources.py | 37 ++ tests/test_summarize.py | 6 +- 83 files changed, 2237 insertions(+), 175 deletions(-) create mode 100644 docs/models/agentusecaseinsight.md create mode 100644 docs/models/breakdowntype.md create mode 100644 docs/models/datasourcecredentialstatus.md create mode 100644 docs/models/datasourcecredentialstatusresponse.md create mode 100644 docs/models/getdatasourcecredentialstatusrequest.md create mode 100644 docs/models/mcpbreakdowninsightsrequest.md create mode 100644 docs/models/rotatedatasourcecredentialsrequest.md create mode 100644 docs/models/rotatedatasourcecredentialsrequestrequest.md create mode 100644 src/glean/api_client/models/agentusecaseinsight.py create mode 100644 src/glean/api_client/models/datasourcecredentialstatus.py create mode 100644 src/glean/api_client/models/datasourcecredentialstatusresponse.py create mode 100644 src/glean/api_client/models/getdatasourcecredentialstatusop.py create mode 100644 src/glean/api_client/models/mcpbreakdowninsightsrequest.py create mode 100644 src/glean/api_client/models/rotatedatasourcecredentialsop.py create mode 100644 src/glean/api_client/models/rotatedatasourcecredentialsrequest.py create mode 100644 tests/mockserver/internal/handler/pathgetrestapiv1datasourcedatasourceinstanceidcredentialstatus.go create mode 100644 tests/mockserver/internal/handler/pathpostrestapiv1datasourcedatasourceinstanceidcredentials.go create mode 100644 tests/mockserver/internal/sdk/models/components/agentusecaseinsight.go create mode 100644 tests/mockserver/internal/sdk/models/components/datasourcecredentialstatus.go create mode 100644 tests/mockserver/internal/sdk/models/components/datasourcecredentialstatusresponse.go create mode 100644 tests/mockserver/internal/sdk/models/components/mcpbreakdowninsightsrequest.go create mode 100644 tests/mockserver/internal/sdk/models/components/rotatedatasourcecredentialsrequest.go create mode 100644 tests/mockserver/internal/sdk/models/operations/getdatasourcecredentialstatus.go create mode 100644 tests/mockserver/internal/sdk/models/operations/rotatedatasourcecredentials.go diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 239b5212..87067cbf 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 3e3290ca-0ee8-4981-b1bc-14536048fa63 management: - docChecksum: d8e27f2118bb2e9b6f10f3c87ad1abab + docChecksum: 575b21c4cc88c8e35421058c957def29 docVersion: 0.9.0 - speakeasyVersion: 1.761.8 - generationVersion: 2.881.2 - releaseVersion: 0.12.24 - configChecksum: 9cfd2ffe12f50ecc2330ef075db81617 + speakeasyVersion: 1.761.9 + generationVersion: 2.881.4 + releaseVersion: 0.12.25 + configChecksum: 2581bd242339b45d5ca64ca15a7fa62e repoURL: https://github.com/gleanwork/api-client-python.git installationURL: https://github.com/gleanwork/api-client-python.git published: true persistentEdits: - generation_id: ff1736a9-02f4-498c-ae0b-15f0a711a541 - pristine_commit_hash: 4369083872c3540a60d7faaf8d98778dce4951b4 - pristine_tree_hash: 7523ad87f407ff98c86ad1947fed200fc8278076 + generation_id: bb1ed03a-ed44-4169-a3a3-3f11b1a731c3 + pristine_commit_hash: 17eedb1f71cdcf8defa36e0c136d7f149a857a21 + pristine_tree_hash: 8adc3f01c43ad02a56eadfb6d23aa2ec9daba83c features: python: additionalDependencies: 1.0.0 @@ -111,8 +111,8 @@ trackedFiles: pristine_git_object: 31aa0600e412c0b6eae303d6ce4ff6a152f865bf docs/models/addcollectionitemserrorerrortype.md: id: 19bb11e23f98 - last_write_checksum: sha1:e8bbe6534ff70b1b2af9d28b4c8cb973740c7590 - pristine_git_object: 8a36415e53e937ea4f503df9a7f21c1595adcc49 + last_write_checksum: sha1:48722d7fe76382e5d457a8d0a6f1bdb93405eb39 + pristine_git_object: 761a12fef01d4fd9fe497b78376c1ee82a9201e5 docs/models/addcollectionitemsrequest.md: id: 77be3840df27 last_write_checksum: sha1:d3c2c8791ea4ad38979641f79b12473d5ef7b6af @@ -183,8 +183,8 @@ trackedFiles: pristine_git_object: fc4a769fd5f7f8c5e36e1eec936d9454f0f01242 docs/models/agentsinsightsv2response.md: id: c419d6511b8b - last_write_checksum: sha1:d49bd06daf5f273c6eebe93704178fd528d7cbb2 - pristine_git_object: dba88e1e980221c133143d71febe10860c6d6a11 + last_write_checksum: sha1:660b206505b7e2cc7181dda1e2b9e6acd76b09a3 + pristine_git_object: bde7e4fd054fb0e8b4b3c243370ba46ece9e8def docs/models/agentstimesavedinsight.md: id: c998db614c46 last_write_checksum: sha1:0653ac44dfc9ed51985aec9a129941b91501812a @@ -193,6 +193,10 @@ trackedFiles: id: 8e00b4ec28db last_write_checksum: sha1:ba6bc3369d70a9f8b0cd136e5ffa9318b54222d3 pristine_git_object: 4c36908d52176a2a907c75baa72220dd0c5b4af7 + docs/models/agentusecaseinsight.md: + id: 64232b208d9b + last_write_checksum: sha1:1b16c2e2fb1dfe9497529830dc32cd5cf746737b + pristine_git_object: 88a6bd23f65b896d244ac106cada2c2bf48be582 docs/models/agentusersinsight.md: id: d175e9ef2267 last_write_checksum: sha1:13186b89e562d1930304e5f822f47de768855397 @@ -259,8 +263,8 @@ trackedFiles: pristine_git_object: b1d37dea76990544293f38221b2314739c22ffaa docs/models/assistantinsightsresponse.md: id: 4da438a09c8e - last_write_checksum: sha1:d7e8d307918c8e317320b03306fd64f15da02e34 - pristine_git_object: 022c4ee4c9a283e7da5cb032c267577bd95cfba3 + last_write_checksum: sha1:79953a586b4b90fa67d44c370271de068b3d49f3 + pristine_git_object: d5cc0973f8bced08083dc8ad0ce7ff501668cedb docs/models/authconfig.md: id: fbdae66f0362 last_write_checksum: sha1:c565685e22f3411d4c4e50f089be513b3ba98187 @@ -321,6 +325,10 @@ trackedFiles: id: 1a875de7727e last_write_checksum: sha1:41161b237fd17651efebe457fac1d95052605a89 pristine_git_object: 06cf46df1c5e8e897928c57585c307b386f4aefb + docs/models/breakdowntype.md: + id: 852d76343384 + last_write_checksum: sha1:fb3820973b2df634462475d5bed0b75cc09dfa09 + pristine_git_object: dbe3672757339f9ecbbb904f50a7ba5924ee4a43 docs/models/bulkindexdocumentsrequest.md: id: ea279e5855b8 last_write_checksum: sha1:4ae80ed6fa8146e90de4818a30d46af50e9affaa @@ -495,8 +503,8 @@ trackedFiles: pristine_git_object: a6800fed5ba94f25934cdd5b8fe3fa6832f51239 docs/models/collectionerrorerrorcode.md: id: 0d8a5a9d335a - last_write_checksum: sha1:7cb1a3a783edc7357941821369116cb68b0425d0 - pristine_git_object: dd389508754a634c35757d43d84cde8c0d20cb06 + last_write_checksum: sha1:01673cf76ab5e3a3155835835ee98cba03fd4d35 + pristine_git_object: 2aedaf4ae1ab74dc735b8ebadf93561a9ac93a23 docs/models/collectionitem.md: id: 4960e28c5856 last_write_checksum: sha1:72297a3ca7b72b75a41a12073bb959e308051c65 @@ -635,8 +643,8 @@ trackedFiles: pristine_git_object: f3315390350a0db0d3eded212d626abc52c0c834 docs/models/currentactiveusers.md: id: 8c45d84c2408 - last_write_checksum: sha1:5a8633009fe928f98ba777a6392d0e33e6973f40 - pristine_git_object: 3852b41c29bd3a35ab1ffcb5953165590be3fbfa + last_write_checksum: sha1:74a4477b894de8d1caca58492504b472a82a94c2 + pristine_git_object: f5cb3add39de3d84535d0ff5cda036c3bf68d012 docs/models/customdatasourceconfig.md: id: dcc49d2f5f6e last_write_checksum: sha1:2d9a671f15e56ecd77c318817ca2828420f86119 @@ -721,6 +729,14 @@ trackedFiles: id: 7c6f38290f96 last_write_checksum: sha1:10c0068be581150ab5915785029e610bdf472ab5 pristine_git_object: ba3be1321e92d6af0bfdad972ec394d96dec7baf + docs/models/datasourcecredentialstatus.md: + id: b2c547314a78 + last_write_checksum: sha1:d9668e2b566cb7f7401035f4b517f0679b3c16bc + pristine_git_object: 546c77b9e9d419c6e9489314b72a535b80685c87 + docs/models/datasourcecredentialstatusresponse.md: + id: d513182b6b07 + last_write_checksum: sha1:62dfc54ae5c5732258745444162c57f34243c117 + pristine_git_object: 29641fd5e8b7176222bb063da21e360a6f188286 docs/models/datasourcegroupdefinition.md: id: 2b5e3862da5c last_write_checksum: sha1:594f0d360c5a2466e6492ca11e05a7c46c070208 @@ -1115,8 +1131,8 @@ trackedFiles: pristine_git_object: 5dfbdfbac68f01d833e8f80aeb37c18a9d709744 docs/models/editcollectionresponseerrorcode.md: id: 9040965d42e4 - last_write_checksum: sha1:255da65fe8ab153278ad5a5fababdcf95fa7cdc9 - pristine_git_object: 722a81f245ec5f464226b5ad2dbdc3817f9a81e9 + last_write_checksum: sha1:2298ba3c1f554536f5e219024b81bfd362fa37f7 + pristine_git_object: bc8f34aac40073035b752bcf860000a2c3af3f39 docs/models/editpinrequest.md: id: 14bb9e17a143 last_write_checksum: sha1:11e046873d7975a69c248dd6c640482531048289 @@ -1255,8 +1271,8 @@ trackedFiles: pristine_git_object: a851a7f13eb25d515fa9b9244c5dfdc98fa14e2c docs/models/feedrequestcategory.md: id: 31a02f3064c7 - last_write_checksum: sha1:58517f2ec589d8c087d00d12607f289252a7f33f - pristine_git_object: 1fb21bd08725048d355cbc1c5c857c12c51261a6 + last_write_checksum: sha1:22538c1577203bb6191e008ab2651442d0e95525 + pristine_git_object: 4964a0e6ac00d7d4751f91aaf5c740227ea8fa5c docs/models/feedrequestoptions.md: id: 58eb26b19e77 last_write_checksum: sha1:fd2ab08736cef8156169b0cfee8c52e7aed1accf @@ -1275,8 +1291,8 @@ trackedFiles: pristine_git_object: 6318b0206b7d4027b036e78c709ed4eb259ccedb docs/models/feedresultcategory.md: id: a5f77f38d0a7 - last_write_checksum: sha1:ffbc121700071a46f0d568b15c3d3deb8c557eab - pristine_git_object: 3e8ed01bd7e3b71e0ed0febcad89785a66697a71 + last_write_checksum: sha1:21a2ed12acbca845d7d01ae3867ed4508886b2fe + pristine_git_object: a5e91fb3cdd5ee7476b86bff1af8febe83459e58 docs/models/fieldscope.md: id: e6b52bcb22a6 last_write_checksum: sha1:13a1492ce39d2f89a01d626996a345a1339a1873 @@ -1389,6 +1405,10 @@ trackedFiles: id: 4cf100b4fe49 last_write_checksum: sha1:2209ee35f4f21791035a6785f464befc568e9afd pristine_git_object: 6bd845ab38a08ac7ec5473920c9d1f6567716ced + docs/models/getdatasourcecredentialstatusrequest.md: + id: 32c550529760 + last_write_checksum: sha1:e89cac63e998ebf2121aa0d35403d05e8b10d86f + pristine_git_object: 07c45dd2595db9f387e9dea158d9237d6edf67ae docs/models/getdatasourceinstanceconfigurationrequest.md: id: bb085196abd9 last_write_checksum: sha1:d2971d5d295c276de0cdcee2ba9d4b761b10f7b2 @@ -1623,20 +1643,20 @@ trackedFiles: pristine_git_object: 83e8e5b18918772469a7a6becf868e19f0f0fbce docs/models/insightschatsummary.md: id: 388233cb8df2 - last_write_checksum: sha1:4b6f147324b3af4319349981df3c17110edaac8b - pristine_git_object: ecbd7385eafde9fcf7c02695c219579bde24fbb0 + last_write_checksum: sha1:9b40b1d0d6a996c522a8c2346e6289670122f637 + pristine_git_object: 21fc84d49e3fe1f7b8cd2e68e044d28aa2165200 docs/models/insightsoverviewrequest.md: id: 568a56d1c6bb last_write_checksum: sha1:0eb7d62aa1a668ee46af0621bfa056be49bac3a4 pristine_git_object: 90e12f31c489fd3953b486a9ba20043f50362bc5 docs/models/insightsoverviewresponse.md: id: c980a8e3a69e - last_write_checksum: sha1:401a36a3c734feb582bb13208d630d3c1895f3c1 - pristine_git_object: 13a98a4c2c842d75c5769db52c11cf8cb04b523c + last_write_checksum: sha1:8e3fc0287695b2872bd9c4e4983a21190d852b88 + pristine_git_object: c4f579084bc0873d64375245d0bed3c877dc8cdf docs/models/insightsrequest.md: id: 13eaa34edff4 - last_write_checksum: sha1:4e221930c7d01a4a6756554a7af5fb4025821778 - pristine_git_object: 40dfc4f3abc7f9749038aa742d0ee32567a17ed5 + last_write_checksum: sha1:01c32d90e606bab3862f1f455d9d8ee1f34b5e0e + pristine_git_object: 3b78522a28a7c78d075752ce58c5566788efd7f2 docs/models/insightsrequestrequest.md: id: 567dcce50fab last_write_checksum: sha1:b550099f60580ba3cac9675a4e9515044be423b3 @@ -1647,8 +1667,8 @@ trackedFiles: pristine_git_object: 978393b0b1f3ef770fac269779f20a0b368ac5ef docs/models/insightssearchsummary.md: id: 9bf0ac766bf9 - last_write_checksum: sha1:f9a5b729b8c6ac37fc3669d134ea8f133aee3905 - pristine_git_object: d527f4369dfe54205992ca00a4c10514be12a581 + last_write_checksum: sha1:4133181c7716d5f1a0d83b9f933d60891ed8aac2 + pristine_git_object: 940085a00fdf0270f7e842ef9f6b4b7e79a0df4d docs/models/invalidoperatorvalueerror.md: id: ee6e58f56866 last_write_checksum: sha1:84827ee6331279f0148f3f299e05d30fec497f99 @@ -1663,8 +1683,8 @@ trackedFiles: pristine_git_object: 4203309096512cab077b45bc77906df389c01421 docs/models/justificationtype.md: id: 8286affacee4 - last_write_checksum: sha1:ba70b2081e85371b7732a04750fa98014b467627 - pristine_git_object: 156cd0971c6e03117a8d9f99cec7015d4f2da438 + last_write_checksum: sha1:29453bccafec24500296a5f2f14f1a0da29df3b1 + pristine_git_object: 7d5c6eb7f3d0c644c8a40c8e06ef2a155f86e4b9 docs/models/knowledgetype.md: id: 1e0c90679228 last_write_checksum: sha1:0030a7539b9362bbb59e0bbd36580676058b3540 @@ -1797,6 +1817,10 @@ trackedFiles: id: cf68b1f63cc7 last_write_checksum: sha1:6f62aad4e5e0583365e661548b8564d1b3c97e08 pristine_git_object: ba4cf618261dec6b6829099ec1760a6fd48bce10 + docs/models/mcpbreakdowninsightsrequest.md: + id: 8c3c8a81e52f + last_write_checksum: sha1:72dfbd10756a22436d9c78b0c03be673d3ab10e8 + pristine_git_object: 0e61ed0284f8902d5ea7f0d379f3b1daf305a39c docs/models/meeting.md: id: 823ab6288010 last_write_checksum: sha1:9efd1c28c84b767ea662cd26598364b032e35cf3 @@ -2137,6 +2161,14 @@ trackedFiles: id: b694540a5b1e last_write_checksum: sha1:9f88b67c2e11ff6d70d769beff80158190c7d5c8 pristine_git_object: f039c916bddf57012d6733253a30f781d61d9716 + docs/models/rotatedatasourcecredentialsrequest.md: + id: 426db1e134f1 + last_write_checksum: sha1:7046726cc6e2da03528c6df07f69dbd9c711f61c + pristine_git_object: 2074cc10e82ee45278f861502265168b24f02420 + docs/models/rotatedatasourcecredentialsrequestrequest.md: + id: b61a6cb42b82 + last_write_checksum: sha1:1f3ef55d822ce2ac387fdccbbc8c544a32edaa40 + pristine_git_object: 4a1765451a67573d800ddb567979645e031e5154 docs/models/rotatetokenresponse.md: id: bb8958b26e2a last_write_checksum: sha1:1a25b03ff78895912dbb7d50e6dfda816b67cb65 @@ -2431,8 +2463,8 @@ trackedFiles: pristine_git_object: c7f7adecc74cc4072799169c68332df2d8932c44 docs/models/ugctype.md: id: 675d62d57771 - last_write_checksum: sha1:24c94e0c1d55ef733d3c09cf44f550d1a34b5a5c - pristine_git_object: e71aeefa9a330bc28813fed5cca41340d7fe880d + last_write_checksum: sha1:3e8a26450f75770d3e6a4d65ef3531623d5fc931 + pristine_git_object: 6a011cee79127f8bd671e749223b2f362b971ad5 docs/models/uiconfig.md: id: c4d3817a701c last_write_checksum: sha1:dd422e5a1bbf9af85722cd43c5437716b8bb3017 @@ -2703,8 +2735,8 @@ trackedFiles: pristine_git_object: f311071e89056a0df703b15f5ebdd17de75e9488 docs/sdks/datasources/README.md: id: 024d3ed36945 - last_write_checksum: sha1:717afc78a8ff1b75fc467f73d7804507a7dbb848 - pristine_git_object: 03c2257dc739cd6b6bfc5b5201c2e962a04a4b32 + last_write_checksum: sha1:b5a9941e97b277f44d9dadbc615fabe0a3ecd750 + pristine_git_object: 15b97d59f6166a84e986bbd7466e40c665612424 docs/sdks/entities/README.md: id: a140ac5181b9 last_write_checksum: sha1:c5955573d5570bc98bb911311860abf4c85d19ac @@ -2739,8 +2771,8 @@ trackedFiles: pristine_git_object: 6d8cda7ab4483ef459462bbd02a38ff90befddd9 docs/sdks/insights/README.md: id: cc2be3db9032 - last_write_checksum: sha1:5b1bf1e8254a299da7c5fb3dc7bac0737a37ed9b - pristine_git_object: a11b3322738353b2f14b2f440fb7a8da07c87ac5 + last_write_checksum: sha1:56463667a6a4dc8e2136559c89c9f9eeb9070a6d + pristine_git_object: aa9f65ec7f94c6cc9c91ff7079dee3535d66397d docs/sdks/messages/README.md: id: 3f1f6d38fc33 last_write_checksum: sha1:6d327bcc514b9cc83209ec389e0f034ba9b9ebe8 @@ -2787,8 +2819,8 @@ trackedFiles: pristine_git_object: e2fda7fe263c2a111e53872e3ad5bc324b4dccfe pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:1476c3b7e14a27c26723cc7f3a476a4cbc766cc5 - pristine_git_object: 5f4520c8ae37f1be6e3b00f0fd53092c6f55a24e + last_write_checksum: sha1:3484dad371d5e392c56d2767bb721ebd64ac6f06 + pristine_git_object: 8bba69820ba731e758565e28b726343156348561 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:c2c83f71dea61eb50c9e05da83b16d18b4da8794 @@ -2815,8 +2847,8 @@ trackedFiles: pristine_git_object: 58c4d70ac1797b86ff5c4237cafbc344c42d8f64 src/glean/api_client/_version.py: id: 0ce22b26136b - last_write_checksum: sha1:0538e65f8fdd1206a7d8eaa1e9cef772202c7596 - pristine_git_object: f74aefe7e9cba3d88bfc95df27bbf172f41f3346 + last_write_checksum: sha1:e95544294fc7be86f2f6ea545d8c00a3c5db9837 + pristine_git_object: 07b9a3d3751d50812e7ad4f5753613421a029763 src/glean/api_client/agents.py: id: b925701a9217 last_write_checksum: sha1:e9608819a04566ba6e711f8f7cc9527d5dd095c9 @@ -2879,8 +2911,8 @@ trackedFiles: pristine_git_object: 756e122c3e258805290344aa6d978b351bcbfbf5 src/glean/api_client/datasources.py: id: 22aad0060f38 - last_write_checksum: sha1:14d5df86c10abf256a87b1ce9cd7703b2c425a38 - pristine_git_object: 9e10a0dbbaee3c3c5b7ca68c303c0cdd2e13b3f4 + last_write_checksum: sha1:a0b330a447ad966cada161f386964063e9fbf129 + pristine_git_object: e4eba5ec25fc89a9dc39f071cd304ae81c82b503 src/glean/api_client/entities.py: id: 38ebbab2f8a0 last_write_checksum: sha1:8e634fc3a45c9d0537692864d43c7aec863a0f0f @@ -2959,16 +2991,16 @@ trackedFiles: pristine_git_object: bdfdec85c7d5d5b2cd2cbd09fe5578a78b83c6aa src/glean/api_client/insights.py: id: 4c5708d15234 - last_write_checksum: sha1:046389427d68ff47fae409ef2cd4b91d1144fa28 - pristine_git_object: 69c096ed842d9c0766b7e5f7e4515059cc1b09ec + last_write_checksum: sha1:fa25876faa1d5c4de0e8e3b015ccde57f47056b4 + pristine_git_object: 79e1b592524c748fb6d9da1b00acfa66f9344e96 src/glean/api_client/messages.py: id: 3751db64257b last_write_checksum: sha1:f6c67c8ec112c9dbebb9e053c0e05868bbde14fa pristine_git_object: fd580d9a1b7770b488fc424b5f8735d8b9bf681e src/glean/api_client/models/__init__.py: id: d5f6ea5efcbe - last_write_checksum: sha1:1639cfb1dfa4c246c39ee46c77863c719496dbdd - pristine_git_object: 1a54febc4288800bfdbb82e1afdbe73a08a088a5 + last_write_checksum: sha1:d4316f8219ed803a5aeabfb2fdfc597b30984c96 + pristine_git_object: cf5633c54eae752c7ca5d556e183e02aefa2b896 src/glean/api_client/models/actionsummary.py: id: 34ccdf9f1526 last_write_checksum: sha1:cfefc6678a5612dc8d50f2b0074dc54bb88e00e0 @@ -2987,8 +3019,8 @@ trackedFiles: pristine_git_object: b084d4af9c37f9360038acba8620f6a928c8b3e0 src/glean/api_client/models/addcollectionitemserror.py: id: 331e64597a08 - last_write_checksum: sha1:9916a2da0c372d08b784e1b4bf0f069af6966af4 - pristine_git_object: aa8987c802029d1182fb7e93adc90b79b18298cc + last_write_checksum: sha1:d0b29d465ddf93d455e701a30f72ff9ae4d5b46e + pristine_git_object: 8f738ea36bf445ab6ccd08d111e6d64804c63bfe src/glean/api_client/models/addcollectionitemsop.py: id: b74e2acd56ce last_write_checksum: sha1:9fcffec0959386f010452d2f7b086a130b6ca0fd @@ -3047,8 +3079,8 @@ trackedFiles: pristine_git_object: 027fbade0c78c6974ff596ccf77a0149eeb7084b src/glean/api_client/models/agentsinsightsv2response.py: id: 2bb9ea2bc70e - last_write_checksum: sha1:9e985d3fa4e1bb005978c06ac7ce6d4e1801c35f - pristine_git_object: cf04728a8f53f60e72d88d6c9cb7396ba3c04ecb + last_write_checksum: sha1:611e126409f9670e1c5598a9c4e7b33b02a37ec3 + pristine_git_object: ae50b9b4074f162313733eb3893d4d1f2b7adfe2 src/glean/api_client/models/agentstimesavedinsight.py: id: a0f77b3b907e last_write_checksum: sha1:ade060149f91b527306789ab799f7aa5174416f5 @@ -3057,6 +3089,10 @@ trackedFiles: id: 50317bf09cb6 last_write_checksum: sha1:6ee545d0cdd6246b7b743870984e71276ab7dfd6 pristine_git_object: bcfd9c3071b5b45fcc0e64f404eb8e8f83e51cbe + src/glean/api_client/models/agentusecaseinsight.py: + id: 80df217107c6 + last_write_checksum: sha1:3885677fc8a2c8ca926e9186337a3265d0d99afc + pristine_git_object: 4841a4ed05f1d52a81306cec477439e716591ca8 src/glean/api_client/models/agentusersinsight.py: id: f40366a65563 last_write_checksum: sha1:8190b560df9c90f0728f4d752c68eea4c1834399 @@ -3099,8 +3135,8 @@ trackedFiles: pristine_git_object: 2105b7fe8cacbb74eab2c4d13bee7fe20af2c855 src/glean/api_client/models/assistantinsightsresponse.py: id: ce7387f28d84 - last_write_checksum: sha1:bc60749d512ef7134d12cb08a018312f28978746 - pristine_git_object: d6fa5492574a8b8fd863a26764f321e628d96cae + last_write_checksum: sha1:9b1c7809e56d14ec0441969ed7a7f2d39aa8d1bb + pristine_git_object: 47e9bf2fa2edbe605d30359bca3dbfebda8ed27b src/glean/api_client/models/authconfig.py: id: 9e88a246ee36 last_write_checksum: sha1:e25f69a5ddae03308bdbc2391ce3449de236b4ed @@ -3295,8 +3331,8 @@ trackedFiles: pristine_git_object: 9bd7d4bb696194c0c3f4ffa9f90fa5d5644fdc9f src/glean/api_client/models/collectionerror.py: id: 12c5118f6fba - last_write_checksum: sha1:f8671540bade2e1c8d978ffacae8c69e4ad94a06 - pristine_git_object: ef1aa0da4454c57c0c8d635bbe89d3961043c027 + last_write_checksum: sha1:cf7a03f5a1bd25339fdc3b1e8c5f32c8220b7f68 + pristine_git_object: 408d04c7efb648abee3688da44dd3488d75c6a9a src/glean/api_client/models/collectionitem.py: id: 42e837b333ec last_write_checksum: sha1:0ed5cb53712a6475a259437a0f8e6c3684d87303 @@ -3411,8 +3447,8 @@ trackedFiles: pristine_git_object: 7fd2e6eb90ed6027e2647312ca3550abc0292b74 src/glean/api_client/models/currentactiveusers.py: id: 0a092cf79074 - last_write_checksum: sha1:576704455fa223b1e2afd2f24522e1f6bdb73cb6 - pristine_git_object: 10c5f7792a3472b1089b7eb88e0bf68ebfa7ac7d + last_write_checksum: sha1:989717f16473a1c661194af34f9940eb00a26e01 + pristine_git_object: 1236b65335edafb09cc59136ce8049c614a1a289 src/glean/api_client/models/customdatasourceconfig.py: id: fb9b6a1441c1 last_write_checksum: sha1:61fd17497a8f0eb3a2eeccd8eec68a2a30cc548a @@ -3481,6 +3517,14 @@ trackedFiles: id: e9a385b637e9 last_write_checksum: sha1:69a5dd2f67380cfe0fa0bc5c37eddb5796560ffc pristine_git_object: 15b227d993619ed946b21ec7e94a9d31b968b195 + src/glean/api_client/models/datasourcecredentialstatus.py: + id: 696bcc7a5acd + last_write_checksum: sha1:9d043a2c2388221d1dc855b49073921f21679026 + pristine_git_object: aa0eff706ec10f1be7de240201bf023fbb9ef20a + src/glean/api_client/models/datasourcecredentialstatusresponse.py: + id: 074326c64a8e + last_write_checksum: sha1:a1ad12bdaf0facaabae021755bb9890ecd06c2a4 + pristine_git_object: 150f1a4855d49f84282f7227f6e5c5b4c59a0ce1 src/glean/api_client/models/datasourcegroupdefinition.py: id: f7c84882fbcf last_write_checksum: sha1:324acffd92e4e0753b7c3238f17d41f6ea66d5d3 @@ -3799,8 +3843,8 @@ trackedFiles: pristine_git_object: 7a4edd70390dec12ae19ebdd044da70cc945f836 src/glean/api_client/models/editcollectionresponse.py: id: d5021e1e02ea - last_write_checksum: sha1:aa52ba2435dc9636cf73136895c15b9374337cfa - pristine_git_object: dcd4373fec82d8f630753ea407a4275b7843479a + last_write_checksum: sha1:515f9fc61d560032f2ad01fe95a6bda04b3f26ec + pristine_git_object: 0ad3f0838a6792f5ceb689f4134208ca0aab8904 src/glean/api_client/models/editpinop.py: id: ccf2c7c31a0e last_write_checksum: sha1:4283c5ec511a7e85a96bfab308fc38974421eade @@ -3907,16 +3951,16 @@ trackedFiles: pristine_git_object: 44041cb376d89949c815ea1e7813505940605855 src/glean/api_client/models/feedentry.py: id: 023eb6c10ae1 - last_write_checksum: sha1:3e15b90e8410b4480a1d12514d37e4b0c8d2a79d - pristine_git_object: cec9f210e41dee0635ae103375b648352b1f8c44 + last_write_checksum: sha1:c7f684e7388185ef44165d9c533d9afd5ee37335 + pristine_git_object: 53432284ebcae2fc04c863b32c030f690c9f6f4a src/glean/api_client/models/feedop.py: id: b8067ac0a127 last_write_checksum: sha1:c58cb0a3a01925eb14d84176c5c6e9d8f4d84cf1 pristine_git_object: f39626285f84630e5a9233736d652914b759d44b src/glean/api_client/models/feedrequest.py: id: 33496b6a5bab - last_write_checksum: sha1:60a53b71711257c59e75eff14db94945c7c85f8f - pristine_git_object: 0362ce883b3d1479568f6e6f75918055e6b61d08 + last_write_checksum: sha1:2ebbe9769cf70cb417e5ababc9879bd40b6622b9 + pristine_git_object: 8e60652f6a21f7a68a7fea6bee40fe56b3769885 src/glean/api_client/models/feedrequestoptions.py: id: b99003fbf522 last_write_checksum: sha1:d5ffee29242075cbe6d2dd5ec916b0c3d40acf54 @@ -3927,8 +3971,8 @@ trackedFiles: pristine_git_object: 683438c837601f483526ec18756fadc7222edb24 src/glean/api_client/models/feedresult.py: id: ae187332b37a - last_write_checksum: sha1:18a24d8a6db6ae5e6ad7286608f5f7f3fe2dde7a - pristine_git_object: 475fbb42d71fd9b8b1396c311ba6641c991a89a2 + last_write_checksum: sha1:ac681919b24b3b9c302a6239adec86f7b8dce029 + pristine_git_object: 0d9d6a2367c3937f77086512386173d26f767d9f src/glean/api_client/models/followupaction.py: id: e2de5c4c8524 last_write_checksum: sha1:49e1a826449081fecfcd828c940604db949a8533 @@ -4025,6 +4069,10 @@ trackedFiles: id: 42b2eeea0fdc last_write_checksum: sha1:72e44bdd713ea77abbd991bd01e7f433cd2443ea pristine_git_object: 0fa42a25ca61cb0ca2430b59780801adc55c754b + src/glean/api_client/models/getdatasourcecredentialstatusop.py: + id: 64da1ac902da + last_write_checksum: sha1:a7cfa1bf95b035c19e26f4625a554b56245135bc + pristine_git_object: d693ed5408ae3fe6182b1f7aaa640d40e33439ca src/glean/api_client/models/getdatasourceinstanceconfigurationop.py: id: 2d3c120f1d97 last_write_checksum: sha1:18081db02ec047f57c1ca29fb90201fa33d69cd2 @@ -4215,8 +4263,8 @@ trackedFiles: pristine_git_object: 88e40106f45e787691ddfe772098384b898365c5 src/glean/api_client/models/insightschatsummary.py: id: 06b2f68e597d - last_write_checksum: sha1:931b0ef589cdc9faac95e1a3abab4f5bd9d0de8e - pristine_git_object: fcc83ccdc8fb1b89bc42ef7206c9596a7dcf34df + last_write_checksum: sha1:8373f3ae3e4e5397c33dd77dd4217cd7995f5a13 + pristine_git_object: 44b76c5ac9d5a612baa304d4cae9fbb08f0afece src/glean/api_client/models/insightsop.py: id: ded0a3337a07 last_write_checksum: sha1:c88dc9426f3a524eab216f55c273173413447622 @@ -4227,20 +4275,20 @@ trackedFiles: pristine_git_object: 5be6e4bb1a8d0f3625ca6ba7fcb6267f6b42d9e5 src/glean/api_client/models/insightsoverviewresponse.py: id: 9f278319d18c - last_write_checksum: sha1:c03228439f793e5145f2414d5c25720410183a8b - pristine_git_object: 23c45162da573641d191560050eacbfbfb773518 + last_write_checksum: sha1:c5edbc6af785678ec534083ed89d8c6e660e2dfc + pristine_git_object: 5dca066c5148f2a181668058b35363016d09caab src/glean/api_client/models/insightsrequest.py: id: 72fbc9d1c47b - last_write_checksum: sha1:ba897351884e324f6b7005cbb8ea6893186d1448 - pristine_git_object: 9138fc7087357f540293c573302d6ef0a0101b78 + last_write_checksum: sha1:c4eab65acf977c569ddf37802c343689117d8997 + pristine_git_object: 4323beb9b43e56a321c63a465e62b37f4715fb25 src/glean/api_client/models/insightsresponse.py: id: 8d5ce8feb796 last_write_checksum: sha1:20b2916b5e4ad8e1c61aecc6db451cc53646873a pristine_git_object: f93836b93c65f446dfc388b0b6583ebc11231cab src/glean/api_client/models/insightssearchsummary.py: id: 876b12a69ab5 - last_write_checksum: sha1:7be50f5e2dddb2f3094df9a8c04e58269ebd9803 - pristine_git_object: 4e4c5b9dcae56b99f4aa481a29aae987f8566609 + last_write_checksum: sha1:9cdac95b786fa9bbca712524e7b7c90a2f09d9ea + pristine_git_object: 481ba43c8129461b1795345febf811541a8827ec src/glean/api_client/models/invalidoperatorvalueerror.py: id: 92783a6d0aff last_write_checksum: sha1:5903d231e24afb30c1bdf5c7dcdece23271b23e0 @@ -4341,6 +4389,10 @@ trackedFiles: id: 5cd6cc3b46ca last_write_checksum: sha1:b2717bc4112725c29f9d41376e51fc1212ab844f pristine_git_object: f0f511048d7e6766eddca8222503bfa475ae120a + src/glean/api_client/models/mcpbreakdowninsightsrequest.py: + id: 332e57fe91b4 + last_write_checksum: sha1:1b6bb9914151e979358a120981b719711df66ee0 + pristine_git_object: f1eebdb43bc7e10db13e0801e6a0a66d9b06ea80 src/glean/api_client/models/meeting.py: id: 0b1f0fdee050 last_write_checksum: sha1:d727361f35d0138e09cfd1bc1e8480afd0996795 @@ -4577,6 +4629,14 @@ trackedFiles: id: ab5996a4e338 last_write_checksum: sha1:47e64ce6b2f42edcd5e311218791fb375f9752e8 pristine_git_object: 3683f422ddd5b3065454a5a14ccb9639d96dbc9e + src/glean/api_client/models/rotatedatasourcecredentialsop.py: + id: 52c9d892f054 + last_write_checksum: sha1:73f9c6365b506b3c22a7c1c46765a950c7481abc + pristine_git_object: cb55450183516763266b676d597abbd729355f15 + src/glean/api_client/models/rotatedatasourcecredentialsrequest.py: + id: a574c4265375 + last_write_checksum: sha1:62d98c94a9e66f4b4bcd6f3ba2e6b7ef0e5b553a + pristine_git_object: e9dfdd442b5dd8e6a0caecf9079dfaecf1f05d2e src/glean/api_client/models/rotatetokenresponse.py: id: 77a67fdbdad9 last_write_checksum: sha1:70fa60be71c4eb8e04999ca6d84b9e72cea19540 @@ -4823,8 +4883,8 @@ trackedFiles: pristine_git_object: 8b5a32ccf25fcfb0fb904e8046bf1b36110a3880 src/glean/api_client/models/ugctype.py: id: 9afda9fb9dd7 - last_write_checksum: sha1:bdabe557aa1173ae62fab86281d0c35a7b3bcccc - pristine_git_object: e15d070b1728ce113c661d3f9d2fc0e99dfc2d03 + last_write_checksum: sha1:0951a26d9b2b60491d0c4dcd5c251cd245690cb8 + pristine_git_object: 84f91eaffa3bb6f28309e0880ecf7d626d7c545e src/glean/api_client/models/unauthorizeddatasourceinstance.py: id: d3507c78b8df last_write_checksum: sha1:e86e33256eecf3766c2cc9fedeab56e34e0f129c @@ -5156,13 +5216,15 @@ trackedFiles: tests/mockserver/internal/handler/generated_handler.go: last_write_checksum: sha1:32101ddff940c59f43a805af303cf645a2bcca0d tests/mockserver/internal/handler/generated_handlers.go: - last_write_checksum: sha1:19821864a3ed96150e35949d5d12e9220cfb6ff6 + last_write_checksum: sha1:5d9aed233615b0a893b607431e0cfc88cf96ef40 tests/mockserver/internal/handler/pathgetrestapiv1agentsagentid.go: last_write_checksum: sha1:5210b43a5c1c7157ff57f7140449d82dc622931f tests/mockserver/internal/handler/pathgetrestapiv1agentsagentidschemas.go: last_write_checksum: sha1:a70fc628d284a0c11701c7d69a5d22dfdf118706 tests/mockserver/internal/handler/pathgetrestapiv1configuredatasourcesdatasourceidinstancesinstanceid.go: last_write_checksum: sha1:be1ef6d303273236aa6b9797453a04bb778cdd62 + tests/mockserver/internal/handler/pathgetrestapiv1datasourcedatasourceinstanceidcredentialstatus.go: + last_write_checksum: sha1:6738c2aab3e1125b511f4eed18ac16c51be2c001 tests/mockserver/internal/handler/pathgetrestapiv1governancedatafindingsexports.go: last_write_checksum: sha1:06b13f04c06621c32cd5d4664612a3804ffc49c2 tests/mockserver/internal/handler/pathgetrestapiv1governancedatapolicies.go: @@ -5247,6 +5309,8 @@ trackedFiles: last_write_checksum: sha1:14b4a1d98dd55ce2b487ae1aaab4a7dece08df25 tests/mockserver/internal/handler/pathpostrestapiv1createshortcut.go: last_write_checksum: sha1:dcdf684a85e20db1aee571db9a54a3ee259d71d5 + tests/mockserver/internal/handler/pathpostrestapiv1datasourcedatasourceinstanceidcredentials.go: + last_write_checksum: sha1:d037020783a24705c0efd9f83310746517d032d5 tests/mockserver/internal/handler/pathpostrestapiv1deleteallchats.go: last_write_checksum: sha1:7342efa7a55bf0d83da3680c9504c5b582c738e4 tests/mockserver/internal/handler/pathpostrestapiv1deleteannouncement.go: @@ -5360,7 +5424,7 @@ trackedFiles: tests/mockserver/internal/sdk/models/components/activityeventparams.go: last_write_checksum: sha1:a1b15541d7959aede9843cb777a2fd8b610e70bb tests/mockserver/internal/sdk/models/components/addcollectionitemserror.go: - last_write_checksum: sha1:d3b9af4f6e64c36285dfade93354289a4b38ecd6 + last_write_checksum: sha1:869fdf5cca8dcac2989f9dae882b9e8d7da3c4f3 tests/mockserver/internal/sdk/models/components/addcollectionitemsrequest.go: last_write_checksum: sha1:072fa8f9fcb499a52eaa1eedabe52790b255d7cf tests/mockserver/internal/sdk/models/components/addcollectionitemsresponse.go: @@ -5384,11 +5448,13 @@ trackedFiles: tests/mockserver/internal/sdk/models/components/agentsinsightsv2request.go: last_write_checksum: sha1:5bbebc8109a68e2b22dc0ca044b009a4ff491d1f tests/mockserver/internal/sdk/models/components/agentsinsightsv2response.go: - last_write_checksum: sha1:37dfa579c66588425502ca91ae07cb9529bebd65 + last_write_checksum: sha1:2bf27d5c4fa4ed8db97d93e983abede54affd688 tests/mockserver/internal/sdk/models/components/agentstimesavedinsight.go: last_write_checksum: sha1:1c07a7a8e8de690de25bddba511878bc5d40a515 tests/mockserver/internal/sdk/models/components/agentsusagebydepartmentinsight.go: last_write_checksum: sha1:21c46d3f5363b157c2e4ee70451c7d0b3e8d77df + tests/mockserver/internal/sdk/models/components/agentusecaseinsight.go: + last_write_checksum: sha1:e7d3ef7ff9b2b85433c788603548074ca5d6233a tests/mockserver/internal/sdk/models/components/agentusersinsight.go: last_write_checksum: sha1:2f737cbf66693fdffffc4d9f30a3f26b09d35eb6 tests/mockserver/internal/sdk/models/components/allowlistoptions.go: @@ -5410,7 +5476,7 @@ trackedFiles: tests/mockserver/internal/sdk/models/components/appresult.go: last_write_checksum: sha1:5d7841e6270918e5e1b59873c394d8a0b2eb1bc9 tests/mockserver/internal/sdk/models/components/assistantinsightsresponse.go: - last_write_checksum: sha1:1646bc05ef8352596a60c567dd6c437008d79e31 + last_write_checksum: sha1:cf4bf37d272fba27bfe92b0f3e39f073550a4fb0 tests/mockserver/internal/sdk/models/components/authconfig.go: last_write_checksum: sha1:e9e386e4a0c3ea918f1a2b332f91a129d77ac307 tests/mockserver/internal/sdk/models/components/authstatus.go: @@ -5502,7 +5568,7 @@ trackedFiles: tests/mockserver/internal/sdk/models/components/collection.go: last_write_checksum: sha1:12056f9bd68eae6ff3f19b5d3c62d03d853e9f7d tests/mockserver/internal/sdk/models/components/collectionerror.go: - last_write_checksum: sha1:41ffdb13b05cb13821d7c16e10d5cce4d207e533 + last_write_checksum: sha1:af5d0f2a4ae7be15beee13a00917ea8b5fd616a9 tests/mockserver/internal/sdk/models/components/collectionitem.go: last_write_checksum: sha1:ad1782147347847dd4703268d9bcaeb3c2aa201b tests/mockserver/internal/sdk/models/components/collectionitemdescriptor.go: @@ -5552,7 +5618,7 @@ trackedFiles: tests/mockserver/internal/sdk/models/components/createshortcutresponse.go: last_write_checksum: sha1:aa8fbfc7682edb55f79cd9e241d9795d4c8579ea tests/mockserver/internal/sdk/models/components/currentactiveusers.go: - last_write_checksum: sha1:17848a68125b3da6593d232146557b0dc6ae144a + last_write_checksum: sha1:4c876d24b835be3c5975308c132a4599bc11a71a tests/mockserver/internal/sdk/models/components/customdatasourceconfig.go: last_write_checksum: sha1:5cb7123d955c9782fec8f8c70570d77a0712d08d tests/mockserver/internal/sdk/models/components/customdatavalue.go: @@ -5587,6 +5653,10 @@ trackedFiles: last_write_checksum: sha1:7461564626030cdc092d351d101243469e0cf16a tests/mockserver/internal/sdk/models/components/datasourceconfigurationresponse.go: last_write_checksum: sha1:0e571c4aab6d7ed0f03e2d834369353cdf4b82d3 + tests/mockserver/internal/sdk/models/components/datasourcecredentialstatus.go: + last_write_checksum: sha1:90d1b895e332bd5c6ff3c7b40ac56cb3a8bba56f + tests/mockserver/internal/sdk/models/components/datasourcecredentialstatusresponse.go: + last_write_checksum: sha1:b1a2021160824873379267afaf77f2b1097e9b6f tests/mockserver/internal/sdk/models/components/datasourcegroupdefinition.go: last_write_checksum: sha1:7901f25f2a1b52801631df10246ed50357d37837 tests/mockserver/internal/sdk/models/components/datasourceinstanceconfiguration.go: @@ -5716,7 +5786,7 @@ trackedFiles: tests/mockserver/internal/sdk/models/components/editcollectionrequest.go: last_write_checksum: sha1:f201e2c36501bd5765225de622e8be83bb73296a tests/mockserver/internal/sdk/models/components/editcollectionresponse.go: - last_write_checksum: sha1:5be12d63cd7d11c81ebe23f7bf1a43d41bfc7e38 + last_write_checksum: sha1:14cdb6ea74ac6f34d6a566a2bc060b7b32170b0c tests/mockserver/internal/sdk/models/components/editpinrequest.go: last_write_checksum: sha1:fb86074a6869523e05e6e3ac02f08da3ee21dc5b tests/mockserver/internal/sdk/models/components/employeeinfodefinition.go: @@ -5766,15 +5836,15 @@ trackedFiles: tests/mockserver/internal/sdk/models/components/feedbackchatexchange.go: last_write_checksum: sha1:59418d4b2dc683c810308022eade51a8894ab3b0 tests/mockserver/internal/sdk/models/components/feedentry.go: - last_write_checksum: sha1:a99ce1279f66a52476d400921e69d37abed2c283 + last_write_checksum: sha1:9cc1bde49519baba4adbca3077ffdd9a1409974d tests/mockserver/internal/sdk/models/components/feedrequest.go: - last_write_checksum: sha1:ee94cd67bcfc3881a07dded1fa906f058e5bc82c + last_write_checksum: sha1:7b69fc71678bedbe4f547778bdb62a3b0cb9c10c tests/mockserver/internal/sdk/models/components/feedrequestoptions.go: last_write_checksum: sha1:fa30b7fd6ee3e45896d7bbe36e33e7c0cb9000ba tests/mockserver/internal/sdk/models/components/feedresponse.go: last_write_checksum: sha1:f6f77be921621cf1a133463043fc1871533e2e22 tests/mockserver/internal/sdk/models/components/feedresult.go: - last_write_checksum: sha1:aca6ac6c9624912587232ca30b5fd4997b865c30 + last_write_checksum: sha1:2a7bb1efb8f6bc30280cc03ce52661343b0c383a tests/mockserver/internal/sdk/models/components/followupaction.go: last_write_checksum: sha1:32a31f7af77a58ce6f3284e8550d01fcf0d3bddd tests/mockserver/internal/sdk/models/components/generatedattachment.go: @@ -5886,17 +5956,17 @@ trackedFiles: tests/mockserver/internal/sdk/models/components/insightsassistantrequest.go: last_write_checksum: sha1:eac843a444bc1a4407ac673f756bb9684564aef7 tests/mockserver/internal/sdk/models/components/insightschatsummary.go: - last_write_checksum: sha1:bc7bb408c578673cad60c321487c0804e0600dd6 + last_write_checksum: sha1:40fe8e7f03b21f4f1790491c48a65dba9e3514bd tests/mockserver/internal/sdk/models/components/insightsoverviewrequest.go: last_write_checksum: sha1:f41a223c0da4e4edee140cdd8a7697a45969a239 tests/mockserver/internal/sdk/models/components/insightsoverviewresponse.go: - last_write_checksum: sha1:926270f59a7276459f6efea061ad9d0a5fd0d857 + last_write_checksum: sha1:8115386100ef8c626189f684215c8b1f04721b78 tests/mockserver/internal/sdk/models/components/insightsrequest.go: - last_write_checksum: sha1:f8bb4f19bca0be78fec51bf4d8e90d29ad25b940 + last_write_checksum: sha1:f85f626b0a21bbf9c5c130d7643da560a7ca852b tests/mockserver/internal/sdk/models/components/insightsresponse.go: last_write_checksum: sha1:f691027ad483a3268a91961f6313983b385abb51 tests/mockserver/internal/sdk/models/components/insightssearchsummary.go: - last_write_checksum: sha1:7640f939a1f08bb1d3ed16361412801cad2c9d48 + last_write_checksum: sha1:d8593121130c17b11118c88686aedf7a004503c3 tests/mockserver/internal/sdk/models/components/invalidoperatorvalueerror.go: last_write_checksum: sha1:6e8e407afa9e6caf4bc946a51054037a0b64100f tests/mockserver/internal/sdk/models/components/inviteinfo.go: @@ -5931,6 +6001,8 @@ trackedFiles: last_write_checksum: sha1:354a117e44a667479f91bd5969a6caa22a948e95 tests/mockserver/internal/sdk/models/components/manualfeedbacksidebysideinfo.go: last_write_checksum: sha1:9c066d47590c5ee9823f57a51466268e2893a13b + tests/mockserver/internal/sdk/models/components/mcpbreakdowninsightsrequest.go: + last_write_checksum: sha1:fe9d36f5a6ad993d24eb223386890675664806b5 tests/mockserver/internal/sdk/models/components/meeting.go: last_write_checksum: sha1:3cf5bc5fd2b5a40c545bfe1d9f768a98c3360d11 tests/mockserver/internal/sdk/models/components/message.go: @@ -6033,6 +6105,8 @@ trackedFiles: last_write_checksum: sha1:11f1bf56e8b41e71b3b458d39f4a18b9ad7ae0e3 tests/mockserver/internal/sdk/models/components/resulttab.go: last_write_checksum: sha1:0c61e42fad9332219ca1e3642fb386c3cf9228ad + tests/mockserver/internal/sdk/models/components/rotatedatasourcecredentialsrequest.go: + last_write_checksum: sha1:142794daff76893b8a56e02aa1a480e3257f4c3f tests/mockserver/internal/sdk/models/components/rotatetokenresponse.go: last_write_checksum: sha1:669e30d5f7f5fb79cbae3f949a18347caaacfb2c tests/mockserver/internal/sdk/models/components/scopetype.go: @@ -6152,7 +6226,7 @@ trackedFiles: tests/mockserver/internal/sdk/models/components/toolslistresponse.go: last_write_checksum: sha1:12c38931f0f2810e038e30a743845a97b876d03c tests/mockserver/internal/sdk/models/components/ugctype.go: - last_write_checksum: sha1:d8c8ca33947ffdca4a7b8a9ecb00379fa15624b0 + last_write_checksum: sha1:80946db3c430b7189d55eeafc684285390642c30 tests/mockserver/internal/sdk/models/components/unauthorizeddatasourceinstance.go: last_write_checksum: sha1:39fb84396b33bc645fb5e6ebcea36ab88b5db179 tests/mockserver/internal/sdk/models/components/unpin.go: @@ -6313,6 +6387,8 @@ trackedFiles: last_write_checksum: sha1:b9331fcb429d8bb22487234f7fa3627ee91b21f9 tests/mockserver/internal/sdk/models/operations/getcollection.go: last_write_checksum: sha1:758de3276a51cb9ef5e2bc09d8e689a95ff4fc53 + tests/mockserver/internal/sdk/models/operations/getdatasourcecredentialstatus.go: + last_write_checksum: sha1:2943041f083244fbccda983df0a06ee0d04031eb tests/mockserver/internal/sdk/models/operations/getdatasourceinstanceconfiguration.go: last_write_checksum: sha1:1570d25442383d4a4d95f8e55ffc0f6c426f683e tests/mockserver/internal/sdk/models/operations/getdocpermissions.go: @@ -6437,6 +6513,8 @@ trackedFiles: last_write_checksum: sha1:a598e25aef310bd7c8c7c37987899e6f88e918f9 tests/mockserver/internal/sdk/models/operations/recommendations.go: last_write_checksum: sha1:6ae07252753671a40f928d93b959ea0403154494 + tests/mockserver/internal/sdk/models/operations/rotatedatasourcecredentials.go: + last_write_checksum: sha1:e3ba704236a66ebc3e5c3d36865df95bae4620e9 tests/mockserver/internal/sdk/models/operations/search.go: last_write_checksum: sha1:8ebd0389fc5b227f30ce9e4ff19b12516c4b5329 tests/mockserver/internal/sdk/models/operations/searchagents.go: @@ -6569,8 +6647,8 @@ trackedFiles: pristine_git_object: 4e7e05cd255ebd497afde50b97fcfa63e4367e2a tests/test_datasources.py: id: 0a9c5268286f - last_write_checksum: sha1:9e67336fc25773bafd6fcf48aeadc3353b2e8344 - pristine_git_object: 68d59bc6412f5a078b332b11f73ecc5db38e5a7a + last_write_checksum: sha1:702248b4aa6fec68310d64b779af389bb98db4a2 + pristine_git_object: b36dd4080937a774fab1a14daf628e73b2e6d9df tests/test_displayablelists.py: id: aa656a7efeb2 last_write_checksum: sha1:ad6e518e489b98d4f21c7e0ebab2f085f49be421 @@ -6625,8 +6703,8 @@ trackedFiles: pristine_git_object: df2944ebda36db652b2770dd1c23be83df90fc99 tests/test_summarize.py: id: a255d8a6f627 - last_write_checksum: sha1:56ebc69bb4f81505bc6d5f557eafd27f2bf6287d - pristine_git_object: 3f56a110361de93de6f420cfacda057683eabbc8 + last_write_checksum: sha1:f724206e51db3dbed2900d35ab635ce7fc0e0419 + pristine_git_object: 3e3cfe27f4775aaa155eeea70126822c151d8bf8 tests/test_tools.py: id: 70889bdf7321 last_write_checksum: sha1:3c0c220f8975b050c322f6475e95f7af4e65b995 @@ -6944,7 +7022,7 @@ examples: application/json: {} responses: "200": - application/json: {"gleanAssist": {"activityInsights": [{"user": {"name": "George Clooney", "obfuscatedId": "abc123"}, "activity": "SEARCH"}]}, "overviewResponse": {"perUserInsights": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}]}, "assistantResponse": {"perUserInsights": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}]}, "agentsResponse": {"topAgentsInsights": [{"icon": {"color": "#343CED", "key": "person_icon", "iconType": "GLYPH", "name": "user"}}], "agentsUsageByDepartmentInsights": [{"icon": {"color": "#343CED", "key": "person_icon", "iconType": "GLYPH", "name": "user"}}], "agentUsersInsights": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}], "agentsTimeSavedInsights": [{"icon": {"color": "#343CED", "key": "person_icon", "iconType": "GLYPH", "name": "user"}}]}} + application/json: {"gleanAssist": {"activityInsights": [{"user": {"name": "George Clooney", "obfuscatedId": "abc123"}, "activity": "SEARCH"}]}, "overviewResponse": {"perUserInsights": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}]}, "assistantResponse": {"perUserInsights": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}]}, "agentsResponse": {"topAgentsInsights": [{"icon": {"color": "#343CED", "key": "person_icon", "iconType": "GLYPH", "name": "user"}}], "topUseCasesInsights": [{"topAgentIcon": {"color": "#343CED", "key": "person_icon", "iconType": "GLYPH", "name": "user"}}], "agentsUsageByDepartmentInsights": [{"icon": {"color": "#343CED", "key": "person_icon", "iconType": "GLYPH", "name": "user"}}], "agentUsersInsights": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}], "agentsTimeSavedInsights": [{"icon": {"color": "#343CED", "key": "person_icon", "iconType": "GLYPH", "name": "user"}}]}} messages: speakeasy-default-messages: requestBody: @@ -7404,6 +7482,28 @@ examples: application/json: {"configuration": {"values": {}}} "400": application/json: {} + getDatasourceCredentialStatus: + speakeasy-default-get-datasource-credential-status: + parameters: + path: + datasourceInstanceId: "o365sharepoint_abc123" + responses: + "200": + application/json: {"status": "VALID"} + "400": + application/json: {} + rotateDatasourceCredentials: + speakeasy-default-rotate-datasource-credentials: + parameters: + path: + datasourceInstanceId: "o365sharepoint_abc123" + requestBody: + application/json: {"credentials": {"values": {"key": {}}}} + responses: + "200": + application/json: {"status": "MISSING"} + "400": + application/json: {} examplesVersion: 1.0.2 generatedTests: activity: "2025-04-28T22:05:12+01:00" @@ -7554,6 +7654,9 @@ generatedTests: checkdatasourceauth: "2026-02-19T15:48:52Z" getDatasourceInstanceConfiguration: "2026-03-09T18:34:29Z" updateDatasourceInstanceConfiguration: "2026-03-09T18:34:29Z" + getDatasourceCredentialStatus: "2026-04-29T02:59:03Z" + rotateDatasourceCredentials: "2026-04-29T02:59:03Z" +releaseNotes: "## Python SDK Changes:\n* `glean.client.collections.add_items()`: `response.error.error_type.enum(corrupt_item)` **Added** (Breaking ⚠️)\n* `glean.datasources.get_datasource_credential_status()`: **Added**\n* `glean.datasources.rotate_datasource_credentials()`: **Added**\n* `glean.client.collections.create()`: \n * `response.union(class (0)).error.error_code.enum(corrupt_item)` **Added**\n * `error_code.enum(corrupt_item)` **Added**\n* `glean.client.collections.delete()`: `error_code.enum(corrupt_item)` **Added**\n* `glean.client.collections.update()`: \n * `response` **Changed**\n * `error_code.enum(corrupt_item)` **Added**\n* `glean.client.collections.retrieve()`: `response.error.error_code.enum(corrupt_item)` **Added**\n* `glean.client.insights.retrieve()`: \n * `request.mcp_breakdown_request` **Added**\n * `response.agents_response.top_use_cases_insights` **Added**\n* `glean.client.search.retrieve_feed()`: \n * `request.categories[].enum(project_focus_block)` **Added**\n * `response.results[]` **Changed**\n" generatedFiles: - .devcontainer/README.md - .devcontainer/devcontainer.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 47a0a91b..96be2205 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -34,7 +34,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: true python: - version: 0.12.24 + version: 0.12.25 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/glean-merged-spec.yaml b/.speakeasy/glean-merged-spec.yaml index e084beac..11c1af1c 100644 --- a/.speakeasy/glean-merged-spec.yaml +++ b/.speakeasy/glean-merged-spec.yaml @@ -2,7 +2,7 @@ openapi: 3.0.0 info: version: 0.9.0 title: Glean API - x-source-commit-sha: 0aa266469924048ad422bf6314104f79b477e46a + x-source-commit-sha: b0dfb9e760c6eef2148e9637e279283c2ad60818 description: | # Introduction In addition to the data sources that Glean has built-in support for, Glean also provides a REST API that enables customers to put arbitrary content in the search index. This is useful, for example, for doing permissions-aware search over content in internal tools that reside on-prem as well as for searching over applications that Glean does not currently support first class. In addition these APIs allow the customer to push organization data (people info, organization structure etc) into Glean. @@ -22,7 +22,7 @@ info: These API clients provide type-safe, idiomatic interfaces for working with Glean IndexingAPIs in your language of choice. x-logo: url: https://app.glean.com/images/glean-text2.svg - x-open-api-commit-sha: 122e22b59935f3ed61845da28a7c607ebc115c9b + x-open-api-commit-sha: 975175338f255469ecfc324be3c37e64cbf632fd x-speakeasy-name: 'Glean API' servers: - url: https://{instance}-be.glean.com @@ -4014,6 +4014,93 @@ paths: schema: $ref: '#/components/schemas/ErrorResponse' x-visibility: Preview + /rest/api/v1/datasource/{datasourceInstanceId}/credentialstatus: + get: + operationId: getDatasourceCredentialStatus + summary: Get datasource instance credential status + description: | + Returns the current credential status for a datasource instance. Access is limited to callers with the ADMIN scope; the handler enforces this check. + tags: + - Datasources + security: + - APIToken: [] + parameters: + - $ref: '#/components/parameters/datasourceInstanceId' + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/DatasourceCredentialStatusResponse' + "400": + description: Invalid request + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "401": + description: Not authorized + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "404": + description: Datasource instance not found + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + x-visibility: Preview + /rest/api/v1/datasource/{datasourceInstanceId}/credentials: + post: + operationId: rotateDatasourceCredentials + summary: Rotate datasource instance credentials + description: | + Rotates the credentials that a datasource instance uses to connect to its upstream system. Replaces the active credential material with the supplied values and returns the credential status after rotation. Access is limited to callers with the ADMIN scope; the handler enforces this check. + Only keys recognized as credential material for the datasource type may be set in `credentials.values` (e.g. `clientSecret`, `apiToken`, `privateKey`, depending on the configured auth method). Unrecognized keys, or keys that correspond to non-credential configuration, cause a 400; other instance configuration must be updated via PATCH /configure/datasources/{datasourceId}/instances/{instanceId}. + tags: + - Datasources + security: + - APIToken: [] + parameters: + - $ref: '#/components/parameters/datasourceInstanceId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RotateDatasourceCredentialsRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/DatasourceCredentialStatusResponse' + "400": + description: Invalid request + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "401": + description: Not authorized + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "404": + description: Datasource instance not found + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + x-visibility: Preview /rest/api/v1/chat#stream: post: tags: @@ -8709,6 +8796,7 @@ components: type: string enum: - EXISTING_ITEM + - CORRUPT_ITEM AddCollectionItemsResponse: properties: collection: @@ -8738,6 +8826,7 @@ components: - HEIGHT_VIOLATION - WIDTH_VIOLATION - NO_PERMISSIONS + - CORRUPT_ITEM CreateCollectionResponse: allOf: - type: object @@ -8988,6 +9077,44 @@ components: dayRange: $ref: "#/components/schemas/Period" description: Time period for which Insights are requested. + McpBreakdownInsightsRequest: + properties: + departments: + type: array + items: + type: string + description: Departments for which Insights are requested. + managerIds: + type: array + items: + type: string + description: Manager user IDs whose teams should be filtered for. Empty array means no filtering. + dayRange: + $ref: "#/components/schemas/Period" + description: Time period for which Insights are requested. + breakdownType: + type: string + enum: + - USERS + - HOST_APPLICATIONS + - TOOLS + - SERVERS + description: Type of breakdown to return. + hostApplications: + type: array + items: + type: string + description: Host applications to filter by. Empty array means all host applications. + tools: + type: array + items: + type: string + description: MCP tools to filter by. Empty array means all tools. + servers: + type: array + items: + type: string + description: MCP servers to filter by. Empty array means all servers. InsightsRequest: properties: overviewRequest: @@ -9002,6 +9129,8 @@ components: $ref: "#/components/schemas/AgentsInsightsV2Request" x-visibility: Public description: If specified, will return data for the Agents section of the Insights Dashboard. + mcpBreakdownRequest: + $ref: "#/components/schemas/McpBreakdownInsightsRequest" disablePerUserInsights: type: boolean description: If true, suppresses the generation of per-user Insights in the response. Default is false. @@ -9052,10 +9181,10 @@ components: properties: monthlyActiveUsers: type: integer - description: Number of current Monthly Active Users, in the specified departments. + description: Number of current Monthly Active Users. weeklyActiveUsers: type: integer - description: Number of current Weekly Active Users, in the specified departments. + description: Number of current Weekly Active Users. InsightsSearchSummary: allOf: - $ref: "#/components/schemas/CurrentActiveUsers" @@ -9286,6 +9415,33 @@ components: downvoteCount: type: integer description: Total number of downvotes for this agent over the specified time period. + AgentUseCaseInsight: + properties: + useCase: + type: string + description: Use case name + runCount: + type: integer + description: Total number of runs for this use case over the specified time period. + trend: + type: number + format: float + description: Percentage change in runs compared to the previous equivalent time period. + topDepartments: + type: string + description: Comma-separated list of the top departments using this use case. + topAgentId: + type: string + description: ID of the most-used agent for this use case. + topAgentName: + type: string + description: Name of the most-used agent for this use case. + topAgentIcon: + $ref: "#/components/schemas/IconConfig" + description: Icon of the most-used agent for this use case. + topAgentIsDeleted: + type: boolean + description: Indicates whether the top agent has been deleted. AgentsUsageByDepartmentInsight: properties: department: @@ -9375,6 +9531,10 @@ components: type: array items: $ref: "#/components/schemas/PerAgentInsight" + topUseCasesInsights: + type: array + items: + $ref: "#/components/schemas/AgentUseCaseInsight" agentsUsageByDepartmentInsights: type: array items: @@ -10196,6 +10356,7 @@ components: - FOLLOW_UP - MILESTONE_TIMELINE_CHECK - PROJECT_DISCUSSION_DIGEST + - PROJECT_FOCUS_BLOCK - PROJECT_NEXT_STEP description: Categories of content requested. An allowlist gives flexibility to request content separately or together. requestOptions: @@ -10533,6 +10694,7 @@ components: - SHORTCUTS_TYPE - SLIDE_TYPE - SPREADSHEET_TYPE + - INLINE_HTML_TYPE - WORKFLOWS_TYPE FavoriteInfo: type: object @@ -10706,6 +10868,7 @@ components: - FOLLOW_UP - MILESTONE_TIMELINE_CHECK - PROJECT_DISCUSSION_DIGEST + - PROJECT_FOCUS_BLOCK - PROJECT_NEXT_STEP description: Type of the justification. justification: @@ -10789,6 +10952,7 @@ components: - FOLLOW_UP - MILESTONE_TIMELINE_CHECK - PROJECT_DISCUSSION_DIGEST + - PROJECT_FOCUS_BLOCK - PROJECT_NEXT_STEP description: Category of the result, one of the requested categories in incoming request. primaryEntry: @@ -13841,6 +14005,46 @@ components: - configuration description: | Request to update greenlisted configuration values for a datasource instance. Only keys that are exposed via the public API greenlist may be set. + DatasourceCredentialStatus: + type: string + enum: + - VALID + - VALID_WITH_WARNINGS + - VALIDATING + - INVALID + - MISSING + description: | + Lifecycle state of the credentials installed for a datasource instance. Mirrors the internal admin Status enum so the handler can surface the same health signals already tracked today. EXPIRING_SOON is represented as VALID_WITH_WARNINGS (with detail in `message`); EXPIRED is surfaced as INVALID plus a non-null `expiresAt` in the past. + DatasourceCredentialStatusResponse: + type: object + properties: + status: + $ref: '#/components/schemas/DatasourceCredentialStatus' + lastRotatedAt: + type: string + format: date-time + description: When the credentials were last rotated. Omitted when not known. + expiresAt: + type: string + format: date-time + description: | + When the active credentials expire. Omitted when not known or not applicable to this credential type. + message: + type: string + description: Optional human-readable detail about the current credential status. + required: + - status + description: Status of the credentials currently installed for a datasource instance. + RotateDatasourceCredentialsRequest: + type: object + properties: + credentials: + $ref: '#/components/schemas/DatasourceInstanceConfiguration' + required: + - credentials + description: | + Request to rotate the credentials used by a datasource instance. Replaces the active credential material with the supplied values. + `credentials.values` must contain only keys recognized as credential material for the datasource type (for example `clientSecret` for OAuth, `apiToken` for API-token auth, `privateKey` for certificate auth). Unrecognized keys, or keys that correspond to non-credential configuration, cause a 400; use the configure endpoint to change non-credential config. ChatRequestStream: required: - messages @@ -13914,6 +14118,14 @@ components: schema: type: string example: o365sharepoint_abc123 + datasourceInstanceId: + name: datasourceInstanceId + in: path + description: The full datasource instance identifier (e.g. o365sharepoint_abc123) + required: true + schema: + type: string + example: o365sharepoint_abc123 responses: SuccessResponse: description: OK diff --git a/.speakeasy/tests.arazzo.yaml b/.speakeasy/tests.arazzo.yaml index e0928b37..94c9c672 100644 --- a/.speakeasy/tests.arazzo.yaml +++ b/.speakeasy/tests.arazzo.yaml @@ -158494,3 +158494,43 @@ workflows: type: simple x-speakeasy-test-group: Datasources x-speakeasy-test-rebuild: true + - workflowId: getDatasourceCredentialStatus + steps: + - stepId: test + operationId: getDatasourceCredentialStatus + parameters: + - name: datasourceInstanceId + in: path + value: o365sharepoint_abc123 + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"status":"VALID"} + type: simple + x-speakeasy-test-group: Datasources + x-speakeasy-test-rebuild: true + - workflowId: rotateDatasourceCredentials + steps: + - stepId: test + operationId: rotateDatasourceCredentials + parameters: + - name: datasourceInstanceId + in: path + value: o365sharepoint_abc123 + requestBody: + contentType: application/json + payload: + credentials: + values: + key: {} + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"status":"MISSING"} + type: simple + x-speakeasy-test-group: Datasources + x-speakeasy-test-rebuild: true diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 85defbb8..9ee86b2e 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.761.8 +speakeasyVersion: 1.761.9 sources: Glean API: sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:5fafd8224d41224b85cbb5f39c686e5da647fadcd8211bc9fae3c0834341dae6 - sourceBlobDigest: sha256:884a6119e9d59c15d47e169eaa496571dae1c106d390990aee38a25cb51e42c3 + sourceRevisionDigest: sha256:362782ee6cd0011223dca70ca5ded96d66d148905772516fe52e1da42d5d02a2 + sourceBlobDigest: sha256:257c45d600fc3d7559f52235e2d52a3c6b6c09242160852bbc8a810b27bd9537 tags: - latest Glean Client API: @@ -16,10 +16,10 @@ targets: glean: source: Glean API sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:5fafd8224d41224b85cbb5f39c686e5da647fadcd8211bc9fae3c0834341dae6 - sourceBlobDigest: sha256:884a6119e9d59c15d47e169eaa496571dae1c106d390990aee38a25cb51e42c3 + sourceRevisionDigest: sha256:362782ee6cd0011223dca70ca5ded96d66d148905772516fe52e1da42d5d02a2 + sourceBlobDigest: sha256:257c45d600fc3d7559f52235e2d52a3c6b6c09242160852bbc8a810b27bd9537 codeSamplesNamespace: glean-api-specs-python-code-samples - codeSamplesRevisionDigest: sha256:15a4a6614d94c2111ddad680da00d4286330aadf586e4ceb4f5312fe92377032 + codeSamplesRevisionDigest: sha256:47d4978255a2dcd78865c339b95eda1e3074db12b4a9939c5f1fc36806105170 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index c1dd7020..90a3ad23 100644 --- a/README.md +++ b/README.md @@ -474,6 +474,8 @@ For more information on obtaining the appropriate token type, please contact you * [get_datasource_instance_configuration](docs/sdks/datasources/README.md#get_datasource_instance_configuration) - Get datasource instance configuration * [update_datasource_instance_configuration](docs/sdks/datasources/README.md#update_datasource_instance_configuration) - Update datasource instance configuration +* [get_datasource_credential_status](docs/sdks/datasources/README.md#get_datasource_credential_status) - Get datasource instance credential status +* [rotate_datasource_credentials](docs/sdks/datasources/README.md#rotate_datasource_credentials) - Rotate datasource instance credentials ### [Governance](docs/sdks/governance/README.md) diff --git a/RELEASES.md b/RELEASES.md index cf10f25e..c0bc7bfe 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -738,4 +738,14 @@ Based on: ### Generated - [python v0.12.23] . ### Releases -- [PyPI v0.12.23] https://pypi.org/project/glean-api-client/0.12.23 - . \ No newline at end of file +- [PyPI v0.12.23] https://pypi.org/project/glean-api-client/0.12.23 - . + +## 2026-04-29 02:58:15 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.761.9 (2.881.4) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.12.25] . +### Releases +- [PyPI v0.12.25] https://pypi.org/project/glean-api-client/0.12.25 - . \ No newline at end of file diff --git a/docs/models/addcollectionitemserrorerrortype.md b/docs/models/addcollectionitemserrorerrortype.md index 8a36415e..761a12fe 100644 --- a/docs/models/addcollectionitemserrorerrortype.md +++ b/docs/models/addcollectionitemserrorerrortype.md @@ -6,6 +6,8 @@ from glean.api_client.models import AddCollectionItemsErrorErrorType value = AddCollectionItemsErrorErrorType.EXISTING_ITEM + +# Open enum: unrecognized values are captured as UnrecognizedStr ``` @@ -13,4 +15,5 @@ value = AddCollectionItemsErrorErrorType.EXISTING_ITEM | Name | Value | | --------------- | --------------- | -| `EXISTING_ITEM` | EXISTING_ITEM | \ No newline at end of file +| `EXISTING_ITEM` | EXISTING_ITEM | +| `CORRUPT_ITEM` | CORRUPT_ITEM | \ No newline at end of file diff --git a/docs/models/agentsinsightsv2response.md b/docs/models/agentsinsightsv2response.md index dba88e1e..bde7e4fd 100644 --- a/docs/models/agentsinsightsv2response.md +++ b/docs/models/agentsinsightsv2response.md @@ -5,13 +5,14 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `monthly_active_users` | *Optional[int]* | :heavy_minus_sign: | Number of current Monthly Active Users, in the specified departments. | -| `weekly_active_users` | *Optional[int]* | :heavy_minus_sign: | Number of current Weekly Active Users, in the specified departments. | +| `monthly_active_users` | *Optional[int]* | :heavy_minus_sign: | Number of current Monthly Active Users. | +| `weekly_active_users` | *Optional[int]* | :heavy_minus_sign: | Number of current Weekly Active Users. | | `monthly_active_user_timeseries` | [Optional[models.LabeledCountInfo]](../models/labeledcountinfo.md) | :heavy_minus_sign: | N/A | | `weekly_active_user_timeseries` | [Optional[models.LabeledCountInfo]](../models/labeledcountinfo.md) | :heavy_minus_sign: | N/A | | `daily_active_user_timeseries` | [Optional[models.LabeledCountInfo]](../models/labeledcountinfo.md) | :heavy_minus_sign: | N/A | | `shared_agents_count` | *Optional[int]* | :heavy_minus_sign: | Total number of shared agents. | | `top_agents_insights` | List[[models.PerAgentInsight](../models/peragentinsight.md)] | :heavy_minus_sign: | N/A | +| `top_use_cases_insights` | List[[models.AgentUseCaseInsight](../models/agentusecaseinsight.md)] | :heavy_minus_sign: | N/A | | `agents_usage_by_department_insights` | List[[models.AgentsUsageByDepartmentInsight](../models/agentsusagebydepartmentinsight.md)] | :heavy_minus_sign: | N/A | | `agent_users_insights` | List[[models.AgentUsersInsight](../models/agentusersinsight.md)] | :heavy_minus_sign: | N/A | | `agents_time_saved_insights` | List[[models.AgentsTimeSavedInsight](../models/agentstimesavedinsight.md)] | :heavy_minus_sign: | Insights for agents time saved over the specified time period. | diff --git a/docs/models/agentusecaseinsight.md b/docs/models/agentusecaseinsight.md new file mode 100644 index 00000000..88a6bd23 --- /dev/null +++ b/docs/models/agentusecaseinsight.md @@ -0,0 +1,15 @@ +# AgentUseCaseInsight + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `use_case` | *Optional[str]* | :heavy_minus_sign: | Use case name | | +| `run_count` | *Optional[int]* | :heavy_minus_sign: | Total number of runs for this use case over the specified time period. | | +| `trend` | *Optional[float]* | :heavy_minus_sign: | Percentage change in runs compared to the previous equivalent time period. | | +| `top_departments` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of the top departments using this use case. | | +| `top_agent_id` | *Optional[str]* | :heavy_minus_sign: | ID of the most-used agent for this use case. | | +| `top_agent_name` | *Optional[str]* | :heavy_minus_sign: | Name of the most-used agent for this use case. | | +| `top_agent_icon` | [Optional[models.IconConfig]](../models/iconconfig.md) | :heavy_minus_sign: | Defines how to render an icon | {
"color": "#343CED",
"key": "person_icon",
"iconType": "GLYPH",
"name": "user"
} | +| `top_agent_is_deleted` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether the top agent has been deleted. | | \ No newline at end of file diff --git a/docs/models/assistantinsightsresponse.md b/docs/models/assistantinsightsresponse.md index 022c4ee4..d5cc0973 100644 --- a/docs/models/assistantinsightsresponse.md +++ b/docs/models/assistantinsightsresponse.md @@ -5,8 +5,8 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `monthly_active_users` | *Optional[int]* | :heavy_minus_sign: | Number of current Monthly Active Users, in the specified departments. | -| `weekly_active_users` | *Optional[int]* | :heavy_minus_sign: | Number of current Weekly Active Users, in the specified departments. | +| `monthly_active_users` | *Optional[int]* | :heavy_minus_sign: | Number of current Monthly Active Users. | +| `weekly_active_users` | *Optional[int]* | :heavy_minus_sign: | Number of current Weekly Active Users. | | `last_updated_ts` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp of the last update for the insights data in the response. | | `monthly_active_user_timeseries` | [Optional[models.LabeledCountInfo]](../models/labeledcountinfo.md) | :heavy_minus_sign: | N/A | | `weekly_active_user_timeseries` | [Optional[models.LabeledCountInfo]](../models/labeledcountinfo.md) | :heavy_minus_sign: | N/A | diff --git a/docs/models/breakdowntype.md b/docs/models/breakdowntype.md new file mode 100644 index 00000000..dbe36727 --- /dev/null +++ b/docs/models/breakdowntype.md @@ -0,0 +1,21 @@ +# BreakdownType + +Type of breakdown to return. + +## Example Usage + +```python +from glean.api_client.models import BreakdownType + +value = BreakdownType.USERS +``` + + +## Values + +| Name | Value | +| ------------------- | ------------------- | +| `USERS` | USERS | +| `HOST_APPLICATIONS` | HOST_APPLICATIONS | +| `TOOLS` | TOOLS | +| `SERVERS` | SERVERS | \ No newline at end of file diff --git a/docs/models/collectionerrorerrorcode.md b/docs/models/collectionerrorerrorcode.md index dd389508..2aedaf4a 100644 --- a/docs/models/collectionerrorerrorcode.md +++ b/docs/models/collectionerrorerrorcode.md @@ -21,4 +21,5 @@ value = CollectionErrorErrorCode.NAME_EXISTS | `CONCURRENT_HIERARCHY_EDIT` | CONCURRENT_HIERARCHY_EDIT | | `HEIGHT_VIOLATION` | HEIGHT_VIOLATION | | `WIDTH_VIOLATION` | WIDTH_VIOLATION | -| `NO_PERMISSIONS` | NO_PERMISSIONS | \ No newline at end of file +| `NO_PERMISSIONS` | NO_PERMISSIONS | +| `CORRUPT_ITEM` | CORRUPT_ITEM | \ No newline at end of file diff --git a/docs/models/currentactiveusers.md b/docs/models/currentactiveusers.md index 3852b41c..f5cb3add 100644 --- a/docs/models/currentactiveusers.md +++ b/docs/models/currentactiveusers.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `monthly_active_users` | *Optional[int]* | :heavy_minus_sign: | Number of current Monthly Active Users, in the specified departments. | -| `weekly_active_users` | *Optional[int]* | :heavy_minus_sign: | Number of current Weekly Active Users, in the specified departments. | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | +| `monthly_active_users` | *Optional[int]* | :heavy_minus_sign: | Number of current Monthly Active Users. | +| `weekly_active_users` | *Optional[int]* | :heavy_minus_sign: | Number of current Weekly Active Users. | \ No newline at end of file diff --git a/docs/models/datasourcecredentialstatus.md b/docs/models/datasourcecredentialstatus.md new file mode 100644 index 00000000..546c77b9 --- /dev/null +++ b/docs/models/datasourcecredentialstatus.md @@ -0,0 +1,25 @@ +# DatasourceCredentialStatus + +Lifecycle state of the credentials installed for a datasource instance. Mirrors the internal admin Status enum so the handler can surface the same health signals already tracked today. EXPIRING_SOON is represented as VALID_WITH_WARNINGS (with detail in `message`); EXPIRED is surfaced as INVALID plus a non-null `expiresAt` in the past. + + +## Example Usage + +```python +from glean.api_client.models import DatasourceCredentialStatus + +value = DatasourceCredentialStatus.VALID + +# Open enum: unrecognized values are captured as UnrecognizedStr +``` + + +## Values + +| Name | Value | +| --------------------- | --------------------- | +| `VALID` | VALID | +| `VALID_WITH_WARNINGS` | VALID_WITH_WARNINGS | +| `VALIDATING` | VALIDATING | +| `INVALID` | INVALID | +| `MISSING` | MISSING | \ No newline at end of file diff --git a/docs/models/datasourcecredentialstatusresponse.md b/docs/models/datasourcecredentialstatusresponse.md new file mode 100644 index 00000000..29641fd5 --- /dev/null +++ b/docs/models/datasourcecredentialstatusresponse.md @@ -0,0 +1,13 @@ +# DatasourceCredentialStatusResponse + +Status of the credentials currently installed for a datasource instance. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `status` | [models.DatasourceCredentialStatus](../models/datasourcecredentialstatus.md) | :heavy_check_mark: | Lifecycle state of the credentials installed for a datasource instance. Mirrors the internal admin Status enum so the handler can surface the same health signals already tracked today. EXPIRING_SOON is represented as VALID_WITH_WARNINGS (with detail in `message`); EXPIRED is surfaced as INVALID plus a non-null `expiresAt` in the past.
| +| `last_rotated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | When the credentials were last rotated. Omitted when not known. | +| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | When the active credentials expire. Omitted when not known or not applicable to this credential type.
| +| `message` | *Optional[str]* | :heavy_minus_sign: | Optional human-readable detail about the current credential status. | \ No newline at end of file diff --git a/docs/models/editcollectionresponseerrorcode.md b/docs/models/editcollectionresponseerrorcode.md index 722a81f2..bc8f34aa 100644 --- a/docs/models/editcollectionresponseerrorcode.md +++ b/docs/models/editcollectionresponseerrorcode.md @@ -21,4 +21,5 @@ value = EditCollectionResponseErrorCode.NAME_EXISTS | `CONCURRENT_HIERARCHY_EDIT` | CONCURRENT_HIERARCHY_EDIT | | `HEIGHT_VIOLATION` | HEIGHT_VIOLATION | | `WIDTH_VIOLATION` | WIDTH_VIOLATION | -| `NO_PERMISSIONS` | NO_PERMISSIONS | \ No newline at end of file +| `NO_PERMISSIONS` | NO_PERMISSIONS | +| `CORRUPT_ITEM` | CORRUPT_ITEM | \ No newline at end of file diff --git a/docs/models/feedrequestcategory.md b/docs/models/feedrequestcategory.md index 1fb21bd0..4964a0e6 100644 --- a/docs/models/feedrequestcategory.md +++ b/docs/models/feedrequestcategory.md @@ -48,4 +48,5 @@ value = FeedRequestCategory.DOCUMENT_SUGGESTION | `FOLLOW_UP` | FOLLOW_UP | | `MILESTONE_TIMELINE_CHECK` | MILESTONE_TIMELINE_CHECK | | `PROJECT_DISCUSSION_DIGEST` | PROJECT_DISCUSSION_DIGEST | +| `PROJECT_FOCUS_BLOCK` | PROJECT_FOCUS_BLOCK | | `PROJECT_NEXT_STEP` | PROJECT_NEXT_STEP | \ No newline at end of file diff --git a/docs/models/feedresultcategory.md b/docs/models/feedresultcategory.md index 3e8ed01b..a5e91fb3 100644 --- a/docs/models/feedresultcategory.md +++ b/docs/models/feedresultcategory.md @@ -52,4 +52,5 @@ value = FeedResultCategory.DOCUMENT_SUGGESTION | `FOLLOW_UP` | FOLLOW_UP | | `MILESTONE_TIMELINE_CHECK` | MILESTONE_TIMELINE_CHECK | | `PROJECT_DISCUSSION_DIGEST` | PROJECT_DISCUSSION_DIGEST | +| `PROJECT_FOCUS_BLOCK` | PROJECT_FOCUS_BLOCK | | `PROJECT_NEXT_STEP` | PROJECT_NEXT_STEP | \ No newline at end of file diff --git a/docs/models/getdatasourcecredentialstatusrequest.md b/docs/models/getdatasourcecredentialstatusrequest.md new file mode 100644 index 00000000..07c45dd2 --- /dev/null +++ b/docs/models/getdatasourcecredentialstatusrequest.md @@ -0,0 +1,8 @@ +# GetDatasourceCredentialStatusRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `datasource_instance_id` | *str* | :heavy_check_mark: | The full datasource instance identifier (e.g. o365sharepoint_abc123) | o365sharepoint_abc123 | \ No newline at end of file diff --git a/docs/models/insightschatsummary.md b/docs/models/insightschatsummary.md index ecbd7385..21fc84d4 100644 --- a/docs/models/insightschatsummary.md +++ b/docs/models/insightschatsummary.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `monthly_active_users` | *Optional[int]* | :heavy_minus_sign: | Number of current Monthly Active Users, in the specified departments. | -| `weekly_active_users` | *Optional[int]* | :heavy_minus_sign: | Number of current Weekly Active Users, in the specified departments. | +| `monthly_active_users` | *Optional[int]* | :heavy_minus_sign: | Number of current Monthly Active Users. | +| `weekly_active_users` | *Optional[int]* | :heavy_minus_sign: | Number of current Weekly Active Users. | | `num_chats` | *Optional[int]* | :heavy_minus_sign: | Total number of chats by users over the specified time period. | | `num_chat_users` | *Optional[int]* | :heavy_minus_sign: | Total number of distinct users who used Chat over the specified time period. | \ No newline at end of file diff --git a/docs/models/insightsoverviewresponse.md b/docs/models/insightsoverviewresponse.md index 13a98a4c..c4f57908 100644 --- a/docs/models/insightsoverviewresponse.md +++ b/docs/models/insightsoverviewresponse.md @@ -5,8 +5,8 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `monthly_active_users` | *Optional[int]* | :heavy_minus_sign: | Number of current Monthly Active Users, in the specified departments. | -| `weekly_active_users` | *Optional[int]* | :heavy_minus_sign: | Number of current Weekly Active Users, in the specified departments. | +| `monthly_active_users` | *Optional[int]* | :heavy_minus_sign: | Number of current Monthly Active Users. | +| `weekly_active_users` | *Optional[int]* | :heavy_minus_sign: | Number of current Weekly Active Users. | | `departments` | List[*str*] | :heavy_minus_sign: | Department name(s). | | `employee_count` | *Optional[int]* | :heavy_minus_sign: | Number of current employees in the specified departments, according to the Org Chart. | | `total_signups` | *Optional[int]* | :heavy_minus_sign: | Number of current signed up employees in the specified departments, according to the Org Chart. | diff --git a/docs/models/insightsrequest.md b/docs/models/insightsrequest.md index 40dfc4f3..3b78522a 100644 --- a/docs/models/insightsrequest.md +++ b/docs/models/insightsrequest.md @@ -8,4 +8,5 @@ | `overview_request` | [Optional[models.InsightsOverviewRequest]](../models/insightsoverviewrequest.md) | :heavy_minus_sign: | N/A | | `assistant_request` | [Optional[models.InsightsAssistantRequest]](../models/insightsassistantrequest.md) | :heavy_minus_sign: | N/A | | `agents_request` | [Optional[models.AgentsInsightsV2Request]](../models/agentsinsightsv2request.md) | :heavy_minus_sign: | N/A | +| `mcp_breakdown_request` | [Optional[models.McpBreakdownInsightsRequest]](../models/mcpbreakdowninsightsrequest.md) | :heavy_minus_sign: | N/A | | `disable_per_user_insights` | *Optional[bool]* | :heavy_minus_sign: | If true, suppresses the generation of per-user Insights in the response. Default is false. | \ No newline at end of file diff --git a/docs/models/insightssearchsummary.md b/docs/models/insightssearchsummary.md index d527f436..940085a0 100644 --- a/docs/models/insightssearchsummary.md +++ b/docs/models/insightssearchsummary.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `monthly_active_users` | *Optional[int]* | :heavy_minus_sign: | Number of current Monthly Active Users, in the specified departments. | -| `weekly_active_users` | *Optional[int]* | :heavy_minus_sign: | Number of current Weekly Active Users, in the specified departments. | +| `monthly_active_users` | *Optional[int]* | :heavy_minus_sign: | Number of current Monthly Active Users. | +| `weekly_active_users` | *Optional[int]* | :heavy_minus_sign: | Number of current Weekly Active Users. | | `num_searches` | *Optional[int]* | :heavy_minus_sign: | Total number of searches by users over the specified time period. | | `num_search_users` | *Optional[int]* | :heavy_minus_sign: | Total number of distinct users who searched over the specified time period. | \ No newline at end of file diff --git a/docs/models/justificationtype.md b/docs/models/justificationtype.md index 156cd097..7d5c6eb7 100644 --- a/docs/models/justificationtype.md +++ b/docs/models/justificationtype.md @@ -65,4 +65,5 @@ value = JustificationType.FREQUENTLY_ACCESSED | `FOLLOW_UP` | FOLLOW_UP | | `MILESTONE_TIMELINE_CHECK` | MILESTONE_TIMELINE_CHECK | | `PROJECT_DISCUSSION_DIGEST` | PROJECT_DISCUSSION_DIGEST | +| `PROJECT_FOCUS_BLOCK` | PROJECT_FOCUS_BLOCK | | `PROJECT_NEXT_STEP` | PROJECT_NEXT_STEP | \ No newline at end of file diff --git a/docs/models/mcpbreakdowninsightsrequest.md b/docs/models/mcpbreakdowninsightsrequest.md new file mode 100644 index 00000000..0e61ed02 --- /dev/null +++ b/docs/models/mcpbreakdowninsightsrequest.md @@ -0,0 +1,14 @@ +# McpBreakdownInsightsRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `departments` | List[*str*] | :heavy_minus_sign: | Departments for which Insights are requested. | +| `manager_ids` | List[*str*] | :heavy_minus_sign: | Manager user IDs whose teams should be filtered for. Empty array means no filtering. | +| `day_range` | [Optional[models.Period]](../models/period.md) | :heavy_minus_sign: | N/A | +| `breakdown_type` | [Optional[models.BreakdownType]](../models/breakdowntype.md) | :heavy_minus_sign: | Type of breakdown to return. | +| `host_applications` | List[*str*] | :heavy_minus_sign: | Host applications to filter by. Empty array means all host applications. | +| `tools` | List[*str*] | :heavy_minus_sign: | MCP tools to filter by. Empty array means all tools. | +| `servers` | List[*str*] | :heavy_minus_sign: | MCP servers to filter by. Empty array means all servers. | \ No newline at end of file diff --git a/docs/models/rotatedatasourcecredentialsrequest.md b/docs/models/rotatedatasourcecredentialsrequest.md new file mode 100644 index 00000000..2074cc10 --- /dev/null +++ b/docs/models/rotatedatasourcecredentialsrequest.md @@ -0,0 +1,12 @@ +# RotateDatasourceCredentialsRequest + +Request to rotate the credentials used by a datasource instance. Replaces the active credential material with the supplied values. +`credentials.values` must contain only keys recognized as credential material for the datasource type (for example `clientSecret` for OAuth, `apiToken` for API-token auth, `privateKey` for certificate auth). Unrecognized keys, or keys that correspond to non-credential configuration, cause a 400; use the configure endpoint to change non-credential config. + + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `credentials` | [models.DatasourceInstanceConfiguration](../models/datasourceinstanceconfiguration.md) | :heavy_check_mark: | Configuration for a datasource instance | \ No newline at end of file diff --git a/docs/models/rotatedatasourcecredentialsrequestrequest.md b/docs/models/rotatedatasourcecredentialsrequestrequest.md new file mode 100644 index 00000000..4a176545 --- /dev/null +++ b/docs/models/rotatedatasourcecredentialsrequestrequest.md @@ -0,0 +1,9 @@ +# RotateDatasourceCredentialsRequestRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `datasource_instance_id` | *str* | :heavy_check_mark: | The full datasource instance identifier (e.g. o365sharepoint_abc123) | o365sharepoint_abc123 | +| `rotate_datasource_credentials_request` | [models.RotateDatasourceCredentialsRequest](../models/rotatedatasourcecredentialsrequest.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/ugctype.md b/docs/models/ugctype.md index e71aeefa..6a011cee 100644 --- a/docs/models/ugctype.md +++ b/docs/models/ugctype.md @@ -32,4 +32,5 @@ value = UgcType.AGENT_TYPE | `SHORTCUTS_TYPE` | SHORTCUTS_TYPE | | `SLIDE_TYPE` | SLIDE_TYPE | | `SPREADSHEET_TYPE` | SPREADSHEET_TYPE | +| `INLINE_HTML_TYPE` | INLINE_HTML_TYPE | | `WORKFLOWS_TYPE` | WORKFLOWS_TYPE | \ No newline at end of file diff --git a/docs/sdks/datasources/README.md b/docs/sdks/datasources/README.md index 03c2257d..15b97d59 100644 --- a/docs/sdks/datasources/README.md +++ b/docs/sdks/datasources/README.md @@ -8,6 +8,8 @@ Manage datasources. * [get_datasource_instance_configuration](#get_datasource_instance_configuration) - Get datasource instance configuration * [update_datasource_instance_configuration](#update_datasource_instance_configuration) - Update datasource instance configuration +* [get_datasource_credential_status](#get_datasource_credential_status) - Get datasource instance credential status +* [rotate_datasource_credentials](#rotate_datasource_credentials) - Rotate datasource instance credentials ## get_datasource_instance_configuration @@ -95,6 +97,96 @@ with Glean( ### Errors +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| errors.ErrorResponse | 400, 403, 404 | application/json | +| errors.GleanError | 4XX, 5XX | \*/\* | + +## get_datasource_credential_status + +Returns the current credential status for a datasource instance. Access is limited to callers with the ADMIN scope; the handler enforces this check. + + +### Example Usage + + +```python +from glean.api_client import Glean +import os + + +with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), +) as glean: + + res = glean.datasources.get_datasource_credential_status(datasource_instance_id="o365sharepoint_abc123") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `datasource_instance_id` | *str* | :heavy_check_mark: | The full datasource instance identifier (e.g. o365sharepoint_abc123) | o365sharepoint_abc123 | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.DatasourceCredentialStatusResponse](../../models/datasourcecredentialstatusresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| errors.ErrorResponse | 400, 403, 404 | application/json | +| errors.GleanError | 4XX, 5XX | \*/\* | + +## rotate_datasource_credentials + +Rotates the credentials that a datasource instance uses to connect to its upstream system. Replaces the active credential material with the supplied values and returns the credential status after rotation. Access is limited to callers with the ADMIN scope; the handler enforces this check. +Only keys recognized as credential material for the datasource type may be set in `credentials.values` (e.g. `clientSecret`, `apiToken`, `privateKey`, depending on the configured auth method). Unrecognized keys, or keys that correspond to non-credential configuration, cause a 400; other instance configuration must be updated via PATCH /configure/datasources/{datasourceId}/instances/{instanceId}. + + +### Example Usage + + +```python +from glean.api_client import Glean +import os + + +with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), +) as glean: + + res = glean.datasources.rotate_datasource_credentials(datasource_instance_id="o365sharepoint_abc123", credentials={ + "values": { + "key": {}, + }, + }) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `datasource_instance_id` | *str* | :heavy_check_mark: | The full datasource instance identifier (e.g. o365sharepoint_abc123) | o365sharepoint_abc123 | +| `credentials` | [models.DatasourceInstanceConfiguration](../../models/datasourceinstanceconfiguration.md) | :heavy_check_mark: | Configuration for a datasource instance | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.DatasourceCredentialStatusResponse](../../models/datasourcecredentialstatusresponse.md)** + +### Errors + | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | | errors.ErrorResponse | 400, 403, 404 | application/json | diff --git a/docs/sdks/insights/README.md b/docs/sdks/insights/README.md index a11b3322..aa9f65ec 100644 --- a/docs/sdks/insights/README.md +++ b/docs/sdks/insights/README.md @@ -37,6 +37,7 @@ with Glean( | `overview_request` | [Optional[models.InsightsOverviewRequest]](../../models/insightsoverviewrequest.md) | :heavy_minus_sign: | N/A | | `assistant_request` | [Optional[models.InsightsAssistantRequest]](../../models/insightsassistantrequest.md) | :heavy_minus_sign: | N/A | | `agents_request` | [Optional[models.AgentsInsightsV2Request]](../../models/agentsinsightsv2request.md) | :heavy_minus_sign: | N/A | +| `mcp_breakdown_request` | [Optional[models.McpBreakdownInsightsRequest]](../../models/mcpbreakdowninsightsrequest.md) | :heavy_minus_sign: | N/A | | `disable_per_user_insights` | *Optional[bool]* | :heavy_minus_sign: | If true, suppresses the generation of per-user Insights in the response. Default is false. | | `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 5f4520c8..8bba6982 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "glean-api-client" -version = "0.12.24" +version = "0.12.25" description = "Python Client SDK Generated by Speakeasy." authors = [{ name = "Glean Technologies, Inc." },] readme = "README-PYPI.md" diff --git a/src/glean/api_client/_version.py b/src/glean/api_client/_version.py index f74aefe7..07b9a3d3 100644 --- a/src/glean/api_client/_version.py +++ b/src/glean/api_client/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "glean-api-client" -__version__: str = "0.12.24" +__version__: str = "0.12.25" __openapi_doc_version__: str = "0.9.0" -__gen_version__: str = "2.881.2" -__user_agent__: str = "speakeasy-sdk/python 0.12.24 2.881.2 0.9.0 glean-api-client" +__gen_version__: str = "2.881.4" +__user_agent__: str = "speakeasy-sdk/python 0.12.25 2.881.4 0.9.0 glean-api-client" try: if __package__ is not None: diff --git a/src/glean/api_client/datasources.py b/src/glean/api_client/datasources.py index 9e10a0db..e4eba5ec 100644 --- a/src/glean/api_client/datasources.py +++ b/src/glean/api_client/datasources.py @@ -421,3 +421,403 @@ async def update_datasource_instance_configuration_async( raise errors.GleanError("API error occurred", http_res, http_res_text) raise errors.GleanError("Unexpected response received", http_res) + + def get_datasource_credential_status( + self, + *, + datasource_instance_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DatasourceCredentialStatusResponse: + r"""Get datasource instance credential status + + Returns the current credential status for a datasource instance. Access is limited to callers with the ADMIN scope; the handler enforces this check. + + + :param datasource_instance_id: The full datasource instance identifier (e.g. o365sharepoint_abc123) + :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 server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetDatasourceCredentialStatusRequest( + datasource_instance_id=datasource_instance_id, + ) + + req = self._build_request( + method="GET", + path="/rest/api/v1/datasource/{datasourceInstanceId}/credentialstatus", + 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="getDatasourceCredentialStatus", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.DatasourceCredentialStatusResponse, http_res + ) + if utils.match_response(http_res, ["400", "403", "404"], "application/json"): + response_data = unmarshal_json_response(errors.ErrorResponseData, http_res) + raise errors.ErrorResponse(response_data, http_res) + if utils.match_response(http_res, ["401", "4XX"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("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.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) + + async def get_datasource_credential_status_async( + self, + *, + datasource_instance_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DatasourceCredentialStatusResponse: + r"""Get datasource instance credential status + + Returns the current credential status for a datasource instance. Access is limited to callers with the ADMIN scope; the handler enforces this check. + + + :param datasource_instance_id: The full datasource instance identifier (e.g. o365sharepoint_abc123) + :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 server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetDatasourceCredentialStatusRequest( + datasource_instance_id=datasource_instance_id, + ) + + req = self._build_request_async( + method="GET", + path="/rest/api/v1/datasource/{datasourceInstanceId}/credentialstatus", + 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="getDatasourceCredentialStatus", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.DatasourceCredentialStatusResponse, http_res + ) + if utils.match_response(http_res, ["400", "403", "404"], "application/json"): + response_data = unmarshal_json_response(errors.ErrorResponseData, http_res) + raise errors.ErrorResponse(response_data, http_res) + if utils.match_response(http_res, ["401", "4XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("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.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) + + def rotate_datasource_credentials( + self, + *, + datasource_instance_id: str, + credentials: Union[ + models.DatasourceInstanceConfiguration, + models.DatasourceInstanceConfigurationTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DatasourceCredentialStatusResponse: + r"""Rotate datasource instance credentials + + Rotates the credentials that a datasource instance uses to connect to its upstream system. Replaces the active credential material with the supplied values and returns the credential status after rotation. Access is limited to callers with the ADMIN scope; the handler enforces this check. + Only keys recognized as credential material for the datasource type may be set in `credentials.values` (e.g. `clientSecret`, `apiToken`, `privateKey`, depending on the configured auth method). Unrecognized keys, or keys that correspond to non-credential configuration, cause a 400; other instance configuration must be updated via PATCH /configure/datasources/{datasourceId}/instances/{instanceId}. + + + :param datasource_instance_id: The full datasource instance identifier (e.g. o365sharepoint_abc123) + :param credentials: Configuration for a datasource instance + :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 server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.RotateDatasourceCredentialsRequestRequest( + datasource_instance_id=datasource_instance_id, + rotate_datasource_credentials_request=models.RotateDatasourceCredentialsRequest( + credentials=utils.get_pydantic_model( + credentials, models.DatasourceInstanceConfiguration + ), + ), + ) + + req = self._build_request( + method="POST", + path="/rest/api/v1/datasource/{datasourceInstanceId}/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.rotate_datasource_credentials_request, + False, + False, + "json", + models.RotateDatasourceCredentialsRequest, + ), + 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="rotateDatasourceCredentials", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.DatasourceCredentialStatusResponse, http_res + ) + if utils.match_response(http_res, ["400", "403", "404"], "application/json"): + response_data = unmarshal_json_response(errors.ErrorResponseData, http_res) + raise errors.ErrorResponse(response_data, http_res) + if utils.match_response(http_res, ["401", "4XX"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("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.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) + + async def rotate_datasource_credentials_async( + self, + *, + datasource_instance_id: str, + credentials: Union[ + models.DatasourceInstanceConfiguration, + models.DatasourceInstanceConfigurationTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DatasourceCredentialStatusResponse: + r"""Rotate datasource instance credentials + + Rotates the credentials that a datasource instance uses to connect to its upstream system. Replaces the active credential material with the supplied values and returns the credential status after rotation. Access is limited to callers with the ADMIN scope; the handler enforces this check. + Only keys recognized as credential material for the datasource type may be set in `credentials.values` (e.g. `clientSecret`, `apiToken`, `privateKey`, depending on the configured auth method). Unrecognized keys, or keys that correspond to non-credential configuration, cause a 400; other instance configuration must be updated via PATCH /configure/datasources/{datasourceId}/instances/{instanceId}. + + + :param datasource_instance_id: The full datasource instance identifier (e.g. o365sharepoint_abc123) + :param credentials: Configuration for a datasource instance + :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 server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.RotateDatasourceCredentialsRequestRequest( + datasource_instance_id=datasource_instance_id, + rotate_datasource_credentials_request=models.RotateDatasourceCredentialsRequest( + credentials=utils.get_pydantic_model( + credentials, models.DatasourceInstanceConfiguration + ), + ), + ) + + req = self._build_request_async( + method="POST", + path="/rest/api/v1/datasource/{datasourceInstanceId}/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.rotate_datasource_credentials_request, + False, + False, + "json", + models.RotateDatasourceCredentialsRequest, + ), + 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="rotateDatasourceCredentials", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.DatasourceCredentialStatusResponse, http_res + ) + if utils.match_response(http_res, ["400", "403", "404"], "application/json"): + response_data = unmarshal_json_response(errors.ErrorResponseData, http_res) + raise errors.ErrorResponse(response_data, http_res) + if utils.match_response(http_res, ["401", "4XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("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.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) diff --git a/src/glean/api_client/insights.py b/src/glean/api_client/insights.py index 69c096ed..79e1b592 100644 --- a/src/glean/api_client/insights.py +++ b/src/glean/api_client/insights.py @@ -30,6 +30,12 @@ def retrieve( models.AgentsInsightsV2Request, models.AgentsInsightsV2RequestTypedDict ] ] = None, + mcp_breakdown_request: Optional[ + Union[ + models.McpBreakdownInsightsRequest, + models.McpBreakdownInsightsRequestTypedDict, + ] + ] = None, disable_per_user_insights: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -44,6 +50,7 @@ def retrieve( :param overview_request: :param assistant_request: :param agents_request: + :param mcp_breakdown_request: :param disable_per_user_insights: If true, suppresses the generation of per-user Insights in the response. Default is false. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -72,6 +79,9 @@ def retrieve( agents_request=utils.get_pydantic_model( agents_request, Optional[models.AgentsInsightsV2Request] ), + mcp_breakdown_request=utils.get_pydantic_model( + mcp_breakdown_request, Optional[models.McpBreakdownInsightsRequest] + ), disable_per_user_insights=disable_per_user_insights, ), ) @@ -150,6 +160,12 @@ async def retrieve_async( models.AgentsInsightsV2Request, models.AgentsInsightsV2RequestTypedDict ] ] = None, + mcp_breakdown_request: Optional[ + Union[ + models.McpBreakdownInsightsRequest, + models.McpBreakdownInsightsRequestTypedDict, + ] + ] = None, disable_per_user_insights: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -164,6 +180,7 @@ async def retrieve_async( :param overview_request: :param assistant_request: :param agents_request: + :param mcp_breakdown_request: :param disable_per_user_insights: If true, suppresses the generation of per-user Insights in the response. Default is false. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -192,6 +209,9 @@ async def retrieve_async( agents_request=utils.get_pydantic_model( agents_request, Optional[models.AgentsInsightsV2Request] ), + mcp_breakdown_request=utils.get_pydantic_model( + mcp_breakdown_request, Optional[models.McpBreakdownInsightsRequest] + ), disable_per_user_insights=disable_per_user_insights, ), ) diff --git a/src/glean/api_client/models/__init__.py b/src/glean/api_client/models/__init__.py index 1a54febc..cf5633c5 100644 --- a/src/glean/api_client/models/__init__.py +++ b/src/glean/api_client/models/__init__.py @@ -147,6 +147,7 @@ AgentsUsageByDepartmentInsight, AgentsUsageByDepartmentInsightTypedDict, ) + from .agentusecaseinsight import AgentUseCaseInsight, AgentUseCaseInsightTypedDict from .agentusersinsight import AgentUsersInsight, AgentUsersInsightTypedDict from .allowlistoptions import AllowlistOptions, AllowlistOptionsTypedDict from .announcement import ( @@ -411,6 +412,11 @@ DatasourceConfigurationResponse, DatasourceConfigurationResponseTypedDict, ) + from .datasourcecredentialstatus import DatasourceCredentialStatus + from .datasourcecredentialstatusresponse import ( + DatasourceCredentialStatusResponse, + DatasourceCredentialStatusResponseTypedDict, + ) from .datasourcegroupdefinition import ( DatasourceGroupDefinition, DatasourceGroupDefinitionTypedDict, @@ -794,6 +800,10 @@ GetDatasourceConfigRequest, GetDatasourceConfigRequestTypedDict, ) + from .getdatasourcecredentialstatusop import ( + GetDatasourceCredentialStatusRequest, + GetDatasourceCredentialStatusRequestTypedDict, + ) from .getdatasourceinstanceconfigurationop import ( GetDatasourceInstanceConfigurationRequest, GetDatasourceInstanceConfigurationRequestTypedDict, @@ -1032,6 +1042,11 @@ ManualFeedbackSideBySideInfoTypedDict, ManualFeedbackSideBySideInfoVote, ) + from .mcpbreakdowninsightsrequest import ( + BreakdownType, + McpBreakdownInsightsRequest, + McpBreakdownInsightsRequestTypedDict, + ) from .message import ( Message, MessageTextBlock, @@ -1157,6 +1172,14 @@ from .resultsdescription import ResultsDescription, ResultsDescriptionTypedDict from .resultsresponse import ResultsResponse, ResultsResponseTypedDict from .resulttab import ResultTab, ResultTabTypedDict + from .rotatedatasourcecredentialsop import ( + RotateDatasourceCredentialsRequestRequest, + RotateDatasourceCredentialsRequestRequestTypedDict, + ) + from .rotatedatasourcecredentialsrequest import ( + RotateDatasourceCredentialsRequest, + RotateDatasourceCredentialsRequestTypedDict, + ) from .rotatetokenresponse import RotateTokenResponse, RotateTokenResponseTypedDict from .scopetype import ScopeType from .searchagentsrequest import SearchAgentsRequest, SearchAgentsRequestTypedDict @@ -1485,6 +1508,8 @@ "AgentSchemas", "AgentSchemasTypedDict", "AgentTypedDict", + "AgentUseCaseInsight", + "AgentUseCaseInsightTypedDict", "AgentUsersInsight", "AgentUsersInsightTypedDict", "AgentsInsightsV2Request", @@ -1545,6 +1570,7 @@ "AutocompleteResultTypedDict", "Badge", "BadgeTypedDict", + "BreakdownType", "BulkIndexDocumentsRequest", "BulkIndexDocumentsRequestTypedDict", "BulkIndexEmployeesRequest", @@ -1724,6 +1750,9 @@ "DatasourceCategory", "DatasourceConfigurationResponse", "DatasourceConfigurationResponseTypedDict", + "DatasourceCredentialStatus", + "DatasourceCredentialStatusResponse", + "DatasourceCredentialStatusResponseTypedDict", "DatasourceGroupDefinition", "DatasourceGroupDefinitionTypedDict", "DatasourceInstanceConfiguration", @@ -2016,6 +2045,8 @@ "GetCollectionResponseTypedDict", "GetDatasourceConfigRequest", "GetDatasourceConfigRequestTypedDict", + "GetDatasourceCredentialStatusRequest", + "GetDatasourceCredentialStatusRequestTypedDict", "GetDatasourceInstanceConfigurationRequest", "GetDatasourceInstanceConfigurationRequestTypedDict", "GetDlpReportResponse", @@ -2211,6 +2242,8 @@ "ManualFeedbackSideBySideInfoSource", "ManualFeedbackSideBySideInfoTypedDict", "ManualFeedbackSideBySideInfoVote", + "McpBreakdownInsightsRequest", + "McpBreakdownInsightsRequestTypedDict", "Meeting", "MeetingTypedDict", "Message", @@ -2362,6 +2395,10 @@ "ResultsResponse", "ResultsResponseTypedDict", "Role", + "RotateDatasourceCredentialsRequest", + "RotateDatasourceCredentialsRequestRequest", + "RotateDatasourceCredentialsRequestRequestTypedDict", + "RotateDatasourceCredentialsRequestTypedDict", "RotateTokenResponse", "RotateTokenResponseTypedDict", "Scope", @@ -2652,6 +2689,8 @@ "AgentsTimeSavedInsightTypedDict": ".agentstimesavedinsight", "AgentsUsageByDepartmentInsight": ".agentsusagebydepartmentinsight", "AgentsUsageByDepartmentInsightTypedDict": ".agentsusagebydepartmentinsight", + "AgentUseCaseInsight": ".agentusecaseinsight", + "AgentUseCaseInsightTypedDict": ".agentusecaseinsight", "AgentUsersInsight": ".agentusersinsight", "AgentUsersInsightTypedDict": ".agentusersinsight", "AllowlistOptions": ".allowlistoptions", @@ -2853,6 +2892,9 @@ "DatasourceBulkMembershipDefinitionTypedDict": ".datasourcebulkmembershipdefinition", "DatasourceConfigurationResponse": ".datasourceconfigurationresponse", "DatasourceConfigurationResponseTypedDict": ".datasourceconfigurationresponse", + "DatasourceCredentialStatus": ".datasourcecredentialstatus", + "DatasourceCredentialStatusResponse": ".datasourcecredentialstatusresponse", + "DatasourceCredentialStatusResponseTypedDict": ".datasourcecredentialstatusresponse", "DatasourceGroupDefinition": ".datasourcegroupdefinition", "DatasourceGroupDefinitionTypedDict": ".datasourcegroupdefinition", "DatasourceInstanceConfiguration": ".datasourceinstanceconfiguration", @@ -3150,6 +3192,8 @@ "GetCollectionResponseTypedDict": ".getcollectionresponse", "GetDatasourceConfigRequest": ".getdatasourceconfigrequest", "GetDatasourceConfigRequestTypedDict": ".getdatasourceconfigrequest", + "GetDatasourceCredentialStatusRequest": ".getdatasourcecredentialstatusop", + "GetDatasourceCredentialStatusRequestTypedDict": ".getdatasourcecredentialstatusop", "GetDatasourceInstanceConfigurationRequest": ".getdatasourceinstanceconfigurationop", "GetDatasourceInstanceConfigurationRequestTypedDict": ".getdatasourceinstanceconfigurationop", "GetDlpReportResponse": ".getdlpreportresponse", @@ -3322,6 +3366,9 @@ "ManualFeedbackSideBySideInfoSource": ".manualfeedbacksidebysideinfo", "ManualFeedbackSideBySideInfoTypedDict": ".manualfeedbacksidebysideinfo", "ManualFeedbackSideBySideInfoVote": ".manualfeedbacksidebysideinfo", + "BreakdownType": ".mcpbreakdowninsightsrequest", + "McpBreakdownInsightsRequest": ".mcpbreakdowninsightsrequest", + "McpBreakdownInsightsRequestTypedDict": ".mcpbreakdowninsightsrequest", "Message": ".message", "MessageTextBlock": ".message", "MessageTextBlockTypedDict": ".message", @@ -3434,6 +3481,10 @@ "ResultsResponseTypedDict": ".resultsresponse", "ResultTab": ".resulttab", "ResultTabTypedDict": ".resulttab", + "RotateDatasourceCredentialsRequestRequest": ".rotatedatasourcecredentialsop", + "RotateDatasourceCredentialsRequestRequestTypedDict": ".rotatedatasourcecredentialsop", + "RotateDatasourceCredentialsRequest": ".rotatedatasourcecredentialsrequest", + "RotateDatasourceCredentialsRequestTypedDict": ".rotatedatasourcecredentialsrequest", "RotateTokenResponse": ".rotatetokenresponse", "RotateTokenResponseTypedDict": ".rotatetokenresponse", "ScopeType": ".scopetype", diff --git a/src/glean/api_client/models/addcollectionitemserror.py b/src/glean/api_client/models/addcollectionitemserror.py index aa8987c8..8f738ea3 100644 --- a/src/glean/api_client/models/addcollectionitemserror.py +++ b/src/glean/api_client/models/addcollectionitemserror.py @@ -2,15 +2,17 @@ from __future__ import annotations from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict -class AddCollectionItemsErrorErrorType(str, Enum): +class AddCollectionItemsErrorErrorType(str, Enum, metaclass=utils.OpenEnumMeta): EXISTING_ITEM = "EXISTING_ITEM" + CORRUPT_ITEM = "CORRUPT_ITEM" class AddCollectionItemsErrorTypedDict(TypedDict): @@ -22,6 +24,15 @@ class AddCollectionItemsError(BaseModel): Optional[AddCollectionItemsErrorErrorType], pydantic.Field(alias="errorType") ] = None + @field_serializer("error_type") + def serialize_error_type(self, value): + if isinstance(value, str): + try: + return models.AddCollectionItemsErrorErrorType(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["errorType"]) diff --git a/src/glean/api_client/models/agentsinsightsv2response.py b/src/glean/api_client/models/agentsinsightsv2response.py index cf04728a..ae50b9b4 100644 --- a/src/glean/api_client/models/agentsinsightsv2response.py +++ b/src/glean/api_client/models/agentsinsightsv2response.py @@ -9,6 +9,7 @@ AgentsUsageByDepartmentInsight, AgentsUsageByDepartmentInsightTypedDict, ) +from .agentusecaseinsight import AgentUseCaseInsight, AgentUseCaseInsightTypedDict from .agentusersinsight import AgentUsersInsight, AgentUsersInsightTypedDict from .labeledcountinfo import LabeledCountInfo, LabeledCountInfoTypedDict from .peragentinsight import PerAgentInsight, PerAgentInsightTypedDict @@ -21,15 +22,16 @@ class AgentsInsightsV2ResponseTypedDict(TypedDict): monthly_active_users: NotRequired[int] - r"""Number of current Monthly Active Users, in the specified departments.""" + r"""Number of current Monthly Active Users.""" weekly_active_users: NotRequired[int] - r"""Number of current Weekly Active Users, in the specified departments.""" + r"""Number of current Weekly Active Users.""" monthly_active_user_timeseries: NotRequired[LabeledCountInfoTypedDict] weekly_active_user_timeseries: NotRequired[LabeledCountInfoTypedDict] daily_active_user_timeseries: NotRequired[LabeledCountInfoTypedDict] shared_agents_count: NotRequired[int] r"""Total number of shared agents.""" top_agents_insights: NotRequired[List[PerAgentInsightTypedDict]] + top_use_cases_insights: NotRequired[List[AgentUseCaseInsightTypedDict]] agents_usage_by_department_insights: NotRequired[ List[AgentsUsageByDepartmentInsightTypedDict] ] @@ -48,12 +50,12 @@ class AgentsInsightsV2Response(BaseModel): monthly_active_users: Annotated[ Optional[int], pydantic.Field(alias="monthlyActiveUsers") ] = None - r"""Number of current Monthly Active Users, in the specified departments.""" + r"""Number of current Monthly Active Users.""" weekly_active_users: Annotated[ Optional[int], pydantic.Field(alias="weeklyActiveUsers") ] = None - r"""Number of current Weekly Active Users, in the specified departments.""" + r"""Number of current Weekly Active Users.""" monthly_active_user_timeseries: Annotated[ Optional[LabeledCountInfo], pydantic.Field(alias="monthlyActiveUserTimeseries") @@ -76,6 +78,10 @@ class AgentsInsightsV2Response(BaseModel): Optional[List[PerAgentInsight]], pydantic.Field(alias="topAgentsInsights") ] = None + top_use_cases_insights: Annotated[ + Optional[List[AgentUseCaseInsight]], pydantic.Field(alias="topUseCasesInsights") + ] = None + agents_usage_by_department_insights: Annotated[ Optional[List[AgentsUsageByDepartmentInsight]], pydantic.Field(alias="agentsUsageByDepartmentInsights"), @@ -126,6 +132,7 @@ def serialize_model(self, handler): "dailyActiveUserTimeseries", "sharedAgentsCount", "topAgentsInsights", + "topUseCasesInsights", "agentsUsageByDepartmentInsights", "agentUsersInsights", "agentsTimeSavedInsights", diff --git a/src/glean/api_client/models/agentusecaseinsight.py b/src/glean/api_client/models/agentusecaseinsight.py new file mode 100644 index 00000000..4841a4ed --- /dev/null +++ b/src/glean/api_client/models/agentusecaseinsight.py @@ -0,0 +1,95 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .iconconfig import IconConfig, IconConfigTypedDict +from glean.api_client.types import BaseModel, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class AgentUseCaseInsightTypedDict(TypedDict): + use_case: NotRequired[str] + r"""Use case name""" + run_count: NotRequired[int] + r"""Total number of runs for this use case over the specified time period.""" + trend: NotRequired[float] + r"""Percentage change in runs compared to the previous equivalent time period.""" + top_departments: NotRequired[str] + r"""Comma-separated list of the top departments using this use case.""" + top_agent_id: NotRequired[str] + r"""ID of the most-used agent for this use case.""" + top_agent_name: NotRequired[str] + r"""Name of the most-used agent for this use case.""" + top_agent_icon: NotRequired[IconConfigTypedDict] + r"""Defines how to render an icon""" + top_agent_is_deleted: NotRequired[bool] + r"""Indicates whether the top agent has been deleted.""" + + +class AgentUseCaseInsight(BaseModel): + use_case: Annotated[Optional[str], pydantic.Field(alias="useCase")] = None + r"""Use case name""" + + run_count: Annotated[Optional[int], pydantic.Field(alias="runCount")] = None + r"""Total number of runs for this use case over the specified time period.""" + + trend: Optional[float] = None + r"""Percentage change in runs compared to the previous equivalent time period.""" + + top_departments: Annotated[ + Optional[str], pydantic.Field(alias="topDepartments") + ] = None + r"""Comma-separated list of the top departments using this use case.""" + + top_agent_id: Annotated[Optional[str], pydantic.Field(alias="topAgentId")] = None + r"""ID of the most-used agent for this use case.""" + + top_agent_name: Annotated[Optional[str], pydantic.Field(alias="topAgentName")] = ( + None + ) + r"""Name of the most-used agent for this use case.""" + + top_agent_icon: Annotated[ + Optional[IconConfig], pydantic.Field(alias="topAgentIcon") + ] = None + r"""Defines how to render an icon""" + + top_agent_is_deleted: Annotated[ + Optional[bool], pydantic.Field(alias="topAgentIsDeleted") + ] = None + r"""Indicates whether the top agent has been deleted.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "useCase", + "runCount", + "trend", + "topDepartments", + "topAgentId", + "topAgentName", + "topAgentIcon", + "topAgentIsDeleted", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + AgentUseCaseInsight.model_rebuild() +except NameError: + pass diff --git a/src/glean/api_client/models/assistantinsightsresponse.py b/src/glean/api_client/models/assistantinsightsresponse.py index d6fa5492..47e9bf2f 100644 --- a/src/glean/api_client/models/assistantinsightsresponse.py +++ b/src/glean/api_client/models/assistantinsightsresponse.py @@ -15,9 +15,9 @@ class AssistantInsightsResponseTypedDict(TypedDict): monthly_active_users: NotRequired[int] - r"""Number of current Monthly Active Users, in the specified departments.""" + r"""Number of current Monthly Active Users.""" weekly_active_users: NotRequired[int] - r"""Number of current Weekly Active Users, in the specified departments.""" + r"""Number of current Weekly Active Users.""" last_updated_ts: NotRequired[int] r"""Unix timestamp of the last update for the insights data in the response.""" monthly_active_user_timeseries: NotRequired[LabeledCountInfoTypedDict] @@ -38,12 +38,12 @@ class AssistantInsightsResponse(BaseModel): monthly_active_users: Annotated[ Optional[int], pydantic.Field(alias="monthlyActiveUsers") ] = None - r"""Number of current Monthly Active Users, in the specified departments.""" + r"""Number of current Monthly Active Users.""" weekly_active_users: Annotated[ Optional[int], pydantic.Field(alias="weeklyActiveUsers") ] = None - r"""Number of current Weekly Active Users, in the specified departments.""" + r"""Number of current Weekly Active Users.""" last_updated_ts: Annotated[Optional[int], pydantic.Field(alias="lastUpdatedTs")] = ( None diff --git a/src/glean/api_client/models/collectionerror.py b/src/glean/api_client/models/collectionerror.py index ef1aa0da..408d04c7 100644 --- a/src/glean/api_client/models/collectionerror.py +++ b/src/glean/api_client/models/collectionerror.py @@ -17,6 +17,7 @@ class CollectionErrorErrorCode(str, Enum, metaclass=utils.OpenEnumMeta): HEIGHT_VIOLATION = "HEIGHT_VIOLATION" WIDTH_VIOLATION = "WIDTH_VIOLATION" NO_PERMISSIONS = "NO_PERMISSIONS" + CORRUPT_ITEM = "CORRUPT_ITEM" class CollectionErrorTypedDict(TypedDict): diff --git a/src/glean/api_client/models/currentactiveusers.py b/src/glean/api_client/models/currentactiveusers.py index 10c5f779..1236b653 100644 --- a/src/glean/api_client/models/currentactiveusers.py +++ b/src/glean/api_client/models/currentactiveusers.py @@ -10,21 +10,21 @@ class CurrentActiveUsersTypedDict(TypedDict): monthly_active_users: NotRequired[int] - r"""Number of current Monthly Active Users, in the specified departments.""" + r"""Number of current Monthly Active Users.""" weekly_active_users: NotRequired[int] - r"""Number of current Weekly Active Users, in the specified departments.""" + r"""Number of current Weekly Active Users.""" class CurrentActiveUsers(BaseModel): monthly_active_users: Annotated[ Optional[int], pydantic.Field(alias="monthlyActiveUsers") ] = None - r"""Number of current Monthly Active Users, in the specified departments.""" + r"""Number of current Monthly Active Users.""" weekly_active_users: Annotated[ Optional[int], pydantic.Field(alias="weeklyActiveUsers") ] = None - r"""Number of current Weekly Active Users, in the specified departments.""" + r"""Number of current Weekly Active Users.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/glean/api_client/models/datasourcecredentialstatus.py b/src/glean/api_client/models/datasourcecredentialstatus.py new file mode 100644 index 00000000..aa0eff70 --- /dev/null +++ b/src/glean/api_client/models/datasourcecredentialstatus.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from glean.api_client import utils + + +class DatasourceCredentialStatus(str, Enum, metaclass=utils.OpenEnumMeta): + r"""Lifecycle state of the credentials installed for a datasource instance. Mirrors the internal admin Status enum so the handler can surface the same health signals already tracked today. EXPIRING_SOON is represented as VALID_WITH_WARNINGS (with detail in `message`); EXPIRED is surfaced as INVALID plus a non-null `expiresAt` in the past.""" + + VALID = "VALID" + VALID_WITH_WARNINGS = "VALID_WITH_WARNINGS" + VALIDATING = "VALIDATING" + INVALID = "INVALID" + MISSING = "MISSING" diff --git a/src/glean/api_client/models/datasourcecredentialstatusresponse.py b/src/glean/api_client/models/datasourcecredentialstatusresponse.py new file mode 100644 index 00000000..150f1a48 --- /dev/null +++ b/src/glean/api_client/models/datasourcecredentialstatusresponse.py @@ -0,0 +1,81 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .datasourcecredentialstatus import DatasourceCredentialStatus +from datetime import datetime +from glean.api_client import models +from glean.api_client.types import BaseModel, UNSET_SENTINEL +import pydantic +from pydantic import field_serializer, model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class DatasourceCredentialStatusResponseTypedDict(TypedDict): + r"""Status of the credentials currently installed for a datasource instance.""" + + status: DatasourceCredentialStatus + r"""Lifecycle state of the credentials installed for a datasource instance. Mirrors the internal admin Status enum so the handler can surface the same health signals already tracked today. EXPIRING_SOON is represented as VALID_WITH_WARNINGS (with detail in `message`); EXPIRED is surfaced as INVALID plus a non-null `expiresAt` in the past. + + """ + last_rotated_at: NotRequired[datetime] + r"""When the credentials were last rotated. Omitted when not known.""" + expires_at: NotRequired[datetime] + r"""When the active credentials expire. Omitted when not known or not applicable to this credential type. + + """ + message: NotRequired[str] + r"""Optional human-readable detail about the current credential status.""" + + +class DatasourceCredentialStatusResponse(BaseModel): + r"""Status of the credentials currently installed for a datasource instance.""" + + status: DatasourceCredentialStatus + r"""Lifecycle state of the credentials installed for a datasource instance. Mirrors the internal admin Status enum so the handler can surface the same health signals already tracked today. EXPIRING_SOON is represented as VALID_WITH_WARNINGS (with detail in `message`); EXPIRED is surfaced as INVALID plus a non-null `expiresAt` in the past. + + """ + + last_rotated_at: Annotated[ + Optional[datetime], pydantic.Field(alias="lastRotatedAt") + ] = None + r"""When the credentials were last rotated. Omitted when not known.""" + + expires_at: Annotated[Optional[datetime], pydantic.Field(alias="expiresAt")] = None + r"""When the active credentials expire. Omitted when not known or not applicable to this credential type. + + """ + + message: Optional[str] = None + r"""Optional human-readable detail about the current credential status.""" + + @field_serializer("status") + def serialize_status(self, value): + if isinstance(value, str): + try: + return models.DatasourceCredentialStatus(value) + except ValueError: + return value + return value + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["lastRotatedAt", "expiresAt", "message"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + DatasourceCredentialStatusResponse.model_rebuild() +except NameError: + pass diff --git a/src/glean/api_client/models/editcollectionresponse.py b/src/glean/api_client/models/editcollectionresponse.py index dcd4373f..0ad3f083 100644 --- a/src/glean/api_client/models/editcollectionresponse.py +++ b/src/glean/api_client/models/editcollectionresponse.py @@ -31,6 +31,7 @@ class EditCollectionResponseErrorCode(str, Enum, metaclass=utils.OpenEnumMeta): HEIGHT_VIOLATION = "HEIGHT_VIOLATION" WIDTH_VIOLATION = "WIDTH_VIOLATION" NO_PERMISSIONS = "NO_PERMISSIONS" + CORRUPT_ITEM = "CORRUPT_ITEM" class EditCollectionResponseTypedDict(TypedDict): diff --git a/src/glean/api_client/models/feedentry.py b/src/glean/api_client/models/feedentry.py index cec9f210..53432284 100644 --- a/src/glean/api_client/models/feedentry.py +++ b/src/glean/api_client/models/feedentry.py @@ -118,6 +118,7 @@ class JustificationType(str, Enum, metaclass=utils.OpenEnumMeta): FOLLOW_UP = "FOLLOW_UP" MILESTONE_TIMELINE_CHECK = "MILESTONE_TIMELINE_CHECK" PROJECT_DISCUSSION_DIGEST = "PROJECT_DISCUSSION_DIGEST" + PROJECT_FOCUS_BLOCK = "PROJECT_FOCUS_BLOCK" PROJECT_NEXT_STEP = "PROJECT_NEXT_STEP" diff --git a/src/glean/api_client/models/feedrequest.py b/src/glean/api_client/models/feedrequest.py index 0362ce88..8e60652f 100644 --- a/src/glean/api_client/models/feedrequest.py +++ b/src/glean/api_client/models/feedrequest.py @@ -47,6 +47,7 @@ class FeedRequestCategory(str, Enum): FOLLOW_UP = "FOLLOW_UP" MILESTONE_TIMELINE_CHECK = "MILESTONE_TIMELINE_CHECK" PROJECT_DISCUSSION_DIGEST = "PROJECT_DISCUSSION_DIGEST" + PROJECT_FOCUS_BLOCK = "PROJECT_FOCUS_BLOCK" PROJECT_NEXT_STEP = "PROJECT_NEXT_STEP" diff --git a/src/glean/api_client/models/feedresult.py b/src/glean/api_client/models/feedresult.py index 475fbb42..0d9d6a23 100644 --- a/src/glean/api_client/models/feedresult.py +++ b/src/glean/api_client/models/feedresult.py @@ -49,6 +49,7 @@ class FeedResultCategory(str, Enum, metaclass=utils.OpenEnumMeta): FOLLOW_UP = "FOLLOW_UP" MILESTONE_TIMELINE_CHECK = "MILESTONE_TIMELINE_CHECK" PROJECT_DISCUSSION_DIGEST = "PROJECT_DISCUSSION_DIGEST" + PROJECT_FOCUS_BLOCK = "PROJECT_FOCUS_BLOCK" PROJECT_NEXT_STEP = "PROJECT_NEXT_STEP" diff --git a/src/glean/api_client/models/getdatasourcecredentialstatusop.py b/src/glean/api_client/models/getdatasourcecredentialstatusop.py new file mode 100644 index 00000000..d693ed54 --- /dev/null +++ b/src/glean/api_client/models/getdatasourcecredentialstatusop.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from glean.api_client.types import BaseModel +from glean.api_client.utils import FieldMetadata, PathParamMetadata +import pydantic +from typing_extensions import Annotated, TypedDict + + +class GetDatasourceCredentialStatusRequestTypedDict(TypedDict): + datasource_instance_id: str + r"""The full datasource instance identifier (e.g. o365sharepoint_abc123)""" + + +class GetDatasourceCredentialStatusRequest(BaseModel): + datasource_instance_id: Annotated[ + str, + pydantic.Field(alias="datasourceInstanceId"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""The full datasource instance identifier (e.g. o365sharepoint_abc123)""" diff --git a/src/glean/api_client/models/insightschatsummary.py b/src/glean/api_client/models/insightschatsummary.py index fcc83ccd..44b76c5a 100644 --- a/src/glean/api_client/models/insightschatsummary.py +++ b/src/glean/api_client/models/insightschatsummary.py @@ -10,9 +10,9 @@ class InsightsChatSummaryTypedDict(TypedDict): monthly_active_users: NotRequired[int] - r"""Number of current Monthly Active Users, in the specified departments.""" + r"""Number of current Monthly Active Users.""" weekly_active_users: NotRequired[int] - r"""Number of current Weekly Active Users, in the specified departments.""" + r"""Number of current Weekly Active Users.""" num_chats: NotRequired[int] r"""Total number of chats by users over the specified time period.""" num_chat_users: NotRequired[int] @@ -23,12 +23,12 @@ class InsightsChatSummary(BaseModel): monthly_active_users: Annotated[ Optional[int], pydantic.Field(alias="monthlyActiveUsers") ] = None - r"""Number of current Monthly Active Users, in the specified departments.""" + r"""Number of current Monthly Active Users.""" weekly_active_users: Annotated[ Optional[int], pydantic.Field(alias="weeklyActiveUsers") ] = None - r"""Number of current Weekly Active Users, in the specified departments.""" + r"""Number of current Weekly Active Users.""" num_chats: Annotated[Optional[int], pydantic.Field(alias="numChats")] = None r"""Total number of chats by users over the specified time period.""" diff --git a/src/glean/api_client/models/insightsoverviewresponse.py b/src/glean/api_client/models/insightsoverviewresponse.py index 23c45162..5dca066c 100644 --- a/src/glean/api_client/models/insightsoverviewresponse.py +++ b/src/glean/api_client/models/insightsoverviewresponse.py @@ -15,9 +15,9 @@ class InsightsOverviewResponseTypedDict(TypedDict): monthly_active_users: NotRequired[int] - r"""Number of current Monthly Active Users, in the specified departments.""" + r"""Number of current Monthly Active Users.""" weekly_active_users: NotRequired[int] - r"""Number of current Weekly Active Users, in the specified departments.""" + r"""Number of current Weekly Active Users.""" departments: NotRequired[List[str]] r"""Department name(s).""" employee_count: NotRequired[int] @@ -62,12 +62,12 @@ class InsightsOverviewResponse(BaseModel): monthly_active_users: Annotated[ Optional[int], pydantic.Field(alias="monthlyActiveUsers") ] = None - r"""Number of current Monthly Active Users, in the specified departments.""" + r"""Number of current Monthly Active Users.""" weekly_active_users: Annotated[ Optional[int], pydantic.Field(alias="weeklyActiveUsers") ] = None - r"""Number of current Weekly Active Users, in the specified departments.""" + r"""Number of current Weekly Active Users.""" departments: Optional[List[str]] = None r"""Department name(s).""" diff --git a/src/glean/api_client/models/insightsrequest.py b/src/glean/api_client/models/insightsrequest.py index 9138fc70..4323beb9 100644 --- a/src/glean/api_client/models/insightsrequest.py +++ b/src/glean/api_client/models/insightsrequest.py @@ -13,6 +13,10 @@ InsightsOverviewRequest, InsightsOverviewRequestTypedDict, ) +from .mcpbreakdowninsightsrequest import ( + McpBreakdownInsightsRequest, + McpBreakdownInsightsRequestTypedDict, +) from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic from pydantic import model_serializer @@ -24,6 +28,7 @@ class InsightsRequestTypedDict(TypedDict): overview_request: NotRequired[InsightsOverviewRequestTypedDict] assistant_request: NotRequired[InsightsAssistantRequestTypedDict] agents_request: NotRequired[AgentsInsightsV2RequestTypedDict] + mcp_breakdown_request: NotRequired[McpBreakdownInsightsRequestTypedDict] disable_per_user_insights: NotRequired[bool] r"""If true, suppresses the generation of per-user Insights in the response. Default is false.""" @@ -41,6 +46,11 @@ class InsightsRequest(BaseModel): Optional[AgentsInsightsV2Request], pydantic.Field(alias="agentsRequest") ] = None + mcp_breakdown_request: Annotated[ + Optional[McpBreakdownInsightsRequest], + pydantic.Field(alias="mcpBreakdownRequest"), + ] = None + disable_per_user_insights: Annotated[ Optional[bool], pydantic.Field(alias="disablePerUserInsights") ] = None @@ -53,6 +63,7 @@ def serialize_model(self, handler): "overviewRequest", "assistantRequest", "agentsRequest", + "mcpBreakdownRequest", "disablePerUserInsights", ] ) diff --git a/src/glean/api_client/models/insightssearchsummary.py b/src/glean/api_client/models/insightssearchsummary.py index 4e4c5b9d..481ba43c 100644 --- a/src/glean/api_client/models/insightssearchsummary.py +++ b/src/glean/api_client/models/insightssearchsummary.py @@ -10,9 +10,9 @@ class InsightsSearchSummaryTypedDict(TypedDict): monthly_active_users: NotRequired[int] - r"""Number of current Monthly Active Users, in the specified departments.""" + r"""Number of current Monthly Active Users.""" weekly_active_users: NotRequired[int] - r"""Number of current Weekly Active Users, in the specified departments.""" + r"""Number of current Weekly Active Users.""" num_searches: NotRequired[int] r"""Total number of searches by users over the specified time period.""" num_search_users: NotRequired[int] @@ -23,12 +23,12 @@ class InsightsSearchSummary(BaseModel): monthly_active_users: Annotated[ Optional[int], pydantic.Field(alias="monthlyActiveUsers") ] = None - r"""Number of current Monthly Active Users, in the specified departments.""" + r"""Number of current Monthly Active Users.""" weekly_active_users: Annotated[ Optional[int], pydantic.Field(alias="weeklyActiveUsers") ] = None - r"""Number of current Weekly Active Users, in the specified departments.""" + r"""Number of current Weekly Active Users.""" num_searches: Annotated[Optional[int], pydantic.Field(alias="numSearches")] = None r"""Total number of searches by users over the specified time period.""" diff --git a/src/glean/api_client/models/mcpbreakdowninsightsrequest.py b/src/glean/api_client/models/mcpbreakdowninsightsrequest.py new file mode 100644 index 00000000..f1eebdb4 --- /dev/null +++ b/src/glean/api_client/models/mcpbreakdowninsightsrequest.py @@ -0,0 +1,95 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .period import Period, PeriodTypedDict +from enum import Enum +from glean.api_client.types import BaseModel, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class BreakdownType(str, Enum): + r"""Type of breakdown to return.""" + + USERS = "USERS" + HOST_APPLICATIONS = "HOST_APPLICATIONS" + TOOLS = "TOOLS" + SERVERS = "SERVERS" + + +class McpBreakdownInsightsRequestTypedDict(TypedDict): + departments: NotRequired[List[str]] + r"""Departments for which Insights are requested.""" + manager_ids: NotRequired[List[str]] + r"""Manager user IDs whose teams should be filtered for. Empty array means no filtering.""" + day_range: NotRequired[PeriodTypedDict] + breakdown_type: NotRequired[BreakdownType] + r"""Type of breakdown to return.""" + host_applications: NotRequired[List[str]] + r"""Host applications to filter by. Empty array means all host applications.""" + tools: NotRequired[List[str]] + r"""MCP tools to filter by. Empty array means all tools.""" + servers: NotRequired[List[str]] + r"""MCP servers to filter by. Empty array means all servers.""" + + +class McpBreakdownInsightsRequest(BaseModel): + departments: Optional[List[str]] = None + r"""Departments for which Insights are requested.""" + + manager_ids: Annotated[Optional[List[str]], pydantic.Field(alias="managerIds")] = ( + None + ) + r"""Manager user IDs whose teams should be filtered for. Empty array means no filtering.""" + + day_range: Annotated[Optional[Period], pydantic.Field(alias="dayRange")] = None + + breakdown_type: Annotated[ + Optional[BreakdownType], pydantic.Field(alias="breakdownType") + ] = None + r"""Type of breakdown to return.""" + + host_applications: Annotated[ + Optional[List[str]], pydantic.Field(alias="hostApplications") + ] = None + r"""Host applications to filter by. Empty array means all host applications.""" + + tools: Optional[List[str]] = None + r"""MCP tools to filter by. Empty array means all tools.""" + + servers: Optional[List[str]] = None + r"""MCP servers to filter by. Empty array means all servers.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "departments", + "managerIds", + "dayRange", + "breakdownType", + "hostApplications", + "tools", + "servers", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + McpBreakdownInsightsRequest.model_rebuild() +except NameError: + pass diff --git a/src/glean/api_client/models/rotatedatasourcecredentialsop.py b/src/glean/api_client/models/rotatedatasourcecredentialsop.py new file mode 100644 index 00000000..cb554501 --- /dev/null +++ b/src/glean/api_client/models/rotatedatasourcecredentialsop.py @@ -0,0 +1,31 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .rotatedatasourcecredentialsrequest import ( + RotateDatasourceCredentialsRequest, + RotateDatasourceCredentialsRequestTypedDict, +) +from glean.api_client.types import BaseModel +from glean.api_client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +import pydantic +from typing_extensions import Annotated, TypedDict + + +class RotateDatasourceCredentialsRequestRequestTypedDict(TypedDict): + datasource_instance_id: str + r"""The full datasource instance identifier (e.g. o365sharepoint_abc123)""" + rotate_datasource_credentials_request: RotateDatasourceCredentialsRequestTypedDict + + +class RotateDatasourceCredentialsRequestRequest(BaseModel): + datasource_instance_id: Annotated[ + str, + pydantic.Field(alias="datasourceInstanceId"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""The full datasource instance identifier (e.g. o365sharepoint_abc123)""" + + rotate_datasource_credentials_request: Annotated[ + RotateDatasourceCredentialsRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/glean/api_client/models/rotatedatasourcecredentialsrequest.py b/src/glean/api_client/models/rotatedatasourcecredentialsrequest.py new file mode 100644 index 00000000..e9dfdd44 --- /dev/null +++ b/src/glean/api_client/models/rotatedatasourcecredentialsrequest.py @@ -0,0 +1,29 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .datasourceinstanceconfiguration import ( + DatasourceInstanceConfiguration, + DatasourceInstanceConfigurationTypedDict, +) +from glean.api_client.types import BaseModel +from typing_extensions import TypedDict + + +class RotateDatasourceCredentialsRequestTypedDict(TypedDict): + r"""Request to rotate the credentials used by a datasource instance. Replaces the active credential material with the supplied values. + `credentials.values` must contain only keys recognized as credential material for the datasource type (for example `clientSecret` for OAuth, `apiToken` for API-token auth, `privateKey` for certificate auth). Unrecognized keys, or keys that correspond to non-credential configuration, cause a 400; use the configure endpoint to change non-credential config. + + """ + + credentials: DatasourceInstanceConfigurationTypedDict + r"""Configuration for a datasource instance""" + + +class RotateDatasourceCredentialsRequest(BaseModel): + r"""Request to rotate the credentials used by a datasource instance. Replaces the active credential material with the supplied values. + `credentials.values` must contain only keys recognized as credential material for the datasource type (for example `clientSecret` for OAuth, `apiToken` for API-token auth, `privateKey` for certificate auth). Unrecognized keys, or keys that correspond to non-credential configuration, cause a 400; use the configure endpoint to change non-credential config. + + """ + + credentials: DatasourceInstanceConfiguration + r"""Configuration for a datasource instance""" diff --git a/src/glean/api_client/models/ugctype.py b/src/glean/api_client/models/ugctype.py index e15d070b..84f91eaf 100644 --- a/src/glean/api_client/models/ugctype.py +++ b/src/glean/api_client/models/ugctype.py @@ -23,4 +23,5 @@ class UgcType(str, Enum, metaclass=utils.OpenEnumMeta): SHORTCUTS_TYPE = "SHORTCUTS_TYPE" SLIDE_TYPE = "SLIDE_TYPE" SPREADSHEET_TYPE = "SPREADSHEET_TYPE" + INLINE_HTML_TYPE = "INLINE_HTML_TYPE" WORKFLOWS_TYPE = "WORKFLOWS_TYPE" diff --git a/tests/mockserver/internal/handler/generated_handlers.go b/tests/mockserver/internal/handler/generated_handlers.go index 4eaa2afa..0fbd1d53 100644 --- a/tests/mockserver/internal/handler/generated_handlers.go +++ b/tests/mockserver/internal/handler/generated_handlers.go @@ -15,6 +15,7 @@ func GeneratedHandlers(ctx context.Context, dir *logging.HTTPFileDirectory, rt * NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/agents/{agent_id}", pathGetRestAPIV1AgentsAgentID(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/agents/{agent_id}/schemas", pathGetRestAPIV1AgentsAgentIDSchemas(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/configure/datasources/{datasourceId}/instances/{instanceId}", pathGetRestAPIV1ConfigureDatasourcesDatasourceIDInstancesInstanceID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/datasource/{datasourceInstanceId}/credentialstatus", pathGetRestAPIV1DatasourceDatasourceInstanceIDCredentialstatus(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/governance/data/findings/exports", pathGetRestAPIV1GovernanceDataFindingsExports(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/governance/data/policies", pathGetRestAPIV1GovernanceDataPolicies(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/governance/data/policies/{id}", pathGetRestAPIV1GovernanceDataPoliciesID(dir, rt)), @@ -57,6 +58,7 @@ func GeneratedHandlers(ctx context.Context, dir *logging.HTTPFileDirectory, rt * NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/createauthtoken", pathPostRestAPIV1Createauthtoken(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/createcollection", pathPostRestAPIV1Createcollection(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/createshortcut", pathPostRestAPIV1Createshortcut(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/datasource/{datasourceInstanceId}/credentials", pathPostRestAPIV1DatasourceDatasourceInstanceIDCredentials(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/deleteallchats", pathPostRestAPIV1Deleteallchats(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/deleteannouncement", pathPostRestAPIV1Deleteannouncement(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/deleteanswer", pathPostRestAPIV1Deleteanswer(dir, rt)), diff --git a/tests/mockserver/internal/handler/pathgetrestapiv1datasourcedatasourceinstanceidcredentialstatus.go b/tests/mockserver/internal/handler/pathgetrestapiv1datasourcedatasourceinstanceidcredentialstatus.go new file mode 100644 index 00000000..92d8c1fa --- /dev/null +++ b/tests/mockserver/internal/handler/pathgetrestapiv1datasourcedatasourceinstanceidcredentialstatus.go @@ -0,0 +1,64 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetRestAPIV1DatasourceDatasourceInstanceIDCredentialstatus(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getDatasourceCredentialStatus[0]": + dir.HandlerFunc("getDatasourceCredentialStatus", testGetDatasourceCredentialStatusGetDatasourceCredentialStatus0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testGetDatasourceCredentialStatusGetDatasourceCredentialStatus0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + var respBody *components.DatasourceCredentialStatusResponse = &components.DatasourceCredentialStatusResponse{ + Status: components.DatasourceCredentialStatusValid, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1datasourcedatasourceinstanceidcredentials.go b/tests/mockserver/internal/handler/pathpostrestapiv1datasourcedatasourceinstanceidcredentials.go new file mode 100644 index 00000000..af37421f --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1datasourcedatasourceinstanceidcredentials.go @@ -0,0 +1,69 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1DatasourceDatasourceInstanceIDCredentials(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "rotateDatasourceCredentials[0]": + dir.HandlerFunc("rotateDatasourceCredentials", testRotateDatasourceCredentialsRotateDatasourceCredentials0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testRotateDatasourceCredentialsRotateDatasourceCredentials0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + var respBody *components.DatasourceCredentialStatusResponse = &components.DatasourceCredentialStatusResponse{ + Status: components.DatasourceCredentialStatusMissing, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/sdk/models/components/addcollectionitemserror.go b/tests/mockserver/internal/sdk/models/components/addcollectionitemserror.go index 215308e8..43f93195 100644 --- a/tests/mockserver/internal/sdk/models/components/addcollectionitemserror.go +++ b/tests/mockserver/internal/sdk/models/components/addcollectionitemserror.go @@ -11,6 +11,7 @@ type AddCollectionItemsErrorErrorType string const ( AddCollectionItemsErrorErrorTypeExistingItem AddCollectionItemsErrorErrorType = "EXISTING_ITEM" + AddCollectionItemsErrorErrorTypeCorruptItem AddCollectionItemsErrorErrorType = "CORRUPT_ITEM" ) func (e AddCollectionItemsErrorErrorType) ToPointer() *AddCollectionItemsErrorErrorType { @@ -23,6 +24,8 @@ func (e *AddCollectionItemsErrorErrorType) UnmarshalJSON(data []byte) error { } switch v { case "EXISTING_ITEM": + fallthrough + case "CORRUPT_ITEM": *e = AddCollectionItemsErrorErrorType(v) return nil default: diff --git a/tests/mockserver/internal/sdk/models/components/agentsinsightsv2response.go b/tests/mockserver/internal/sdk/models/components/agentsinsightsv2response.go index dab3698e..25139a60 100644 --- a/tests/mockserver/internal/sdk/models/components/agentsinsightsv2response.go +++ b/tests/mockserver/internal/sdk/models/components/agentsinsightsv2response.go @@ -3,9 +3,9 @@ package components type AgentsInsightsV2Response struct { - // Number of current Monthly Active Users, in the specified departments. + // Number of current Monthly Active Users. MonthlyActiveUsers *int64 `json:"monthlyActiveUsers,omitempty"` - // Number of current Weekly Active Users, in the specified departments. + // Number of current Weekly Active Users. WeeklyActiveUsers *int64 `json:"weeklyActiveUsers,omitempty"` MonthlyActiveUserTimeseries *LabeledCountInfo `json:"monthlyActiveUserTimeseries,omitempty"` WeeklyActiveUserTimeseries *LabeledCountInfo `json:"weeklyActiveUserTimeseries,omitempty"` @@ -13,6 +13,7 @@ type AgentsInsightsV2Response struct { // Total number of shared agents. SharedAgentsCount *int64 `json:"sharedAgentsCount,omitempty"` TopAgentsInsights []PerAgentInsight `json:"topAgentsInsights,omitempty"` + TopUseCasesInsights []AgentUseCaseInsight `json:"topUseCasesInsights,omitempty"` AgentsUsageByDepartmentInsights []AgentsUsageByDepartmentInsight `json:"agentsUsageByDepartmentInsights,omitempty"` AgentUsersInsights []AgentUsersInsight `json:"agentUsersInsights,omitempty"` // Insights for agents time saved over the specified time period. @@ -74,6 +75,13 @@ func (o *AgentsInsightsV2Response) GetTopAgentsInsights() []PerAgentInsight { return o.TopAgentsInsights } +func (o *AgentsInsightsV2Response) GetTopUseCasesInsights() []AgentUseCaseInsight { + if o == nil { + return nil + } + return o.TopUseCasesInsights +} + func (o *AgentsInsightsV2Response) GetAgentsUsageByDepartmentInsights() []AgentsUsageByDepartmentInsight { if o == nil { return nil diff --git a/tests/mockserver/internal/sdk/models/components/agentusecaseinsight.go b/tests/mockserver/internal/sdk/models/components/agentusecaseinsight.go new file mode 100644 index 00000000..3caa1836 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/agentusecaseinsight.go @@ -0,0 +1,78 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type AgentUseCaseInsight struct { + // Use case name + UseCase *string `json:"useCase,omitempty"` + // Total number of runs for this use case over the specified time period. + RunCount *int64 `json:"runCount,omitempty"` + // Percentage change in runs compared to the previous equivalent time period. + Trend *float32 `json:"trend,omitempty"` + // Comma-separated list of the top departments using this use case. + TopDepartments *string `json:"topDepartments,omitempty"` + // ID of the most-used agent for this use case. + TopAgentID *string `json:"topAgentId,omitempty"` + // Name of the most-used agent for this use case. + TopAgentName *string `json:"topAgentName,omitempty"` + // Defines how to render an icon + TopAgentIcon *IconConfig `json:"topAgentIcon,omitempty"` + // Indicates whether the top agent has been deleted. + TopAgentIsDeleted *bool `json:"topAgentIsDeleted,omitempty"` +} + +func (o *AgentUseCaseInsight) GetUseCase() *string { + if o == nil { + return nil + } + return o.UseCase +} + +func (o *AgentUseCaseInsight) GetRunCount() *int64 { + if o == nil { + return nil + } + return o.RunCount +} + +func (o *AgentUseCaseInsight) GetTrend() *float32 { + if o == nil { + return nil + } + return o.Trend +} + +func (o *AgentUseCaseInsight) GetTopDepartments() *string { + if o == nil { + return nil + } + return o.TopDepartments +} + +func (o *AgentUseCaseInsight) GetTopAgentID() *string { + if o == nil { + return nil + } + return o.TopAgentID +} + +func (o *AgentUseCaseInsight) GetTopAgentName() *string { + if o == nil { + return nil + } + return o.TopAgentName +} + +func (o *AgentUseCaseInsight) GetTopAgentIcon() *IconConfig { + if o == nil { + return nil + } + return o.TopAgentIcon +} + +func (o *AgentUseCaseInsight) GetTopAgentIsDeleted() *bool { + if o == nil { + return nil + } + return o.TopAgentIsDeleted +} diff --git a/tests/mockserver/internal/sdk/models/components/assistantinsightsresponse.go b/tests/mockserver/internal/sdk/models/components/assistantinsightsresponse.go index a997b8f6..34f0d2d2 100644 --- a/tests/mockserver/internal/sdk/models/components/assistantinsightsresponse.go +++ b/tests/mockserver/internal/sdk/models/components/assistantinsightsresponse.go @@ -3,9 +3,9 @@ package components type AssistantInsightsResponse struct { - // Number of current Monthly Active Users, in the specified departments. + // Number of current Monthly Active Users. MonthlyActiveUsers *int64 `json:"monthlyActiveUsers,omitempty"` - // Number of current Weekly Active Users, in the specified departments. + // Number of current Weekly Active Users. WeeklyActiveUsers *int64 `json:"weeklyActiveUsers,omitempty"` // Unix timestamp of the last update for the insights data in the response. LastUpdatedTs *int64 `json:"lastUpdatedTs,omitempty"` diff --git a/tests/mockserver/internal/sdk/models/components/collectionerror.go b/tests/mockserver/internal/sdk/models/components/collectionerror.go index 1cf4a37d..2524a204 100644 --- a/tests/mockserver/internal/sdk/models/components/collectionerror.go +++ b/tests/mockserver/internal/sdk/models/components/collectionerror.go @@ -18,6 +18,7 @@ const ( CollectionErrorErrorCodeHeightViolation CollectionErrorErrorCode = "HEIGHT_VIOLATION" CollectionErrorErrorCodeWidthViolation CollectionErrorErrorCode = "WIDTH_VIOLATION" CollectionErrorErrorCodeNoPermissions CollectionErrorErrorCode = "NO_PERMISSIONS" + CollectionErrorErrorCodeCorruptItem CollectionErrorErrorCode = "CORRUPT_ITEM" ) func (e CollectionErrorErrorCode) ToPointer() *CollectionErrorErrorCode { @@ -42,6 +43,8 @@ func (e *CollectionErrorErrorCode) UnmarshalJSON(data []byte) error { case "WIDTH_VIOLATION": fallthrough case "NO_PERMISSIONS": + fallthrough + case "CORRUPT_ITEM": *e = CollectionErrorErrorCode(v) return nil default: diff --git a/tests/mockserver/internal/sdk/models/components/currentactiveusers.go b/tests/mockserver/internal/sdk/models/components/currentactiveusers.go index f4a046ec..c1398b96 100644 --- a/tests/mockserver/internal/sdk/models/components/currentactiveusers.go +++ b/tests/mockserver/internal/sdk/models/components/currentactiveusers.go @@ -3,9 +3,9 @@ package components type CurrentActiveUsers struct { - // Number of current Monthly Active Users, in the specified departments. + // Number of current Monthly Active Users. MonthlyActiveUsers *int64 `json:"monthlyActiveUsers,omitempty"` - // Number of current Weekly Active Users, in the specified departments. + // Number of current Weekly Active Users. WeeklyActiveUsers *int64 `json:"weeklyActiveUsers,omitempty"` } diff --git a/tests/mockserver/internal/sdk/models/components/datasourcecredentialstatus.go b/tests/mockserver/internal/sdk/models/components/datasourcecredentialstatus.go new file mode 100644 index 00000000..1a8b125a --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/datasourcecredentialstatus.go @@ -0,0 +1,44 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// DatasourceCredentialStatus - Lifecycle state of the credentials installed for a datasource instance. Mirrors the internal admin Status enum so the handler can surface the same health signals already tracked today. EXPIRING_SOON is represented as VALID_WITH_WARNINGS (with detail in `message`); EXPIRED is surfaced as INVALID plus a non-null `expiresAt` in the past. +type DatasourceCredentialStatus string + +const ( + DatasourceCredentialStatusValid DatasourceCredentialStatus = "VALID" + DatasourceCredentialStatusValidWithWarnings DatasourceCredentialStatus = "VALID_WITH_WARNINGS" + DatasourceCredentialStatusValidating DatasourceCredentialStatus = "VALIDATING" + DatasourceCredentialStatusInvalid DatasourceCredentialStatus = "INVALID" + DatasourceCredentialStatusMissing DatasourceCredentialStatus = "MISSING" +) + +func (e DatasourceCredentialStatus) ToPointer() *DatasourceCredentialStatus { + return &e +} +func (e *DatasourceCredentialStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "VALID": + fallthrough + case "VALID_WITH_WARNINGS": + fallthrough + case "VALIDATING": + fallthrough + case "INVALID": + fallthrough + case "MISSING": + *e = DatasourceCredentialStatus(v) + return nil + default: + return fmt.Errorf("invalid value for DatasourceCredentialStatus: %v", v) + } +} diff --git a/tests/mockserver/internal/sdk/models/components/datasourcecredentialstatusresponse.go b/tests/mockserver/internal/sdk/models/components/datasourcecredentialstatusresponse.go new file mode 100644 index 00000000..3195e113 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/datasourcecredentialstatusresponse.go @@ -0,0 +1,61 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "mockserver/internal/sdk/utils" + "time" +) + +// DatasourceCredentialStatusResponse - Status of the credentials currently installed for a datasource instance. +type DatasourceCredentialStatusResponse struct { + // Lifecycle state of the credentials installed for a datasource instance. Mirrors the internal admin Status enum so the handler can surface the same health signals already tracked today. EXPIRING_SOON is represented as VALID_WITH_WARNINGS (with detail in `message`); EXPIRED is surfaced as INVALID plus a non-null `expiresAt` in the past. + // + Status DatasourceCredentialStatus `json:"status"` + // When the credentials were last rotated. Omitted when not known. + LastRotatedAt *time.Time `json:"lastRotatedAt,omitempty"` + // When the active credentials expire. Omitted when not known or not applicable to this credential type. + // + ExpiresAt *time.Time `json:"expiresAt,omitempty"` + // Optional human-readable detail about the current credential status. + Message *string `json:"message,omitempty"` +} + +func (d DatasourceCredentialStatusResponse) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(d, "", false) +} + +func (d *DatasourceCredentialStatusResponse) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &d, "", false, []string{"status"}); err != nil { + return err + } + return nil +} + +func (o *DatasourceCredentialStatusResponse) GetStatus() DatasourceCredentialStatus { + if o == nil { + return DatasourceCredentialStatus("") + } + return o.Status +} + +func (o *DatasourceCredentialStatusResponse) GetLastRotatedAt() *time.Time { + if o == nil { + return nil + } + return o.LastRotatedAt +} + +func (o *DatasourceCredentialStatusResponse) GetExpiresAt() *time.Time { + if o == nil { + return nil + } + return o.ExpiresAt +} + +func (o *DatasourceCredentialStatusResponse) GetMessage() *string { + if o == nil { + return nil + } + return o.Message +} diff --git a/tests/mockserver/internal/sdk/models/components/editcollectionresponse.go b/tests/mockserver/internal/sdk/models/components/editcollectionresponse.go index ba96dfa1..10294fe2 100644 --- a/tests/mockserver/internal/sdk/models/components/editcollectionresponse.go +++ b/tests/mockserver/internal/sdk/models/components/editcollectionresponse.go @@ -19,6 +19,7 @@ const ( EditCollectionResponseErrorCodeHeightViolation EditCollectionResponseErrorCode = "HEIGHT_VIOLATION" EditCollectionResponseErrorCodeWidthViolation EditCollectionResponseErrorCode = "WIDTH_VIOLATION" EditCollectionResponseErrorCodeNoPermissions EditCollectionResponseErrorCode = "NO_PERMISSIONS" + EditCollectionResponseErrorCodeCorruptItem EditCollectionResponseErrorCode = "CORRUPT_ITEM" ) func (e EditCollectionResponseErrorCode) ToPointer() *EditCollectionResponseErrorCode { @@ -43,6 +44,8 @@ func (e *EditCollectionResponseErrorCode) UnmarshalJSON(data []byte) error { case "WIDTH_VIOLATION": fallthrough case "NO_PERMISSIONS": + fallthrough + case "CORRUPT_ITEM": *e = EditCollectionResponseErrorCode(v) return nil default: diff --git a/tests/mockserver/internal/sdk/models/components/feedentry.go b/tests/mockserver/internal/sdk/models/components/feedentry.go index af0239e8..11912d18 100644 --- a/tests/mockserver/internal/sdk/models/components/feedentry.go +++ b/tests/mockserver/internal/sdk/models/components/feedentry.go @@ -104,6 +104,7 @@ const ( JustificationTypeFollowUp JustificationType = "FOLLOW_UP" JustificationTypeMilestoneTimelineCheck JustificationType = "MILESTONE_TIMELINE_CHECK" JustificationTypeProjectDiscussionDigest JustificationType = "PROJECT_DISCUSSION_DIGEST" + JustificationTypeProjectFocusBlock JustificationType = "PROJECT_FOCUS_BLOCK" JustificationTypeProjectNextStep JustificationType = "PROJECT_NEXT_STEP" ) @@ -212,6 +213,8 @@ func (e *JustificationType) UnmarshalJSON(data []byte) error { fallthrough case "PROJECT_DISCUSSION_DIGEST": fallthrough + case "PROJECT_FOCUS_BLOCK": + fallthrough case "PROJECT_NEXT_STEP": *e = JustificationType(v) return nil diff --git a/tests/mockserver/internal/sdk/models/components/feedrequest.go b/tests/mockserver/internal/sdk/models/components/feedrequest.go index 50f12942..c8fa3ac7 100644 --- a/tests/mockserver/internal/sdk/models/components/feedrequest.go +++ b/tests/mockserver/internal/sdk/models/components/feedrequest.go @@ -45,6 +45,7 @@ const ( FeedRequestCategoryFollowUp FeedRequestCategory = "FOLLOW_UP" FeedRequestCategoryMilestoneTimelineCheck FeedRequestCategory = "MILESTONE_TIMELINE_CHECK" FeedRequestCategoryProjectDiscussionDigest FeedRequestCategory = "PROJECT_DISCUSSION_DIGEST" + FeedRequestCategoryProjectFocusBlock FeedRequestCategory = "PROJECT_FOCUS_BLOCK" FeedRequestCategoryProjectNextStep FeedRequestCategory = "PROJECT_NEXT_STEP" ) @@ -127,6 +128,8 @@ func (e *FeedRequestCategory) UnmarshalJSON(data []byte) error { fallthrough case "PROJECT_DISCUSSION_DIGEST": fallthrough + case "PROJECT_FOCUS_BLOCK": + fallthrough case "PROJECT_NEXT_STEP": *e = FeedRequestCategory(v) return nil diff --git a/tests/mockserver/internal/sdk/models/components/feedresult.go b/tests/mockserver/internal/sdk/models/components/feedresult.go index 55bc99d4..eb9f44b8 100644 --- a/tests/mockserver/internal/sdk/models/components/feedresult.go +++ b/tests/mockserver/internal/sdk/models/components/feedresult.go @@ -46,6 +46,7 @@ const ( FeedResultCategoryFollowUp FeedResultCategory = "FOLLOW_UP" FeedResultCategoryMilestoneTimelineCheck FeedResultCategory = "MILESTONE_TIMELINE_CHECK" FeedResultCategoryProjectDiscussionDigest FeedResultCategory = "PROJECT_DISCUSSION_DIGEST" + FeedResultCategoryProjectFocusBlock FeedResultCategory = "PROJECT_FOCUS_BLOCK" FeedResultCategoryProjectNextStep FeedResultCategory = "PROJECT_NEXT_STEP" ) @@ -128,6 +129,8 @@ func (e *FeedResultCategory) UnmarshalJSON(data []byte) error { fallthrough case "PROJECT_DISCUSSION_DIGEST": fallthrough + case "PROJECT_FOCUS_BLOCK": + fallthrough case "PROJECT_NEXT_STEP": *e = FeedResultCategory(v) return nil diff --git a/tests/mockserver/internal/sdk/models/components/insightschatsummary.go b/tests/mockserver/internal/sdk/models/components/insightschatsummary.go index d60b2e3e..d5fe3dfc 100644 --- a/tests/mockserver/internal/sdk/models/components/insightschatsummary.go +++ b/tests/mockserver/internal/sdk/models/components/insightschatsummary.go @@ -3,9 +3,9 @@ package components type InsightsChatSummary struct { - // Number of current Monthly Active Users, in the specified departments. + // Number of current Monthly Active Users. MonthlyActiveUsers *int64 `json:"monthlyActiveUsers,omitempty"` - // Number of current Weekly Active Users, in the specified departments. + // Number of current Weekly Active Users. WeeklyActiveUsers *int64 `json:"weeklyActiveUsers,omitempty"` // Total number of chats by users over the specified time period. NumChats *int64 `json:"numChats,omitempty"` diff --git a/tests/mockserver/internal/sdk/models/components/insightsoverviewresponse.go b/tests/mockserver/internal/sdk/models/components/insightsoverviewresponse.go index 4350ae6c..7a6391ce 100644 --- a/tests/mockserver/internal/sdk/models/components/insightsoverviewresponse.go +++ b/tests/mockserver/internal/sdk/models/components/insightsoverviewresponse.go @@ -3,9 +3,9 @@ package components type InsightsOverviewResponse struct { - // Number of current Monthly Active Users, in the specified departments. + // Number of current Monthly Active Users. MonthlyActiveUsers *int64 `json:"monthlyActiveUsers,omitempty"` - // Number of current Weekly Active Users, in the specified departments. + // Number of current Weekly Active Users. WeeklyActiveUsers *int64 `json:"weeklyActiveUsers,omitempty"` // Department name(s). Departments []string `json:"departments,omitempty"` diff --git a/tests/mockserver/internal/sdk/models/components/insightsrequest.go b/tests/mockserver/internal/sdk/models/components/insightsrequest.go index ae74e0f9..25e541a0 100644 --- a/tests/mockserver/internal/sdk/models/components/insightsrequest.go +++ b/tests/mockserver/internal/sdk/models/components/insightsrequest.go @@ -3,9 +3,10 @@ package components type InsightsRequest struct { - OverviewRequest *InsightsOverviewRequest `json:"overviewRequest,omitempty"` - AssistantRequest *InsightsAssistantRequest `json:"assistantRequest,omitempty"` - AgentsRequest *AgentsInsightsV2Request `json:"agentsRequest,omitempty"` + OverviewRequest *InsightsOverviewRequest `json:"overviewRequest,omitempty"` + AssistantRequest *InsightsAssistantRequest `json:"assistantRequest,omitempty"` + AgentsRequest *AgentsInsightsV2Request `json:"agentsRequest,omitempty"` + McpBreakdownRequest *McpBreakdownInsightsRequest `json:"mcpBreakdownRequest,omitempty"` // If true, suppresses the generation of per-user Insights in the response. Default is false. DisablePerUserInsights *bool `json:"disablePerUserInsights,omitempty"` } @@ -31,6 +32,13 @@ func (o *InsightsRequest) GetAgentsRequest() *AgentsInsightsV2Request { return o.AgentsRequest } +func (o *InsightsRequest) GetMcpBreakdownRequest() *McpBreakdownInsightsRequest { + if o == nil { + return nil + } + return o.McpBreakdownRequest +} + func (o *InsightsRequest) GetDisablePerUserInsights() *bool { if o == nil { return nil diff --git a/tests/mockserver/internal/sdk/models/components/insightssearchsummary.go b/tests/mockserver/internal/sdk/models/components/insightssearchsummary.go index 23269c55..408d84ba 100644 --- a/tests/mockserver/internal/sdk/models/components/insightssearchsummary.go +++ b/tests/mockserver/internal/sdk/models/components/insightssearchsummary.go @@ -3,9 +3,9 @@ package components type InsightsSearchSummary struct { - // Number of current Monthly Active Users, in the specified departments. + // Number of current Monthly Active Users. MonthlyActiveUsers *int64 `json:"monthlyActiveUsers,omitempty"` - // Number of current Weekly Active Users, in the specified departments. + // Number of current Weekly Active Users. WeeklyActiveUsers *int64 `json:"weeklyActiveUsers,omitempty"` // Total number of searches by users over the specified time period. NumSearches *int64 `json:"numSearches,omitempty"` diff --git a/tests/mockserver/internal/sdk/models/components/mcpbreakdowninsightsrequest.go b/tests/mockserver/internal/sdk/models/components/mcpbreakdowninsightsrequest.go new file mode 100644 index 00000000..98df30ae --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/mcpbreakdowninsightsrequest.go @@ -0,0 +1,106 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// BreakdownType - Type of breakdown to return. +type BreakdownType string + +const ( + BreakdownTypeUsers BreakdownType = "USERS" + BreakdownTypeHostApplications BreakdownType = "HOST_APPLICATIONS" + BreakdownTypeTools BreakdownType = "TOOLS" + BreakdownTypeServers BreakdownType = "SERVERS" +) + +func (e BreakdownType) ToPointer() *BreakdownType { + return &e +} +func (e *BreakdownType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "USERS": + fallthrough + case "HOST_APPLICATIONS": + fallthrough + case "TOOLS": + fallthrough + case "SERVERS": + *e = BreakdownType(v) + return nil + default: + return fmt.Errorf("invalid value for BreakdownType: %v", v) + } +} + +type McpBreakdownInsightsRequest struct { + // Departments for which Insights are requested. + Departments []string `json:"departments,omitempty"` + // Manager user IDs whose teams should be filtered for. Empty array means no filtering. + ManagerIds []string `json:"managerIds,omitempty"` + DayRange *Period `json:"dayRange,omitempty"` + // Type of breakdown to return. + BreakdownType *BreakdownType `json:"breakdownType,omitempty"` + // Host applications to filter by. Empty array means all host applications. + HostApplications []string `json:"hostApplications,omitempty"` + // MCP tools to filter by. Empty array means all tools. + Tools []string `json:"tools,omitempty"` + // MCP servers to filter by. Empty array means all servers. + Servers []string `json:"servers,omitempty"` +} + +func (o *McpBreakdownInsightsRequest) GetDepartments() []string { + if o == nil { + return nil + } + return o.Departments +} + +func (o *McpBreakdownInsightsRequest) GetManagerIds() []string { + if o == nil { + return nil + } + return o.ManagerIds +} + +func (o *McpBreakdownInsightsRequest) GetDayRange() *Period { + if o == nil { + return nil + } + return o.DayRange +} + +func (o *McpBreakdownInsightsRequest) GetBreakdownType() *BreakdownType { + if o == nil { + return nil + } + return o.BreakdownType +} + +func (o *McpBreakdownInsightsRequest) GetHostApplications() []string { + if o == nil { + return nil + } + return o.HostApplications +} + +func (o *McpBreakdownInsightsRequest) GetTools() []string { + if o == nil { + return nil + } + return o.Tools +} + +func (o *McpBreakdownInsightsRequest) GetServers() []string { + if o == nil { + return nil + } + return o.Servers +} diff --git a/tests/mockserver/internal/sdk/models/components/rotatedatasourcecredentialsrequest.go b/tests/mockserver/internal/sdk/models/components/rotatedatasourcecredentialsrequest.go new file mode 100644 index 00000000..3733a707 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/rotatedatasourcecredentialsrequest.go @@ -0,0 +1,17 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// RotateDatasourceCredentialsRequest - Request to rotate the credentials used by a datasource instance. Replaces the active credential material with the supplied values. +// `credentials.values` must contain only keys recognized as credential material for the datasource type (for example `clientSecret` for OAuth, `apiToken` for API-token auth, `privateKey` for certificate auth). Unrecognized keys, or keys that correspond to non-credential configuration, cause a 400; use the configure endpoint to change non-credential config. +type RotateDatasourceCredentialsRequest struct { + // Configuration for a datasource instance + Credentials DatasourceInstanceConfiguration `json:"credentials"` +} + +func (o *RotateDatasourceCredentialsRequest) GetCredentials() DatasourceInstanceConfiguration { + if o == nil { + return DatasourceInstanceConfiguration{} + } + return o.Credentials +} diff --git a/tests/mockserver/internal/sdk/models/components/ugctype.go b/tests/mockserver/internal/sdk/models/components/ugctype.go index 3be651fc..d0aa0112 100644 --- a/tests/mockserver/internal/sdk/models/components/ugctype.go +++ b/tests/mockserver/internal/sdk/models/components/ugctype.go @@ -27,6 +27,7 @@ const ( UgcTypeShortcutsType UgcType = "SHORTCUTS_TYPE" UgcTypeSlideType UgcType = "SLIDE_TYPE" UgcTypeSpreadsheetType UgcType = "SPREADSHEET_TYPE" + UgcTypeInlineHTMLType UgcType = "INLINE_HTML_TYPE" UgcTypeWorkflowsType UgcType = "WORKFLOWS_TYPE" ) @@ -73,6 +74,8 @@ func (e *UgcType) UnmarshalJSON(data []byte) error { fallthrough case "SPREADSHEET_TYPE": fallthrough + case "INLINE_HTML_TYPE": + fallthrough case "WORKFLOWS_TYPE": *e = UgcType(v) return nil diff --git a/tests/mockserver/internal/sdk/models/operations/getdatasourcecredentialstatus.go b/tests/mockserver/internal/sdk/models/operations/getdatasourcecredentialstatus.go new file mode 100644 index 00000000..bc0d1e27 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/getdatasourcecredentialstatus.go @@ -0,0 +1,39 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type GetDatasourceCredentialStatusRequest struct { + // The full datasource instance identifier (e.g. o365sharepoint_abc123) + DatasourceInstanceID string `pathParam:"style=simple,explode=false,name=datasourceInstanceId"` +} + +func (o *GetDatasourceCredentialStatusRequest) GetDatasourceInstanceID() string { + if o == nil { + return "" + } + return o.DatasourceInstanceID +} + +type GetDatasourceCredentialStatusResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + DatasourceCredentialStatusResponse *components.DatasourceCredentialStatusResponse +} + +func (o *GetDatasourceCredentialStatusResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetDatasourceCredentialStatusResponse) GetDatasourceCredentialStatusResponse() *components.DatasourceCredentialStatusResponse { + if o == nil { + return nil + } + return o.DatasourceCredentialStatusResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/rotatedatasourcecredentials.go b/tests/mockserver/internal/sdk/models/operations/rotatedatasourcecredentials.go new file mode 100644 index 00000000..f5ac0b26 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/rotatedatasourcecredentials.go @@ -0,0 +1,47 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type RotateDatasourceCredentialsRequest struct { + // The full datasource instance identifier (e.g. o365sharepoint_abc123) + DatasourceInstanceID string `pathParam:"style=simple,explode=false,name=datasourceInstanceId"` + Body components.RotateDatasourceCredentialsRequest `request:"mediaType=application/json"` +} + +func (o *RotateDatasourceCredentialsRequest) GetDatasourceInstanceID() string { + if o == nil { + return "" + } + return o.DatasourceInstanceID +} + +func (o *RotateDatasourceCredentialsRequest) GetBody() components.RotateDatasourceCredentialsRequest { + if o == nil { + return components.RotateDatasourceCredentialsRequest{} + } + return o.Body +} + +type RotateDatasourceCredentialsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + DatasourceCredentialStatusResponse *components.DatasourceCredentialStatusResponse +} + +func (o *RotateDatasourceCredentialsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *RotateDatasourceCredentialsResponse) GetDatasourceCredentialStatusResponse() *components.DatasourceCredentialStatusResponse { + if o == nil { + return nil + } + return o.DatasourceCredentialStatusResponse +} diff --git a/tests/test_datasources.py b/tests/test_datasources.py index 68d59bc6..b36dd408 100644 --- a/tests/test_datasources.py +++ b/tests/test_datasources.py @@ -92,3 +92,40 @@ def test_datasources_update_datasource_instance_configuration(): }, ) assert res is not None + + +def test_datasources_get_datasource_credential_status(): + test_http_client = create_test_http_client("getDatasourceCredentialStatus") + + with Glean( + server_url=os.getenv("TEST_SERVER_URL", "http://localhost:18080"), + client=test_http_client, + api_token=os.getenv("GLEAN_API_TOKEN", "value"), + ) as glean: + assert glean is not None + + res = glean.datasources.get_datasource_credential_status( + datasource_instance_id="o365sharepoint_abc123" + ) + assert res is not None + + +def test_datasources_rotate_datasource_credentials(): + test_http_client = create_test_http_client("rotateDatasourceCredentials") + + with Glean( + server_url=os.getenv("TEST_SERVER_URL", "http://localhost:18080"), + client=test_http_client, + api_token=os.getenv("GLEAN_API_TOKEN", "value"), + ) as glean: + assert glean is not None + + res = glean.datasources.rotate_datasource_credentials( + datasource_instance_id="o365sharepoint_abc123", + credentials={ + "values": { + "key": {}, + }, + }, + ) + assert res is not None diff --git a/tests/test_summarize.py b/tests/test_summarize.py index 3f56a110..3e3cfe27 100644 --- a/tests/test_summarize.py +++ b/tests/test_summarize.py @@ -18,12 +18,12 @@ def test_summarize_summarize(): res = glean.client.documents.summarize( document_specs=[ { - "ugc_type": models.DocumentSpecUgcType2.ANNOUNCEMENTS, + "ugc_type": models.DocumentSpecUgcType2.SHORTCUTS, "ugc_id": "", }, { - "ugc_type": models.DocumentSpecUgcType2.ANNOUNCEMENTS, - "ugc_id": "", + "ugc_type": models.DocumentSpecUgcType1.ANNOUNCEMENTS, + "content_id": 317949, }, ] ) From 9f7c005cc777e854d3a06141256703abe5ff2424 Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 03:01:11 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow