From f0df3c8920d4e75b1a64d717690585fab8048745 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Fri, 10 Jul 2026 16:32:24 +0000 Subject: [PATCH 1/2] ## Python SDK Changes: * `glean.client.chat.create()`: * `request.messages[].fragments[]` **Changed** * `response.messages[].fragments[]` **Changed** * `glean.client.chat.retrieve()`: `response.chat_result.chat.messages[].fragments[]` **Changed** * `glean.client.chat.create_stream()`: * `request.messages[].fragments[]` **Changed** --- .speakeasy/gen.lock | 160 ++++++++++++------ .speakeasy/gen.yaml | 2 +- .speakeasy/glean-merged-spec.yaml | 148 +++++++++++++++- .speakeasy/tests.arazzo.yaml | 3 - .speakeasy/workflow.lock | 12 +- RELEASES.md | 12 +- docs/models/actionpreview.md | 11 ++ docs/models/authcontext.md | 11 ++ docs/models/chatmessagefragment.md | 20 ++- docs/models/grantscope.md | 23 +++ docs/models/listentitiesrequest.md | 2 +- ...e.md => listentitiesrequestrequesttype.md} | 6 +- docs/models/platformsearchrequest.md | 18 +- docs/models/servertoolrequest.md | 13 ++ docs/models/servertoolrequestrequesttype.md | 22 +++ docs/models/servertoolresponse.md | 27 +++ docs/models/servertoolresponserequesttype.md | 22 +++ docs/sdks/entities/README.md | 4 +- docs/sdks/search/README.md | 23 ++- pyproject.toml | 2 +- src/glean/api_client/_version.py | 6 +- src/glean/api_client/entities.py | 8 +- src/glean/api_client/models/__init__.py | 41 ++++- src/glean/api_client/models/actionpreview.py | 42 +++++ src/glean/api_client/models/authcontext.py | 44 +++++ .../api_client/models/chatmessagefragment.py | 44 +++++ .../api_client/models/listentitiesrequest.py | 8 +- .../api_client/models/servertoolrequest.py | 102 +++++++++++ .../api_client/models/servertoolresponse.py | 149 ++++++++++++++++ .../pathpostrestapiv1createcollection.go | 20 +-- .../sdk/models/components/actionpreview.go | 25 +++ .../sdk/models/components/authcontext.go | 16 ++ .../models/components/chatmessagefragment.go | 32 +++- .../models/components/listentitiesrequest.go | 20 +-- .../models/components/servertoolrequest.go | 97 +++++++++++ .../models/components/servertoolresponse.go | 143 ++++++++++++++++ tests/test_entities.py | 2 +- tests/test_messages.py | 2 +- tests/test_search.py | 4 - tests/test_summarize.py | 7 +- 40 files changed, 1203 insertions(+), 150 deletions(-) create mode 100644 docs/models/actionpreview.md create mode 100644 docs/models/authcontext.md create mode 100644 docs/models/grantscope.md rename docs/models/{requesttype.md => listentitiesrequestrequesttype.md} (61%) create mode 100644 docs/models/servertoolrequest.md create mode 100644 docs/models/servertoolrequestrequesttype.md create mode 100644 docs/models/servertoolresponse.md create mode 100644 docs/models/servertoolresponserequesttype.md create mode 100644 src/glean/api_client/models/actionpreview.py create mode 100644 src/glean/api_client/models/authcontext.py create mode 100644 src/glean/api_client/models/servertoolrequest.py create mode 100644 src/glean/api_client/models/servertoolresponse.py create mode 100644 tests/mockserver/internal/sdk/models/components/actionpreview.go create mode 100644 tests/mockserver/internal/sdk/models/components/authcontext.go create mode 100644 tests/mockserver/internal/sdk/models/components/servertoolrequest.go create mode 100644 tests/mockserver/internal/sdk/models/components/servertoolresponse.go diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 040f92c5..c51cfcac 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 3e3290ca-0ee8-4981-b1bc-14536048fa63 management: - docChecksum: d810ce32845f4c2f67f6f7a0ef8a3dce + docChecksum: 33958fda4f2b946f46f0593aac3a619d docVersion: 0.9.0 - speakeasyVersion: 1.789.0 - generationVersion: 2.916.2 - releaseVersion: 0.15.2 - configChecksum: 05845a5e3fac1b5914b13a72aac189ac + speakeasyVersion: 1.789.2 + generationVersion: 2.916.4 + releaseVersion: 0.15.3 + configChecksum: b53cb756010d5e6e2f41d4dd168ca9c2 repoURL: https://github.com/gleanwork/api-client-python.git installationURL: https://github.com/gleanwork/api-client-python.git published: true persistentEdits: - generation_id: 996c83eb-67df-45cd-90f6-aaba7cf326b7 - pristine_commit_hash: bcac9138de97b8d384310b5f9d38495fe3a41eb3 - pristine_tree_hash: 0d48eb2b22f15933e4a98d6d198a1d6235bfcf4d + generation_id: 64feca36-97de-4a5e-848b-c8c117e455ea + pristine_commit_hash: ae9a83387550bcfedd89703e319f60d876adeb80 + pristine_tree_hash: 669cc3c3cd50adba9fd64d758d1014c3ab2b44a3 features: python: acceptHeaders: 3.0.0 @@ -105,6 +105,10 @@ trackedFiles: id: f9e31988def9 last_write_checksum: sha1:765093f3bb92679552cd425206653065235f08f9 pristine_git_object: af0cfc2eb55c65f7d424ee10654d824c968af9f8 + docs/models/actionpreview.md: + id: 794647b3310a + last_write_checksum: sha1:16c32dc560ebfcaa76478139fefc3e2940b4a7eb + pristine_git_object: 1f46c6b53386dd344b1b3af0b4ec7214b54f4d33 docs/models/actionsummary.md: id: 1ff225176066 last_write_checksum: sha1:e1adfabd2ed131a1414cb6b86495ad3116bb95df @@ -301,6 +305,10 @@ trackedFiles: id: 631104fca2c6 last_write_checksum: sha1:cf868619375d419c3e69d7b536c2a9bd58975734 pristine_git_object: 0427eb93de1eeb4305c60569a4c72c92987de17d + docs/models/authcontext.md: + id: 458c8700cfa0 + last_write_checksum: sha1:068e18a2377e9c1de199140f034eef0132458431 + pristine_git_object: e861d79b68d3c689bca4f94af16572b105a0108e docs/models/author.md: id: b4139065dbed last_write_checksum: sha1:015462f693083cc40f7c88d90621ec5613fcd98a @@ -471,8 +479,8 @@ trackedFiles: pristine_git_object: 842f2730c228c5816c872437f067f59fddc6023c docs/models/chatmessagefragment.md: id: 9f4738df6b1b - last_write_checksum: sha1:c1579999ebb97ae544c1dbc1c9df2f5cfd9d0e65 - pristine_git_object: f7de9397bbdbc53cd8b41821b9f34e33d69bf653 + last_write_checksum: sha1:7f004324dfbdb6182e010a2e0121d9ad026f9c5c + pristine_git_object: 1a6f0ed225844450fb6ea131033c438d5eb60eb3 docs/models/chatmetadata.md: id: 04d1111a98ac last_write_checksum: sha1:3e94025fd78eea7b18064ba4b5741bec7286e912 @@ -1665,6 +1673,10 @@ trackedFiles: id: 740a53de1e0a last_write_checksum: sha1:6f0d12e70708144b4978da20cccda528785c9e0d pristine_git_object: ac3f4c6c2acd8442c8686be4839c70d17ac0b8d2 + docs/models/grantscope.md: + id: 43e7d3a82fd3 + last_write_checksum: sha1:8c7331d70f108f34fbf320c25156d29eb25e8a58 + pristine_git_object: 372a2faf28d750d8aaad0c7b47c2834e3051ed65 docs/models/granttype.md: id: c3d5681ac7bd last_write_checksum: sha1:b0129abfff6f0d70b545c8a39bc9a6a20a1499cf @@ -1871,8 +1883,8 @@ trackedFiles: pristine_git_object: 351bb2b615a924d3be9f37bb6123ef8a4948f653 docs/models/listentitiesrequest.md: id: 561ac207e315 - last_write_checksum: sha1:da4bf06589b74036707459c5e5a6cf0ce9d8fe3f - pristine_git_object: c4ac2d31d21b0682eb015401a23eccb068314e3f + last_write_checksum: sha1:a2cda4e4a713cfdd479403bd9c52267a5ff7d24c + pristine_git_object: c91150c02b373f963ba1e13133f8e949490281b2 docs/models/listentitiesrequestentitytype.md: id: 15ec59436444 last_write_checksum: sha1:cb7f4664f81d08d7a6961e6bf931059a4ab34d43 @@ -1885,6 +1897,10 @@ trackedFiles: id: cfcc2081e0ed last_write_checksum: sha1:3023b6615096f5c018efb1b43524499b662094ae pristine_git_object: ec6cdd0169b604153c648926101d1925d254676a + docs/models/listentitiesrequestrequesttype.md: + id: e3a09d204704 + last_write_checksum: sha1:23756193ecc46493046a80629408204e19bb8ffd + pristine_git_object: 27ba5bb470d1190e8fdf0f42b49e69b0cf16154f docs/models/listentitiesresponse.md: id: 795662eb1108 last_write_checksum: sha1:b8b4d3b76ff95441aa3ef08babaaad0239807cfa @@ -2235,8 +2251,8 @@ trackedFiles: pristine_git_object: e9b2cd6a291372feb2023cc2896f9aad75c400a6 docs/models/platformsearchrequest.md: id: 9f3be4029289 - last_write_checksum: sha1:a1a8aed36a18bdaee8e115d80f09f9100e39ba09 - pristine_git_object: 1acc3f70ce920146b58f5aff4bdc70fed6fdf045 + last_write_checksum: sha1:5a163a68ccc04dd0a7f8fb8e75c41e39eceef100 + pristine_git_object: 30ff66c03c2b88bb2ec72e7a7f4dfa135d21d8f6 docs/models/platformsearchresponse.md: id: b20c8f7128fc last_write_checksum: sha1:958639d5fa5b446156df39fd5f69b6c57265f13a @@ -2401,10 +2417,6 @@ trackedFiles: id: c6d3311eea79 last_write_checksum: sha1:cb11955a7ece754400f4fd1a09a4586945a6e9b3 pristine_git_object: fbbf6879eb3a324a311927d99fe558be1da01b65 - docs/models/requesttype.md: - id: 2e3b600ad04d - last_write_checksum: sha1:1f4f2b3f882695f70cc0655c6013e35e295e05a2 - pristine_git_object: 2d050701a58976f2076a0b9bd970a844c98ea22b docs/models/responsebody1.md: id: f324bedb3b30 last_write_checksum: sha1:998f6661be7e3d24c165ddcf3cc2c2c85d4de195 @@ -2549,6 +2561,22 @@ trackedFiles: id: 3ee71d33a4d7 last_write_checksum: sha1:e8354d546d4580055c9be0803efad0dcc6c1b7f2 pristine_git_object: 7f825e04ad8edef5297451309815f20ef1a3ba0b + docs/models/servertoolrequest.md: + id: 319c925f5963 + last_write_checksum: sha1:ed068a6b20d2c56ee9a993e9cc0f2160892bb6f2 + pristine_git_object: 180a4193ec93c68e238c6618ecd50a4f7bd67e84 + docs/models/servertoolrequestrequesttype.md: + id: 06e29cd74eb4 + last_write_checksum: sha1:29be142660f33ad5ca2399f1da87f21c5757c503 + pristine_git_object: 7a1e67214279e73d186e24e24900a1834a96a416 + docs/models/servertoolresponse.md: + id: 533b7f497998 + last_write_checksum: sha1:991ff0a35963108d59aad7e0bad9c15b0ec05af5 + pristine_git_object: a29914c141c0dce838c27ab19deb3e13f5369807 + docs/models/servertoolresponserequesttype.md: + id: 55248e6ccbdb + last_write_checksum: sha1:7e5ddff2060ef3f7530874736499225d1cebaedc + pristine_git_object: ad53ed32a703ab9959503cdb5f28410a778a921d docs/models/sessioninfo.md: id: 4f35f0cd75e6 last_write_checksum: sha1:54947b191223cc0100d33978470ef085255e0b45 @@ -3047,8 +3075,8 @@ trackedFiles: pristine_git_object: adac51700d9683a41dffb2f5c20ee18008a9e135 docs/sdks/entities/README.md: id: a140ac5181b9 - last_write_checksum: sha1:816f2f81490ae04c99bc47a13b73f3123172b5b8 - pristine_git_object: 50f8adc450e41c936106eff16a8270de5f2599ab + last_write_checksum: sha1:10809d2b6e6f54f470b0bc742d287827a8e4a13e + pristine_git_object: 6c8c03c721d1c0a3bb16a5fd57241812eaa4af43 docs/sdks/findings/README.md: id: 7f7356eb9e9c last_write_checksum: sha1:31cec287b2a5668e3f3bcf54173669c8a15aa292 @@ -3103,8 +3131,8 @@ trackedFiles: pristine_git_object: 5dd26e03b79389a3e71e90f9a3ce29b7fa384dd9 docs/sdks/search/README.md: id: 5c534716244c - last_write_checksum: sha1:a26315c9618ca312f9f2ce1f7ef63f5b131aad39 - pristine_git_object: 6ee4030db167df0a2c0146c712f65c8efdb3eb68 + last_write_checksum: sha1:4d8def390ef8fa9ed86c89d16d54283263f18849 + pristine_git_object: 04d61f7683d46497cb5eb0c511aa5c31f524a95d docs/sdks/tools/README.md: id: 044286549bac last_write_checksum: sha1:a4916d6065377693c59cfbe6ff5072e83f204965 @@ -3127,8 +3155,8 @@ trackedFiles: pristine_git_object: 79e388be87446ab6a4064b372bad0e8376d0cb5e pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:274f6abe53180c51a4595b5bb91cd183df2f2611 - pristine_git_object: a5d4d8d27c4fcef73cb3c0180ee3b32dede0c760 + last_write_checksum: sha1:94c46596dba6babef7e197851675efefed28b972 + pristine_git_object: 9cb2c0bd22be5f56f9c9835a6cd259c92f99eb6d scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:c2c83f71dea61eb50c9e05da83b16d18b4da8794 @@ -3155,8 +3183,8 @@ trackedFiles: pristine_git_object: 55f23c1feabfedeb7e8cd5bea8b910f0ae0b77d9 src/glean/api_client/_version.py: id: 0ce22b26136b - last_write_checksum: sha1:a76ff61eb6ab064e77e8d700e0ce5873e1807dec - pristine_git_object: 5309d82e948d43abb1b28627de1375b58389c37c + last_write_checksum: sha1:3b12e625296b8c8ed92b3fd3a301a395c3316c79 + pristine_git_object: 75a78e98a80eedad79c903a0c99dd8f51609db25 src/glean/api_client/agents.py: id: b925701a9217 last_write_checksum: sha1:d80196ac5b252a938055308b99efa4830a763ea6 @@ -3227,8 +3255,8 @@ trackedFiles: pristine_git_object: 1187e013fddc68f46bf0601237a4d8d6ba878e41 src/glean/api_client/entities.py: id: 38ebbab2f8a0 - last_write_checksum: sha1:1989da79fa5ffe440188a6fc3138324369f4000f - pristine_git_object: f90b9ae8d55a5bd44aab1e05c49bb66423523cb4 + last_write_checksum: sha1:bd52afae4d0b4d60e85189a4f6b999c280128329 + pristine_git_object: adc08d2771a312d55750096248b0f1a82d0432d0 src/glean/api_client/errors/__init__.py: id: 88bbd5450191 last_write_checksum: sha1:14e809dc56f3433b9234d42efe82ade97f2b59de @@ -3323,8 +3351,8 @@ trackedFiles: pristine_git_object: 77016bfff6209866592fd8b42f2f3527f900992b src/glean/api_client/models/__init__.py: id: d5f6ea5efcbe - last_write_checksum: sha1:a7f23dd82201f2797ea6ea8c2cdd36b650a8b2d7 - pristine_git_object: 715c7a49dc50d95ee497805c47635200986bec1a + last_write_checksum: sha1:d6520fa7653f76cf0e819e323fa084a0fe2595ab + pristine_git_object: 536e42f53c2aa8071025788f425b3b6da2fd1903 src/glean/api_client/models/actionauthtype.py: id: c7402f35092d last_write_checksum: sha1:7aaa5d1c11b105d0d7265e2a83cb005aafa89645 @@ -3337,6 +3365,10 @@ trackedFiles: id: ebe853584e07 last_write_checksum: sha1:8a47e278fb43b3b87e16b7c2550dd8d6d518c365 pristine_git_object: 512b9f6f3489b6a7a6fd936e145beb7fead6a840 + src/glean/api_client/models/actionpreview.py: + id: 035b3a169f75 + last_write_checksum: sha1:c09e5f7d3e1edd09572070088c1071712a752bb2 + pristine_git_object: 8aada5450c888c40a6e4dd70cdc41f774e551c9a src/glean/api_client/models/actionsummary.py: id: 34ccdf9f1526 last_write_checksum: sha1:cfefc6678a5612dc8d50f2b0074dc54bb88e00e0 @@ -3477,6 +3509,10 @@ trackedFiles: id: 9e88a246ee36 last_write_checksum: sha1:e25f69a5ddae03308bdbc2391ce3449de236b4ed pristine_git_object: f01e07f8513fdb529c333b6bccf6d5114ee80cc0 + src/glean/api_client/models/authcontext.py: + id: e5ed1f25d2ff + last_write_checksum: sha1:666912fbc5907c277024f56996d0b1e7511299f1 + pristine_git_object: a184a4fc5b4cfae17b741ec13e9d6d84d6b2965d src/glean/api_client/models/authorizeactionpackop.py: id: 8cdd6426922e last_write_checksum: sha1:318527d68494b4fc6c65d9235486feb54e8bec52 @@ -3615,8 +3651,8 @@ trackedFiles: pristine_git_object: e1e0b0b463b7dfdfeb2bd765cd67d0b57ea7caf8 src/glean/api_client/models/chatmessagefragment.py: id: 86344b2c1c3d - last_write_checksum: sha1:2392b86cce1778d331813a1355430f2665ab9ab2 - pristine_git_object: a7d3bf333c791320d449d7b49eaa850a0134aade + last_write_checksum: sha1:0a9e72b24f34fce355b038bfe71685bc2373fd75 + pristine_git_object: a8d3093ba7d9f481f265f0a94a407bb6b0bb6c6d src/glean/api_client/models/chatmetadata.py: id: 0469e4eebd69 last_write_checksum: sha1:6665183f9ae42b7258ed3b47d8bedbad19c5c7f7 @@ -4775,8 +4811,8 @@ trackedFiles: pristine_git_object: c64939c3d9029fbd5ef6d06a1fd63341cbbc3e37 src/glean/api_client/models/listentitiesrequest.py: id: 80b3dc9dfe99 - last_write_checksum: sha1:96f5c285b5972f0bed1ceb952d15983df1d3ade6 - pristine_git_object: 699e39c20ce0f71475c7664f3609ce771143db33 + last_write_checksum: sha1:1001bb54755827104cbc2c94e795dad4d0538b83 + pristine_git_object: 74911f035ccc4cf3e2995f00a66200b3c13bc8ca src/glean/api_client/models/listentitiesresponse.py: id: 8cbc0b717442 last_write_checksum: sha1:5e7e8d4251e63106adcdf4bf256d55ed7b9d8ecb @@ -5297,6 +5333,14 @@ trackedFiles: id: 6d9d1a461507 last_write_checksum: sha1:46bfc2535d5d097c56a89af5e3c7e966d4760d45 pristine_git_object: 61ec44733bdc5ae0deb7b9c710f42b67246990d8 + src/glean/api_client/models/servertoolrequest.py: + id: 68e8f4700c18 + last_write_checksum: sha1:b5e17e1e4bfaa80ea7d67de11eeb9a330ef2134a + pristine_git_object: 2e1f8e5351447ffec48f4f640f0c4fe0637f58fb + src/glean/api_client/models/servertoolresponse.py: + id: 48123cc8f7a6 + last_write_checksum: sha1:b4df3fbbf54189a5896bd50a4001050d3263d236 + pristine_git_object: 90ec004987f466c63a193d05eade090fa4f90dc1 src/glean/api_client/models/sessioninfo.py: id: 4127a11bdfbc last_write_checksum: sha1:109e98c476f5bf747e35b7051e2702961c518167 @@ -6071,8 +6115,8 @@ trackedFiles: pristine_git_object: ab9263d43404e8e6f07af222a3e785aca2fbf35f tests/mockserver/internal/handler/pathpostrestapiv1createcollection.go: id: 3fb93a419933 - last_write_checksum: sha1:14b4a1d98dd55ce2b487ae1aaab4a7dece08df25 - pristine_git_object: 371b90231fcd7bd77fd6d9566156605af1712d9a + last_write_checksum: sha1:f9f4c718408bddadbdf826194f07970bb111e57e + pristine_git_object: 5c99a0ada5302c8f64c0e5da5683fa8bd9e9975d tests/mockserver/internal/handler/pathpostrestapiv1createshortcut.go: id: 8d9d3abb0c34 last_write_checksum: sha1:dcdf684a85e20db1aee571db9a54a3ee259d71d5 @@ -6313,6 +6357,10 @@ trackedFiles: id: ad34672435c4 last_write_checksum: sha1:578df01f6d9f140122c63b6b9b2b01cda1ad6280 pristine_git_object: b5d719827a698757158580e277482bb8a7a00238 + tests/mockserver/internal/sdk/models/components/actionpreview.go: + id: b59786e4fa6d + last_write_checksum: sha1:89544c34cccc3a130fc95b1981eacb57a9c2772a + pristine_git_object: facf42ad976803e2f4299f89902efc5ec3bd8bef tests/mockserver/internal/sdk/models/components/actionsummary.go: id: f7930cfbea89 last_write_checksum: sha1:32cfaf32c20b96fe223b11c6150435d39c9be8da @@ -6441,6 +6489,10 @@ trackedFiles: id: 450c27df20a3 last_write_checksum: sha1:e9e386e4a0c3ea918f1a2b332f91a129d77ac307 pristine_git_object: 483958ea708faa6e36081ef83b4c528441313815 + tests/mockserver/internal/sdk/models/components/authcontext.go: + id: 563a8dbb8e8c + last_write_checksum: sha1:72fc3805afb81247d0f04899dcec35e9e3710803 + pristine_git_object: 1b2c97ab3035a7f4dc344a387243d9152a5f409a tests/mockserver/internal/sdk/models/components/authorizeactionpackrequest.go: id: 6aa135032c9b last_write_checksum: sha1:4c85e9cc50180f07d2857be440bae9f465f5f468 @@ -6567,8 +6619,8 @@ trackedFiles: pristine_git_object: ba07ad7ae4afd9e658815a526e41aefbb9f854f0 tests/mockserver/internal/sdk/models/components/chatmessagefragment.go: id: 8d14e05d6934 - last_write_checksum: sha1:1834d9a43544e8cca44d147a1e2f99e120fb09ae - pristine_git_object: 4a0507c9eec0ef8e77fe81e62b063f85250c3704 + last_write_checksum: sha1:d41f5568b67d2f41291d7fc880ef28fad6d59a72 + pristine_git_object: 632727b0852cefdc9b6ce1267faeddd4b164a1d0 tests/mockserver/internal/sdk/models/components/chatmetadata.go: id: 53881e1500d3 last_write_checksum: sha1:2069155b9191362259f87a10f5eb7426b3bad1b8 @@ -7507,8 +7559,8 @@ trackedFiles: pristine_git_object: 25f297b597a1dfa563907db00601e89cd55c39f1 tests/mockserver/internal/sdk/models/components/listentitiesrequest.go: id: 1dbbb5c24982 - last_write_checksum: sha1:c181794849c1e7b456fb3ed65c7714c84ebfe2d2 - pristine_git_object: 339c8ffc83e3566eedfa5189bd9c3a37c274b795 + last_write_checksum: sha1:4af794e5bfaa93d0b8894e83a4ed66089ccc906a + pristine_git_object: a742d389e6e500312fef3867a228df6a28bb1b13 tests/mockserver/internal/sdk/models/components/listentitiesresponse.go: id: 55ea0386c2bc last_write_checksum: sha1:a8a1457db48b2ff8d44cc065f02c66d69cff2ad5 @@ -7949,6 +8001,14 @@ trackedFiles: id: b02d63c8519a last_write_checksum: sha1:20f1d2089955876f297f6effc3667f6ae84c5108 pristine_git_object: 207653771e5bb2ae5982853962b6318d8c83229f + tests/mockserver/internal/sdk/models/components/servertoolrequest.go: + id: 574fa6f36078 + last_write_checksum: sha1:6690ff38d976f82a1c585d4c9ab3cebfd1ad2828 + pristine_git_object: 3bf8c6b39892210207a22b82d84673f88b5659c1 + tests/mockserver/internal/sdk/models/components/servertoolresponse.go: + id: 621e6633f5d6 + last_write_checksum: sha1:4b508f1f965688a2066e0c4f61c03a9d736516e6 + pristine_git_object: f4b84c3b0ec23c99703c36f92065a4071d389743 tests/mockserver/internal/sdk/models/components/sessioninfo.go: id: 23183e4b8fb8 last_write_checksum: sha1:d0a7c3cb679745701743e6ec68c15cf72b3e0a2f @@ -8999,8 +9059,8 @@ trackedFiles: pristine_git_object: acec822d761f40906a287eee92200d1223caec4d tests/test_entities.py: id: 9bdc6c717c71 - last_write_checksum: sha1:18e7cd0747cfa504295b4fa7faa303379c6df060 - pristine_git_object: 6479bed7014476c3cb9dd326e5f6d5164a7ef4b5 + last_write_checksum: sha1:5434ff149c152629c761d981629bc1ebe88592ae + pristine_git_object: 4abcf8e7745ab76371c1c0dc0354cb794c01027f tests/test_findings.py: id: f4c91dfb4975 last_write_checksum: sha1:8c377b73f379ee056474bdc6a19e3d7d5d323ef4 @@ -9023,8 +9083,8 @@ trackedFiles: pristine_git_object: 6cc8aeec3c52329d389081db0a27f10f53f214b9 tests/test_messages.py: id: be23089b1f8b - last_write_checksum: sha1:b7415512608102fa07b1990a350a7da66946fe46 - pristine_git_object: 636f01d348f30db3ee81985044634511b615af16 + last_write_checksum: sha1:a91c985cd1d11560059dc448b10e0c7b75ed60e5 + pristine_git_object: dfdc18641f0d6c38d84b4603ad2da71f75f2e13c tests/test_people.py: id: 37c243940039 last_write_checksum: sha1:7c7268ffeebe48d81ed25e9b1cfc3a395abf5c1f @@ -9043,12 +9103,12 @@ trackedFiles: pristine_git_object: 3fa82f944c8693f534f71d96c489225c3f65cb5d tests/test_search.py: id: dd86606b335f - last_write_checksum: sha1:b6af23349a18b4e0ef1795c729fc04560060ee76 - pristine_git_object: e8c5284c48f176453cea23043502af55cac7df1a + last_write_checksum: sha1:b7c2a96a3d765d1498f9fe08dffc59cc4c8822ac + pristine_git_object: 3925a6e0f49d8e0b1b35ec08c38283a5643ed307 tests/test_summarize.py: id: a255d8a6f627 - last_write_checksum: sha1:8880f40a7c62cc87c1eed2b5180893c13ea021b3 - pristine_git_object: 8763da581da72f8aefe52080dd2fd95c5cbf3aa3 + last_write_checksum: sha1:6383d6969c6f1bf1832e5ace511e5c2ffaa6d86f + pristine_git_object: cac8e9788f25fda1ff78bd2e3e36917319145e82 tests/test_tools.py: id: 70889bdf7321 last_write_checksum: sha1:d26d83639f731281bb518886f10571c7b0dbf935 @@ -10031,7 +10091,7 @@ examples: platform-search: speakeasy-default-platform-search: requestBody: - application/json: {"query": "quarterly planning 2026", "page_size": 10, "datasources": ["confluence", "google_drive"], "datasource_instances": ["slack_acme", "slack_eu"], "filters": [{"field": "type", "values": ["spreadsheet", "presentation"]}]} + application/json: {"query": "quarterly planning 2026", "page_size": 10, "datasources": ["confluence", "google_drive"], "filters": [{"field": "type", "values": ["spreadsheet", "presentation"]}]} responses: "200": application/json: {"results": [], "has_more": false, "next_cursor": "", "request_id": ""} @@ -10226,7 +10286,7 @@ generatedTests: platform-search: "2026-07-02T17:48:17Z" getToolServerAuthStatus: "2026-07-08T02:46:37Z" authorizeToolServer: "2026-07-08T02:46:37Z" -releaseNotes: "## Python SDK Changes:\n* `glean.client.tools.retrieve_tool_server_auth_status()`: **Added**\n* `glean.client.tools.authorize_tool_server()`: **Added**\n* `glean.client.search.retrieve_feed()`: \n * `request.categories[].enum(admin_health_center)` **Added**\n * `response.results[]` **Changed**\n" +releaseNotes: "## Python SDK Changes:\n* `glean.client.chat.create()`: \n * `request.messages[].fragments[]` **Changed**\n * `response.messages[].fragments[]` **Changed**\n* `glean.client.chat.retrieve()`: `response.chat_result.chat.messages[].fragments[]` **Changed**\n* `glean.client.chat.create_stream()`: \n * `request.messages[].fragments[]` **Changed**\n" generatedFiles: - .devcontainer/README.md - .devcontainer/devcontainer.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 41262171..10919310 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -34,7 +34,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: true python: - version: 0.15.2 + version: 0.15.3 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/glean-merged-spec.yaml b/.speakeasy/glean-merged-spec.yaml index a3dfce76..a1f493a7 100644 --- a/.speakeasy/glean-merged-spec.yaml +++ b/.speakeasy/glean-merged-spec.yaml @@ -2,8 +2,8 @@ openapi: 3.0.0 info: version: "0.9.0" title: Glean API - x-source-commit-sha: 1ccc408fdb2c210e136239b5b42a53c7b9b4abe5 - x-open-api-commit-sha: 1bf9887187c8200b2881b1768fc50ae4fae41796 + x-source-commit-sha: 270b693d49bac2f68e751b2345bac0c267741119 + x-open-api-commit-sha: 592aec2b4913505edb8161645eaf9a72b5286f20 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. @@ -5533,12 +5533,21 @@ components: additionalProperties: false required: - query + example: + query: quarterly planning 2026 + datasources: + - confluence + - google_drive + filters: + - field: type + values: + - spreadsheet + - presentation properties: query: type: string description: | The search query string. Supports inline operators such as `from:jane type:document app:confluence`. Inline operators are AND'd with structured `filters`. - example: quarterly planning 2026 page_size: type: integer minimum: 1 @@ -5556,18 +5565,12 @@ components: type: string description: | Restrict results to specific datasources. Requests must not specify both `datasources` and `datasource_instances`. - example: - - confluence - - google_drive datasource_instances: type: array items: type: string description: | Restrict results to specific datasource instances. Values are datasource instance identifiers returned by `GET /api/search/filters`. Requests must not specify both `datasources` and `datasource_instances`. - example: - - slack_acme - - slack_eu filters: type: array items: @@ -9713,6 +9716,127 @@ components: additionalProperties: $ref: '#/components/schemas/WriteActionParameter' description: Parameters supported by the tool. + ServerToolBase: + type: object + properties: + requestType: + type: string + enum: + - EXECUTION + - AUTHENTICATION_SUGGESTION + - VOTE_SUGGESTION + description: The type of request made to the user. + x-enumDescriptions: + EXECUTION: Request for approving execution of the tool. + AUTHENTICATION_SUGGESTION: Request for authenticating to a tool, provided as a (tool) suggestion. + VOTE_SUGGESTION: Suggestion to vote for enabling an available-but-not-enabled tool. + x-speakeasy-enum-descriptions: + EXECUTION: Request for approving execution of the tool. + AUTHENTICATION_SUGGESTION: Request for authenticating to a tool, provided as a (tool) suggestion. + VOTE_SUGGESTION: Suggestion to vote for enabling an available-but-not-enabled tool. + requestId: + type: string + description: Unique identifier for this request. + required: + - toolType + - requestType + - requestId + x-visibility: Preview + x-glean-experimental: + id: 4e3ee791-45e0-4125-845f-4b7701aa983c + introduced: "2026-07-02" + ActionPreview: + properties: + markdown: + type: string + description: Markdown preview describing what the action will do. + description: + type: string + description: Short summary of what this specific tool invocation will do. + description: Preview information for an action being executed. + ServerToolRequest: + allOf: + - $ref: '#/components/schemas/ServerToolBase' + - type: object + properties: + toolDisplayName: + type: string + description: Human-readable display name for the tool. + serverId: + type: string + description: | + Unique identifier of the tool server. Use with GET /tool-servers/{serverId}/auth + to resolve display information and authentication status. + toolCta: + type: string + description: Custom call-to-action (CTA) verb for the approval button (e.g., "Create", "Update", "Send"). + actionPreview: + $ref: '#/components/schemas/ActionPreview' + description: Preview information for this tool request. + required: + - toolName + x-visibility: Preview + x-glean-experimental: + id: 8544e887-4569-4b14-bde0-d1be9e90dbc3 + introduced: "2026-07-02" + AuthContext: + type: object + properties: + serverId: + type: string + description: ID of the MCP server (populated when toolType is MCP). + description: | + Context for authentication responses, containing identifiers for the entity being authenticated. + x-visibility: Preview + x-glean-experimental: + id: a7c1d3e5-9f42-4b8a-b6e0-2d4f8a1c3e5b + introduced: "2026-07-09" + ServerToolResponse: + allOf: + - $ref: '#/components/schemas/ServerToolBase' + - type: object + properties: + isGranted: + type: boolean + description: Whether tool request is granted (indicates approval for execution, or completion for auth). + grantScope: + type: string + enum: + - CURRENT_REQUEST + - CURRENT_SESSION + - ALWAYS + description: | + Scope of the approval grant. Only applicable when isGranted is true and requestType is EXECUTION. + default: CURRENT_REQUEST + x-enumDescriptions: + CURRENT_REQUEST: Approve only the current tool request. Future tool execution requests still require approval. + CURRENT_SESSION: Approve the current tool request and auto-approve all future same tool requests in this chat session. + ALWAYS: Approve the current tool request and auto-approve all future same tool requests across all chat sessions. + x-speakeasy-enum-descriptions: + CURRENT_REQUEST: Approve only the current tool request. Future tool execution requests still require approval. + CURRENT_SESSION: Approve the current tool request and auto-approve all future same tool requests in this chat session. + ALWAYS: Approve the current tool request and auto-approve all future same tool requests across all chat sessions. + authContext: + $ref: '#/components/schemas/AuthContext' + description: Context for AUTHENTICATION_SUGGESTION responses. Required when requestType is AUTHENTICATION_SUGGESTION. + description: | + Response to a server tool request. The applicable fields depend on requestType: + + For EXECUTION requests: + - isGranted: whether tool execution is approved + - reason: optional explanation + + For AUTHENTICATION_SUGGESTION requests: + - isGranted: whether auth completed successfully (true=connected, false=skipped) + - authContext: contains serverId or actionPackId for identifying the authenticated entity + - reason: optional explanation for skip + + For VOTE_SUGGESTION requests: + - voted: whether the user voted for this tool + x-visibility: Preview + x-glean-experimental: + id: 3eae3ee7-2c06-4027-be14-98260a3ce608 + introduced: "2026-07-02" ChatMessageFragment: allOf: - $ref: '#/components/schemas/Result' @@ -9732,6 +9856,12 @@ components: citation: $ref: '#/components/schemas/ChatMessageCitation' description: Inline citation. + serverToolRequest: + $ref: '#/components/schemas/ServerToolRequest' + description: request to run a tool on server. + serverToolResponse: + $ref: '#/components/schemas/ServerToolResponse' + description: response corresponding to the server tool request. description: Represents a part of a ChatMessage that originates from a single action/tool. It is designed to support rich data formats beyond simple text, allowing for a more dynamic and interactive chat experience. Each fragment can include various types of content, such as text, search queries, action information, and more. Also, each ChatMessageFragment should only have one of structuredResults, querySuggestion, writeAction, followupAction, agentRecommendation, followupRoutingSuggestion or file. ChatMessage: properties: diff --git a/.speakeasy/tests.arazzo.yaml b/.speakeasy/tests.arazzo.yaml index 8c5152a9..14e7687a 100644 --- a/.speakeasy/tests.arazzo.yaml +++ b/.speakeasy/tests.arazzo.yaml @@ -158806,9 +158806,6 @@ workflows: requestBody: contentType: application/json payload: - datasource_instances: - - slack_acme - - slack_eu datasources: - confluence - google_drive diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index f77ae612..4a110f2e 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.789.0 +speakeasyVersion: 1.789.2 sources: Glean API: sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:38135f10206267ef24935fe6f997edba535c1d95313a1bfd30066f791e2f692b - sourceBlobDigest: sha256:cabd9d3d8eb34d9f7324632354255e5b224c05443dd6f8f27094c47cd4839d01 + sourceRevisionDigest: sha256:145236c33451e6e87cf1507a4d8829678b0df02af59afc9341330627e33ed760 + sourceBlobDigest: sha256:862b1370a65d146eac83f86c6fbd2d787f04ea93c2cf28259af5ded934f9fb3b tags: - latest Glean Client API: @@ -16,10 +16,10 @@ targets: glean: source: Glean API sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:38135f10206267ef24935fe6f997edba535c1d95313a1bfd30066f791e2f692b - sourceBlobDigest: sha256:cabd9d3d8eb34d9f7324632354255e5b224c05443dd6f8f27094c47cd4839d01 + sourceRevisionDigest: sha256:145236c33451e6e87cf1507a4d8829678b0df02af59afc9341330627e33ed760 + sourceBlobDigest: sha256:862b1370a65d146eac83f86c6fbd2d787f04ea93c2cf28259af5ded934f9fb3b codeSamplesNamespace: glean-api-specs-python-code-samples - codeSamplesRevisionDigest: sha256:0c2ffb1bbb551c0718176c53dd5fdd322c6c78ec6ab0979f9469cfef459b051e + codeSamplesRevisionDigest: sha256:4a0a1ec3489f36483dc6080dacec4d40157b2e8d34be15e06417ddfc2e4f090a workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/RELEASES.md b/RELEASES.md index 9a7321b9..4631a03d 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -788,4 +788,14 @@ Based on: ### Generated - [python v0.15.2] . ### Releases -- [PyPI v0.15.2] https://pypi.org/project/glean-api-client/0.15.2 - . \ No newline at end of file +- [PyPI v0.15.2] https://pypi.org/project/glean-api-client/0.15.2 - . + +## 2026-07-10 16:28:47 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.789.2 (2.916.4) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.15.3] . +### Releases +- [PyPI v0.15.3] https://pypi.org/project/glean-api-client/0.15.3 - . \ No newline at end of file diff --git a/docs/models/actionpreview.md b/docs/models/actionpreview.md new file mode 100644 index 00000000..1f46c6b5 --- /dev/null +++ b/docs/models/actionpreview.md @@ -0,0 +1,11 @@ +# ActionPreview + +Preview information for an action being executed. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `markdown` | *Optional[str]* | :heavy_minus_sign: | Markdown preview describing what the action will do. | +| `description` | *Optional[str]* | :heavy_minus_sign: | Short summary of what this specific tool invocation will do. | \ No newline at end of file diff --git a/docs/models/authcontext.md b/docs/models/authcontext.md new file mode 100644 index 00000000..e861d79b --- /dev/null +++ b/docs/models/authcontext.md @@ -0,0 +1,11 @@ +# AuthContext + +Context for authentication responses, containing identifiers for the entity being authenticated. + + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `server_id` | *Optional[str]* | :heavy_minus_sign: | ID of the MCP server (populated when toolType is MCP). | \ No newline at end of file diff --git a/docs/models/chatmessagefragment.md b/docs/models/chatmessagefragment.md index f7de9397..1a6f0ed2 100644 --- a/docs/models/chatmessagefragment.md +++ b/docs/models/chatmessagefragment.md @@ -5,12 +5,14 @@ Represents a part of a ChatMessage that originates from a single action/tool. It ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `structured_results` | List[[models.StructuredResult](../models/structuredresult.md)] | :heavy_minus_sign: | An array of entities in the work graph retrieved via a data request. | | -| `tracking_token` | *Optional[str]* | :heavy_minus_sign: | An opaque token that represents this particular result in this particular query. To be used for /feedback reporting. | | -| `text` | *Optional[str]* | :heavy_minus_sign: | N/A | | -| `query_suggestion` | [Optional[models.QuerySuggestion]](../models/querysuggestion.md) | :heavy_minus_sign: | N/A | {
"query": "app:github type:pull author:mortimer",
"label": "Mortimer's PRs",
"datasource": "github"
} | -| `file` | [Optional[models.ChatFile]](../models/chatfile.md) | :heavy_minus_sign: | Structure for file uploaded by a user for Chat. | | -| `action` | [Optional[models.ToolInfo]](../models/toolinfo.md) | :heavy_minus_sign: | N/A | | -| `citation` | [Optional[models.ChatMessageCitation]](../models/chatmessagecitation.md) | :heavy_minus_sign: | Information about the source for a ChatMessage. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `structured_results` | List[[models.StructuredResult](../models/structuredresult.md)] | :heavy_minus_sign: | An array of entities in the work graph retrieved via a data request. | | +| `tracking_token` | *Optional[str]* | :heavy_minus_sign: | An opaque token that represents this particular result in this particular query. To be used for /feedback reporting. | | +| `text` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `query_suggestion` | [Optional[models.QuerySuggestion]](../models/querysuggestion.md) | :heavy_minus_sign: | N/A | {
"query": "app:github type:pull author:mortimer",
"label": "Mortimer's PRs",
"datasource": "github"
} | +| `file` | [Optional[models.ChatFile]](../models/chatfile.md) | :heavy_minus_sign: | Structure for file uploaded by a user for Chat. | | +| `action` | [Optional[models.ToolInfo]](../models/toolinfo.md) | :heavy_minus_sign: | N/A | | +| `citation` | [Optional[models.ChatMessageCitation]](../models/chatmessagecitation.md) | :heavy_minus_sign: | Information about the source for a ChatMessage. | | +| `server_tool_request` | [Optional[models.ServerToolRequest]](../models/servertoolrequest.md) | :heavy_minus_sign: | N/A | | +| `server_tool_response` | [Optional[models.ServerToolResponse]](../models/servertoolresponse.md) | :heavy_minus_sign: | Response to a server tool request. The applicable fields depend on requestType:

For EXECUTION requests:
- isGranted: whether tool execution is approved
- reason: optional explanation

For AUTHENTICATION_SUGGESTION requests:
- isGranted: whether auth completed successfully (true=connected, false=skipped)
- authContext: contains serverId or actionPackId for identifying the authenticated entity
- reason: optional explanation for skip

For VOTE_SUGGESTION requests:
- voted: whether the user voted for this tool
| | \ No newline at end of file diff --git a/docs/models/grantscope.md b/docs/models/grantscope.md new file mode 100644 index 00000000..372a2faf --- /dev/null +++ b/docs/models/grantscope.md @@ -0,0 +1,23 @@ +# GrantScope + +Scope of the approval grant. Only applicable when isGranted is true and requestType is EXECUTION. + + +## Example Usage + +```python +from glean.api_client.models import GrantScope + +value = GrantScope.CURRENT_REQUEST + +# Open enum: unrecognized values are captured as UnrecognizedStr +``` + + +## Values + +| Name | Value | +| ----------------- | ----------------- | +| `CURRENT_REQUEST` | CURRENT_REQUEST | +| `CURRENT_SESSION` | CURRENT_SESSION | +| `ALWAYS` | ALWAYS | \ No newline at end of file diff --git a/docs/models/listentitiesrequest.md b/docs/models/listentitiesrequest.md index c4ac2d31..c91150c0 100644 --- a/docs/models/listentitiesrequest.md +++ b/docs/models/listentitiesrequest.md @@ -14,4 +14,4 @@ | `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. | | \ No newline at end of file +| `request_type` | [Optional[models.ListEntitiesRequestRequestType]](../models/listentitiesrequestrequesttype.md) | :heavy_minus_sign: | The type of request being made. | | \ No newline at end of file diff --git a/docs/models/requesttype.md b/docs/models/listentitiesrequestrequesttype.md similarity index 61% rename from docs/models/requesttype.md rename to docs/models/listentitiesrequestrequesttype.md index 2d050701..27ba5bb4 100644 --- a/docs/models/requesttype.md +++ b/docs/models/listentitiesrequestrequesttype.md @@ -1,13 +1,13 @@ -# RequestType +# ListEntitiesRequestRequestType The type of request being made. ## Example Usage ```python -from glean.api_client.models import RequestType +from glean.api_client.models import ListEntitiesRequestRequestType -value = RequestType.STANDARD +value = ListEntitiesRequestRequestType.STANDARD ``` diff --git a/docs/models/platformsearchrequest.md b/docs/models/platformsearchrequest.md index 1acc3f70..30ff66c0 100644 --- a/docs/models/platformsearchrequest.md +++ b/docs/models/platformsearchrequest.md @@ -3,12 +3,12 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `query` | *str* | :heavy_check_mark: | The search query string. Supports inline operators such as `from:jane type:document app:confluence`. Inline operators are AND'd with structured `filters`.
| quarterly planning 2026 | -| `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of results to return per page. | | -| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Opaque pagination token from a previous response's `next_cursor` field. Omit on the first request.
| | -| `datasources` | List[*str*] | :heavy_minus_sign: | Restrict results to specific datasources. Requests must not specify both `datasources` and `datasource_instances`.
| [
"confluence",
"google_drive"
] | -| `datasource_instances` | List[*str*] | :heavy_minus_sign: | Restrict results to specific datasource instances. Values are datasource instance identifiers returned by `GET /api/search/filters`. Requests must not specify both `datasources` and `datasource_instances`.
| [
"slack_acme",
"slack_eu"
] | -| `filters` | List[[models.PlatformFilter](../models/platformfilter.md)] | :heavy_minus_sign: | Structured filters applied to search results. Equality operators OR multiple values within a filter. Multiple filters are AND'd together, including range filters on the same field. Filters are AND'd with any inline operators in `query`. Note that conflicting constraints on the same field (e.g., `type:document` in the query and `type: spreadsheet` in a filter) produce an empty result set.
| | -| `time_range` | [Optional[models.PlatformTimeRange]](../models/platformtimerange.md) | :heavy_minus_sign: | Filter results to those last updated within this range. | | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `query` | *str* | :heavy_check_mark: | The search query string. Supports inline operators such as `from:jane type:document app:confluence`. Inline operators are AND'd with structured `filters`.
| +| `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of results to return per page. | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Opaque pagination token from a previous response's `next_cursor` field. Omit on the first request.
| +| `datasources` | List[*str*] | :heavy_minus_sign: | Restrict results to specific datasources. Requests must not specify both `datasources` and `datasource_instances`.
| +| `datasource_instances` | List[*str*] | :heavy_minus_sign: | Restrict results to specific datasource instances. Values are datasource instance identifiers returned by `GET /api/search/filters`. Requests must not specify both `datasources` and `datasource_instances`.
| +| `filters` | List[[models.PlatformFilter](../models/platformfilter.md)] | :heavy_minus_sign: | Structured filters applied to search results. Equality operators OR multiple values within a filter. Multiple filters are AND'd together, including range filters on the same field. Filters are AND'd with any inline operators in `query`. Note that conflicting constraints on the same field (e.g., `type:document` in the query and `type: spreadsheet` in a filter) produce an empty result set.
| +| `time_range` | [Optional[models.PlatformTimeRange]](../models/platformtimerange.md) | :heavy_minus_sign: | Filter results to those last updated within this range. | \ No newline at end of file diff --git a/docs/models/servertoolrequest.md b/docs/models/servertoolrequest.md new file mode 100644 index 00000000..180a4193 --- /dev/null +++ b/docs/models/servertoolrequest.md @@ -0,0 +1,13 @@ +# ServerToolRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| `request_type` | [models.ServerToolRequestRequestType](../models/servertoolrequestrequesttype.md) | :heavy_check_mark: | The type of request made to the user. | +| `request_id` | *str* | :heavy_check_mark: | Unique identifier for this request. | +| `tool_display_name` | *Optional[str]* | :heavy_minus_sign: | Human-readable display name for the tool. | +| `server_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the tool server. Use with GET /tool-servers/{serverId}/auth
to resolve display information and authentication status.
| +| `tool_cta` | *Optional[str]* | :heavy_minus_sign: | Custom call-to-action (CTA) verb for the approval button (e.g., "Create", "Update", "Send"). | +| `action_preview` | [Optional[models.ActionPreview]](../models/actionpreview.md) | :heavy_minus_sign: | Preview information for an action being executed. | \ No newline at end of file diff --git a/docs/models/servertoolrequestrequesttype.md b/docs/models/servertoolrequestrequesttype.md new file mode 100644 index 00000000..7a1e6721 --- /dev/null +++ b/docs/models/servertoolrequestrequesttype.md @@ -0,0 +1,22 @@ +# ServerToolRequestRequestType + +The type of request made to the user. + +## Example Usage + +```python +from glean.api_client.models import ServerToolRequestRequestType + +value = ServerToolRequestRequestType.EXECUTION + +# Open enum: unrecognized values are captured as UnrecognizedStr +``` + + +## Values + +| Name | Value | +| --------------------------- | --------------------------- | +| `EXECUTION` | EXECUTION | +| `AUTHENTICATION_SUGGESTION` | AUTHENTICATION_SUGGESTION | +| `VOTE_SUGGESTION` | VOTE_SUGGESTION | \ No newline at end of file diff --git a/docs/models/servertoolresponse.md b/docs/models/servertoolresponse.md new file mode 100644 index 00000000..a29914c1 --- /dev/null +++ b/docs/models/servertoolresponse.md @@ -0,0 +1,27 @@ +# ServerToolResponse + +Response to a server tool request. The applicable fields depend on requestType: + +For EXECUTION requests: +- isGranted: whether tool execution is approved +- reason: optional explanation + +For AUTHENTICATION_SUGGESTION requests: +- isGranted: whether auth completed successfully (true=connected, false=skipped) +- authContext: contains serverId or actionPackId for identifying the authenticated entity +- reason: optional explanation for skip + +For VOTE_SUGGESTION requests: +- voted: whether the user voted for this tool + + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `request_type` | [models.ServerToolResponseRequestType](../models/servertoolresponserequesttype.md) | :heavy_check_mark: | The type of request made to the user. | +| `request_id` | *str* | :heavy_check_mark: | Unique identifier for this request. | +| `is_granted` | *Optional[bool]* | :heavy_minus_sign: | Whether tool request is granted (indicates approval for execution, or completion for auth). | +| `grant_scope` | [Optional[models.GrantScope]](../models/grantscope.md) | :heavy_minus_sign: | Scope of the approval grant. Only applicable when isGranted is true and requestType is EXECUTION.
| +| `auth_context` | [Optional[models.AuthContext]](../models/authcontext.md) | :heavy_minus_sign: | Context for authentication responses, containing identifiers for the entity being authenticated.
| \ No newline at end of file diff --git a/docs/models/servertoolresponserequesttype.md b/docs/models/servertoolresponserequesttype.md new file mode 100644 index 00000000..ad53ed32 --- /dev/null +++ b/docs/models/servertoolresponserequesttype.md @@ -0,0 +1,22 @@ +# ServerToolResponseRequestType + +The type of request made to the user. + +## Example Usage + +```python +from glean.api_client.models import ServerToolResponseRequestType + +value = ServerToolResponseRequestType.EXECUTION + +# Open enum: unrecognized values are captured as UnrecognizedStr +``` + + +## Values + +| Name | Value | +| --------------------------- | --------------------------- | +| `EXECUTION` | EXECUTION | +| `AUTHENTICATION_SUGGESTION` | AUTHENTICATION_SUGGESTION | +| `VOTE_SUGGESTION` | VOTE_SUGGESTION | \ No newline at end of file diff --git a/docs/sdks/entities/README.md b/docs/sdks/entities/README.md index 50f8adc4..6c8c03c7 100644 --- a/docs/sdks/entities/README.md +++ b/docs/sdks/entities/README.md @@ -38,7 +38,7 @@ with Glean( }, ], }, - ], entity_type=models.ListEntitiesRequestEntityType.PEOPLE, page_size=100, request_type=models.RequestType.STANDARD) + ], entity_type=models.ListEntitiesRequestEntityType.PEOPLE, page_size=100, request_type=models.ListEntitiesRequestRequestType.STANDARD) # Handle response print(res) @@ -59,7 +59,7 @@ with Glean( | `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. | | +| `request_type` | [Optional[models.ListEntitiesRequestRequestType]](../../models/listentitiesrequestrequesttype.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 diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md index 6ee4030d..04d61f76 100644 --- a/docs/sdks/search/README.md +++ b/docs/sdks/search/README.md @@ -26,9 +26,6 @@ with Glean( res = glean.search.query(query="quarterly planning 2026", page_size=10, datasources=[ "confluence", "google_drive", - ], datasource_instances=[ - "slack_acme", - "slack_eu", ], filters=[ { "field": "type", @@ -46,16 +43,16 @@ with Glean( ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `query` | *str* | :heavy_check_mark: | The search query string. Supports inline operators such as `from:jane type:document app:confluence`. Inline operators are AND'd with structured `filters`.
| quarterly planning 2026 | -| `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of results to return per page. | | -| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Opaque pagination token from a previous response's `next_cursor` field. Omit on the first request.
| | -| `datasources` | List[*str*] | :heavy_minus_sign: | Restrict results to specific datasources. Requests must not specify both `datasources` and `datasource_instances`.
| [
"confluence",
"google_drive"
] | -| `datasource_instances` | List[*str*] | :heavy_minus_sign: | Restrict results to specific datasource instances. Values are datasource instance identifiers returned by `GET /api/search/filters`. Requests must not specify both `datasources` and `datasource_instances`.
| [
"slack_acme",
"slack_eu"
] | -| `filters` | List[[models.PlatformFilter](../../models/platformfilter.md)] | :heavy_minus_sign: | Structured filters applied to search results. Equality operators OR multiple values within a filter. Multiple filters are AND'd together, including range filters on the same field. Filters are AND'd with any inline operators in `query`. Note that conflicting constraints on the same field (e.g., `type:document` in the query and `type: spreadsheet` in a filter) produce an empty result set.
| | -| `time_range` | [Optional[models.PlatformTimeRange]](../../models/platformtimerange.md) | :heavy_minus_sign: | Filter results to those last updated within this range. | | -| `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 | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `query` | *str* | :heavy_check_mark: | The search query string. Supports inline operators such as `from:jane type:document app:confluence`. Inline operators are AND'd with structured `filters`.
| +| `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of results to return per page. | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Opaque pagination token from a previous response's `next_cursor` field. Omit on the first request.
| +| `datasources` | List[*str*] | :heavy_minus_sign: | Restrict results to specific datasources. Requests must not specify both `datasources` and `datasource_instances`.
| +| `datasource_instances` | List[*str*] | :heavy_minus_sign: | Restrict results to specific datasource instances. Values are datasource instance identifiers returned by `GET /api/search/filters`. Requests must not specify both `datasources` and `datasource_instances`.
| +| `filters` | List[[models.PlatformFilter](../../models/platformfilter.md)] | :heavy_minus_sign: | Structured filters applied to search results. Equality operators OR multiple values within a filter. Multiple filters are AND'd together, including range filters on the same field. Filters are AND'd with any inline operators in `query`. Note that conflicting constraints on the same field (e.g., `type:document` in the query and `type: spreadsheet` in a filter) produce an empty result set.
| +| `time_range` | [Optional[models.PlatformTimeRange]](../../models/platformtimerange.md) | :heavy_minus_sign: | Filter results to those last updated within this range. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/pyproject.toml b/pyproject.toml index a5d4d8d2..9cb2c0bd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "glean-api-client" -version = "0.15.2" +version = "0.15.3" 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 5309d82e..75a78e98 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.15.2" +__version__: str = "0.15.3" __openapi_doc_version__: str = "0.9.0" -__gen_version__: str = "2.916.2" -__user_agent__: str = "speakeasy-sdk/python 0.15.2 2.916.2 0.9.0 glean-api-client" +__gen_version__: str = "2.916.4" +__user_agent__: str = "speakeasy-sdk/python 0.15.3 2.916.4 0.9.0 glean-api-client" try: if __package__ is not None: diff --git a/src/glean/api_client/entities.py b/src/glean/api_client/entities.py index f90b9ae8..adc08d27 100644 --- a/src/glean/api_client/entities.py +++ b/src/glean/api_client/entities.py @@ -37,7 +37,9 @@ def list( page_size: Optional[int] = None, cursor: Optional[str] = None, source: Optional[str] = None, - request_type: Optional[models.RequestType] = models.RequestType.STANDARD, + request_type: Optional[ + models.ListEntitiesRequestRequestType + ] = models.ListEntitiesRequestRequestType.STANDARD, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -178,7 +180,9 @@ async def list_async( page_size: Optional[int] = None, cursor: Optional[str] = None, source: Optional[str] = None, - request_type: Optional[models.RequestType] = models.RequestType.STANDARD, + request_type: Optional[ + models.ListEntitiesRequestRequestType + ] = models.ListEntitiesRequestRequestType.STANDARD, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, diff --git a/src/glean/api_client/models/__init__.py b/src/glean/api_client/models/__init__.py index 715c7a49..536e42f5 100644 --- a/src/glean/api_client/models/__init__.py +++ b/src/glean/api_client/models/__init__.py @@ -80,6 +80,7 @@ ActionPackAuthStatusResponse, ActionPackAuthStatusResponseTypedDict, ) + from .actionpreview import ActionPreview, ActionPreviewTypedDict from .actionsummary import ActionSummary, ActionSummaryTypedDict from .activity import Activity, ActivityTypedDict from .activityevent import ( @@ -191,6 +192,7 @@ GrantType, TokenEndpointAuthMethod, ) + from .authcontext import AuthContext, AuthContextTypedDict from .authorizeactionpackop import ( AuthorizeActionPackRequestRequest, AuthorizeActionPackRequestRequestTypedDict, @@ -1103,8 +1105,8 @@ ListEntitiesRequest, ListEntitiesRequestEntityType, ListEntitiesRequestIncludeField, + ListEntitiesRequestRequestType, ListEntitiesRequestTypedDict, - RequestType, ) from .listentitiesresponse import ( ListEntitiesResponse, @@ -1426,6 +1428,17 @@ SensitiveInfoTypeLikelihoodThreshold, SensitiveInfoTypeTypedDict, ) + from .servertoolrequest import ( + ServerToolRequest, + ServerToolRequestRequestType, + ServerToolRequestTypedDict, + ) + from .servertoolresponse import ( + GrantScope, + ServerToolResponse, + ServerToolResponseRequestType, + ServerToolResponseTypedDict, + ) from .sessioninfo import SessionInfo, SessionInfoTypedDict from .sharingoptions import SharingOptions, SharingOptionsTypedDict from .shortcuterror import ( @@ -1683,6 +1696,8 @@ "ActionPackAuthStatusResponse", "ActionPackAuthStatusResponseTypedDict", "ActionPackAuthStatusTypedDict", + "ActionPreview", + "ActionPreviewTypedDict", "ActionSummary", "ActionSummaryTypedDict", "Activity", @@ -1769,6 +1784,8 @@ "AuthConfigStatus", "AuthConfigType", "AuthConfigTypedDict", + "AuthContext", + "AuthContextTypedDict", "AuthStatus", "AuthToken", "AuthTokenTypedDict", @@ -2392,6 +2409,7 @@ "GleanDataErrorTypedDict", "GrantPermission", "GrantPermissionTypedDict", + "GrantScope", "GrantType", "GreenlistUsersRequest", "GreenlistUsersRequestTypedDict", @@ -2479,6 +2497,7 @@ "ListEntitiesRequest", "ListEntitiesRequestEntityType", "ListEntitiesRequestIncludeField", + "ListEntitiesRequestRequestType", "ListEntitiesRequestTypedDict", "ListEntitiesResponse", "ListEntitiesResponseTypedDict", @@ -2722,7 +2741,6 @@ "ReportStatusResponse", "ReportStatusResponseStatus", "ReportStatusResponseTypedDict", - "RequestType", "ResponseBody1", "ResponseBody1TypedDict", "ResponseBody2", @@ -2787,6 +2805,12 @@ "SensitiveInfoType", "SensitiveInfoTypeLikelihoodThreshold", "SensitiveInfoTypeTypedDict", + "ServerToolRequest", + "ServerToolRequestRequestType", + "ServerToolRequestTypedDict", + "ServerToolResponse", + "ServerToolResponseRequestType", + "ServerToolResponseTypedDict", "SessionInfo", "SessionInfoTypedDict", "Share", @@ -2989,6 +3013,8 @@ "ActionPackAuthStatusTypedDict": ".actionpackauthstatus", "ActionPackAuthStatusResponse": ".actionpackauthstatusresponse", "ActionPackAuthStatusResponseTypedDict": ".actionpackauthstatusresponse", + "ActionPreview": ".actionpreview", + "ActionPreviewTypedDict": ".actionpreview", "ActionSummary": ".actionsummary", "ActionSummaryTypedDict": ".actionsummary", "Activity": ".activity", @@ -3076,6 +3102,8 @@ "AuthConfigTypedDict": ".authconfig", "GrantType": ".authconfig", "TokenEndpointAuthMethod": ".authconfig", + "AuthContext": ".authcontext", + "AuthContextTypedDict": ".authcontext", "AuthorizeActionPackRequestRequest": ".authorizeactionpackop", "AuthorizeActionPackRequestRequestTypedDict": ".authorizeactionpackop", "AuthorizeActionPackRequest": ".authorizeactionpackrequest", @@ -3749,8 +3777,8 @@ "ListEntitiesRequest": ".listentitiesrequest", "ListEntitiesRequestEntityType": ".listentitiesrequest", "ListEntitiesRequestIncludeField": ".listentitiesrequest", + "ListEntitiesRequestRequestType": ".listentitiesrequest", "ListEntitiesRequestTypedDict": ".listentitiesrequest", - "RequestType": ".listentitiesrequest", "ListEntitiesResponse": ".listentitiesresponse", "ListEntitiesResponseTypedDict": ".listentitiesresponse", "ListpinsRequest": ".listpinsop", @@ -4009,6 +4037,13 @@ "SensitiveInfoType": ".sensitiveinfotype", "SensitiveInfoTypeLikelihoodThreshold": ".sensitiveinfotype", "SensitiveInfoTypeTypedDict": ".sensitiveinfotype", + "ServerToolRequest": ".servertoolrequest", + "ServerToolRequestRequestType": ".servertoolrequest", + "ServerToolRequestTypedDict": ".servertoolrequest", + "GrantScope": ".servertoolresponse", + "ServerToolResponse": ".servertoolresponse", + "ServerToolResponseRequestType": ".servertoolresponse", + "ServerToolResponseTypedDict": ".servertoolresponse", "SessionInfo": ".sessioninfo", "SessionInfoTypedDict": ".sessioninfo", "SharingOptions": ".sharingoptions", diff --git a/src/glean/api_client/models/actionpreview.py b/src/glean/api_client/models/actionpreview.py new file mode 100644 index 00000000..8aada545 --- /dev/null +++ b/src/glean/api_client/models/actionpreview.py @@ -0,0 +1,42 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from glean.api_client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class ActionPreviewTypedDict(TypedDict): + r"""Preview information for an action being executed.""" + + markdown: NotRequired[str] + r"""Markdown preview describing what the action will do.""" + description: NotRequired[str] + r"""Short summary of what this specific tool invocation will do.""" + + +class ActionPreview(BaseModel): + r"""Preview information for an action being executed.""" + + markdown: Optional[str] = None + r"""Markdown preview describing what the action will do.""" + + description: Optional[str] = None + r"""Short summary of what this specific tool invocation will do.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["markdown", "description"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/glean/api_client/models/authcontext.py b/src/glean/api_client/models/authcontext.py new file mode 100644 index 00000000..a184a4fc --- /dev/null +++ b/src/glean/api_client/models/authcontext.py @@ -0,0 +1,44 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +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 AuthContextTypedDict(TypedDict): + r"""Context for authentication responses, containing identifiers for the entity being authenticated.""" + + server_id: NotRequired[str] + r"""ID of the MCP server (populated when toolType is MCP).""" + + +class AuthContext(BaseModel): + r"""Context for authentication responses, containing identifiers for the entity being authenticated.""" + + server_id: Annotated[Optional[str], pydantic.Field(alias="serverId")] = None + r"""ID of the MCP server (populated when toolType is MCP).""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["serverId"]) + 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: + AuthContext.model_rebuild() +except NameError: + pass diff --git a/src/glean/api_client/models/chatmessagefragment.py b/src/glean/api_client/models/chatmessagefragment.py index a7d3bf33..a8d3093b 100644 --- a/src/glean/api_client/models/chatmessagefragment.py +++ b/src/glean/api_client/models/chatmessagefragment.py @@ -4,6 +4,8 @@ from .chatfile import ChatFile, ChatFileTypedDict from .chatmessagecitation import ChatMessageCitation, ChatMessageCitationTypedDict from .querysuggestion import QuerySuggestion, QuerySuggestionTypedDict +from .servertoolrequest import ServerToolRequest, ServerToolRequestTypedDict +from .servertoolresponse import ServerToolResponse, ServerToolResponseTypedDict from .structuredresult import StructuredResult, StructuredResultTypedDict from .toolinfo import ToolInfo, ToolInfoTypedDict from glean.api_client.types import BaseModel, UNSET_SENTINEL @@ -27,6 +29,23 @@ class ChatMessageFragmentTypedDict(TypedDict): action: NotRequired[ToolInfoTypedDict] citation: NotRequired[ChatMessageCitationTypedDict] r"""Information about the source for a ChatMessage.""" + server_tool_request: NotRequired[ServerToolRequestTypedDict] + server_tool_response: NotRequired[ServerToolResponseTypedDict] + r"""Response to a server tool request. The applicable fields depend on requestType: + + For EXECUTION requests: + - isGranted: whether tool execution is approved + - reason: optional explanation + + For AUTHENTICATION_SUGGESTION requests: + - isGranted: whether auth completed successfully (true=connected, false=skipped) + - authContext: contains serverId or actionPackId for identifying the authenticated entity + - reason: optional explanation for skip + + For VOTE_SUGGESTION requests: + - voted: whether the user voted for this tool + + """ class ChatMessageFragment(BaseModel): @@ -56,6 +75,29 @@ class ChatMessageFragment(BaseModel): citation: Optional[ChatMessageCitation] = None r"""Information about the source for a ChatMessage.""" + server_tool_request: Annotated[ + Optional[ServerToolRequest], pydantic.Field(alias="serverToolRequest") + ] = None + + server_tool_response: Annotated[ + Optional[ServerToolResponse], pydantic.Field(alias="serverToolResponse") + ] = None + r"""Response to a server tool request. The applicable fields depend on requestType: + + For EXECUTION requests: + - isGranted: whether tool execution is approved + - reason: optional explanation + + For AUTHENTICATION_SUGGESTION requests: + - isGranted: whether auth completed successfully (true=connected, false=skipped) + - authContext: contains serverId or actionPackId for identifying the authenticated entity + - reason: optional explanation for skip + + For VOTE_SUGGESTION requests: + - voted: whether the user voted for this tool + + """ + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -67,6 +109,8 @@ def serialize_model(self, handler): "file", "action", "citation", + "serverToolRequest", + "serverToolResponse", ] ) serialized = handler(self) diff --git a/src/glean/api_client/models/listentitiesrequest.py b/src/glean/api_client/models/listentitiesrequest.py index 699e39c2..74911f03 100644 --- a/src/glean/api_client/models/listentitiesrequest.py +++ b/src/glean/api_client/models/listentitiesrequest.py @@ -29,7 +29,7 @@ class ListEntitiesRequestIncludeField(str, Enum): UNPROCESSED_TEAMS = "UNPROCESSED_TEAMS" -class RequestType(str, Enum): +class ListEntitiesRequestRequestType(str, Enum): r"""The type of request being made.""" # Used by default for all requests and satisfies all standard use cases for list requests. Limited to 10000 entities. @@ -55,7 +55,7 @@ class ListEntitiesRequestTypedDict(TypedDict): r"""Pagination cursor. A previously received opaque token representing the position in the overall results at which to start.""" source: NotRequired[str] r"""A string denoting the search surface from which the endpoint is called.""" - request_type: NotRequired[RequestType] + request_type: NotRequired[ListEntitiesRequestRequestType] r"""The type of request being made.""" @@ -93,8 +93,8 @@ class ListEntitiesRequest(BaseModel): r"""A string denoting the search surface from which the endpoint is called.""" request_type: Annotated[ - Optional[RequestType], pydantic.Field(alias="requestType") - ] = RequestType.STANDARD + Optional[ListEntitiesRequestRequestType], pydantic.Field(alias="requestType") + ] = ListEntitiesRequestRequestType.STANDARD r"""The type of request being made.""" @model_serializer(mode="wrap") diff --git a/src/glean/api_client/models/servertoolrequest.py b/src/glean/api_client/models/servertoolrequest.py new file mode 100644 index 00000000..2e1f8e53 --- /dev/null +++ b/src/glean/api_client/models/servertoolrequest.py @@ -0,0 +1,102 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .actionpreview import ActionPreview, ActionPreviewTypedDict +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 field_serializer, model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ServerToolRequestRequestType(str, Enum, metaclass=utils.OpenEnumMeta): + r"""The type of request made to the user.""" + + # Request for approving execution of the tool. + EXECUTION = "EXECUTION" + # Request for authenticating to a tool, provided as a (tool) suggestion. + AUTHENTICATION_SUGGESTION = "AUTHENTICATION_SUGGESTION" + # Suggestion to vote for enabling an available-but-not-enabled tool. + VOTE_SUGGESTION = "VOTE_SUGGESTION" + + +class ServerToolRequestTypedDict(TypedDict): + request_type: ServerToolRequestRequestType + r"""The type of request made to the user.""" + request_id: str + r"""Unique identifier for this request.""" + tool_display_name: NotRequired[str] + r"""Human-readable display name for the tool.""" + server_id: NotRequired[str] + r"""Unique identifier of the tool server. Use with GET /tool-servers/{serverId}/auth + to resolve display information and authentication status. + + """ + tool_cta: NotRequired[str] + r"""Custom call-to-action (CTA) verb for the approval button (e.g., \"Create\", \"Update\", \"Send\").""" + action_preview: NotRequired[ActionPreviewTypedDict] + r"""Preview information for an action being executed.""" + + +class ServerToolRequest(BaseModel): + request_type: Annotated[ + ServerToolRequestRequestType, pydantic.Field(alias="requestType") + ] + r"""The type of request made to the user.""" + + request_id: Annotated[str, pydantic.Field(alias="requestId")] + r"""Unique identifier for this request.""" + + tool_display_name: Annotated[ + Optional[str], pydantic.Field(alias="toolDisplayName") + ] = None + r"""Human-readable display name for the tool.""" + + server_id: Annotated[Optional[str], pydantic.Field(alias="serverId")] = None + r"""Unique identifier of the tool server. Use with GET /tool-servers/{serverId}/auth + to resolve display information and authentication status. + + """ + + tool_cta: Annotated[Optional[str], pydantic.Field(alias="toolCta")] = None + r"""Custom call-to-action (CTA) verb for the approval button (e.g., \"Create\", \"Update\", \"Send\").""" + + action_preview: Annotated[ + Optional[ActionPreview], pydantic.Field(alias="actionPreview") + ] = None + r"""Preview information for an action being executed.""" + + @field_serializer("request_type") + def serialize_request_type(self, value): + if isinstance(value, str): + try: + return models.ServerToolRequestRequestType(value) + except ValueError: + return value + return value + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["toolDisplayName", "serverId", "toolCta", "actionPreview"] + ) + 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: + ServerToolRequest.model_rebuild() +except NameError: + pass diff --git a/src/glean/api_client/models/servertoolresponse.py b/src/glean/api_client/models/servertoolresponse.py new file mode 100644 index 00000000..90ec0049 --- /dev/null +++ b/src/glean/api_client/models/servertoolresponse.py @@ -0,0 +1,149 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .authcontext import AuthContext, AuthContextTypedDict +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 field_serializer, model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ServerToolResponseRequestType(str, Enum, metaclass=utils.OpenEnumMeta): + r"""The type of request made to the user.""" + + # Request for approving execution of the tool. + EXECUTION = "EXECUTION" + # Request for authenticating to a tool, provided as a (tool) suggestion. + AUTHENTICATION_SUGGESTION = "AUTHENTICATION_SUGGESTION" + # Suggestion to vote for enabling an available-but-not-enabled tool. + VOTE_SUGGESTION = "VOTE_SUGGESTION" + + +class GrantScope(str, Enum, metaclass=utils.OpenEnumMeta): + r"""Scope of the approval grant. Only applicable when isGranted is true and requestType is EXECUTION.""" + + # Approve only the current tool request. Future tool execution requests still require approval. + CURRENT_REQUEST = "CURRENT_REQUEST" + # Approve the current tool request and auto-approve all future same tool requests in this chat session. + CURRENT_SESSION = "CURRENT_SESSION" + # Approve the current tool request and auto-approve all future same tool requests across all chat sessions. + ALWAYS = "ALWAYS" + + +class ServerToolResponseTypedDict(TypedDict): + r"""Response to a server tool request. The applicable fields depend on requestType: + + For EXECUTION requests: + - isGranted: whether tool execution is approved + - reason: optional explanation + + For AUTHENTICATION_SUGGESTION requests: + - isGranted: whether auth completed successfully (true=connected, false=skipped) + - authContext: contains serverId or actionPackId for identifying the authenticated entity + - reason: optional explanation for skip + + For VOTE_SUGGESTION requests: + - voted: whether the user voted for this tool + + """ + + request_type: ServerToolResponseRequestType + r"""The type of request made to the user.""" + request_id: str + r"""Unique identifier for this request.""" + is_granted: NotRequired[bool] + r"""Whether tool request is granted (indicates approval for execution, or completion for auth).""" + grant_scope: NotRequired[GrantScope] + r"""Scope of the approval grant. Only applicable when isGranted is true and requestType is EXECUTION. + + """ + auth_context: NotRequired[AuthContextTypedDict] + r"""Context for authentication responses, containing identifiers for the entity being authenticated. + + """ + + +class ServerToolResponse(BaseModel): + r"""Response to a server tool request. The applicable fields depend on requestType: + + For EXECUTION requests: + - isGranted: whether tool execution is approved + - reason: optional explanation + + For AUTHENTICATION_SUGGESTION requests: + - isGranted: whether auth completed successfully (true=connected, false=skipped) + - authContext: contains serverId or actionPackId for identifying the authenticated entity + - reason: optional explanation for skip + + For VOTE_SUGGESTION requests: + - voted: whether the user voted for this tool + + """ + + request_type: Annotated[ + ServerToolResponseRequestType, pydantic.Field(alias="requestType") + ] + r"""The type of request made to the user.""" + + request_id: Annotated[str, pydantic.Field(alias="requestId")] + r"""Unique identifier for this request.""" + + is_granted: Annotated[Optional[bool], pydantic.Field(alias="isGranted")] = None + r"""Whether tool request is granted (indicates approval for execution, or completion for auth).""" + + grant_scope: Annotated[Optional[GrantScope], pydantic.Field(alias="grantScope")] = ( + GrantScope.CURRENT_REQUEST + ) + r"""Scope of the approval grant. Only applicable when isGranted is true and requestType is EXECUTION. + + """ + + auth_context: Annotated[ + Optional[AuthContext], pydantic.Field(alias="authContext") + ] = None + r"""Context for authentication responses, containing identifiers for the entity being authenticated. + + """ + + @field_serializer("request_type") + def serialize_request_type(self, value): + if isinstance(value, str): + try: + return models.ServerToolResponseRequestType(value) + except ValueError: + return value + return value + + @field_serializer("grant_scope") + def serialize_grant_scope(self, value): + if isinstance(value, str): + try: + return models.GrantScope(value) + except ValueError: + return value + return value + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["isGranted", "grantScope", "authContext"]) + 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: + ServerToolResponse.model_rebuild() +except NameError: + pass diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1createcollection.go b/tests/mockserver/internal/handler/pathpostrestapiv1createcollection.go index 371b9023..5c99a0ad 100644 --- a/tests/mockserver/internal/handler/pathpostrestapiv1createcollection.go +++ b/tests/mockserver/internal/handler/pathpostrestapiv1createcollection.go @@ -56,14 +56,14 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ operations.ResponseBody2{ Collection: &components.Collection{ Name: "", - Description: "whole busily jive hawk gee basic minus hence", + Description: "motionless whenever paintwork import over cuckoo", AddedRoles: []components.UserRoleSpecification{ components.UserRoleSpecification{ Person: &components.Person{ Name: "George Clooney", ObfuscatedID: "abc123", }, - Role: components.UserRoleAnswerModerator, + Role: components.UserRoleOwner, }, }, RemovedRoles: []components.UserRoleSpecification{ @@ -90,7 +90,7 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ }, }, }, - ID: 158969, + ID: 363711, Creator: &components.Person{ Name: "George Clooney", ObfuscatedID: "abc123", @@ -101,7 +101,7 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ }, Items: []components.CollectionItem{ components.CollectionItem{ - CollectionID: 110375, + CollectionID: 570197, CreatedBy: &components.Person{ Name: "George Clooney", ObfuscatedID: "abc123", @@ -266,13 +266,13 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ Name: "George Clooney", ObfuscatedID: "abc123", }, - Role: components.UserRoleEditor, + Role: components.UserRoleAnswerModerator, }, }, }, Collection: &components.Collection{ Name: "", - Description: "wedge colorfully orientate rally", + Description: "athwart skateboard newsstand farm bourgeoisie ah how elliptical aha well-to-do", AudienceFilters: []components.FacetFilter{ components.FacetFilter{ FieldName: types.String("type"), @@ -288,7 +288,7 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ }, }, }, - ID: 131797, + ID: 643990, Creator: &components.Person{ Name: "George Clooney", ObfuscatedID: "abc123", @@ -300,7 +300,7 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ Children: []components.Collection{ components.Collection{ Name: "", - Description: "outside yippee sidetrack mature regularly mouser inject worth", + Description: "woot purse salty even as advanced", AudienceFilters: []components.FacetFilter{ components.FacetFilter{ FieldName: types.String("type"), @@ -316,7 +316,7 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ }, }, }, - ID: 149448, + ID: 359978, Creator: &components.Person{ Name: "George Clooney", ObfuscatedID: "abc123", @@ -328,7 +328,7 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ }, }, }, - ItemType: components.CollectionItemItemTypeCollection, + ItemType: components.CollectionItemItemTypeURL, }, }, }, diff --git a/tests/mockserver/internal/sdk/models/components/actionpreview.go b/tests/mockserver/internal/sdk/models/components/actionpreview.go new file mode 100644 index 00000000..facf42ad --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/actionpreview.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// ActionPreview - Preview information for an action being executed. +type ActionPreview struct { + // Markdown preview describing what the action will do. + Markdown *string `json:"markdown,omitempty"` + // Short summary of what this specific tool invocation will do. + Description *string `json:"description,omitempty"` +} + +func (o *ActionPreview) GetMarkdown() *string { + if o == nil { + return nil + } + return o.Markdown +} + +func (o *ActionPreview) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} diff --git a/tests/mockserver/internal/sdk/models/components/authcontext.go b/tests/mockserver/internal/sdk/models/components/authcontext.go new file mode 100644 index 00000000..1b2c97ab --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/authcontext.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// AuthContext - Context for authentication responses, containing identifiers for the entity being authenticated. +type AuthContext struct { + // ID of the MCP server (populated when toolType is MCP). + ServerID *string `json:"serverId,omitempty"` +} + +func (o *AuthContext) GetServerID() *string { + if o == nil { + return nil + } + return o.ServerID +} diff --git a/tests/mockserver/internal/sdk/models/components/chatmessagefragment.go b/tests/mockserver/internal/sdk/models/components/chatmessagefragment.go index 4a0507c9..632727b0 100644 --- a/tests/mockserver/internal/sdk/models/components/chatmessagefragment.go +++ b/tests/mockserver/internal/sdk/models/components/chatmessagefragment.go @@ -14,7 +14,23 @@ type ChatMessageFragment struct { File *ChatFile `json:"file,omitempty"` Action *ToolInfo `json:"action,omitempty"` // Information about the source for a ChatMessage. - Citation *ChatMessageCitation `json:"citation,omitempty"` + Citation *ChatMessageCitation `json:"citation,omitempty"` + ServerToolRequest *ServerToolRequest `json:"serverToolRequest,omitempty"` + // Response to a server tool request. The applicable fields depend on requestType: + // + // For EXECUTION requests: + // - isGranted: whether tool execution is approved + // - reason: optional explanation + // + // For AUTHENTICATION_SUGGESTION requests: + // - isGranted: whether auth completed successfully (true=connected, false=skipped) + // - authContext: contains serverId or actionPackId for identifying the authenticated entity + // - reason: optional explanation for skip + // + // For VOTE_SUGGESTION requests: + // - voted: whether the user voted for this tool + // + ServerToolResponse *ServerToolResponse `json:"serverToolResponse,omitempty"` } func (o *ChatMessageFragment) GetStructuredResults() []StructuredResult { @@ -65,3 +81,17 @@ func (o *ChatMessageFragment) GetCitation() *ChatMessageCitation { } return o.Citation } + +func (o *ChatMessageFragment) GetServerToolRequest() *ServerToolRequest { + if o == nil { + return nil + } + return o.ServerToolRequest +} + +func (o *ChatMessageFragment) GetServerToolResponse() *ServerToolResponse { + if o == nil { + return nil + } + return o.ServerToolResponse +} diff --git a/tests/mockserver/internal/sdk/models/components/listentitiesrequest.go b/tests/mockserver/internal/sdk/models/components/listentitiesrequest.go index 339c8ffc..a742d389 100644 --- a/tests/mockserver/internal/sdk/models/components/listentitiesrequest.go +++ b/tests/mockserver/internal/sdk/models/components/listentitiesrequest.go @@ -84,18 +84,18 @@ func (e *ListEntitiesRequestIncludeField) UnmarshalJSON(data []byte) error { } } -// RequestType - The type of request being made. -type RequestType string +// ListEntitiesRequestRequestType - The type of request being made. +type ListEntitiesRequestRequestType string const ( - RequestTypeStandard RequestType = "STANDARD" - RequestTypeFullDirectory RequestType = "FULL_DIRECTORY" + ListEntitiesRequestRequestTypeStandard ListEntitiesRequestRequestType = "STANDARD" + ListEntitiesRequestRequestTypeFullDirectory ListEntitiesRequestRequestType = "FULL_DIRECTORY" ) -func (e RequestType) ToPointer() *RequestType { +func (e ListEntitiesRequestRequestType) ToPointer() *ListEntitiesRequestRequestType { return &e } -func (e *RequestType) UnmarshalJSON(data []byte) error { +func (e *ListEntitiesRequestRequestType) UnmarshalJSON(data []byte) error { var v string if err := json.Unmarshal(data, &v); err != nil { return err @@ -104,10 +104,10 @@ func (e *RequestType) UnmarshalJSON(data []byte) error { case "STANDARD": fallthrough case "FULL_DIRECTORY": - *e = RequestType(v) + *e = ListEntitiesRequestRequestType(v) return nil default: - return fmt.Errorf("invalid value for RequestType: %v", v) + return fmt.Errorf("invalid value for ListEntitiesRequestRequestType: %v", v) } } @@ -129,7 +129,7 @@ type ListEntitiesRequest struct { // A string denoting the search surface from which the endpoint is called. Source *string `json:"source,omitempty"` // The type of request being made. - RequestType *RequestType `default:"STANDARD" json:"requestType"` + RequestType *ListEntitiesRequestRequestType `default:"STANDARD" json:"requestType"` } func (l ListEntitiesRequest) MarshalJSON() ([]byte, error) { @@ -206,7 +206,7 @@ func (o *ListEntitiesRequest) GetSource() *string { return o.Source } -func (o *ListEntitiesRequest) GetRequestType() *RequestType { +func (o *ListEntitiesRequest) GetRequestType() *ListEntitiesRequestRequestType { if o == nil { return nil } diff --git a/tests/mockserver/internal/sdk/models/components/servertoolrequest.go b/tests/mockserver/internal/sdk/models/components/servertoolrequest.go new file mode 100644 index 00000000..3bf8c6b3 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/servertoolrequest.go @@ -0,0 +1,97 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// ServerToolRequestRequestType - The type of request made to the user. +type ServerToolRequestRequestType string + +const ( + ServerToolRequestRequestTypeExecution ServerToolRequestRequestType = "EXECUTION" + ServerToolRequestRequestTypeAuthenticationSuggestion ServerToolRequestRequestType = "AUTHENTICATION_SUGGESTION" + ServerToolRequestRequestTypeVoteSuggestion ServerToolRequestRequestType = "VOTE_SUGGESTION" +) + +func (e ServerToolRequestRequestType) ToPointer() *ServerToolRequestRequestType { + return &e +} +func (e *ServerToolRequestRequestType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "EXECUTION": + fallthrough + case "AUTHENTICATION_SUGGESTION": + fallthrough + case "VOTE_SUGGESTION": + *e = ServerToolRequestRequestType(v) + return nil + default: + return fmt.Errorf("invalid value for ServerToolRequestRequestType: %v", v) + } +} + +type ServerToolRequest struct { + // The type of request made to the user. + RequestType ServerToolRequestRequestType `json:"requestType"` + // Unique identifier for this request. + RequestID string `json:"requestId"` + // Human-readable display name for the tool. + ToolDisplayName *string `json:"toolDisplayName,omitempty"` + // Unique identifier of the tool server. Use with GET /tool-servers/{serverId}/auth + // to resolve display information and authentication status. + // + ServerID *string `json:"serverId,omitempty"` + // Custom call-to-action (CTA) verb for the approval button (e.g., "Create", "Update", "Send"). + ToolCta *string `json:"toolCta,omitempty"` + // Preview information for an action being executed. + ActionPreview *ActionPreview `json:"actionPreview,omitempty"` +} + +func (o *ServerToolRequest) GetRequestType() ServerToolRequestRequestType { + if o == nil { + return ServerToolRequestRequestType("") + } + return o.RequestType +} + +func (o *ServerToolRequest) GetRequestID() string { + if o == nil { + return "" + } + return o.RequestID +} + +func (o *ServerToolRequest) GetToolDisplayName() *string { + if o == nil { + return nil + } + return o.ToolDisplayName +} + +func (o *ServerToolRequest) GetServerID() *string { + if o == nil { + return nil + } + return o.ServerID +} + +func (o *ServerToolRequest) GetToolCta() *string { + if o == nil { + return nil + } + return o.ToolCta +} + +func (o *ServerToolRequest) GetActionPreview() *ActionPreview { + if o == nil { + return nil + } + return o.ActionPreview +} diff --git a/tests/mockserver/internal/sdk/models/components/servertoolresponse.go b/tests/mockserver/internal/sdk/models/components/servertoolresponse.go new file mode 100644 index 00000000..f4b84c3b --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/servertoolresponse.go @@ -0,0 +1,143 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/utils" +) + +// ServerToolResponseRequestType - The type of request made to the user. +type ServerToolResponseRequestType string + +const ( + ServerToolResponseRequestTypeExecution ServerToolResponseRequestType = "EXECUTION" + ServerToolResponseRequestTypeAuthenticationSuggestion ServerToolResponseRequestType = "AUTHENTICATION_SUGGESTION" + ServerToolResponseRequestTypeVoteSuggestion ServerToolResponseRequestType = "VOTE_SUGGESTION" +) + +func (e ServerToolResponseRequestType) ToPointer() *ServerToolResponseRequestType { + return &e +} +func (e *ServerToolResponseRequestType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "EXECUTION": + fallthrough + case "AUTHENTICATION_SUGGESTION": + fallthrough + case "VOTE_SUGGESTION": + *e = ServerToolResponseRequestType(v) + return nil + default: + return fmt.Errorf("invalid value for ServerToolResponseRequestType: %v", v) + } +} + +// GrantScope - Scope of the approval grant. Only applicable when isGranted is true and requestType is EXECUTION. +type GrantScope string + +const ( + GrantScopeCurrentRequest GrantScope = "CURRENT_REQUEST" + GrantScopeCurrentSession GrantScope = "CURRENT_SESSION" + GrantScopeAlways GrantScope = "ALWAYS" +) + +func (e GrantScope) ToPointer() *GrantScope { + return &e +} +func (e *GrantScope) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "CURRENT_REQUEST": + fallthrough + case "CURRENT_SESSION": + fallthrough + case "ALWAYS": + *e = GrantScope(v) + return nil + default: + return fmt.Errorf("invalid value for GrantScope: %v", v) + } +} + +// ServerToolResponse - Response to a server tool request. The applicable fields depend on requestType: +// +// For EXECUTION requests: +// - isGranted: whether tool execution is approved +// - reason: optional explanation +// +// For AUTHENTICATION_SUGGESTION requests: +// - isGranted: whether auth completed successfully (true=connected, false=skipped) +// - authContext: contains serverId or actionPackId for identifying the authenticated entity +// - reason: optional explanation for skip +// +// For VOTE_SUGGESTION requests: +// - voted: whether the user voted for this tool +type ServerToolResponse struct { + // The type of request made to the user. + RequestType ServerToolResponseRequestType `json:"requestType"` + // Unique identifier for this request. + RequestID string `json:"requestId"` + // Whether tool request is granted (indicates approval for execution, or completion for auth). + IsGranted *bool `json:"isGranted,omitempty"` + // Scope of the approval grant. Only applicable when isGranted is true and requestType is EXECUTION. + // + GrantScope *GrantScope `default:"CURRENT_REQUEST" json:"grantScope"` + // Context for authentication responses, containing identifiers for the entity being authenticated. + // + AuthContext *AuthContext `json:"authContext,omitempty"` +} + +func (s ServerToolResponse) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *ServerToolResponse) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, []string{"requestType", "requestId"}); err != nil { + return err + } + return nil +} + +func (o *ServerToolResponse) GetRequestType() ServerToolResponseRequestType { + if o == nil { + return ServerToolResponseRequestType("") + } + return o.RequestType +} + +func (o *ServerToolResponse) GetRequestID() string { + if o == nil { + return "" + } + return o.RequestID +} + +func (o *ServerToolResponse) GetIsGranted() *bool { + if o == nil { + return nil + } + return o.IsGranted +} + +func (o *ServerToolResponse) GetGrantScope() *GrantScope { + if o == nil { + return nil + } + return o.GrantScope +} + +func (o *ServerToolResponse) GetAuthContext() *AuthContext { + if o == nil { + return nil + } + return o.AuthContext +} diff --git a/tests/test_entities.py b/tests/test_entities.py index 6479bed7..4abcf8e7 100644 --- a/tests/test_entities.py +++ b/tests/test_entities.py @@ -35,7 +35,7 @@ def test_entities_listentities(): ], entity_type=models.ListEntitiesRequestEntityType.PEOPLE, page_size=100, - request_type=models.RequestType.STANDARD, + request_type=models.ListEntitiesRequestRequestType.STANDARD, ) assert res is not None diff --git a/tests/test_messages.py b/tests/test_messages.py index 636f01d3..dfdc1864 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.GCHAT, + datasource=models.Datasource.SLACKENTGRID, timestamp_millis=558834, ) assert res is not None diff --git a/tests/test_search.py b/tests/test_search.py index e8c5284c..3925a6e0 100644 --- a/tests/test_search.py +++ b/tests/test_search.py @@ -2223,10 +2223,6 @@ def test_search_platform_search(): "confluence", "google_drive", ], - datasource_instances=[ - "slack_acme", - "slack_eu", - ], filters=[ { "field": "type", diff --git a/tests/test_summarize.py b/tests/test_summarize.py index 8763da58..cac8e978 100644 --- a/tests/test_summarize.py +++ b/tests/test_summarize.py @@ -18,11 +18,12 @@ def test_summarize_summarize(): res = glean.client.documents.summarize( document_specs=[ { - "ugc_type": models.DocumentSpecUgcType1.COLLECTIONS, - "content_id": 993975, + "ugc_type": models.DocumentSpecUgcType1.SHORTCUTS, + "content_id": 602763, }, { - "id": "", + "ugc_type": models.DocumentSpecUgcType1.SHORTCUTS, + "content_id": 602763, }, ] ) From 90c39823e59b826f8ca0518be8b4c7d2505859ca Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Fri, 10 Jul 2026 16:32:32 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow