From 54fdf0132517ea39108c2b9643866fa6a5e0228b Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 7 May 2026 11:22:28 +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.entities.get=5Fperson=5Fphoto()`:=20**A?= =?UTF-8?q?dded**=20*=20`glean.tools.get=5Faction=5Fauth=5Fstatus()`:=20**?= =?UTF-8?q?Added**=20*=20`glean.tools.authorize=5Faction()`:=20**Added**?= =?UTF-8?q?=20*=20`glean.datasources.get=5Fdatasource=5Fcredential=5Fstatu?= =?UTF-8?q?s()`:=20**Added**=20*=20`glean.datasources.rotate=5Fdatasource?= =?UTF-8?q?=5Fcredentials()`:=20**Added**=20*=20`glean.client.collections.?= =?UTF-8?q?create()`:=20=20=20*=20=20`response.union(class=20(0)).error.er?= =?UTF-8?q?ror=5Fcode.enum(corrupt=5Fitem)`=20**Added**=20=20=20*=20=20`er?= =?UTF-8?q?ror=5Fcode.enum(corrupt=5Fitem)`=20**Added**=20*=20`glean.clien?= =?UTF-8?q?t.collections.delete()`:=20=20`error=5Fcode.enum(corrupt=5Fitem?= =?UTF-8?q?)`=20**Added**=20*=20`glean.client.collections.update()`:=20=20?= =?UTF-8?q?=20*=20=20`response`=20**Changed**=20=20=20*=20=20`error=5Fcode?= =?UTF-8?q?.enum(corrupt=5Fitem)`=20**Added**=20*=20`glean.client.collecti?= =?UTF-8?q?ons.retrieve()`:=20=20`response.error.error=5Fcode.enum(corrupt?= =?UTF-8?q?=5Fitem)`=20**Added**=20*=20`glean.client.insights.retrieve()`:?= =?UTF-8?q?=20=20=20*=20=20`request`=20**Changed**=20=20=20*=20=20`respons?= =?UTF-8?q?e.agents=5Fresponse.top=5Fuse=5Fcases=5Finsights`=20**Added**?= =?UTF-8?q?=20*=20`glean.client.search.retrieve=5Ffeed()`:=20=20=20*=20=20?= =?UTF-8?q?`request.categories[]`=20**Changed**=20=20=20*=20=20`response.r?= =?UTF-8?q?esults[]`=20**Changed**?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .speakeasy/gen.lock | 513 +++++++++++++----- .speakeasy/gen.yaml | 2 +- .speakeasy/glean-merged-spec.yaml | 423 ++++++++++++++- .speakeasy/tests.arazzo.yaml | 95 ++++ .speakeasy/workflow.lock | 12 +- README.md | 23 +- RELEASES.md | 12 +- docs/models/actionauthstatusresponse.md | 9 + docs/models/actionauthtype.md | 26 + .../addcollectionitemserrorerrortype.md | 5 +- docs/models/agentsinsightsv2request.md | 1 + docs/models/agentsinsightsv2response.md | 5 +- docs/models/agentusecaseinsight.md | 15 + docs/models/assistantinsightsresponse.md | 4 +- docs/models/authorizeactionrequest.md | 8 + docs/models/authorizeactionrequestrequest.md | 9 + docs/models/authorizeactionresponse.md | 8 + 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 | 6 +- docs/models/feedresultcategory.md | 6 +- docs/models/getactionauthstatusrequest.md | 8 + .../getdatasourcecredentialstatusrequest.md | 8 + docs/models/getpersonphotorequest.md | 9 + docs/models/getpersonphotoresponse.md | 9 + docs/models/getpersonphotoresponseresult.md | 17 + docs/models/insightsassistantrequest.md | 9 +- docs/models/insightschatsummary.md | 4 +- docs/models/insightsoverviewrequest.md | 9 +- docs/models/insightsoverviewresponse.md | 4 +- docs/models/insightsrequest.md | 1 + docs/models/insightssearchsummary.md | 4 +- docs/models/justificationtype.md | 6 +- docs/models/mcpbreakdowninsightsrequest.md | 15 + .../rotatedatasourcecredentialsrequest.md | 12 + ...tatedatasourcecredentialsrequestrequest.md | 9 + docs/models/ugctype.md | 1 + docs/models/workflow.md | 22 +- docs/sdks/cliententities/README.md | 121 +++++ docs/sdks/clienttools/README.md | 91 ++++ docs/sdks/datasources/README.md | 92 ++++ docs/sdks/entities/README.md | 96 +--- docs/sdks/insights/README.md | 1 + docs/sdks/tools/README.md | 50 +- pylintrc | 1 + pyproject.toml | 2 +- src/glean/api_client/_version.py | 6 +- src/glean/api_client/client.py | 14 +- src/glean/api_client/client_entities.py | 487 +++++++++++++++++ src/glean/api_client/client_tools.py | 369 +++++++++++++ src/glean/api_client/datasources.py | 400 ++++++++++++++ src/glean/api_client/entities.py | 417 +++----------- src/glean/api_client/insights.py | 20 + src/glean/api_client/models/__init__.py | 114 ++++ .../models/actionauthstatusresponse.py | 49 ++ src/glean/api_client/models/actionauthtype.py | 18 + .../models/addcollectionitemserror.py | 15 +- .../models/agentsinsightsv2request.py | 9 +- .../models/agentsinsightsv2response.py | 15 +- .../api_client/models/agentusecaseinsight.py | 95 ++++ .../models/assistantinsightsresponse.py | 8 +- .../api_client/models/authorizeactionop.py | 31 ++ .../models/authorizeactionrequest.py | 28 + .../models/authorizeactionresponse.py | 28 + .../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 | 4 + src/glean/api_client/models/feedrequest.py | 4 + src/glean/api_client/models/feedresult.py | 4 + .../models/getactionauthstatusop.py | 21 + .../models/getdatasourcecredentialstatusop.py | 21 + .../api_client/models/getpersonphotoop.py | 70 +++ .../models/insightsassistantrequest.py | 9 +- .../api_client/models/insightschatsummary.py | 8 +- .../models/insightsoverviewrequest.py | 9 +- .../models/insightsoverviewresponse.py | 8 +- .../api_client/models/insightsrequest.py | 11 + .../models/insightssearchsummary.py | 8 +- .../models/mcpbreakdowninsightsrequest.py | 103 ++++ .../models/rotatedatasourcecredentialsop.py | 31 ++ .../rotatedatasourcecredentialsrequest.py | 29 + src/glean/api_client/models/ugctype.py | 1 + src/glean/api_client/models/workflow.py | 14 + src/glean/api_client/sdk.py | 6 + src/glean/api_client/tools.py | 164 +++--- .../internal/handler/generated_handlers.go | 5 + ...pathgetrestapiv1actionsactionpackidauth.go | 65 +++ ...rcedatasourceinstanceidcredentialstatus.go | 64 +++ .../pathgetrestapiv1peoplepersonidphoto.go | 51 ++ ...athpostrestapiv1actionsactionpackidauth.go | 69 +++ ...tasourcedatasourceinstanceidcredentials.go | 69 +++ .../components/actionauthstatusresponse.go | 28 + .../sdk/models/components/actionauthtype.go | 41 ++ .../components/addcollectionitemserror.go | 3 + .../components/agentsinsightsv2request.go | 11 +- .../components/agentsinsightsv2response.go | 12 +- .../models/components/agentusecaseinsight.go | 78 +++ .../components/assistantinsightsresponse.go | 4 +- .../components/authorizeactionrequest.go | 17 + .../components/authorizeactionresponse.go | 17 + .../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 | 12 + .../sdk/models/components/feedrequest.go | 12 + .../sdk/models/components/feedresult.go | 12 + .../components/insightsassistantrequest.go | 11 +- .../models/components/insightschatsummary.go | 4 +- .../components/insightsoverviewrequest.go | 11 +- .../components/insightsoverviewresponse.go | 4 +- .../sdk/models/components/insightsrequest.go | 14 +- .../components/insightssearchsummary.go | 4 +- .../components/mcpbreakdowninsightsrequest.go | 115 ++++ .../rotatedatasourcecredentialsrequest.go | 17 + .../internal/sdk/models/components/ugctype.go | 3 + .../sdk/models/components/workflow.go | 23 +- .../sdk/models/operations/authorizeaction.go | 47 ++ .../models/operations/getactionauthstatus.go | 39 ++ .../getdatasourcecredentialstatus.go | 39 ++ .../sdk/models/operations/getpersonphoto.go | 69 +++ .../operations/rotatedatasourcecredentials.go | 47 ++ tests/test_datasources.py | 37 ++ tests/test_entities.py | 17 + tests/test_messages.py | 2 +- tests/test_summarize.py | 5 +- tests/test_tools.py | 30 + 135 files changed, 5059 insertions(+), 774 deletions(-) create mode 100644 docs/models/actionauthstatusresponse.md create mode 100644 docs/models/actionauthtype.md create mode 100644 docs/models/agentusecaseinsight.md create mode 100644 docs/models/authorizeactionrequest.md create mode 100644 docs/models/authorizeactionrequestrequest.md create mode 100644 docs/models/authorizeactionresponse.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/getactionauthstatusrequest.md create mode 100644 docs/models/getdatasourcecredentialstatusrequest.md create mode 100644 docs/models/getpersonphotorequest.md create mode 100644 docs/models/getpersonphotoresponse.md create mode 100644 docs/models/getpersonphotoresponseresult.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 docs/sdks/cliententities/README.md create mode 100644 docs/sdks/clienttools/README.md create mode 100644 src/glean/api_client/client_entities.py create mode 100644 src/glean/api_client/client_tools.py create mode 100644 src/glean/api_client/models/actionauthstatusresponse.py create mode 100644 src/glean/api_client/models/actionauthtype.py create mode 100644 src/glean/api_client/models/agentusecaseinsight.py create mode 100644 src/glean/api_client/models/authorizeactionop.py create mode 100644 src/glean/api_client/models/authorizeactionrequest.py create mode 100644 src/glean/api_client/models/authorizeactionresponse.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/getactionauthstatusop.py create mode 100644 src/glean/api_client/models/getdatasourcecredentialstatusop.py create mode 100644 src/glean/api_client/models/getpersonphotoop.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/pathgetrestapiv1actionsactionpackidauth.go create mode 100644 tests/mockserver/internal/handler/pathgetrestapiv1datasourcedatasourceinstanceidcredentialstatus.go create mode 100644 tests/mockserver/internal/handler/pathgetrestapiv1peoplepersonidphoto.go create mode 100644 tests/mockserver/internal/handler/pathpostrestapiv1actionsactionpackidauth.go create mode 100644 tests/mockserver/internal/handler/pathpostrestapiv1datasourcedatasourceinstanceidcredentials.go create mode 100644 tests/mockserver/internal/sdk/models/components/actionauthstatusresponse.go create mode 100644 tests/mockserver/internal/sdk/models/components/actionauthtype.go create mode 100644 tests/mockserver/internal/sdk/models/components/agentusecaseinsight.go create mode 100644 tests/mockserver/internal/sdk/models/components/authorizeactionrequest.go create mode 100644 tests/mockserver/internal/sdk/models/components/authorizeactionresponse.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/authorizeaction.go create mode 100644 tests/mockserver/internal/sdk/models/operations/getactionauthstatus.go create mode 100644 tests/mockserver/internal/sdk/models/operations/getdatasourcecredentialstatus.go create mode 100644 tests/mockserver/internal/sdk/models/operations/getpersonphoto.go create mode 100644 tests/mockserver/internal/sdk/models/operations/rotatedatasourcecredentials.go diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 239b5212..5b33f4cd 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,21 +1,22 @@ lockVersion: 2.0.0 id: 3e3290ca-0ee8-4981-b1bc-14536048fa63 management: - docChecksum: d8e27f2118bb2e9b6f10f3c87ad1abab + docChecksum: a9caca21726117998e26458bf435c1b3 docVersion: 0.9.0 - speakeasyVersion: 1.761.8 - generationVersion: 2.881.2 - releaseVersion: 0.12.24 - configChecksum: 9cfd2ffe12f50ecc2330ef075db81617 + speakeasyVersion: 1.762.0 + generationVersion: 2.882.0 + releaseVersion: 0.13.0 + configChecksum: be748445d740501acfedd92f85e8768b 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: 614d089b-9b59-41ef-9bad-6486237f615a + pristine_commit_hash: 26aa3c2b989431fdb80803a24a31d921728ca9e0 + pristine_tree_hash: 8d4011dd009e870195a6e288810b8a40ce16a4ce features: python: + acceptHeaders: 3.0.0 additionalDependencies: 1.0.0 additionalProperties: 1.0.1 configurableModuleName: 0.2.0 @@ -24,6 +25,7 @@ features: defaultEnabledRetries: 0.2.0 deprecations: 3.0.2 devContainers: 3.0.0 + downloadStreams: 1.0.1 enumUnions: 0.1.1 envVarSecurityUsage: 0.3.2 examples: 3.0.3 @@ -42,7 +44,7 @@ features: retries: 3.0.5 sdkHooks: 1.2.1 tests: 1.19.9 - unions: 3.1.4 + unions: 3.1.5 uploadStreams: 1.0.0 trackedFiles: .devcontainer/README.md: @@ -81,6 +83,14 @@ trackedFiles: id: d8679ae13234 last_write_checksum: sha1:a6567c83c6c0bf8eaed55f50af08001869d6a5de pristine_git_object: 7c4c0d90fd0a2de3e48b99ce691c1e9a6ab03041 + docs/models/actionauthstatusresponse.md: + id: ec56959e1226 + last_write_checksum: sha1:b079056510c4459edf14b43ca55ff0dca5272af1 + pristine_git_object: 0d9cb8cc5ee871fdebcac0dac1ddf7c563444496 + docs/models/actionauthtype.md: + id: f6c3ce39f190 + last_write_checksum: sha1:6fe1004cc273d5e15dff5ba82f42bd218774a83b + pristine_git_object: d288ff5c0b7fa166bdd7d0b218083b6a1595ee50 docs/models/actionsummary.md: id: 1ff225176066 last_write_checksum: sha1:e1adfabd2ed131a1414cb6b86495ad3116bb95df @@ -111,8 +121,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 @@ -179,12 +189,12 @@ trackedFiles: pristine_git_object: 4ccba78fab4fe2cae243e8a654413edb6e01c422 docs/models/agentsinsightsv2request.md: id: 9d5fdb90e1e6 - last_write_checksum: sha1:a02b97b0fa1b6993913ce744e120681213094041 - pristine_git_object: fc4a769fd5f7f8c5e36e1eec936d9454f0f01242 + last_write_checksum: sha1:2599567d774df8843a83e974e3af1439c5dca8a0 + pristine_git_object: 0218c6facda06ed257e28efb43191b2dad1ee403 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 +203,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 +273,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 @@ -277,6 +291,18 @@ trackedFiles: id: b4139065dbed last_write_checksum: sha1:015462f693083cc40f7c88d90621ec5613fcd98a pristine_git_object: 9145b8660b04968e115355c7cfa85711040d1bf2 + docs/models/authorizeactionrequest.md: + id: 2d894587003b + last_write_checksum: sha1:7e33630c4579cb0f67e77693a27adf516f67e77e + pristine_git_object: 89c7131636ec647564aed76d96425c191bdfdf5e + docs/models/authorizeactionrequestrequest.md: + id: d173ff5b3fa7 + last_write_checksum: sha1:83a93a592fa717a95d4fcc8caf8648215363fb6f + pristine_git_object: f509903ed8f9e4003000416e00fc8b969c9bb986 + docs/models/authorizeactionresponse.md: + id: f0b5459b0de4 + last_write_checksum: sha1:10c0ddc4cc2af4021bba487565075687d96534fa + pristine_git_object: 255ac7687a1ec87daade09b1403fdba4485d0a3e docs/models/authstatus.md: id: a3855939ee61 last_write_checksum: sha1:2aaf208024005706afc64573d4904c31ed107f55 @@ -321,6 +347,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 +525,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 +665,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 +751,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 +1153,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 +1293,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:a4825efb579d692610e647910ad08822fddb24e9 + pristine_git_object: 9596fdd536a0e8d39cc83475061dd4fcf0cbe84e docs/models/feedrequestoptions.md: id: 58eb26b19e77 last_write_checksum: sha1:fd2ab08736cef8156169b0cfee8c52e7aed1accf @@ -1275,8 +1313,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:3b8d88c731435e6a4c25310905431fe775c9a30c + pristine_git_object: c1b6c02882b22d58588867e283a356f3e00da511 docs/models/fieldscope.md: id: e6b52bcb22a6 last_write_checksum: sha1:13a1492ce39d2f89a01d626996a345a1339a1873 @@ -1309,6 +1347,10 @@ trackedFiles: id: 539b7c1a607d last_write_checksum: sha1:88766a93162f9ea70a183c7937e6566994232b30 pristine_git_object: a7b0cc919fcb4dc72c6717298fd386798b0c3f07 + docs/models/getactionauthstatusrequest.md: + id: 0c492a192ec8 + last_write_checksum: sha1:03f4478d2d88e137a44f2ca4065020955b5c3478 + pristine_git_object: 27eb3dd4ece0083591654bdbee02350da49bf2f5 docs/models/getagentrequest.md: id: 743f3a4630be last_write_checksum: sha1:b6d2630bc17e91ec71d2bc7e01fec9f7cf046914 @@ -1389,6 +1431,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 @@ -1461,6 +1507,18 @@ trackedFiles: id: eacac7a08e9f last_write_checksum: sha1:054e551fbaef0033c3914347dfd00b74b68fb5d4 pristine_git_object: 0bce5dedae73b06e8718f17ea3932b3a9a57463f + docs/models/getpersonphotorequest.md: + id: 90dbc76a2335 + last_write_checksum: sha1:0ca0cb5d9a126c0c85964e52dcf160bfb71bba93 + pristine_git_object: a81c0243a0c64203acc9a3fb89fb031363bb5cd9 + docs/models/getpersonphotoresponse.md: + id: eeaa7b80b779 + last_write_checksum: sha1:32205d02262773a98cea15be8eaa032f8a6787e9 + pristine_git_object: a8fca12e0b9351eebc60227476578bcf51e160bf + docs/models/getpersonphotoresponseresult.md: + id: 35c9caf792ce + last_write_checksum: sha1:36a6fb6677c1bbe44b59d764bf5f6a05b912916e + pristine_git_object: 39cfd7379a9249b1c9d56a503753dae487e9a84d docs/models/getpinrequest.md: id: 0493cde45bd0 last_write_checksum: sha1:8877bbd39413b43d4ccf88bcfe42fdbdc5e9d9d8 @@ -1619,24 +1677,24 @@ trackedFiles: pristine_git_object: 6c2fc6ab04a050a3586ef8014d4ee48c343abf92 docs/models/insightsassistantrequest.md: id: 37f76b1045f1 - last_write_checksum: sha1:2f65f9adb8d203ca6f9e8c07fe27bac58d082916 - pristine_git_object: 83e8e5b18918772469a7a6becf868e19f0f0fbce + last_write_checksum: sha1:7a52f3a08b97d98479b0485f417af26620760d95 + pristine_git_object: 5bca057243a4d509ec33eafbc0f7c8b70d1ce337 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 + last_write_checksum: sha1:8158a52e81032094547beaa8a996a6c91683a84b + pristine_git_object: b6fc7e69c80120509d9f691f3ba92d586b09f61d 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 +1705,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 +1721,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:e4911e7c5be738340bf4eab53f8517f38e55334a + pristine_git_object: cebc9ef9c63177463f8696a073a1cdd1a71d5d75 docs/models/knowledgetype.md: id: 1e0c90679228 last_write_checksum: sha1:0030a7539b9362bbb59e0bbd36580676058b3540 @@ -1797,6 +1855,10 @@ trackedFiles: id: cf68b1f63cc7 last_write_checksum: sha1:6f62aad4e5e0583365e661548b8564d1b3c97e08 pristine_git_object: ba4cf618261dec6b6829099ec1760a6fd48bce10 + docs/models/mcpbreakdowninsightsrequest.md: + id: 8c3c8a81e52f + last_write_checksum: sha1:1aa64aa623e6a963d57251261f28e38050922509 + pristine_git_object: dfc799474ee77c7a1086e51067bcf7a2b71c3fd2 docs/models/meeting.md: id: 823ab6288010 last_write_checksum: sha1:9efd1c28c84b767ea662cd26598364b032e35cf3 @@ -2137,6 +2199,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 +2501,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 @@ -2627,8 +2697,8 @@ trackedFiles: pristine_git_object: 2935dbc78cc448dca3501e7c8b7ab16a414752f1 docs/models/workflow.md: id: a782201b7327 - last_write_checksum: sha1:0a822adba8deec2d090a828e2ff8aec68c606d24 - pristine_git_object: 507954583c6d714cba568b8705de4012ad718249 + last_write_checksum: sha1:b85b44af701796a6e336739ac969c64eb87576a0 + pristine_git_object: 1237a092df37595f955bd85b04f2e401b354f434 docs/models/workflowfeedbackinfo.md: id: 948da0823637 last_write_checksum: sha1:990a1ec15bbf0af52f024a36e2538ded62bc2adb @@ -2689,10 +2759,18 @@ trackedFiles: id: e0c074acef4e last_write_checksum: sha1:ef34fa1517c866b9ae0fdb50847031421f26ea0b pristine_git_object: 8b6d7b29eae189fd1b74792cbba6265840487b61 + docs/sdks/cliententities/README.md: + id: d087d30c9006 + last_write_checksum: sha1:c5955573d5570bc98bb911311860abf4c85d19ac + pristine_git_object: 0ac68e93afbd65e5cff4a3c8cd5a91527446a41c docs/sdks/clientshortcuts/README.md: id: d5a9d841b61c last_write_checksum: sha1:e6bd4eb4d27ae7b07f9488113b782c4aa8fa40e7 pristine_git_object: 9d7f63e9d3f13055deba1775689fa797701858b5 + docs/sdks/clienttools/README.md: + id: 6c303a9741bd + last_write_checksum: sha1:34a5cb54ce4f6836462bea95bd5a3ce3d8080395 + pristine_git_object: 5dd8efc1387c74693e62d8af1394cbc698785a15 docs/sdks/clientverification/README.md: id: e8d533f9d15b last_write_checksum: sha1:7daee0f15f8ef38b45bf6209d24edf237a7ef281 @@ -2703,12 +2781,12 @@ 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 - pristine_git_object: 0ac68e93afbd65e5cff4a3c8cd5a91527446a41c + last_write_checksum: sha1:b52a97b059e94d3f522a429c9d64ce0a2f7d8b64 + pristine_git_object: dce02213bdb60ae95a2a5c845ac2e0f7952367f6 docs/sdks/governance/README.md: id: 87817eb7bf48 last_write_checksum: sha1:43e1f885a19db073f545980c51b23c82d3ec0389 @@ -2739,8 +2817,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 @@ -2767,8 +2845,8 @@ trackedFiles: pristine_git_object: 7e640dd65cd3039f7f10640480b9f23097cf13b0 docs/sdks/tools/README.md: id: 044286549bac - last_write_checksum: sha1:34a5cb54ce4f6836462bea95bd5a3ce3d8080395 - pristine_git_object: 5dd8efc1387c74693e62d8af1394cbc698785a15 + last_write_checksum: sha1:22e666988afe946208036b646b7889262d220640 + pristine_git_object: 1b4677b6245d99d2421abeb23a7a2d30e5a02576 docs/sdks/visibilityoverrides/README.md: id: c7d003d6a68f last_write_checksum: sha1:738c52c3b0964cfb441542710e10c51ca226f177 @@ -2783,12 +2861,12 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pylintrc: id: 7ce8b9f946e6 - last_write_checksum: sha1:d2c9adbaae2a8afa89572ee4b0a8866b3f4e3193 - pristine_git_object: e2fda7fe263c2a111e53872e3ad5bc324b4dccfe + last_write_checksum: sha1:ee07364348af69926e8abf84cae493c8d329e78c + pristine_git_object: 79e388be87446ab6a4064b372bad0e8376d0cb5e pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:1476c3b7e14a27c26723cc7f3a476a4cbc766cc5 - pristine_git_object: 5f4520c8ae37f1be6e3b00f0fd53092c6f55a24e + last_write_checksum: sha1:a3a7799c7cc183344491cfa36f7a0b3c7aba85ff + pristine_git_object: f34dd6a5342bf6af6b1000135c5f479020c0c39b scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:c2c83f71dea61eb50c9e05da83b16d18b4da8794 @@ -2815,8 +2893,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:32e7cfe93da4a826b561a1f43a5d9e11b5174527 + pristine_git_object: 525bfbf5f63884f8c712135f0cfeb83e1216a464 src/glean/api_client/agents.py: id: b925701a9217 last_write_checksum: sha1:e9608819a04566ba6e711f8f7cc9527d5dd095c9 @@ -2839,8 +2917,8 @@ trackedFiles: pristine_git_object: bf7b1b3b25ce6530403b0dd9f60599d236c780ce src/glean/api_client/client.py: id: c0c188098f10 - last_write_checksum: sha1:7573d8778bba72612e7afc379c05e23c1de2ed1c - pristine_git_object: 4b013bd3d9726dd28721776467185943d5181c6d + last_write_checksum: sha1:5f64bac7e247f642d88e1ecb074b51555499db70 + pristine_git_object: e88b6b232b39d9166f29f269b3268d07fb195434 src/glean/api_client/client_activity.py: id: 8227dd95d034 last_write_checksum: sha1:7c9fa340b6f5fde6a298fe96f5631cf0b65c7cf0 @@ -2857,6 +2935,10 @@ trackedFiles: id: dac599de515c last_write_checksum: sha1:7a41dae11c9e0c58be6e2e8fe07be6f78d8f24bb pristine_git_object: c270bf21a93e6b5f3befa10e8975635f18ae2fe9 + src/glean/api_client/client_entities.py: + id: 5a17ae87ac6c + last_write_checksum: sha1:ca58f63deb474cbf31b3da3229e5cc6842631c21 + pristine_git_object: 67fbc0db4c5234d05613f9f37fcf7c382316ecc1 src/glean/api_client/client_governance.py: id: 106860f10ce0 last_write_checksum: sha1:ebe769873505002b9f00342174c7fd2508af52b6 @@ -2865,6 +2947,10 @@ trackedFiles: id: 5ef5dacbcba9 last_write_checksum: sha1:6bfa420d42f76ed01b60f93abf77ef404d8fa631 pristine_git_object: a4db274d2b324b9b24a9aa2e5673b229f44d45f1 + src/glean/api_client/client_tools.py: + id: df600583b558 + last_write_checksum: sha1:5309a9ee24043c49e41c757f575c3d2af899dca3 + pristine_git_object: 14d9f68cc6a74ea72988f7d041dfeb4bffa61921 src/glean/api_client/client_verification.py: id: 211199afa506 last_write_checksum: sha1:468067c52776c584837bccef6db419ea5b339d79 @@ -2879,12 +2965,12 @@ 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 - pristine_git_object: 23056b7363d308ff4fb7d76449c9b3897af775cf + last_write_checksum: sha1:050d073268bc1022d8554229ab601b5c8b2e0091 + pristine_git_object: aa9c0ccc741bce3504af3ab3066482b1260e13d1 src/glean/api_client/errors/__init__.py: id: 88bbd5450191 last_write_checksum: sha1:c690818d01852a6dfe4049feb3f7e0069ed09a58 @@ -2959,16 +3045,24 @@ 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:ba3721c4a3024d9aec0999558094b35ecf32264d + pristine_git_object: ae0e8963d8f68297eaf542e8ca5bfbe03f9371ff + src/glean/api_client/models/actionauthstatusresponse.py: + id: 9adb7f5ebbec + last_write_checksum: sha1:ff71bd51b3f7f9a0f1dbd8484a13dd890e3e0854 + pristine_git_object: 9b04dbb5fc033bea1a99ceacc1ffdf6ae8109b65 + src/glean/api_client/models/actionauthtype.py: + id: c7402f35092d + last_write_checksum: sha1:7aaa5d1c11b105d0d7265e2a83cb005aafa89645 + pristine_git_object: 6a60ecd07772abc6b7ca0ffe4759f00d8765b1d0 src/glean/api_client/models/actionsummary.py: id: 34ccdf9f1526 last_write_checksum: sha1:cfefc6678a5612dc8d50f2b0074dc54bb88e00e0 @@ -2987,8 +3081,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 @@ -3043,12 +3137,12 @@ trackedFiles: pristine_git_object: f69f31564d278cd6d06e5ed963930d0ff6889988 src/glean/api_client/models/agentsinsightsv2request.py: id: 754887d301a3 - last_write_checksum: sha1:1311b9194f1aab2b93f646175c54b7ced2522651 - pristine_git_object: 027fbade0c78c6974ff596ccf77a0149eeb7084b + last_write_checksum: sha1:e147acd1ee591ad2cf0f465ca1ea9d7a51f95ec4 + pristine_git_object: 13a2eea4ef93e17d15c5544eb72bf137563dd817 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 +3151,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,12 +3197,24 @@ 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 pristine_git_object: f01e07f8513fdb529c333b6bccf6d5114ee80cc0 + src/glean/api_client/models/authorizeactionop.py: + id: 0aba0c0d4c87 + last_write_checksum: sha1:85feb13facccb0abcf76a1aafcf82093b0144700 + pristine_git_object: bc1671f9e560efc113e7237f869d10cf72057484 + src/glean/api_client/models/authorizeactionrequest.py: + id: ffd73ed60582 + last_write_checksum: sha1:3186333c3aadef204e1ef98455904a7e8180a8dd + pristine_git_object: 8896ddb7fa3e86750a74d33d4d13b95e9c7a007b + src/glean/api_client/models/authorizeactionresponse.py: + id: 6ccdb21412eb + last_write_checksum: sha1:6ac6b2686f9feadc680903059a0cfa05e21462cb + pristine_git_object: 093f7fb7dbcf27a1601215109ccd7d3d9c3d1e2f src/glean/api_client/models/authstatus.py: id: 75167e3b3ad0 last_write_checksum: sha1:4cdc7988894d6c50dbc42d0613bc22dbe6a29666 @@ -3295,8 +3405,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 +3521,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 +3591,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 +3917,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 +4025,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:3892ef0c54a4acc4cdbd2e122a49083f3124e4a0 + pristine_git_object: 54c8aef773afd8d59a76405763b7b343c6990ecd 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:312b37b2c3c56d24011009b98ebc6c18d70acf94 + pristine_git_object: 2bcb0e0f4fc3d09ffb1736edc48c888c07c1d57e src/glean/api_client/models/feedrequestoptions.py: id: b99003fbf522 last_write_checksum: sha1:d5ffee29242075cbe6d2dd5ec916b0c3d40acf54 @@ -3927,8 +4045,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:d0bf28c7792939e6ec01a38d36056913c76e3559 + pristine_git_object: 1a6a5baedce81c0a5db48242fef1600b96e85ca3 src/glean/api_client/models/followupaction.py: id: e2de5c4c8524 last_write_checksum: sha1:49e1a826449081fecfcd828c940604db949a8533 @@ -3949,6 +4067,10 @@ trackedFiles: id: 34cf81e82af3 last_write_checksum: sha1:4f84149547bee459f0a7f05a9b37c7d9d256af7e pristine_git_object: b5265a6086412a71445036330b444d889e033cf7 + src/glean/api_client/models/getactionauthstatusop.py: + id: 030b1216ea46 + last_write_checksum: sha1:9827667b9aa2015ae3d295f3a05c62f5fdd7c455 + pristine_git_object: 2592b0bbf68f344702096f9938642fe27f449a08 src/glean/api_client/models/getagentop.py: id: 40981170ded0 last_write_checksum: sha1:69acb6eb3a47aa7033c5661c241c8467e9f806a7 @@ -4025,6 +4147,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 @@ -4093,6 +4219,10 @@ trackedFiles: id: 0f3847de9013 last_write_checksum: sha1:e424ef68054082c29c96f19f973babe17c62009c pristine_git_object: 198ee640c908f13a53a84f7939e6ca704c99e684 + src/glean/api_client/models/getpersonphotoop.py: + id: 52871feebe6b + last_write_checksum: sha1:10e6a543cab6b99a77ad87c794d36f0c977e6e92 + pristine_git_object: 7d3d9948d1d527f27b88441934301a449aca639f src/glean/api_client/models/getpinop.py: id: ead822eb0da7 last_write_checksum: sha1:7f09359a7f5bf28b8713a604d99fd867e20ef8c4 @@ -4211,36 +4341,36 @@ trackedFiles: pristine_git_object: 63d2569b2da5fe7881df3f25db4db70425c6e7c4 src/glean/api_client/models/insightsassistantrequest.py: id: ff69cec68e31 - last_write_checksum: sha1:439ad26c2d83ca909aecf3d546506d681bfdadf7 - pristine_git_object: 88e40106f45e787691ddfe772098384b898365c5 + last_write_checksum: sha1:e6f74c316007cb309c2de8050630a85b3918d138 + pristine_git_object: 806dc671c0e0d8855ff39c17451507b63a178217 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 pristine_git_object: c0de2bef0cfda6986cec13f9a02557f3b3bf02fb src/glean/api_client/models/insightsoverviewrequest.py: id: ba00a51c6496 - last_write_checksum: sha1:4b2933a2bc6d94a665799211e2e58be8e436aff5 - pristine_git_object: 5be6e4bb1a8d0f3625ca6ba7fcb6267f6b42d9e5 + last_write_checksum: sha1:5194f1bd25326c6e1535697851930c6761961311 + pristine_git_object: eda4a606dd0a29d6d5e253e0b35a8bfacfb582ee 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 +4471,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:1b302a4ab4ac5f6c4d7f23aa00c213984b44e340 + pristine_git_object: 2893dadf9907c3784a93a86adbff8918aebf62e6 src/glean/api_client/models/meeting.py: id: 0b1f0fdee050 last_write_checksum: sha1:d727361f35d0138e09cfd1bc1e8480afd0996795 @@ -4577,6 +4711,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 +4965,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 @@ -4983,8 +5125,8 @@ trackedFiles: pristine_git_object: c85d80b8e9da0b2f99777352408e26947e014e7a src/glean/api_client/models/workflow.py: id: e59e0fe5f663 - last_write_checksum: sha1:fd93d5b491a385c239e27bb5c43d8ba1da8b599e - pristine_git_object: 6d174bfe4a1564f2d5e1da53788082ca19ffaa66 + last_write_checksum: sha1:5070acc2610cf6340930416c815c957ae37c58c8 + pristine_git_object: 4395b5719baf8ce4a250c0003fb82ca4f86e5503 src/glean/api_client/models/workflowfeedbackinfo.py: id: 720e747620b1 last_write_checksum: sha1:fea4b83ec5656ae417c8bd061e84da594170ce32 @@ -5023,8 +5165,8 @@ trackedFiles: pristine_git_object: 1a11b2534c1e9dd6dfcebefd5058cb2a2c0a9413 src/glean/api_client/sdk.py: id: e2de37b3ce92 - last_write_checksum: sha1:1163580d802a75e67fb9d7111f48cab2e2aa07d5 - pristine_git_object: 45ece9f998e7dddb67d9f6095097fdaad576234d + last_write_checksum: sha1:3567888af6f4bb6f6f3f1c8f1a7cd49974685ae0 + pristine_git_object: efd74286a75217e6893c8c018cc74b45cea9d50b src/glean/api_client/sdkconfiguration.py: id: f356ce00b5b7 last_write_checksum: sha1:1ae43e08ae57ae277b3ab5e66b52d020149ebe00 @@ -5035,8 +5177,8 @@ trackedFiles: pristine_git_object: 2274683221d56688636689111335be70ddf62a99 src/glean/api_client/tools.py: id: 3ea40147c1cc - last_write_checksum: sha1:52290f9d4a0873f651ddaa58229e07c83f2771a3 - pristine_git_object: 5acff61eef2e31671e0e071dc167e455618eb010 + last_write_checksum: sha1:2859d2bd3c145fc505b6f2f4e17cd47e17cfe5dd + pristine_git_object: 5fb9c7d1f89c2480bd1c69bb35652ae9d4bf9729 src/glean/api_client/types/__init__.py: id: f63c790831ee last_write_checksum: sha1:140ebdd01a46f92ffc710c52c958c4eba3cf68ed @@ -5156,19 +5298,25 @@ 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:08fbf7f913650b9267085f70f390796032adcba1 + tests/mockserver/internal/handler/pathgetrestapiv1actionsactionpackidauth.go: + last_write_checksum: sha1:b6790ca7622ca0c04af07eab340515f2ab041e77 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: last_write_checksum: sha1:6089d4b8e771bd03d202691f0be1c3a7ed9fb6e8 tests/mockserver/internal/handler/pathgetrestapiv1governancedatapoliciesid.go: last_write_checksum: sha1:08b8057f91f2a800304987937336f033580406df + tests/mockserver/internal/handler/pathgetrestapiv1peoplepersonidphoto.go: + last_write_checksum: sha1:086d9b020ab7cd0e78ed6d28933e95c09b82e498 tests/mockserver/internal/handler/pathgetrestapiv1toolslist.go: last_write_checksum: sha1:8b0d26cd221009e78396ed0c573e78c0ac719e36 tests/mockserver/internal/handler/pathpatchrestapiv1configuredatasourcesdatasourceidinstancesinstanceid.go: @@ -5223,6 +5371,8 @@ trackedFiles: last_write_checksum: sha1:d663a6564269f2894bb75a0b7bb0a98421d25d07 tests/mockserver/internal/handler/pathpostapiindexv1updatepermissions.go: last_write_checksum: sha1:30d3d3c8d634fa56d0510224f26e4538ba76dc89 + tests/mockserver/internal/handler/pathpostrestapiv1actionsactionpackidauth.go: + last_write_checksum: sha1:70a02de6282d624b0493640bde292a9ef1db3151 tests/mockserver/internal/handler/pathpostrestapiv1activity.go: last_write_checksum: sha1:740b590218da942539e85a585bec78c0777ae934 tests/mockserver/internal/handler/pathpostrestapiv1addcollectionitems.go: @@ -5247,6 +5397,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: @@ -5351,6 +5503,10 @@ trackedFiles: last_write_checksum: sha1:af9187f31972ef308fb4bc82de73d6dd71b9fb64 tests/mockserver/internal/logging/oas_operation_call.go: last_write_checksum: sha1:1ec2244b5fc171dfe7e4e339420b2b17f0df48c9 + tests/mockserver/internal/sdk/models/components/actionauthstatusresponse.go: + last_write_checksum: sha1:f4b8bd1d7263b7384d33deb809a55b23be31f991 + tests/mockserver/internal/sdk/models/components/actionauthtype.go: + last_write_checksum: sha1:bd904943895ea34005f594e13f12481f96c11286 tests/mockserver/internal/sdk/models/components/actionsummary.go: last_write_checksum: sha1:32cfaf32c20b96fe223b11c6150435d39c9be8da tests/mockserver/internal/sdk/models/components/activity.go: @@ -5360,7 +5516,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: @@ -5382,13 +5538,15 @@ trackedFiles: tests/mockserver/internal/sdk/models/components/agentschemas.go: last_write_checksum: sha1:d0cbb79eee354dff93838a2d6525538d440b7ffc tests/mockserver/internal/sdk/models/components/agentsinsightsv2request.go: - last_write_checksum: sha1:5bbebc8109a68e2b22dc0ca044b009a4ff491d1f + last_write_checksum: sha1:7759601379c524537409b44daa7a7a3f36c142b6 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,9 +5568,13 @@ 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/authorizeactionrequest.go: + last_write_checksum: sha1:43e17a15b1a68cd66e153e9f4d4c43baba1f39cb + tests/mockserver/internal/sdk/models/components/authorizeactionresponse.go: + last_write_checksum: sha1:a4ac96d8a050f5d0e2f215fa8c0289fd781532e5 tests/mockserver/internal/sdk/models/components/authstatus.go: last_write_checksum: sha1:ca2727d0dcddf2ee072f3b26529d2952d7e72a21 tests/mockserver/internal/sdk/models/components/authtoken.go: @@ -5502,7 +5664,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 +5714,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 +5749,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 +5882,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 +5932,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:ddb5b707132e985c0605740f5a6e9464fa055f6a tests/mockserver/internal/sdk/models/components/feedrequest.go: - last_write_checksum: sha1:ee94cd67bcfc3881a07dded1fa906f058e5bc82c + last_write_checksum: sha1:4a06e95d21a9abd4c4e941bd681b9ce6ba07f8e3 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:85e7b8f393de79ed53155b543f85969097912386 tests/mockserver/internal/sdk/models/components/followupaction.go: last_write_checksum: sha1:32a31f7af77a58ce6f3284e8550d01fcf0d3bddd tests/mockserver/internal/sdk/models/components/generatedattachment.go: @@ -5884,19 +6050,19 @@ trackedFiles: tests/mockserver/internal/sdk/models/components/inputoptions.go: last_write_checksum: sha1:80d7508aa49da639f53def509fb1300d50b27a45 tests/mockserver/internal/sdk/models/components/insightsassistantrequest.go: - last_write_checksum: sha1:eac843a444bc1a4407ac673f756bb9684564aef7 + last_write_checksum: sha1:e420017f2d5df6e11b16e57611253957ccf470dc 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 + last_write_checksum: sha1:1e607db283c6a0395011c9482508d3ad5544b44e 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 +6097,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:70341128cd46d9472de34bd3d58ac377f37d2580 tests/mockserver/internal/sdk/models/components/meeting.go: last_write_checksum: sha1:3cf5bc5fd2b5a40c545bfe1d9f768a98c3360d11 tests/mockserver/internal/sdk/models/components/message.go: @@ -6033,6 +6201,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 +6322,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: @@ -6218,7 +6388,7 @@ trackedFiles: tests/mockserver/internal/sdk/models/components/viewerinfo.go: last_write_checksum: sha1:bf5d4b48cfa2e68cc2b2b7c47d1f0668d18e1b56 tests/mockserver/internal/sdk/models/components/workflow.go: - last_write_checksum: sha1:7acd3b72508c37b20f0e5f633e4ea14b3df1f874 + last_write_checksum: sha1:faa52946a99d64c4d7e468e76bf44ef33f094bb2 tests/mockserver/internal/sdk/models/components/workflowfeedbackinfo.go: last_write_checksum: sha1:6723c2b80df391bab5e91b8ac23f9ca4938665f7 tests/mockserver/internal/sdk/models/components/workflowresult.go: @@ -6235,6 +6405,8 @@ trackedFiles: last_write_checksum: sha1:cd6a0cbf098c64d2873723c6db34d4d104aafee4 tests/mockserver/internal/sdk/models/operations/adminsearch.go: last_write_checksum: sha1:8349967c39c2200f8b798379f9d601234dd0ea08 + tests/mockserver/internal/sdk/models/operations/authorizeaction.go: + last_write_checksum: sha1:4055b8553dbcb1948aa10979c3986a07efa72dc7 tests/mockserver/internal/sdk/models/operations/autocomplete.go: last_write_checksum: sha1:242f4ac0044ef328043fc3a5d0effdeccb7f291f tests/mockserver/internal/sdk/models/operations/chat.go: @@ -6299,6 +6471,8 @@ trackedFiles: last_write_checksum: sha1:5cc00b3895c2391dab6e7706a97903ed226c8f10 tests/mockserver/internal/sdk/models/operations/feedback.go: last_write_checksum: sha1:7d5a51aed8eacae15096b90250b2a35f647b45ac + tests/mockserver/internal/sdk/models/operations/getactionauthstatus.go: + last_write_checksum: sha1:2d703ef6a385eafcf702470985c7f276718128fb tests/mockserver/internal/sdk/models/operations/getagent.go: last_write_checksum: sha1:97fa8b77eab495bb56cda7e91667fd77d8567faa tests/mockserver/internal/sdk/models/operations/getagentschemas.go: @@ -6313,6 +6487,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: @@ -6323,6 +6499,8 @@ trackedFiles: last_write_checksum: sha1:d4bf58f85d349c021ec670d2a7fc308e13c64a11 tests/mockserver/internal/sdk/models/operations/getdocvisibility.go: last_write_checksum: sha1:5402b1db287c42416c4f4aea7768be3d562f42c9 + tests/mockserver/internal/sdk/models/operations/getpersonphoto.go: + last_write_checksum: sha1:5d1aac3d1f32842d4855f0278d7602ac5723c3dd tests/mockserver/internal/sdk/models/operations/getpin.go: last_write_checksum: sha1:7bf799aefdcb8165fe3fe2d5a756a0fa7b2251dc tests/mockserver/internal/sdk/models/operations/getpolicy.go: @@ -6437,6 +6615,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,16 +6749,16 @@ 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 pristine_git_object: acec822d761f40906a287eee92200d1223caec4d tests/test_entities.py: id: 9bdc6c717c71 - last_write_checksum: sha1:1a696f0dc5eb087d61736ff90415abe39858d512 - pristine_git_object: 04ba72dd01828321c6158046387e864ee4bc379c + last_write_checksum: sha1:4887a1e7145a50e9fe1277fee1ecda181831c7ac + pristine_git_object: c6b986f4f1a1e6202a012ebb349a3af76c9c4f05 tests/test_governance.py: id: d9680b75ffff last_write_checksum: sha1:c1eb83dbb3867d3c43fd55377c05039853af49e5 @@ -6601,8 +6781,8 @@ trackedFiles: pristine_git_object: 6cc8aeec3c52329d389081db0a27f10f53f214b9 tests/test_messages.py: id: be23089b1f8b - last_write_checksum: sha1:bef200db8e7fff0aa33ef17846f5054a2d035a88 - pristine_git_object: 36643db35a2d2a3cf9d327379ee7a6cb30da51d0 + last_write_checksum: sha1:5db8087e85104ab50b362638150fa1f6686a3c30 + pristine_git_object: c0fd29dab7d365ef9d78c0c291b925e6b9fd7298 tests/test_people.py: id: 37c243940039 last_write_checksum: sha1:7c7268ffeebe48d81ed25e9b1cfc3a395abf5c1f @@ -6625,12 +6805,12 @@ trackedFiles: pristine_git_object: df2944ebda36db652b2770dd1c23be83df90fc99 tests/test_summarize.py: id: a255d8a6f627 - last_write_checksum: sha1:56ebc69bb4f81505bc6d5f557eafd27f2bf6287d - pristine_git_object: 3f56a110361de93de6f420cfacda057683eabbc8 + last_write_checksum: sha1:6244d4da1522f443776e78aeb31dd83ebdc90c42 + pristine_git_object: 2b5d1f38b094214933fc3b8da79ff8ed979c5122 tests/test_tools.py: id: 70889bdf7321 - last_write_checksum: sha1:3c0c220f8975b050c322f6475e95f7af4e65b995 - pristine_git_object: 1d25eef896061023603420d7d56c27e40ec7ed01 + last_write_checksum: sha1:6acdfe62ce7d40b83715c4d8a368380037fa618d + pristine_git_object: 0524d040ffe1ed826d921f543a19e38377ddc8d0 tests/test_troubleshooting.py: id: 784c409f631e last_write_checksum: sha1:5af30befb8fffd54210e313bf98c24a64a685c50 @@ -6944,7 +7124,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 +7584,55 @@ examples: application/json: {"configuration": {"values": {}}} "400": application/json: {} + getPersonPhoto: + speakeasy-default-get-person-photo: + parameters: + path: + person_id: "" + responses: + "200": + image/png: "x-file: example.file" + image/jpeg: "x-file: example.file" + getActionAuthStatus: + speakeasy-default-get-action-auth-status: + parameters: + path: + actionPackId: "" + responses: + "200": + application/json: {"authenticated": true, "authType": "AUTH_ADMIN"} + authorizeAction: + speakeasy-default-authorize-action: + parameters: + path: + actionPackId: "" + requestBody: + application/json: {"returnUrl": "https://irresponsible-trick.name/"} + responses: + "200": + application/json: {"redirectUrl": "https://possible-hamburger.info"} + 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 +7783,12 @@ generatedTests: checkdatasourceauth: "2026-02-19T15:48:52Z" getDatasourceInstanceConfiguration: "2026-03-09T18:34:29Z" updateDatasourceInstanceConfiguration: "2026-03-09T18:34:29Z" + getPersonPhoto: "2026-05-07T11:20:22Z" + getActionAuthStatus: "2026-05-07T11:20:22Z" + authorizeAction: "2026-05-07T11:20:22Z" + getDatasourceCredentialStatus: "2026-05-07T11:20:22Z" + rotateDatasourceCredentials: "2026-05-07T11:20:22Z" +releaseNotes: "## Python SDK Changes:\n* `glean.client.collections.add_items()`: `response.error.error_type.enum(corrupt_item)` **Added** (Breaking ⚠️)\n* `glean.entities.get_person_photo()`: **Added**\n* `glean.tools.get_action_auth_status()`: **Added**\n* `glean.tools.authorize_action()`: **Added**\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` **Changed**\n * `response.agents_response.top_use_cases_insights` **Added**\n* `glean.client.search.retrieve_feed()`: \n * `request.categories[]` **Changed**\n * `response.results[]` **Changed**\n" generatedFiles: - .devcontainer/README.md - .devcontainer/devcontainer.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 47a0a91b..88a2616c 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.13.0 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/glean-merged-spec.yaml b/.speakeasy/glean-merged-spec.yaml index e084beac..50f1eb76 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: b14bbe35a9f9b2ede6a2b2969a6d34cfac74af06 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: 6a7c06cb55082b8df19cf4111a4d1fefd6efb22e x-speakeasy-name: 'Glean API' servers: - url: https://{instance}-be.glean.com @@ -2036,6 +2036,58 @@ paths: - APIToken: [] x-speakeasy-name-override: readPeople x-speakeasy-group: client.entities + /rest/api/v1/people/{person_id}/photo: + get: + tags: + - Entities + summary: Get person photo + description: | + Returns the profile photo bytes for a person whose photo is stored in Glean (crawled from an identity source or user-uploaded via admin console). Photos hosted externally (e.g. Slack CDN) are not served by this endpoint; callers should follow the photoUrl from /people or /listentities directly. Responses include a Cache-Control header (max-age=3600) to reduce redundant fetches. + operationId: getPersonPhoto + x-visibility: Public + parameters: + - name: person_id + in: path + required: true + description: The obfuscated ID of the person whose photo to retrieve. + schema: + type: string + - name: ds + in: query + required: false + description: | + Optional datasource override for crawled photos (e.g. AZURE, GDRIVE, OKTA). When omitted, the datasource is derived from the person's stored photo URL or the deployment's primary person datasource. + schema: + type: string + responses: + "200": + description: Photo bytes returned successfully. + headers: + Cache-Control: + description: Caching directive for the photo response. + schema: + type: string + example: public, max-age=3600 + content: + image/png: + schema: + type: string + format: binary + image/jpeg: + schema: + type: string + format: binary + "400": + description: Missing person_id parameter. + "401": + description: Not Authorized. + "404": + description: | + Person not found, person has no photo, or photo is not hosted by Glean (follow photoUrl from /people or /listentities directly). + "429": + description: Too Many Requests. + security: + - APIToken: [] /rest/api/v1/createshortcut: post: tags: @@ -2429,6 +2481,80 @@ paths: - APIToken: [] x-speakeasy-name-override: run x-speakeasy-group: client.tools + /rest/api/v1/actions/{actionPackId}/auth: + parameters: + - in: path + name: actionPackId + required: true + description: ID of the action pack to query or authorize. + schema: + type: string + get: + tags: + - Tools + summary: Get end-user authentication status for an action pack. + description: | + Reports whether the calling user is already authenticated against the third-party + tool backing the specified action pack. Intended for headless / server-driven clients + that render an "Authorize" prompt when the user has not yet consented to the tool. + operationId: getActionAuthStatus + x-visibility: Preview + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/ActionAuthStatusResponse" + "400": + description: Bad Request + "401": + description: Unauthorized + "404": + description: Action pack not found + "429": + description: Too Many Requests + security: + - APIToken: [] + post: + tags: + - Tools + summary: Start the OAuth authorization flow for an action pack. + description: | + Starts the third-party OAuth flow for the specified action pack and returns the + redirect URL that the client should navigate the end user to. After the OAuth + callback completes, the user's browser is redirected back to `returnUrl` with a + status query parameter (`?glean_action_auth=success|error&actionPackId=...`). + + `returnUrl` must match the tenant's configured return URL allowlist; otherwise the + request is rejected with 400. + operationId: authorizeAction + x-visibility: Preview + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/AuthorizeActionRequest" + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/AuthorizeActionResponse" + "400": + description: Invalid request (e.g. returnUrl not in allowlist, unsupported auth type) + "401": + description: Unauthorized + "403": + description: User not entitled to the action pack + "404": + description: Action pack not found + "429": + description: Too Many Requests + security: + - APIToken: [] /api/index/v1/indexdocument: post: summary: Index document @@ -4014,6 +4140,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 +8922,7 @@ components: type: string enum: - EXISTING_ITEM + - CORRUPT_ITEM AddCollectionItemsResponse: properties: collection: @@ -8738,6 +8952,7 @@ components: - HEIGHT_VIOLATION - WIDTH_VIOLATION - NO_PERMISSIONS + - CORRUPT_ITEM CreateCollectionResponse: allOf: - type: object @@ -8960,6 +9175,11 @@ components: items: type: string description: Departments for which Insights are requested. + managerEmails: + type: array + items: + type: string + description: Manager emails whose teams should be filtered for. Empty array means no filtering. dayRange: $ref: "#/components/schemas/Period" description: Time period for which Insights are requested. @@ -8970,6 +9190,11 @@ components: items: type: string description: Departments for which Insights are requested. + managerEmails: + type: array + items: + type: string + description: Manager emails whose teams should be filtered for. Empty array means no filtering. dayRange: $ref: "#/components/schemas/Period" description: Time period for which Insights are requested. @@ -8985,9 +9210,57 @@ components: items: type: string description: Departments for which Insights are requested. + managerEmails: + type: array + items: + type: string + description: Manager emails whose teams should be filtered for. Empty array means no filtering. + 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. + managerEmails: + type: array + items: + type: string + description: Manager emails 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 +9275,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 +9327,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 +9561,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 +9677,10 @@ components: type: array items: $ref: "#/components/schemas/PerAgentInsight" + topUseCasesInsights: + type: array + items: + $ref: "#/components/schemas/AgentUseCaseInsight" agentsUsageByDepartmentInsights: type: array items: @@ -10192,11 +10498,15 @@ components: - STARTER_KIT - MID_DAY_CATCH_UP - QUERY_SUGGESTION + - COWORK_CUJ_PROMO - WEEKLY_MEETINGS - FOLLOW_UP - MILESTONE_TIMELINE_CHECK - PROJECT_DISCUSSION_DIGEST + - PROJECT_FOCUS_BLOCK - PROJECT_NEXT_STEP + - DEMO_CARD + - OOO_PLANNER description: Categories of content requested. An allowlist gives flexibility to request content separately or together. requestOptions: $ref: "#/components/schemas/FeedRequestOptions" @@ -10533,6 +10843,7 @@ components: - SHORTCUTS_TYPE - SLIDE_TYPE - SPREADSHEET_TYPE + - INLINE_HTML_TYPE - WORKFLOWS_TYPE FavoriteInfo: type: object @@ -10587,6 +10898,12 @@ components: lastDraftSavedAt: type: integer description: Server Unix timestamp of the last time the draft was saved. + lastDraftSavedBy: + description: The person who last saved the draft. + $ref: "#/components/schemas/Person" + lastDraftGitAuthorId: + type: string + description: ID of the VCS user (e.g. GitHub username) who last saved the draft. Set only by the draft save path via the external Git integration API. lastUpdatedBy: $ref: "#/components/schemas/Person" Workflow: @@ -10702,11 +11019,15 @@ components: - ACTIVE_DISCUSSION - MID_DAY_CATCH_UP - QUERY_SUGGESTION + - COWORK_CUJ_PROMO - WEEKLY_MEETINGS - FOLLOW_UP - MILESTONE_TIMELINE_CHECK - PROJECT_DISCUSSION_DIGEST + - PROJECT_FOCUS_BLOCK - PROJECT_NEXT_STEP + - DEMO_CARD + - OOO_PLANNER description: Type of the justification. justification: type: string @@ -10785,11 +11106,15 @@ components: - STARTER_KIT - MID_DAY_CATCH_UP - QUERY_SUGGESTION + - COWORK_CUJ_PROMO - WEEKLY_MEETINGS - FOLLOW_UP - MILESTONE_TIMELINE_CHECK - PROJECT_DISCUSSION_DIGEST + - PROJECT_FOCUS_BLOCK - PROJECT_NEXT_STEP + - DEMO_CARD + - OOO_PLANNER description: Category of the result, one of the requested categories in incoming request. primaryEntry: $ref: "#/components/schemas/FeedEntry" @@ -11361,6 +11686,48 @@ components: error: type: string description: The error message if applicable + ActionAuthType: + type: string + description: | + Authentication mechanism used by an action pack. + - `AUTH_USER_OAUTH`: Requires per-user OAuth consent to the third-party tool. + - `AUTH_ADMIN`: Uses a service-account / admin-owned credential. End users do not authorize individually. + - `AUTH_NONE`: Action pack requires no authentication. + enum: + - AUTH_USER_OAUTH + - AUTH_ADMIN + - AUTH_NONE + ActionAuthStatusResponse: + type: object + required: + - authenticated + - authType + properties: + authenticated: + type: boolean + description: Whether the calling user is already authenticated to the tool backing the action pack. + authType: + $ref: "#/components/schemas/ActionAuthType" + AuthorizeActionRequest: + type: object + required: + - returnUrl + properties: + returnUrl: + type: string + description: | + URL on the customer's domain to redirect the end user's browser back to after the third-party OAuth + callback completes. Must be present in the tenant's return URL allowlist. + AuthorizeActionResponse: + type: object + required: + - redirectUrl + properties: + redirectUrl: + type: string + description: | + URL that the customer UI should navigate the end user to in order to begin the third-party OAuth flow. + After the user consents, control returns to `returnUrl` from the request. IndexDocumentRequest: type: object properties: @@ -13841,6 +14208,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 +14321,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..7d75047a 100644 --- a/.speakeasy/tests.arazzo.yaml +++ b/.speakeasy/tests.arazzo.yaml @@ -158494,3 +158494,98 @@ workflows: type: simple x-speakeasy-test-group: Datasources x-speakeasy-test-rebuild: true + - workflowId: getPersonPhoto + steps: + - stepId: test + operationId: getPersonPhoto + parameters: + - name: person_id + in: path + value: + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == image/png + - context: $response.body + condition: | + "x-file: example.file" + type: simple + x-speakeasy-test-group: Entities + x-speakeasy-test-rebuild: true + - workflowId: getActionAuthStatus + steps: + - stepId: test + operationId: getActionAuthStatus + parameters: + - name: actionPackId + in: path + value: + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"authenticated":true,"authType":"AUTH_ADMIN"} + type: simple + x-speakeasy-test-group: Tools + x-speakeasy-test-rebuild: true + - workflowId: authorizeAction + steps: + - stepId: test + operationId: authorizeAction + parameters: + - name: actionPackId + in: path + value: + requestBody: + contentType: application/json + payload: + returnUrl: https://irresponsible-trick.name/ + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"redirectUrl":"https://possible-hamburger.info"} + type: simple + x-speakeasy-test-group: Tools + 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..f09d8635 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.761.8 +speakeasyVersion: 1.762.0 sources: Glean API: sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:5fafd8224d41224b85cbb5f39c686e5da647fadcd8211bc9fae3c0834341dae6 - sourceBlobDigest: sha256:884a6119e9d59c15d47e169eaa496571dae1c106d390990aee38a25cb51e42c3 + sourceRevisionDigest: sha256:c28353392c85485692af6cea8fd5ca8ed16398db2d9e02118589f91c80071730 + sourceBlobDigest: sha256:a6751c2f0ee34858b01fc4e303e852c87c3507bbc712df91850453c4120c7e53 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:c28353392c85485692af6cea8fd5ca8ed16398db2d9e02118589f91c80071730 + sourceBlobDigest: sha256:a6751c2f0ee34858b01fc4e303e852c87c3507bbc712df91850453c4120c7e53 codeSamplesNamespace: glean-api-specs-python-code-samples - codeSamplesRevisionDigest: sha256:15a4a6614d94c2111ddad680da00d4286330aadf586e4ceb4f5312fe92377032 + codeSamplesRevisionDigest: sha256:33a669e3f60ee2bbbbaf150a20790a57c526d8d4e776781f46a993fc20e618f3 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index c1dd7020..029ffe65 100644 --- a/README.md +++ b/README.md @@ -403,10 +403,10 @@ For more information on obtaining the appropriate token type, please contact you * [retrieve_by_facets](docs/sdks/clientdocuments/README.md#retrieve_by_facets) - Read documents by facets * [summarize](docs/sdks/clientdocuments/README.md#summarize) - Summarize documents -### [Client.Entities](docs/sdks/entities/README.md) +### [Client.Entities](docs/sdks/cliententities/README.md) -* [list](docs/sdks/entities/README.md#list) - List entities -* [read_people](docs/sdks/entities/README.md#read_people) - Read people +* [list](docs/sdks/cliententities/README.md#list) - List entities +* [read_people](docs/sdks/cliententities/README.md#read_people) - Read people ### [Client.Governance.Data.Policies](docs/sdks/policies/README.md) @@ -459,10 +459,10 @@ For more information on obtaining the appropriate token type, please contact you * [list](docs/sdks/clientshortcuts/README.md#list) - List shortcuts * [update](docs/sdks/clientshortcuts/README.md#update) - Update shortcut -### [Client.Tools](docs/sdks/tools/README.md) +### [Client.Tools](docs/sdks/clienttools/README.md) -* [list](docs/sdks/tools/README.md#list) - List available tools -* [run](docs/sdks/tools/README.md#run) - Execute the specified tool +* [list](docs/sdks/clienttools/README.md#list) - List available tools +* [run](docs/sdks/clienttools/README.md#run) - Execute the specified tool ### [Client.Verification](docs/sdks/clientverification/README.md) @@ -474,6 +474,12 @@ 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 + +### [Entities](docs/sdks/entities/README.md) + +* [get_person_photo](docs/sdks/entities/README.md#get_person_photo) - Get person photo ### [Governance](docs/sdks/governance/README.md) @@ -544,6 +550,11 @@ For more information on obtaining the appropriate token type, please contact you * [bulk_index](docs/sdks/indexingshortcuts/README.md#bulk_index) - Bulk index external shortcuts * [upload](docs/sdks/indexingshortcuts/README.md#upload) - Upload shortcuts +### [Tools](docs/sdks/tools/README.md) + +* [get_action_auth_status](docs/sdks/tools/README.md#get_action_auth_status) - Get end-user authentication status for an action pack. +* [authorize_action](docs/sdks/tools/README.md#authorize_action) - Start the OAuth authorization flow for an action pack. + diff --git a/RELEASES.md b/RELEASES.md index cf10f25e..e06622aa 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-05-07 11:19:30 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.762.0 (2.882.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.13.0] . +### Releases +- [PyPI v0.13.0] https://pypi.org/project/glean-api-client/0.13.0 - . \ No newline at end of file diff --git a/docs/models/actionauthstatusresponse.md b/docs/models/actionauthstatusresponse.md new file mode 100644 index 00000000..0d9cb8cc --- /dev/null +++ b/docs/models/actionauthstatusresponse.md @@ -0,0 +1,9 @@ +# ActionAuthStatusResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `authenticated` | *bool* | :heavy_check_mark: | Whether the calling user is already authenticated to the tool backing the action pack. | +| `auth_type` | [models.ActionAuthType](../models/actionauthtype.md) | :heavy_check_mark: | Authentication mechanism used by an action pack.
- `AUTH_USER_OAUTH`: Requires per-user OAuth consent to the third-party tool.
- `AUTH_ADMIN`: Uses a service-account / admin-owned credential. End users do not authorize individually.
- `AUTH_NONE`: Action pack requires no authentication.
| \ No newline at end of file diff --git a/docs/models/actionauthtype.md b/docs/models/actionauthtype.md new file mode 100644 index 00000000..d288ff5c --- /dev/null +++ b/docs/models/actionauthtype.md @@ -0,0 +1,26 @@ +# ActionAuthType + +Authentication mechanism used by an action pack. + - `AUTH_USER_OAUTH`: Requires per-user OAuth consent to the third-party tool. + - `AUTH_ADMIN`: Uses a service-account / admin-owned credential. End users do not authorize individually. + - `AUTH_NONE`: Action pack requires no authentication. + + +## Example Usage + +```python +from glean.api_client.models import ActionAuthType + +value = ActionAuthType.AUTH_USER_OAUTH + +# Open enum: unrecognized values are captured as UnrecognizedStr +``` + + +## Values + +| Name | Value | +| ----------------- | ----------------- | +| `AUTH_USER_OAUTH` | AUTH_USER_OAUTH | +| `AUTH_ADMIN` | AUTH_ADMIN | +| `AUTH_NONE` | AUTH_NONE | \ 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/agentsinsightsv2request.md b/docs/models/agentsinsightsv2request.md index fc4a769f..0218c6fa 100644 --- a/docs/models/agentsinsightsv2request.md +++ b/docs/models/agentsinsightsv2request.md @@ -7,4 +7,5 @@ | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | `agent_ids` | List[*str*] | :heavy_minus_sign: | IDs of the Agents for which Insights should be returned. An empty array signifies all. | | `departments` | List[*str*] | :heavy_minus_sign: | Departments for which Insights are requested. | +| `manager_emails` | List[*str*] | :heavy_minus_sign: | Manager emails whose teams should be filtered for. Empty array means no filtering. | | `day_range` | [Optional[models.Period]](../models/period.md) | :heavy_minus_sign: | N/A | \ 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/authorizeactionrequest.md b/docs/models/authorizeactionrequest.md new file mode 100644 index 00000000..89c71316 --- /dev/null +++ b/docs/models/authorizeactionrequest.md @@ -0,0 +1,8 @@ +# AuthorizeActionRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `return_url` | *str* | :heavy_check_mark: | URL on the customer's domain to redirect the end user's browser back to after the third-party OAuth
callback completes. Must be present in the tenant's return URL allowlist.
| \ No newline at end of file diff --git a/docs/models/authorizeactionrequestrequest.md b/docs/models/authorizeactionrequestrequest.md new file mode 100644 index 00000000..f509903e --- /dev/null +++ b/docs/models/authorizeactionrequestrequest.md @@ -0,0 +1,9 @@ +# AuthorizeActionRequestRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `action_pack_id` | *str* | :heavy_check_mark: | ID of the action pack to query or authorize. | +| `authorize_action_request` | [models.AuthorizeActionRequest](../models/authorizeactionrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/authorizeactionresponse.md b/docs/models/authorizeactionresponse.md new file mode 100644 index 00000000..255ac768 --- /dev/null +++ b/docs/models/authorizeactionresponse.md @@ -0,0 +1,8 @@ +# AuthorizeActionResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `redirect_url` | *str* | :heavy_check_mark: | URL that the customer UI should navigate the end user to in order to begin the third-party OAuth flow.
After the user consents, control returns to `returnUrl` from the request.
| \ No newline at end of file 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..9596fdd5 100644 --- a/docs/models/feedrequestcategory.md +++ b/docs/models/feedrequestcategory.md @@ -44,8 +44,12 @@ value = FeedRequestCategory.DOCUMENT_SUGGESTION | `STARTER_KIT` | STARTER_KIT | | `MID_DAY_CATCH_UP` | MID_DAY_CATCH_UP | | `QUERY_SUGGESTION` | QUERY_SUGGESTION | +| `COWORK_CUJ_PROMO` | COWORK_CUJ_PROMO | | `WEEKLY_MEETINGS` | WEEKLY_MEETINGS | | `FOLLOW_UP` | FOLLOW_UP | | `MILESTONE_TIMELINE_CHECK` | MILESTONE_TIMELINE_CHECK | | `PROJECT_DISCUSSION_DIGEST` | PROJECT_DISCUSSION_DIGEST | -| `PROJECT_NEXT_STEP` | PROJECT_NEXT_STEP | \ No newline at end of file +| `PROJECT_FOCUS_BLOCK` | PROJECT_FOCUS_BLOCK | +| `PROJECT_NEXT_STEP` | PROJECT_NEXT_STEP | +| `DEMO_CARD` | DEMO_CARD | +| `OOO_PLANNER` | OOO_PLANNER | \ No newline at end of file diff --git a/docs/models/feedresultcategory.md b/docs/models/feedresultcategory.md index 3e8ed01b..c1b6c028 100644 --- a/docs/models/feedresultcategory.md +++ b/docs/models/feedresultcategory.md @@ -48,8 +48,12 @@ value = FeedResultCategory.DOCUMENT_SUGGESTION | `STARTER_KIT` | STARTER_KIT | | `MID_DAY_CATCH_UP` | MID_DAY_CATCH_UP | | `QUERY_SUGGESTION` | QUERY_SUGGESTION | +| `COWORK_CUJ_PROMO` | COWORK_CUJ_PROMO | | `WEEKLY_MEETINGS` | WEEKLY_MEETINGS | | `FOLLOW_UP` | FOLLOW_UP | | `MILESTONE_TIMELINE_CHECK` | MILESTONE_TIMELINE_CHECK | | `PROJECT_DISCUSSION_DIGEST` | PROJECT_DISCUSSION_DIGEST | -| `PROJECT_NEXT_STEP` | PROJECT_NEXT_STEP | \ No newline at end of file +| `PROJECT_FOCUS_BLOCK` | PROJECT_FOCUS_BLOCK | +| `PROJECT_NEXT_STEP` | PROJECT_NEXT_STEP | +| `DEMO_CARD` | DEMO_CARD | +| `OOO_PLANNER` | OOO_PLANNER | \ No newline at end of file diff --git a/docs/models/getactionauthstatusrequest.md b/docs/models/getactionauthstatusrequest.md new file mode 100644 index 00000000..27eb3dd4 --- /dev/null +++ b/docs/models/getactionauthstatusrequest.md @@ -0,0 +1,8 @@ +# GetActionAuthStatusRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| `action_pack_id` | *str* | :heavy_check_mark: | ID of the action pack to query or authorize. | \ 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/getpersonphotorequest.md b/docs/models/getpersonphotorequest.md new file mode 100644 index 00000000..a81c0243 --- /dev/null +++ b/docs/models/getpersonphotorequest.md @@ -0,0 +1,9 @@ +# GetPersonPhotoRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `person_id` | *str* | :heavy_check_mark: | The obfuscated ID of the person whose photo to retrieve. | +| `ds` | *Optional[str]* | :heavy_minus_sign: | Optional datasource override for crawled photos (e.g. AZURE, GDRIVE, OKTA). When omitted, the datasource is derived from the person's stored photo URL or the deployment's primary person datasource.
| \ No newline at end of file diff --git a/docs/models/getpersonphotoresponse.md b/docs/models/getpersonphotoresponse.md new file mode 100644 index 00000000..a8fca12e --- /dev/null +++ b/docs/models/getpersonphotoresponse.md @@ -0,0 +1,9 @@ +# GetPersonPhotoResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `headers` | Dict[str, List[*str*]] | :heavy_check_mark: | N/A | +| `result` | [models.GetPersonPhotoResponseResult](../models/getpersonphotoresponseresult.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getpersonphotoresponseresult.md b/docs/models/getpersonphotoresponseresult.md new file mode 100644 index 00000000..39cfd737 --- /dev/null +++ b/docs/models/getpersonphotoresponseresult.md @@ -0,0 +1,17 @@ +# GetPersonPhotoResponseResult + + +## Supported Types + +### `httpx.Response` + +```python +value: httpx.Response = /* values here */ +``` + +### `httpx.Response` + +```python +value: httpx.Response = /* values here */ +``` + diff --git a/docs/models/insightsassistantrequest.md b/docs/models/insightsassistantrequest.md index 83e8e5b1..5bca0572 100644 --- a/docs/models/insightsassistantrequest.md +++ b/docs/models/insightsassistantrequest.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| `departments` | List[*str*] | :heavy_minus_sign: | Departments for which Insights are requested. | -| `day_range` | [Optional[models.Period]](../models/period.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `departments` | List[*str*] | :heavy_minus_sign: | Departments for which Insights are requested. | +| `manager_emails` | List[*str*] | :heavy_minus_sign: | Manager emails whose teams should be filtered for. Empty array means no filtering. | +| `day_range` | [Optional[models.Period]](../models/period.md) | :heavy_minus_sign: | N/A | \ 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/insightsoverviewrequest.md b/docs/models/insightsoverviewrequest.md index 90e12f31..b6fc7e69 100644 --- a/docs/models/insightsoverviewrequest.md +++ b/docs/models/insightsoverviewrequest.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| `departments` | List[*str*] | :heavy_minus_sign: | Departments for which Insights are requested. | -| `day_range` | [Optional[models.Period]](../models/period.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `departments` | List[*str*] | :heavy_minus_sign: | Departments for which Insights are requested. | +| `manager_emails` | List[*str*] | :heavy_minus_sign: | Manager emails whose teams should be filtered for. Empty array means no filtering. | +| `day_range` | [Optional[models.Period]](../models/period.md) | :heavy_minus_sign: | N/A | \ 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..cebc9ef9 100644 --- a/docs/models/justificationtype.md +++ b/docs/models/justificationtype.md @@ -61,8 +61,12 @@ value = JustificationType.FREQUENTLY_ACCESSED | `ACTIVE_DISCUSSION` | ACTIVE_DISCUSSION | | `MID_DAY_CATCH_UP` | MID_DAY_CATCH_UP | | `QUERY_SUGGESTION` | QUERY_SUGGESTION | +| `COWORK_CUJ_PROMO` | COWORK_CUJ_PROMO | | `WEEKLY_MEETINGS` | WEEKLY_MEETINGS | | `FOLLOW_UP` | FOLLOW_UP | | `MILESTONE_TIMELINE_CHECK` | MILESTONE_TIMELINE_CHECK | | `PROJECT_DISCUSSION_DIGEST` | PROJECT_DISCUSSION_DIGEST | -| `PROJECT_NEXT_STEP` | PROJECT_NEXT_STEP | \ No newline at end of file +| `PROJECT_FOCUS_BLOCK` | PROJECT_FOCUS_BLOCK | +| `PROJECT_NEXT_STEP` | PROJECT_NEXT_STEP | +| `DEMO_CARD` | DEMO_CARD | +| `OOO_PLANNER` | OOO_PLANNER | \ No newline at end of file diff --git a/docs/models/mcpbreakdowninsightsrequest.md b/docs/models/mcpbreakdowninsightsrequest.md new file mode 100644 index 00000000..dfc79947 --- /dev/null +++ b/docs/models/mcpbreakdowninsightsrequest.md @@ -0,0 +1,15 @@ +# 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. | +| `manager_emails` | List[*str*] | :heavy_minus_sign: | Manager emails 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/models/workflow.md b/docs/models/workflow.md index 50795458..1237a092 100644 --- a/docs/models/workflow.md +++ b/docs/models/workflow.md @@ -3,13 +3,15 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `name` | *Optional[str]* | :heavy_minus_sign: | The name of the workflow. | | -| `author` | [Optional[models.Person]](../models/person.md) | :heavy_minus_sign: | N/A | {
"name": "George Clooney",
"obfuscatedId": "abc123"
} | -| `create_timestamp` | *Optional[int]* | :heavy_minus_sign: | Server Unix timestamp of the creation time. | | -| `last_update_timestamp` | *Optional[int]* | :heavy_minus_sign: | Server Unix timestamp of the last update time. | | -| `last_draft_saved_at` | *Optional[int]* | :heavy_minus_sign: | Server Unix timestamp of the last time the draft was saved. | | -| `last_updated_by` | [Optional[models.Person]](../models/person.md) | :heavy_minus_sign: | N/A | {
"name": "George Clooney",
"obfuscatedId": "abc123"
} | -| `permissions` | [Optional[models.ObjectPermissions]](../models/objectpermissions.md) | :heavy_minus_sign: | N/A | | -| `id` | *Optional[str]* | :heavy_minus_sign: | The ID of the workflow. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *Optional[str]* | :heavy_minus_sign: | The name of the workflow. | | +| `author` | [Optional[models.Person]](../models/person.md) | :heavy_minus_sign: | N/A | {
"name": "George Clooney",
"obfuscatedId": "abc123"
} | +| `create_timestamp` | *Optional[int]* | :heavy_minus_sign: | Server Unix timestamp of the creation time. | | +| `last_update_timestamp` | *Optional[int]* | :heavy_minus_sign: | Server Unix timestamp of the last update time. | | +| `last_draft_saved_at` | *Optional[int]* | :heavy_minus_sign: | Server Unix timestamp of the last time the draft was saved. | | +| `last_draft_saved_by` | [Optional[models.Person]](../models/person.md) | :heavy_minus_sign: | N/A | {
"name": "George Clooney",
"obfuscatedId": "abc123"
} | +| `last_draft_git_author_id` | *Optional[str]* | :heavy_minus_sign: | ID of the VCS user (e.g. GitHub username) who last saved the draft. Set only by the draft save path via the external Git integration API. | | +| `last_updated_by` | [Optional[models.Person]](../models/person.md) | :heavy_minus_sign: | N/A | {
"name": "George Clooney",
"obfuscatedId": "abc123"
} | +| `permissions` | [Optional[models.ObjectPermissions]](../models/objectpermissions.md) | :heavy_minus_sign: | N/A | | +| `id` | *Optional[str]* | :heavy_minus_sign: | The ID of the workflow. | | \ No newline at end of file diff --git a/docs/sdks/cliententities/README.md b/docs/sdks/cliententities/README.md new file mode 100644 index 00000000..0ac68e93 --- /dev/null +++ b/docs/sdks/cliententities/README.md @@ -0,0 +1,121 @@ +# Client.Entities + +## Overview + +### Available Operations + +* [list](#list) - List entities +* [read_people](#read_people) - Read people + +## list + +List some set of details for all entities that fit the given criteria and return in the requested order. Does not support negation in filters, assumes relation type EQUALS. There is a limit of 10000 entities that can be retrieved via this endpoint, except when using FULL_DIRECTORY request type for people entities. + +### Example Usage + + +```python +from glean.api_client import Glean, models +import os + + +with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), +) as glean: + + res = glean.client.entities.list(filter_=[ + { + "field_name": "type", + "values": [ + { + "value": "Spreadsheet", + "relation_type": models.RelationType.EQUALS, + }, + { + "value": "Presentation", + "relation_type": models.RelationType.EQUALS, + }, + ], + }, + ], entity_type=models.ListEntitiesRequestEntityType.PEOPLE, page_size=100, request_type=models.RequestType.STANDARD) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `locale` | *Optional[str]* | :heavy_minus_sign: | The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the `Accept-Language` will be used. If not present or not supported, defaults to the closest match or `en`. | | +| `filter_` | List[[models.FacetFilter](../../models/facetfilter.md)] | :heavy_minus_sign: | N/A | | +| `sort` | List[[models.SortOptions](../../models/sortoptions.md)] | :heavy_minus_sign: | Use EntitiesSortOrder enum for SortOptions.sortBy | | +| `entity_type` | [Optional[models.ListEntitiesRequestEntityType]](../../models/listentitiesrequestentitytype.md) | :heavy_minus_sign: | N/A | | +| `datasource` | *Optional[str]* | :heavy_minus_sign: | The datasource associated with the entity type, most commonly used with CUSTOM_ENTITIES | | +| `query` | *Optional[str]* | :heavy_minus_sign: | A query string to search for entities that each entity in the response must conform to. An empty query does not filter any entities. | | +| `include_fields` | List[[models.ListEntitiesRequestIncludeField](../../models/listentitiesrequestincludefield.md)] | :heavy_minus_sign: | List of entity fields to return (that aren't returned by default) | | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | Hint to the server about how many results to send back. Server may return less. | 100 | +| `cursor` | *Optional[str]* | :heavy_minus_sign: | Pagination cursor. A previously received opaque token representing the position in the overall results at which to start. | | +| `source` | *Optional[str]* | :heavy_minus_sign: | A string denoting the search surface from which the endpoint is called. | | +| `request_type` | [Optional[models.RequestType]](../../models/requesttype.md) | :heavy_minus_sign: | The type of request being made. | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.ListEntitiesResponse](../../models/listentitiesresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------- | ----------------- | ----------------- | +| errors.GleanError | 4XX, 5XX | \*/\* | + +## read_people + +Read people details for the given IDs. + +### Example Usage + + +```python +from glean.api_client import Glean +import os + + +with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), +) as glean: + + res = glean.client.entities.read_people(obfuscated_ids=[ + "abc123", + "abc456", + ]) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `locale` | *Optional[str]* | :heavy_minus_sign: | The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the `Accept-Language` will be used. If not present or not supported, defaults to the closest match or `en`. | +| `timezone_offset` | *Optional[int]* | :heavy_minus_sign: | The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. | +| `obfuscated_ids` | List[*str*] | :heavy_minus_sign: | The Person IDs to retrieve. If no IDs are requested, the current user's details are returned. | +| `email_ids` | List[*str*] | :heavy_minus_sign: | The email IDs to retrieve. The result is the deduplicated union of emailIds and obfuscatedIds. | +| `include_fields` | List[[models.PeopleRequestIncludeField](../../models/peoplerequestincludefield.md)] | :heavy_minus_sign: | List of PersonMetadata fields to return (that aren't returned by default) | +| `include_types` | List[[models.IncludeType](../../models/includetype.md)] | :heavy_minus_sign: | The types of people entities to include in the response in addition to those returned by default. | +| `source` | *Optional[str]* | :heavy_minus_sign: | A string denoting the search surface from which the endpoint is called. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.PeopleResponse](../../models/peopleresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------- | ----------------- | ----------------- | +| errors.GleanError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/clienttools/README.md b/docs/sdks/clienttools/README.md new file mode 100644 index 00000000..5dd8efc1 --- /dev/null +++ b/docs/sdks/clienttools/README.md @@ -0,0 +1,91 @@ +# Client.Tools + +## Overview + +### Available Operations + +* [list](#list) - List available tools +* [run](#run) - Execute the specified tool + +## list + +Returns a filtered set of available tools based on optional tool name parameters. If no filters are provided, all available tools are returned. + +### Example Usage + + +```python +from glean.api_client import Glean +import os + + +with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), +) as glean: + + res = glean.client.tools.list() + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `tool_names` | List[*str*] | :heavy_minus_sign: | Optional array of tool names to filter by | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.ToolsListResponse](../../models/toolslistresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------- | ----------------- | ----------------- | +| errors.GleanError | 4XX, 5XX | \*/\* | + +## run + +Execute the specified tool with provided parameters + +### Example Usage + + +```python +from glean.api_client import Glean +import os + + +with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), +) as glean: + + res = glean.client.tools.run(name="", parameters={ + + }) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | Required name of the tool to execute | +| `parameters` | Dict[str, [models.ToolsCallParameter](../../models/toolscallparameter.md)] | :heavy_check_mark: | The parameters for the tool. Each key is the name of the parameter and the value is the parameter object. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.ToolsCallResponse](../../models/toolscallresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------- | ----------------- | ----------------- | +| errors.GleanError | 4XX, 5XX | \*/\* | \ 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/entities/README.md b/docs/sdks/entities/README.md index 0ac68e93..dce02213 100644 --- a/docs/sdks/entities/README.md +++ b/docs/sdks/entities/README.md @@ -1,83 +1,19 @@ -# Client.Entities +# Entities ## Overview ### Available Operations -* [list](#list) - List entities -* [read_people](#read_people) - Read people +* [get_person_photo](#get_person_photo) - Get person photo -## list +## get_person_photo -List some set of details for all entities that fit the given criteria and return in the requested order. Does not support negation in filters, assumes relation type EQUALS. There is a limit of 10000 entities that can be retrieved via this endpoint, except when using FULL_DIRECTORY request type for people entities. +Returns the profile photo bytes for a person whose photo is stored in Glean (crawled from an identity source or user-uploaded via admin console). Photos hosted externally (e.g. Slack CDN) are not served by this endpoint; callers should follow the photoUrl from /people or /listentities directly. Responses include a Cache-Control header (max-age=3600) to reduce redundant fetches. -### Example Usage - - -```python -from glean.api_client import Glean, models -import os - - -with Glean( - api_token=os.getenv("GLEAN_API_TOKEN", ""), -) as glean: - - res = glean.client.entities.list(filter_=[ - { - "field_name": "type", - "values": [ - { - "value": "Spreadsheet", - "relation_type": models.RelationType.EQUALS, - }, - { - "value": "Presentation", - "relation_type": models.RelationType.EQUALS, - }, - ], - }, - ], entity_type=models.ListEntitiesRequestEntityType.PEOPLE, page_size=100, request_type=models.RequestType.STANDARD) - - # Handle response - print(res) - -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `locale` | *Optional[str]* | :heavy_minus_sign: | The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the `Accept-Language` will be used. If not present or not supported, defaults to the closest match or `en`. | | -| `filter_` | List[[models.FacetFilter](../../models/facetfilter.md)] | :heavy_minus_sign: | N/A | | -| `sort` | List[[models.SortOptions](../../models/sortoptions.md)] | :heavy_minus_sign: | Use EntitiesSortOrder enum for SortOptions.sortBy | | -| `entity_type` | [Optional[models.ListEntitiesRequestEntityType]](../../models/listentitiesrequestentitytype.md) | :heavy_minus_sign: | N/A | | -| `datasource` | *Optional[str]* | :heavy_minus_sign: | The datasource associated with the entity type, most commonly used with CUSTOM_ENTITIES | | -| `query` | *Optional[str]* | :heavy_minus_sign: | A query string to search for entities that each entity in the response must conform to. An empty query does not filter any entities. | | -| `include_fields` | List[[models.ListEntitiesRequestIncludeField](../../models/listentitiesrequestincludefield.md)] | :heavy_minus_sign: | List of entity fields to return (that aren't returned by default) | | -| `page_size` | *Optional[int]* | :heavy_minus_sign: | Hint to the server about how many results to send back. Server may return less. | 100 | -| `cursor` | *Optional[str]* | :heavy_minus_sign: | Pagination cursor. A previously received opaque token representing the position in the overall results at which to start. | | -| `source` | *Optional[str]* | :heavy_minus_sign: | A string denoting the search surface from which the endpoint is called. | | -| `request_type` | [Optional[models.RequestType]](../../models/requesttype.md) | :heavy_minus_sign: | The type of request being made. | | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | - -### Response - -**[models.ListEntitiesResponse](../../models/listentitiesresponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------- | ----------------- | ----------------- | -| errors.GleanError | 4XX, 5XX | \*/\* | - -## read_people - -Read people details for the given IDs. ### Example Usage - + ```python from glean.api_client import Glean import os @@ -87,10 +23,7 @@ with Glean( api_token=os.getenv("GLEAN_API_TOKEN", ""), ) as glean: - res = glean.client.entities.read_people(obfuscated_ids=[ - "abc123", - "abc456", - ]) + res = glean.entities.get_person_photo(person_id="") # Handle response print(res) @@ -99,20 +32,15 @@ with Glean( ### Parameters -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `locale` | *Optional[str]* | :heavy_minus_sign: | The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the `Accept-Language` will be used. If not present or not supported, defaults to the closest match or `en`. | -| `timezone_offset` | *Optional[int]* | :heavy_minus_sign: | The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. | -| `obfuscated_ids` | List[*str*] | :heavy_minus_sign: | The Person IDs to retrieve. If no IDs are requested, the current user's details are returned. | -| `email_ids` | List[*str*] | :heavy_minus_sign: | The email IDs to retrieve. The result is the deduplicated union of emailIds and obfuscatedIds. | -| `include_fields` | List[[models.PeopleRequestIncludeField](../../models/peoplerequestincludefield.md)] | :heavy_minus_sign: | List of PersonMetadata fields to return (that aren't returned by default) | -| `include_types` | List[[models.IncludeType](../../models/includetype.md)] | :heavy_minus_sign: | The types of people entities to include in the response in addition to those returned by default. | -| `source` | *Optional[str]* | :heavy_minus_sign: | A string denoting the search surface from which the endpoint is called. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `person_id` | *str* | :heavy_check_mark: | The obfuscated ID of the person whose photo to retrieve. | +| `ds` | *Optional[str]* | :heavy_minus_sign: | Optional datasource override for crawled photos (e.g. AZURE, GDRIVE, OKTA). When omitted, the datasource is derived from the person's stored photo URL or the deployment's primary person datasource.
| +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response -**[models.PeopleResponse](../../models/peopleresponse.md)** +**[models.GetPersonPhotoResponse](../../models/getpersonphotoresponse.md)** ### Errors 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/docs/sdks/tools/README.md b/docs/sdks/tools/README.md index 5dd8efc1..1b4677b6 100644 --- a/docs/sdks/tools/README.md +++ b/docs/sdks/tools/README.md @@ -1,19 +1,22 @@ -# Client.Tools +# Tools ## Overview ### Available Operations -* [list](#list) - List available tools -* [run](#run) - Execute the specified tool +* [get_action_auth_status](#get_action_auth_status) - Get end-user authentication status for an action pack. +* [authorize_action](#authorize_action) - Start the OAuth authorization flow for an action pack. -## list +## get_action_auth_status + +Reports whether the calling user is already authenticated against the third-party +tool backing the specified action pack. Intended for headless / server-driven clients +that render an "Authorize" prompt when the user has not yet consented to the tool. -Returns a filtered set of available tools based on optional tool name parameters. If no filters are provided, all available tools are returned. ### Example Usage - + ```python from glean.api_client import Glean import os @@ -23,7 +26,7 @@ with Glean( api_token=os.getenv("GLEAN_API_TOKEN", ""), ) as glean: - res = glean.client.tools.list() + res = glean.tools.get_action_auth_status(action_pack_id="") # Handle response print(res) @@ -34,12 +37,12 @@ with Glean( | Parameter | Type | Required | Description | | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `tool_names` | List[*str*] | :heavy_minus_sign: | Optional array of tool names to filter by | +| `action_pack_id` | *str* | :heavy_check_mark: | ID of the action pack to query or authorize. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response -**[models.ToolsListResponse](../../models/toolslistresponse.md)** +**[models.ActionAuthStatusResponse](../../models/actionauthstatusresponse.md)** ### Errors @@ -47,13 +50,20 @@ with Glean( | ----------------- | ----------------- | ----------------- | | errors.GleanError | 4XX, 5XX | \*/\* | -## run +## authorize_action + +Starts the third-party OAuth flow for the specified action pack and returns the +redirect URL that the client should navigate the end user to. After the OAuth +callback completes, the user's browser is redirected back to `returnUrl` with a +status query parameter (`?glean_action_auth=success|error&actionPackId=...`). + +`returnUrl` must match the tenant's configured return URL allowlist; otherwise the +request is rejected with 400. -Execute the specified tool with provided parameters ### Example Usage - + ```python from glean.api_client import Glean import os @@ -63,9 +73,7 @@ with Glean( api_token=os.getenv("GLEAN_API_TOKEN", ""), ) as glean: - res = glean.client.tools.run(name="", parameters={ - - }) + res = glean.tools.authorize_action(action_pack_id="", return_url="https://irresponsible-trick.name/") # Handle response print(res) @@ -74,15 +82,15 @@ with Glean( ### Parameters -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `name` | *str* | :heavy_check_mark: | Required name of the tool to execute | -| `parameters` | Dict[str, [models.ToolsCallParameter](../../models/toolscallparameter.md)] | :heavy_check_mark: | The parameters for the tool. Each key is the name of the parameter and the value is the parameter object. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `action_pack_id` | *str* | :heavy_check_mark: | ID of the action pack to query or authorize. | +| `return_url` | *str* | :heavy_check_mark: | URL on the customer's domain to redirect the end user's browser back to after the third-party OAuth
callback completes. Must be present in the tenant's return URL allowlist.
| +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response -**[models.ToolsCallResponse](../../models/toolscallresponse.md)** +**[models.AuthorizeActionResponse](../../models/authorizeactionresponse.md)** ### Errors diff --git a/pylintrc b/pylintrc index e2fda7fe..79e388be 100644 --- a/pylintrc +++ b/pylintrc @@ -188,6 +188,7 @@ good-names=i, Run, _, e, + ds, id, ts diff --git a/pyproject.toml b/pyproject.toml index 5f4520c8..f34dd6a5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "glean-api-client" -version = "0.12.24" +version = "0.13.0" 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..525bfbf5 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.13.0" __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.882.0" +__user_agent__: str = "speakeasy-sdk/python 0.13.0 2.882.0 0.9.0 glean-api-client" try: if __package__ is not None: diff --git a/src/glean/api_client/client.py b/src/glean/api_client/client.py index 4b013bd3..e88b6b23 100644 --- a/src/glean/api_client/client.py +++ b/src/glean/api_client/client.py @@ -9,16 +9,16 @@ from glean.api_client.client_authentication import ClientAuthentication from glean.api_client.client_chat import ClientChat from glean.api_client.client_documents import ClientDocuments +from glean.api_client.client_entities import ClientEntities from glean.api_client.client_governance import ClientGovernance from glean.api_client.client_shortcuts import ClientShortcuts +from glean.api_client.client_tools import ClientTools from glean.api_client.client_verification import ClientVerification from glean.api_client.collections import Collections -from glean.api_client.entities import Entities from glean.api_client.insights import Insights from glean.api_client.messages import Messages from glean.api_client.pins import Pins from glean.api_client.search import Search -from glean.api_client.tools import Tools from typing import Optional @@ -35,10 +35,10 @@ class Client(BaseSDK): messages: Messages pins: Pins search: Search - entities: Entities + entities: ClientEntities shortcuts: ClientShortcuts verification: ClientVerification - tools: Tools + tools: ClientTools governance: ClientGovernance def __init__( @@ -71,14 +71,16 @@ def _init_sdks(self): self.messages = Messages(self.sdk_configuration, parent_ref=self.parent_ref) self.pins = Pins(self.sdk_configuration, parent_ref=self.parent_ref) self.search = Search(self.sdk_configuration, parent_ref=self.parent_ref) - self.entities = Entities(self.sdk_configuration, parent_ref=self.parent_ref) + self.entities = ClientEntities( + self.sdk_configuration, parent_ref=self.parent_ref + ) self.shortcuts = ClientShortcuts( self.sdk_configuration, parent_ref=self.parent_ref ) self.verification = ClientVerification( self.sdk_configuration, parent_ref=self.parent_ref ) - self.tools = Tools(self.sdk_configuration, parent_ref=self.parent_ref) + self.tools = ClientTools(self.sdk_configuration, parent_ref=self.parent_ref) self.governance = ClientGovernance( self.sdk_configuration, parent_ref=self.parent_ref ) diff --git a/src/glean/api_client/client_entities.py b/src/glean/api_client/client_entities.py new file mode 100644 index 00000000..67fbc0db --- /dev/null +++ b/src/glean/api_client/client_entities.py @@ -0,0 +1,487 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from glean.api_client import errors, models, utils +from glean.api_client._hooks import HookContext +from glean.api_client.types import OptionalNullable, UNSET +from glean.api_client.utils import get_security_from_env +from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response +from typing import List, Mapping, Optional, Union + + +class ClientEntities(BaseSDK): + def list( + self, + *, + locale: Optional[str] = None, + filter_: Optional[ + Union[List[models.FacetFilter], List[models.FacetFilterTypedDict]] + ] = None, + sort: Optional[ + Union[List[models.SortOptions], List[models.SortOptionsTypedDict]] + ] = None, + entity_type: Optional[ + models.ListEntitiesRequestEntityType + ] = models.ListEntitiesRequestEntityType.PEOPLE, + datasource: Optional[str] = None, + query: Optional[str] = None, + include_fields: Optional[List[models.ListEntitiesRequestIncludeField]] = None, + page_size: Optional[int] = None, + cursor: Optional[str] = None, + source: Optional[str] = None, + request_type: Optional[models.RequestType] = models.RequestType.STANDARD, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ListEntitiesResponse: + r"""List entities + + List some set of details for all entities that fit the given criteria and return in the requested order. Does not support negation in filters, assumes relation type EQUALS. There is a limit of 10000 entities that can be retrieved via this endpoint, except when using FULL_DIRECTORY request type for people entities. + + :param locale: The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the `Accept-Language` will be used. If not present or not supported, defaults to the closest match or `en`. + :param filter_: + :param sort: Use EntitiesSortOrder enum for SortOptions.sortBy + :param entity_type: + :param datasource: The datasource associated with the entity type, most commonly used with CUSTOM_ENTITIES + :param query: A query string to search for entities that each entity in the response must conform to. An empty query does not filter any entities. + :param include_fields: List of entity fields to return (that aren't returned by default) + :param page_size: Hint to the server about how many results to send back. Server may return less. + :param cursor: Pagination cursor. A previously received opaque token representing the position in the overall results at which to start. + :param source: A string denoting the search surface from which the endpoint is called. + :param request_type: The type of request being made. + :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.ListentitiesRequestRequest( + locale=locale, + list_entities_request=models.ListEntitiesRequest( + filter_=utils.get_pydantic_model( + filter_, Optional[List[models.FacetFilter]] + ), + sort=utils.get_pydantic_model(sort, Optional[List[models.SortOptions]]), + entity_type=entity_type, + datasource=datasource, + query=query, + include_fields=include_fields, + page_size=page_size, + cursor=cursor, + source=source, + request_type=request_type, + ), + ) + + req = self._build_request( + method="POST", + path="/rest/api/v1/listentities", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.list_entities_request, + False, + False, + "json", + models.ListEntitiesRequest, + ), + 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="listentities", + 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, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ListEntitiesResponse, http_res) + if utils.match_response(http_res, ["400", "401", "429", "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 list_async( + self, + *, + locale: Optional[str] = None, + filter_: Optional[ + Union[List[models.FacetFilter], List[models.FacetFilterTypedDict]] + ] = None, + sort: Optional[ + Union[List[models.SortOptions], List[models.SortOptionsTypedDict]] + ] = None, + entity_type: Optional[ + models.ListEntitiesRequestEntityType + ] = models.ListEntitiesRequestEntityType.PEOPLE, + datasource: Optional[str] = None, + query: Optional[str] = None, + include_fields: Optional[List[models.ListEntitiesRequestIncludeField]] = None, + page_size: Optional[int] = None, + cursor: Optional[str] = None, + source: Optional[str] = None, + request_type: Optional[models.RequestType] = models.RequestType.STANDARD, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ListEntitiesResponse: + r"""List entities + + List some set of details for all entities that fit the given criteria and return in the requested order. Does not support negation in filters, assumes relation type EQUALS. There is a limit of 10000 entities that can be retrieved via this endpoint, except when using FULL_DIRECTORY request type for people entities. + + :param locale: The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the `Accept-Language` will be used. If not present or not supported, defaults to the closest match or `en`. + :param filter_: + :param sort: Use EntitiesSortOrder enum for SortOptions.sortBy + :param entity_type: + :param datasource: The datasource associated with the entity type, most commonly used with CUSTOM_ENTITIES + :param query: A query string to search for entities that each entity in the response must conform to. An empty query does not filter any entities. + :param include_fields: List of entity fields to return (that aren't returned by default) + :param page_size: Hint to the server about how many results to send back. Server may return less. + :param cursor: Pagination cursor. A previously received opaque token representing the position in the overall results at which to start. + :param source: A string denoting the search surface from which the endpoint is called. + :param request_type: The type of request being made. + :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.ListentitiesRequestRequest( + locale=locale, + list_entities_request=models.ListEntitiesRequest( + filter_=utils.get_pydantic_model( + filter_, Optional[List[models.FacetFilter]] + ), + sort=utils.get_pydantic_model(sort, Optional[List[models.SortOptions]]), + entity_type=entity_type, + datasource=datasource, + query=query, + include_fields=include_fields, + page_size=page_size, + cursor=cursor, + source=source, + request_type=request_type, + ), + ) + + req = self._build_request_async( + method="POST", + path="/rest/api/v1/listentities", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.list_entities_request, + False, + False, + "json", + models.ListEntitiesRequest, + ), + 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="listentities", + 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, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ListEntitiesResponse, http_res) + if utils.match_response(http_res, ["400", "401", "429", "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 read_people( + self, + *, + locale: Optional[str] = None, + timezone_offset: Optional[int] = None, + obfuscated_ids: Optional[List[str]] = None, + email_ids: Optional[List[str]] = None, + include_fields: Optional[List[models.PeopleRequestIncludeField]] = None, + include_types: Optional[List[models.IncludeType]] = None, + source: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PeopleResponse: + r"""Read people + + Read people details for the given IDs. + + :param locale: The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the `Accept-Language` will be used. If not present or not supported, defaults to the closest match or `en`. + :param timezone_offset: The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. + :param obfuscated_ids: The Person IDs to retrieve. If no IDs are requested, the current user's details are returned. + :param email_ids: The email IDs to retrieve. The result is the deduplicated union of emailIds and obfuscatedIds. + :param include_fields: List of PersonMetadata fields to return (that aren't returned by default) + :param include_types: The types of people entities to include in the response in addition to those returned by default. + :param source: A string denoting the search surface from which the endpoint is called. + :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.PeopleRequestRequest( + locale=locale, + people_request=models.PeopleRequest( + timezone_offset=timezone_offset, + obfuscated_ids=obfuscated_ids, + email_ids=email_ids, + include_fields=include_fields, + include_types=include_types, + source=source, + ), + ) + + req = self._build_request( + method="POST", + path="/rest/api/v1/people", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.people_request, False, False, "json", models.PeopleRequest + ), + 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="people", + 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, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.PeopleResponse, http_res) + if utils.match_response(http_res, ["400", "401", "429", "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 read_people_async( + self, + *, + locale: Optional[str] = None, + timezone_offset: Optional[int] = None, + obfuscated_ids: Optional[List[str]] = None, + email_ids: Optional[List[str]] = None, + include_fields: Optional[List[models.PeopleRequestIncludeField]] = None, + include_types: Optional[List[models.IncludeType]] = None, + source: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PeopleResponse: + r"""Read people + + Read people details for the given IDs. + + :param locale: The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the `Accept-Language` will be used. If not present or not supported, defaults to the closest match or `en`. + :param timezone_offset: The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. + :param obfuscated_ids: The Person IDs to retrieve. If no IDs are requested, the current user's details are returned. + :param email_ids: The email IDs to retrieve. The result is the deduplicated union of emailIds and obfuscatedIds. + :param include_fields: List of PersonMetadata fields to return (that aren't returned by default) + :param include_types: The types of people entities to include in the response in addition to those returned by default. + :param source: A string denoting the search surface from which the endpoint is called. + :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.PeopleRequestRequest( + locale=locale, + people_request=models.PeopleRequest( + timezone_offset=timezone_offset, + obfuscated_ids=obfuscated_ids, + email_ids=email_ids, + include_fields=include_fields, + include_types=include_types, + source=source, + ), + ) + + req = self._build_request_async( + method="POST", + path="/rest/api/v1/people", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.people_request, False, False, "json", models.PeopleRequest + ), + 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="people", + 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, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.PeopleResponse, http_res) + if utils.match_response(http_res, ["400", "401", "429", "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/client_tools.py b/src/glean/api_client/client_tools.py new file mode 100644 index 00000000..14d9f68c --- /dev/null +++ b/src/glean/api_client/client_tools.py @@ -0,0 +1,369 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from glean.api_client import errors, models, utils +from glean.api_client._hooks import HookContext +from glean.api_client.types import OptionalNullable, UNSET +from glean.api_client.utils import get_security_from_env +from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response +from typing import Dict, List, Mapping, Optional, Union + + +class ClientTools(BaseSDK): + def list( + self, + *, + tool_names: Optional[List[str]] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ToolsListResponse: + r"""List available tools + + Returns a filtered set of available tools based on optional tool name parameters. If no filters are provided, all available tools are returned. + + :param tool_names: Optional array of tool names to filter by + :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.GetRestAPIV1ToolsListRequest( + tool_names=tool_names, + ) + + req = self._build_request( + method="GET", + path="/rest/api/v1/tools/list", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_/rest/api/v1/tools/list", + 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, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ToolsListResponse, http_res) + if utils.match_response(http_res, ["400", "401", "404", "429", "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 list_async( + self, + *, + tool_names: Optional[List[str]] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ToolsListResponse: + r"""List available tools + + Returns a filtered set of available tools based on optional tool name parameters. If no filters are provided, all available tools are returned. + + :param tool_names: Optional array of tool names to filter by + :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.GetRestAPIV1ToolsListRequest( + tool_names=tool_names, + ) + + req = self._build_request_async( + method="GET", + path="/rest/api/v1/tools/list", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_/rest/api/v1/tools/list", + 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, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ToolsListResponse, http_res) + if utils.match_response(http_res, ["400", "401", "404", "429", "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 run( + self, + *, + name: str, + parameters: Union[ + Dict[str, models.ToolsCallParameter], + Dict[str, models.ToolsCallParameterTypedDict], + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ToolsCallResponse: + r"""Execute the specified tool + + Execute the specified tool with provided parameters + + :param name: Required name of the tool to execute + :param parameters: The parameters for the tool. Each key is the name of the parameter and the value is the parameter object. + :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.ToolsCallRequest( + name=name, + parameters=utils.get_pydantic_model( + parameters, Dict[str, models.ToolsCallParameter] + ), + ) + + req = self._build_request( + method="POST", + path="/rest/api/v1/tools/call", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.ToolsCallRequest + ), + 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="post_/rest/api/v1/tools/call", + 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, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ToolsCallResponse, http_res) + if utils.match_response(http_res, ["400", "401", "404", "429", "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 run_async( + self, + *, + name: str, + parameters: Union[ + Dict[str, models.ToolsCallParameter], + Dict[str, models.ToolsCallParameterTypedDict], + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ToolsCallResponse: + r"""Execute the specified tool + + Execute the specified tool with provided parameters + + :param name: Required name of the tool to execute + :param parameters: The parameters for the tool. Each key is the name of the parameter and the value is the parameter object. + :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.ToolsCallRequest( + name=name, + parameters=utils.get_pydantic_model( + parameters, Dict[str, models.ToolsCallParameter] + ), + ) + + req = self._build_request_async( + method="POST", + path="/rest/api/v1/tools/call", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.ToolsCallRequest + ), + 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="post_/rest/api/v1/tools/call", + 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, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ToolsCallResponse, http_res) + if utils.match_response(http_res, ["400", "401", "404", "429", "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/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/entities.py b/src/glean/api_client/entities.py index 23056b73..aa9c0ccc 100644 --- a/src/glean/api_client/entities.py +++ b/src/glean/api_client/entities.py @@ -1,306 +1,43 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from .basesdk import BaseSDK +from enum import Enum from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env -from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response -from typing import List, Mapping, Optional, Union +from typing import Mapping, Optional -class Entities(BaseSDK): - def list( - self, - *, - locale: Optional[str] = None, - filter_: Optional[ - Union[List[models.FacetFilter], List[models.FacetFilterTypedDict]] - ] = None, - sort: Optional[ - Union[List[models.SortOptions], List[models.SortOptionsTypedDict]] - ] = None, - entity_type: Optional[ - models.ListEntitiesRequestEntityType - ] = models.ListEntitiesRequestEntityType.PEOPLE, - datasource: Optional[str] = None, - query: Optional[str] = None, - include_fields: Optional[List[models.ListEntitiesRequestIncludeField]] = None, - page_size: Optional[int] = None, - cursor: Optional[str] = None, - source: Optional[str] = None, - request_type: Optional[models.RequestType] = models.RequestType.STANDARD, - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> models.ListEntitiesResponse: - r"""List entities - - List some set of details for all entities that fit the given criteria and return in the requested order. Does not support negation in filters, assumes relation type EQUALS. There is a limit of 10000 entities that can be retrieved via this endpoint, except when using FULL_DIRECTORY request type for people entities. - - :param locale: The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the `Accept-Language` will be used. If not present or not supported, defaults to the closest match or `en`. - :param filter_: - :param sort: Use EntitiesSortOrder enum for SortOptions.sortBy - :param entity_type: - :param datasource: The datasource associated with the entity type, most commonly used with CUSTOM_ENTITIES - :param query: A query string to search for entities that each entity in the response must conform to. An empty query does not filter any entities. - :param include_fields: List of entity fields to return (that aren't returned by default) - :param page_size: Hint to the server about how many results to send back. Server may return less. - :param cursor: Pagination cursor. A previously received opaque token representing the position in the overall results at which to start. - :param source: A string denoting the search surface from which the endpoint is called. - :param request_type: The type of request being made. - :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 +class GetPersonPhotoAcceptEnum(str, Enum): + IMAGE_JPEG = "image/jpeg" + IMAGE_PNG = "image/png" - if server_url is not None: - base_url = server_url - else: - base_url = self._get_url(base_url, url_variables) - request = models.ListentitiesRequestRequest( - locale=locale, - list_entities_request=models.ListEntitiesRequest( - filter_=utils.get_pydantic_model( - filter_, Optional[List[models.FacetFilter]] - ), - sort=utils.get_pydantic_model(sort, Optional[List[models.SortOptions]]), - entity_type=entity_type, - datasource=datasource, - query=query, - include_fields=include_fields, - page_size=page_size, - cursor=cursor, - source=source, - request_type=request_type, - ), - ) - - req = self._build_request( - method="POST", - path="/rest/api/v1/listentities", - base_url=base_url, - url_variables=url_variables, - request=request, - request_body_required=True, - request_has_path_params=False, - request_has_query_params=True, - user_agent_header="user-agent", - accept_header_value="application/json", - http_headers=http_headers, - security=self.sdk_configuration.security, - get_serialized_body=lambda: utils.serialize_request_body( - request.list_entities_request, - False, - False, - "json", - models.ListEntitiesRequest, - ), - 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="listentities", - 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, - ) - - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.ListEntitiesResponse, http_res) - if utils.match_response(http_res, ["400", "401", "429", "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 list_async( +class Entities(BaseSDK): + def get_person_photo( self, *, - locale: Optional[str] = None, - filter_: Optional[ - Union[List[models.FacetFilter], List[models.FacetFilterTypedDict]] - ] = None, - sort: Optional[ - Union[List[models.SortOptions], List[models.SortOptionsTypedDict]] - ] = None, - entity_type: Optional[ - models.ListEntitiesRequestEntityType - ] = models.ListEntitiesRequestEntityType.PEOPLE, - datasource: Optional[str] = None, - query: Optional[str] = None, - include_fields: Optional[List[models.ListEntitiesRequestIncludeField]] = None, - page_size: Optional[int] = None, - cursor: Optional[str] = None, - source: Optional[str] = None, - request_type: Optional[models.RequestType] = models.RequestType.STANDARD, + person_id: str, + ds: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + accept_header_override: Optional[GetPersonPhotoAcceptEnum] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.ListEntitiesResponse: - r"""List entities - - List some set of details for all entities that fit the given criteria and return in the requested order. Does not support negation in filters, assumes relation type EQUALS. There is a limit of 10000 entities that can be retrieved via this endpoint, except when using FULL_DIRECTORY request type for people entities. - - :param locale: The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the `Accept-Language` will be used. If not present or not supported, defaults to the closest match or `en`. - :param filter_: - :param sort: Use EntitiesSortOrder enum for SortOptions.sortBy - :param entity_type: - :param datasource: The datasource associated with the entity type, most commonly used with CUSTOM_ENTITIES - :param query: A query string to search for entities that each entity in the response must conform to. An empty query does not filter any entities. - :param include_fields: List of entity fields to return (that aren't returned by default) - :param page_size: Hint to the server about how many results to send back. Server may return less. - :param cursor: Pagination cursor. A previously received opaque token representing the position in the overall results at which to start. - :param source: A string denoting the search surface from which the endpoint is called. - :param request_type: The type of request being made. - :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.ListentitiesRequestRequest( - locale=locale, - list_entities_request=models.ListEntitiesRequest( - filter_=utils.get_pydantic_model( - filter_, Optional[List[models.FacetFilter]] - ), - sort=utils.get_pydantic_model(sort, Optional[List[models.SortOptions]]), - entity_type=entity_type, - datasource=datasource, - query=query, - include_fields=include_fields, - page_size=page_size, - cursor=cursor, - source=source, - request_type=request_type, - ), - ) + ) -> models.GetPersonPhotoResponse: + r"""Get person photo - req = self._build_request_async( - method="POST", - path="/rest/api/v1/listentities", - base_url=base_url, - url_variables=url_variables, - request=request, - request_body_required=True, - request_has_path_params=False, - request_has_query_params=True, - user_agent_header="user-agent", - accept_header_value="application/json", - http_headers=http_headers, - security=self.sdk_configuration.security, - get_serialized_body=lambda: utils.serialize_request_body( - request.list_entities_request, - False, - False, - "json", - models.ListEntitiesRequest, - ), - allow_empty_value=None, - timeout_ms=timeout_ms, - ) + Returns the profile photo bytes for a person whose photo is stored in Glean (crawled from an identity source or user-uploaded via admin console). Photos hosted externally (e.g. Slack CDN) are not served by this endpoint; callers should follow the photoUrl from /people or /listentities directly. Responses include a Cache-Control header (max-age=3600) to reduce redundant fetches. - 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"]) + :param person_id: The obfuscated ID of the person whose photo to retrieve. + :param ds: Optional datasource override for crawled photos (e.g. AZURE, GDRIVE, OKTA). When omitted, the datasource is derived from the person's stored photo URL or the deployment's primary person datasource. - http_res = await self.do_request_async( - hook_ctx=HookContext( - config=self.sdk_configuration, - base_url=base_url or "", - operation_id="listentities", - 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, - ) - - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.ListEntitiesResponse, http_res) - if utils.match_response(http_res, ["400", "401", "429", "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 read_people( - self, - *, - locale: Optional[str] = None, - timezone_offset: Optional[int] = None, - obfuscated_ids: Optional[List[str]] = None, - email_ids: Optional[List[str]] = None, - include_fields: Optional[List[models.PeopleRequestIncludeField]] = None, - include_types: Optional[List[models.IncludeType]] = None, - source: Optional[str] = None, - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> models.PeopleResponse: - r"""Read people - - Read people details for the given IDs. - - :param locale: The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the `Accept-Language` will be used. If not present or not supported, defaults to the closest match or `en`. - :param timezone_offset: The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. - :param obfuscated_ids: The Person IDs to retrieve. If no IDs are requested, the current user's details are returned. - :param email_ids: The email IDs to retrieve. The result is the deduplicated union of emailIds and obfuscatedIds. - :param include_fields: List of PersonMetadata fields to return (that aren't returned by default) - :param include_types: The types of people entities to include in the response in addition to those returned by default. - :param source: A string denoting the search surface from which the endpoint is called. :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 accept_header_override: Override the default accept header for this method :param http_headers: Additional headers to set or replace on requests. """ base_url = None @@ -313,34 +50,26 @@ def read_people( else: base_url = self._get_url(base_url, url_variables) - request = models.PeopleRequestRequest( - locale=locale, - people_request=models.PeopleRequest( - timezone_offset=timezone_offset, - obfuscated_ids=obfuscated_ids, - email_ids=email_ids, - include_fields=include_fields, - include_types=include_types, - source=source, - ), + request = models.GetPersonPhotoRequest( + person_id=person_id, + ds=ds, ) req = self._build_request( - method="POST", - path="/rest/api/v1/people", + method="GET", + path="/rest/api/v1/people/{person_id}/photo", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=True, - request_has_path_params=False, + request_body_required=False, + request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", - accept_header_value="application/json", + accept_header_value=accept_header_override.value + if accept_header_override is not None + else "image/jpeg;q=1, image/png;q=0", http_headers=http_headers, security=self.sdk_configuration.security, - get_serialized_body=lambda: utils.serialize_request_body( - request.people_request, False, False, "json", models.PeopleRequest - ), allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -357,7 +86,7 @@ def read_people( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="people", + operation_id="getPersonPhoto", oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security @@ -365,49 +94,51 @@ def read_people( ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + stream=True, retry_config=retry_config, ) - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.PeopleResponse, http_res) - if utils.match_response(http_res, ["400", "401", "429", "4XX"], "*"): + if utils.match_response(http_res, "200", "image/png"): + return models.GetPersonPhotoResponse( + result=http_res, headers=utils.get_response_headers(http_res.headers) + ) + if utils.match_response(http_res, "200", "image/jpeg"): + return models.GetPersonPhotoResponse( + result=http_res, headers=utils.get_response_headers(http_res.headers) + ) + if utils.match_response(http_res, ["400", "401", "404", "429", "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) + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("Unexpected response received", http_res, http_res_text) - async def read_people_async( + async def get_person_photo_async( self, *, - locale: Optional[str] = None, - timezone_offset: Optional[int] = None, - obfuscated_ids: Optional[List[str]] = None, - email_ids: Optional[List[str]] = None, - include_fields: Optional[List[models.PeopleRequestIncludeField]] = None, - include_types: Optional[List[models.IncludeType]] = None, - source: Optional[str] = None, + person_id: str, + ds: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + accept_header_override: Optional[GetPersonPhotoAcceptEnum] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.PeopleResponse: - r"""Read people + ) -> models.GetPersonPhotoResponse: + r"""Get person photo - Read people details for the given IDs. + Returns the profile photo bytes for a person whose photo is stored in Glean (crawled from an identity source or user-uploaded via admin console). Photos hosted externally (e.g. Slack CDN) are not served by this endpoint; callers should follow the photoUrl from /people or /listentities directly. Responses include a Cache-Control header (max-age=3600) to reduce redundant fetches. + + + :param person_id: The obfuscated ID of the person whose photo to retrieve. + :param ds: Optional datasource override for crawled photos (e.g. AZURE, GDRIVE, OKTA). When omitted, the datasource is derived from the person's stored photo URL or the deployment's primary person datasource. - :param locale: The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the `Accept-Language` will be used. If not present or not supported, defaults to the closest match or `en`. - :param timezone_offset: The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. - :param obfuscated_ids: The Person IDs to retrieve. If no IDs are requested, the current user's details are returned. - :param email_ids: The email IDs to retrieve. The result is the deduplicated union of emailIds and obfuscatedIds. - :param include_fields: List of PersonMetadata fields to return (that aren't returned by default) - :param include_types: The types of people entities to include in the response in addition to those returned by default. - :param source: A string denoting the search surface from which the endpoint is called. :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 accept_header_override: Override the default accept header for this method :param http_headers: Additional headers to set or replace on requests. """ base_url = None @@ -420,34 +151,26 @@ async def read_people_async( else: base_url = self._get_url(base_url, url_variables) - request = models.PeopleRequestRequest( - locale=locale, - people_request=models.PeopleRequest( - timezone_offset=timezone_offset, - obfuscated_ids=obfuscated_ids, - email_ids=email_ids, - include_fields=include_fields, - include_types=include_types, - source=source, - ), + request = models.GetPersonPhotoRequest( + person_id=person_id, + ds=ds, ) req = self._build_request_async( - method="POST", - path="/rest/api/v1/people", + method="GET", + path="/rest/api/v1/people/{person_id}/photo", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=True, - request_has_path_params=False, + request_body_required=False, + request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", - accept_header_value="application/json", + accept_header_value=accept_header_override.value + if accept_header_override is not None + else "image/jpeg;q=1, image/png;q=0", http_headers=http_headers, security=self.sdk_configuration.security, - get_serialized_body=lambda: utils.serialize_request_body( - request.people_request, False, False, "json", models.PeopleRequest - ), allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -464,7 +187,7 @@ async def read_people_async( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="people", + operation_id="getPersonPhoto", oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security @@ -472,16 +195,24 @@ async def read_people_async( ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + stream=True, retry_config=retry_config, ) - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.PeopleResponse, http_res) - if utils.match_response(http_res, ["400", "401", "429", "4XX"], "*"): + if utils.match_response(http_res, "200", "image/png"): + return models.GetPersonPhotoResponse( + result=http_res, headers=utils.get_response_headers(http_res.headers) + ) + if utils.match_response(http_res, "200", "image/jpeg"): + return models.GetPersonPhotoResponse( + result=http_res, headers=utils.get_response_headers(http_res.headers) + ) + if utils.match_response(http_res, ["400", "401", "404", "429", "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) + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("Unexpected response received", http_res, http_res_text) 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..ae0e8963 100644 --- a/src/glean/api_client/models/__init__.py +++ b/src/glean/api_client/models/__init__.py @@ -71,6 +71,11 @@ from glean.api_client.utils.dynamic_imports import lazy_getattr, lazy_dir if TYPE_CHECKING: + from .actionauthstatusresponse import ( + ActionAuthStatusResponse, + ActionAuthStatusResponseTypedDict, + ) + from .actionauthtype import ActionAuthType from .actionsummary import ActionSummary, ActionSummaryTypedDict from .activity import Activity, ActivityTypedDict from .activityevent import ( @@ -147,6 +152,7 @@ AgentsUsageByDepartmentInsight, AgentsUsageByDepartmentInsightTypedDict, ) + from .agentusecaseinsight import AgentUseCaseInsight, AgentUseCaseInsightTypedDict from .agentusersinsight import AgentUsersInsight, AgentUsersInsightTypedDict from .allowlistoptions import AllowlistOptions, AllowlistOptionsTypedDict from .announcement import ( @@ -181,6 +187,18 @@ GrantType, TokenEndpointAuthMethod, ) + from .authorizeactionop import ( + AuthorizeActionRequestRequest, + AuthorizeActionRequestRequestTypedDict, + ) + from .authorizeactionrequest import ( + AuthorizeActionRequest, + AuthorizeActionRequestTypedDict, + ) + from .authorizeactionresponse import ( + AuthorizeActionResponse, + AuthorizeActionResponseTypedDict, + ) from .authstatus import AuthStatus from .authtoken import AuthToken, AuthTokenTypedDict from .autocompleteop import ( @@ -411,6 +429,11 @@ DatasourceConfigurationResponse, DatasourceConfigurationResponseTypedDict, ) + from .datasourcecredentialstatus import DatasourceCredentialStatus + from .datasourcecredentialstatusresponse import ( + DatasourceCredentialStatusResponse, + DatasourceCredentialStatusResponseTypedDict, + ) from .datasourcegroupdefinition import ( DatasourceGroupDefinition, DatasourceGroupDefinitionTypedDict, @@ -741,6 +764,10 @@ GetRestAPIV1ToolsListRequest, GetRestAPIV1ToolsListRequestTypedDict, ) + from .getactionauthstatusop import ( + GetActionAuthStatusRequest, + GetActionAuthStatusRequestTypedDict, + ) from .getagentop import GetAgentRequest, GetAgentRequestTypedDict from .getagentschemasop import ( GetAgentSchemasRequest, @@ -794,6 +821,10 @@ GetDatasourceConfigRequest, GetDatasourceConfigRequestTypedDict, ) + from .getdatasourcecredentialstatusop import ( + GetDatasourceCredentialStatusRequest, + GetDatasourceCredentialStatusRequestTypedDict, + ) from .getdatasourceinstanceconfigurationop import ( GetDatasourceInstanceConfigurationRequest, GetDatasourceInstanceConfigurationRequestTypedDict, @@ -863,6 +894,14 @@ GetdocvisibilityRequest, GetdocvisibilityRequestTypedDict, ) + from .getpersonphotoop import ( + GetPersonPhotoRequest, + GetPersonPhotoRequestTypedDict, + GetPersonPhotoResponse, + GetPersonPhotoResponseResult, + GetPersonPhotoResponseResultTypedDict, + GetPersonPhotoResponseTypedDict, + ) from .getpinop import GetpinRequestRequest, GetpinRequestRequestTypedDict from .getpinrequest import GetPinRequest, GetPinRequestTypedDict from .getpinresponse import GetPinResponse, GetPinResponseTypedDict @@ -1032,6 +1071,11 @@ ManualFeedbackSideBySideInfoTypedDict, ManualFeedbackSideBySideInfoVote, ) + from .mcpbreakdowninsightsrequest import ( + BreakdownType, + McpBreakdownInsightsRequest, + McpBreakdownInsightsRequestTypedDict, + ) from .message import ( Message, MessageTextBlock, @@ -1157,6 +1201,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 @@ -1442,6 +1494,9 @@ __all__ = [ + "ActionAuthStatusResponse", + "ActionAuthStatusResponseTypedDict", + "ActionAuthType", "ActionSummary", "ActionSummaryTypedDict", "Activity", @@ -1485,6 +1540,8 @@ "AgentSchemas", "AgentSchemasTypedDict", "AgentTypedDict", + "AgentUseCaseInsight", + "AgentUseCaseInsightTypedDict", "AgentUsersInsight", "AgentUsersInsightTypedDict", "AgentsInsightsV2Request", @@ -1531,6 +1588,12 @@ "AuthTokenTypedDict", "AuthType", "Author", + "AuthorizeActionRequest", + "AuthorizeActionRequestRequest", + "AuthorizeActionRequestRequestTypedDict", + "AuthorizeActionRequestTypedDict", + "AuthorizeActionResponse", + "AuthorizeActionResponseTypedDict", "AutocompleteRequest", "AutocompleteRequestRequest", "AutocompleteRequestRequestTypedDict", @@ -1545,6 +1608,7 @@ "AutocompleteResultTypedDict", "Badge", "BadgeTypedDict", + "BreakdownType", "BulkIndexDocumentsRequest", "BulkIndexDocumentsRequestTypedDict", "BulkIndexEmployeesRequest", @@ -1724,6 +1788,9 @@ "DatasourceCategory", "DatasourceConfigurationResponse", "DatasourceConfigurationResponseTypedDict", + "DatasourceCredentialStatus", + "DatasourceCredentialStatusResponse", + "DatasourceCredentialStatusResponseTypedDict", "DatasourceGroupDefinition", "DatasourceGroupDefinitionTypedDict", "DatasourceInstanceConfiguration", @@ -1987,6 +2054,8 @@ "GeneratedQna", "GeneratedQnaStatus", "GeneratedQnaTypedDict", + "GetActionAuthStatusRequest", + "GetActionAuthStatusRequestTypedDict", "GetAgentRequest", "GetAgentRequestTypedDict", "GetAgentSchemasRequest", @@ -2016,6 +2085,8 @@ "GetCollectionResponseTypedDict", "GetDatasourceConfigRequest", "GetDatasourceConfigRequestTypedDict", + "GetDatasourceCredentialStatusRequest", + "GetDatasourceCredentialStatusRequestTypedDict", "GetDatasourceInstanceConfigurationRequest", "GetDatasourceInstanceConfigurationRequestTypedDict", "GetDlpReportResponse", @@ -2043,6 +2114,12 @@ "GetDocumentsRequestTypedDict", "GetDocumentsResponse", "GetDocumentsResponseTypedDict", + "GetPersonPhotoRequest", + "GetPersonPhotoRequestTypedDict", + "GetPersonPhotoResponse", + "GetPersonPhotoResponseResult", + "GetPersonPhotoResponseResultTypedDict", + "GetPersonPhotoResponseTypedDict", "GetPinRequest", "GetPinRequestTypedDict", "GetPinResponse", @@ -2211,6 +2288,8 @@ "ManualFeedbackSideBySideInfoSource", "ManualFeedbackSideBySideInfoTypedDict", "ManualFeedbackSideBySideInfoVote", + "McpBreakdownInsightsRequest", + "McpBreakdownInsightsRequestTypedDict", "Meeting", "MeetingTypedDict", "Message", @@ -2362,6 +2441,10 @@ "ResultsResponse", "ResultsResponseTypedDict", "Role", + "RotateDatasourceCredentialsRequest", + "RotateDatasourceCredentialsRequestRequest", + "RotateDatasourceCredentialsRequestRequestTypedDict", + "RotateDatasourceCredentialsRequestTypedDict", "RotateTokenResponse", "RotateTokenResponseTypedDict", "Scope", @@ -2595,6 +2678,9 @@ ] _dynamic_imports: dict[str, str] = { + "ActionAuthStatusResponse": ".actionauthstatusresponse", + "ActionAuthStatusResponseTypedDict": ".actionauthstatusresponse", + "ActionAuthType": ".actionauthtype", "ActionSummary": ".actionsummary", "ActionSummaryTypedDict": ".actionsummary", "Activity": ".activity", @@ -2652,6 +2738,8 @@ "AgentsTimeSavedInsightTypedDict": ".agentstimesavedinsight", "AgentsUsageByDepartmentInsight": ".agentsusagebydepartmentinsight", "AgentsUsageByDepartmentInsightTypedDict": ".agentsusagebydepartmentinsight", + "AgentUseCaseInsight": ".agentusecaseinsight", + "AgentUseCaseInsightTypedDict": ".agentusecaseinsight", "AgentUsersInsight": ".agentusersinsight", "AgentUsersInsightTypedDict": ".agentusersinsight", "AllowlistOptions": ".allowlistoptions", @@ -2680,6 +2768,12 @@ "AuthConfigTypedDict": ".authconfig", "GrantType": ".authconfig", "TokenEndpointAuthMethod": ".authconfig", + "AuthorizeActionRequestRequest": ".authorizeactionop", + "AuthorizeActionRequestRequestTypedDict": ".authorizeactionop", + "AuthorizeActionRequest": ".authorizeactionrequest", + "AuthorizeActionRequestTypedDict": ".authorizeactionrequest", + "AuthorizeActionResponse": ".authorizeactionresponse", + "AuthorizeActionResponseTypedDict": ".authorizeactionresponse", "AuthStatus": ".authstatus", "AuthToken": ".authtoken", "AuthTokenTypedDict": ".authtoken", @@ -2853,6 +2947,9 @@ "DatasourceBulkMembershipDefinitionTypedDict": ".datasourcebulkmembershipdefinition", "DatasourceConfigurationResponse": ".datasourceconfigurationresponse", "DatasourceConfigurationResponseTypedDict": ".datasourceconfigurationresponse", + "DatasourceCredentialStatus": ".datasourcecredentialstatus", + "DatasourceCredentialStatusResponse": ".datasourcecredentialstatusresponse", + "DatasourceCredentialStatusResponseTypedDict": ".datasourcecredentialstatusresponse", "DatasourceGroupDefinition": ".datasourcegroupdefinition", "DatasourceGroupDefinitionTypedDict": ".datasourcegroupdefinition", "DatasourceInstanceConfiguration": ".datasourceinstanceconfiguration", @@ -3111,6 +3208,8 @@ "GeneratedAttachmentContentTypedDict": ".generatedattachmentcontent", "GetRestAPIV1ToolsListRequest": ".get_rest_api_v1_tools_listop", "GetRestAPIV1ToolsListRequestTypedDict": ".get_rest_api_v1_tools_listop", + "GetActionAuthStatusRequest": ".getactionauthstatusop", + "GetActionAuthStatusRequestTypedDict": ".getactionauthstatusop", "GetAgentRequest": ".getagentop", "GetAgentRequestTypedDict": ".getagentop", "GetAgentSchemasRequest": ".getagentschemasop", @@ -3150,6 +3249,8 @@ "GetCollectionResponseTypedDict": ".getcollectionresponse", "GetDatasourceConfigRequest": ".getdatasourceconfigrequest", "GetDatasourceConfigRequestTypedDict": ".getdatasourceconfigrequest", + "GetDatasourceCredentialStatusRequest": ".getdatasourcecredentialstatusop", + "GetDatasourceCredentialStatusRequestTypedDict": ".getdatasourcecredentialstatusop", "GetDatasourceInstanceConfigurationRequest": ".getdatasourceinstanceconfigurationop", "GetDatasourceInstanceConfigurationRequestTypedDict": ".getdatasourceinstanceconfigurationop", "GetDlpReportResponse": ".getdlpreportresponse", @@ -3185,6 +3286,12 @@ "GetDocumentVisibilityOverridesResponseTypedDict": ".getdocumentvisibilityoverridesresponse", "GetdocvisibilityRequest": ".getdocvisibilityop", "GetdocvisibilityRequestTypedDict": ".getdocvisibilityop", + "GetPersonPhotoRequest": ".getpersonphotoop", + "GetPersonPhotoRequestTypedDict": ".getpersonphotoop", + "GetPersonPhotoResponse": ".getpersonphotoop", + "GetPersonPhotoResponseResult": ".getpersonphotoop", + "GetPersonPhotoResponseResultTypedDict": ".getpersonphotoop", + "GetPersonPhotoResponseTypedDict": ".getpersonphotoop", "GetpinRequestRequest": ".getpinop", "GetpinRequestRequestTypedDict": ".getpinop", "GetPinRequest": ".getpinrequest", @@ -3322,6 +3429,9 @@ "ManualFeedbackSideBySideInfoSource": ".manualfeedbacksidebysideinfo", "ManualFeedbackSideBySideInfoTypedDict": ".manualfeedbacksidebysideinfo", "ManualFeedbackSideBySideInfoVote": ".manualfeedbacksidebysideinfo", + "BreakdownType": ".mcpbreakdowninsightsrequest", + "McpBreakdownInsightsRequest": ".mcpbreakdowninsightsrequest", + "McpBreakdownInsightsRequestTypedDict": ".mcpbreakdowninsightsrequest", "Message": ".message", "MessageTextBlock": ".message", "MessageTextBlockTypedDict": ".message", @@ -3434,6 +3544,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/actionauthstatusresponse.py b/src/glean/api_client/models/actionauthstatusresponse.py new file mode 100644 index 00000000..9b04dbb5 --- /dev/null +++ b/src/glean/api_client/models/actionauthstatusresponse.py @@ -0,0 +1,49 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .actionauthtype import ActionAuthType +from glean.api_client import models +from glean.api_client.types import BaseModel +import pydantic +from pydantic import field_serializer +from typing_extensions import Annotated, TypedDict + + +class ActionAuthStatusResponseTypedDict(TypedDict): + authenticated: bool + r"""Whether the calling user is already authenticated to the tool backing the action pack.""" + auth_type: ActionAuthType + r"""Authentication mechanism used by an action pack. + - `AUTH_USER_OAUTH`: Requires per-user OAuth consent to the third-party tool. + - `AUTH_ADMIN`: Uses a service-account / admin-owned credential. End users do not authorize individually. + - `AUTH_NONE`: Action pack requires no authentication. + + """ + + +class ActionAuthStatusResponse(BaseModel): + authenticated: bool + r"""Whether the calling user is already authenticated to the tool backing the action pack.""" + + auth_type: Annotated[ActionAuthType, pydantic.Field(alias="authType")] + r"""Authentication mechanism used by an action pack. + - `AUTH_USER_OAUTH`: Requires per-user OAuth consent to the third-party tool. + - `AUTH_ADMIN`: Uses a service-account / admin-owned credential. End users do not authorize individually. + - `AUTH_NONE`: Action pack requires no authentication. + + """ + + @field_serializer("auth_type") + def serialize_auth_type(self, value): + if isinstance(value, str): + try: + return models.ActionAuthType(value) + except ValueError: + return value + return value + + +try: + ActionAuthStatusResponse.model_rebuild() +except NameError: + pass diff --git a/src/glean/api_client/models/actionauthtype.py b/src/glean/api_client/models/actionauthtype.py new file mode 100644 index 00000000..6a60ecd0 --- /dev/null +++ b/src/glean/api_client/models/actionauthtype.py @@ -0,0 +1,18 @@ +"""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 ActionAuthType(str, Enum, metaclass=utils.OpenEnumMeta): + r"""Authentication mechanism used by an action pack. + - `AUTH_USER_OAUTH`: Requires per-user OAuth consent to the third-party tool. + - `AUTH_ADMIN`: Uses a service-account / admin-owned credential. End users do not authorize individually. + - `AUTH_NONE`: Action pack requires no authentication. + + """ + + AUTH_USER_OAUTH = "AUTH_USER_OAUTH" + AUTH_ADMIN = "AUTH_ADMIN" + AUTH_NONE = "AUTH_NONE" 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/agentsinsightsv2request.py b/src/glean/api_client/models/agentsinsightsv2request.py index 027fbade..13a2eea4 100644 --- a/src/glean/api_client/models/agentsinsightsv2request.py +++ b/src/glean/api_client/models/agentsinsightsv2request.py @@ -14,6 +14,8 @@ class AgentsInsightsV2RequestTypedDict(TypedDict): r"""IDs of the Agents for which Insights should be returned. An empty array signifies all.""" departments: NotRequired[List[str]] r"""Departments for which Insights are requested.""" + manager_emails: NotRequired[List[str]] + r"""Manager emails whose teams should be filtered for. Empty array means no filtering.""" day_range: NotRequired[PeriodTypedDict] @@ -24,11 +26,16 @@ class AgentsInsightsV2Request(BaseModel): departments: Optional[List[str]] = None r"""Departments for which Insights are requested.""" + manager_emails: Annotated[ + Optional[List[str]], pydantic.Field(alias="managerEmails") + ] = None + r"""Manager emails whose teams should be filtered for. Empty array means no filtering.""" + day_range: Annotated[Optional[Period], pydantic.Field(alias="dayRange")] = None @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["agentIds", "departments", "dayRange"]) + optional_fields = set(["agentIds", "departments", "managerEmails", "dayRange"]) serialized = handler(self) m = {} 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/authorizeactionop.py b/src/glean/api_client/models/authorizeactionop.py new file mode 100644 index 00000000..bc1671f9 --- /dev/null +++ b/src/glean/api_client/models/authorizeactionop.py @@ -0,0 +1,31 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .authorizeactionrequest import ( + AuthorizeActionRequest, + AuthorizeActionRequestTypedDict, +) +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 AuthorizeActionRequestRequestTypedDict(TypedDict): + action_pack_id: str + r"""ID of the action pack to query or authorize.""" + authorize_action_request: AuthorizeActionRequestTypedDict + + +class AuthorizeActionRequestRequest(BaseModel): + action_pack_id: Annotated[ + str, + pydantic.Field(alias="actionPackId"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""ID of the action pack to query or authorize.""" + + authorize_action_request: Annotated[ + AuthorizeActionRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/glean/api_client/models/authorizeactionrequest.py b/src/glean/api_client/models/authorizeactionrequest.py new file mode 100644 index 00000000..8896ddb7 --- /dev/null +++ b/src/glean/api_client/models/authorizeactionrequest.py @@ -0,0 +1,28 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from glean.api_client.types import BaseModel +import pydantic +from typing_extensions import Annotated, TypedDict + + +class AuthorizeActionRequestTypedDict(TypedDict): + return_url: str + r"""URL on the customer's domain to redirect the end user's browser back to after the third-party OAuth + callback completes. Must be present in the tenant's return URL allowlist. + + """ + + +class AuthorizeActionRequest(BaseModel): + return_url: Annotated[str, pydantic.Field(alias="returnUrl")] + r"""URL on the customer's domain to redirect the end user's browser back to after the third-party OAuth + callback completes. Must be present in the tenant's return URL allowlist. + + """ + + +try: + AuthorizeActionRequest.model_rebuild() +except NameError: + pass diff --git a/src/glean/api_client/models/authorizeactionresponse.py b/src/glean/api_client/models/authorizeactionresponse.py new file mode 100644 index 00000000..093f7fb7 --- /dev/null +++ b/src/glean/api_client/models/authorizeactionresponse.py @@ -0,0 +1,28 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from glean.api_client.types import BaseModel +import pydantic +from typing_extensions import Annotated, TypedDict + + +class AuthorizeActionResponseTypedDict(TypedDict): + redirect_url: str + r"""URL that the customer UI should navigate the end user to in order to begin the third-party OAuth flow. + After the user consents, control returns to `returnUrl` from the request. + + """ + + +class AuthorizeActionResponse(BaseModel): + redirect_url: Annotated[str, pydantic.Field(alias="redirectUrl")] + r"""URL that the customer UI should navigate the end user to in order to begin the third-party OAuth flow. + After the user consents, control returns to `returnUrl` from the request. + + """ + + +try: + AuthorizeActionResponse.model_rebuild() +except NameError: + pass 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..54c8aef7 100644 --- a/src/glean/api_client/models/feedentry.py +++ b/src/glean/api_client/models/feedentry.py @@ -114,11 +114,15 @@ class JustificationType(str, Enum, metaclass=utils.OpenEnumMeta): ACTIVE_DISCUSSION = "ACTIVE_DISCUSSION" MID_DAY_CATCH_UP = "MID_DAY_CATCH_UP" QUERY_SUGGESTION = "QUERY_SUGGESTION" + COWORK_CUJ_PROMO = "COWORK_CUJ_PROMO" WEEKLY_MEETINGS = "WEEKLY_MEETINGS" 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" + DEMO_CARD = "DEMO_CARD" + OOO_PLANNER = "OOO_PLANNER" class FeedEntryTypedDict(TypedDict): diff --git a/src/glean/api_client/models/feedrequest.py b/src/glean/api_client/models/feedrequest.py index 0362ce88..2bcb0e0f 100644 --- a/src/glean/api_client/models/feedrequest.py +++ b/src/glean/api_client/models/feedrequest.py @@ -43,11 +43,15 @@ class FeedRequestCategory(str, Enum): STARTER_KIT = "STARTER_KIT" MID_DAY_CATCH_UP = "MID_DAY_CATCH_UP" QUERY_SUGGESTION = "QUERY_SUGGESTION" + COWORK_CUJ_PROMO = "COWORK_CUJ_PROMO" WEEKLY_MEETINGS = "WEEKLY_MEETINGS" 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" + DEMO_CARD = "DEMO_CARD" + OOO_PLANNER = "OOO_PLANNER" class FeedRequestTypedDict(TypedDict): diff --git a/src/glean/api_client/models/feedresult.py b/src/glean/api_client/models/feedresult.py index 475fbb42..1a6a5bae 100644 --- a/src/glean/api_client/models/feedresult.py +++ b/src/glean/api_client/models/feedresult.py @@ -45,11 +45,15 @@ class FeedResultCategory(str, Enum, metaclass=utils.OpenEnumMeta): STARTER_KIT = "STARTER_KIT" MID_DAY_CATCH_UP = "MID_DAY_CATCH_UP" QUERY_SUGGESTION = "QUERY_SUGGESTION" + COWORK_CUJ_PROMO = "COWORK_CUJ_PROMO" WEEKLY_MEETINGS = "WEEKLY_MEETINGS" 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" + DEMO_CARD = "DEMO_CARD" + OOO_PLANNER = "OOO_PLANNER" class FeedResultTypedDict(TypedDict): diff --git a/src/glean/api_client/models/getactionauthstatusop.py b/src/glean/api_client/models/getactionauthstatusop.py new file mode 100644 index 00000000..2592b0bb --- /dev/null +++ b/src/glean/api_client/models/getactionauthstatusop.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 GetActionAuthStatusRequestTypedDict(TypedDict): + action_pack_id: str + r"""ID of the action pack to query or authorize.""" + + +class GetActionAuthStatusRequest(BaseModel): + action_pack_id: Annotated[ + str, + pydantic.Field(alias="actionPackId"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""ID of the action pack to query or authorize.""" 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/getpersonphotoop.py b/src/glean/api_client/models/getpersonphotoop.py new file mode 100644 index 00000000..7d3d9948 --- /dev/null +++ b/src/glean/api_client/models/getpersonphotoop.py @@ -0,0 +1,70 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from glean.api_client.types import BaseModel, UNSET_SENTINEL +from glean.api_client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +import httpx +from pydantic import model_serializer +from typing import Dict, List, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +class GetPersonPhotoRequestTypedDict(TypedDict): + person_id: str + r"""The obfuscated ID of the person whose photo to retrieve.""" + ds: NotRequired[str] + r"""Optional datasource override for crawled photos (e.g. AZURE, GDRIVE, OKTA). When omitted, the datasource is derived from the person's stored photo URL or the deployment's primary person datasource. + + """ + + +class GetPersonPhotoRequest(BaseModel): + person_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The obfuscated ID of the person whose photo to retrieve.""" + + ds: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Optional datasource override for crawled photos (e.g. AZURE, GDRIVE, OKTA). When omitted, the datasource is derived from the person's stored photo URL or the deployment's primary person datasource. + + """ + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["ds"]) + 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 + + +GetPersonPhotoResponseResultTypedDict = TypeAliasType( + "GetPersonPhotoResponseResultTypedDict", Union[httpx.Response, httpx.Response] +) + + +GetPersonPhotoResponseResult = TypeAliasType( + "GetPersonPhotoResponseResult", Union[httpx.Response, httpx.Response] +) + + +class GetPersonPhotoResponseTypedDict(TypedDict): + headers: Dict[str, List[str]] + result: GetPersonPhotoResponseResultTypedDict + + +class GetPersonPhotoResponse(BaseModel): + headers: Dict[str, List[str]] + + result: GetPersonPhotoResponseResult diff --git a/src/glean/api_client/models/insightsassistantrequest.py b/src/glean/api_client/models/insightsassistantrequest.py index 88e40106..806dc671 100644 --- a/src/glean/api_client/models/insightsassistantrequest.py +++ b/src/glean/api_client/models/insightsassistantrequest.py @@ -12,6 +12,8 @@ class InsightsAssistantRequestTypedDict(TypedDict): departments: NotRequired[List[str]] r"""Departments for which Insights are requested.""" + manager_emails: NotRequired[List[str]] + r"""Manager emails whose teams should be filtered for. Empty array means no filtering.""" day_range: NotRequired[PeriodTypedDict] @@ -19,11 +21,16 @@ class InsightsAssistantRequest(BaseModel): departments: Optional[List[str]] = None r"""Departments for which Insights are requested.""" + manager_emails: Annotated[ + Optional[List[str]], pydantic.Field(alias="managerEmails") + ] = None + r"""Manager emails whose teams should be filtered for. Empty array means no filtering.""" + day_range: Annotated[Optional[Period], pydantic.Field(alias="dayRange")] = None @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["departments", "dayRange"]) + optional_fields = set(["departments", "managerEmails", "dayRange"]) serialized = handler(self) m = {} 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/insightsoverviewrequest.py b/src/glean/api_client/models/insightsoverviewrequest.py index 5be6e4bb..eda4a606 100644 --- a/src/glean/api_client/models/insightsoverviewrequest.py +++ b/src/glean/api_client/models/insightsoverviewrequest.py @@ -12,6 +12,8 @@ class InsightsOverviewRequestTypedDict(TypedDict): departments: NotRequired[List[str]] r"""Departments for which Insights are requested.""" + manager_emails: NotRequired[List[str]] + r"""Manager emails whose teams should be filtered for. Empty array means no filtering.""" day_range: NotRequired[PeriodTypedDict] @@ -19,11 +21,16 @@ class InsightsOverviewRequest(BaseModel): departments: Optional[List[str]] = None r"""Departments for which Insights are requested.""" + manager_emails: Annotated[ + Optional[List[str]], pydantic.Field(alias="managerEmails") + ] = None + r"""Manager emails whose teams should be filtered for. Empty array means no filtering.""" + day_range: Annotated[Optional[Period], pydantic.Field(alias="dayRange")] = None @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["departments", "dayRange"]) + optional_fields = set(["departments", "managerEmails", "dayRange"]) serialized = handler(self) m = {} 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..2893dadf --- /dev/null +++ b/src/glean/api_client/models/mcpbreakdowninsightsrequest.py @@ -0,0 +1,103 @@ +"""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.""" + manager_emails: NotRequired[List[str]] + r"""Manager emails 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.""" + + manager_emails: Annotated[ + Optional[List[str]], pydantic.Field(alias="managerEmails") + ] = None + r"""Manager emails 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", + "managerEmails", + "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/src/glean/api_client/models/workflow.py b/src/glean/api_client/models/workflow.py index 6d174bfe..4395b571 100644 --- a/src/glean/api_client/models/workflow.py +++ b/src/glean/api_client/models/workflow.py @@ -20,6 +20,9 @@ class WorkflowTypedDict(TypedDict): r"""Server Unix timestamp of the last update time.""" last_draft_saved_at: NotRequired[int] r"""Server Unix timestamp of the last time the draft was saved.""" + last_draft_saved_by: NotRequired[PersonTypedDict] + last_draft_git_author_id: NotRequired[str] + r"""ID of the VCS user (e.g. GitHub username) who last saved the draft. Set only by the draft save path via the external Git integration API.""" last_updated_by: NotRequired[PersonTypedDict] permissions: NotRequired[ObjectPermissionsTypedDict] id: NotRequired[str] @@ -47,6 +50,15 @@ class Workflow(BaseModel): ] = None r"""Server Unix timestamp of the last time the draft was saved.""" + last_draft_saved_by: Annotated[ + Optional[Person], pydantic.Field(alias="lastDraftSavedBy") + ] = None + + last_draft_git_author_id: Annotated[ + Optional[str], pydantic.Field(alias="lastDraftGitAuthorId") + ] = None + r"""ID of the VCS user (e.g. GitHub username) who last saved the draft. Set only by the draft save path via the external Git integration API.""" + last_updated_by: Annotated[ Optional[Person], pydantic.Field(alias="lastUpdatedBy") ] = None @@ -65,6 +77,8 @@ def serialize_model(self, handler): "createTimestamp", "lastUpdateTimestamp", "lastDraftSavedAt", + "lastDraftSavedBy", + "lastDraftGitAuthorId", "lastUpdatedBy", "permissions", "id", diff --git a/src/glean/api_client/sdk.py b/src/glean/api_client/sdk.py index 45ece9f9..efd74286 100644 --- a/src/glean/api_client/sdk.py +++ b/src/glean/api_client/sdk.py @@ -18,8 +18,10 @@ from glean.api_client.authentication import Authentication from glean.api_client.client import Client from glean.api_client.datasources import Datasources + from glean.api_client.entities import Entities from glean.api_client.governance import Governance from glean.api_client.indexing import Indexing + from glean.api_client.tools import Tools class Glean(BaseSDK): @@ -45,6 +47,8 @@ class Glean(BaseSDK): client: "Client" authentication: "Authentication" r"""Manage indexing API tokens.""" + entities: "Entities" + tools: "Tools" indexing: "Indexing" governance: "Governance" datasources: "Datasources" @@ -52,6 +56,8 @@ class Glean(BaseSDK): _sub_sdk_map = { "client": ("glean.api_client.client", "Client"), "authentication": ("glean.api_client.authentication", "Authentication"), + "entities": ("glean.api_client.entities", "Entities"), + "tools": ("glean.api_client.tools", "Tools"), "indexing": ("glean.api_client.indexing", "Indexing"), "governance": ("glean.api_client.governance", "Governance"), "datasources": ("glean.api_client.datasources", "Datasources"), diff --git a/src/glean/api_client/tools.py b/src/glean/api_client/tools.py index 5acff61e..5fb9c7d1 100644 --- a/src/glean/api_client/tools.py +++ b/src/glean/api_client/tools.py @@ -6,24 +6,27 @@ from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response -from typing import Dict, List, Mapping, Optional, Union +from typing import Mapping, Optional class Tools(BaseSDK): - def list( + def get_action_auth_status( self, *, - tool_names: Optional[List[str]] = None, + action_pack_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.ToolsListResponse: - r"""List available tools + ) -> models.ActionAuthStatusResponse: + r"""Get end-user authentication status for an action pack. - Returns a filtered set of available tools based on optional tool name parameters. If no filters are provided, all available tools are returned. + Reports whether the calling user is already authenticated against the third-party + tool backing the specified action pack. Intended for headless / server-driven clients + that render an \"Authorize\" prompt when the user has not yet consented to the tool. - :param tool_names: Optional array of tool names to filter by + + :param action_pack_id: ID of the action pack to query or authorize. :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 @@ -39,18 +42,18 @@ def list( else: base_url = self._get_url(base_url, url_variables) - request = models.GetRestAPIV1ToolsListRequest( - tool_names=tool_names, + request = models.GetActionAuthStatusRequest( + action_pack_id=action_pack_id, ) req = self._build_request( method="GET", - path="/rest/api/v1/tools/list", + path="/rest/api/v1/actions/{actionPackId}/auth", base_url=base_url, url_variables=url_variables, request=request, request_body_required=False, - request_has_path_params=False, + request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", @@ -72,7 +75,7 @@ def list( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="get_/rest/api/v1/tools/list", + operation_id="getActionAuthStatus", oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security @@ -84,7 +87,7 @@ def list( ) if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.ToolsListResponse, http_res) + return unmarshal_json_response(models.ActionAuthStatusResponse, http_res) if utils.match_response(http_res, ["400", "401", "404", "429", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) raise errors.GleanError("API error occurred", http_res, http_res_text) @@ -94,20 +97,23 @@ def list( raise errors.GleanError("Unexpected response received", http_res) - async def list_async( + async def get_action_auth_status_async( self, *, - tool_names: Optional[List[str]] = None, + action_pack_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.ToolsListResponse: - r"""List available tools + ) -> models.ActionAuthStatusResponse: + r"""Get end-user authentication status for an action pack. + + Reports whether the calling user is already authenticated against the third-party + tool backing the specified action pack. Intended for headless / server-driven clients + that render an \"Authorize\" prompt when the user has not yet consented to the tool. - Returns a filtered set of available tools based on optional tool name parameters. If no filters are provided, all available tools are returned. - :param tool_names: Optional array of tool names to filter by + :param action_pack_id: ID of the action pack to query or authorize. :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 @@ -123,18 +129,18 @@ async def list_async( else: base_url = self._get_url(base_url, url_variables) - request = models.GetRestAPIV1ToolsListRequest( - tool_names=tool_names, + request = models.GetActionAuthStatusRequest( + action_pack_id=action_pack_id, ) req = self._build_request_async( method="GET", - path="/rest/api/v1/tools/list", + path="/rest/api/v1/actions/{actionPackId}/auth", base_url=base_url, url_variables=url_variables, request=request, request_body_required=False, - request_has_path_params=False, + request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", @@ -156,7 +162,7 @@ async def list_async( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="get_/rest/api/v1/tools/list", + operation_id="getActionAuthStatus", oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security @@ -168,7 +174,7 @@ async def list_async( ) if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.ToolsListResponse, http_res) + return unmarshal_json_response(models.ActionAuthStatusResponse, http_res) if utils.match_response(http_res, ["400", "401", "404", "429", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.GleanError("API error occurred", http_res, http_res_text) @@ -178,25 +184,31 @@ async def list_async( raise errors.GleanError("Unexpected response received", http_res) - def run( + def authorize_action( self, *, - name: str, - parameters: Union[ - Dict[str, models.ToolsCallParameter], - Dict[str, models.ToolsCallParameterTypedDict], - ], + action_pack_id: str, + return_url: str, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.ToolsCallResponse: - r"""Execute the specified tool + ) -> models.AuthorizeActionResponse: + r"""Start the OAuth authorization flow for an action pack. + + Starts the third-party OAuth flow for the specified action pack and returns the + redirect URL that the client should navigate the end user to. After the OAuth + callback completes, the user's browser is redirected back to `returnUrl` with a + status query parameter (`?glean_action_auth=success|error&actionPackId=...`). + + `returnUrl` must match the tenant's configured return URL allowlist; otherwise the + request is rejected with 400. + - Execute the specified tool with provided parameters + :param action_pack_id: ID of the action pack to query or authorize. + :param return_url: URL on the customer's domain to redirect the end user's browser back to after the third-party OAuth + callback completes. Must be present in the tenant's return URL allowlist. - :param name: Required name of the tool to execute - :param parameters: The parameters for the tool. Each key is the name of the parameter and the value is the parameter object. :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 @@ -212,28 +224,32 @@ def run( else: base_url = self._get_url(base_url, url_variables) - request = models.ToolsCallRequest( - name=name, - parameters=utils.get_pydantic_model( - parameters, Dict[str, models.ToolsCallParameter] + request = models.AuthorizeActionRequestRequest( + action_pack_id=action_pack_id, + authorize_action_request=models.AuthorizeActionRequest( + return_url=return_url, ), ) req = self._build_request( method="POST", - path="/rest/api/v1/tools/call", + path="/rest/api/v1/actions/{actionPackId}/auth", base_url=base_url, url_variables=url_variables, request=request, request_body_required=True, - request_has_path_params=False, + request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request, False, False, "json", models.ToolsCallRequest + request.authorize_action_request, + False, + False, + "json", + models.AuthorizeActionRequest, ), allow_empty_value=None, timeout_ms=timeout_ms, @@ -251,7 +267,7 @@ def run( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="post_/rest/api/v1/tools/call", + operation_id="authorizeAction", oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security @@ -263,8 +279,10 @@ def run( ) if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.ToolsCallResponse, http_res) - if utils.match_response(http_res, ["400", "401", "404", "429", "4XX"], "*"): + return unmarshal_json_response(models.AuthorizeActionResponse, http_res) + if utils.match_response( + http_res, ["400", "401", "403", "404", "429", "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", "*"): @@ -273,25 +291,31 @@ def run( raise errors.GleanError("Unexpected response received", http_res) - async def run_async( + async def authorize_action_async( self, *, - name: str, - parameters: Union[ - Dict[str, models.ToolsCallParameter], - Dict[str, models.ToolsCallParameterTypedDict], - ], + action_pack_id: str, + return_url: str, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.ToolsCallResponse: - r"""Execute the specified tool + ) -> models.AuthorizeActionResponse: + r"""Start the OAuth authorization flow for an action pack. + + Starts the third-party OAuth flow for the specified action pack and returns the + redirect URL that the client should navigate the end user to. After the OAuth + callback completes, the user's browser is redirected back to `returnUrl` with a + status query parameter (`?glean_action_auth=success|error&actionPackId=...`). + + `returnUrl` must match the tenant's configured return URL allowlist; otherwise the + request is rejected with 400. - Execute the specified tool with provided parameters - :param name: Required name of the tool to execute - :param parameters: The parameters for the tool. Each key is the name of the parameter and the value is the parameter object. + :param action_pack_id: ID of the action pack to query or authorize. + :param return_url: URL on the customer's domain to redirect the end user's browser back to after the third-party OAuth + callback completes. Must be present in the tenant's return URL allowlist. + :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 @@ -307,28 +331,32 @@ async def run_async( else: base_url = self._get_url(base_url, url_variables) - request = models.ToolsCallRequest( - name=name, - parameters=utils.get_pydantic_model( - parameters, Dict[str, models.ToolsCallParameter] + request = models.AuthorizeActionRequestRequest( + action_pack_id=action_pack_id, + authorize_action_request=models.AuthorizeActionRequest( + return_url=return_url, ), ) req = self._build_request_async( method="POST", - path="/rest/api/v1/tools/call", + path="/rest/api/v1/actions/{actionPackId}/auth", base_url=base_url, url_variables=url_variables, request=request, request_body_required=True, - request_has_path_params=False, + request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request, False, False, "json", models.ToolsCallRequest + request.authorize_action_request, + False, + False, + "json", + models.AuthorizeActionRequest, ), allow_empty_value=None, timeout_ms=timeout_ms, @@ -346,7 +374,7 @@ async def run_async( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="post_/rest/api/v1/tools/call", + operation_id="authorizeAction", oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security @@ -358,8 +386,10 @@ async def run_async( ) if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.ToolsCallResponse, http_res) - if utils.match_response(http_res, ["400", "401", "404", "429", "4XX"], "*"): + return unmarshal_json_response(models.AuthorizeActionResponse, http_res) + if utils.match_response( + http_res, ["400", "401", "403", "404", "429", "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", "*"): diff --git a/tests/mockserver/internal/handler/generated_handlers.go b/tests/mockserver/internal/handler/generated_handlers.go index 4eaa2afa..4307188a 100644 --- a/tests/mockserver/internal/handler/generated_handlers.go +++ b/tests/mockserver/internal/handler/generated_handlers.go @@ -12,12 +12,15 @@ import ( // GeneratedHandlers returns all generated handlers. func GeneratedHandlers(ctx context.Context, dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) []*GeneratedHandler { return []*GeneratedHandler{ + NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/actions/{actionPackId}/auth", pathGetRestAPIV1ActionsActionPackIDAuth(dir, 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)), + NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/people/{person_id}/photo", pathGetRestAPIV1PeoplePersonIDPhoto(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/tools/list", pathGetRestAPIV1ToolsList(dir, rt)), NewGeneratedHandler(ctx, http.MethodPatch, "/rest/api/v1/configure/datasources/{datasourceId}/instances/{instanceId}", pathPatchRestAPIV1ConfigureDatasourcesDatasourceIDInstancesInstanceID(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/adddatasource", pathPostAPIIndexV1Adddatasource(dir, rt)), @@ -45,6 +48,7 @@ func GeneratedHandlers(ctx context.Context, dir *logging.HTTPFileDirectory, rt * NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/processallmemberships", pathPostAPIIndexV1Processallmemberships(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/rotatetoken", pathPostAPIIndexV1Rotatetoken(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/updatepermissions", pathPostAPIIndexV1Updatepermissions(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/actions/{actionPackId}/auth", pathPostRestAPIV1ActionsActionPackIDAuth(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/activity", pathPostRestAPIV1Activity(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/addcollectionitems", pathPostRestAPIV1Addcollectionitems(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/addverificationreminder", pathPostRestAPIV1Addverificationreminder(dir, rt)), @@ -57,6 +61,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/pathgetrestapiv1actionsactionpackidauth.go b/tests/mockserver/internal/handler/pathgetrestapiv1actionsactionpackidauth.go new file mode 100644 index 00000000..3527eedd --- /dev/null +++ b/tests/mockserver/internal/handler/pathgetrestapiv1actionsactionpackidauth.go @@ -0,0 +1,65 @@ +// 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 pathGetRestAPIV1ActionsActionPackIDAuth(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 "getActionAuthStatus[0]": + dir.HandlerFunc("getActionAuthStatus", testGetActionAuthStatusGetActionAuthStatus0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testGetActionAuthStatusGetActionAuthStatus0(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.ActionAuthStatusResponse = &components.ActionAuthStatusResponse{ + Authenticated: true, + AuthType: components.ActionAuthTypeAuthAdmin, + } + 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/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/pathgetrestapiv1peoplepersonidphoto.go b/tests/mockserver/internal/handler/pathgetrestapiv1peoplepersonidphoto.go new file mode 100644 index 00000000..253b4d87 --- /dev/null +++ b/tests/mockserver/internal/handler/pathgetrestapiv1peoplepersonidphoto.go @@ -0,0 +1,51 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/handler/values" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetRestAPIV1PeoplePersonIDPhoto(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 "getPersonPhoto[0]": + dir.HandlerFunc("getPersonPhoto", testGetPersonPhotoGetPersonPhoto0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testGetPersonPhotoGetPersonPhoto0(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{"image/jpeg;q=1", "image/png;q=0"}); 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 + } + respBodyBytes := values.ReadFileToBytes("./testdata/example.file") + w.Header().Set("Content-Type", "image/png") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1actionsactionpackidauth.go b/tests/mockserver/internal/handler/pathpostrestapiv1actionsactionpackidauth.go new file mode 100644 index 00000000..b88fe0b1 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1actionsactionpackidauth.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 pathPostRestAPIV1ActionsActionPackIDAuth(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 "authorizeAction[0]": + dir.HandlerFunc("authorizeAction", testAuthorizeActionAuthorizeAction0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testAuthorizeActionAuthorizeAction0(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.AuthorizeActionResponse = &components.AuthorizeActionResponse{ + RedirectURL: "https://possible-hamburger.info", + } + 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/actionauthstatusresponse.go b/tests/mockserver/internal/sdk/models/components/actionauthstatusresponse.go new file mode 100644 index 00000000..81a31a9c --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/actionauthstatusresponse.go @@ -0,0 +1,28 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ActionAuthStatusResponse struct { + // Whether the calling user is already authenticated to the tool backing the action pack. + Authenticated bool `json:"authenticated"` + // Authentication mechanism used by an action pack. + // - `AUTH_USER_OAUTH`: Requires per-user OAuth consent to the third-party tool. + // - `AUTH_ADMIN`: Uses a service-account / admin-owned credential. End users do not authorize individually. + // - `AUTH_NONE`: Action pack requires no authentication. + // + AuthType ActionAuthType `json:"authType"` +} + +func (o *ActionAuthStatusResponse) GetAuthenticated() bool { + if o == nil { + return false + } + return o.Authenticated +} + +func (o *ActionAuthStatusResponse) GetAuthType() ActionAuthType { + if o == nil { + return ActionAuthType("") + } + return o.AuthType +} diff --git a/tests/mockserver/internal/sdk/models/components/actionauthtype.go b/tests/mockserver/internal/sdk/models/components/actionauthtype.go new file mode 100644 index 00000000..4547fc36 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/actionauthtype.go @@ -0,0 +1,41 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// ActionAuthType - Authentication mechanism used by an action pack. +// - `AUTH_USER_OAUTH`: Requires per-user OAuth consent to the third-party tool. +// - `AUTH_ADMIN`: Uses a service-account / admin-owned credential. End users do not authorize individually. +// - `AUTH_NONE`: Action pack requires no authentication. +type ActionAuthType string + +const ( + ActionAuthTypeAuthUserOauth ActionAuthType = "AUTH_USER_OAUTH" + ActionAuthTypeAuthAdmin ActionAuthType = "AUTH_ADMIN" + ActionAuthTypeAuthNone ActionAuthType = "AUTH_NONE" +) + +func (e ActionAuthType) ToPointer() *ActionAuthType { + return &e +} +func (e *ActionAuthType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "AUTH_USER_OAUTH": + fallthrough + case "AUTH_ADMIN": + fallthrough + case "AUTH_NONE": + *e = ActionAuthType(v) + return nil + default: + return fmt.Errorf("invalid value for ActionAuthType: %v", v) + } +} 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/agentsinsightsv2request.go b/tests/mockserver/internal/sdk/models/components/agentsinsightsv2request.go index 30af15e6..83467d6a 100644 --- a/tests/mockserver/internal/sdk/models/components/agentsinsightsv2request.go +++ b/tests/mockserver/internal/sdk/models/components/agentsinsightsv2request.go @@ -7,7 +7,9 @@ type AgentsInsightsV2Request struct { AgentIds []string `json:"agentIds,omitempty"` // Departments for which Insights are requested. Departments []string `json:"departments,omitempty"` - DayRange *Period `json:"dayRange,omitempty"` + // Manager emails whose teams should be filtered for. Empty array means no filtering. + ManagerEmails []string `json:"managerEmails,omitempty"` + DayRange *Period `json:"dayRange,omitempty"` } func (o *AgentsInsightsV2Request) GetAgentIds() []string { @@ -24,6 +26,13 @@ func (o *AgentsInsightsV2Request) GetDepartments() []string { return o.Departments } +func (o *AgentsInsightsV2Request) GetManagerEmails() []string { + if o == nil { + return nil + } + return o.ManagerEmails +} + func (o *AgentsInsightsV2Request) GetDayRange() *Period { if o == nil { return nil 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/authorizeactionrequest.go b/tests/mockserver/internal/sdk/models/components/authorizeactionrequest.go new file mode 100644 index 00000000..ace14d53 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/authorizeactionrequest.go @@ -0,0 +1,17 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type AuthorizeActionRequest struct { + // URL on the customer's domain to redirect the end user's browser back to after the third-party OAuth + // callback completes. Must be present in the tenant's return URL allowlist. + // + ReturnURL string `json:"returnUrl"` +} + +func (o *AuthorizeActionRequest) GetReturnURL() string { + if o == nil { + return "" + } + return o.ReturnURL +} diff --git a/tests/mockserver/internal/sdk/models/components/authorizeactionresponse.go b/tests/mockserver/internal/sdk/models/components/authorizeactionresponse.go new file mode 100644 index 00000000..de6dc429 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/authorizeactionresponse.go @@ -0,0 +1,17 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type AuthorizeActionResponse struct { + // URL that the customer UI should navigate the end user to in order to begin the third-party OAuth flow. + // After the user consents, control returns to `returnUrl` from the request. + // + RedirectURL string `json:"redirectUrl"` +} + +func (o *AuthorizeActionResponse) GetRedirectURL() string { + if o == nil { + return "" + } + return o.RedirectURL +} 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..7d39e7b3 100644 --- a/tests/mockserver/internal/sdk/models/components/feedentry.go +++ b/tests/mockserver/internal/sdk/models/components/feedentry.go @@ -100,11 +100,15 @@ const ( JustificationTypeActiveDiscussion JustificationType = "ACTIVE_DISCUSSION" JustificationTypeMidDayCatchUp JustificationType = "MID_DAY_CATCH_UP" JustificationTypeQuerySuggestion JustificationType = "QUERY_SUGGESTION" + JustificationTypeCoworkCujPromo JustificationType = "COWORK_CUJ_PROMO" JustificationTypeWeeklyMeetings JustificationType = "WEEKLY_MEETINGS" JustificationTypeFollowUp JustificationType = "FOLLOW_UP" JustificationTypeMilestoneTimelineCheck JustificationType = "MILESTONE_TIMELINE_CHECK" JustificationTypeProjectDiscussionDigest JustificationType = "PROJECT_DISCUSSION_DIGEST" + JustificationTypeProjectFocusBlock JustificationType = "PROJECT_FOCUS_BLOCK" JustificationTypeProjectNextStep JustificationType = "PROJECT_NEXT_STEP" + JustificationTypeDemoCard JustificationType = "DEMO_CARD" + JustificationTypeOooPlanner JustificationType = "OOO_PLANNER" ) func (e JustificationType) ToPointer() *JustificationType { @@ -204,6 +208,8 @@ func (e *JustificationType) UnmarshalJSON(data []byte) error { fallthrough case "QUERY_SUGGESTION": fallthrough + case "COWORK_CUJ_PROMO": + fallthrough case "WEEKLY_MEETINGS": fallthrough case "FOLLOW_UP": @@ -212,7 +218,13 @@ func (e *JustificationType) UnmarshalJSON(data []byte) error { fallthrough case "PROJECT_DISCUSSION_DIGEST": fallthrough + case "PROJECT_FOCUS_BLOCK": + fallthrough case "PROJECT_NEXT_STEP": + fallthrough + case "DEMO_CARD": + fallthrough + case "OOO_PLANNER": *e = JustificationType(v) return nil default: diff --git a/tests/mockserver/internal/sdk/models/components/feedrequest.go b/tests/mockserver/internal/sdk/models/components/feedrequest.go index 50f12942..2d13b7e1 100644 --- a/tests/mockserver/internal/sdk/models/components/feedrequest.go +++ b/tests/mockserver/internal/sdk/models/components/feedrequest.go @@ -41,11 +41,15 @@ const ( FeedRequestCategoryStarterKit FeedRequestCategory = "STARTER_KIT" FeedRequestCategoryMidDayCatchUp FeedRequestCategory = "MID_DAY_CATCH_UP" FeedRequestCategoryQuerySuggestion FeedRequestCategory = "QUERY_SUGGESTION" + FeedRequestCategoryCoworkCujPromo FeedRequestCategory = "COWORK_CUJ_PROMO" FeedRequestCategoryWeeklyMeetings FeedRequestCategory = "WEEKLY_MEETINGS" FeedRequestCategoryFollowUp FeedRequestCategory = "FOLLOW_UP" FeedRequestCategoryMilestoneTimelineCheck FeedRequestCategory = "MILESTONE_TIMELINE_CHECK" FeedRequestCategoryProjectDiscussionDigest FeedRequestCategory = "PROJECT_DISCUSSION_DIGEST" + FeedRequestCategoryProjectFocusBlock FeedRequestCategory = "PROJECT_FOCUS_BLOCK" FeedRequestCategoryProjectNextStep FeedRequestCategory = "PROJECT_NEXT_STEP" + FeedRequestCategoryDemoCard FeedRequestCategory = "DEMO_CARD" + FeedRequestCategoryOooPlanner FeedRequestCategory = "OOO_PLANNER" ) func (e FeedRequestCategory) ToPointer() *FeedRequestCategory { @@ -119,6 +123,8 @@ func (e *FeedRequestCategory) UnmarshalJSON(data []byte) error { fallthrough case "QUERY_SUGGESTION": fallthrough + case "COWORK_CUJ_PROMO": + fallthrough case "WEEKLY_MEETINGS": fallthrough case "FOLLOW_UP": @@ -127,7 +133,13 @@ func (e *FeedRequestCategory) UnmarshalJSON(data []byte) error { fallthrough case "PROJECT_DISCUSSION_DIGEST": fallthrough + case "PROJECT_FOCUS_BLOCK": + fallthrough case "PROJECT_NEXT_STEP": + fallthrough + case "DEMO_CARD": + fallthrough + case "OOO_PLANNER": *e = FeedRequestCategory(v) return nil default: diff --git a/tests/mockserver/internal/sdk/models/components/feedresult.go b/tests/mockserver/internal/sdk/models/components/feedresult.go index 55bc99d4..3b247e2d 100644 --- a/tests/mockserver/internal/sdk/models/components/feedresult.go +++ b/tests/mockserver/internal/sdk/models/components/feedresult.go @@ -42,11 +42,15 @@ const ( FeedResultCategoryStarterKit FeedResultCategory = "STARTER_KIT" FeedResultCategoryMidDayCatchUp FeedResultCategory = "MID_DAY_CATCH_UP" FeedResultCategoryQuerySuggestion FeedResultCategory = "QUERY_SUGGESTION" + FeedResultCategoryCoworkCujPromo FeedResultCategory = "COWORK_CUJ_PROMO" FeedResultCategoryWeeklyMeetings FeedResultCategory = "WEEKLY_MEETINGS" FeedResultCategoryFollowUp FeedResultCategory = "FOLLOW_UP" FeedResultCategoryMilestoneTimelineCheck FeedResultCategory = "MILESTONE_TIMELINE_CHECK" FeedResultCategoryProjectDiscussionDigest FeedResultCategory = "PROJECT_DISCUSSION_DIGEST" + FeedResultCategoryProjectFocusBlock FeedResultCategory = "PROJECT_FOCUS_BLOCK" FeedResultCategoryProjectNextStep FeedResultCategory = "PROJECT_NEXT_STEP" + FeedResultCategoryDemoCard FeedResultCategory = "DEMO_CARD" + FeedResultCategoryOooPlanner FeedResultCategory = "OOO_PLANNER" ) func (e FeedResultCategory) ToPointer() *FeedResultCategory { @@ -120,6 +124,8 @@ func (e *FeedResultCategory) UnmarshalJSON(data []byte) error { fallthrough case "QUERY_SUGGESTION": fallthrough + case "COWORK_CUJ_PROMO": + fallthrough case "WEEKLY_MEETINGS": fallthrough case "FOLLOW_UP": @@ -128,7 +134,13 @@ func (e *FeedResultCategory) UnmarshalJSON(data []byte) error { fallthrough case "PROJECT_DISCUSSION_DIGEST": fallthrough + case "PROJECT_FOCUS_BLOCK": + fallthrough case "PROJECT_NEXT_STEP": + fallthrough + case "DEMO_CARD": + fallthrough + case "OOO_PLANNER": *e = FeedResultCategory(v) return nil default: diff --git a/tests/mockserver/internal/sdk/models/components/insightsassistantrequest.go b/tests/mockserver/internal/sdk/models/components/insightsassistantrequest.go index 6d54c660..29a882de 100644 --- a/tests/mockserver/internal/sdk/models/components/insightsassistantrequest.go +++ b/tests/mockserver/internal/sdk/models/components/insightsassistantrequest.go @@ -5,7 +5,9 @@ package components type InsightsAssistantRequest struct { // Departments for which Insights are requested. Departments []string `json:"departments,omitempty"` - DayRange *Period `json:"dayRange,omitempty"` + // Manager emails whose teams should be filtered for. Empty array means no filtering. + ManagerEmails []string `json:"managerEmails,omitempty"` + DayRange *Period `json:"dayRange,omitempty"` } func (o *InsightsAssistantRequest) GetDepartments() []string { @@ -15,6 +17,13 @@ func (o *InsightsAssistantRequest) GetDepartments() []string { return o.Departments } +func (o *InsightsAssistantRequest) GetManagerEmails() []string { + if o == nil { + return nil + } + return o.ManagerEmails +} + func (o *InsightsAssistantRequest) GetDayRange() *Period { if o == nil { 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/insightsoverviewrequest.go b/tests/mockserver/internal/sdk/models/components/insightsoverviewrequest.go index 79e6d2e9..5e903919 100644 --- a/tests/mockserver/internal/sdk/models/components/insightsoverviewrequest.go +++ b/tests/mockserver/internal/sdk/models/components/insightsoverviewrequest.go @@ -5,7 +5,9 @@ package components type InsightsOverviewRequest struct { // Departments for which Insights are requested. Departments []string `json:"departments,omitempty"` - DayRange *Period `json:"dayRange,omitempty"` + // Manager emails whose teams should be filtered for. Empty array means no filtering. + ManagerEmails []string `json:"managerEmails,omitempty"` + DayRange *Period `json:"dayRange,omitempty"` } func (o *InsightsOverviewRequest) GetDepartments() []string { @@ -15,6 +17,13 @@ func (o *InsightsOverviewRequest) GetDepartments() []string { return o.Departments } +func (o *InsightsOverviewRequest) GetManagerEmails() []string { + if o == nil { + return nil + } + return o.ManagerEmails +} + func (o *InsightsOverviewRequest) GetDayRange() *Period { if o == nil { return nil 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..ef9a081c --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/mcpbreakdowninsightsrequest.go @@ -0,0 +1,115 @@ +// 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"` + // Manager emails whose teams should be filtered for. Empty array means no filtering. + ManagerEmails []string `json:"managerEmails,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) GetManagerEmails() []string { + if o == nil { + return nil + } + return o.ManagerEmails +} + +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/components/workflow.go b/tests/mockserver/internal/sdk/models/components/workflow.go index 94feae3f..32301d9b 100644 --- a/tests/mockserver/internal/sdk/models/components/workflow.go +++ b/tests/mockserver/internal/sdk/models/components/workflow.go @@ -11,9 +11,12 @@ type Workflow struct { // Server Unix timestamp of the last update time. LastUpdateTimestamp *int64 `json:"lastUpdateTimestamp,omitempty"` // Server Unix timestamp of the last time the draft was saved. - LastDraftSavedAt *int64 `json:"lastDraftSavedAt,omitempty"` - LastUpdatedBy *Person `json:"lastUpdatedBy,omitempty"` - Permissions *ObjectPermissions `json:"permissions,omitempty"` + LastDraftSavedAt *int64 `json:"lastDraftSavedAt,omitempty"` + LastDraftSavedBy *Person `json:"lastDraftSavedBy,omitempty"` + // ID of the VCS user (e.g. GitHub username) who last saved the draft. Set only by the draft save path via the external Git integration API. + LastDraftGitAuthorID *string `json:"lastDraftGitAuthorId,omitempty"` + LastUpdatedBy *Person `json:"lastUpdatedBy,omitempty"` + Permissions *ObjectPermissions `json:"permissions,omitempty"` // The ID of the workflow. ID *string `json:"id,omitempty"` } @@ -53,6 +56,20 @@ func (o *Workflow) GetLastDraftSavedAt() *int64 { return o.LastDraftSavedAt } +func (o *Workflow) GetLastDraftSavedBy() *Person { + if o == nil { + return nil + } + return o.LastDraftSavedBy +} + +func (o *Workflow) GetLastDraftGitAuthorID() *string { + if o == nil { + return nil + } + return o.LastDraftGitAuthorID +} + func (o *Workflow) GetLastUpdatedBy() *Person { if o == nil { return nil diff --git a/tests/mockserver/internal/sdk/models/operations/authorizeaction.go b/tests/mockserver/internal/sdk/models/operations/authorizeaction.go new file mode 100644 index 00000000..8569a4e2 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/authorizeaction.go @@ -0,0 +1,47 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type AuthorizeActionRequest struct { + // ID of the action pack to query or authorize. + ActionPackID string `pathParam:"style=simple,explode=false,name=actionPackId"` + Body components.AuthorizeActionRequest `request:"mediaType=application/json"` +} + +func (o *AuthorizeActionRequest) GetActionPackID() string { + if o == nil { + return "" + } + return o.ActionPackID +} + +func (o *AuthorizeActionRequest) GetBody() components.AuthorizeActionRequest { + if o == nil { + return components.AuthorizeActionRequest{} + } + return o.Body +} + +type AuthorizeActionResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful operation + AuthorizeActionResponse *components.AuthorizeActionResponse +} + +func (o *AuthorizeActionResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *AuthorizeActionResponse) GetAuthorizeActionResponse() *components.AuthorizeActionResponse { + if o == nil { + return nil + } + return o.AuthorizeActionResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/getactionauthstatus.go b/tests/mockserver/internal/sdk/models/operations/getactionauthstatus.go new file mode 100644 index 00000000..2b09522d --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/getactionauthstatus.go @@ -0,0 +1,39 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type GetActionAuthStatusRequest struct { + // ID of the action pack to query or authorize. + ActionPackID string `pathParam:"style=simple,explode=false,name=actionPackId"` +} + +func (o *GetActionAuthStatusRequest) GetActionPackID() string { + if o == nil { + return "" + } + return o.ActionPackID +} + +type GetActionAuthStatusResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful operation + ActionAuthStatusResponse *components.ActionAuthStatusResponse +} + +func (o *GetActionAuthStatusResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetActionAuthStatusResponse) GetActionAuthStatusResponse() *components.ActionAuthStatusResponse { + if o == nil { + return nil + } + return o.ActionAuthStatusResponse +} 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/getpersonphoto.go b/tests/mockserver/internal/sdk/models/operations/getpersonphoto.go new file mode 100644 index 00000000..4d865674 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/getpersonphoto.go @@ -0,0 +1,69 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "io" + "mockserver/internal/sdk/models/components" +) + +type GetPersonPhotoRequest struct { + // The obfuscated ID of the person whose photo to retrieve. + PersonID string `pathParam:"style=simple,explode=false,name=person_id"` + // Optional datasource override for crawled photos (e.g. AZURE, GDRIVE, OKTA). When omitted, the datasource is derived from the person's stored photo URL or the deployment's primary person datasource. + // + Ds *string `queryParam:"style=form,explode=true,name=ds"` +} + +func (o *GetPersonPhotoRequest) GetPersonID() string { + if o == nil { + return "" + } + return o.PersonID +} + +func (o *GetPersonPhotoRequest) GetDs() *string { + if o == nil { + return nil + } + return o.Ds +} + +type GetPersonPhotoResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Photo bytes returned successfully. + // The Close method must be called on this field, even if it is not used, to prevent resource leaks. + TwoHundredImagePngResponseStream io.ReadCloser + // Photo bytes returned successfully. + // The Close method must be called on this field, even if it is not used, to prevent resource leaks. + TwoHundredImageJpegResponseStream io.ReadCloser + Headers map[string][]string +} + +func (o *GetPersonPhotoResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetPersonPhotoResponse) GetTwoHundredImagePngResponseStream() io.ReadCloser { + if o == nil { + return nil + } + return o.TwoHundredImagePngResponseStream +} + +func (o *GetPersonPhotoResponse) GetTwoHundredImageJpegResponseStream() io.ReadCloser { + if o == nil { + return nil + } + return o.TwoHundredImageJpegResponseStream +} + +func (o *GetPersonPhotoResponse) GetHeaders() map[string][]string { + if o == nil { + return map[string][]string{} + } + return o.Headers +} 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_entities.py b/tests/test_entities.py index 04ba72dd..c6b986f4 100644 --- a/tests/test_entities.py +++ b/tests/test_entities.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from glean.api_client import Glean, models +from glean.api_client.entities import GetPersonPhotoAcceptEnum import os import pytest from tests.test_client import create_test_http_client @@ -63,3 +64,19 @@ def test_entities_people(): ) def test_entities_teams(): pass + + +def test_entities_get_person_photo(): + test_http_client = create_test_http_client("getPersonPhoto") + + 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.entities.get_person_photo( + person_id="", accept_header_override=GetPersonPhotoAcceptEnum.IMAGE_PNG + ) + assert res is not None diff --git a/tests/test_messages.py b/tests/test_messages.py index 36643db3..c0fd29da 100644 --- a/tests/test_messages.py +++ b/tests/test_messages.py @@ -18,7 +18,7 @@ def test_messages_messages(): res = glean.client.messages.retrieve( id_type=models.IDType.CONVERSATION_ID, id="", - datasource=models.Datasource.MICROSOFTTEAMS, + datasource=models.Datasource.SLACK, timestamp_millis=558834, ) assert res is not None diff --git a/tests/test_summarize.py b/tests/test_summarize.py index 3f56a110..2b5d1f38 100644 --- a/tests/test_summarize.py +++ b/tests/test_summarize.py @@ -18,12 +18,11 @@ def test_summarize_summarize(): res = glean.client.documents.summarize( document_specs=[ { - "ugc_type": models.DocumentSpecUgcType2.ANNOUNCEMENTS, + "ugc_type": models.DocumentSpecUgcType2.ARTIFACTS, "ugc_id": "", }, { - "ugc_type": models.DocumentSpecUgcType2.ANNOUNCEMENTS, - "ugc_id": "", + "id": "", }, ] ) diff --git a/tests/test_tools.py b/tests/test_tools.py index 1d25eef8..0524d040 100644 --- a/tests/test_tools.py +++ b/tests/test_tools.py @@ -39,3 +39,33 @@ def test_tools_post_rest_api_v1_tools_call(): }, ) assert res is not None + + +def test_tools_get_action_auth_status(): + test_http_client = create_test_http_client("getActionAuthStatus") + + 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.tools.get_action_auth_status(action_pack_id="") + assert res is not None + + +def test_tools_authorize_action(): + test_http_client = create_test_http_client("authorizeAction") + + 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.tools.authorize_action( + action_pack_id="", return_url="https://irresponsible-trick.name/" + ) + assert res is not None From 88d86f3d626e47df93a64cca0b929adcd32c5f50 Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Thu, 7 May 2026 11:22:44 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow