From 783821e40f9275970d28009bf1517749fef39f4e Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Wed, 2 Dec 2026 00:39:10 +0000 Subject: [PATCH] ## Python SDK Changes: * `glean.agents.create()`: * `request.draft` **Added** * `response.agent.is_draft` **Added** * `glean.agents.search()`: `response.agents[].is_draft` **Added** * `glean.agents.get()`: `response.agent.is_draft` **Added** * `glean.agents.update()`: * `request.draft` **Added** * `response.agent.is_draft` **Added** * `glean.admin.agents.list()`: `response.results[].is_draft` **Added** --- .speakeasy/gen.lock | 194 +++++++++--------- .speakeasy/gen.yaml | 2 +- .speakeasy/glean-merged-spec.yaml | 81 ++++++-- .speakeasy/tests.arazzo.yaml | 1 + .speakeasy/workflow.lock | 10 +- README.md | 10 +- RELEASES.md | 12 +- docs/models/platformagent.md | 1 + docs/models/platformagentcreaterequest.md | 3 +- docs/models/platformagentupdaterequest.md | 3 +- .../models/platformlistadminagentsresponse.md | 12 +- .../models/platformlistdepartmentsresponse.md | 12 +- docs/models/platformlistidpgroupsresponse.md | 12 +- .../platformlistoauthclientsresponse.md | 12 +- docs/models/platformlistusersresponse.md | 12 +- docs/sdks/adminagents/README.md | 2 +- docs/sdks/adminidpgroups/README.md | 2 +- docs/sdks/agents/README.md | 8 +- docs/sdks/clients/README.md | 2 +- docs/sdks/departments/README.md | 2 +- docs/sdks/users/README.md | 2 +- pyproject.toml | 2 +- src/glean/api_client/_version.py | 4 +- src/glean/api_client/admin_agents.py | 4 +- src/glean/api_client/admin_idpgroups.py | 4 +- src/glean/api_client/agents.py | 24 ++- src/glean/api_client/clients.py | 4 +- src/glean/api_client/departments.py | 4 +- src/glean/api_client/models/platformagent.py | 10 + .../models/platformagentcreaterequest.py | 10 + .../models/platformagentupdaterequest.py | 10 + .../models/platformlistadminagentsresponse.py | 8 +- .../models/platformlistdepartmentsresponse.py | 4 +- .../models/platformlistidpgroupsresponse.py | 4 +- .../platformlistoauthclientsresponse.py | 8 +- .../models/platformlistusersresponse.py | 8 +- src/glean/api_client/users.py | 4 +- .../sdk/models/components/platformagent.go | 10 + .../components/platformagentcreaterequest.go | 25 +++ .../components/platformagentupdaterequest.go | 10 + .../platformlistadminagentsresponse.go | 3 +- .../platformlistdepartmentsresponse.go | 2 +- .../platformlistidpgroupsresponse.go | 2 +- .../platformlistoauthclientsresponse.go | 3 +- .../components/platformlistusersresponse.go | 3 +- .../models/operations/platformagentscreate.go | 2 +- .../models/operations/platformagentsupdate.go | 2 +- tests/test_agents.py | 1 + tests/test_messages.py | 2 +- tests/test_summarize.py | 5 +- 50 files changed, 367 insertions(+), 210 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index aadcaf53e..50fd86d96 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: e404575285afab94491c593bded9d1e7 + docChecksum: 2138982f4069dd6e56fa0c153aae41a5 docVersion: 0.9.0 speakeasyVersion: 1.813.1 generationVersion: 2.969.4 - releaseVersion: 0.18.2 - configChecksum: f95195d0c2d54de0cb4007ad03604e3d + releaseVersion: 0.18.3 + configChecksum: 9a92e5c0663b411554e7aa02f55de716 repoURL: https://github.com/gleanwork/api-client-python.git installationURL: https://github.com/gleanwork/api-client-python.git published: true persistentEdits: - generation_id: ec0459c7-c2e0-464c-bbdf-412c65956267 - pristine_commit_hash: f00f11416ce46d01e92ee5d26eed940d5943d2f9 - pristine_tree_hash: c0de4a611cd05a77fad1a78ef46bccba05d344d3 + generation_id: 479a4c60-229f-4f74-a750-9d4b93bc05ac + pristine_commit_hash: c25bf42896f268864981b632327276129000790c + pristine_tree_hash: 3f083200f8addc3c6f12850368592852ac1c1c7e features: python: acceptHeaders: 3.0.0 @@ -2342,8 +2342,8 @@ trackedFiles: pristine_git_object: 1ff91d25d4ae8bf84a9cb7f956dcef2eca7c8e9a docs/models/platformagent.md: id: 6d684a308415 - last_write_checksum: sha1:5f7b65a1ac3dffd8a2bbd5e43da66971666dd552 - pristine_git_object: 510c0f419a7aaf40a52a29297bde9d5dde29a23c + last_write_checksum: sha1:758c12a2c4681cc87acdf8609e81ba8e67fec56d + pristine_git_object: b638644e7dc9d13383bce87ee114b386b03bbf14 docs/models/platformagentcapabilities.md: id: 7d0c164cb136 last_write_checksum: sha1:70a0ba43c0c1fce847913b5e6c801b8ff9b17e77 @@ -2366,8 +2366,8 @@ trackedFiles: pristine_git_object: 63c0b9ab023a9add52bc919391df647d469dda9e docs/models/platformagentcreaterequest.md: id: ac4609e00004 - last_write_checksum: sha1:bbfe83d05bcc550f1761aa9063c6db311439d3df - pristine_git_object: aa9558517135e4b2920f244863533ed2e75c8513 + last_write_checksum: sha1:6c4fec63e48ff0c91937ca22df35e1d1362b1114 + pristine_git_object: ce07c1d7e5e242a98d74879bff27377294f79202 docs/models/platformagentdependency.md: id: 86d93df28310 last_write_checksum: sha1:7dad6c87c4eac38ec0a892548125f569f77771ca @@ -2582,8 +2582,8 @@ trackedFiles: pristine_git_object: 3d9be092703b124f4ca943f7157224e99d6eaae6 docs/models/platformagentupdaterequest.md: id: 26a02c00b565 - last_write_checksum: sha1:ba039375c187204e5e58c6e394ff1a7d70917626 - pristine_git_object: 35f1f089a1f4606777acee762cb9a83a32cbb909 + last_write_checksum: sha1:96538cdb5887852e263ad546222bc591d1510a6a + pristine_git_object: e838aaacea01d921a1da6132d6fa3fad54962bfa docs/models/platformanonymousauthtoken.md: id: a3fe43f9547a last_write_checksum: sha1:b7c9b2a16c66fd50caa7e1e41cbaab0a540ff9c4 @@ -2970,24 +2970,24 @@ trackedFiles: pristine_git_object: d5818940117912f19e95f2f903c5702d5da2a9f1 docs/models/platformlistadminagentsresponse.md: id: 4894159e13b7 - last_write_checksum: sha1:4ac82b224c67bdaf885672241e68b664c617acb6 - pristine_git_object: 74158e87938988b56e8d5d1fb450535c0bca5526 + last_write_checksum: sha1:f666541d115265d9df0d511aee455644aae1bf6c + pristine_git_object: 579ed264354c57010827955ce7a5519d530a75a7 docs/models/platformlistdepartmentsresponse.md: id: 69a15ba2a142 - last_write_checksum: sha1:f55379fa1379d6572077b6b1f751f5b9cfb8c6e7 - pristine_git_object: c363687e367e6e1a48f66e0c89c2d33c3ed97453 + last_write_checksum: sha1:28c0580aaf22b2ce5294ccf56cbb303994d9e687 + pristine_git_object: 640ae915701d814d123fafa9273a33527f7f2d73 docs/models/platformlistidpgroupsresponse.md: id: 431a0ed6bdbe - last_write_checksum: sha1:8e46270a18a104189ee08b1431255c33d33d24ee - pristine_git_object: c8bbd4b7a3b225a7a82c264000b6d77c6d9a2a3f + last_write_checksum: sha1:1f4ccc71515f034375ab8a3730e02dfd49b72743 + pristine_git_object: c1ce7a4c6a5c067a06452ce190e4b8e5af3961e3 docs/models/platformlistoauthclientsresponse.md: id: dda199d26b05 - last_write_checksum: sha1:2b3206627cc0375cdf54bbb19b711e4d840ff156 - pristine_git_object: 6296c58f184616b9219d4f38452a5d259a6f832b + last_write_checksum: sha1:49561f7201d0b0c7712fe88506e81c9828d33395 + pristine_git_object: 32206bc509cc45f39f956485602f3b5400ed0a81 docs/models/platformlistusersresponse.md: id: bcf3838547ae - last_write_checksum: sha1:e11723f467de65a28f53da3ad0eedb0a8ea3e82c - pristine_git_object: a75d2c0615bc0014fa3f5081137cebc2b33a4c80 + last_write_checksum: sha1:c3ad445affa1fab443c49a83793a0435b900635a + pristine_git_object: 7104a5131b4d35bd98f3d782cf113a3c3e3f46b2 docs/models/platformmessage.md: id: ea30c4fdad14 last_write_checksum: sha1:890468283cb6b47c68edf4b7b241dec096699d95 @@ -4350,16 +4350,16 @@ trackedFiles: pristine_git_object: 61dd41f0319201cc105e29174ab1cc0018cecbce docs/sdks/adminagents/README.md: id: 665e1b8d841f - last_write_checksum: sha1:e517c92fd6b470687d8d20e502e70dd4ff15aef9 - pristine_git_object: 51b0d1dcf7a791952abf652bb5b62ad9eb4fd909 + last_write_checksum: sha1:1bfc3b39c20b43aa5ad39a0ae7b13126e6381faf + pristine_git_object: 8df7d3716817ef0fe9d8d15f564ab7521c93639a docs/sdks/adminidpgroups/README.md: id: b6a9054823ec - last_write_checksum: sha1:491474aa4e883a8915452f676fb15b5b45db390a - pristine_git_object: 0574fa5679645560b594228a2061b0c3c9326335 + last_write_checksum: sha1:715ce8e614ad10597ba19bc5e800b58036961747 + pristine_git_object: c63e8c75deb045f1f5389442c0995424f597cc97 docs/sdks/agents/README.md: id: 5965d8232fd8 - last_write_checksum: sha1:a95c11ce1204f2fcd4aec150e794594b8eaca27f - pristine_git_object: c5bc6c2c3f2cca3c9a7be1f08554bcecc1fe8531 + last_write_checksum: sha1:b2feff3a87579f38f69bd838dfd431a1ba97c0b7 + pristine_git_object: aeef95e94695055706da513b381fb4e5612f7cb5 docs/sdks/announcements/README.md: id: 3d2e130a217c last_write_checksum: sha1:e6750d27c83a17ac456bc84cf48a2c8d36a0d5ee @@ -4402,8 +4402,8 @@ trackedFiles: pristine_git_object: fd4c69477d809e0eb57fb7583a0dac7202cb8db5 docs/sdks/clients/README.md: id: ba883fd0c1cf - last_write_checksum: sha1:0a6a714b890937142d07c6036d56907b4cd430e3 - pristine_git_object: 3c679b0187d753c19660e37d43f6978052219afa + last_write_checksum: sha1:d7ca133c26afe04192524c69aacae529023cc643 + pristine_git_object: 038cc8aa5b5e52eea75035c6785f6bcfd78c788e docs/sdks/clientsearch/README.md: id: 0a2a3cf68489 last_write_checksum: sha1:99ccebe91c1ecfbd78fc84eb3a3b804e105ba86c @@ -4426,8 +4426,8 @@ trackedFiles: pristine_git_object: 591db4d22a99e6ab341f39b8573f9a46e0777c37 docs/sdks/departments/README.md: id: 12342c54f2cb - last_write_checksum: sha1:f31385f326d09b3ec9f198840ac5c116f3445a75 - pristine_git_object: daa008d7229a9ca396a45ac7c6edc18698ff46f0 + last_write_checksum: sha1:bf5a707dac89e90b6d69d76e2bdcd08625eceb45 + pristine_git_object: cd39e77856a8dcbd4bc523f928bc89765078fb29 docs/sdks/documentssdk/README.md: id: 170a0b5b4d02 last_write_checksum: sha1:25b5ba12873295d749dccd95c1568fd6df97d1f1 @@ -4510,8 +4510,8 @@ trackedFiles: pristine_git_object: 247855caababfe9bd69dfdec41b48c0ef37ccde8 docs/sdks/users/README.md: id: 5d80027045fe - last_write_checksum: sha1:3d2413654479e392ba2ea3f910e78c2c3bddc825 - pristine_git_object: 5fd6a2c999be94752411349e0a8be17f582fc7d3 + last_write_checksum: sha1:e2576f093a86223fccad991895ca708f2397a8c0 + pristine_git_object: 508999b4460719466355fb53198e5b3e7d1755f8 docs/sdks/visibilityoverrides/README.md: id: c7d003d6a68f last_write_checksum: sha1:fc3e187db9d3cc0e525fa1c3f0a6c309f94ed64f @@ -4530,8 +4530,8 @@ trackedFiles: pristine_git_object: 79e388be87446ab6a4064b372bad0e8376d0cb5e pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:a977c4151ee827468dea59bbe83c574354d3fd96 - pristine_git_object: c72b3762456a588b361a95cb167fa451a91d44e4 + last_write_checksum: sha1:e99bb0983f07e3a326488a1592e6b8cedb9246d1 + pristine_git_object: acb346d7e898836521100748692da4f1927a02fa scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:1ad9251ca23c3f195fed36dfc0d83254a65bd895 @@ -4558,24 +4558,24 @@ trackedFiles: pristine_git_object: d7f9b51b5278bc431e9787d13e98d7199e08bed4 src/glean/api_client/_version.py: id: 0ce22b26136b - last_write_checksum: sha1:87f083b081a79fa2d8bfbca3921c8672b20cbe70 - pristine_git_object: 03f4b3e3bc48091f828fa1b64b6aee25a427ef9a + last_write_checksum: sha1:c4ae62cb966cf5bacddd3935e99b6f5d52b50d93 + pristine_git_object: fb1201e37c49c59dc48d64e5e0c981f1066e94f9 src/glean/api_client/admin.py: id: 583cfae82adf last_write_checksum: sha1:e73ee99e804e8bb3859346c4f8117a608da53862 pristine_git_object: 0d3f32802452398650c159c8f24a8e565c93e342 src/glean/api_client/admin_agents.py: id: d9becdfd4be8 - last_write_checksum: sha1:70b32110f6789575d85f122804ec3e48ed994b92 - pristine_git_object: 6fd07dd6f86ba6632caf40d3a41ec42c154a4fb0 + last_write_checksum: sha1:c0853de38d7cb4b2c541d6c8ca8048eea53c9d6c + pristine_git_object: aea15e858261d65cb3a116f93604eff2a8b926b1 src/glean/api_client/admin_idpgroups.py: id: 8f0ad8c9671c - last_write_checksum: sha1:d4751084dc6780ea8aaa98ce000e5650d75b0de4 - pristine_git_object: 5802968f9e2622e2eba593eb07385a4eff94b72f + last_write_checksum: sha1:1bbb3b8c37013a8f83327fb28d5c3565a8da4acb + pristine_git_object: df4d78a1a14ec76a41757c2d0b313c87223284d8 src/glean/api_client/agents.py: id: b925701a9217 - last_write_checksum: sha1:cdeef340a5e7adcf46407e2e781a90c7726a89b2 - pristine_git_object: 51f5d37e81b9c93bfa8e395115b76dd4afbe8ab5 + last_write_checksum: sha1:b6a222bbb7cdfed2d521f00446f06458f54d632f + pristine_git_object: c87486fcba07e29cdc7179378c825888ab1bd50f src/glean/api_client/announcements.py: id: 452f3d593912 last_write_checksum: sha1:034640f1156b65b678f191eb7da60678f049ca39 @@ -4638,8 +4638,8 @@ trackedFiles: pristine_git_object: a32adc434780783e5f8af978da829e2ed367dfbc src/glean/api_client/clients.py: id: 42c841daa28c - last_write_checksum: sha1:e6559b380927842147e2da1e736b0d824c50a8d8 - pristine_git_object: 11cc3ed79762f46ae828fe936af4c1f574ac72f0 + last_write_checksum: sha1:5dd2cac3fa35bc850871f427e3eb8eab9ffba7c0 + pristine_git_object: 8c3240fd1bbd075bbc779463af58283fced16315 src/glean/api_client/collections.py: id: df34f0fd10dd last_write_checksum: sha1:05ad538ea0f8843387247247be2d0db085ccca6c @@ -4654,8 +4654,8 @@ trackedFiles: pristine_git_object: e387ce4fe842388b52fd57746655dd2187cb3e74 src/glean/api_client/departments.py: id: 04b4ac5904bb - last_write_checksum: sha1:73c0d609453bff0542f6b482dddf7853ab172aff - pristine_git_object: b0f88746135d3ce598f1597bc2daa6ebe1eadcd8 + last_write_checksum: sha1:3fc3b09822d07372efc8693fde803c7cb161548a + pristine_git_object: 62198cb82975ae2a0c91942cf91cd8d42c889856 src/glean/api_client/documents_sdk.py: id: 9e873980fc76 last_write_checksum: sha1:66d8859c3e9a72b0dc9b28aa9fb9e3da35fe5dac @@ -6706,8 +6706,8 @@ trackedFiles: pristine_git_object: d4f2de244c4294c7f6a646c9d07d72c792104935 src/glean/api_client/models/platformagent.py: id: edd82e5a258f - last_write_checksum: sha1:3ff28375aa3189c0e66dc11e60429db53c2204b8 - pristine_git_object: e5645ffbd9ef3242b934982955f7c4af0c9e8a86 + last_write_checksum: sha1:d2ca884454d95707818777473df29bc8a5225a6e + pristine_git_object: c1e65b7a2b135b9ba9531c4648178ca8e6ec4abc src/glean/api_client/models/platformagentcapabilities.py: id: 16d4984052e6 last_write_checksum: sha1:4a29985c9b42042fec3e5553e94198d8ec1a3afe @@ -6730,8 +6730,8 @@ trackedFiles: pristine_git_object: 64a9a797514bb3fb1f2660405962238c495463fc src/glean/api_client/models/platformagentcreaterequest.py: id: b843832ad4e6 - last_write_checksum: sha1:829fd2b7733d36f6abe554fb66befaf6966409f0 - pristine_git_object: f7b2fb1d41968762d976a457a940519fc6171f67 + last_write_checksum: sha1:134af695bc94ab69d0d172b78d1a8bf81bcc5597 + pristine_git_object: dc8a60f9e2010a0282753cb0ecb7248e0f7c5a13 src/glean/api_client/models/platformagentdependency.py: id: c31be34811a7 last_write_checksum: sha1:4bbabbb8f8758d4ea0a033631be1ffa7bcd8dc82 @@ -6870,8 +6870,8 @@ trackedFiles: pristine_git_object: d9241c63ad8ffe584b4bfa0a2ecdcd696853b8a0 src/glean/api_client/models/platformagentupdaterequest.py: id: 30f9327fa395 - last_write_checksum: sha1:557474f4c5d693e6265b4cdb472dbc89dc981971 - pristine_git_object: 526ebbbbab303583fb3be2bf2fc9762889bc7ba6 + last_write_checksum: sha1:0a9ebb785e6199ff6dc323e799168b360392dab1 + pristine_git_object: 89a65130d98782146865f456677e55aad8bf8204 src/glean/api_client/models/platformanonymousauthtoken.py: id: d6ed962e28a2 last_write_checksum: sha1:5225faf0e1d49e6237606d2a1e5522b1d44b4f36 @@ -7114,24 +7114,24 @@ trackedFiles: pristine_git_object: 894c92a4d4abba11e641b1cddbca476b5bde17f9 src/glean/api_client/models/platformlistadminagentsresponse.py: id: f2bde0abdb4c - last_write_checksum: sha1:af4313e7b0eb293fdd4b41209ffa6878791c37a2 - pristine_git_object: 77c92a0ef2c855ae66b5808f7182766058524d3c + last_write_checksum: sha1:cd0bff407260a34b268eca93b11de3f85f9cfe67 + pristine_git_object: da24dab157c7805bfad8ecba6d179049ea36050b src/glean/api_client/models/platformlistdepartmentsresponse.py: id: e9f64ae3372f - last_write_checksum: sha1:fecbc9fd3475ba90fc491dd9d735c4abed1a54b1 - pristine_git_object: de00d93acf23dc62c101edd4eb06bf1f76bcc99f + last_write_checksum: sha1:8e3a2b5610f25401843b4aa4e25f02e228ca55bb + pristine_git_object: 54e88bf18f9ee9c2b353b04bad2aebca4ed04641 src/glean/api_client/models/platformlistidpgroupsresponse.py: id: 44674fdaaef8 - last_write_checksum: sha1:1ba5f66a0e09c1afb329d3af82195dc07a5f761c - pristine_git_object: 357000ad80487e78240fe2b90f366a4d5eacc0f3 + last_write_checksum: sha1:54ec829e6f07294321abaddf891aae715c651852 + pristine_git_object: f36dc6d727cc7656f01bb10652234d06e686c0a6 src/glean/api_client/models/platformlistoauthclientsresponse.py: id: 235bf58adc51 - last_write_checksum: sha1:91b7bc54c077dde637d4d8bf752da27acc9ead7c - pristine_git_object: dc8fd19218c082de8952192bcf031ca1d6d84560 + last_write_checksum: sha1:64bd17833aeb3fe017f4ee3ab93b77d9f1acf401 + pristine_git_object: 89451272f91b7aacc672c1a4ce5f69c9a8ca2c28 src/glean/api_client/models/platformlistusersresponse.py: id: b6850e9c2d42 - last_write_checksum: sha1:01a25e26cd4ac52c3e5c3c9f30e2a37456e76f32 - pristine_git_object: eaa6372faa9ce96e2efcfa9acab4d90b50e2b35e + last_write_checksum: sha1:3992a35c93c385b73ac20391dba7c05aeea4fd91 + pristine_git_object: 5b0c10d701c5fbcbdd12fa6dae453be49db632d5 src/glean/api_client/models/platformmessage.py: id: 5124dae40c5d last_write_checksum: sha1:44b6469147e93a949f98513471367939bef9b56b @@ -8214,8 +8214,8 @@ trackedFiles: pristine_git_object: 795420690ec7f336d8ee2648b6d6c718984a5cc8 src/glean/api_client/users.py: id: f7d2f9613f16 - last_write_checksum: sha1:62408e6f9a412f0c911d437c3e0e755d0e57ef82 - pristine_git_object: 2e13bdb51e3129ec2f30be8ea99c38697d5d10d3 + last_write_checksum: sha1:1b0d836cdb2e5cb3298b345f44328d0a28f0b1eb + pristine_git_object: 718c662d3b28755e97af862ec6965d0eef4c55e4 src/glean/api_client/utils/__init__.py: id: d681dc4f06b3 last_write_checksum: sha1:fe273919f43134738846009bf64f4497dde41416 @@ -10490,8 +10490,8 @@ trackedFiles: pristine_git_object: d34c4f86aa5967d3b555518afafefa29c9106db9 tests/mockserver/internal/sdk/models/components/platformagent.go: id: dcdd9a7bc9de - last_write_checksum: sha1:d439b050632d6d15459f06e0a8af9b9a14f4a70b - pristine_git_object: 51dd21faf855adc5425f61473fd38704dde1b829 + last_write_checksum: sha1:0793c1f53bfbe2f2c1d5a39489cc8a7ace32aa54 + pristine_git_object: 281a16c8c87a1be748396c40f79c7b83e123f957 tests/mockserver/internal/sdk/models/components/platformagentcapabilities.go: id: 2807a52a8b1a last_write_checksum: sha1:9d501149286de61ae65a0ef7dd4286c8ca281439 @@ -10514,8 +10514,8 @@ trackedFiles: pristine_git_object: bef62e0bcf7af0d59d450ea67a914701b1b82834 tests/mockserver/internal/sdk/models/components/platformagentcreaterequest.go: id: 51781b8cb8a1 - last_write_checksum: sha1:1dbde51742043e84bb49a543d6bd0e5c0f346e06 - pristine_git_object: cd9c2e977a1662929a895b115becf772f16cb32a + last_write_checksum: sha1:7af88d864efa9af1b62c76084daf4c1af76a5e44 + pristine_git_object: aa31cd58d82139f02ea6b747a6857fc98b69f98b tests/mockserver/internal/sdk/models/components/platformagentdependency.go: id: 3f7712d41e8a last_write_checksum: sha1:e40c1b77c9d40ac78a790bc19ba3c34c90d2f969 @@ -10654,8 +10654,8 @@ trackedFiles: pristine_git_object: 4a53656d4058a702ca6892fdaaf11ecb0ac69d3b tests/mockserver/internal/sdk/models/components/platformagentupdaterequest.go: id: c4201fdb93ac - last_write_checksum: sha1:5be1c2bbcb3b088df866dec4c574308b480accd4 - pristine_git_object: 3cf44a122068ee3128a20c062fa0d51cb720a938 + last_write_checksum: sha1:2a06c989da548fd728cc5dd8a54ce0fa0687630a + pristine_git_object: 2b07afdce2d3e8807af838cd8ca4fd12a08706f6 tests/mockserver/internal/sdk/models/components/platformanonymousauthtoken.go: id: 40614e5e590d last_write_checksum: sha1:f8a3e8bfd081e3be299ba6aabfe2d7fc14a00232 @@ -10898,24 +10898,24 @@ trackedFiles: pristine_git_object: cbc2c22668af0f91a368e432291b934804357560 tests/mockserver/internal/sdk/models/components/platformlistadminagentsresponse.go: id: df07b2205bbb - last_write_checksum: sha1:8ae00dd02f8dd05c5373b9a4c19296ab4c210eae - pristine_git_object: c5ba2f2e82d3032e63d99dfa22b8d7cad961bc95 + last_write_checksum: sha1:9b23421dd1caf16aafd2cedb5c217656857a725e + pristine_git_object: 5ede5672839863dd14d1250d1b348c6c465cf1c6 tests/mockserver/internal/sdk/models/components/platformlistdepartmentsresponse.go: id: adc42a0bfc78 - last_write_checksum: sha1:f68c6751d54155d29e7a905443a30f075885c487 - pristine_git_object: a00ff10bd71ffeaafd74c0e1d1b3e23c82511280 + last_write_checksum: sha1:d8ca8c640a0845396e621d523867893f76368dad + pristine_git_object: f92fc19cb67b6b90b348efbc6c1dee07b1389b43 tests/mockserver/internal/sdk/models/components/platformlistidpgroupsresponse.go: id: 55a2cbdd724a - last_write_checksum: sha1:5c7c5cb2b28ead8f33176301cdb1c841c03b7cda - pristine_git_object: 6c2cdf0e9918bf8dff8ac4f3991c6f1ffcb0b686 + last_write_checksum: sha1:3c77eaea4a493035e49d92fbbf7968f8ec364115 + pristine_git_object: ec313b0199acde345410d3d5dea83bfb93983284 tests/mockserver/internal/sdk/models/components/platformlistoauthclientsresponse.go: id: f9141dfe3b1e - last_write_checksum: sha1:6e4911a0ca93d594c117d9c77f42ad46c4005c66 - pristine_git_object: 2b393bcc05490d7084c4222214b04057bf4b6b89 + last_write_checksum: sha1:9687522480d19121dcaa27dc4e313980b36577bb + pristine_git_object: 31abc42b533852369923897044caae071801abe0 tests/mockserver/internal/sdk/models/components/platformlistusersresponse.go: id: 5cdeb58de0ed - last_write_checksum: sha1:d8a45dfce7a90998a999819650fc82241d7443db - pristine_git_object: e3b40b30790262235f67af2773d5e5f1c20c6652 + last_write_checksum: sha1:ccf2d1bc428c67d460d8cd4bc151fa27718ff35b + pristine_git_object: 3f409fb70d6197273c0b770c05b9518970a45335 tests/mockserver/internal/sdk/models/components/platformmessage.go: id: 5eb3e8c3fd80 last_write_checksum: sha1:a0bd9faaca42357ca01a61ec39c17e81f9d1f6f8 @@ -12206,8 +12206,8 @@ trackedFiles: pristine_git_object: 1dc8cb1ce0b4d02c24fad133da0ecfa0d9c7d14a tests/mockserver/internal/sdk/models/operations/platformagentscreate.go: id: 1705b980be18 - last_write_checksum: sha1:9c7ee1f2c4c768d3525947dac4dbbeb8ee7ab57a - pristine_git_object: f2775424aa4f1c5041f9062fe92c85d50eab285a + last_write_checksum: sha1:8113f2baa31c20fc36c0ee103ee45305bfe8db93 + pristine_git_object: d2b009ecb4dcf67e3943ad74eae1b1a0cbd07f28 tests/mockserver/internal/sdk/models/operations/platformagentscreaterun.go: id: eb220c44e3e3 last_write_checksum: sha1:c8487ba5d0a7224ae6cd70f45b742c4cbbc4a1ce @@ -12242,8 +12242,8 @@ trackedFiles: pristine_git_object: 4577d3f9625229f6380f2a1cb670b0c8a7e2faaf tests/mockserver/internal/sdk/models/operations/platformagentsupdate.go: id: 572ae19775e1 - last_write_checksum: sha1:847fb5c41e6db32dc3341ea8f4d3f04808d3497f - pristine_git_object: ed24f5f0ebbe1f93ba36267696a811e7256fddb1 + last_write_checksum: sha1:798b23efb887f12cb2864dfbe0b93a0f456866fc + pristine_git_object: 010ccea0a9266bab01a67b2c54b7e0a50cab4d01 tests/mockserver/internal/sdk/models/operations/platformanonymousauthtokenscreate.go: id: b25fec134c50 last_write_checksum: sha1:754ddc527ab13e03bb78cfbe76918ed0bf408bd6 @@ -12762,8 +12762,8 @@ trackedFiles: pristine_git_object: 7a7b4f022114dadb9e4b2357e6f118e3f433297a tests/test_agents.py: id: 2eb70a860f3a - last_write_checksum: sha1:331c12ed5156e17c68c1169db796538dcf5c8c7b - pristine_git_object: 5532cb18cf31f95f51f57b06736f622d6fdeb431 + last_write_checksum: sha1:ca07118e8ebdbe1c9c6341bfedd8724c00d09220 + pristine_git_object: b95275829f2196fe6a05472c13c5c52e61a25d8a tests/test_announcements.py: id: 720cc07fca06 last_write_checksum: sha1:39bc24c23ab0faa485022e86e6ede90b4ef9b7ba @@ -12882,8 +12882,8 @@ trackedFiles: pristine_git_object: 839a973d9a0c4243b453cba121087bb921380823 tests/test_messages.py: id: be23089b1f8b - last_write_checksum: sha1:34f6d993311df6b97fc7d772fc92121adb3cd4cf - pristine_git_object: 667b5caa720e1ef399d321ea0df68e54977591c8 + last_write_checksum: sha1:e2d6779abf3562c98de25c298ddb338f0efdd225 + pristine_git_object: ca6a9f4bdb3465e8538470fc6dc97147ea387499 tests/test_models.py: id: 044905dfea3f last_write_checksum: sha1:da2e3fda84945955a1876c7f7337b743857859fe @@ -12914,8 +12914,8 @@ trackedFiles: pristine_git_object: 526919dd9f43054d8d75711a293a78e098117a59 tests/test_summarize.py: id: a255d8a6f627 - last_write_checksum: sha1:876530142700cffca9c3f6bf0119cd052b6258ca - pristine_git_object: 59a3def446ee27bfad56068d665960c9b8ff0bb3 + last_write_checksum: sha1:f26a65eed2a01159213a903e7258c441c948de87 + pristine_git_object: 571e0cc51b3cc6d3ef276ff2e0d661b5f43f06a9 tests/test_tools.py: id: 70889bdf7321 last_write_checksum: sha1:474f60fca9f3dbfa783d7f3b822c0f44748ad915 @@ -14573,7 +14573,7 @@ examples: platform-agents-create: speakeasy-default-platform-agents-create: requestBody: - application/json: {"name": "HR Policy Agent", "instructions": "Answer employee questions about HR policies and benefits."} + application/json: {"name": "HR Policy Agent", "instructions": "Answer employee questions about HR policies and benefits.", "draft": false} responses: "201": application/json: {"agent": {"name": "HR Policy Agent", "agent_id": "ef33aecf52c142a6873adf76037b642e", "capabilities": {}, "subagents": [{"name": "HR Policy Agent"}]}, "request_id": ""} @@ -14897,13 +14897,7 @@ generatedTests: platform-models-list: "2026-12-01T00:45:52Z" platform-anonymous-auth-tokens-create: "2026-12-01T00:45:52Z" getImage: "2026-12-01T00:45:52Z" -releaseNotes: | - ## Python SDK Changes: - * `glean.models.list()`: **Added** - * `glean.anonymousauthtokens.create()`: **Added** - * `glean.client.chat.retrieve_image()`: **Added** - * `glean.chat.create()`: `request` **Changed** - * `glean.chat.create_stream()`: `request` **Changed** +releaseNotes: "## Python SDK Changes:\n* `glean.agents.create()`: \n * `request.draft` **Added**\n * `response.agent.is_draft` **Added**\n* `glean.agents.search()`: `response.agents[].is_draft` **Added**\n* `glean.agents.get()`: `response.agent.is_draft` **Added**\n* `glean.agents.update()`: \n * `request.draft` **Added**\n * `response.agent.is_draft` **Added**\n* `glean.admin.agents.list()`: `response.results[].is_draft` **Added**\n" generatedFiles: - .devcontainer/README.md - .devcontainer/devcontainer.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index ec308872c..50250b843 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -36,7 +36,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: true python: - version: 0.18.2 + version: 0.18.3 additionalDependencies: dev: {} main: diff --git a/.speakeasy/glean-merged-spec.yaml b/.speakeasy/glean-merged-spec.yaml index 122563994..c2b7e5287 100644 --- a/.speakeasy/glean-merged-spec.yaml +++ b/.speakeasy/glean-merged-spec.yaml @@ -2,8 +2,8 @@ openapi: 3.1.0 info: version: "0.9.0" title: Glean API - x-source-commit-sha: 31ad03140234f66424854f64d0106442914e8fae - x-open-api-commit-sha: f55eff25e144e29e05f049264bcf2db6777b91d3 + x-source-commit-sha: 7f218a9ea1ab084e3b46c7dad232a4d44cf43147 + x-open-api-commit-sha: 6381df9b6e86549cc1727e8f040b447551a2f77f 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. @@ -37,7 +37,7 @@ paths: - Agents summary: Create agent description: | - Create and publish an agent from its complete definition. + Create an agent from its complete definition. The agent is published unless `draft` is true. operationId: platform-agents-create x-glean-scopes: legacy: @@ -60,7 +60,7 @@ paths: $ref: "#/components/schemas/PlatformAgentCreateRequest" responses: "201": - description: Agent created and published. + description: Agent created. content: application/json: schema: @@ -200,7 +200,7 @@ paths: - Agents summary: Update agent description: | - Update and publish an agent. Supplied fields replace their saved values and omitted fields are kept. + Update an agent. Supplied fields replace their saved values, and omitted fields are kept. Updates to a published agent are published. Updates to a draft agent stay in its draft until `draft` is false. operationId: platform-agents-update x-glean-scopes: legacy: @@ -231,7 +231,7 @@ paths: $ref: "#/components/schemas/PlatformAgentUpdateRequest" responses: "200": - description: Agent updated and published. + description: Agent updated. content: application/json: schema: @@ -2620,7 +2620,7 @@ paths: stage: beta introduced: "2026-09-25" description: | - Requires usage.limit_increase_requests:read. The collection is limited to the authenticated canonical user's requests, including resolved requests. Cursors bind the filters and current authorization context; a billing grant cannot widen results. Supported token issuance, experimental opt-in, and request-more enablement are required. Missing opt-in or a disabled flag returns 404. + Requires usage.limit_increase_requests:read. The collection is limited to the authenticated canonical user's requests, including resolved requests. Cursors bind the filters and current authorization context; a billing grant cannot widen results. Supported token issuance, experimental opt-in, and request-more enablement are required. Missing opt-in or a disabled flag returns 404. A page leaves out a stored request that this API cannot represent; reading that request by identifier returns 503. parameters: - $ref: "#/components/parameters/PageSize" description: Maximum page size; defaults to 20 and cannot exceed 100. @@ -2800,7 +2800,7 @@ paths: stage: beta introduced: "2026-09-25" description: | - Requires admin.usage.limit_increase_requests:read and current workspace billing read permission. Agent ownership is not queue access. Cursors bind filters and current authorization context. Supported token issuance, experimental opt-in, and request-more enablement are required. Missing opt-in or a disabled flag returns 404, not a successful empty page. + Requires admin.usage.limit_increase_requests:read and current workspace billing read permission. Agent ownership is not queue access. Cursors bind filters and current authorization context. Supported token issuance, experimental opt-in, and request-more enablement are required. Missing opt-in or a disabled flag returns 404, not a successful empty page. A page leaves out a stored request that this API cannot represent; reading that request by identifier returns 503. parameters: - $ref: "#/components/parameters/PageSize" description: Maximum page size; defaults to 20 and cannot exceed 100. @@ -2970,7 +2970,7 @@ paths: - OAuth clients summary: List OAuth clients description: | - List the static OAuth clients that admins created for this workspace, ordered by display_name and then by client_id. Dynamically registered clients and Glean's own clients, such as Glean Desktop, are not listed. Disabled clients are left out unless an is_enabled filter includes the value "false". Use filters to find clients by name, client_id, usage_client_id, LLM Gateway access, or supported app. To set a usage limit for a client, send its ai_gateway.usage_client_id, not its client_id, to the usage APIs. The caller needs admin read or billing read permission. + List the static OAuth clients that admins created for this workspace, ordered by display_name and then by client_id. Only about the first 2 KB of a name is compared, less when client_id is long, so names that share that leading part are ordered by client_id. Dynamically registered clients and Glean's own clients, such as Glean Desktop, are not listed. Disabled clients are left out unless an is_enabled filter includes the value "false". Use filters to find clients by name, client_id, usage_client_id, LLM Gateway access, or supported app. To set a usage limit for a client, send its ai_gateway.usage_client_id, not its client_id, to the usage APIs. The caller needs admin read or billing read permission. operationId: platform-admin-oauth-clients-list x-glean-scopes: legacy: @@ -3096,7 +3096,7 @@ paths: - Departments summary: List departments description: | - List the departments in the Glean directory, ordered by display_name and then by department_id. The list includes every department that at least one user belongs to or that a usage limit names, so a caller can show the name of a department that a usage limit still names after its users leave it. Department names are exact, so names that differ only by case are different departments. Send a name filter to return only the departments whose display_name contains a value. + List the departments in the Glean directory, ordered by display_name and then by department_id. Only about the first 2 KB of a name is compared, less when department_id is long, so names that share that leading part are ordered by department_id. The list includes every department that at least one user belongs to or that a usage limit names, so a caller can show the name of a department that a usage limit still names after its users leave it. Department names are exact, so names that differ only by case are different departments. Send a name filter to return only the departments whose display_name contains a value. operationId: platform-departments-list x-glean-scopes: legacy: @@ -3234,7 +3234,7 @@ paths: - IdP Groups summary: List IdP groups description: | - List the identity provider (IdP) groups that Glean loads from the directory, ordered by display_name and then by idp_group_id. Use idp_group_id to name a group in other Platform APIs, such as the usage limit evaluation and limit increase request APIs. Usage limits apply only to IdP groups from the datasource instance in usage_settings.user_grouping.idp_group_provider_instance of the get usage settings response, and this API always lists that instance's groups. To list only those groups, pass that value in a provider_instance filter of the filters parameter, for example `filters=[{"field":"provider_instance","operator":"EQUALS","values":["okta"]}]`, URL-encoded as `filters=%5B%7B%22field%22%3A%22provider_instance%22%2C%22operator%22%3A%22EQUALS%22%2C%22values%22%3A%5B%22okta%22%5D%7D%5D`. Send a provider filter to list only one provider's groups, and a name filter to list only the groups whose display_name contains a value. Internal O365 ownership groups and SharePoint groups are left out. The caller must be able to read the workspace configuration or the workspace billing. + List the identity provider (IdP) groups that Glean loads from the directory, ordered by display_name and then by idp_group_id. Only about the first 2 KB of a name is compared, less when idp_group_id is long, so names that share that leading part are ordered by idp_group_id. Use idp_group_id to name a group in other Platform APIs, such as the usage limit evaluation and limit increase request APIs. Usage limits apply only to IdP groups from the datasource instance in usage_settings.user_grouping.idp_group_provider_instance of the get usage settings response, and this API always lists that instance's groups. To list only those groups, pass that value in a provider_instance filter of the filters parameter, for example `filters=[{"field":"provider_instance","operator":"EQUALS","values":["okta"]}]`, URL-encoded as `filters=%5B%7B%22field%22%3A%22provider_instance%22%2C%22operator%22%3A%22EQUALS%22%2C%22values%22%3A%5B%22okta%22%5D%7D%5D`. Send a provider filter to list only one provider's groups, and a name filter to list only the groups whose display_name contains a value. Internal O365 ownership groups and SharePoint groups are left out. The caller must be able to read the workspace configuration or the workspace billing. operationId: platform-admin-idp-groups-list x-glean-scopes: legacy: @@ -3421,7 +3421,7 @@ paths: - Users summary: List users description: | - List the users in the Glean directory, ordered by display_name and then by user_id. The list includes the same people as the Glean People directory. Filter by name, email, manager_id, or department_id to find specific users. Use the returned user_id values with other Platform APIs, for example as usage limit targets. + List the users in the Glean directory, ordered by display_name and then by user_id. Only about the first 2 KB of a name is compared, less when user_id is long, so names that share that leading part are ordered by user_id. The list includes the same people as the Glean People directory. Filter by name, email, manager_id, or department_id to find specific users. Use the returned user_id values with other Platform APIs, for example as usage limit targets. operationId: platform-users-list x-glean-scopes: legacy: @@ -3598,7 +3598,7 @@ paths: - Admin Agents summary: List all agents description: | - List every agent in the workspace, ordered by name and then by agent_id. Each agent has the same shape that Get agent returns. Unlike agent search, the list does not depend on who an agent is shared with, so it includes private and disabled agents. Deleted agents are left out. Use the agent_id with other Platform APIs, for example as a usage limit target. The caller must be able to read all agents, administer agents, or read workspace billing. + List every agent in the workspace, ordered by name and then by agent_id. Only about the first 2 KB of a name is compared, less when agent_id is long, so names that share that leading part are ordered by agent_id. Each agent has the same shape that Get agent returns. Unlike agent search, the list does not depend on who an agent is shared with, so it includes private and disabled agents. Deleted agents are left out. Use the agent_id with other Platform APIs, for example as a usage limit target. The caller must be able to read all agents, administer agents, or read workspace billing. operationId: platform-admin-agents-list x-glean-scopes: legacy: @@ -10440,6 +10440,11 @@ components: $ref: "#/components/schemas/PlatformSubagent" trigger: $ref: "#/components/schemas/PlatformAgentTrigger" + draft: + type: boolean + default: false + description: | + Whether to save the agent as an unpublished draft instead of publishing it. PlatformAgentCapabilities: type: object additionalProperties: true @@ -10495,6 +10500,10 @@ components: $ref: "#/components/schemas/PlatformSubagent" trigger: $ref: "#/components/schemas/PlatformAgentTrigger" + is_draft: + type: boolean + description: | + Whether the agent is an unpublished draft that has never been published. Omitted for a published agent. created_by: $ref: "#/components/schemas/PlatformPersonReference" description: Person who created the agent. Omitted when the agent hides attribution. @@ -10776,6 +10785,10 @@ components: $ref: "#/components/schemas/PlatformAgentTrigger" description: | How the agent is invoked. Applies to top-level agents only. The supplied object replaces the entire saved trigger, including its input fields, prompts, and content filters, so omitted fields are removed. + draft: + type: boolean + description: | + Whether the update is saved as an unpublished draft. Defaults to the agent's current state. `false` publishes a draft agent. `true` isn't allowed for a published agent. PlatformActionSummary: type: object required: @@ -15003,7 +15016,7 @@ components: resolution_target: $ref: "#/components/schemas/PlatformRequestResolutionTarget" description: | - Stored approval breadth, only on approvals; older PERIOD approvals may omit it. + Stored approval breadth, only on approvals; older PERIOD approvals may omit it. AGENT ONGOING approvals, which raise the agent's own limit, always omit it. resolution_target_id: type: string description: | @@ -15020,8 +15033,31 @@ components: format: date-time description: Last stored update time; this is the resolution time for resolved requests. allOf: - - $ref: "#/components/schemas/PlatformRequestResolutionFields" - description: Shared resolution target and identifier pairings. + - description: Shared resolution pairings, or a stored AGENT ONGOING approval without a target. + oneOf: + - $ref: "#/components/schemas/PlatformRequestResolutionFields" + description: Shared resolution target and identifier pairings. + - description: A stored AGENT ONGOING approval raises the agent's own limit without a breadth. + required: + - entity_type + - scope + properties: + entity_type: + description: Agent request. + enum: + - AGENT + scope: + description: Ongoing approval. + enum: + - ONGOING + not: + anyOf: + - required: + - resolution_target + description: Detect a resolution target. + - required: + - resolution_target_id + description: Detect a resolution target identifier. - description: Status determines which approval fields are present. oneOf: - description: An approval always records its amount and scope. @@ -15435,7 +15471,8 @@ components: properties: results: type: array - description: The clients on this page, ordered by display_name and then by client_id. + description: | + The clients on this page, ordered by display_name and then by client_id. Only about the first 2 KB of a name is compared, less when client_id is long, so names that share that leading part are ordered by client_id. items: $ref: "#/components/schemas/PlatformOAuthClient" has_more: @@ -15523,7 +15560,7 @@ components: results: type: array description: | - The departments on this page, ordered by display_name and then by department_id. + The departments on this page, ordered by display_name and then by department_id. Only about the first 2 KB of a name is compared, less when department_id is long, so names that share that leading part are ordered by department_id. items: $ref: "#/components/schemas/PlatformDepartment" has_more: @@ -15632,7 +15669,7 @@ components: results: type: array description: | - The IdP groups on this page, ordered by display_name and then by idp_group_id. + The IdP groups on this page, ordered by display_name and then by idp_group_id. Only about the first 2 KB of a name is compared, less when idp_group_id is long, so names that share that leading part are ordered by idp_group_id. items: $ref: "#/components/schemas/PlatformIdpGroup" has_more: @@ -15842,7 +15879,8 @@ components: properties: results: type: array - description: The users on this page, ordered by display_name and then by user_id. + description: | + The users on this page, ordered by display_name and then by user_id. Only about the first 2 KB of a name is compared, less when user_id is long, so names that share that leading part are ordered by user_id. items: $ref: "#/components/schemas/PlatformUser" has_more: @@ -15924,7 +15962,8 @@ components: properties: results: type: array - description: The agents on this page, ordered by name and then by agent_id. + description: | + The agents on this page, ordered by name and then by agent_id. Only about the first 2 KB of a name is compared, less when agent_id is long, so names that share that leading part are ordered by agent_id. items: $ref: "#/components/schemas/PlatformAgent" has_more: diff --git a/.speakeasy/tests.arazzo.yaml b/.speakeasy/tests.arazzo.yaml index 3f1c25686..156681447 100644 --- a/.speakeasy/tests.arazzo.yaml +++ b/.speakeasy/tests.arazzo.yaml @@ -159816,6 +159816,7 @@ workflows: requestBody: contentType: application/json payload: + draft: false instructions: Answer employee questions about HR policies and benefits. name: HR Policy Agent successCriteria: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 223588510..7f28e71d3 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.813.1 sources: Glean API: sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:9131f5e7e4df026356a1ea4c21ff018af9de5f7262878da2eeef4ed9b7cab02a - sourceBlobDigest: sha256:a2cbc5f3b13973c3bf3f9c191c68e5a66507d417b6f3a9f7b910e8d6e5dd463e + sourceRevisionDigest: sha256:bdcb0dbcf7ae7324d15e7f46ba8291bf74be5c4daacbf930f31d4dc3e1efbaea + sourceBlobDigest: sha256:d743169e3ca265ba4d65014ae114a8053cacc1848e996be3b3f8401274c574e4 tags: - latest Glean Client API: @@ -16,10 +16,10 @@ targets: glean: source: Glean API sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:9131f5e7e4df026356a1ea4c21ff018af9de5f7262878da2eeef4ed9b7cab02a - sourceBlobDigest: sha256:a2cbc5f3b13973c3bf3f9c191c68e5a66507d417b6f3a9f7b910e8d6e5dd463e + sourceRevisionDigest: sha256:bdcb0dbcf7ae7324d15e7f46ba8291bf74be5c4daacbf930f31d4dc3e1efbaea + sourceBlobDigest: sha256:d743169e3ca265ba4d65014ae114a8053cacc1848e996be3b3f8401274c574e4 codeSamplesNamespace: glean-api-specs-python-code-samples - codeSamplesRevisionDigest: sha256:c27b9ec36a1513cc5259f05b576572f3ef648e31a6aa464948ec088be72ad3e3 + codeSamplesRevisionDigest: sha256:282b92739e19bc3876455f8e9bd12c12335f3b963f2a1c505998d51fe6a41839 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index c29018cf0..b2618f7c9 100644 --- a/README.md +++ b/README.md @@ -276,7 +276,7 @@ with Glean( { "name": "HR Policy Agent", }, - ]) + ], draft=False) # Handle response print(res) @@ -741,7 +741,7 @@ with Glean( { "name": "HR Policy Agent", }, - ], + ], draft=False, RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False)) # Handle response @@ -765,7 +765,7 @@ with Glean( { "name": "HR Policy Agent", }, - ]) + ], draft=False) # Handle response print(res) @@ -885,7 +885,7 @@ with Glean( { "name": "HR Policy Agent", }, - ]) + ], draft=False) # Handle response print(res) @@ -909,7 +909,7 @@ with Glean( { "name": "HR Policy Agent", }, - ]) + ], draft=False) # Handle response print(res) diff --git a/RELEASES.md b/RELEASES.md index 8fec7c98d..d251647e6 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1128,4 +1128,14 @@ Based on: ### Generated - [python v0.18.2] . ### Releases -- [PyPI v0.18.2] https://pypi.org/project/glean-api-client/0.18.2 - . \ No newline at end of file +- [PyPI v0.18.2] https://pypi.org/project/glean-api-client/0.18.2 - . + +## 2026-12-02 00:34:53 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.813.1 (2.969.4) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.18.3] . +### Releases +- [PyPI v0.18.3] https://pypi.org/project/glean-api-client/0.18.3 - . \ No newline at end of file diff --git a/docs/models/platformagent.md b/docs/models/platformagent.md index 510c0f419..b638644e7 100644 --- a/docs/models/platformagent.md +++ b/docs/models/platformagent.md @@ -23,6 +23,7 @@ An agent available to the authenticated user. | `channels` | [Optional[models.PlatformAgentChannels]](../models/platformagentchannels.md) | :heavy_minus_sign: | Messaging channels the agent is deployed to. Requires `use_agent_identity`. | | | `subagents` | List[[models.PlatformSubagent](../models/platformsubagent.md)] | :heavy_minus_sign: | Subagents the agent dispatches work to. Subagents cannot contain subagents.
| | | `trigger` | [Optional[models.PlatformAgentTrigger]](../models/platformagenttrigger.md) | :heavy_minus_sign: | How the agent is invoked. Applies to top-level agents only. | | +| `is_draft` | *Optional[bool]* | :heavy_minus_sign: | Whether the agent is an unpublished draft that has never been published. Omitted for a published agent.
| | | `created_by` | [Optional[models.PlatformPersonReference]](../models/platformpersonreference.md) | :heavy_minus_sign: | A lightweight reference to a person, used where a payload merely points at someone. | | | `updated_by` | [Optional[models.PlatformPersonReference]](../models/platformpersonreference.md) | :heavy_minus_sign: | A lightweight reference to a person, used where a payload merely points at someone. | | | `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Time the agent was created. | | diff --git a/docs/models/platformagentcreaterequest.md b/docs/models/platformagentcreaterequest.md index aa9558517..ce07c1d7e 100644 --- a/docs/models/platformagentcreaterequest.md +++ b/docs/models/platformagentcreaterequest.md @@ -19,4 +19,5 @@ Complete agent definition. | `use_agent_identity` | *Optional[bool]* | :heavy_minus_sign: | Whether the agent acts with its own identity instead of the invoking user's. Cannot be changed after the agent is created.
| | | `channels` | [Optional[models.PlatformAgentChannels]](../models/platformagentchannels.md) | :heavy_minus_sign: | Messaging channels the agent is deployed to. Requires `use_agent_identity`. | | | `subagents` | List[[models.PlatformSubagent](../models/platformsubagent.md)] | :heavy_minus_sign: | Subagents the agent dispatches work to. Subagents cannot contain subagents, and their dependencies may only reference published skills.
| | -| `trigger` | [Optional[models.PlatformAgentTrigger]](../models/platformagenttrigger.md) | :heavy_minus_sign: | How the agent is invoked. Applies to top-level agents only. | | \ No newline at end of file +| `trigger` | [Optional[models.PlatformAgentTrigger]](../models/platformagenttrigger.md) | :heavy_minus_sign: | How the agent is invoked. Applies to top-level agents only. | | +| `draft` | *Optional[bool]* | :heavy_minus_sign: | Whether to save the agent as an unpublished draft instead of publishing it.
| | \ No newline at end of file diff --git a/docs/models/platformagentupdaterequest.md b/docs/models/platformagentupdaterequest.md index 35f1f089a..e838aaace 100644 --- a/docs/models/platformagentupdaterequest.md +++ b/docs/models/platformagentupdaterequest.md @@ -19,4 +19,5 @@ Agent fields to change. At least one field is required. Each supplied field repl | `service_credentials` | List[[models.PlatformAgentServiceCredential](../models/platformagentservicecredential.md)] | :heavy_minus_sign: | Service credentials the agent uses to call tools. The supplied list replaces the entire saved list.
| | `channels` | [Optional[models.PlatformAgentChannels]](../models/platformagentchannels.md) | :heavy_minus_sign: | Messaging channels the agent is deployed to. Requires `use_agent_identity`. | | `subagents` | List[[models.PlatformSubagent](../models/platformsubagent.md)] | :heavy_minus_sign: | Subagents the agent dispatches work to. Subagents cannot contain subagents. The supplied list replaces the entire saved list, so saved subagents left out are removed. Keep a saved subagent's `subagent_id` to preserve it, and omit `subagent_id` to add a subagent.
| -| `trigger` | [Optional[models.PlatformAgentTrigger]](../models/platformagenttrigger.md) | :heavy_minus_sign: | How the agent is invoked. Applies to top-level agents only. | \ No newline at end of file +| `trigger` | [Optional[models.PlatformAgentTrigger]](../models/platformagenttrigger.md) | :heavy_minus_sign: | How the agent is invoked. Applies to top-level agents only. | +| `draft` | *Optional[bool]* | :heavy_minus_sign: | Whether the update is saved as an unpublished draft. Defaults to the agent's current state. `false` publishes a draft agent. `true` isn't allowed for a published agent.
| \ No newline at end of file diff --git a/docs/models/platformlistadminagentsresponse.md b/docs/models/platformlistadminagentsresponse.md index 74158e879..579ed2643 100644 --- a/docs/models/platformlistadminagentsresponse.md +++ b/docs/models/platformlistadminagentsresponse.md @@ -5,9 +5,9 @@ One page of agents. ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `results` | List[[models.PlatformAgent](../models/platformagent.md)] | :heavy_check_mark: | The agents on this page, ordered by name and then by agent_id. | -| `has_more` | *bool* | :heavy_check_mark: | Whether more agents are available after this page. | -| `next_cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Opaque cursor for the next page; null or absent when has_more is false. | -| `request_id` | *str* | :heavy_check_mark: | Request identifier for correlating this response. | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `results` | List[[models.PlatformAgent](../models/platformagent.md)] | :heavy_check_mark: | The agents on this page, ordered by name and then by agent_id. Only about the first 2 KB of a name is compared, less when agent_id is long, so names that share that leading part are ordered by agent_id.
| +| `has_more` | *bool* | :heavy_check_mark: | Whether more agents are available after this page. | +| `next_cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Opaque cursor for the next page; null or absent when has_more is false. | +| `request_id` | *str* | :heavy_check_mark: | Request identifier for correlating this response. | \ No newline at end of file diff --git a/docs/models/platformlistdepartmentsresponse.md b/docs/models/platformlistdepartmentsresponse.md index c363687e3..640ae9157 100644 --- a/docs/models/platformlistdepartmentsresponse.md +++ b/docs/models/platformlistdepartmentsresponse.md @@ -5,9 +5,9 @@ One page of departments. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `results` | List[[models.PlatformDepartmentReference](../models/platformdepartmentreference.md)] | :heavy_check_mark: | The departments on this page, ordered by display_name and then by department_id.
| -| `has_more` | *bool* | :heavy_check_mark: | Whether more departments are available after this page. | -| `next_cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Opaque cursor for the next page; null or absent when has_more is false. | -| `request_id` | *str* | :heavy_check_mark: | Request identifier for correlating this response. | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `results` | List[[models.PlatformDepartmentReference](../models/platformdepartmentreference.md)] | :heavy_check_mark: | The departments on this page, ordered by display_name and then by department_id. Only about the first 2 KB of a name is compared, less when department_id is long, so names that share that leading part are ordered by department_id.
| +| `has_more` | *bool* | :heavy_check_mark: | Whether more departments are available after this page. | +| `next_cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Opaque cursor for the next page; null or absent when has_more is false. | +| `request_id` | *str* | :heavy_check_mark: | Request identifier for correlating this response. | \ No newline at end of file diff --git a/docs/models/platformlistidpgroupsresponse.md b/docs/models/platformlistidpgroupsresponse.md index c8bbd4b7a..c1ce7a4c6 100644 --- a/docs/models/platformlistidpgroupsresponse.md +++ b/docs/models/platformlistidpgroupsresponse.md @@ -5,9 +5,9 @@ One page of IdP groups. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `results` | List[[models.PlatformIdpGroup](../models/platformidpgroup.md)] | :heavy_check_mark: | The IdP groups on this page, ordered by display_name and then by idp_group_id.
| -| `has_more` | *bool* | :heavy_check_mark: | Whether more IdP groups are available after this page. | -| `next_cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Opaque cursor for the next page; null or absent when has_more is false. | -| `request_id` | *str* | :heavy_check_mark: | Request identifier for correlating this response. | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `results` | List[[models.PlatformIdpGroup](../models/platformidpgroup.md)] | :heavy_check_mark: | The IdP groups on this page, ordered by display_name and then by idp_group_id. Only about the first 2 KB of a name is compared, less when idp_group_id is long, so names that share that leading part are ordered by idp_group_id.
| +| `has_more` | *bool* | :heavy_check_mark: | Whether more IdP groups are available after this page. | +| `next_cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Opaque cursor for the next page; null or absent when has_more is false. | +| `request_id` | *str* | :heavy_check_mark: | Request identifier for correlating this response. | \ No newline at end of file diff --git a/docs/models/platformlistoauthclientsresponse.md b/docs/models/platformlistoauthclientsresponse.md index 6296c58f1..32206bc50 100644 --- a/docs/models/platformlistoauthclientsresponse.md +++ b/docs/models/platformlistoauthclientsresponse.md @@ -5,9 +5,9 @@ One page of OAuth clients. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `results` | List[[models.PlatformOAuthClient](../models/platformoauthclient.md)] | :heavy_check_mark: | The clients on this page, ordered by display_name and then by client_id. | -| `has_more` | *bool* | :heavy_check_mark: | Whether more clients are available after this page. | -| `next_cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Opaque cursor for the next page; null or absent when has_more is false. | -| `request_id` | *str* | :heavy_check_mark: | Request identifier for correlating this response. | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `results` | List[[models.PlatformOAuthClient](../models/platformoauthclient.md)] | :heavy_check_mark: | The clients on this page, ordered by display_name and then by client_id. Only about the first 2 KB of a name is compared, less when client_id is long, so names that share that leading part are ordered by client_id.
| +| `has_more` | *bool* | :heavy_check_mark: | Whether more clients are available after this page. | +| `next_cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Opaque cursor for the next page; null or absent when has_more is false. | +| `request_id` | *str* | :heavy_check_mark: | Request identifier for correlating this response. | \ No newline at end of file diff --git a/docs/models/platformlistusersresponse.md b/docs/models/platformlistusersresponse.md index a75d2c061..7104a5131 100644 --- a/docs/models/platformlistusersresponse.md +++ b/docs/models/platformlistusersresponse.md @@ -5,9 +5,9 @@ One page of users. ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `results` | List[[models.PlatformUser](../models/platformuser.md)] | :heavy_check_mark: | The users on this page, ordered by display_name and then by user_id. | -| `has_more` | *bool* | :heavy_check_mark: | Whether more users are available after this page. | -| `next_cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Opaque cursor for the next page; null or absent when has_more is false. | -| `request_id` | *str* | :heavy_check_mark: | Request identifier for correlating this response. | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `results` | List[[models.PlatformUser](../models/platformuser.md)] | :heavy_check_mark: | The users on this page, ordered by display_name and then by user_id. Only about the first 2 KB of a name is compared, less when user_id is long, so names that share that leading part are ordered by user_id.
| +| `has_more` | *bool* | :heavy_check_mark: | Whether more users are available after this page. | +| `next_cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Opaque cursor for the next page; null or absent when has_more is false. | +| `request_id` | *str* | :heavy_check_mark: | Request identifier for correlating this response. | \ No newline at end of file diff --git a/docs/sdks/adminagents/README.md b/docs/sdks/adminagents/README.md index 51b0d1dcf..8df7d3716 100644 --- a/docs/sdks/adminagents/README.md +++ b/docs/sdks/adminagents/README.md @@ -8,7 +8,7 @@ ## list -List every agent in the workspace, ordered by name and then by agent_id. Each agent has the same shape that Get agent returns. Unlike agent search, the list does not depend on who an agent is shared with, so it includes private and disabled agents. Deleted agents are left out. Use the agent_id with other Platform APIs, for example as a usage limit target. The caller must be able to read all agents, administer agents, or read workspace billing. +List every agent in the workspace, ordered by name and then by agent_id. Only about the first 2 KB of a name is compared, less when agent_id is long, so names that share that leading part are ordered by agent_id. Each agent has the same shape that Get agent returns. Unlike agent search, the list does not depend on who an agent is shared with, so it includes private and disabled agents. Deleted agents are left out. Use the agent_id with other Platform APIs, for example as a usage limit target. The caller must be able to read all agents, administer agents, or read workspace billing. ### Example Usage diff --git a/docs/sdks/adminidpgroups/README.md b/docs/sdks/adminidpgroups/README.md index 0574fa567..c63e8c75d 100644 --- a/docs/sdks/adminidpgroups/README.md +++ b/docs/sdks/adminidpgroups/README.md @@ -9,7 +9,7 @@ ## list -List the identity provider (IdP) groups that Glean loads from the directory, ordered by display_name and then by idp_group_id. Use idp_group_id to name a group in other Platform APIs, such as the usage limit evaluation and limit increase request APIs. Usage limits apply only to IdP groups from the datasource instance in usage_settings.user_grouping.idp_group_provider_instance of the get usage settings response, and this API always lists that instance's groups. To list only those groups, pass that value in a provider_instance filter of the filters parameter, for example `filters=[{"field":"provider_instance","operator":"EQUALS","values":["okta"]}]`, URL-encoded as `filters=%5B%7B%22field%22%3A%22provider_instance%22%2C%22operator%22%3A%22EQUALS%22%2C%22values%22%3A%5B%22okta%22%5D%7D%5D`. Send a provider filter to list only one provider's groups, and a name filter to list only the groups whose display_name contains a value. Internal O365 ownership groups and SharePoint groups are left out. The caller must be able to read the workspace configuration or the workspace billing. +List the identity provider (IdP) groups that Glean loads from the directory, ordered by display_name and then by idp_group_id. Only about the first 2 KB of a name is compared, less when idp_group_id is long, so names that share that leading part are ordered by idp_group_id. Use idp_group_id to name a group in other Platform APIs, such as the usage limit evaluation and limit increase request APIs. Usage limits apply only to IdP groups from the datasource instance in usage_settings.user_grouping.idp_group_provider_instance of the get usage settings response, and this API always lists that instance's groups. To list only those groups, pass that value in a provider_instance filter of the filters parameter, for example `filters=[{"field":"provider_instance","operator":"EQUALS","values":["okta"]}]`, URL-encoded as `filters=%5B%7B%22field%22%3A%22provider_instance%22%2C%22operator%22%3A%22EQUALS%22%2C%22values%22%3A%5B%22okta%22%5D%7D%5D`. Send a provider filter to list only one provider's groups, and a name filter to list only the groups whose display_name contains a value. Internal O365 ownership groups and SharePoint groups are left out. The caller must be able to read the workspace configuration or the workspace billing. ### Example Usage diff --git a/docs/sdks/agents/README.md b/docs/sdks/agents/README.md index c5bc6c2c3..aeef95e94 100644 --- a/docs/sdks/agents/README.md +++ b/docs/sdks/agents/README.md @@ -18,7 +18,7 @@ ## create -Create and publish an agent from its complete definition. +Create an agent from its complete definition. The agent is published unless `draft` is true. ### Example Usage @@ -37,7 +37,7 @@ with Glean( { "name": "HR Policy Agent", }, - ]) + ], draft=False) # Handle response print(res) @@ -61,6 +61,7 @@ with Glean( | `channels` | [Optional[models.PlatformAgentChannels]](../../models/platformagentchannels.md) | :heavy_minus_sign: | Messaging channels the agent is deployed to. Requires `use_agent_identity`. | | | `subagents` | List[[models.PlatformSubagent](../../models/platformsubagent.md)] | :heavy_minus_sign: | Subagents the agent dispatches work to. Subagents cannot contain subagents, and their dependencies may only reference published skills.
| | | `trigger` | [Optional[models.PlatformAgentTrigger]](../../models/platformagenttrigger.md) | :heavy_minus_sign: | How the agent is invoked. Applies to top-level agents only. | | +| `draft` | *Optional[bool]* | :heavy_minus_sign: | Whether to save the agent as an unpublished draft instead of publishing it.
| | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -163,7 +164,7 @@ with Glean( ## update -Update and publish an agent. Supplied fields replace their saved values and omitted fields are kept. +Update an agent. Supplied fields replace their saved values, and omitted fields are kept. Updates to a published agent are published. Updates to a draft agent stay in its draft until `draft` is false. ### Example Usage @@ -206,6 +207,7 @@ with Glean( | `channels` | [Optional[models.PlatformAgentChannels]](../../models/platformagentchannels.md) | :heavy_minus_sign: | Messaging channels the agent is deployed to. Requires `use_agent_identity`. | | | `subagents` | List[[models.PlatformSubagent](../../models/platformsubagent.md)] | :heavy_minus_sign: | Subagents the agent dispatches work to. Subagents cannot contain subagents. The supplied list replaces the entire saved list, so saved subagents left out are removed. Keep a saved subagent's `subagent_id` to preserve it, and omit `subagent_id` to add a subagent.
| | | `trigger` | [Optional[models.PlatformAgentTrigger]](../../models/platformagenttrigger.md) | :heavy_minus_sign: | How the agent is invoked. Applies to top-level agents only. | | +| `draft` | *Optional[bool]* | :heavy_minus_sign: | Whether the update is saved as an unpublished draft. Defaults to the agent's current state. `false` publishes a draft agent. `true` isn't allowed for a published agent.
| | | `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/clients/README.md b/docs/sdks/clients/README.md index 3c679b018..038cc8aa5 100644 --- a/docs/sdks/clients/README.md +++ b/docs/sdks/clients/README.md @@ -9,7 +9,7 @@ ## list -List the static OAuth clients that admins created for this workspace, ordered by display_name and then by client_id. Dynamically registered clients and Glean's own clients, such as Glean Desktop, are not listed. Disabled clients are left out unless an is_enabled filter includes the value "false". Use filters to find clients by name, client_id, usage_client_id, LLM Gateway access, or supported app. To set a usage limit for a client, send its ai_gateway.usage_client_id, not its client_id, to the usage APIs. The caller needs admin read or billing read permission. +List the static OAuth clients that admins created for this workspace, ordered by display_name and then by client_id. Only about the first 2 KB of a name is compared, less when client_id is long, so names that share that leading part are ordered by client_id. Dynamically registered clients and Glean's own clients, such as Glean Desktop, are not listed. Disabled clients are left out unless an is_enabled filter includes the value "false". Use filters to find clients by name, client_id, usage_client_id, LLM Gateway access, or supported app. To set a usage limit for a client, send its ai_gateway.usage_client_id, not its client_id, to the usage APIs. The caller needs admin read or billing read permission. ### Example Usage diff --git a/docs/sdks/departments/README.md b/docs/sdks/departments/README.md index daa008d72..cd39e7785 100644 --- a/docs/sdks/departments/README.md +++ b/docs/sdks/departments/README.md @@ -9,7 +9,7 @@ ## list -List the departments in the Glean directory, ordered by display_name and then by department_id. The list includes every department that at least one user belongs to or that a usage limit names, so a caller can show the name of a department that a usage limit still names after its users leave it. Department names are exact, so names that differ only by case are different departments. Send a name filter to return only the departments whose display_name contains a value. +List the departments in the Glean directory, ordered by display_name and then by department_id. Only about the first 2 KB of a name is compared, less when department_id is long, so names that share that leading part are ordered by department_id. The list includes every department that at least one user belongs to or that a usage limit names, so a caller can show the name of a department that a usage limit still names after its users leave it. Department names are exact, so names that differ only by case are different departments. Send a name filter to return only the departments whose display_name contains a value. ### Example Usage diff --git a/docs/sdks/users/README.md b/docs/sdks/users/README.md index 5fd6a2c99..508999b44 100644 --- a/docs/sdks/users/README.md +++ b/docs/sdks/users/README.md @@ -9,7 +9,7 @@ ## list -List the users in the Glean directory, ordered by display_name and then by user_id. The list includes the same people as the Glean People directory. Filter by name, email, manager_id, or department_id to find specific users. Use the returned user_id values with other Platform APIs, for example as usage limit targets. +List the users in the Glean directory, ordered by display_name and then by user_id. Only about the first 2 KB of a name is compared, less when user_id is long, so names that share that leading part are ordered by user_id. The list includes the same people as the Glean People directory. Filter by name, email, manager_id, or department_id to find specific users. Use the returned user_id values with other Platform APIs, for example as usage limit targets. ### Example Usage diff --git a/pyproject.toml b/pyproject.toml index c72b37624..acb346d7e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "glean-api-client" -version = "0.18.2" +version = "0.18.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 03f4b3e3b..fb1201e37 100644 --- a/src/glean/api_client/_version.py +++ b/src/glean/api_client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "glean-api-client" -__version__: str = "0.18.2" +__version__: str = "0.18.3" __openapi_doc_version__: str = "0.9.0" __gen_version__: str = "2.969.4" -__user_agent__: str = "speakeasy-sdk/python 0.18.2 2.969.4 0.9.0 glean-api-client" +__user_agent__: str = "speakeasy-sdk/python 0.18.3 2.969.4 0.9.0 glean-api-client" try: if __package__ is not None: diff --git a/src/glean/api_client/admin_agents.py b/src/glean/api_client/admin_agents.py index 6fd07dd6f..aea15e858 100644 --- a/src/glean/api_client/admin_agents.py +++ b/src/glean/api_client/admin_agents.py @@ -34,7 +34,7 @@ def list( ) -> models.PlatformListAdminAgentsResponse: r"""List all agents - List every agent in the workspace, ordered by name and then by agent_id. Each agent has the same shape that Get agent returns. Unlike agent search, the list does not depend on who an agent is shared with, so it includes private and disabled agents. Deleted agents are left out. Use the agent_id with other Platform APIs, for example as a usage limit target. The caller must be able to read all agents, administer agents, or read workspace billing. + List every agent in the workspace, ordered by name and then by agent_id. Only about the first 2 KB of a name is compared, less when agent_id is long, so names that share that leading part are ordered by agent_id. Each agent has the same shape that Get agent returns. Unlike agent search, the list does not depend on who an agent is shared with, so it includes private and disabled agents. Deleted agents are left out. Use the agent_id with other Platform APIs, for example as a usage limit target. The caller must be able to read all agents, administer agents, or read workspace billing. :param page_size: Maximum number of agents to return. Defaults to 50. Maximum is 100. @@ -162,7 +162,7 @@ async def list_async( ) -> models.PlatformListAdminAgentsResponse: r"""List all agents - List every agent in the workspace, ordered by name and then by agent_id. Each agent has the same shape that Get agent returns. Unlike agent search, the list does not depend on who an agent is shared with, so it includes private and disabled agents. Deleted agents are left out. Use the agent_id with other Platform APIs, for example as a usage limit target. The caller must be able to read all agents, administer agents, or read workspace billing. + List every agent in the workspace, ordered by name and then by agent_id. Only about the first 2 KB of a name is compared, less when agent_id is long, so names that share that leading part are ordered by agent_id. Each agent has the same shape that Get agent returns. Unlike agent search, the list does not depend on who an agent is shared with, so it includes private and disabled agents. Deleted agents are left out. Use the agent_id with other Platform APIs, for example as a usage limit target. The caller must be able to read all agents, administer agents, or read workspace billing. :param page_size: Maximum number of agents to return. Defaults to 50. Maximum is 100. diff --git a/src/glean/api_client/admin_idpgroups.py b/src/glean/api_client/admin_idpgroups.py index 5802968f9..df4d78a1a 100644 --- a/src/glean/api_client/admin_idpgroups.py +++ b/src/glean/api_client/admin_idpgroups.py @@ -32,7 +32,7 @@ def list( ) -> models.PlatformListIdpGroupsResponse: r"""List IdP groups - List the identity provider (IdP) groups that Glean loads from the directory, ordered by display_name and then by idp_group_id. Use idp_group_id to name a group in other Platform APIs, such as the usage limit evaluation and limit increase request APIs. Usage limits apply only to IdP groups from the datasource instance in usage_settings.user_grouping.idp_group_provider_instance of the get usage settings response, and this API always lists that instance's groups. To list only those groups, pass that value in a provider_instance filter of the filters parameter, for example `filters=[{\"field\":\"provider_instance\",\"operator\":\"EQUALS\",\"values\":[\"okta\"]}]`, URL-encoded as `filters=%5B%7B%22field%22%3A%22provider_instance%22%2C%22operator%22%3A%22EQUALS%22%2C%22values%22%3A%5B%22okta%22%5D%7D%5D`. Send a provider filter to list only one provider's groups, and a name filter to list only the groups whose display_name contains a value. Internal O365 ownership groups and SharePoint groups are left out. The caller must be able to read the workspace configuration or the workspace billing. + List the identity provider (IdP) groups that Glean loads from the directory, ordered by display_name and then by idp_group_id. Only about the first 2 KB of a name is compared, less when idp_group_id is long, so names that share that leading part are ordered by idp_group_id. Use idp_group_id to name a group in other Platform APIs, such as the usage limit evaluation and limit increase request APIs. Usage limits apply only to IdP groups from the datasource instance in usage_settings.user_grouping.idp_group_provider_instance of the get usage settings response, and this API always lists that instance's groups. To list only those groups, pass that value in a provider_instance filter of the filters parameter, for example `filters=[{\"field\":\"provider_instance\",\"operator\":\"EQUALS\",\"values\":[\"okta\"]}]`, URL-encoded as `filters=%5B%7B%22field%22%3A%22provider_instance%22%2C%22operator%22%3A%22EQUALS%22%2C%22values%22%3A%5B%22okta%22%5D%7D%5D`. Send a provider filter to list only one provider's groups, and a name filter to list only the groups whose display_name contains a value. Internal O365 ownership groups and SharePoint groups are left out. The caller must be able to read the workspace configuration or the workspace billing. :param page_size: Maximum number of IdP groups to return. Defaults to 50. Maximum is 100. @@ -158,7 +158,7 @@ async def list_async( ) -> models.PlatformListIdpGroupsResponse: r"""List IdP groups - List the identity provider (IdP) groups that Glean loads from the directory, ordered by display_name and then by idp_group_id. Use idp_group_id to name a group in other Platform APIs, such as the usage limit evaluation and limit increase request APIs. Usage limits apply only to IdP groups from the datasource instance in usage_settings.user_grouping.idp_group_provider_instance of the get usage settings response, and this API always lists that instance's groups. To list only those groups, pass that value in a provider_instance filter of the filters parameter, for example `filters=[{\"field\":\"provider_instance\",\"operator\":\"EQUALS\",\"values\":[\"okta\"]}]`, URL-encoded as `filters=%5B%7B%22field%22%3A%22provider_instance%22%2C%22operator%22%3A%22EQUALS%22%2C%22values%22%3A%5B%22okta%22%5D%7D%5D`. Send a provider filter to list only one provider's groups, and a name filter to list only the groups whose display_name contains a value. Internal O365 ownership groups and SharePoint groups are left out. The caller must be able to read the workspace configuration or the workspace billing. + List the identity provider (IdP) groups that Glean loads from the directory, ordered by display_name and then by idp_group_id. Only about the first 2 KB of a name is compared, less when idp_group_id is long, so names that share that leading part are ordered by idp_group_id. Use idp_group_id to name a group in other Platform APIs, such as the usage limit evaluation and limit increase request APIs. Usage limits apply only to IdP groups from the datasource instance in usage_settings.user_grouping.idp_group_provider_instance of the get usage settings response, and this API always lists that instance's groups. To list only those groups, pass that value in a provider_instance filter of the filters parameter, for example `filters=[{\"field\":\"provider_instance\",\"operator\":\"EQUALS\",\"values\":[\"okta\"]}]`, URL-encoded as `filters=%5B%7B%22field%22%3A%22provider_instance%22%2C%22operator%22%3A%22EQUALS%22%2C%22values%22%3A%5B%22okta%22%5D%7D%5D`. Send a provider filter to list only one provider's groups, and a name filter to list only the groups whose display_name contains a value. Internal O365 ownership groups and SharePoint groups are left out. The caller must be able to read the workspace configuration or the workspace billing. :param page_size: Maximum number of IdP groups to return. Defaults to 50. Maximum is 100. diff --git a/src/glean/api_client/agents.py b/src/glean/api_client/agents.py index 51f5d37e8..c87486fcb 100644 --- a/src/glean/api_client/agents.py +++ b/src/glean/api_client/agents.py @@ -93,6 +93,7 @@ def create( models_platformagenttrigger.PlatformAgentTriggerTypedDict, ] ] = None, + draft: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -100,7 +101,7 @@ def create( ) -> models.PlatformAgentGetResponse: r"""Create agent - Create and publish an agent from its complete definition. + Create an agent from its complete definition. The agent is published unless `draft` is true. :param name: Human-readable name. @@ -120,6 +121,8 @@ def create( :param subagents: Subagents the agent dispatches work to. Subagents cannot contain subagents, and their dependencies may only reference published skills. :param trigger: How the agent is invoked. Applies to top-level agents only. + :param draft: Whether to save the agent as an unpublished draft instead of publishing it. + :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -168,6 +171,7 @@ def create( trigger=utils.get_pydantic_model( trigger, Optional[models.PlatformAgentTrigger] ), + draft=draft, ) req = self._build_request( @@ -316,6 +320,7 @@ async def create_async( models_platformagenttrigger.PlatformAgentTriggerTypedDict, ] ] = None, + draft: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -323,7 +328,7 @@ async def create_async( ) -> models.PlatformAgentGetResponse: r"""Create agent - Create and publish an agent from its complete definition. + Create an agent from its complete definition. The agent is published unless `draft` is true. :param name: Human-readable name. @@ -343,6 +348,8 @@ async def create_async( :param subagents: Subagents the agent dispatches work to. Subagents cannot contain subagents, and their dependencies may only reference published skills. :param trigger: How the agent is invoked. Applies to top-level agents only. + :param draft: Whether to save the agent as an unpublished draft instead of publishing it. + :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -391,6 +398,7 @@ async def create_async( trigger=utils.get_pydantic_model( trigger, Optional[models.PlatformAgentTrigger] ), + draft=draft, ) req = self._build_request_async( @@ -987,6 +995,7 @@ def update( models_platformagenttrigger.PlatformAgentTriggerTypedDict, ] ] = None, + draft: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -994,7 +1003,7 @@ def update( ) -> models.PlatformAgentGetResponse: r"""Update agent - Update and publish an agent. Supplied fields replace their saved values and omitted fields are kept. + Update an agent. Supplied fields replace their saved values, and omitted fields are kept. Updates to a published agent are published. Updates to a draft agent stay in its draft until `draft` is false. :param agent_id: The ID of the agent to update. @@ -1016,6 +1025,8 @@ def update( :param subagents: Subagents the agent dispatches work to. Subagents cannot contain subagents. The supplied list replaces the entire saved list, so saved subagents left out are removed. Keep a saved subagent's `subagent_id` to preserve it, and omit `subagent_id` to add a subagent. :param trigger: How the agent is invoked. Applies to top-level agents only. + :param draft: Whether the update is saved as an unpublished draft. Defaults to the agent's current state. `false` publishes a draft agent. `true` isn't allowed for a published agent. + :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -1066,6 +1077,7 @@ def update( trigger=utils.get_pydantic_model( trigger, Optional[models.PlatformAgentTrigger] ), + draft=draft, ), ) @@ -1219,6 +1231,7 @@ async def update_async( models_platformagenttrigger.PlatformAgentTriggerTypedDict, ] ] = None, + draft: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -1226,7 +1239,7 @@ async def update_async( ) -> models.PlatformAgentGetResponse: r"""Update agent - Update and publish an agent. Supplied fields replace their saved values and omitted fields are kept. + Update an agent. Supplied fields replace their saved values, and omitted fields are kept. Updates to a published agent are published. Updates to a draft agent stay in its draft until `draft` is false. :param agent_id: The ID of the agent to update. @@ -1248,6 +1261,8 @@ async def update_async( :param subagents: Subagents the agent dispatches work to. Subagents cannot contain subagents. The supplied list replaces the entire saved list, so saved subagents left out are removed. Keep a saved subagent's `subagent_id` to preserve it, and omit `subagent_id` to add a subagent. :param trigger: How the agent is invoked. Applies to top-level agents only. + :param draft: Whether the update is saved as an unpublished draft. Defaults to the agent's current state. `false` publishes a draft agent. `true` isn't allowed for a published agent. + :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -1298,6 +1313,7 @@ async def update_async( trigger=utils.get_pydantic_model( trigger, Optional[models.PlatformAgentTrigger] ), + draft=draft, ), ) diff --git a/src/glean/api_client/clients.py b/src/glean/api_client/clients.py index 11cc3ed79..8c3240fd1 100644 --- a/src/glean/api_client/clients.py +++ b/src/glean/api_client/clients.py @@ -34,7 +34,7 @@ def list( ) -> models.PlatformListOAuthClientsResponse: r"""List OAuth clients - List the static OAuth clients that admins created for this workspace, ordered by display_name and then by client_id. Dynamically registered clients and Glean's own clients, such as Glean Desktop, are not listed. Disabled clients are left out unless an is_enabled filter includes the value \"false\". Use filters to find clients by name, client_id, usage_client_id, LLM Gateway access, or supported app. To set a usage limit for a client, send its ai_gateway.usage_client_id, not its client_id, to the usage APIs. The caller needs admin read or billing read permission. + List the static OAuth clients that admins created for this workspace, ordered by display_name and then by client_id. Only about the first 2 KB of a name is compared, less when client_id is long, so names that share that leading part are ordered by client_id. Dynamically registered clients and Glean's own clients, such as Glean Desktop, are not listed. Disabled clients are left out unless an is_enabled filter includes the value \"false\". Use filters to find clients by name, client_id, usage_client_id, LLM Gateway access, or supported app. To set a usage limit for a client, send its ai_gateway.usage_client_id, not its client_id, to the usage APIs. The caller needs admin read or billing read permission. :param page_size: Maximum number of clients to return. Defaults to 50. Maximum is 100. @@ -162,7 +162,7 @@ async def list_async( ) -> models.PlatformListOAuthClientsResponse: r"""List OAuth clients - List the static OAuth clients that admins created for this workspace, ordered by display_name and then by client_id. Dynamically registered clients and Glean's own clients, such as Glean Desktop, are not listed. Disabled clients are left out unless an is_enabled filter includes the value \"false\". Use filters to find clients by name, client_id, usage_client_id, LLM Gateway access, or supported app. To set a usage limit for a client, send its ai_gateway.usage_client_id, not its client_id, to the usage APIs. The caller needs admin read or billing read permission. + List the static OAuth clients that admins created for this workspace, ordered by display_name and then by client_id. Only about the first 2 KB of a name is compared, less when client_id is long, so names that share that leading part are ordered by client_id. Dynamically registered clients and Glean's own clients, such as Glean Desktop, are not listed. Disabled clients are left out unless an is_enabled filter includes the value \"false\". Use filters to find clients by name, client_id, usage_client_id, LLM Gateway access, or supported app. To set a usage limit for a client, send its ai_gateway.usage_client_id, not its client_id, to the usage APIs. The caller needs admin read or billing read permission. :param page_size: Maximum number of clients to return. Defaults to 50. Maximum is 100. diff --git a/src/glean/api_client/departments.py b/src/glean/api_client/departments.py index b0f887461..62198cb82 100644 --- a/src/glean/api_client/departments.py +++ b/src/glean/api_client/departments.py @@ -34,7 +34,7 @@ def list( ) -> models.PlatformListDepartmentsResponse: r"""List departments - List the departments in the Glean directory, ordered by display_name and then by department_id. The list includes every department that at least one user belongs to or that a usage limit names, so a caller can show the name of a department that a usage limit still names after its users leave it. Department names are exact, so names that differ only by case are different departments. Send a name filter to return only the departments whose display_name contains a value. + List the departments in the Glean directory, ordered by display_name and then by department_id. Only about the first 2 KB of a name is compared, less when department_id is long, so names that share that leading part are ordered by department_id. The list includes every department that at least one user belongs to or that a usage limit names, so a caller can show the name of a department that a usage limit still names after its users leave it. Department names are exact, so names that differ only by case are different departments. Send a name filter to return only the departments whose display_name contains a value. :param page_size: Maximum number of departments to return. Defaults to 50. Maximum is 100. @@ -162,7 +162,7 @@ async def list_async( ) -> models.PlatformListDepartmentsResponse: r"""List departments - List the departments in the Glean directory, ordered by display_name and then by department_id. The list includes every department that at least one user belongs to or that a usage limit names, so a caller can show the name of a department that a usage limit still names after its users leave it. Department names are exact, so names that differ only by case are different departments. Send a name filter to return only the departments whose display_name contains a value. + List the departments in the Glean directory, ordered by display_name and then by department_id. Only about the first 2 KB of a name is compared, less when department_id is long, so names that share that leading part are ordered by department_id. The list includes every department that at least one user belongs to or that a usage limit names, so a caller can show the name of a department that a usage limit still names after its users leave it. Department names are exact, so names that differ only by case are different departments. Send a name filter to return only the departments whose display_name contains a value. :param page_size: Maximum number of departments to return. Defaults to 50. Maximum is 100. diff --git a/src/glean/api_client/models/platformagent.py b/src/glean/api_client/models/platformagent.py index e5645ffbd..c1e65b7a2 100644 --- a/src/glean/api_client/models/platformagent.py +++ b/src/glean/api_client/models/platformagent.py @@ -83,6 +83,10 @@ class PlatformAgentTypedDict(TypedDict): """ trigger: NotRequired[PlatformAgentTriggerTypedDict] r"""How the agent is invoked. Applies to top-level agents only.""" + is_draft: NotRequired[bool] + r"""Whether the agent is an unpublished draft that has never been published. Omitted for a published agent. + + """ created_by: NotRequired[PlatformPersonReferenceTypedDict] r"""A lightweight reference to a person, used where a payload merely points at someone.""" updated_by: NotRequired[PlatformPersonReferenceTypedDict] @@ -151,6 +155,11 @@ class PlatformAgent(BaseModel): trigger: Optional[PlatformAgentTrigger] = None r"""How the agent is invoked. Applies to top-level agents only.""" + is_draft: Optional[bool] = None + r"""Whether the agent is an unpublished draft that has never been published. Omitted for a published agent. + + """ + created_by: Optional[PlatformPersonReference] = None r"""A lightweight reference to a person, used where a payload merely points at someone.""" @@ -183,6 +192,7 @@ def serialize_model(self, handler): "channels", "subagents", "trigger", + "is_draft", "created_by", "updated_by", "created_at", diff --git a/src/glean/api_client/models/platformagentcreaterequest.py b/src/glean/api_client/models/platformagentcreaterequest.py index f7b2fb1d4..dc8a60f9e 100644 --- a/src/glean/api_client/models/platformagentcreaterequest.py +++ b/src/glean/api_client/models/platformagentcreaterequest.py @@ -69,6 +69,10 @@ class PlatformAgentCreateRequestTypedDict(TypedDict): """ trigger: NotRequired[PlatformAgentTriggerTypedDict] r"""How the agent is invoked. Applies to top-level agents only.""" + draft: NotRequired[bool] + r"""Whether to save the agent as an unpublished draft instead of publishing it. + + """ class PlatformAgentCreateRequest(BaseModel): @@ -121,6 +125,11 @@ class PlatformAgentCreateRequest(BaseModel): trigger: Optional[PlatformAgentTrigger] = None r"""How the agent is invoked. Applies to top-level agents only.""" + draft: Optional[bool] = False + r"""Whether to save the agent as an unpublished draft instead of publishing it. + + """ + @model_serializer(mode="wrap") def _serialize_model_with_info(self, handler, info): return serialize_with_info(self.serialize_model, handler, info) @@ -140,6 +149,7 @@ def serialize_model(self, handler): "channels", "subagents", "trigger", + "draft", ] ) exclude_none = current_exclude_none() diff --git a/src/glean/api_client/models/platformagentupdaterequest.py b/src/glean/api_client/models/platformagentupdaterequest.py index 526ebbbba..89a65130d 100644 --- a/src/glean/api_client/models/platformagentupdaterequest.py +++ b/src/glean/api_client/models/platformagentupdaterequest.py @@ -74,6 +74,10 @@ class PlatformAgentUpdateRequestTypedDict(TypedDict): """ trigger: NotRequired[PlatformAgentTriggerTypedDict] r"""How the agent is invoked. Applies to top-level agents only.""" + draft: NotRequired[bool] + r"""Whether the update is saved as an unpublished draft. Defaults to the agent's current state. `false` publishes a draft agent. `true` isn't allowed for a published agent. + + """ class PlatformAgentUpdateRequest(BaseModel): @@ -127,6 +131,11 @@ class PlatformAgentUpdateRequest(BaseModel): trigger: Optional[PlatformAgentTrigger] = None r"""How the agent is invoked. Applies to top-level agents only.""" + draft: Optional[bool] = None + r"""Whether the update is saved as an unpublished draft. Defaults to the agent's current state. `false` publishes a draft agent. `true` isn't allowed for a published agent. + + """ + @model_serializer(mode="wrap") def _serialize_model_with_info(self, handler, info): return serialize_with_info(self.serialize_model, handler, info) @@ -146,6 +155,7 @@ def serialize_model(self, handler): "channels", "subagents", "trigger", + "draft", ] ) nullable_fields = set(["glean_search_config"]) diff --git a/src/glean/api_client/models/platformlistadminagentsresponse.py b/src/glean/api_client/models/platformlistadminagentsresponse.py index 77c92a0ef..da24dab15 100644 --- a/src/glean/api_client/models/platformlistadminagentsresponse.py +++ b/src/glean/api_client/models/platformlistadminagentsresponse.py @@ -22,7 +22,9 @@ class PlatformListAdminAgentsResponseTypedDict(TypedDict): r"""One page of agents.""" results: List[PlatformAgentTypedDict] - r"""The agents on this page, ordered by name and then by agent_id.""" + r"""The agents on this page, ordered by name and then by agent_id. Only about the first 2 KB of a name is compared, less when agent_id is long, so names that share that leading part are ordered by agent_id. + + """ has_more: bool r"""Whether more agents are available after this page.""" request_id: str @@ -35,7 +37,9 @@ class PlatformListAdminAgentsResponse(BaseModel): r"""One page of agents.""" results: List[PlatformAgent] - r"""The agents on this page, ordered by name and then by agent_id.""" + r"""The agents on this page, ordered by name and then by agent_id. Only about the first 2 KB of a name is compared, less when agent_id is long, so names that share that leading part are ordered by agent_id. + + """ has_more: bool r"""Whether more agents are available after this page.""" diff --git a/src/glean/api_client/models/platformlistdepartmentsresponse.py b/src/glean/api_client/models/platformlistdepartmentsresponse.py index de00d93ac..54e88bf18 100644 --- a/src/glean/api_client/models/platformlistdepartmentsresponse.py +++ b/src/glean/api_client/models/platformlistdepartmentsresponse.py @@ -25,7 +25,7 @@ class PlatformListDepartmentsResponseTypedDict(TypedDict): r"""One page of departments.""" results: List[PlatformDepartmentReferenceTypedDict] - r"""The departments on this page, ordered by display_name and then by department_id. + r"""The departments on this page, ordered by display_name and then by department_id. Only about the first 2 KB of a name is compared, less when department_id is long, so names that share that leading part are ordered by department_id. """ has_more: bool @@ -40,7 +40,7 @@ class PlatformListDepartmentsResponse(BaseModel): r"""One page of departments.""" results: List[PlatformDepartmentReference] - r"""The departments on this page, ordered by display_name and then by department_id. + r"""The departments on this page, ordered by display_name and then by department_id. Only about the first 2 KB of a name is compared, less when department_id is long, so names that share that leading part are ordered by department_id. """ diff --git a/src/glean/api_client/models/platformlistidpgroupsresponse.py b/src/glean/api_client/models/platformlistidpgroupsresponse.py index 357000ad8..f36dc6d72 100644 --- a/src/glean/api_client/models/platformlistidpgroupsresponse.py +++ b/src/glean/api_client/models/platformlistidpgroupsresponse.py @@ -22,7 +22,7 @@ class PlatformListIdpGroupsResponseTypedDict(TypedDict): r"""One page of IdP groups.""" results: List[PlatformIdpGroupTypedDict] - r"""The IdP groups on this page, ordered by display_name and then by idp_group_id. + r"""The IdP groups on this page, ordered by display_name and then by idp_group_id. Only about the first 2 KB of a name is compared, less when idp_group_id is long, so names that share that leading part are ordered by idp_group_id. """ has_more: bool @@ -37,7 +37,7 @@ class PlatformListIdpGroupsResponse(BaseModel): r"""One page of IdP groups.""" results: List[PlatformIdpGroup] - r"""The IdP groups on this page, ordered by display_name and then by idp_group_id. + r"""The IdP groups on this page, ordered by display_name and then by idp_group_id. Only about the first 2 KB of a name is compared, less when idp_group_id is long, so names that share that leading part are ordered by idp_group_id. """ diff --git a/src/glean/api_client/models/platformlistoauthclientsresponse.py b/src/glean/api_client/models/platformlistoauthclientsresponse.py index dc8fd1921..89451272f 100644 --- a/src/glean/api_client/models/platformlistoauthclientsresponse.py +++ b/src/glean/api_client/models/platformlistoauthclientsresponse.py @@ -22,7 +22,9 @@ class PlatformListOAuthClientsResponseTypedDict(TypedDict): r"""One page of OAuth clients.""" results: List[PlatformOAuthClientTypedDict] - r"""The clients on this page, ordered by display_name and then by client_id.""" + r"""The clients on this page, ordered by display_name and then by client_id. Only about the first 2 KB of a name is compared, less when client_id is long, so names that share that leading part are ordered by client_id. + + """ has_more: bool r"""Whether more clients are available after this page.""" request_id: str @@ -35,7 +37,9 @@ class PlatformListOAuthClientsResponse(BaseModel): r"""One page of OAuth clients.""" results: List[PlatformOAuthClient] - r"""The clients on this page, ordered by display_name and then by client_id.""" + r"""The clients on this page, ordered by display_name and then by client_id. Only about the first 2 KB of a name is compared, less when client_id is long, so names that share that leading part are ordered by client_id. + + """ has_more: bool r"""Whether more clients are available after this page.""" diff --git a/src/glean/api_client/models/platformlistusersresponse.py b/src/glean/api_client/models/platformlistusersresponse.py index eaa6372fa..5b0c10d70 100644 --- a/src/glean/api_client/models/platformlistusersresponse.py +++ b/src/glean/api_client/models/platformlistusersresponse.py @@ -22,7 +22,9 @@ class PlatformListUsersResponseTypedDict(TypedDict): r"""One page of users.""" results: List[PlatformUserTypedDict] - r"""The users on this page, ordered by display_name and then by user_id.""" + r"""The users on this page, ordered by display_name and then by user_id. Only about the first 2 KB of a name is compared, less when user_id is long, so names that share that leading part are ordered by user_id. + + """ has_more: bool r"""Whether more users are available after this page.""" request_id: str @@ -35,7 +37,9 @@ class PlatformListUsersResponse(BaseModel): r"""One page of users.""" results: List[PlatformUser] - r"""The users on this page, ordered by display_name and then by user_id.""" + r"""The users on this page, ordered by display_name and then by user_id. Only about the first 2 KB of a name is compared, less when user_id is long, so names that share that leading part are ordered by user_id. + + """ has_more: bool r"""Whether more users are available after this page.""" diff --git a/src/glean/api_client/users.py b/src/glean/api_client/users.py index 2e13bdb51..718c662d3 100644 --- a/src/glean/api_client/users.py +++ b/src/glean/api_client/users.py @@ -36,7 +36,7 @@ def list( ) -> models.PlatformListUsersResponse: r"""List users - List the users in the Glean directory, ordered by display_name and then by user_id. The list includes the same people as the Glean People directory. Filter by name, email, manager_id, or department_id to find specific users. Use the returned user_id values with other Platform APIs, for example as usage limit targets. + List the users in the Glean directory, ordered by display_name and then by user_id. Only about the first 2 KB of a name is compared, less when user_id is long, so names that share that leading part are ordered by user_id. The list includes the same people as the Glean People directory. Filter by name, email, manager_id, or department_id to find specific users. Use the returned user_id values with other Platform APIs, for example as usage limit targets. :param page_size: Maximum number of users to return. Defaults to 50. Maximum is 100. @@ -168,7 +168,7 @@ async def list_async( ) -> models.PlatformListUsersResponse: r"""List users - List the users in the Glean directory, ordered by display_name and then by user_id. The list includes the same people as the Glean People directory. Filter by name, email, manager_id, or department_id to find specific users. Use the returned user_id values with other Platform APIs, for example as usage limit targets. + List the users in the Glean directory, ordered by display_name and then by user_id. Only about the first 2 KB of a name is compared, less when user_id is long, so names that share that leading part are ordered by user_id. The list includes the same people as the Glean People directory. Filter by name, email, manager_id, or department_id to find specific users. Use the returned user_id values with other Platform APIs, for example as usage limit targets. :param page_size: Maximum number of users to return. Defaults to 50. Maximum is 100. diff --git a/tests/mockserver/internal/sdk/models/components/platformagent.go b/tests/mockserver/internal/sdk/models/components/platformagent.go index 51dd21faf..281a16c8c 100644 --- a/tests/mockserver/internal/sdk/models/components/platformagent.go +++ b/tests/mockserver/internal/sdk/models/components/platformagent.go @@ -45,6 +45,9 @@ type PlatformAgent struct { Subagents []PlatformSubagent `json:"subagents,omitempty"` // How the agent is invoked. Applies to top-level agents only. Trigger *PlatformAgentTrigger `json:"trigger,omitempty"` + // Whether the agent is an unpublished draft that has never been published. Omitted for a published agent. + // + IsDraft *bool `json:"is_draft,omitempty"` // A lightweight reference to a person, used where a payload merely points at someone. CreatedBy *PlatformPersonReference `json:"created_by,omitempty"` // A lightweight reference to a person, used where a payload merely points at someone. @@ -178,6 +181,13 @@ func (o *PlatformAgent) GetTrigger() *PlatformAgentTrigger { return o.Trigger } +func (o *PlatformAgent) GetIsDraft() *bool { + if o == nil { + return nil + } + return o.IsDraft +} + func (o *PlatformAgent) GetCreatedBy() *PlatformPersonReference { if o == nil { return nil diff --git a/tests/mockserver/internal/sdk/models/components/platformagentcreaterequest.go b/tests/mockserver/internal/sdk/models/components/platformagentcreaterequest.go index cd9c2e977..aa31cd58d 100644 --- a/tests/mockserver/internal/sdk/models/components/platformagentcreaterequest.go +++ b/tests/mockserver/internal/sdk/models/components/platformagentcreaterequest.go @@ -3,6 +3,10 @@ package components +import ( + "mockserver/internal/sdk/utils" +) + // PlatformAgentCreateRequest - Complete agent definition. type PlatformAgentCreateRequest struct { // Human-readable name. @@ -35,6 +39,20 @@ type PlatformAgentCreateRequest struct { Subagents []PlatformSubagent `json:"subagents,omitempty"` // How the agent is invoked. Applies to top-level agents only. Trigger *PlatformAgentTrigger `json:"trigger,omitempty"` + // Whether to save the agent as an unpublished draft instead of publishing it. + // + Draft *bool `default:"false" json:"draft"` +} + +func (p PlatformAgentCreateRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PlatformAgentCreateRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, []string{"name"}); err != nil { + return err + } + return nil } func (o *PlatformAgentCreateRequest) GetName() string { @@ -127,3 +145,10 @@ func (o *PlatformAgentCreateRequest) GetTrigger() *PlatformAgentTrigger { } return o.Trigger } + +func (o *PlatformAgentCreateRequest) GetDraft() *bool { + if o == nil { + return nil + } + return o.Draft +} diff --git a/tests/mockserver/internal/sdk/models/components/platformagentupdaterequest.go b/tests/mockserver/internal/sdk/models/components/platformagentupdaterequest.go index 3cf44a122..2b07afdce 100644 --- a/tests/mockserver/internal/sdk/models/components/platformagentupdaterequest.go +++ b/tests/mockserver/internal/sdk/models/components/platformagentupdaterequest.go @@ -39,6 +39,9 @@ type PlatformAgentUpdateRequest struct { Subagents []PlatformSubagent `json:"subagents,omitempty"` // How the agent is invoked. Applies to top-level agents only. Trigger *PlatformAgentTrigger `json:"trigger,omitempty"` + // Whether the update is saved as an unpublished draft. Defaults to the agent's current state. `false` publishes a draft agent. `true` isn't allowed for a published agent. + // + Draft *bool `json:"draft,omitempty"` } func (o *PlatformAgentUpdateRequest) GetName() *string { @@ -124,3 +127,10 @@ func (o *PlatformAgentUpdateRequest) GetTrigger() *PlatformAgentTrigger { } return o.Trigger } + +func (o *PlatformAgentUpdateRequest) GetDraft() *bool { + if o == nil { + return nil + } + return o.Draft +} diff --git a/tests/mockserver/internal/sdk/models/components/platformlistadminagentsresponse.go b/tests/mockserver/internal/sdk/models/components/platformlistadminagentsresponse.go index c5ba2f2e8..5ede56728 100644 --- a/tests/mockserver/internal/sdk/models/components/platformlistadminagentsresponse.go +++ b/tests/mockserver/internal/sdk/models/components/platformlistadminagentsresponse.go @@ -9,7 +9,8 @@ import ( // PlatformListAdminAgentsResponse - One page of agents. type PlatformListAdminAgentsResponse struct { - // The agents on this page, ordered by name and then by agent_id. + // The agents on this page, ordered by name and then by agent_id. Only about the first 2 KB of a name is compared, less when agent_id is long, so names that share that leading part are ordered by agent_id. + // Results []PlatformAgent `json:"results"` // Whether more agents are available after this page. HasMore bool `json:"has_more"` diff --git a/tests/mockserver/internal/sdk/models/components/platformlistdepartmentsresponse.go b/tests/mockserver/internal/sdk/models/components/platformlistdepartmentsresponse.go index a00ff10bd..f92fc19cb 100644 --- a/tests/mockserver/internal/sdk/models/components/platformlistdepartmentsresponse.go +++ b/tests/mockserver/internal/sdk/models/components/platformlistdepartmentsresponse.go @@ -9,7 +9,7 @@ import ( // PlatformListDepartmentsResponse - One page of departments. type PlatformListDepartmentsResponse struct { - // The departments on this page, ordered by display_name and then by department_id. + // The departments on this page, ordered by display_name and then by department_id. Only about the first 2 KB of a name is compared, less when department_id is long, so names that share that leading part are ordered by department_id. // Results []PlatformDepartmentReference `json:"results"` // Whether more departments are available after this page. diff --git a/tests/mockserver/internal/sdk/models/components/platformlistidpgroupsresponse.go b/tests/mockserver/internal/sdk/models/components/platformlistidpgroupsresponse.go index 6c2cdf0e9..ec313b019 100644 --- a/tests/mockserver/internal/sdk/models/components/platformlistidpgroupsresponse.go +++ b/tests/mockserver/internal/sdk/models/components/platformlistidpgroupsresponse.go @@ -9,7 +9,7 @@ import ( // PlatformListIdpGroupsResponse - One page of IdP groups. type PlatformListIdpGroupsResponse struct { - // The IdP groups on this page, ordered by display_name and then by idp_group_id. + // The IdP groups on this page, ordered by display_name and then by idp_group_id. Only about the first 2 KB of a name is compared, less when idp_group_id is long, so names that share that leading part are ordered by idp_group_id. // Results []PlatformIdpGroup `json:"results"` // Whether more IdP groups are available after this page. diff --git a/tests/mockserver/internal/sdk/models/components/platformlistoauthclientsresponse.go b/tests/mockserver/internal/sdk/models/components/platformlistoauthclientsresponse.go index 2b393bcc0..31abc42b5 100644 --- a/tests/mockserver/internal/sdk/models/components/platformlistoauthclientsresponse.go +++ b/tests/mockserver/internal/sdk/models/components/platformlistoauthclientsresponse.go @@ -9,7 +9,8 @@ import ( // PlatformListOAuthClientsResponse - One page of OAuth clients. type PlatformListOAuthClientsResponse struct { - // The clients on this page, ordered by display_name and then by client_id. + // The clients on this page, ordered by display_name and then by client_id. Only about the first 2 KB of a name is compared, less when client_id is long, so names that share that leading part are ordered by client_id. + // Results []PlatformOAuthClient `json:"results"` // Whether more clients are available after this page. HasMore bool `json:"has_more"` diff --git a/tests/mockserver/internal/sdk/models/components/platformlistusersresponse.go b/tests/mockserver/internal/sdk/models/components/platformlistusersresponse.go index e3b40b307..3f409fb70 100644 --- a/tests/mockserver/internal/sdk/models/components/platformlistusersresponse.go +++ b/tests/mockserver/internal/sdk/models/components/platformlistusersresponse.go @@ -9,7 +9,8 @@ import ( // PlatformListUsersResponse - One page of users. type PlatformListUsersResponse struct { - // The users on this page, ordered by display_name and then by user_id. + // The users on this page, ordered by display_name and then by user_id. Only about the first 2 KB of a name is compared, less when user_id is long, so names that share that leading part are ordered by user_id. + // Results []PlatformUser `json:"results"` // Whether more users are available after this page. HasMore bool `json:"has_more"` diff --git a/tests/mockserver/internal/sdk/models/operations/platformagentscreate.go b/tests/mockserver/internal/sdk/models/operations/platformagentscreate.go index f2775424a..d2b009ecb 100644 --- a/tests/mockserver/internal/sdk/models/operations/platformagentscreate.go +++ b/tests/mockserver/internal/sdk/models/operations/platformagentscreate.go @@ -9,7 +9,7 @@ import ( type PlatformAgentsCreateResponse struct { HTTPMeta components.HTTPMetadata `json:"-"` - // Agent created and published. + // Agent created. PlatformAgentGetResponse *components.PlatformAgentGetResponse } diff --git a/tests/mockserver/internal/sdk/models/operations/platformagentsupdate.go b/tests/mockserver/internal/sdk/models/operations/platformagentsupdate.go index ed24f5f0e..010ccea0a 100644 --- a/tests/mockserver/internal/sdk/models/operations/platformagentsupdate.go +++ b/tests/mockserver/internal/sdk/models/operations/platformagentsupdate.go @@ -29,7 +29,7 @@ func (o *PlatformAgentsUpdateRequest) GetBody() components.PlatformAgentUpdateRe type PlatformAgentsUpdateResponse struct { HTTPMeta components.HTTPMetadata `json:"-"` - // Agent updated and published. + // Agent updated. PlatformAgentGetResponse *components.PlatformAgentGetResponse } diff --git a/tests/test_agents.py b/tests/test_agents.py index 5532cb18c..b95275829 100644 --- a/tests/test_agents.py +++ b/tests/test_agents.py @@ -216,6 +216,7 @@ def test_agents_platform_agents_create(): "name": "HR Policy Agent", }, ], + draft=False, ) assert res is not None diff --git a/tests/test_messages.py b/tests/test_messages.py index 667b5caa7..ca6a9f4bd 100644 --- a/tests/test_messages.py +++ b/tests/test_messages.py @@ -19,7 +19,7 @@ def test_messages_messages(): res = glean.client.messages.retrieve( id_type=models.IDType.CONVERSATION_ID, id="", - datasource=models.Datasource.FACEBOOKWORKPLACE, + datasource=models.Datasource.SLACK, timestamp_millis=558834, ) assert res is not None diff --git a/tests/test_summarize.py b/tests/test_summarize.py index 59a3def44..571e0cc51 100644 --- a/tests/test_summarize.py +++ b/tests/test_summarize.py @@ -19,11 +19,12 @@ def test_summarize_summarize(): res = glean.client.documents.summarize( document_specs=[ { - "ugc_type": models.DocumentSpecUgcType2.CHATS, + "ugc_type": models.DocumentSpecUgcType2.ANNOUNCEMENTS, "ugc_id": "", }, { - "url": "https://heavy-castanet.name", + "ugc_type": models.DocumentSpecUgcType1.COLLECTIONS, + "content_id": 885812, }, ] )