From 83b3cc2de5781524dbdc249973577017832531ef Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Tue, 1 Dec 2026 00:50:03 +0000 Subject: [PATCH] ## 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** --- .speakeasy/gen.lock | 455 ++++++++++++------ .speakeasy/gen.yaml | 2 +- .speakeasy/glean-merged-spec.yaml | 330 ++++++++++++- .speakeasy/tests.arazzo.yaml | 47 ++ .speakeasy/workflow.lock | 10 +- README.md | 9 + RELEASES.md | 12 +- docs/models/getimagerequest.md | 8 + docs/models/platformadminagentfilter.md | 10 +- docs/models/platformadminagentslistrequest.md | 10 +- docs/models/platformagentupdaterequest.md | 28 +- docs/models/platformanonymousauthtoken.md | 11 + docs/models/platformchatcreaterequest.md | 14 +- .../models/platformchatcreatestreamrequest.md | 14 +- ...latformcreateanonymousauthtokenresponse.md | 11 + docs/models/platformmodel.md | 14 + docs/models/platformmodelchatendpoint.md | 11 + docs/models/platformmodelendpoints.md | 11 + docs/models/platformmodelslistrequest.md | 9 + docs/models/platformmodelslistresponse.md | 13 + docs/models/platformreasoningeffort.md | 27 ++ docs/sdks/adminagents/README.md | 12 +- docs/sdks/agents/README.md | 32 +- docs/sdks/anonymousauthtokens/README.md | 49 ++ docs/sdks/chatsdk/README.md | 32 +- docs/sdks/clientchat/README.md | 42 ++ docs/sdks/models/README.md | 51 ++ pyproject.toml | 2 +- src/glean/api_client/_version.py | 4 +- src/glean/api_client/admin_agents.py | 19 +- src/glean/api_client/admin_idpgroups.py | 11 +- src/glean/api_client/agents.py | 267 ++++++---- src/glean/api_client/announcements.py | 111 ++++- src/glean/api_client/anonymousauthtokens.py | 220 +++++++++ src/glean/api_client/answers.py | 78 ++- src/glean/api_client/chat_sdk.py | 59 ++- src/glean/api_client/client_activity.py | 18 +- src/glean/api_client/client_agents.py | 45 +- src/glean/api_client/client_chat.py | 283 ++++++++++- src/glean/api_client/client_datasources.py | 19 +- src/glean/api_client/client_documents.py | 31 +- src/glean/api_client/client_search.py | 150 ++++-- src/glean/api_client/client_shortcuts.py | 66 ++- src/glean/api_client/client_verification.py | 5 +- src/glean/api_client/clients.py | 15 +- src/glean/api_client/collections.py | 86 ++-- src/glean/api_client/custommetadata.py | 26 +- src/glean/api_client/departments.py | 15 +- src/glean/api_client/documents_sdk.py | 44 +- src/glean/api_client/entities.py | 50 +- src/glean/api_client/findings.py | 37 +- src/glean/api_client/indexing_datasources.py | 68 ++- src/glean/api_client/indexing_documents.py | 47 +- src/glean/api_client/indexing_permissions.py | 88 ++-- src/glean/api_client/indexing_shortcuts.py | 20 +- src/glean/api_client/insights.py | 45 +- src/glean/api_client/messages.py | 13 +- src/glean/api_client/models/__init__.py | 61 +++ src/glean/api_client/models/getimageop.py | 19 + .../models/platform_admin_agents_listop.py | 4 +- .../models/platform_chat_create_streamop.py | 35 +- .../models/platform_chat_createop.py | 35 +- .../models/platform_models_listop.py | 63 +++ .../models/platformadminagentfilter.py | 30 +- .../models/platformagentupdaterequest.py | 40 +- .../models/platformanonymousauthtoken.py | 30 ++ ...latformcreateanonymousauthtokenresponse.py | 29 ++ src/glean/api_client/models/platformmodel.py | 83 ++++ .../models/platformmodelchatendpoint.py | 26 + .../models/platformmodelendpoints.py | 59 +++ .../models/platformmodelslistresponse.py | 66 +++ .../models/platformreasoningeffort.py | 18 + src/glean/api_client/models_.py | 238 +++++++++ src/glean/api_client/people.py | 36 +- src/glean/api_client/pins.py | 30 +- src/glean/api_client/policies.py | 33 +- src/glean/api_client/reports.py | 9 +- src/glean/api_client/sdk.py | 9 + src/glean/api_client/search.py | 22 +- src/glean/api_client/skills.py | 34 +- src/glean/api_client/tools.py | 9 +- src/glean/api_client/triggers.py | 20 +- src/glean/api_client/users.py | 28 +- src/glean/api_client/visibilityoverrides.py | 15 +- .../internal/handler/generated_handlers.go | 3 + .../internal/handler/pathgetapimodels.go | 76 +++ .../handler/pathgetrestapiv1images.go | 52 ++ .../handler/pathpostapianonymousauthtokens.go | 70 +++ .../components/platformadminagentfilter.go | 15 +- .../components/platformagentupdaterequest.go | 16 +- .../components/platformanonymousauthtoken.go | 43 ++ ...latformcreateanonymousauthtokenresponse.go | 26 + .../sdk/models/components/platformmodel.go | 55 +++ .../components/platformmodelchatendpoint.go | 18 + .../components/platformmodelendpoints.go | 18 + .../components/platformmodelslistresponse.go | 44 ++ .../components/platformreasoningeffort.go | 51 ++ .../sdk/models/operations/getimage.go | 42 ++ .../operations/platformadminagentslist.go | 2 +- .../platformanonymousauthtokenscreate.go | 28 ++ .../models/operations/platformchatcreate.go | 20 + .../operations/platformchatcreatestream.go | 20 + .../models/operations/platformmodelslist.go | 62 +++ tests/test_anonymousauthtokens.py | 20 + tests/test_chat_sdk.py | 4 +- tests/test_client_chat.py | 14 + tests/test_models.py | 20 + tests/test_summarize.py | 5 +- 108 files changed, 4247 insertions(+), 774 deletions(-) create mode 100644 docs/models/getimagerequest.md create mode 100644 docs/models/platformanonymousauthtoken.md create mode 100644 docs/models/platformcreateanonymousauthtokenresponse.md create mode 100644 docs/models/platformmodel.md create mode 100644 docs/models/platformmodelchatendpoint.md create mode 100644 docs/models/platformmodelendpoints.md create mode 100644 docs/models/platformmodelslistrequest.md create mode 100644 docs/models/platformmodelslistresponse.md create mode 100644 docs/models/platformreasoningeffort.md create mode 100644 docs/sdks/anonymousauthtokens/README.md create mode 100644 docs/sdks/models/README.md create mode 100644 src/glean/api_client/anonymousauthtokens.py create mode 100644 src/glean/api_client/models/getimageop.py create mode 100644 src/glean/api_client/models/platform_models_listop.py create mode 100644 src/glean/api_client/models/platformanonymousauthtoken.py create mode 100644 src/glean/api_client/models/platformcreateanonymousauthtokenresponse.py create mode 100644 src/glean/api_client/models/platformmodel.py create mode 100644 src/glean/api_client/models/platformmodelchatendpoint.py create mode 100644 src/glean/api_client/models/platformmodelendpoints.py create mode 100644 src/glean/api_client/models/platformmodelslistresponse.py create mode 100644 src/glean/api_client/models/platformreasoningeffort.py create mode 100644 src/glean/api_client/models_.py create mode 100644 tests/mockserver/internal/handler/pathgetapimodels.go create mode 100644 tests/mockserver/internal/handler/pathgetrestapiv1images.go create mode 100644 tests/mockserver/internal/handler/pathpostapianonymousauthtokens.go create mode 100644 tests/mockserver/internal/sdk/models/components/platformanonymousauthtoken.go create mode 100644 tests/mockserver/internal/sdk/models/components/platformcreateanonymousauthtokenresponse.go create mode 100644 tests/mockserver/internal/sdk/models/components/platformmodel.go create mode 100644 tests/mockserver/internal/sdk/models/components/platformmodelchatendpoint.go create mode 100644 tests/mockserver/internal/sdk/models/components/platformmodelendpoints.go create mode 100644 tests/mockserver/internal/sdk/models/components/platformmodelslistresponse.go create mode 100644 tests/mockserver/internal/sdk/models/components/platformreasoningeffort.go create mode 100644 tests/mockserver/internal/sdk/models/operations/getimage.go create mode 100644 tests/mockserver/internal/sdk/models/operations/platformanonymousauthtokenscreate.go create mode 100644 tests/mockserver/internal/sdk/models/operations/platformmodelslist.go create mode 100644 tests/test_anonymousauthtokens.py create mode 100644 tests/test_models.py diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 83a438562..aadcaf53e 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: 094550a27208e9e96bd1acb0ce2e6060 + docChecksum: e404575285afab94491c593bded9d1e7 docVersion: 0.9.0 speakeasyVersion: 1.813.1 generationVersion: 2.969.4 - releaseVersion: 0.18.1 - configChecksum: f7bd1fc926c1ef5d32e3acf00f816bd1 + releaseVersion: 0.18.2 + configChecksum: f95195d0c2d54de0cb4007ad03604e3d repoURL: https://github.com/gleanwork/api-client-python.git installationURL: https://github.com/gleanwork/api-client-python.git published: true persistentEdits: - generation_id: 18f41ddf-5f19-4637-b914-3dd62fa29071 - pristine_commit_hash: f948cd6d598320b2e57032def17863e317c983bd - pristine_tree_hash: 03c011e3c71bcb875509561a3d3adb2733176a67 + generation_id: ec0459c7-c2e0-464c-bbdf-412c65956267 + pristine_commit_hash: f00f11416ce46d01e92ee5d26eed940d5943d2f9 + pristine_tree_hash: c0de4a611cd05a77fad1a78ef46bccba05d344d3 features: python: acceptHeaders: 3.0.0 @@ -1712,6 +1712,10 @@ trackedFiles: id: eacac7a08e9f last_write_checksum: sha1:054e551fbaef0033c3914347dfd00b74b68fb5d4 pristine_git_object: 0bce5dedae73b06e8718f17ea3932b3a9a57463f + docs/models/getimagerequest.md: + id: 7cf537eafc47 + last_write_checksum: sha1:7193c0d2709fed1206c98ff4510a02f79afcd745 + pristine_git_object: 24724b7372c495438e1e62d5fd9b189c1eccda9d docs/models/getpersonphotorequest.md: id: 90dbc76a2335 last_write_checksum: sha1:0ca0cb5d9a126c0c85964e52dcf160bfb71bba93 @@ -2310,16 +2314,16 @@ trackedFiles: pristine_git_object: 4a911ee3b51a89c0a847cc6984af2b01448edc73 docs/models/platformadminagentfilter.md: id: 0aa1dfda3b88 - last_write_checksum: sha1:54be8af14e1b4b3b254435344134a9e614c9f3d5 - pristine_git_object: 9190b32272c268c3e7862568ef0abd49f72c96ef + last_write_checksum: sha1:54ab438b6522f54ec52c01f5abc3b5aa545a724f + pristine_git_object: 463713f6d93916c884a30fb4672e0bcc7ab8dc71 docs/models/platformadminagentfilteroperator.md: id: 45314faaf71e last_write_checksum: sha1:f9b7255b1f2b7849ba405c8c925660ce44a63708 pristine_git_object: 9ef2f8ada10bd385de017d62d61b5db6e4bcd020 docs/models/platformadminagentslistrequest.md: id: 84f54ae1dec1 - last_write_checksum: sha1:4a9099f7760658ead7476aef477c2d619ce61399 - pristine_git_object: 53c5c53bbf5f24b101db8def018bb0c5ea1b2d89 + last_write_checksum: sha1:b8809bde6b4cc0d40a520d88bb12cb181bb74f70 + pristine_git_object: a613069a9d5c8fdeff8911e1f04d87f68b8fd63f docs/models/platformadminidpgroupsgetrequest.md: id: 5ac3ddcf8499 last_write_checksum: sha1:ab08329b54a480697987288d5796ebc525745131 @@ -2578,8 +2582,12 @@ trackedFiles: pristine_git_object: 3d9be092703b124f4ca943f7157224e99d6eaae6 docs/models/platformagentupdaterequest.md: id: 26a02c00b565 - last_write_checksum: sha1:3d0e75adca1744a1101366f0a8317603376885f8 - pristine_git_object: 711eb1fcf3d5ef685d67cde5882854a32f2e901c + last_write_checksum: sha1:ba039375c187204e5e58c6e394ff1a7d70917626 + pristine_git_object: 35f1f089a1f4606777acee762cb9a83a32cbb909 + docs/models/platformanonymousauthtoken.md: + id: a3fe43f9547a + last_write_checksum: sha1:b7c9b2a16c66fd50caa7e1e41cbaab0a540ff9c4 + pristine_git_object: 4417dfd4b50f3608b99f0e5323d98dfdf0dd4f67 docs/models/platformauthenticationsuggestion.md: id: d3263acb33dc last_write_checksum: sha1:0cf4d355db967c070866a43cc7cf8bfb00dabf8b @@ -2630,16 +2638,16 @@ trackedFiles: pristine_git_object: 9ee0df259532723cb625e145c48c0daf7d7a0d8e docs/models/platformchatcreaterequest.md: id: cd33a9dfda85 - last_write_checksum: sha1:0e26aaf39478d21d6bcf3730943323ff34b2a710 - pristine_git_object: 82808d05f9f69e0885883471aac9783c67801d62 + last_write_checksum: sha1:975a37b16fe155a0a32dfaa6b4345bfa183f9737 + pristine_git_object: 23fbb6f3e57e077da8ce1fd9c12427d6b952b59c docs/models/platformchatcreatestreaminput.md: id: 8db5acf6cc48 last_write_checksum: sha1:26e70a3ce28592c6059c62370d882f66f28e1387 pristine_git_object: 250ba3f9e5482057896cf121968d834590649a3f docs/models/platformchatcreatestreamrequest.md: id: 2f7f30973ec2 - last_write_checksum: sha1:6e27a56cbd02cb01db44a93d1758245221c2897d - pristine_git_object: 484d017f9d5e02aeae6539c1a354644b4c1b9436 + last_write_checksum: sha1:f3abf1537f767f0f7346ad7ddfafd753d373163c + pristine_git_object: b148cc72ac3aa15f7e15b23d0e213679383359b9 docs/models/platformchatcustomentitysource.md: id: 6e12deaeb23d last_write_checksum: sha1:b8ef7e1c92d45a3a3329a88b57361ba9553f28b3 @@ -2828,6 +2836,10 @@ trackedFiles: id: a9175ad4799d last_write_checksum: sha1:abb012a639cead86824ed11e596bda3632e2fddb pristine_git_object: 1b46526d54ef25a1d018d2cfd3bbafde48fba72a + docs/models/platformcreateanonymousauthtokenresponse.md: + id: 1aef689c8278 + last_write_checksum: sha1:fc78a848551cdaf23448e4fc63535bbebbca034d + pristine_git_object: 033b6fcd2abddf9b9d178ef96fc54bfb5c02ed47 docs/models/platformdatasourcefilterinfo.md: id: 61ae1a6d6454 last_write_checksum: sha1:41734266d612f710490590c79d1104b15e165291 @@ -2996,6 +3008,26 @@ trackedFiles: id: 84ff8f38e838 last_write_checksum: sha1:7e2cc0010d738cd1a2ce104a90299936fbe40d43 pristine_git_object: 6e3694484701e30ba1114213a8f0a287b5f4030e + docs/models/platformmodel.md: + id: fe1fbfa75b98 + last_write_checksum: sha1:263bfb1cd05f609a4b5c6eb7c8d51bf4bcc72c1c + pristine_git_object: 4b01381d94c9d1ca9b6acda755fd7fa509544e70 + docs/models/platformmodelchatendpoint.md: + id: a6c00eb20d29 + last_write_checksum: sha1:6932532fae4d754bad860fe7d326011e1524c56f + pristine_git_object: f177f488331400f9fda96ca573d369500b0d4542 + docs/models/platformmodelendpoints.md: + id: e96a19720cc8 + last_write_checksum: sha1:87079afabe83970e13de446e2db45430c485ca8d + pristine_git_object: a00f1e5f838f54c3b6e6600c37c3c92f65912f22 + docs/models/platformmodelslistrequest.md: + id: 074b4b7608ad + last_write_checksum: sha1:7c173e17b5bf2372746f5a94f007bf85cd5bd975 + pristine_git_object: 306e1319bbe2e3ea4be76cc27eb31d2506cd2204 + docs/models/platformmodelslistresponse.md: + id: 9c7d816a7906 + last_write_checksum: sha1:26c44e149e731153d2a468304817bd65f59fd818 + pristine_git_object: 28cff0bbe7f98e96d0a9022636e2bb512e2de5e8 docs/models/platformoauthclient.md: id: 4a5bd97c4db8 last_write_checksum: sha1:c2d48a35914939ecc607e23dcfb2c89dff22ec9a @@ -3052,6 +3084,10 @@ trackedFiles: id: 2e752ca0f45d last_write_checksum: sha1:250c20189f7d3163d46e0036b2a7d8867f12f788 pristine_git_object: 169944d5c3ce0c14a23f82a9c5ac30efdec24533 + docs/models/platformreasoningeffort.md: + id: e1771449d2e4 + last_write_checksum: sha1:90c315ca90d8550bfa62c5541ce3698c9d846f01 + pristine_git_object: d4d067d6f01783c2e60e667604f783c05634dde5 docs/models/platformresult.md: id: 0fe3fed8d508 last_write_checksum: sha1:8f0ae4b5184abebeda23cbd2348fd8808e5f9f62 @@ -4314,28 +4350,32 @@ trackedFiles: pristine_git_object: 61dd41f0319201cc105e29174ab1cc0018cecbce docs/sdks/adminagents/README.md: id: 665e1b8d841f - last_write_checksum: sha1:d50cf9d9e2bb56f020bc12660a21b4f4e524257e - pristine_git_object: f4b51cc52c9bad4caf2be6176112e6d55937a07a + last_write_checksum: sha1:e517c92fd6b470687d8d20e502e70dd4ff15aef9 + pristine_git_object: 51b0d1dcf7a791952abf652bb5b62ad9eb4fd909 docs/sdks/adminidpgroups/README.md: id: b6a9054823ec last_write_checksum: sha1:491474aa4e883a8915452f676fb15b5b45db390a pristine_git_object: 0574fa5679645560b594228a2061b0c3c9326335 docs/sdks/agents/README.md: id: 5965d8232fd8 - last_write_checksum: sha1:ce342121a1cac3ceca81086a725273e8a3e22f00 - pristine_git_object: 8a9bd524ea2897b8a0123e53be8c1fabef31c722 + last_write_checksum: sha1:a95c11ce1204f2fcd4aec150e794594b8eaca27f + pristine_git_object: c5bc6c2c3f2cca3c9a7be1f08554bcecc1fe8531 docs/sdks/announcements/README.md: id: 3d2e130a217c last_write_checksum: sha1:e6750d27c83a17ac456bc84cf48a2c8d36a0d5ee pristine_git_object: 09c63507deac03ca0ec0286f129581983220a851 + docs/sdks/anonymousauthtokens/README.md: + id: 85d9ff725d47 + last_write_checksum: sha1:7127f31b8fd68f30d229ac26d8472d7628072c87 + pristine_git_object: b46c7e968e2b83ac43a9e7a9a0233ed80a0fdd0b docs/sdks/answers/README.md: id: d1b7559999eb last_write_checksum: sha1:3a59beb280771a1eff9215b063654f6dd7ac836c pristine_git_object: 7a32df2aaa86d449b50aa15dc7bd474076ca50c7 docs/sdks/chatsdk/README.md: id: 83b4ee321663 - last_write_checksum: sha1:5fa39d6171473da8f5d49b748b7c7e3af3cd382d - pristine_git_object: da4b455bab880ada23ffc991acde7da0e2eeface + last_write_checksum: sha1:70dd72fb71f07c614b24165a680b2a48d8eff4a6 + pristine_git_object: 29c92ccf630607cff9c5ebf79e57fbe1b5dc01e4 docs/sdks/clientactivity/README.md: id: a309613986a5 last_write_checksum: sha1:d5807da8dd2a67bc3b4fe60ed32c057e0e3969d1 @@ -4350,8 +4390,8 @@ trackedFiles: pristine_git_object: c50cb20e9b2bcba77cfd67322430ad775c8df0b5 docs/sdks/clientchat/README.md: id: baf998e3d238 - last_write_checksum: sha1:7dee2a253d5c45dc2754cc40e95cce9e4adceea9 - pristine_git_object: c59d035d00191f121c302b6b5a2329f4482e477f + last_write_checksum: sha1:c08a5bef108b5e8bbdaedc6f8cb1066966b34dc0 + pristine_git_object: 16fc220b5483424609b252ba95efc79a452edb30 docs/sdks/clientdatasources/README.md: id: 0d629dc3ac5b last_write_checksum: sha1:546f3aa46d203d85bf3808a17e1556d0f4949f51 @@ -4432,6 +4472,10 @@ trackedFiles: id: 3f1f6d38fc33 last_write_checksum: sha1:d14580f5bfd78abd3779b6e2c4283719505b4d8c pristine_git_object: 356f899f3fc27cb76f686ef3707666c3b46b45b2 + docs/sdks/models/README.md: + id: b35bdf4bc7ed + last_write_checksum: sha1:6e1ad93d33c8f18e165d1989b2e95b7bacfe02b7 + pristine_git_object: f4d89e884811b50af89dbd9e6ebdb0de5839521b docs/sdks/people/README.md: id: ff7b3ee21c2b last_write_checksum: sha1:73afdc543b395ed248213a396c87637427c43b61 @@ -4486,8 +4530,8 @@ trackedFiles: pristine_git_object: 79e388be87446ab6a4064b372bad0e8376d0cb5e pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:873d091a85e4aebf3335ca3324f43b106d1e1e86 - pristine_git_object: 9e4e3c244957d9e19be70961b6caf2da38bf89dc + last_write_checksum: sha1:a977c4151ee827468dea59bbe83c574354d3fd96 + pristine_git_object: c72b3762456a588b361a95cb167fa451a91d44e4 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:1ad9251ca23c3f195fed36dfc0d83254a65bd895 @@ -4514,108 +4558,112 @@ trackedFiles: pristine_git_object: d7f9b51b5278bc431e9787d13e98d7199e08bed4 src/glean/api_client/_version.py: id: 0ce22b26136b - last_write_checksum: sha1:20cd874ec02264ca03da8ca2e8c35454b5d4799c - pristine_git_object: 88adac12c28b537f872c9c88f72b7d7df2ab945f + last_write_checksum: sha1:87f083b081a79fa2d8bfbca3921c8672b20cbe70 + pristine_git_object: 03f4b3e3bc48091f828fa1b64b6aee25a427ef9a 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:5d05d06d2889d56d01cfd48fa97e7fbd5fe782d7 - pristine_git_object: d5560bd88cbeb672eb8fe358cf16ae1f82eed5f9 + last_write_checksum: sha1:70b32110f6789575d85f122804ec3e48ed994b92 + pristine_git_object: 6fd07dd6f86ba6632caf40d3a41ec42c154a4fb0 src/glean/api_client/admin_idpgroups.py: id: 8f0ad8c9671c - last_write_checksum: sha1:4df4787c794e6aa2e2f79649a69da22f337706c3 - pristine_git_object: 1b731dc3569d5e7fdabd6ca295868e5e865a580b + last_write_checksum: sha1:d4751084dc6780ea8aaa98ce000e5650d75b0de4 + pristine_git_object: 5802968f9e2622e2eba593eb07385a4eff94b72f src/glean/api_client/agents.py: id: b925701a9217 - last_write_checksum: sha1:b5d4479b81f06896a02e586126893a5fb1b2d299 - pristine_git_object: 36d60c9771871189de20a43da16f9e1569cf8b48 + last_write_checksum: sha1:cdeef340a5e7adcf46407e2e781a90c7726a89b2 + pristine_git_object: 51f5d37e81b9c93bfa8e395115b76dd4afbe8ab5 src/glean/api_client/announcements.py: id: 452f3d593912 - last_write_checksum: sha1:d6063960043d0ebb8624a99b4bfc37695666f0a2 - pristine_git_object: c624c8893077374897bb6ac4faba15288e3f1f4d + last_write_checksum: sha1:034640f1156b65b678f191eb7da60678f049ca39 + pristine_git_object: 623c9515249811237034bfa333a63031bc825d96 + src/glean/api_client/anonymousauthtokens.py: + id: 0d8a71904238 + last_write_checksum: sha1:6ab668861262406462804146e51eb4cd379734c4 + pristine_git_object: a27498e9b4cf7365f0867a4c8e6fe54d0bdeeaf6 src/glean/api_client/answers.py: id: 184a18f8be7e - last_write_checksum: sha1:c6959dbe7f7a99c812015dba056708d22f55430c - pristine_git_object: 4abd27b0cc1df3de5e478a9979f407a61f64093f + last_write_checksum: sha1:071c8ae31e035e617e633e8885131a0415a93464 + pristine_git_object: a966191ed661eda1e69fc58bc6db411573cfaa74 src/glean/api_client/basesdk.py: id: a9eeecf7fa49 last_write_checksum: sha1:42db9191073913259dba73f5fe2015188a401391 pristine_git_object: f71c7451bc6e33931314aff6134cce1f292e9dc5 src/glean/api_client/chat_sdk.py: id: f2f30e13ca42 - last_write_checksum: sha1:0a05c5d0a5d981d9773d48bcab09ffb50377ae8e - pristine_git_object: d8e27e15349e4124d8b2ebdf8f918b1e58a28e82 + last_write_checksum: sha1:93eee41a04c2ff0dc26c245943c471eecb6a37ae + pristine_git_object: b64422a47fd6cb72d741c0d6244809e1c4970518 src/glean/api_client/client.py: id: c0c188098f10 last_write_checksum: sha1:13ce2f2827f9e958ecd363d675a614d2bdce6e30 pristine_git_object: 99c76d5c578c22fd95b2393364d82491c20cf6ff src/glean/api_client/client_activity.py: id: 8227dd95d034 - last_write_checksum: sha1:d235ce3dd27099ac28291a843d0fe1b8d400fd5e - pristine_git_object: e601c3f79e2c9bf0c3fe78b94f6a1c884b09dee4 + last_write_checksum: sha1:87cee2ff23034e9d709d2f916f61a8affb28dfef + pristine_git_object: 6ff3a9fad923ee3a73e82ee77a9a9496dc14b1bd src/glean/api_client/client_agents.py: id: 61b53ccd2b3b - last_write_checksum: sha1:0a307b5fb4270674019da8cb3c4937b05f21e48b - pristine_git_object: 3d53f73891902c9f3e29dd1f6f39bc60f1d346b1 + last_write_checksum: sha1:6ea6d018138f6c0a2caccb492b09947a6f15b582 + pristine_git_object: db01c875b30640f8668a674d3c3e392bbb893651 src/glean/api_client/client_authentication.py: id: 0b237b7c1b11 last_write_checksum: sha1:1f8835335ba6fb821618ad9d0c55409a65da1aef pristine_git_object: af50159ba594c71cd97f5da6f41a6d748b716397 src/glean/api_client/client_chat.py: id: 42cbb9b5acf3 - last_write_checksum: sha1:d7fbeec382ad530511af072d5a8cf599b10472b9 - pristine_git_object: 3443c1117d6a0f8ecf2cf4ffbcf0076ec1c266d7 + last_write_checksum: sha1:601a8967dd2d09ef3e7545a0b443a3c18126e3af + pristine_git_object: 4e0bd8a58f884d04d70e84cc0f94b7219f9e04c4 src/glean/api_client/client_datasources.py: id: 75635d40099f - last_write_checksum: sha1:7364c786585593d8d9757665a023269441910d5a - pristine_git_object: 2c083ce2c957463fde84d943d8e8cc3537b27248 + last_write_checksum: sha1:36efbf15809c3ecc56cf539b3bce0d22cdefacc5 + pristine_git_object: f9b66ac93101492b72043864d0f1cc13b4e8508d src/glean/api_client/client_documents.py: id: dac599de515c - last_write_checksum: sha1:0fc334f5d95d7a58798fb65a74f9dd4dc4938407 - pristine_git_object: a46828955458718a5be9cfaa6c0f09669a4f7c2f + last_write_checksum: sha1:19c5db83700ca93f2df55715b1774a86d82090c0 + pristine_git_object: 2299e86f9e03ef88a0ec13c77a54c993d55663a7 src/glean/api_client/client_search.py: id: 49ce2de81382 - last_write_checksum: sha1:ae2c03b50ba83b196715fc97174bf87f64d8d404 - pristine_git_object: 177d97a6064dfc21770a9bcd91cb63e67b453a03 + last_write_checksum: sha1:d1b59ce5536f9813b21c451a5041f96032b916bb + pristine_git_object: ec65a658ee97d9b05bb71c345ec3ec1d205eaa8a src/glean/api_client/client_shortcuts.py: id: 5ef5dacbcba9 - last_write_checksum: sha1:c66df07346e8c5279d5ad2f35faecc9e28bb4dcd - pristine_git_object: 727b8570b2dd7e07c2d7ebbb7701563ca4634e31 + last_write_checksum: sha1:1ab63c270886543add9a66518855348e8e699544 + pristine_git_object: 4bf3de66b073b12c0f6994e349369f0d4517f4bb src/glean/api_client/client_verification.py: id: 211199afa506 - last_write_checksum: sha1:911caa2a6faf59efba531f1392c29e8c07958cee - pristine_git_object: 8a31ae72ced6222db47baa1e41a5b0be4f590f39 + last_write_checksum: sha1:e313ed0437135d3a13bdf54a17356795ecafdfce + pristine_git_object: a32adc434780783e5f8af978da829e2ed367dfbc src/glean/api_client/clients.py: id: 42c841daa28c - last_write_checksum: sha1:90a2f3893982e835a3fdbf2369359e1fd35043e9 - pristine_git_object: b2b6cc719eca74be0e6c83bb61a3c9ec9002dd27 + last_write_checksum: sha1:e6559b380927842147e2da1e736b0d824c50a8d8 + pristine_git_object: 11cc3ed79762f46ae828fe936af4c1f574ac72f0 src/glean/api_client/collections.py: id: df34f0fd10dd - last_write_checksum: sha1:dc9e0ce915a6068c8a67c2b7e727f330c8703cea - pristine_git_object: 422d978f5955e643ae69e4644b880e702286d58c + last_write_checksum: sha1:05ad538ea0f8843387247247be2d0db085ccca6c + pristine_git_object: ee64a0d06331da708567ea215744d31e9e9a1879 src/glean/api_client/custommetadata.py: id: d5621a2ad56e - last_write_checksum: sha1:3ddb8b20b9d8e7bb75c51799b9a23385ebe02f57 - pristine_git_object: e460a7f4c9d5904532cc11e7983b16304f889065 + last_write_checksum: sha1:57651a35e13b6bb5c2b95a82274e5f0faeae41e8 + pristine_git_object: abbc1282494c0a868608737ba438675ac6bf9690 src/glean/api_client/data.py: id: 21cf13413429 last_write_checksum: sha1:e3c913bdf83bc281085af48c96a089b440976389 pristine_git_object: e387ce4fe842388b52fd57746655dd2187cb3e74 src/glean/api_client/departments.py: id: 04b4ac5904bb - last_write_checksum: sha1:ec3bb485b3d4fa22075acaf04fd372f7445ccedc - pristine_git_object: 30acbc73d895affab38dda91a52539ecd21dea20 + last_write_checksum: sha1:73c0d609453bff0542f6b482dddf7853ab172aff + pristine_git_object: b0f88746135d3ce598f1597bc2daa6ebe1eadcd8 src/glean/api_client/documents_sdk.py: id: 9e873980fc76 - last_write_checksum: sha1:8b64ead1f457af5d52603a96e2c024acb9915074 - pristine_git_object: afa96c1a7c6454b39a033a5b68b1904fc22892a6 + last_write_checksum: sha1:66d8859c3e9a72b0dc9b28aa9fb9e3da35fe5dac + pristine_git_object: fcd1d63b5d013bc4e988282532c526c85922747d src/glean/api_client/entities.py: id: 38ebbab2f8a0 - last_write_checksum: sha1:204dac270a86e6fd2d795713513e8a12a2251120 - pristine_git_object: 13ef0145b6dc5c43a99eb3402f4e0b80542ad6b5 + last_write_checksum: sha1:cc4446a973284574a50a23946cc9e042679a614a + pristine_git_object: 91486d5081abcd6a57c1eafcae8649cb7315545f src/glean/api_client/errors/__init__.py: id: 88bbd5450191 last_write_checksum: sha1:c57af4be98422eda7b3d184439be3cdd7985709a @@ -4670,8 +4718,8 @@ trackedFiles: pristine_git_object: 9d6e5e15b4c17056cb9414bfa7fe4a7a6682d262 src/glean/api_client/findings.py: id: 50243a1bf5e8 - last_write_checksum: sha1:36b5cee9c51f7e135000d4a8583c8e7a845586b6 - pristine_git_object: fe62fb85053a9cb7a4ebfb3d6e7a03c954e2d4c6 + last_write_checksum: sha1:862466beeec9b32f6b030669f96107c995c835aa + pristine_git_object: 0e686896f767b23cc2c17c80790b4886c832933e src/glean/api_client/governance.py: id: e30db8f06e58 last_write_checksum: sha1:2432c451d76815419a0879971e6662e0091bc5e2 @@ -4698,32 +4746,32 @@ trackedFiles: pristine_git_object: 017084e7915b981f9811df4c86b3b0ef914ec145 src/glean/api_client/indexing_datasources.py: id: 9520e2db8686 - last_write_checksum: sha1:eefdf665ad68a378f3d5120991fa8d0ab3f7852d - pristine_git_object: 4b36a694b1f25e6b210f729fb1732ad74927590b + last_write_checksum: sha1:fc57196e6ede7fa368dba3e104820938616ba50b + pristine_git_object: 8e99b56e2c9d05a759a93f5b78791ca12ccc7f8e src/glean/api_client/indexing_documents.py: id: b5c2b64ee1fa - last_write_checksum: sha1:1a5488fc27e87cf8b700466ec196081cd69f9738 - pristine_git_object: 235cf11c2fd1cb87e8f534d0d152c4f4f03d0441 + last_write_checksum: sha1:79905d95256bb219da629e92e94110a64e29bb5a + pristine_git_object: 9c9774ab908d4ef6b077216bb4e88f3543c6c0b8 src/glean/api_client/indexing_permissions.py: id: 86fd3f14396c - last_write_checksum: sha1:19b483c02f0be9d95f6698fd35c2da6778febc0b - pristine_git_object: 8901c7875943d58f302f384bb1c794ec56104583 + last_write_checksum: sha1:8164b97d89c9b393c44e1054a021d3d2ad96fa72 + pristine_git_object: ba1e2ff303fd5f33b9195e6820aa7e8574a44839 src/glean/api_client/indexing_shortcuts.py: id: e833440cda56 - last_write_checksum: sha1:fad9b88a0766d30e5e6b7119ab0f3b8bef681d29 - pristine_git_object: 155d0e2e3b11fb0e8ad6a6f3947c9cb4c9634995 + last_write_checksum: sha1:74c39c3564884460a2faf7b976e81e2002e2c8d5 + pristine_git_object: 758d8acb3f0e52c38319c5a4e7d8fd6132b87c6c src/glean/api_client/insights.py: id: 4c5708d15234 - last_write_checksum: sha1:1473656cccffe8356ed5b04ade36382e3c1caa14 - pristine_git_object: 195014d05c55d901980e8f4a44f4f07381517ee4 + last_write_checksum: sha1:b11571ac65afd8a4afe00e287fb1d9718a2f54ad + pristine_git_object: b224c7c25018b7c0a98b1dafae6d2e7fbde930db src/glean/api_client/messages.py: id: 3751db64257b - last_write_checksum: sha1:b21d4b790ef9c5999cb660fa1851a3eb17e44c93 - pristine_git_object: 00bad6ca8cb34a006cf19821210348a804db73ee + last_write_checksum: sha1:c6d3e25369466a0b55404b4993b47afe5d142759 + pristine_git_object: 1b1e73ed47f8015a05740e4f42e5f71883d0dc4c src/glean/api_client/models/__init__.py: id: d5f6ea5efcbe - last_write_checksum: sha1:b93d800e191be83f78a966eba137fb0183f43abc - pristine_git_object: 172a0c63c6b604f46d9f97b71ab6264696360bc3 + last_write_checksum: sha1:83348daf91f1731fabb7c9ca2aed18c4643bf4b6 + pristine_git_object: 50b6c7b969f7765a20f08c78e2cd53e82b300fd7 src/glean/api_client/models/accessrequestpermissiondeniedresponse_error.py: id: 22a2fa0d5899 last_write_checksum: sha1:7931c6e1056d03612c02ce490326cd5d0cbea349 @@ -6016,6 +6064,10 @@ trackedFiles: id: 0f3847de9013 last_write_checksum: sha1:3bacf5b957703942aaa916799d9e400e34f94c25 pristine_git_object: a75dcbf246310f9429fd2409795d7adbd430bce3 + src/glean/api_client/models/getimageop.py: + id: f5895c42d3c7 + last_write_checksum: sha1:31cb607bb60295c69ee593f13e7b5523157c897a + pristine_git_object: 394d92638e836885efe0454c889e60489c87aac7 src/glean/api_client/models/getpersonphotoop.py: id: 52871feebe6b last_write_checksum: sha1:fce44619d346b566a814d48039d57f5d92e22c95 @@ -6450,8 +6502,8 @@ trackedFiles: pristine_git_object: 13fbcd8c13c7181726ca5677e4fbf1b1a98d4436 src/glean/api_client/models/platform_admin_agents_listop.py: id: b9abc1576fa5 - last_write_checksum: sha1:0ebe7033db2234a500423d5a8670b1c185e1339b - pristine_git_object: 38fa6be72eefe2e37376cf5543d18b7e86045a82 + last_write_checksum: sha1:8fc11c8bd9ec5633d86e2e22d9407e68d833b338 + pristine_git_object: ba9abfb8a4fa15e542638d239065f39aa597781d src/glean/api_client/models/platform_admin_idp_groups_getop.py: id: b99cd91df7c5 last_write_checksum: sha1:a0fbe49ea9b183b7dfce1570e9833fa70fce61ea @@ -6510,12 +6562,12 @@ trackedFiles: pristine_git_object: 61e106659aa45c1162be8dae65bc674b694ba44b src/glean/api_client/models/platform_chat_create_streamop.py: id: 6950e1c0b047 - last_write_checksum: sha1:68fe7f74065e104accdb16229a0cfeef2018b099 - pristine_git_object: de4b200b31393955e82650cd5557ff6e6ffe3047 + last_write_checksum: sha1:1bc7f419129f2609e18f24ca22dae4d838cb17e7 + pristine_git_object: 7d738299bdc7447606c92a22c693a99ab5456fe2 src/glean/api_client/models/platform_chat_createop.py: id: 6f911817c878 - last_write_checksum: sha1:a4b2f701fad8b7721666771191d2058cf38ae6ac - pristine_git_object: 3fdfd22a2cb053d5882ac647095a2e623dc81116 + last_write_checksum: sha1:06bab03dfaa5078bc418444b651fe1f31d4e4827 + pristine_git_object: 46e6374d87c4f9c9a4b64188b3f20653481e9c98 src/glean/api_client/models/platform_chat_resumeop.py: id: d2e4598ab9b2 last_write_checksum: sha1:a5980f3163352b4e70c076dd6fcf84873dc5fbf7 @@ -6540,6 +6592,10 @@ trackedFiles: id: df1cd0b35d0f last_write_checksum: sha1:1928820cd381e9603bcbd7dbede462c53fa21138 pristine_git_object: 623c3b10f804d298caf573c8f92e059375d37ed0 + src/glean/api_client/models/platform_models_listop.py: + id: 32919b516f6a + last_write_checksum: sha1:3e4fb9f59971bf9f9c771a644e3380b79828baf9 + pristine_git_object: 81c426106802e93fa177dfc3e09c500d83686f15 src/glean/api_client/models/platform_search_filtersop.py: id: 3876ec8f6e5b last_write_checksum: sha1:298d62c62682b88f16056291122c48bf0a313f12 @@ -6646,8 +6702,8 @@ trackedFiles: pristine_git_object: a0fa5e195b44035bfbc0d159651688c0d3487bf3 src/glean/api_client/models/platformadminagentfilter.py: id: c2e1489f07cd - last_write_checksum: sha1:dddc9d5de522fdd1de1d907f76487fd9690e0160 - pristine_git_object: 770bd89bcc4515687023738c15a44f9fe33d48af + last_write_checksum: sha1:de0d5547d3eebfd9b5fc2c1d3fccb24d7d1c6797 + pristine_git_object: d4f2de244c4294c7f6a646c9d07d72c792104935 src/glean/api_client/models/platformagent.py: id: edd82e5a258f last_write_checksum: sha1:3ff28375aa3189c0e66dc11e60429db53c2204b8 @@ -6814,8 +6870,12 @@ trackedFiles: pristine_git_object: d9241c63ad8ffe584b4bfa0a2ecdcd696853b8a0 src/glean/api_client/models/platformagentupdaterequest.py: id: 30f9327fa395 - last_write_checksum: sha1:ad82aa38d986de6268d47a7f092fa341dc6fd7c0 - pristine_git_object: 80f0d5b1a672baa68b80f1333acaa7b1f2a6f476 + last_write_checksum: sha1:557474f4c5d693e6265b4cdb472dbc89dc981971 + pristine_git_object: 526ebbbbab303583fb3be2bf2fc9762889bc7ba6 + src/glean/api_client/models/platformanonymousauthtoken.py: + id: d6ed962e28a2 + last_write_checksum: sha1:5225faf0e1d49e6237606d2a1e5522b1d44b4f36 + pristine_git_object: 9da73442535941298026f91ff0200681dda3c8c7 src/glean/api_client/models/platformauthenticationsuggestion.py: id: e99ec01300d2 last_write_checksum: sha1:8ca85dee0fcd2d0cfa67355a3bfa3a127774e7ba @@ -6948,6 +7008,10 @@ trackedFiles: id: 87e6bc168e08 last_write_checksum: sha1:7aad3c47153c875e8b6fd778b49d38f25c9882f2 pristine_git_object: 242b2327f220b50a5ab450eb2355dcfa511f29f8 + src/glean/api_client/models/platformcreateanonymousauthtokenresponse.py: + id: 0a1839458aab + last_write_checksum: sha1:fe6cf9987970e6e78b93926de9b67c16e0fcec08 + pristine_git_object: 9bb13ec74d07a302aca2709dd0cb89aa5552e790 src/glean/api_client/models/platformdatasourcefilterinfo.py: id: 30d2d116afc7 last_write_checksum: sha1:b9dfe4ac308dbcb7ecd477f9c6c2d3cf8128174f @@ -7088,6 +7152,22 @@ trackedFiles: id: a94017fc587c last_write_checksum: sha1:1070bc0a621ea4f787a3d52c77d7475086ba46a6 pristine_git_object: 917a1d2fa45e9a2ad3fd8b20f7b0f2e8d7723309 + src/glean/api_client/models/platformmodel.py: + id: 15b73599b85d + last_write_checksum: sha1:d0004a3e363f0cfe4a2e4d405d03e6f1180358e9 + pristine_git_object: b7203e66e3280dc1adcc784bafc6a4895cbd1632 + src/glean/api_client/models/platformmodelchatendpoint.py: + id: e6cfe86cf813 + last_write_checksum: sha1:7d90ea70d76da1fcdf17e20fded6d9532967583c + pristine_git_object: d27f3256d1b8fc6687f2521aec2ed8b5634a6784 + src/glean/api_client/models/platformmodelendpoints.py: + id: 22d44128721c + last_write_checksum: sha1:14472d51b699849fe7760ac1b060ff0798a0107b + pristine_git_object: afe2c96dfd84a63498d6dd30d4d1fe2432b90b23 + src/glean/api_client/models/platformmodelslistresponse.py: + id: c346eefbc295 + last_write_checksum: sha1:1714b05e677902c6ad05b6530793a0638b8cffa4 + pristine_git_object: f2e789aa36b6c4b5f4853b4bf55094088714fe71 src/glean/api_client/models/platformoauthclient.py: id: bc5af16babef last_write_checksum: sha1:a850c599f78291cdd9e34cdc7564e94b8c0e0d0b @@ -7140,6 +7220,10 @@ trackedFiles: id: ea67cf68f170 last_write_checksum: sha1:c34393c23b8a4fa18142871df04a879726d5e1ad pristine_git_object: 36a6cd9c92d3a05661b0376ba9e83120eb88d4ea + src/glean/api_client/models/platformreasoningeffort.py: + id: 6ea219681ed2 + last_write_checksum: sha1:3bf499bc1ab94eb9f322e90eae8ca959e39f69f5 + pristine_git_object: 5b395feeac9a5c9c15b0dccb7791192dc8488585 src/glean/api_client/models/platformresult.py: id: 65de4ed5c1b3 last_write_checksum: sha1:1e6be8911c58d5b6706a945346a12393576549c8 @@ -8064,54 +8148,58 @@ trackedFiles: id: e15ed09cb123 last_write_checksum: sha1:df2ea380a023fd5ae44be0eaeab2a340c4e39758 pristine_git_object: 80da51298f29925f98d18077f112f79f36cdfd96 + src/glean/api_client/models_.py: + id: f29d3a399c2f + last_write_checksum: sha1:6280743c8962a11b7891751e4ed68dc5c6d3cd09 + pristine_git_object: 9b63d0b265b802f76fbabcd1a70f55ff8533bfe4 src/glean/api_client/oauth.py: id: a703a4eba235 last_write_checksum: sha1:565b3f7faf7db34dace04209eea61e0ac2059036 pristine_git_object: b1c0a0215ac4e257aa89427da51151d2b3fc8715 src/glean/api_client/people.py: id: e32c03723ded - last_write_checksum: sha1:d2fa66b95b1006f97bc4c6ebd8ffb908e7a97251 - pristine_git_object: 02f260b9cf573989f283d830c1d790613e7ce2ed + last_write_checksum: sha1:54920f1366704a5502ab37ca2720a7d1ad85975d + pristine_git_object: a3908d2be574cf4c266fa0f09ca082250cba2108 src/glean/api_client/pins.py: id: 4a37ead65f8a - last_write_checksum: sha1:fb373e57cebdd61fed44324c240253021fcfaf83 - pristine_git_object: ab20431701c64c78e43f4925afad5ec28ad93e6e + last_write_checksum: sha1:c7450cc90686c4d28a69a650a802b80ad707ab16 + pristine_git_object: 5c3db3cd2e303abbdee16d244bc1e3403adf63f5 src/glean/api_client/policies.py: id: 680f941e0620 - last_write_checksum: sha1:125e762ac54e4ac07d53d4a8d3407c5b95953945 - pristine_git_object: 0fc83f5d887ac44ef0b43195c07b2a8df721bbbe + last_write_checksum: sha1:455305c41bbf608e7c7e4905017aa49ebd5e6cbb + pristine_git_object: 6c1d183c4b8575806a8550043def37a13f3a1c11 src/glean/api_client/py.typed: id: 85a37d5088f9 last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 src/glean/api_client/reports.py: id: 5e6fdf55dd93 - last_write_checksum: sha1:ada89204244ad6ebeeef2df1b4de9204d321eb48 - pristine_git_object: b7c827079fc9cd44ab1f2b83afc16430b2e158ec + last_write_checksum: sha1:de151f642c8b403397aea31ae8efbd29e98fed44 + pristine_git_object: 542a090bb69c7e87ea7cc93571b2cd6dff82dd42 src/glean/api_client/sdk.py: id: e2de37b3ce92 - last_write_checksum: sha1:7ba4ef909d26e753f954011d804f6cd8dda7acf7 - pristine_git_object: df6babdf094b1fe1014960f9b07a861800ba1221 + last_write_checksum: sha1:8ae4ef479ffa71cc5e86b5b1534ae711bdbb292f + pristine_git_object: 8f1ba812df03a21db486f85331b3e7b3c3ec25a1 src/glean/api_client/sdkconfiguration.py: id: f356ce00b5b7 last_write_checksum: sha1:00164d97d233a74b04010ed78ed16a6de6818598 pristine_git_object: eac47f32d35334c71f3bc2fcae834d9835cd5770 src/glean/api_client/search.py: id: a3b404a8b402 - last_write_checksum: sha1:87aa600d7aeb9f1ec375cd06d397c0145edd52be - pristine_git_object: 4a156823134f710cd9f919f90e5b6eccba08fa4d + last_write_checksum: sha1:e3f54afaa3fb79eb447f34a4ce6cf72c36c8ea8d + pristine_git_object: 7d8c07a050180f4b016efce086fc57b2cab93485 src/glean/api_client/skills.py: id: 79f3c37e1b5a - last_write_checksum: sha1:e48a921911ff47209041ccdb2443fdd7cfbad863 - pristine_git_object: e6b272dec940945fa5396d15a382d2d23e9ca5df + last_write_checksum: sha1:4615c05dc1622db95b7d41b401cd0297c9ba7fb8 + pristine_git_object: 444b4c5dd99841f2f599f404576e772daae10f72 src/glean/api_client/tools.py: id: 3ea40147c1cc - last_write_checksum: sha1:ea9f679e0c23e4748474d1be91f511664a133dbb - pristine_git_object: 4d0d7695391c020a19eee63b59daea541903e004 + last_write_checksum: sha1:39255b5e6a2d6ddf0f686c6df75c34c6c6c1bbca + pristine_git_object: b0de42347398017bf1a5af996774a62130f16adb src/glean/api_client/triggers.py: id: 9fac703b5844 - last_write_checksum: sha1:441a856a752b5b1497c54ac0c1055bf1cc4c7d53 - pristine_git_object: a8a4e2853a2faf77a73d7237f455c373be172402 + last_write_checksum: sha1:53ead12d72eb740563a26cace6c98428d4fd68f6 + pristine_git_object: 0528d9158098dbfca7423c6c1e83566b22c258ea src/glean/api_client/types/__init__.py: id: f63c790831ee last_write_checksum: sha1:9494e5d8b00c8a774180cbb2dd90f9568f28954a @@ -8126,8 +8214,8 @@ trackedFiles: pristine_git_object: 795420690ec7f336d8ee2648b6d6c718984a5cc8 src/glean/api_client/users.py: id: f7d2f9613f16 - last_write_checksum: sha1:bca277497e1775ed457f2f8c0cd6ca79faccaafc - pristine_git_object: 8f9e682e572c299b30b66439c0547d9045823827 + last_write_checksum: sha1:62408e6f9a412f0c911d437c3e0e755d0e57ef82 + pristine_git_object: 2e13bdb51e3129ec2f30be8ea99c38697d5d10d3 src/glean/api_client/utils/__init__.py: id: d681dc4f06b3 last_write_checksum: sha1:fe273919f43134738846009bf64f4497dde41416 @@ -8202,8 +8290,8 @@ trackedFiles: pristine_git_object: 2cc0a29b3e5fff2dca76e5d9590baa7dfe598799 src/glean/api_client/visibilityoverrides.py: id: 85e53a1c5de5 - last_write_checksum: sha1:6e764dd49e19403199241bbf6111e0f8614c8d43 - pristine_git_object: 0b84388ed065668abe1b4970b59acdb54252b487 + last_write_checksum: sha1:db41111ba06cde4a638f3730b7028be2ae4783fe + pristine_git_object: b8e63b05e6ba61c1d1ebcabb0c4308142229af3d tests/__init__.py: id: 8e911f6351f3 last_write_checksum: sha1:87e1747e20bb0b7bd1368e799c65f09dfee34e41 @@ -8266,8 +8354,8 @@ trackedFiles: pristine_git_object: 5d86a6fec60596301e276b69a67329becdb53d3b tests/mockserver/internal/handler/generated_handlers.go: id: 61ac4f7cce9e - last_write_checksum: sha1:329bcd6303829a5b0e18ce76ecb4dc9308627206 - pristine_git_object: 4799cec19cc152ab1688cc4be22e2bd52b61c802 + last_write_checksum: sha1:cee5bda2c27c56d9dacc4b1d7936dd048cae2780 + pristine_git_object: 6b63ed70cd8c1749a6eed88658dd168fcb56338f tests/mockserver/internal/handler/pathdeleterestapiindexcustommetadataschemagroupname.go: id: 979e4583765b last_write_checksum: sha1:2615bb2fcb7c82c3967985727a99ccee31262b1f @@ -8324,6 +8412,10 @@ trackedFiles: id: a90fe70217be last_write_checksum: sha1:6ec328dcba1534d2ac43987e1e89a92b33b2021d pristine_git_object: 780e2d1b9d53af57499f60c98ee6f0ab950128de + tests/mockserver/internal/handler/pathgetapimodels.go: + id: d190cd929c5c + last_write_checksum: sha1:e7306d0f9ddd568fa6df872a35e598ae1c362342 + pristine_git_object: c1515da848c7b9a3add819c6be226e4b8b0af143 tests/mockserver/internal/handler/pathgetapisearchfilters.go: id: 2a805587fc23 last_write_checksum: sha1:ea77c5d731145771ac38fa77c94b89c3c81f0bc5 @@ -8420,6 +8512,10 @@ trackedFiles: id: 783f8a29cf35 last_write_checksum: sha1:20fca9199e6775e0d6cf2e5994f7440f3e3ec03e pristine_git_object: a1917c7f555b5dc35c4cc223416991d8da43217d + tests/mockserver/internal/handler/pathgetrestapiv1images.go: + id: c69c4f156542 + last_write_checksum: sha1:18fb3b0732e0adfccdc009ad1c73503ba45f432f + pristine_git_object: 0cd658d3d97e81aa335002387864063ea5858f8e tests/mockserver/internal/handler/pathgetrestapiv1peoplepersonidphoto.go: id: ab4b35f72782 last_write_checksum: sha1:8376abec78f18c64e1aa7cb81591b2121918e551 @@ -8476,6 +8572,10 @@ trackedFiles: id: 7e4a6cf9ab84 last_write_checksum: sha1:15afcaa9f949a428e6be875ba16669bb75b4a782 pristine_git_object: 3414ce407ce9c4630b4a1925f55c1ef8fd81cd8d + tests/mockserver/internal/handler/pathpostapianonymousauthtokens.go: + id: 32a0be7ec363 + last_write_checksum: sha1:97ab2458037ee2bd28a98110756d23cb1fb40f59 + pristine_git_object: a2d64347c4b01fa0b794f5cb5170cd86bec21100 tests/mockserver/internal/handler/pathpostapichat.go: id: 87a434352b0b last_write_checksum: sha1:03ea66433084f5599021e531e1eda1a71839c07a @@ -10386,8 +10486,8 @@ trackedFiles: pristine_git_object: fb039cfa383eea9be45bceb0477950b815a594ec tests/mockserver/internal/sdk/models/components/platformadminagentfilter.go: id: cf37857e4576 - last_write_checksum: sha1:e1299b10f652a39027261c8f06f5d039ae0f0612 - pristine_git_object: ecfc7be4201a79e4139cb5626548539c63ecc5e8 + last_write_checksum: sha1:27a8a5bc8a895b995f64f7839ff8e3b75229ab44 + pristine_git_object: d34c4f86aa5967d3b555518afafefa29c9106db9 tests/mockserver/internal/sdk/models/components/platformagent.go: id: dcdd9a7bc9de last_write_checksum: sha1:d439b050632d6d15459f06e0a8af9b9a14f4a70b @@ -10554,8 +10654,12 @@ trackedFiles: pristine_git_object: 4a53656d4058a702ca6892fdaaf11ecb0ac69d3b tests/mockserver/internal/sdk/models/components/platformagentupdaterequest.go: id: c4201fdb93ac - last_write_checksum: sha1:ddb1875f0e1201e9c483a1b99f5c2857c6c44fd1 - pristine_git_object: 588a5c570798b4241b2fd4f6064a84bdf94db627 + last_write_checksum: sha1:5be1c2bbcb3b088df866dec4c574308b480accd4 + pristine_git_object: 3cf44a122068ee3128a20c062fa0d51cb720a938 + tests/mockserver/internal/sdk/models/components/platformanonymousauthtoken.go: + id: 40614e5e590d + last_write_checksum: sha1:f8a3e8bfd081e3be299ba6aabfe2d7fc14a00232 + pristine_git_object: bb2816c30143aaee4059b9588cefd5d9a1adc970 tests/mockserver/internal/sdk/models/components/platformauthenticationsuggestion.go: id: 48f115d1756f last_write_checksum: sha1:118d46a6e715dc40116a5cd6d9c59968e8889485 @@ -10688,6 +10792,10 @@ trackedFiles: id: d1a02baa3621 last_write_checksum: sha1:63ab6606e7d42113c3805387bc01e5a5cb3ceeca pristine_git_object: 6bf368431303a2a803e28fd448284d0b0889e572 + tests/mockserver/internal/sdk/models/components/platformcreateanonymousauthtokenresponse.go: + id: d52281c486cf + last_write_checksum: sha1:aaca22e87a8738027f15e2ba95da136eed8774a7 + pristine_git_object: 78f039bfe64c3f1d46d53849c1dd9d0a72a6f8d0 tests/mockserver/internal/sdk/models/components/platformdatasourcefilterinfo.go: id: a1eb3b7148bf last_write_checksum: sha1:7985e57ae4d71a87066e162a50393df6b5d88a6f @@ -10828,6 +10936,22 @@ trackedFiles: id: 3a3335fcd639 last_write_checksum: sha1:7837e5bf2c0e88b1a109d841a68619c09ecfb9ba pristine_git_object: 614db417472f910bc4b0d770109f5454000b8017 + tests/mockserver/internal/sdk/models/components/platformmodel.go: + id: eccc3f228e2a + last_write_checksum: sha1:5df0841920d625fd00d168d655b026ee01c5d4e3 + pristine_git_object: 856e4339eeb2c82bdd551b74a2352446fe0dd722 + tests/mockserver/internal/sdk/models/components/platformmodelchatendpoint.go: + id: baf8a9913d78 + last_write_checksum: sha1:bc3f0bdcb7b2103ea0872e1c82abb6819d6279d1 + pristine_git_object: 5ccdfc6a11a25e823312f621a923ca55d3908ae7 + tests/mockserver/internal/sdk/models/components/platformmodelendpoints.go: + id: 3178ef28f7f7 + last_write_checksum: sha1:8a5c5d3b96615ac6a453b6de4c74fce856cab95e + pristine_git_object: d663dd2ea8657bfd592f21f0b5fba34c471cad9e + tests/mockserver/internal/sdk/models/components/platformmodelslistresponse.go: + id: 3c90ab69eeb5 + last_write_checksum: sha1:d01a1395fbea01515e2633a2a1f72ba9b01cb90e + pristine_git_object: 1be3d2ca4d0263952c873d1c30ffc0cbb14a7320 tests/mockserver/internal/sdk/models/components/platformoauthclient.go: id: d90003ce5781 last_write_checksum: sha1:e35ed7b25ae86d70737dbdc2ccd6689279ab1ef6 @@ -10880,6 +11004,10 @@ trackedFiles: id: 045ae4dc7a98 last_write_checksum: sha1:ef1a14a98d32f453603c71bcf9e30ba847c3380b pristine_git_object: 32bd78a192c6e67884b403199ac118aacc024c73 + tests/mockserver/internal/sdk/models/components/platformreasoningeffort.go: + id: b222921acbd1 + last_write_checksum: sha1:eefd3f756b3eb73e7c26d84c5e6190e94f46141e + pristine_git_object: 5da5a028c294768e22783a8e29d350b795321f24 tests/mockserver/internal/sdk/models/components/platformresult.go: id: dd777258615b last_write_checksum: sha1:fcf48e8b65820ebea4732414d18a2daa9a168eb3 @@ -11956,6 +12084,10 @@ trackedFiles: id: b3dedaa9e1b8 last_write_checksum: sha1:857c0568360cbbb00fde9dd0eb9df4eab2ae96b4 pristine_git_object: 78ca3d3a096a01b50a9963e2bc7524b33d3cbfd6 + tests/mockserver/internal/sdk/models/operations/getimage.go: + id: de9a777c8d5b + last_write_checksum: sha1:41f76e06983644be107f2b8bfac86cf2da87937f + pristine_git_object: 3241be108a8a8b4f06c3eaa58a89218785cd440c tests/mockserver/internal/sdk/models/operations/getpersonphoto.go: id: 0a1a1a0fcabc last_write_checksum: sha1:d47084184007fd493d713be6383d6f243bb69848 @@ -12050,8 +12182,8 @@ trackedFiles: pristine_git_object: 938a43a3dd2b0b40beecaabab12070bcde1e43ba tests/mockserver/internal/sdk/models/operations/platformadminagentslist.go: id: 99cbbbd118bb - last_write_checksum: sha1:eb31b2527c912b690f34191ca56f804e4e801192 - pristine_git_object: 6f6761337288595dd4311c9dbc121c01cba1cf7a + last_write_checksum: sha1:56a0d306d7be2e0b5774073d9f24ce6da68b8eb7 + pristine_git_object: d5a9bbf5e12f8ca81767e025d8e1fa109e35e444 tests/mockserver/internal/sdk/models/operations/platformadminidpgroupsget.go: id: 178f8ae5410c last_write_checksum: sha1:6479592fd474877f69b1b005dbf4450a83fe104e @@ -12112,18 +12244,22 @@ trackedFiles: id: 572ae19775e1 last_write_checksum: sha1:847fb5c41e6db32dc3341ea8f4d3f04808d3497f pristine_git_object: ed24f5f0ebbe1f93ba36267696a811e7256fddb1 + tests/mockserver/internal/sdk/models/operations/platformanonymousauthtokenscreate.go: + id: b25fec134c50 + last_write_checksum: sha1:754ddc527ab13e03bb78cfbe76918ed0bf408bd6 + pristine_git_object: 4b4f98bf557a14f66368e8e64c7ead4e8672af6c tests/mockserver/internal/sdk/models/operations/platformchatcancel.go: id: 19d77ce9cdb6 last_write_checksum: sha1:7131dcdf5e99f1d62da5fead8a71fc220dc2df00 pristine_git_object: ce6b5e3f42c7e1868e5e6abf610a593e06c7bc7a tests/mockserver/internal/sdk/models/operations/platformchatcreate.go: id: 38da4ead08a1 - last_write_checksum: sha1:976e7dba15cbabd10bbfb495c02b9d8c2a739e08 - pristine_git_object: 20fbab2c9a7041210c4a01098f317c86551ff6ff + last_write_checksum: sha1:067434cd315e8b795da547acf7d2005e4cda05d8 + pristine_git_object: be2809fcee00c9b549346aa2555edcaf106a7825 tests/mockserver/internal/sdk/models/operations/platformchatcreatestream.go: id: 32e8d932ca7e - last_write_checksum: sha1:1f284c065951c83a3a9c074b613192bfdb43194b - pristine_git_object: 318fba57a9019233ee3abea610627c11038d8bbf + last_write_checksum: sha1:18c83a2f2a3729740ad3d98e54da59ec25f143c1 + pristine_git_object: e37a1afd0c58ca6976c0fce0c8f69aa4e6d665dc tests/mockserver/internal/sdk/models/operations/platformchatresume.go: id: 1b30196a6cf3 last_write_checksum: sha1:3bbaf27bb4dd8d1a84336d97e63dce166efb1c6c @@ -12152,6 +12288,10 @@ trackedFiles: id: fa1fcd334ff6 last_write_checksum: sha1:ee367737b6732cc4a669667062f9bc615a2a565c pristine_git_object: 3914807fc5e6cf178a16019cca1c05c0e4c01283 + tests/mockserver/internal/sdk/models/operations/platformmodelslist.go: + id: 5ef9bdbf5986 + last_write_checksum: sha1:8171e9fae2732512cfa596336ce178bada566ee2 + pristine_git_object: e4e5edab8f8cad211871fe73fd2b05667aaad613 tests/mockserver/internal/sdk/models/operations/platformsearch.go: id: d990791ac101 last_write_checksum: sha1:de817ca219e7d0890d1e278aa151d46b138cbc15 @@ -12628,6 +12768,10 @@ trackedFiles: id: 720cc07fca06 last_write_checksum: sha1:39bc24c23ab0faa485022e86e6ede90b4ef9b7ba pristine_git_object: c85a7fea5f8db7c6c7184f11da53fa8abded4c3f + tests/test_anonymousauthtokens.py: + id: 551c2af8a8bd + last_write_checksum: sha1:b816d847cc26bb4c5abf9f94aaabf7b916291bf3 + pristine_git_object: 6f66c27237609f116351f2b13ef6b8818b4506d5 tests/test_answers.py: id: 2a6f19947b0a last_write_checksum: sha1:fdc292a8d7e47fce67376c3d1bf5cad29eb1514e @@ -12638,8 +12782,8 @@ trackedFiles: pristine_git_object: d1b21e0085f4f5d25ffc31b19be8fb91a84c9a01 tests/test_chat_sdk.py: id: d6e6d5c5a1b2 - last_write_checksum: sha1:196c8950eb9664680a3bd3ebbecbe75407a71cfb - pristine_git_object: c7411a41455f141ae69b593e04592db6185b16dc + last_write_checksum: sha1:3c826a3cd17d936663731fdaa9c29f7d1a3805e9 + pristine_git_object: 3bda236f824e4c5a7f41319468303ceda5f6a414 tests/test_client.py: id: 6b61d4b06ccc last_write_checksum: sha1:ec1e16fd077dad8c45917c7841256afc339144d0 @@ -12658,8 +12802,8 @@ trackedFiles: pristine_git_object: 3babcc4cbb56c15b133ea8dffb23c8392645ca2e tests/test_client_chat.py: id: 6eb71db2a62a - last_write_checksum: sha1:60a8b71f2b41a7dc4435c868a31d04545ade2fd0 - pristine_git_object: f8a55f58830c23bc9fbf102a755ed263fdbc9b30 + last_write_checksum: sha1:06835db4e6b43f12da091cc4ebd4c067e841f23f + pristine_git_object: 2d574e3169cdb48212a649d5e4f99dc5fa9aeda8 tests/test_client_datasources.py: id: 451a8b0f5e13 last_write_checksum: sha1:9db844dcc362b16806b03a154129e965400c5704 @@ -12740,6 +12884,10 @@ trackedFiles: id: be23089b1f8b last_write_checksum: sha1:34f6d993311df6b97fc7d772fc92121adb3cd4cf pristine_git_object: 667b5caa720e1ef399d321ea0df68e54977591c8 + tests/test_models.py: + id: 044905dfea3f + last_write_checksum: sha1:da2e3fda84945955a1876c7f7337b743857859fe + pristine_git_object: 86257478f1713b3984d4c04cdfe9a36659757bec tests/test_people.py: id: 37c243940039 last_write_checksum: sha1:7f79b5392aa4710f9ffe9cb81f1be714f5ca5b30 @@ -12766,8 +12914,8 @@ trackedFiles: pristine_git_object: 526919dd9f43054d8d75711a293a78e098117a59 tests/test_summarize.py: id: a255d8a6f627 - last_write_checksum: sha1:9d33b9bc31f71a49e7c80a92c2e3fa7d1050137f - pristine_git_object: 5e6c5d28fd66d2cc62fd1a87842f29c4c1e45c08 + last_write_checksum: sha1:876530142700cffca9c3f6bf0119cd052b6258ca + pristine_git_object: 59a3def446ee27bfad56068d665960c9b8ff0bb3 tests/test_tools.py: id: 70889bdf7321 last_write_checksum: sha1:474f60fca9f3dbfa783d7f3b822c0f44748ad915 @@ -14495,6 +14643,35 @@ examples: application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} "500": application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + platform-models-list: + speakeasy-default-platform-models-list: + parameters: + query: + page_size: 20 + responses: + "200": + application/json: {"results": [{"id": "GPT5_6_LUNA", "display_name": "Aliyah76", "creator": "", "endpoints": {}}], "has_more": false, "next_cursor": "", "request_id": ""} + "400": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + "500": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + platform-anonymous-auth-tokens-create: + speakeasy-default-platform-anonymous-auth-tokens-create: + responses: + "201": + application/json: {"anonymous_auth_token": {"token": "", "expires_at": "2026-08-31T08:43:32.756Z"}, "request_id": ""} + "400": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + "500": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + getImage: + speakeasy-default-get-image: + parameters: + query: + key: "" + responses: + "200": + image/*: "x-file: example.file" examplesVersion: 1.0.2 generatedTests: activity: "2025-04-28T22:05:12+01:00" @@ -14717,6 +14894,16 @@ generatedTests: platform-agents-create: "2026-11-25T16:57:49Z" platform-agents-update: "2026-11-25T16:57:49Z" platform-chat-cancel: "2026-11-25T16:57:49Z" + 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** generatedFiles: - .devcontainer/README.md - .devcontainer/devcontainer.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index ba8331491..ec308872c 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -36,7 +36,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: true python: - version: 0.18.1 + version: 0.18.2 additionalDependencies: dev: {} main: diff --git a/.speakeasy/glean-merged-spec.yaml b/.speakeasy/glean-merged-spec.yaml index 8c916944e..122563994 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: 5ea171465dea96f4a6b95ddbd29ac49e79c4cbc2 - x-open-api-commit-sha: be97c2f0596a40665168049f3113a150494c1ff0 + x-source-commit-sha: 31ad03140234f66424854f64d0106442914e8fae + x-open-api-commit-sha: f55eff25e144e29e05f049264bcf2db6777b91d3 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. @@ -877,6 +877,68 @@ paths: x-speakeasy-name-override: cancel security: - APIToken: [] + /api/models: + get: + tags: + - Models + summary: List models + description: | + Lists the models that the deployment configures for the caller. `endpoints` reports which Platform endpoints accept each model. For a caller that passes the access check, a model without `endpoints.chat` is rejected at `/model`. Other request checks still apply. + operationId: platform-models-list + x-visibility: Public + x-glean-release: + stage: beta + introduced: "2026-10-07" + x-glean-scopes: + legacy: + - MODELS + platform: + - models:read + parameters: + - in: query + name: page_size + description: Maximum number of models to return. Defaults to 20. Maximum is 100. + required: false + schema: + type: integer + minimum: 1 + maximum: 100 + default: 20 + - in: query + name: cursor + description: | + Opaque pagination cursor from a previous response. Cursors do not expire. + required: false + schema: + type: string + minLength: 1 + responses: + "200": + description: Models configured for the caller. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformModelsListResponse" + "400": + $ref: "#/components/responses/PlatformBadRequest" + "401": + $ref: "#/components/responses/PlatformUnauthorized" + "403": + $ref: "#/components/responses/PlatformForbidden" + "404": + $ref: "#/components/responses/PlatformNotFound" + "408": + $ref: "#/components/responses/PlatformRequestTimeout" + "429": + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: models + x-speakeasy-name-override: list + security: + - APIToken: [] /api/skills: post: tags: @@ -3309,6 +3371,50 @@ paths: x-speakeasy-name-override: get security: - APIToken: [] + /api/anonymous-auth-tokens: + post: + tags: + - Auth tokens + summary: Create an anonymous auth token + description: | + Creates a short-lived auth token for anonymous external search, for example with the [Web SDK](https://developers.glean.com/web). Call this from your backend with an API token that has anonymous permissions and the anonymous_auth_tokens:write scope, then pass the returned token to the browser. The returned token acts as no user and expires at expires_at. Any other caller gets 403, and so does a deployment where anonymous external search is off. + operationId: platform-anonymous-auth-tokens-create + x-glean-scopes: + legacy: + - ANONYMOUS_AUTH_TOKEN_CREATOR + platform: + - anonymous_auth_tokens:write + x-visibility: Public + x-glean-release: + stage: beta + introduced: "2026-11-18" + responses: + "201": + description: The anonymous auth token was created. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformCreateAnonymousAuthTokenResponse" + "400": + $ref: "#/components/responses/PlatformBadRequest" + "401": + $ref: "#/components/responses/PlatformUnauthorized" + "403": + $ref: "#/components/responses/PlatformForbidden" + "404": + $ref: "#/components/responses/PlatformNotFound" + "408": + $ref: "#/components/responses/PlatformRequestTimeout" + "429": + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: anonymousauthtokens + x-speakeasy-name-override: create + security: + - APIToken: [] /api/users: get: tags: @@ -3525,7 +3631,7 @@ paths: - in: query name: filters description: | - JSON-encoded filters that choose which agents are returned. The supported fields are name and description, with the operator EQUALS. Multiple values OR within a filter. Multiple filters AND together, and each field can appear in only one filter. For example, to return agents whose name contains "HR", send [{"field":"name","values":["HR"]}]. + JSON-encoded filters that choose which agents are returned. The supported fields are name, description, and is_orphaned, with the operator EQUALS. Multiple values OR within a filter. Multiple filters AND together, and each field can appear in only one filter. For example, to return agents whose name contains "HR", send [{"field":"name","values":["HR"]}]. To return orphaned agents, send [{"field":"is_orphaned","values":["true"]}]. required: false content: application/json: @@ -5482,6 +5588,46 @@ paths: stage: ga x-speakeasy-name-override: retrieveFile x-speakeasy-group: client.chat + /rest/api/v1/images: + get: + operationId: getImage + summary: Download a document image + description: | + Download an image from an indexed document, such as an image linked in a chat response. Chat responses link these images as `/api/v1/images?key=`; pass the same key here. Returns the image bytes with a Content-Type header matching the image format. Only document images are supported, and the caller must have access to the source document. + tags: + - Chat + security: + - APIToken: [] + parameters: + - name: key + in: query + description: Image key from the image URL in a chat response. + required: true + schema: + type: string + responses: + "200": + description: Image content. + content: + image/*: + schema: + type: string + format: binary + "400": + description: Key missing or invalid, or not a document image. + "401": + description: Missing or invalid API token. + "403": + description: Caller does not have access to the source document. + "404": + description: Image not found. + "500": + description: Internal server error. + x-visibility: Public + x-glean-release: + stage: ga + x-speakeasy-name-override: retrieveImage + x-speakeasy-group: client.chat /rest/api/v1/agents: post: operationId: createAgent @@ -10583,43 +10729,53 @@ components: description: System prompt the agent follows. skills: type: array - description: Skills defined inline. + description: | + Skills defined inline. The supplied list replaces the entire saved list. items: $ref: "#/components/schemas/PlatformAgentSkill" dependencies: type: array description: | - Published artifacts referenced by platform ID. Their content is not inlined in `skills` or `subagents`. + Published artifacts referenced by platform ID. Their content is not inlined in `skills` or `subagents`. The supplied list replaces the entire saved list. items: $ref: "#/components/schemas/PlatformAgentDependency" tools: type: array - description: Tool providers and the subset of their tools available to the agent. + description: | + Tool providers and the subset of their tools available to the agent. The supplied list replaces the entire saved list. items: $ref: "#/components/schemas/PlatformAgentToolset" glean_search_config: - description: Glean Search configuration. Send `null` to turn off Glean Search. + description: | + Glean Search configuration. The supplied object replaces the entire saved configuration, including `datasource_instances` and `urls`, so omitted fields are not kept. Send `null` to turn off Glean Search. x-go-type: AgentGleanSearchConfig anyOf: - $ref: "#/components/schemas/PlatformAgentGleanSearchConfig" - type: "null" model: $ref: "#/components/schemas/PlatformAgentLlmModel" + description: | + Agentic model the agent runs on and its reasoning effort. The supplied object replaces the entire saved model configuration, so omitted fields fall back to defaults. Send `{}` to reset the model to defaults. service_credentials: type: array - description: Service credentials the agent uses to call tools. + description: | + Service credentials the agent uses to call tools. The supplied list replaces the entire saved list. items: $ref: "#/components/schemas/PlatformAgentServiceCredential" channels: $ref: "#/components/schemas/PlatformAgentChannels" + description: | + Messaging channels the agent is deployed to. Requires `use_agent_identity`. The supplied object replaces all saved channel settings, including Slack channel mappings, so omitted channels and fields are removed. Send `{}` to clear all channels. subagents: type: array description: | - Subagents the agent dispatches work to. Subagents cannot contain subagents. Keep a saved subagent's `subagent_id` to preserve it, and omit `subagent_id` to add a subagent. + 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. items: $ref: "#/components/schemas/PlatformSubagent" trigger: $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. PlatformActionSummary: type: object required: @@ -11278,6 +11434,24 @@ components: content: type: string minLength: 1 + PlatformModelId: + type: string + description: | + Opaque model identifier: the internal model enum name (for example `GPT5_6_LUNA`). Case-sensitive; never parse it. + pattern: ^[A-Z0-9_]+$ + example: GPT5_6_LUNA + PlatformReasoningEffort: + type: string + description: | + How much reasoning a model applies to a turn, from least effort to most. + enum: + - NONE + - MINIMAL + - LOW + - MEDIUM + - HIGH + - XHIGH + - MAX PlatformChatCreateRequest: type: object additionalProperties: false @@ -11311,6 +11485,22 @@ components: minLength: 1 description: | Continue an existing stored conversation. Incompatible with message-array `input` and with `store: false`. + model: + description: | + Model for this turn, matched exactly to an id from GET /api/models. When GET /api/models reports `endpoints.chat` for the model, `POST /api/chat` does not reject this value at `/model`, except across a deployment change. Other request checks still apply. The model is requested, not guaranteed: deployment configuration can still run the turn on a different model. + x-glean-release: + stage: beta + introduced: "2026-10-07" + allOf: + - $ref: "#/components/schemas/PlatformModelId" + reasoning_effort: + description: | + Reasoning effort for this turn. Requires `model`. When omitted, the model's default effort applies. When GET /api/models lists this value in `endpoints.chat.reasoning_efforts` for the model, `POST /api/chat` does not reject it at `/reasoning_effort`, except across a deployment change. Other request checks still apply. + x-glean-release: + stage: beta + introduced: "2026-10-07" + allOf: + - $ref: "#/components/schemas/PlatformReasoningEffort" PlatformChatStreamResponseId: type: string minLength: 1 @@ -11654,6 +11844,77 @@ components: type: string minLength: 1 description: An identifier for this request. + PlatformModelChatEndpoint: + type: object + additionalProperties: false + description: | + The model is usable with Platform chat, and `POST /api/chat` accepts it as `model`. When `chat` is present, `POST /api/chat` does not reject the model at `/model`, except across a deployment change. Other request checks still apply, and the access check runs before the model check. Acceptance does not guarantee which model runs: deployment configuration can still run the turn on a different model, and agent routing and expert handoffs can delegate parts of a turn. + required: + - reasoning_efforts + properties: + reasoning_efforts: + type: array + description: | + Reasoning efforts that `POST /api/chat` accepts for this model as `reasoning_effort`, ordered from least to most. The list comes from the chat decision for the caller. `POST /api/chat` does not reject a listed effort at `/reasoning_effort`, except across a deployment change. Other request checks still apply. An empty array means that the model accepts no `reasoning_effort`. Clients must tolerate unknown values. + items: + $ref: "#/components/schemas/PlatformReasoningEffort" + PlatformModelEndpoints: + type: object + additionalProperties: false + description: | + The Platform endpoints that accept this model, one property per endpoint. A property is absent when that endpoint does not accept the model. For a caller that passes the access check, a model without `chat` is rejected at `/model` by `POST /api/chat`. Other request checks still apply. Clients must tolerate unknown properties. + properties: + chat: + $ref: "#/components/schemas/PlatformModelChatEndpoint" + PlatformModel: + type: object + description: A model configured for the caller. + additionalProperties: false + required: + - id + - display_name + - creator + - endpoints + properties: + id: + $ref: "#/components/schemas/PlatformModelId" + display_name: + type: string + description: Human-readable name for the model. + creator: + type: string + description: Organization that created the model. + description: + type: string + description: Description of the model. Omitted when the deployment has none. + endpoints: + $ref: "#/components/schemas/PlatformModelEndpoints" + PlatformModelsListResponse: + type: object + description: A paginated list of models configured for the caller. + additionalProperties: false + required: + - results + - has_more + - next_cursor + - request_id + properties: + results: + type: array + description: Models configured for the caller, ordered by `id`. + items: + $ref: "#/components/schemas/PlatformModel" + has_more: + type: boolean + description: Whether additional results are available. + next_cursor: + type: + - string + - "null" + description: Cursor for the next page, or null when no more results are available. + request_id: + type: string + description: Platform-generated request ID for support correlation. PlatformSkillStatus: type: string enum: @@ -13435,7 +13696,7 @@ components: - string - "null" description: | - Server-owned feature taxonomy: ARTIFACT_AUDIO, ASSISTANT, DEEP_RESEARCH, DICTATION, ENGRAM_MEMORY, GLEAN_CODE, GLEAN_IN_SLACK, GLEAN_IN_TEAMS, IMAGE_GENERATION, INDEPENDENT_AGENT_MEMORY, MEETING_NOTES (from AUDIO_TRANSCRIPTION), PRESENTATION_GENERATION, PRISM_PAID, REALTIME_VOICE (from VOICE_TRANSCRIPTION), SKILL_SCAN, API, SEARCH, or OTHER for unknown nonempty subtypes. API uses the recorded entity when subtype is absent. Values can be added. + Server-owned feature taxonomy: ARTIFACT_AUDIO, ARTIFACT_VIDEO, ASSISTANT, DEEP_RESEARCH, DICTATION, ENGRAM_MEMORY, GLEAN_CODE, GLEAN_IN_SLACK, GLEAN_IN_TEAMS, IMAGE_GENERATION, INDEPENDENT_AGENT_MEMORY, MEETING_NOTES (from AUDIO_TRANSCRIPTION), PRESENTATION_GENERATION, PRISM_PAID, REALTIME_VOICE (from VOICE_TRANSCRIPTION), SKILL_SCAN, API, SEARCH, or OTHER for unknown nonempty subtypes. API uses the recorded entity when subtype is absent. Values can be added. model_id: type: - string @@ -15399,6 +15660,36 @@ components: request_id: type: string description: Request identifier for correlating this response. + PlatformAnonymousAuthToken: + type: object + description: A short-lived auth token for anonymous external search. + additionalProperties: false + required: + - token + - expires_at + properties: + token: + type: string + description: | + The auth token. Treat it as a secret until it expires, and do not log it. + expires_at: + type: string + format: date-time + description: When the auth token expires. + PlatformCreateAnonymousAuthTokenResponse: + type: object + description: The anonymous auth token that was created. + additionalProperties: false + required: + - anonymous_auth_token + - request_id + properties: + anonymous_auth_token: + $ref: "#/components/schemas/PlatformAnonymousAuthToken" + description: The anonymous auth token. + request_id: + type: string + description: Platform-generated request ID for support correlation. PlatformUserFilter: type: object additionalProperties: false @@ -15589,9 +15880,22 @@ components: properties: field: type: string - pattern: ^(name|description)$ + pattern: ^(name|description|is_orphaned)$ description: | - The agent field to filter on. name matches agents whose name contains the value. description matches agents whose description contains the value. Matching ignores case and surrounding whitespace. Each value is at most 256 characters. + What to filter on. + - name: matches agents whose name contains the value, ignoring case and + surrounding whitespace. Each value is at most 256 characters. + + - description: matches agents whose description contains the value, + ignoring case and surrounding whitespace. Each value is at most 256 + characters. + + - is_orphaned: "true" matches agents with no owner who is an active user, + meaning a user who is still in the workspace's people directory. This + includes agents owned only by identity-provider groups or departments and + agents with no owner. "false" matches the other agents. Agents built by + Glean, including Turnkey agents, are never orphaned. Any other value + returns 400. values: type: array minItems: 1 @@ -28015,6 +28319,7 @@ x-glean-platform-tag-groups: tags: - Agents - Chat + - Models - Skills - name: Search & Data tags: @@ -28030,6 +28335,7 @@ x-glean-platform-tag-groups: - name: Account tags: - Usage + - Auth tokens - name: Administration tags: - Admin Agents diff --git a/.speakeasy/tests.arazzo.yaml b/.speakeasy/tests.arazzo.yaml index 1e5d56b88..3f1c25686 100644 --- a/.speakeasy/tests.arazzo.yaml +++ b/.speakeasy/tests.arazzo.yaml @@ -159865,3 +159865,50 @@ workflows: type: simple x-speakeasy-test-group: chat_SDK x-speakeasy-test-rebuild: true + - workflowId: platform-models-list + steps: + - stepId: test + operationId: platform-models-list + parameters: + - name: page_size + in: query + value: 20 + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"results":[{"id":"GPT5_6_LUNA","display_name":"Aliyah76","creator":"","endpoints":{}}],"has_more":false,"next_cursor":"","request_id":""} + type: simple + x-speakeasy-test-group: models + x-speakeasy-test-rebuild: true + - workflowId: platform-anonymous-auth-tokens-create + steps: + - stepId: test + operationId: platform-anonymous-auth-tokens-create + successCriteria: + - condition: $statusCode == 201 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"anonymous_auth_token":{"token":"","expires_at":"2026-08-31T08:43:32.756Z"},"request_id":""} + type: simple + x-speakeasy-test-group: anonymousauthtokens + x-speakeasy-test-rebuild: true + - workflowId: getImage + steps: + - stepId: test + operationId: getImage + parameters: + - name: key + in: query + value: + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == image/* + - context: $response.body + condition: | + "x-file: example.file" + type: simple + x-speakeasy-test-group: client_chat + x-speakeasy-test-rebuild: true diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 75e8bf2e3..223588510 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:3fef073b2ecf5ab43f41e5cd24636c3897f74b85874cc52aea09f43ef7d9730a - sourceBlobDigest: sha256:af37ad29e1a34243e860caad666a135e7d4c854dffb92634252b2a9bbab24f10 + sourceRevisionDigest: sha256:9131f5e7e4df026356a1ea4c21ff018af9de5f7262878da2eeef4ed9b7cab02a + sourceBlobDigest: sha256:a2cbc5f3b13973c3bf3f9c191c68e5a66507d417b6f3a9f7b910e8d6e5dd463e tags: - latest Glean Client API: @@ -16,10 +16,10 @@ targets: glean: source: Glean API sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:3fef073b2ecf5ab43f41e5cd24636c3897f74b85874cc52aea09f43ef7d9730a - sourceBlobDigest: sha256:af37ad29e1a34243e860caad666a135e7d4c854dffb92634252b2a9bbab24f10 + sourceRevisionDigest: sha256:9131f5e7e4df026356a1ea4c21ff018af9de5f7262878da2eeef4ed9b7cab02a + sourceBlobDigest: sha256:a2cbc5f3b13973c3bf3f9c191c68e5a66507d417b6f3a9f7b910e8d6e5dd463e codeSamplesNamespace: glean-api-specs-python-code-samples - codeSamplesRevisionDigest: sha256:091645128eadd7b238724e0e8a194aa37c181259fca23fabd18b85be875e664a + codeSamplesRevisionDigest: sha256:c27b9ec36a1513cc5259f05b576572f3ef648e31a6aa464948ec088be72ad3e3 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index c56fd4143..c29018cf0 100644 --- a/README.md +++ b/README.md @@ -347,6 +347,10 @@ For more information on obtaining the appropriate token type, please contact you * [respond_to_run](docs/sdks/agents/README.md#respond_to_run) - Respond to agent run approvals * [create_run_stream](docs/sdks/agents/README.md#create_run_stream) - Create a streaming agent run +### [Anonymousauthtokens](docs/sdks/anonymousauthtokens/README.md) + +* [create](docs/sdks/anonymousauthtokens/README.md#create) - Create an anonymous auth token + ### [Chat](docs/sdks/chatsdk/README.md) * [create](docs/sdks/chatsdk/README.md#create) - Create a chat response @@ -402,6 +406,7 @@ For more information on obtaining the appropriate token type, please contact you * [retrieve_files](docs/sdks/clientchat/README.md#retrieve_files) - Get files uploaded by a user for Chat * [delete_files](docs/sdks/clientchat/README.md#delete_files) - Delete files uploaded by a user for chat * [retrieve_file](docs/sdks/clientchat/README.md#retrieve_file) - Download a chat file +* [retrieve_image](docs/sdks/clientchat/README.md#retrieve_image) - Download a document image * [create_stream](docs/sdks/clientchat/README.md#create_stream) - Chat ### [Client.Collections](docs/sdks/collections/README.md) @@ -593,6 +598,10 @@ For more information on obtaining the appropriate token type, please contact you * [bulk_index](docs/sdks/indexingshortcuts/README.md#bulk_index) - Bulk index external shortcuts * [upload](docs/sdks/indexingshortcuts/README.md#upload) - Upload shortcuts +### [Models](docs/sdks/models/README.md) + +* [list](docs/sdks/models/README.md#list) - List models + ### [Search](docs/sdks/search/README.md) * [query](docs/sdks/search/README.md#query) - Search diff --git a/RELEASES.md b/RELEASES.md index a1ab69e0f..8fec7c98d 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1118,4 +1118,14 @@ Based on: ### Generated - [python v0.18.1] . ### Releases -- [PyPI v0.18.1] https://pypi.org/project/glean-api-client/0.18.1 - . \ No newline at end of file +- [PyPI v0.18.1] https://pypi.org/project/glean-api-client/0.18.1 - . + +## 2026-12-01 00:44:55 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.813.1 (2.969.4) https://github.com/speakeasy-api/speakeasy +### 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 diff --git a/docs/models/getimagerequest.md b/docs/models/getimagerequest.md new file mode 100644 index 000000000..24724b737 --- /dev/null +++ b/docs/models/getimagerequest.md @@ -0,0 +1,8 @@ +# GetImageRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `key` | *str* | :heavy_check_mark: | Image key from the image URL in a chat response. | \ No newline at end of file diff --git a/docs/models/platformadminagentfilter.md b/docs/models/platformadminagentfilter.md index 9190b3227..463713f6d 100644 --- a/docs/models/platformadminagentfilter.md +++ b/docs/models/platformadminagentfilter.md @@ -5,8 +5,8 @@ A filter on one agent field. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `field` | *str* | :heavy_check_mark: | The agent field to filter on. name matches agents whose name contains the value. description matches agents whose description contains the value. Matching ignores case and surrounding whitespace. Each value is at most 256 characters.
| -| `values` | List[*str*] | :heavy_check_mark: | The values to match. An agent matches when any value matches. | -| `operator` | [Optional[models.PlatformAdminAgentFilterOperator]](../models/platformadminagentfilteroperator.md) | :heavy_minus_sign: | The only supported operator is EQUALS. Defaults to EQUALS. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `field` | *str* | :heavy_check_mark: | What to filter on.
- name: matches agents whose name contains the value, ignoring case and
surrounding whitespace. Each value is at most 256 characters.

- description: matches agents whose description contains the value,
ignoring case and surrounding whitespace. Each value is at most 256
characters.

- is_orphaned: "true" matches agents with no owner who is an active user,
meaning a user who is still in the workspace's people directory. This
includes agents owned only by identity-provider groups or departments and
agents with no owner. "false" matches the other agents. Agents built by
Glean, including Turnkey agents, are never orphaned. Any other value
returns 400.
| +| `values` | List[*str*] | :heavy_check_mark: | The values to match. An agent matches when any value matches. | +| `operator` | [Optional[models.PlatformAdminAgentFilterOperator]](../models/platformadminagentfilteroperator.md) | :heavy_minus_sign: | The only supported operator is EQUALS. Defaults to EQUALS. | \ No newline at end of file diff --git a/docs/models/platformadminagentslistrequest.md b/docs/models/platformadminagentslistrequest.md index 53c5c53bb..a613069a9 100644 --- a/docs/models/platformadminagentslistrequest.md +++ b/docs/models/platformadminagentslistrequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `page_size` | *Optional[int]* | :heavy_minus_sign: | Maximum number of agents to return. Defaults to 50. Maximum is 100. | -| `cursor` | *Optional[str]* | :heavy_minus_sign: | Opaque pagination cursor from a previous response. Send the same filters that the previous request used.
| -| `filters` | List[[models.PlatformAdminAgentFilter](../models/platformadminagentfilter.md)] | :heavy_minus_sign: | JSON-encoded filters that choose which agents are returned. The supported fields are name and description, with the operator EQUALS. Multiple values OR within a filter. Multiple filters AND together, and each field can appear in only one filter. For example, to return agents whose name contains "HR", send [{"field":"name","values":["HR"]}].
| \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | Maximum number of agents to return. Defaults to 50. Maximum is 100. | +| `cursor` | *Optional[str]* | :heavy_minus_sign: | Opaque pagination cursor from a previous response. Send the same filters that the previous request used.
| +| `filters` | List[[models.PlatformAdminAgentFilter](../models/platformadminagentfilter.md)] | :heavy_minus_sign: | JSON-encoded filters that choose which agents are returned. The supported fields are name, description, and is_orphaned, with the operator EQUALS. Multiple values OR within a filter. Multiple filters AND together, and each field can appear in only one filter. For example, to return agents whose name contains "HR", send [{"field":"name","values":["HR"]}]. To return orphaned agents, send [{"field":"is_orphaned","values":["true"]}].
| \ No newline at end of file diff --git a/docs/models/platformagentupdaterequest.md b/docs/models/platformagentupdaterequest.md index 711eb1fcf..35f1f089a 100644 --- a/docs/models/platformagentupdaterequest.md +++ b/docs/models/platformagentupdaterequest.md @@ -6,17 +6,17 @@ Agent fields to change. At least one field is required. Each supplied field repl ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *Optional[str]* | :heavy_minus_sign: | Human-readable name. | -| `description` | *Optional[str]* | :heavy_minus_sign: | Description of the agent's purpose and behavior. | -| `instructions` | *Optional[str]* | :heavy_minus_sign: | System prompt the agent follows. | -| `skills` | List[[models.PlatformAgentSkill](../models/platformagentskill.md)] | :heavy_minus_sign: | Skills defined inline. | -| `dependencies` | List[[models.PlatformAgentDependency](../models/platformagentdependency.md)] | :heavy_minus_sign: | Published artifacts referenced by platform ID. Their content is not inlined in `skills` or `subagents`.
| -| `tools` | List[[models.PlatformAgentToolset](../models/platformagenttoolset.md)] | :heavy_minus_sign: | Tool providers and the subset of their tools available to the agent. | -| `glean_search_config` | [OptionalNullable[models.PlatformAgentGleanSearchConfig]](../models/platformagentgleansearchconfig.md) | :heavy_minus_sign: | Glean Search configuration. Send `null` to turn off Glean Search. | -| `model` | [Optional[models.PlatformAgentLlmModel]](../models/platformagentllmmodel.md) | :heavy_minus_sign: | Agentic model the agent runs on and its reasoning effort. | -| `service_credentials` | List[[models.PlatformAgentServiceCredential](../models/platformagentservicecredential.md)] | :heavy_minus_sign: | Service credentials the agent uses to call tools. | -| `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. 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 +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *Optional[str]* | :heavy_minus_sign: | Human-readable name. | +| `description` | *Optional[str]* | :heavy_minus_sign: | Description of the agent's purpose and behavior. | +| `instructions` | *Optional[str]* | :heavy_minus_sign: | System prompt the agent follows. | +| `skills` | List[[models.PlatformAgentSkill](../models/platformagentskill.md)] | :heavy_minus_sign: | Skills defined inline. The supplied list replaces the entire saved list.
| +| `dependencies` | List[[models.PlatformAgentDependency](../models/platformagentdependency.md)] | :heavy_minus_sign: | Published artifacts referenced by platform ID. Their content is not inlined in `skills` or `subagents`. The supplied list replaces the entire saved list.
| +| `tools` | List[[models.PlatformAgentToolset](../models/platformagenttoolset.md)] | :heavy_minus_sign: | Tool providers and the subset of their tools available to the agent. The supplied list replaces the entire saved list.
| +| `glean_search_config` | [OptionalNullable[models.PlatformAgentGleanSearchConfig]](../models/platformagentgleansearchconfig.md) | :heavy_minus_sign: | Glean Search configuration. The supplied object replaces the entire saved configuration, including `datasource_instances` and `urls`, so omitted fields are not kept. Send `null` to turn off Glean Search.
| +| `model` | [Optional[models.PlatformAgentLlmModel]](../models/platformagentllmmodel.md) | :heavy_minus_sign: | Agentic model the agent runs on and its reasoning effort. | +| `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 diff --git a/docs/models/platformanonymousauthtoken.md b/docs/models/platformanonymousauthtoken.md new file mode 100644 index 000000000..4417dfd4b --- /dev/null +++ b/docs/models/platformanonymousauthtoken.md @@ -0,0 +1,11 @@ +# PlatformAnonymousAuthToken + +A short-lived auth token for anonymous external search. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `token` | *str* | :heavy_check_mark: | The auth token. Treat it as a secret until it expires, and do not log it.
| +| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | When the auth token expires. | \ No newline at end of file diff --git a/docs/models/platformchatcreaterequest.md b/docs/models/platformchatcreaterequest.md index 82808d05f..23fbb6f3e 100644 --- a/docs/models/platformchatcreaterequest.md +++ b/docs/models/platformchatcreaterequest.md @@ -3,9 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | -| `input` | [models.PlatformChatCreateInput](../models/platformchatcreateinput.md) | :heavy_check_mark: | Either a plain string (single user turn) or a chronological array of `USER`/`ASSISTANT` messages. The final array message must be `USER`.
| -| `stream` | *Optional[Literal[False]]* | :heavy_minus_sign: | N/A | -| `store` | *Optional[bool]* | :heavy_minus_sign: | When true (default), persist the interaction and return a `conversation_id`. When false, run ephemerally with no persistence.
| -| `conversation_id` | *Optional[str]* | :heavy_minus_sign: | Continue an existing stored conversation. Incompatible with message-array `input` and with `store: false`.
| \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `input` | [models.PlatformChatCreateInput](../models/platformchatcreateinput.md) | :heavy_check_mark: | Either a plain string (single user turn) or a chronological array of `USER`/`ASSISTANT` messages. The final array message must be `USER`.
| | +| `stream` | *Optional[Literal[False]]* | :heavy_minus_sign: | N/A | | +| `store` | *Optional[bool]* | :heavy_minus_sign: | When true (default), persist the interaction and return a `conversation_id`. When false, run ephemerally with no persistence.
| | +| `conversation_id` | *Optional[str]* | :heavy_minus_sign: | Continue an existing stored conversation. Incompatible with message-array `input` and with `store: false`.
| | +| `model` | *Optional[str]* | :heavy_minus_sign: | Model for this turn, matched exactly to an id from GET /api/models. When GET /api/models reports `endpoints.chat` for the model, `POST /api/chat` does not reject this value at `/model`, except across a deployment change. Other request checks still apply. The model is requested, not guaranteed: deployment configuration can still run the turn on a different model.
| GPT5_6_LUNA | +| `reasoning_effort` | [Optional[models.PlatformReasoningEffort]](../models/platformreasoningeffort.md) | :heavy_minus_sign: | Reasoning effort for this turn. Requires `model`. When omitted, the model's default effort applies. When GET /api/models lists this value in `endpoints.chat.reasoning_efforts` for the model, `POST /api/chat` does not reject it at `/reasoning_effort`, except across a deployment change. Other request checks still apply.
| | \ No newline at end of file diff --git a/docs/models/platformchatcreatestreamrequest.md b/docs/models/platformchatcreatestreamrequest.md index 484d017f9..b148cc72a 100644 --- a/docs/models/platformchatcreatestreamrequest.md +++ b/docs/models/platformchatcreatestreamrequest.md @@ -3,9 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | -| `input` | [models.PlatformChatCreateStreamInput](../models/platformchatcreatestreaminput.md) | :heavy_check_mark: | Either a plain string (single user turn) or a chronological array of `USER`/`ASSISTANT` messages. The final array message must be `USER`.
| -| `stream` | *Optional[Literal[True]]* | :heavy_minus_sign: | N/A | -| `store` | *Optional[bool]* | :heavy_minus_sign: | When true (default), persist the interaction and return a `conversation_id`. When false, run ephemerally with no persistence.
| -| `conversation_id` | *Optional[str]* | :heavy_minus_sign: | Continue an existing stored conversation. Incompatible with message-array `input` and with `store: false`.
| \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `input` | [models.PlatformChatCreateStreamInput](../models/platformchatcreatestreaminput.md) | :heavy_check_mark: | Either a plain string (single user turn) or a chronological array of `USER`/`ASSISTANT` messages. The final array message must be `USER`.
| | +| `stream` | *Optional[Literal[True]]* | :heavy_minus_sign: | N/A | | +| `store` | *Optional[bool]* | :heavy_minus_sign: | When true (default), persist the interaction and return a `conversation_id`. When false, run ephemerally with no persistence.
| | +| `conversation_id` | *Optional[str]* | :heavy_minus_sign: | Continue an existing stored conversation. Incompatible with message-array `input` and with `store: false`.
| | +| `model` | *Optional[str]* | :heavy_minus_sign: | Model for this turn, matched exactly to an id from GET /api/models. When GET /api/models reports `endpoints.chat` for the model, `POST /api/chat` does not reject this value at `/model`, except across a deployment change. Other request checks still apply. The model is requested, not guaranteed: deployment configuration can still run the turn on a different model.
| GPT5_6_LUNA | +| `reasoning_effort` | [Optional[models.PlatformReasoningEffort]](../models/platformreasoningeffort.md) | :heavy_minus_sign: | Reasoning effort for this turn. Requires `model`. When omitted, the model's default effort applies. When GET /api/models lists this value in `endpoints.chat.reasoning_efforts` for the model, `POST /api/chat` does not reject it at `/reasoning_effort`, except across a deployment change. Other request checks still apply.
| | \ No newline at end of file diff --git a/docs/models/platformcreateanonymousauthtokenresponse.md b/docs/models/platformcreateanonymousauthtokenresponse.md new file mode 100644 index 000000000..033b6fcd2 --- /dev/null +++ b/docs/models/platformcreateanonymousauthtokenresponse.md @@ -0,0 +1,11 @@ +# PlatformCreateAnonymousAuthTokenResponse + +The anonymous auth token that was created. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `anonymous_auth_token` | [models.PlatformAnonymousAuthToken](../models/platformanonymousauthtoken.md) | :heavy_check_mark: | A short-lived auth token for anonymous external search. | +| `request_id` | *str* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/models/platformmodel.md b/docs/models/platformmodel.md new file mode 100644 index 000000000..4b01381d9 --- /dev/null +++ b/docs/models/platformmodel.md @@ -0,0 +1,14 @@ +# PlatformModel + +A model configured for the caller. + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | Opaque model identifier: the internal model enum name (for example `GPT5_6_LUNA`). Case-sensitive; never parse it.
| GPT5_6_LUNA | +| `display_name` | *str* | :heavy_check_mark: | Human-readable name for the model. | | +| `creator` | *str* | :heavy_check_mark: | Organization that created the model. | | +| `description` | *Optional[str]* | :heavy_minus_sign: | Description of the model. Omitted when the deployment has none. | | +| `endpoints` | [models.PlatformModelEndpoints](../models/platformmodelendpoints.md) | :heavy_check_mark: | The Platform endpoints that accept this model, one property per endpoint. A property is absent when that endpoint does not accept the model. For a caller that passes the access check, a model without `chat` is rejected at `/model` by `POST /api/chat`. Other request checks still apply. Clients must tolerate unknown properties.
| | \ No newline at end of file diff --git a/docs/models/platformmodelchatendpoint.md b/docs/models/platformmodelchatendpoint.md new file mode 100644 index 000000000..f177f4883 --- /dev/null +++ b/docs/models/platformmodelchatendpoint.md @@ -0,0 +1,11 @@ +# PlatformModelChatEndpoint + +The model is usable with Platform chat, and `POST /api/chat` accepts it as `model`. When `chat` is present, `POST /api/chat` does not reject the model at `/model`, except across a deployment change. Other request checks still apply, and the access check runs before the model check. Acceptance does not guarantee which model runs: deployment configuration can still run the turn on a different model, and agent routing and expert handoffs can delegate parts of a turn. + + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `reasoning_efforts` | List[[models.PlatformReasoningEffort](../models/platformreasoningeffort.md)] | :heavy_check_mark: | Reasoning efforts that `POST /api/chat` accepts for this model as `reasoning_effort`, ordered from least to most. The list comes from the chat decision for the caller. `POST /api/chat` does not reject a listed effort at `/reasoning_effort`, except across a deployment change. Other request checks still apply. An empty array means that the model accepts no `reasoning_effort`. Clients must tolerate unknown values.
| \ No newline at end of file diff --git a/docs/models/platformmodelendpoints.md b/docs/models/platformmodelendpoints.md new file mode 100644 index 000000000..a00f1e5f8 --- /dev/null +++ b/docs/models/platformmodelendpoints.md @@ -0,0 +1,11 @@ +# PlatformModelEndpoints + +The Platform endpoints that accept this model, one property per endpoint. A property is absent when that endpoint does not accept the model. For a caller that passes the access check, a model without `chat` is rejected at `/model` by `POST /api/chat`. Other request checks still apply. Clients must tolerate unknown properties. + + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `chat` | [Optional[models.PlatformModelChatEndpoint]](../models/platformmodelchatendpoint.md) | :heavy_minus_sign: | The model is usable with Platform chat, and `POST /api/chat` accepts it as `model`. When `chat` is present, `POST /api/chat` does not reject the model at `/model`, except across a deployment change. Other request checks still apply, and the access check runs before the model check. Acceptance does not guarantee which model runs: deployment configuration can still run the turn on a different model, and agent routing and expert handoffs can delegate parts of a turn.
| \ No newline at end of file diff --git a/docs/models/platformmodelslistrequest.md b/docs/models/platformmodelslistrequest.md new file mode 100644 index 000000000..306e1319b --- /dev/null +++ b/docs/models/platformmodelslistrequest.md @@ -0,0 +1,9 @@ +# PlatformModelsListRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | Maximum number of models to return. Defaults to 20. Maximum is 100. | +| `cursor` | *Optional[str]* | :heavy_minus_sign: | Opaque pagination cursor from a previous response. Cursors do not expire.
| \ No newline at end of file diff --git a/docs/models/platformmodelslistresponse.md b/docs/models/platformmodelslistresponse.md new file mode 100644 index 000000000..28cff0bbe --- /dev/null +++ b/docs/models/platformmodelslistresponse.md @@ -0,0 +1,13 @@ +# PlatformModelsListResponse + +A paginated list of models configured for the caller. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `results` | List[[models.PlatformModel](../models/platformmodel.md)] | :heavy_check_mark: | Models configured for the caller, ordered by `id`. | +| `has_more` | *bool* | :heavy_check_mark: | Whether additional results are available. | +| `next_cursor` | *Nullable[str]* | :heavy_check_mark: | Cursor for the next page, or null when no more results are available. | +| `request_id` | *str* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/models/platformreasoningeffort.md b/docs/models/platformreasoningeffort.md new file mode 100644 index 000000000..d4d067d6f --- /dev/null +++ b/docs/models/platformreasoningeffort.md @@ -0,0 +1,27 @@ +# PlatformReasoningEffort + +How much reasoning a model applies to a turn, from least effort to most. + + +## Example Usage + +```python +from glean.api_client.models import PlatformReasoningEffort + +value = PlatformReasoningEffort.NONE + +# Open enum: unrecognized values are captured as UnrecognizedStr +``` + + +## Values + +| Name | Value | +| --------- | --------- | +| `NONE` | NONE | +| `MINIMAL` | MINIMAL | +| `LOW` | LOW | +| `MEDIUM` | MEDIUM | +| `HIGH` | HIGH | +| `XHIGH` | XHIGH | +| `MAX` | MAX | \ No newline at end of file diff --git a/docs/sdks/adminagents/README.md b/docs/sdks/adminagents/README.md index f4b51cc52..51b0d1dcf 100644 --- a/docs/sdks/adminagents/README.md +++ b/docs/sdks/adminagents/README.md @@ -32,12 +32,12 @@ with Glean( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `page_size` | *Optional[int]* | :heavy_minus_sign: | Maximum number of agents to return. Defaults to 50. Maximum is 100. | -| `cursor` | *Optional[str]* | :heavy_minus_sign: | Opaque pagination cursor from a previous response. Send the same filters that the previous request used.
| -| `filters` | List[[models.PlatformAdminAgentFilter](../../models/platformadminagentfilter.md)] | :heavy_minus_sign: | JSON-encoded filters that choose which agents are returned. The supported fields are name and description, with the operator EQUALS. Multiple values OR within a filter. Multiple filters AND together, and each field can appear in only one filter. For example, to return agents whose name contains "HR", send [{"field":"name","values":["HR"]}].
| -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | Maximum number of agents to return. Defaults to 50. Maximum is 100. | +| `cursor` | *Optional[str]* | :heavy_minus_sign: | Opaque pagination cursor from a previous response. Send the same filters that the previous request used.
| +| `filters` | List[[models.PlatformAdminAgentFilter](../../models/platformadminagentfilter.md)] | :heavy_minus_sign: | JSON-encoded filters that choose which agents are returned. The supported fields are name, description, and is_orphaned, with the operator EQUALS. Multiple values OR within a filter. Multiple filters AND together, and each field can appear in only one filter. For example, to return agents whose name contains "HR", send [{"field":"name","values":["HR"]}]. To return orphaned agents, send [{"field":"is_orphaned","values":["true"]}].
| +| `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/agents/README.md b/docs/sdks/agents/README.md index 8a9bd524e..c5bc6c2c3 100644 --- a/docs/sdks/agents/README.md +++ b/docs/sdks/agents/README.md @@ -191,22 +191,22 @@ with Glean( ### Parameters -| Parameter | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `agent_id` | *str* | :heavy_check_mark: | The ID of the agent to update. | {agent_id} | -| `name` | *Optional[str]* | :heavy_minus_sign: | Human-readable name. | | -| `description` | *Optional[str]* | :heavy_minus_sign: | Description of the agent's purpose and behavior. | | -| `instructions` | *Optional[str]* | :heavy_minus_sign: | System prompt the agent follows. | | -| `skills` | List[[models.PlatformAgentSkill](../../models/platformagentskill.md)] | :heavy_minus_sign: | Skills defined inline. | | -| `dependencies` | List[[models.PlatformAgentDependency](../../models/platformagentdependency.md)] | :heavy_minus_sign: | Published artifacts referenced by platform ID. Their content is not inlined in `skills` or `subagents`.
| | -| `tools` | List[[models.PlatformAgentToolset](../../models/platformagenttoolset.md)] | :heavy_minus_sign: | Tool providers and the subset of their tools available to the agent. | | -| `glean_search_config` | [OptionalNullable[models.PlatformAgentGleanSearchConfig]](../../models/platformagentgleansearchconfig.md) | :heavy_minus_sign: | Glean Search configuration. Send `null` to turn off Glean Search. | | -| `model` | [Optional[models.PlatformAgentLlmModel]](../../models/platformagentllmmodel.md) | :heavy_minus_sign: | Agentic model the agent runs on and its reasoning effort. | | -| `service_credentials` | List[[models.PlatformAgentServiceCredential](../../models/platformagentservicecredential.md)] | :heavy_minus_sign: | Service credentials the agent uses to call tools. | | -| `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. 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. | | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `agent_id` | *str* | :heavy_check_mark: | The ID of the agent to update. | {agent_id} | +| `name` | *Optional[str]* | :heavy_minus_sign: | Human-readable name. | | +| `description` | *Optional[str]* | :heavy_minus_sign: | Description of the agent's purpose and behavior. | | +| `instructions` | *Optional[str]* | :heavy_minus_sign: | System prompt the agent follows. | | +| `skills` | List[[models.PlatformAgentSkill](../../models/platformagentskill.md)] | :heavy_minus_sign: | Skills defined inline. The supplied list replaces the entire saved list.
| | +| `dependencies` | List[[models.PlatformAgentDependency](../../models/platformagentdependency.md)] | :heavy_minus_sign: | Published artifacts referenced by platform ID. Their content is not inlined in `skills` or `subagents`. The supplied list replaces the entire saved list.
| | +| `tools` | List[[models.PlatformAgentToolset](../../models/platformagenttoolset.md)] | :heavy_minus_sign: | Tool providers and the subset of their tools available to the agent. The supplied list replaces the entire saved list.
| | +| `glean_search_config` | [OptionalNullable[models.PlatformAgentGleanSearchConfig]](../../models/platformagentgleansearchconfig.md) | :heavy_minus_sign: | Glean Search configuration. The supplied object replaces the entire saved configuration, including `datasource_instances` and `urls`, so omitted fields are not kept. Send `null` to turn off Glean Search.
| | +| `model` | [Optional[models.PlatformAgentLlmModel]](../../models/platformagentllmmodel.md) | :heavy_minus_sign: | Agentic model the agent runs on and its reasoning effort. | | +| `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. | | +| `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/anonymousauthtokens/README.md b/docs/sdks/anonymousauthtokens/README.md new file mode 100644 index 000000000..b46c7e968 --- /dev/null +++ b/docs/sdks/anonymousauthtokens/README.md @@ -0,0 +1,49 @@ +# Anonymousauthtokens + +## Overview + +### Available Operations + +* [create](#create) - Create an anonymous auth token + +## create + +Creates a short-lived auth token for anonymous external search, for example with the [Web SDK](https://developers.glean.com/web). Call this from your backend with an API token that has anonymous permissions and the anonymous_auth_tokens:write scope, then pass the returned token to the browser. The returned token acts as no user and expires at expires_at. Any other caller gets 403, and so does a deployment where anonymous external search is off. + + +### Example Usage + + +```python +from glean.api_client import Glean +import os + + +with Glean( + api_token=os.getenv("GLEAN_API_TOKEN"), +) as glean: + + res = glean.anonymousauthtokens.create() + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.PlatformCreateAnonymousAuthTokenResponse](../../models/platformcreateanonymousauthtokenresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.PlatformProblemDetailError | 400, 401, 403, 404, 408, 429 | application/problem+json | +| errors.PlatformProblemDetailError | 500, 503 | application/problem+json | +| errors.GleanError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/chatsdk/README.md b/docs/sdks/chatsdk/README.md index da4b455ba..29c92ccf6 100644 --- a/docs/sdks/chatsdk/README.md +++ b/docs/sdks/chatsdk/README.md @@ -27,7 +27,7 @@ with Glean( api_token=os.getenv("GLEAN_API_TOKEN"), ) as glean: - res = glean.chat.create(input="Summarize our parental leave policy.", store=True) + res = glean.chat.create(input="Summarize our parental leave policy.", store=True, model="GPT5_6_LUNA") # Handle response print(res) @@ -36,12 +36,14 @@ with Glean( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | -| `input` | [models.PlatformChatCreateInput](../../models/platformchatcreateinput.md) | :heavy_check_mark: | Either a plain string (single user turn) or a chronological array of `USER`/`ASSISTANT` messages. The final array message must be `USER`.
| -| `store` | *Optional[bool]* | :heavy_minus_sign: | When true (default), persist the interaction and return a `conversation_id`. When false, run ephemerally with no persistence.
| -| `conversation_id` | *Optional[str]* | :heavy_minus_sign: | Continue an existing stored conversation. Incompatible with message-array `input` and with `store: false`.
| -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `input` | [models.PlatformChatCreateInput](../../models/platformchatcreateinput.md) | :heavy_check_mark: | Either a plain string (single user turn) or a chronological array of `USER`/`ASSISTANT` messages. The final array message must be `USER`.
| | +| `store` | *Optional[bool]* | :heavy_minus_sign: | When true (default), persist the interaction and return a `conversation_id`. When false, run ephemerally with no persistence.
| | +| `conversation_id` | *Optional[str]* | :heavy_minus_sign: | Continue an existing stored conversation. Incompatible with message-array `input` and with `store: false`.
| | +| `model` | *Optional[str]* | :heavy_minus_sign: | Model for this turn, matched exactly to an id from GET /api/models. When GET /api/models reports `endpoints.chat` for the model, `POST /api/chat` does not reject this value at `/model`, except across a deployment change. Other request checks still apply. The model is requested, not guaranteed: deployment configuration can still run the turn on a different model.
| GPT5_6_LUNA | +| `reasoning_effort` | [Optional[models.PlatformReasoningEffort]](../../models/platformreasoningeffort.md) | :heavy_minus_sign: | Reasoning effort for this turn. Requires `model`. When omitted, the model's default effort applies. When GET /api/models lists this value in `endpoints.chat.reasoning_efforts` for the model, `POST /api/chat` does not reject it at `/reasoning_effort`, except across a deployment change. Other request checks still apply.
| | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -204,7 +206,7 @@ with Glean( api_token=os.getenv("GLEAN_API_TOKEN"), ) as glean: - res = glean.chat.create_stream(input="Summarize our parental leave policy.", store=True) + res = glean.chat.create_stream(input="Summarize our parental leave policy.", store=True, model="GPT5_6_LUNA") with res as event_stream: for event in event_stream: @@ -215,12 +217,14 @@ with Glean( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | -| `input` | [models.PlatformChatCreateStreamInput](../../models/platformchatcreatestreaminput.md) | :heavy_check_mark: | Either a plain string (single user turn) or a chronological array of `USER`/`ASSISTANT` messages. The final array message must be `USER`.
| -| `store` | *Optional[bool]* | :heavy_minus_sign: | When true (default), persist the interaction and return a `conversation_id`. When false, run ephemerally with no persistence.
| -| `conversation_id` | *Optional[str]* | :heavy_minus_sign: | Continue an existing stored conversation. Incompatible with message-array `input` and with `store: false`.
| -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `input` | [models.PlatformChatCreateStreamInput](../../models/platformchatcreatestreaminput.md) | :heavy_check_mark: | Either a plain string (single user turn) or a chronological array of `USER`/`ASSISTANT` messages. The final array message must be `USER`.
| | +| `store` | *Optional[bool]* | :heavy_minus_sign: | When true (default), persist the interaction and return a `conversation_id`. When false, run ephemerally with no persistence.
| | +| `conversation_id` | *Optional[str]* | :heavy_minus_sign: | Continue an existing stored conversation. Incompatible with message-array `input` and with `store: false`.
| | +| `model` | *Optional[str]* | :heavy_minus_sign: | Model for this turn, matched exactly to an id from GET /api/models. When GET /api/models reports `endpoints.chat` for the model, `POST /api/chat` does not reject this value at `/model`, except across a deployment change. Other request checks still apply. The model is requested, not guaranteed: deployment configuration can still run the turn on a different model.
| GPT5_6_LUNA | +| `reasoning_effort` | [Optional[models.PlatformReasoningEffort]](../../models/platformreasoningeffort.md) | :heavy_minus_sign: | Reasoning effort for this turn. Requires `model`. When omitted, the model's default effort applies. When GET /api/models lists this value in `endpoints.chat.reasoning_efforts` for the model, `POST /api/chat` does not reject it at `/reasoning_effort`, except across a deployment change. Other request checks still apply.
| | +| `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/clientchat/README.md b/docs/sdks/clientchat/README.md index c59d035d0..16fc220b5 100644 --- a/docs/sdks/clientchat/README.md +++ b/docs/sdks/clientchat/README.md @@ -14,6 +14,7 @@ * [retrieve_files](#retrieve_files) - Get files uploaded by a user for Chat * [delete_files](#delete_files) - Delete files uploaded by a user for chat * [retrieve_file](#retrieve_file) - Download a chat file +* [retrieve_image](#retrieve_image) - Download a document image * [create_stream](#create_stream) - Chat ## create @@ -530,6 +531,47 @@ with Glean( | ----------------- | ----------------- | ----------------- | | errors.GleanError | 4XX, 5XX | \*/\* | +## retrieve_image + +Download an image from an indexed document, such as an image linked in a chat response. Chat responses link these images as `/api/v1/images?key=`; pass the same key here. Returns the image bytes with a Content-Type header matching the image format. Only document images are supported, and the caller must have access to the source document. + + +### Example Usage + + +```python +from glean.api_client import Glean +import os + + +with Glean( + api_token=os.getenv("GLEAN_API_TOKEN"), +) as glean: + + res = glean.client.chat.retrieve_image(key="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `key` | *str* | :heavy_check_mark: | Image key from the image URL in a chat response. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[httpx.Response](../../models/.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------- | ----------------- | ----------------- | +| errors.GleanError | 4XX, 5XX | \*/\* | + ## create_stream Have a conversation with Glean AI. diff --git a/docs/sdks/models/README.md b/docs/sdks/models/README.md new file mode 100644 index 000000000..f4d89e884 --- /dev/null +++ b/docs/sdks/models/README.md @@ -0,0 +1,51 @@ +# Models + +## Overview + +### Available Operations + +* [list](#list) - List models + +## list + +Lists the models that the deployment configures for the caller. `endpoints` reports which Platform endpoints accept each model. For a caller that passes the access check, a model without `endpoints.chat` is rejected at `/model`. Other request checks still apply. + + +### Example Usage + + +```python +from glean.api_client import Glean +import os + + +with Glean( + api_token=os.getenv("GLEAN_API_TOKEN"), +) as glean: + + res = glean.models.list(page_size=20) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | Maximum number of models to return. Defaults to 20. Maximum is 100. | +| `cursor` | *Optional[str]* | :heavy_minus_sign: | Opaque pagination cursor from a previous response. Cursors do not expire.
| +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.PlatformModelsListResponse](../../models/platformmodelslistresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.PlatformProblemDetailError | 400, 401, 403, 404, 408, 429 | application/problem+json | +| errors.PlatformProblemDetailError | 500, 503 | application/problem+json | +| errors.GleanError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 9e4e3c244..c72b37624 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "glean-api-client" -version = "0.18.1" +version = "0.18.2" 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 88adac12c..03f4b3e3b 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.1" +__version__: str = "0.18.2" __openapi_doc_version__: str = "0.9.0" __gen_version__: str = "2.969.4" -__user_agent__: str = "speakeasy-sdk/python 0.18.1 2.969.4 0.9.0 glean-api-client" +__user_agent__: str = "speakeasy-sdk/python 0.18.2 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 d5560bd88..6fd07dd6f 100644 --- a/src/glean/api_client/admin_agents.py +++ b/src/glean/api_client/admin_agents.py @@ -4,6 +4,9 @@ from .basesdk import BaseSDK from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import ( + platformadminagentfilter as models_platformadminagentfilter, +) from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -18,8 +21,10 @@ def list( cursor: Optional[str] = None, filters: Optional[ Union[ - Iterable[models.PlatformAdminAgentFilter], - Iterable[models.PlatformAdminAgentFilterTypedDict], + Iterable[models_platformadminagentfilter.PlatformAdminAgentFilter], + Iterable[ + models_platformadminagentfilter.PlatformAdminAgentFilterTypedDict + ], ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -35,7 +40,7 @@ def list( :param page_size: Maximum number of agents to return. Defaults to 50. Maximum is 100. :param cursor: Opaque pagination cursor from a previous response. Send the same filters that the previous request used. - :param filters: JSON-encoded filters that choose which agents are returned. The supported fields are name and description, with the operator EQUALS. Multiple values OR within a filter. Multiple filters AND together, and each field can appear in only one filter. For example, to return agents whose name contains \"HR\", send [{\"field\":\"name\",\"values\":[\"HR\"]}]. + :param filters: JSON-encoded filters that choose which agents are returned. The supported fields are name, description, and is_orphaned, with the operator EQUALS. Multiple values OR within a filter. Multiple filters AND together, and each field can appear in only one filter. For example, to return agents whose name contains \"HR\", send [{\"field\":\"name\",\"values\":[\"HR\"]}]. To return orphaned agents, send [{\"field\":\"is_orphaned\",\"values\":[\"true\"]}]. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -144,8 +149,10 @@ async def list_async( cursor: Optional[str] = None, filters: Optional[ Union[ - Iterable[models.PlatformAdminAgentFilter], - Iterable[models.PlatformAdminAgentFilterTypedDict], + Iterable[models_platformadminagentfilter.PlatformAdminAgentFilter], + Iterable[ + models_platformadminagentfilter.PlatformAdminAgentFilterTypedDict + ], ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -161,7 +168,7 @@ async def list_async( :param page_size: Maximum number of agents to return. Defaults to 50. Maximum is 100. :param cursor: Opaque pagination cursor from a previous response. Send the same filters that the previous request used. - :param filters: JSON-encoded filters that choose which agents are returned. The supported fields are name and description, with the operator EQUALS. Multiple values OR within a filter. Multiple filters AND together, and each field can appear in only one filter. For example, to return agents whose name contains \"HR\", send [{\"field\":\"name\",\"values\":[\"HR\"]}]. + :param filters: JSON-encoded filters that choose which agents are returned. The supported fields are name, description, and is_orphaned, with the operator EQUALS. Multiple values OR within a filter. Multiple filters AND together, and each field can appear in only one filter. For example, to return agents whose name contains \"HR\", send [{\"field\":\"name\",\"values\":[\"HR\"]}]. To return orphaned agents, send [{\"field\":\"is_orphaned\",\"values\":[\"true\"]}]. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method diff --git a/src/glean/api_client/admin_idpgroups.py b/src/glean/api_client/admin_idpgroups.py index 1b731dc35..5802968f9 100644 --- a/src/glean/api_client/admin_idpgroups.py +++ b/src/glean/api_client/admin_idpgroups.py @@ -4,6 +4,9 @@ from .basesdk import BaseSDK from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import ( + platformidpgroupfilter as models_platformidpgroupfilter, +) from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -18,8 +21,8 @@ def list( cursor: Optional[str] = None, filters: Optional[ Union[ - Iterable[models.PlatformIdpGroupFilter], - Iterable[models.PlatformIdpGroupFilterTypedDict], + Iterable[models_platformidpgroupfilter.PlatformIdpGroupFilter], + Iterable[models_platformidpgroupfilter.PlatformIdpGroupFilterTypedDict], ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -144,8 +147,8 @@ async def list_async( cursor: Optional[str] = None, filters: Optional[ Union[ - Iterable[models.PlatformIdpGroupFilter], - Iterable[models.PlatformIdpGroupFilterTypedDict], + Iterable[models_platformidpgroupfilter.PlatformIdpGroupFilter], + Iterable[models_platformidpgroupfilter.PlatformIdpGroupFilterTypedDict], ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, diff --git a/src/glean/api_client/agents.py b/src/glean/api_client/agents.py index 36d60c977..51f5d37e8 100644 --- a/src/glean/api_client/agents.py +++ b/src/glean/api_client/agents.py @@ -4,6 +4,21 @@ from .basesdk import BaseSDK from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import ( + platform_agents_create_run_streamop as models_platform_agents_create_run_streamop, + platform_agents_create_runop as models_platform_agents_create_runop, + platformagentchannels as models_platformagentchannels, + platformagentdependency as models_platformagentdependency, + platformagentgleansearchconfig as models_platformagentgleansearchconfig, + platformagentllmmodel as models_platformagentllmmodel, + platformagentrunapprovaldecision as models_platformagentrunapprovaldecision, + platformagentservicecredential as models_platformagentservicecredential, + platformagentskill as models_platformagentskill, + platformagenttoolset as models_platformagenttoolset, + platformagenttrigger as models_platformagenttrigger, + platformmessage_input as models_platformmessage_input, + platformsubagent as models_platformsubagent, +) from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import eventstreaming, get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -19,49 +34,64 @@ def create( instructions: Optional[str] = None, skills: Optional[ Union[ - Iterable[models.PlatformAgentSkill], - Iterable[models.PlatformAgentSkillTypedDict], + Iterable[models_platformagentskill.PlatformAgentSkill], + Iterable[models_platformagentskill.PlatformAgentSkillTypedDict], ] ] = None, dependencies: Optional[ Union[ - Iterable[models.PlatformAgentDependency], - Iterable[models.PlatformAgentDependencyTypedDict], + Iterable[models_platformagentdependency.PlatformAgentDependency], + Iterable[ + models_platformagentdependency.PlatformAgentDependencyTypedDict + ], ] ] = None, tools: Optional[ Union[ - Iterable[models.PlatformAgentToolset], - Iterable[models.PlatformAgentToolsetTypedDict], + Iterable[models_platformagenttoolset.PlatformAgentToolset], + Iterable[models_platformagenttoolset.PlatformAgentToolsetTypedDict], ] ] = None, glean_search_config: Optional[ Union[ - models.PlatformAgentGleanSearchConfig, - models.PlatformAgentGleanSearchConfigTypedDict, + models_platformagentgleansearchconfig.PlatformAgentGleanSearchConfig, + models_platformagentgleansearchconfig.PlatformAgentGleanSearchConfigTypedDict, ] ] = None, model: Optional[ - Union[models.PlatformAgentLlmModel, models.PlatformAgentLlmModelTypedDict] + Union[ + models_platformagentllmmodel.PlatformAgentLlmModel, + models_platformagentllmmodel.PlatformAgentLlmModelTypedDict, + ] ] = None, service_credentials: Optional[ Union[ - Iterable[models.PlatformAgentServiceCredential], - Iterable[models.PlatformAgentServiceCredentialTypedDict], + Iterable[ + models_platformagentservicecredential.PlatformAgentServiceCredential + ], + Iterable[ + models_platformagentservicecredential.PlatformAgentServiceCredentialTypedDict + ], ] ] = None, use_agent_identity: Optional[bool] = None, channels: Optional[ - Union[models.PlatformAgentChannels, models.PlatformAgentChannelsTypedDict] + Union[ + models_platformagentchannels.PlatformAgentChannels, + models_platformagentchannels.PlatformAgentChannelsTypedDict, + ] ] = None, subagents: Optional[ Union[ - Iterable[models.PlatformSubagent], - Iterable[models.PlatformSubagentTypedDict], + Iterable[models_platformsubagent.PlatformSubagent], + Iterable[models_platformsubagent.PlatformSubagentTypedDict], ] ] = None, trigger: Optional[ - Union[models.PlatformAgentTrigger, models.PlatformAgentTriggerTypedDict] + Union[ + models_platformagenttrigger.PlatformAgentTrigger, + models_platformagenttrigger.PlatformAgentTriggerTypedDict, + ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -227,49 +257,64 @@ async def create_async( instructions: Optional[str] = None, skills: Optional[ Union[ - Iterable[models.PlatformAgentSkill], - Iterable[models.PlatformAgentSkillTypedDict], + Iterable[models_platformagentskill.PlatformAgentSkill], + Iterable[models_platformagentskill.PlatformAgentSkillTypedDict], ] ] = None, dependencies: Optional[ Union[ - Iterable[models.PlatformAgentDependency], - Iterable[models.PlatformAgentDependencyTypedDict], + Iterable[models_platformagentdependency.PlatformAgentDependency], + Iterable[ + models_platformagentdependency.PlatformAgentDependencyTypedDict + ], ] ] = None, tools: Optional[ Union[ - Iterable[models.PlatformAgentToolset], - Iterable[models.PlatformAgentToolsetTypedDict], + Iterable[models_platformagenttoolset.PlatformAgentToolset], + Iterable[models_platformagenttoolset.PlatformAgentToolsetTypedDict], ] ] = None, glean_search_config: Optional[ Union[ - models.PlatformAgentGleanSearchConfig, - models.PlatformAgentGleanSearchConfigTypedDict, + models_platformagentgleansearchconfig.PlatformAgentGleanSearchConfig, + models_platformagentgleansearchconfig.PlatformAgentGleanSearchConfigTypedDict, ] ] = None, model: Optional[ - Union[models.PlatformAgentLlmModel, models.PlatformAgentLlmModelTypedDict] + Union[ + models_platformagentllmmodel.PlatformAgentLlmModel, + models_platformagentllmmodel.PlatformAgentLlmModelTypedDict, + ] ] = None, service_credentials: Optional[ Union[ - Iterable[models.PlatformAgentServiceCredential], - Iterable[models.PlatformAgentServiceCredentialTypedDict], + Iterable[ + models_platformagentservicecredential.PlatformAgentServiceCredential + ], + Iterable[ + models_platformagentservicecredential.PlatformAgentServiceCredentialTypedDict + ], ] ] = None, use_agent_identity: Optional[bool] = None, channels: Optional[ - Union[models.PlatformAgentChannels, models.PlatformAgentChannelsTypedDict] + Union[ + models_platformagentchannels.PlatformAgentChannels, + models_platformagentchannels.PlatformAgentChannelsTypedDict, + ] ] = None, subagents: Optional[ Union[ - Iterable[models.PlatformSubagent], - Iterable[models.PlatformSubagentTypedDict], + Iterable[models_platformsubagent.PlatformSubagent], + Iterable[models_platformsubagent.PlatformSubagentTypedDict], ] ] = None, trigger: Optional[ - Union[models.PlatformAgentTrigger, models.PlatformAgentTriggerTypedDict] + Union[ + models_platformagenttrigger.PlatformAgentTrigger, + models_platformagenttrigger.PlatformAgentTriggerTypedDict, + ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -884,48 +929,63 @@ def update( instructions: Optional[str] = None, skills: Optional[ Union[ - Iterable[models.PlatformAgentSkill], - Iterable[models.PlatformAgentSkillTypedDict], + Iterable[models_platformagentskill.PlatformAgentSkill], + Iterable[models_platformagentskill.PlatformAgentSkillTypedDict], ] ] = None, dependencies: Optional[ Union[ - Iterable[models.PlatformAgentDependency], - Iterable[models.PlatformAgentDependencyTypedDict], + Iterable[models_platformagentdependency.PlatformAgentDependency], + Iterable[ + models_platformagentdependency.PlatformAgentDependencyTypedDict + ], ] ] = None, tools: Optional[ Union[ - Iterable[models.PlatformAgentToolset], - Iterable[models.PlatformAgentToolsetTypedDict], + Iterable[models_platformagenttoolset.PlatformAgentToolset], + Iterable[models_platformagenttoolset.PlatformAgentToolsetTypedDict], ] ] = None, glean_search_config: OptionalNullable[ Union[ - models.PlatformAgentGleanSearchConfig, - models.PlatformAgentGleanSearchConfigTypedDict, + models_platformagentgleansearchconfig.PlatformAgentGleanSearchConfig, + models_platformagentgleansearchconfig.PlatformAgentGleanSearchConfigTypedDict, ] ] = UNSET, model: Optional[ - Union[models.PlatformAgentLlmModel, models.PlatformAgentLlmModelTypedDict] + Union[ + models_platformagentllmmodel.PlatformAgentLlmModel, + models_platformagentllmmodel.PlatformAgentLlmModelTypedDict, + ] ] = None, service_credentials: Optional[ Union[ - Iterable[models.PlatformAgentServiceCredential], - Iterable[models.PlatformAgentServiceCredentialTypedDict], + Iterable[ + models_platformagentservicecredential.PlatformAgentServiceCredential + ], + Iterable[ + models_platformagentservicecredential.PlatformAgentServiceCredentialTypedDict + ], ] ] = None, channels: Optional[ - Union[models.PlatformAgentChannels, models.PlatformAgentChannelsTypedDict] + Union[ + models_platformagentchannels.PlatformAgentChannels, + models_platformagentchannels.PlatformAgentChannelsTypedDict, + ] ] = None, subagents: Optional[ Union[ - Iterable[models.PlatformSubagent], - Iterable[models.PlatformSubagentTypedDict], + Iterable[models_platformsubagent.PlatformSubagent], + Iterable[models_platformsubagent.PlatformSubagentTypedDict], ] ] = None, trigger: Optional[ - Union[models.PlatformAgentTrigger, models.PlatformAgentTriggerTypedDict] + Union[ + models_platformagenttrigger.PlatformAgentTrigger, + models_platformagenttrigger.PlatformAgentTriggerTypedDict, + ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -941,15 +1001,19 @@ def update( :param name: Human-readable name. :param description: Description of the agent's purpose and behavior. :param instructions: System prompt the agent follows. - :param skills: Skills defined inline. - :param dependencies: Published artifacts referenced by platform ID. Their content is not inlined in `skills` or `subagents`. + :param skills: Skills defined inline. The supplied list replaces the entire saved list. + + :param dependencies: Published artifacts referenced by platform ID. Their content is not inlined in `skills` or `subagents`. The supplied list replaces the entire saved list. + + :param tools: Tool providers and the subset of their tools available to the agent. The supplied list replaces the entire saved list. + + :param glean_search_config: Glean Search configuration. The supplied object replaces the entire saved configuration, including `datasource_instances` and `urls`, so omitted fields are not kept. Send `null` to turn off Glean Search. - :param tools: Tool providers and the subset of their tools available to the agent. - :param glean_search_config: Glean Search configuration. Send `null` to turn off Glean Search. :param model: Agentic model the agent runs on and its reasoning effort. - :param service_credentials: Service credentials the agent uses to call tools. + :param service_credentials: Service credentials the agent uses to call tools. The supplied list replaces the entire saved list. + :param channels: Messaging channels the agent is deployed to. Requires `use_agent_identity`. - :param subagents: Subagents the agent dispatches work to. Subagents cannot contain subagents. Keep a saved subagent's `subagent_id` to preserve it, and omit `subagent_id` to add a subagent. + :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 retries: Override the default retry configuration for this method @@ -1097,48 +1161,63 @@ async def update_async( instructions: Optional[str] = None, skills: Optional[ Union[ - Iterable[models.PlatformAgentSkill], - Iterable[models.PlatformAgentSkillTypedDict], + Iterable[models_platformagentskill.PlatformAgentSkill], + Iterable[models_platformagentskill.PlatformAgentSkillTypedDict], ] ] = None, dependencies: Optional[ Union[ - Iterable[models.PlatformAgentDependency], - Iterable[models.PlatformAgentDependencyTypedDict], + Iterable[models_platformagentdependency.PlatformAgentDependency], + Iterable[ + models_platformagentdependency.PlatformAgentDependencyTypedDict + ], ] ] = None, tools: Optional[ Union[ - Iterable[models.PlatformAgentToolset], - Iterable[models.PlatformAgentToolsetTypedDict], + Iterable[models_platformagenttoolset.PlatformAgentToolset], + Iterable[models_platformagenttoolset.PlatformAgentToolsetTypedDict], ] ] = None, glean_search_config: OptionalNullable[ Union[ - models.PlatformAgentGleanSearchConfig, - models.PlatformAgentGleanSearchConfigTypedDict, + models_platformagentgleansearchconfig.PlatformAgentGleanSearchConfig, + models_platformagentgleansearchconfig.PlatformAgentGleanSearchConfigTypedDict, ] ] = UNSET, model: Optional[ - Union[models.PlatformAgentLlmModel, models.PlatformAgentLlmModelTypedDict] + Union[ + models_platformagentllmmodel.PlatformAgentLlmModel, + models_platformagentllmmodel.PlatformAgentLlmModelTypedDict, + ] ] = None, service_credentials: Optional[ Union[ - Iterable[models.PlatformAgentServiceCredential], - Iterable[models.PlatformAgentServiceCredentialTypedDict], + Iterable[ + models_platformagentservicecredential.PlatformAgentServiceCredential + ], + Iterable[ + models_platformagentservicecredential.PlatformAgentServiceCredentialTypedDict + ], ] ] = None, channels: Optional[ - Union[models.PlatformAgentChannels, models.PlatformAgentChannelsTypedDict] + Union[ + models_platformagentchannels.PlatformAgentChannels, + models_platformagentchannels.PlatformAgentChannelsTypedDict, + ] ] = None, subagents: Optional[ Union[ - Iterable[models.PlatformSubagent], - Iterable[models.PlatformSubagentTypedDict], + Iterable[models_platformsubagent.PlatformSubagent], + Iterable[models_platformsubagent.PlatformSubagentTypedDict], ] ] = None, trigger: Optional[ - Union[models.PlatformAgentTrigger, models.PlatformAgentTriggerTypedDict] + Union[ + models_platformagenttrigger.PlatformAgentTrigger, + models_platformagenttrigger.PlatformAgentTriggerTypedDict, + ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -1154,15 +1233,19 @@ async def update_async( :param name: Human-readable name. :param description: Description of the agent's purpose and behavior. :param instructions: System prompt the agent follows. - :param skills: Skills defined inline. - :param dependencies: Published artifacts referenced by platform ID. Their content is not inlined in `skills` or `subagents`. + :param skills: Skills defined inline. The supplied list replaces the entire saved list. + + :param dependencies: Published artifacts referenced by platform ID. Their content is not inlined in `skills` or `subagents`. The supplied list replaces the entire saved list. + + :param tools: Tool providers and the subset of their tools available to the agent. The supplied list replaces the entire saved list. + + :param glean_search_config: Glean Search configuration. The supplied object replaces the entire saved configuration, including `datasource_instances` and `urls`, so omitted fields are not kept. Send `null` to turn off Glean Search. - :param tools: Tool providers and the subset of their tools available to the agent. - :param glean_search_config: Glean Search configuration. Send `null` to turn off Glean Search. :param model: Agentic model the agent runs on and its reasoning effort. - :param service_credentials: Service credentials the agent uses to call tools. + :param service_credentials: Service credentials the agent uses to call tools. The supplied list replaces the entire saved list. + :param channels: Messaging channels the agent is deployed to. Requires `use_agent_identity`. - :param subagents: Subagents the agent dispatches work to. Subagents cannot contain subagents. Keep a saved subagent's `subagent_id` to preserve it, and omit `subagent_id` to add a subagent. + :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 retries: Override the default retry configuration for this method @@ -1754,13 +1837,13 @@ def create_run( input: Optional[Mapping[str, Any]] = None, messages: Optional[ Union[ - Iterable[models.PlatformMessageInput], - Iterable[models.PlatformMessageInputTypedDict], + Iterable[models_platformmessage_input.PlatformMessageInput], + Iterable[models_platformmessage_input.PlatformMessageInputTypedDict], ] ] = None, metadata: Optional[Mapping[str, Any]] = None, execution_mode: Optional[ - models.PlatformAgentsCreateRunExecutionMode + models_platform_agents_create_runop.PlatformAgentsCreateRunExecutionMode ] = models.PlatformAgentsCreateRunExecutionMode.REQUEST_BOUND, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -1907,13 +1990,13 @@ async def create_run_async( input: Optional[Mapping[str, Any]] = None, messages: Optional[ Union[ - Iterable[models.PlatformMessageInput], - Iterable[models.PlatformMessageInputTypedDict], + Iterable[models_platformmessage_input.PlatformMessageInput], + Iterable[models_platformmessage_input.PlatformMessageInputTypedDict], ] ] = None, metadata: Optional[Mapping[str, Any]] = None, execution_mode: Optional[ - models.PlatformAgentsCreateRunExecutionMode + models_platform_agents_create_runop.PlatformAgentsCreateRunExecutionMode ] = models.PlatformAgentsCreateRunExecutionMode.REQUEST_BOUND, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -2527,8 +2610,12 @@ def respond_to_run( agent_id: str, run_id: str, responses: Union[ - Iterable[models.PlatformAgentRunApprovalDecision], - Iterable[models.PlatformAgentRunApprovalDecisionTypedDict], + Iterable[ + models_platformagentrunapprovaldecision.PlatformAgentRunApprovalDecision + ], + Iterable[ + models_platformagentrunapprovaldecision.PlatformAgentRunApprovalDecisionTypedDict + ], ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -2656,8 +2743,12 @@ async def respond_to_run_async( agent_id: str, run_id: str, responses: Union[ - Iterable[models.PlatformAgentRunApprovalDecision], - Iterable[models.PlatformAgentRunApprovalDecisionTypedDict], + Iterable[ + models_platformagentrunapprovaldecision.PlatformAgentRunApprovalDecision + ], + Iterable[ + models_platformagentrunapprovaldecision.PlatformAgentRunApprovalDecisionTypedDict + ], ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -2786,13 +2877,13 @@ def create_run_stream( input: Optional[Mapping[str, Any]] = None, messages: Optional[ Union[ - Iterable[models.PlatformMessageInput], - Iterable[models.PlatformMessageInputTypedDict], + Iterable[models_platformmessage_input.PlatformMessageInput], + Iterable[models_platformmessage_input.PlatformMessageInputTypedDict], ] ] = None, metadata: Optional[Mapping[str, Any]] = None, execution_mode: Optional[ - models.PlatformAgentsCreateRunStreamExecutionMode + models_platform_agents_create_run_streamop.PlatformAgentsCreateRunStreamExecutionMode ] = models.PlatformAgentsCreateRunStreamExecutionMode.REQUEST_BOUND, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -2952,13 +3043,13 @@ async def create_run_stream_async( input: Optional[Mapping[str, Any]] = None, messages: Optional[ Union[ - Iterable[models.PlatformMessageInput], - Iterable[models.PlatformMessageInputTypedDict], + Iterable[models_platformmessage_input.PlatformMessageInput], + Iterable[models_platformmessage_input.PlatformMessageInputTypedDict], ] ] = None, metadata: Optional[Mapping[str, Any]] = None, execution_mode: Optional[ - models.PlatformAgentsCreateRunStreamExecutionMode + models_platform_agents_create_run_streamop.PlatformAgentsCreateRunStreamExecutionMode ] = models.PlatformAgentsCreateRunStreamExecutionMode.REQUEST_BOUND, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, diff --git a/src/glean/api_client/announcements.py b/src/glean/api_client/announcements.py index c624c8893..623c95152 100644 --- a/src/glean/api_client/announcements.py +++ b/src/glean/api_client/announcements.py @@ -5,6 +5,13 @@ from datetime import datetime from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import ( + createannouncementrequest as models_createannouncementrequest, + facetfilter as models_facetfilter, + structuredtext as models_structuredtext, + thumbnail as models_thumbnail, + updateannouncementrequest as models_updateannouncementrequest, +) from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -20,18 +27,32 @@ def create( title: str, locale: Optional[str] = None, body: Optional[ - Union[models.StructuredText, models.StructuredTextTypedDict] + Union[ + models_structuredtext.StructuredText, + models_structuredtext.StructuredTextTypedDict, + ] ] = None, emoji: Optional[str] = None, - thumbnail: Optional[Union[models.Thumbnail, models.ThumbnailTypedDict]] = None, - banner: Optional[Union[models.Thumbnail, models.ThumbnailTypedDict]] = None, + thumbnail: Optional[ + Union[models_thumbnail.Thumbnail, models_thumbnail.ThumbnailTypedDict] + ] = None, + banner: Optional[ + Union[models_thumbnail.Thumbnail, models_thumbnail.ThumbnailTypedDict] + ] = None, audience_filters: Optional[ - Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] + Union[ + Iterable[models_facetfilter.FacetFilter], + Iterable[models_facetfilter.FacetFilterTypedDict], + ] ] = None, source_document_id: Optional[str] = None, hide_attribution: Optional[bool] = None, - channel: Optional[models.CreateAnnouncementRequestChannel] = None, - post_type: Optional[models.CreateAnnouncementRequestPostType] = None, + channel: Optional[ + models_createannouncementrequest.CreateAnnouncementRequestChannel + ] = None, + post_type: Optional[ + models_createannouncementrequest.CreateAnnouncementRequestPostType + ] = None, is_prioritized: Optional[bool] = None, view_url: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -169,18 +190,32 @@ async def create_async( title: str, locale: Optional[str] = None, body: Optional[ - Union[models.StructuredText, models.StructuredTextTypedDict] + Union[ + models_structuredtext.StructuredText, + models_structuredtext.StructuredTextTypedDict, + ] ] = None, emoji: Optional[str] = None, - thumbnail: Optional[Union[models.Thumbnail, models.ThumbnailTypedDict]] = None, - banner: Optional[Union[models.Thumbnail, models.ThumbnailTypedDict]] = None, + thumbnail: Optional[ + Union[models_thumbnail.Thumbnail, models_thumbnail.ThumbnailTypedDict] + ] = None, + banner: Optional[ + Union[models_thumbnail.Thumbnail, models_thumbnail.ThumbnailTypedDict] + ] = None, audience_filters: Optional[ - Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] + Union[ + Iterable[models_facetfilter.FacetFilter], + Iterable[models_facetfilter.FacetFilterTypedDict], + ] ] = None, source_document_id: Optional[str] = None, hide_attribution: Optional[bool] = None, - channel: Optional[models.CreateAnnouncementRequestChannel] = None, - post_type: Optional[models.CreateAnnouncementRequestPostType] = None, + channel: Optional[ + models_createannouncementrequest.CreateAnnouncementRequestChannel + ] = None, + post_type: Optional[ + models_createannouncementrequest.CreateAnnouncementRequestPostType + ] = None, is_prioritized: Optional[bool] = None, view_url: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -523,18 +558,32 @@ def update( id: int, locale: Optional[str] = None, body: Optional[ - Union[models.StructuredText, models.StructuredTextTypedDict] + Union[ + models_structuredtext.StructuredText, + models_structuredtext.StructuredTextTypedDict, + ] ] = None, emoji: Optional[str] = None, - thumbnail: Optional[Union[models.Thumbnail, models.ThumbnailTypedDict]] = None, - banner: Optional[Union[models.Thumbnail, models.ThumbnailTypedDict]] = None, + thumbnail: Optional[ + Union[models_thumbnail.Thumbnail, models_thumbnail.ThumbnailTypedDict] + ] = None, + banner: Optional[ + Union[models_thumbnail.Thumbnail, models_thumbnail.ThumbnailTypedDict] + ] = None, audience_filters: Optional[ - Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] + Union[ + Iterable[models_facetfilter.FacetFilter], + Iterable[models_facetfilter.FacetFilterTypedDict], + ] ] = None, source_document_id: Optional[str] = None, hide_attribution: Optional[bool] = None, - channel: Optional[models.UpdateAnnouncementRequestChannel] = None, - post_type: Optional[models.UpdateAnnouncementRequestPostType] = None, + channel: Optional[ + models_updateannouncementrequest.UpdateAnnouncementRequestChannel + ] = None, + post_type: Optional[ + models_updateannouncementrequest.UpdateAnnouncementRequestPostType + ] = None, is_prioritized: Optional[bool] = None, view_url: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -675,18 +724,32 @@ async def update_async( id: int, locale: Optional[str] = None, body: Optional[ - Union[models.StructuredText, models.StructuredTextTypedDict] + Union[ + models_structuredtext.StructuredText, + models_structuredtext.StructuredTextTypedDict, + ] ] = None, emoji: Optional[str] = None, - thumbnail: Optional[Union[models.Thumbnail, models.ThumbnailTypedDict]] = None, - banner: Optional[Union[models.Thumbnail, models.ThumbnailTypedDict]] = None, + thumbnail: Optional[ + Union[models_thumbnail.Thumbnail, models_thumbnail.ThumbnailTypedDict] + ] = None, + banner: Optional[ + Union[models_thumbnail.Thumbnail, models_thumbnail.ThumbnailTypedDict] + ] = None, audience_filters: Optional[ - Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] + Union[ + Iterable[models_facetfilter.FacetFilter], + Iterable[models_facetfilter.FacetFilterTypedDict], + ] ] = None, source_document_id: Optional[str] = None, hide_attribution: Optional[bool] = None, - channel: Optional[models.UpdateAnnouncementRequestChannel] = None, - post_type: Optional[models.UpdateAnnouncementRequestPostType] = None, + channel: Optional[ + models_updateannouncementrequest.UpdateAnnouncementRequestChannel + ] = None, + post_type: Optional[ + models_updateannouncementrequest.UpdateAnnouncementRequestPostType + ] = None, is_prioritized: Optional[bool] = None, view_url: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, diff --git a/src/glean/api_client/anonymousauthtokens.py b/src/glean/api_client/anonymousauthtokens.py new file mode 100644 index 000000000..a27498e9b --- /dev/null +++ b/src/glean/api_client/anonymousauthtokens.py @@ -0,0 +1,220 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 0d8a71904238 + +from .basesdk import BaseSDK +from glean.api_client import errors, models, utils +from glean.api_client._hooks import HookContext +from glean.api_client.types import OptionalNullable, UNSET +from glean.api_client.utils import get_security_from_env +from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, Mapping, Optional + + +class Anonymousauthtokens(BaseSDK): + def create( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PlatformCreateAnonymousAuthTokenResponse: + r"""Create an anonymous auth token + + Creates a short-lived auth token for anonymous external search, for example with the [Web SDK](https://developers.glean.com/web). Call this from your backend with an API token that has anonymous permissions and the anonymous_auth_tokens:write scope, then pass the returned token to the browser. The returned token acts as no user and expires at expires_at. Any other caller gets 403, and so does a deployment where anonymous external search is off. + + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + req = self._build_request( + method="POST", + path="/api/anonymous-auth-tokens", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="platform-anonymous-auth-tokens-create", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Auth tokens"], + extensions={ + "x-glean-release": {"introduced": "2026-11-18", "stage": "beta"}, + "x-glean-scopes": { + "legacy": ["ANONYMOUS_AUTH_TOKEN_CREATOR"], + "platform": ["anonymous_auth_tokens:write"], + }, + "x-visibility": "Public", + }, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response( + models.PlatformCreateAnonymousAuthTokenResponse, http_res + ) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "408", "429"], + "application/problem+json", + ): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, ["500", "503"], "application/problem+json"): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) + + async def create_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PlatformCreateAnonymousAuthTokenResponse: + r"""Create an anonymous auth token + + Creates a short-lived auth token for anonymous external search, for example with the [Web SDK](https://developers.glean.com/web). Call this from your backend with an API token that has anonymous permissions and the anonymous_auth_tokens:write scope, then pass the returned token to the browser. The returned token acts as no user and expires at expires_at. Any other caller gets 403, and so does a deployment where anonymous external search is off. + + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + req = self._build_request_async( + method="POST", + path="/api/anonymous-auth-tokens", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="platform-anonymous-auth-tokens-create", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Auth tokens"], + extensions={ + "x-glean-release": {"introduced": "2026-11-18", "stage": "beta"}, + "x-glean-scopes": { + "legacy": ["ANONYMOUS_AUTH_TOKEN_CREATOR"], + "platform": ["anonymous_auth_tokens:write"], + }, + "x-visibility": "Public", + }, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response( + models.PlatformCreateAnonymousAuthTokenResponse, http_res + ) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "408", "429"], + "application/problem+json", + ): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, ["500", "503"], "application/problem+json"): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) diff --git a/src/glean/api_client/answers.py b/src/glean/api_client/answers.py index 4abd27b0c..a966191ed 100644 --- a/src/glean/api_client/answers.py +++ b/src/glean/api_client/answers.py @@ -4,6 +4,14 @@ from .basesdk import BaseSDK from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import ( + answercreationdata as models_answercreationdata, + documentspec_union as models_documentspec_union, + editanswerrequest as models_editanswerrequest, + facetfilter as models_facetfilter, + structuredtextmutableproperties as models_structuredtextmutableproperties, + userrolespecification as models_userrolespecification, +) from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -15,7 +23,10 @@ class Answers(BaseSDK): def create( self, *, - data: Union[models.AnswerCreationData, models.AnswerCreationDataTypedDict], + data: Union[ + models_answercreationdata.AnswerCreationData, + models_answercreationdata.AnswerCreationDataTypedDict, + ], locale: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -117,7 +128,10 @@ def create( async def create_async( self, *, - data: Union[models.AnswerCreationData, models.AnswerCreationDataTypedDict], + data: Union[ + models_answercreationdata.AnswerCreationData, + models_answercreationdata.AnswerCreationDataTypedDict, + ], locale: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -437,36 +451,44 @@ def update( body_text: Optional[str] = None, board_id: Optional[int] = None, audience_filters: Optional[ - Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] + Union[ + Iterable[models_facetfilter.FacetFilter], + Iterable[models_facetfilter.FacetFilterTypedDict], + ] ] = None, added_roles: Optional[ Union[ - Iterable[models.UserRoleSpecification], - Iterable[models.UserRoleSpecificationTypedDict], + Iterable[models_userrolespecification.UserRoleSpecification], + Iterable[models_userrolespecification.UserRoleSpecificationTypedDict], ] ] = None, removed_roles: Optional[ Union[ - Iterable[models.UserRoleSpecification], - Iterable[models.UserRoleSpecificationTypedDict], + Iterable[models_userrolespecification.UserRoleSpecification], + Iterable[models_userrolespecification.UserRoleSpecificationTypedDict], ] ] = None, roles: Optional[ Union[ - Iterable[models.UserRoleSpecification], - Iterable[models.UserRoleSpecificationTypedDict], + Iterable[models_userrolespecification.UserRoleSpecification], + Iterable[models_userrolespecification.UserRoleSpecificationTypedDict], ] ] = None, source_document_spec: Optional[ - Union[models.DocumentSpecUnion, models.DocumentSpecUnionTypedDict] + Union[ + models_documentspec_union.DocumentSpecUnion, + models_documentspec_union.DocumentSpecUnionTypedDict, + ] + ] = None, + source_type: Optional[ + models_editanswerrequest.EditAnswerRequestSourceType ] = None, - source_type: Optional[models.EditAnswerRequestSourceType] = None, added_collections: Optional[Iterable[int]] = None, removed_collections: Optional[Iterable[int]] = None, combined_answer_text: Optional[ Union[ - models.StructuredTextMutableProperties, - models.StructuredTextMutablePropertiesTypedDict, + models_structuredtextmutableproperties.StructuredTextMutableProperties, + models_structuredtextmutableproperties.StructuredTextMutablePropertiesTypedDict, ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -624,36 +646,44 @@ async def update_async( body_text: Optional[str] = None, board_id: Optional[int] = None, audience_filters: Optional[ - Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] + Union[ + Iterable[models_facetfilter.FacetFilter], + Iterable[models_facetfilter.FacetFilterTypedDict], + ] ] = None, added_roles: Optional[ Union[ - Iterable[models.UserRoleSpecification], - Iterable[models.UserRoleSpecificationTypedDict], + Iterable[models_userrolespecification.UserRoleSpecification], + Iterable[models_userrolespecification.UserRoleSpecificationTypedDict], ] ] = None, removed_roles: Optional[ Union[ - Iterable[models.UserRoleSpecification], - Iterable[models.UserRoleSpecificationTypedDict], + Iterable[models_userrolespecification.UserRoleSpecification], + Iterable[models_userrolespecification.UserRoleSpecificationTypedDict], ] ] = None, roles: Optional[ Union[ - Iterable[models.UserRoleSpecification], - Iterable[models.UserRoleSpecificationTypedDict], + Iterable[models_userrolespecification.UserRoleSpecification], + Iterable[models_userrolespecification.UserRoleSpecificationTypedDict], ] ] = None, source_document_spec: Optional[ - Union[models.DocumentSpecUnion, models.DocumentSpecUnionTypedDict] + Union[ + models_documentspec_union.DocumentSpecUnion, + models_documentspec_union.DocumentSpecUnionTypedDict, + ] + ] = None, + source_type: Optional[ + models_editanswerrequest.EditAnswerRequestSourceType ] = None, - source_type: Optional[models.EditAnswerRequestSourceType] = None, added_collections: Optional[Iterable[int]] = None, removed_collections: Optional[Iterable[int]] = None, combined_answer_text: Optional[ Union[ - models.StructuredTextMutableProperties, - models.StructuredTextMutablePropertiesTypedDict, + models_structuredtextmutableproperties.StructuredTextMutableProperties, + models_structuredtextmutableproperties.StructuredTextMutablePropertiesTypedDict, ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, diff --git a/src/glean/api_client/chat_sdk.py b/src/glean/api_client/chat_sdk.py index d8e27e153..b64422a47 100644 --- a/src/glean/api_client/chat_sdk.py +++ b/src/glean/api_client/chat_sdk.py @@ -4,6 +4,11 @@ from .basesdk import BaseSDK from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import ( + platform_chat_create_streamop as models_platform_chat_create_streamop, + platform_chat_createop as models_platform_chat_createop, + platformreasoningeffort as models_platformreasoningeffort, +) from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import eventstreaming, get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -15,10 +20,15 @@ def create( self, *, input: Union[ - models.PlatformChatCreateInput, models.PlatformChatCreateInputTypedDict + models_platform_chat_createop.PlatformChatCreateInput, + models_platform_chat_createop.PlatformChatCreateInputTypedDict, ], store: Optional[bool] = True, conversation_id: Optional[str] = None, + model: Optional[str] = None, + reasoning_effort: Optional[ + models_platformreasoningeffort.PlatformReasoningEffort + ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -35,6 +45,10 @@ def create( :param conversation_id: Continue an existing stored conversation. Incompatible with message-array `input` and with `store: false`. + :param model: Model for this turn, matched exactly to an id from GET /api/models. When GET /api/models reports `endpoints.chat` for the model, `POST /api/chat` does not reject this value at `/model`, except across a deployment change. Other request checks still apply. The model is requested, not guaranteed: deployment configuration can still run the turn on a different model. + + :param reasoning_effort: Reasoning effort for this turn. Requires `model`. When omitted, the model's default effort applies. When GET /api/models lists this value in `endpoints.chat.reasoning_efforts` for the model, `POST /api/chat` does not reject it at `/reasoning_effort`, except across a deployment change. Other request checks still apply. + :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 @@ -54,6 +68,8 @@ def create( input=utils.get_pydantic_model(input, models.PlatformChatCreateInput), store=store, conversation_id=conversation_id, + model=model, + reasoning_effort=reasoning_effort, ) req = self._build_request( @@ -138,10 +154,15 @@ async def create_async( self, *, input: Union[ - models.PlatformChatCreateInput, models.PlatformChatCreateInputTypedDict + models_platform_chat_createop.PlatformChatCreateInput, + models_platform_chat_createop.PlatformChatCreateInputTypedDict, ], store: Optional[bool] = True, conversation_id: Optional[str] = None, + model: Optional[str] = None, + reasoning_effort: Optional[ + models_platformreasoningeffort.PlatformReasoningEffort + ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -158,6 +179,10 @@ async def create_async( :param conversation_id: Continue an existing stored conversation. Incompatible with message-array `input` and with `store: false`. + :param model: Model for this turn, matched exactly to an id from GET /api/models. When GET /api/models reports `endpoints.chat` for the model, `POST /api/chat` does not reject this value at `/model`, except across a deployment change. Other request checks still apply. The model is requested, not guaranteed: deployment configuration can still run the turn on a different model. + + :param reasoning_effort: Reasoning effort for this turn. Requires `model`. When omitted, the model's default effort applies. When GET /api/models lists this value in `endpoints.chat.reasoning_efforts` for the model, `POST /api/chat` does not reject it at `/reasoning_effort`, except across a deployment change. Other request checks still apply. + :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 @@ -177,6 +202,8 @@ async def create_async( input=utils.get_pydantic_model(input, models.PlatformChatCreateInput), store=store, conversation_id=conversation_id, + model=model, + reasoning_effort=reasoning_effort, ) req = self._build_request_async( @@ -949,11 +976,15 @@ def create_stream( self, *, input: Union[ - models.PlatformChatCreateStreamInput, - models.PlatformChatCreateStreamInputTypedDict, + models_platform_chat_create_streamop.PlatformChatCreateStreamInput, + models_platform_chat_create_streamop.PlatformChatCreateStreamInputTypedDict, ], store: Optional[bool] = True, conversation_id: Optional[str] = None, + model: Optional[str] = None, + reasoning_effort: Optional[ + models_platformreasoningeffort.PlatformReasoningEffort + ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -970,6 +1001,10 @@ def create_stream( :param conversation_id: Continue an existing stored conversation. Incompatible with message-array `input` and with `store: false`. + :param model: Model for this turn, matched exactly to an id from GET /api/models. When GET /api/models reports `endpoints.chat` for the model, `POST /api/chat` does not reject this value at `/model`, except across a deployment change. Other request checks still apply. The model is requested, not guaranteed: deployment configuration can still run the turn on a different model. + + :param reasoning_effort: Reasoning effort for this turn. Requires `model`. When omitted, the model's default effort applies. When GET /api/models lists this value in `endpoints.chat.reasoning_efforts` for the model, `POST /api/chat` does not reject it at `/reasoning_effort`, except across a deployment change. Other request checks still apply. + :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 @@ -989,6 +1024,8 @@ def create_stream( input=utils.get_pydantic_model(input, models.PlatformChatCreateStreamInput), store=store, conversation_id=conversation_id, + model=model, + reasoning_effort=reasoning_effort, ) req = self._build_request( @@ -1085,11 +1122,15 @@ async def create_stream_async( self, *, input: Union[ - models.PlatformChatCreateStreamInput, - models.PlatformChatCreateStreamInputTypedDict, + models_platform_chat_create_streamop.PlatformChatCreateStreamInput, + models_platform_chat_create_streamop.PlatformChatCreateStreamInputTypedDict, ], store: Optional[bool] = True, conversation_id: Optional[str] = None, + model: Optional[str] = None, + reasoning_effort: Optional[ + models_platformreasoningeffort.PlatformReasoningEffort + ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -1106,6 +1147,10 @@ async def create_stream_async( :param conversation_id: Continue an existing stored conversation. Incompatible with message-array `input` and with `store: false`. + :param model: Model for this turn, matched exactly to an id from GET /api/models. When GET /api/models reports `endpoints.chat` for the model, `POST /api/chat` does not reject this value at `/model`, except across a deployment change. Other request checks still apply. The model is requested, not guaranteed: deployment configuration can still run the turn on a different model. + + :param reasoning_effort: Reasoning effort for this turn. Requires `model`. When omitted, the model's default effort applies. When GET /api/models lists this value in `endpoints.chat.reasoning_efforts` for the model, `POST /api/chat` does not reject it at `/reasoning_effort`, except across a deployment change. Other request checks still apply. + :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 @@ -1125,6 +1170,8 @@ async def create_stream_async( input=utils.get_pydantic_model(input, models.PlatformChatCreateStreamInput), store=store, conversation_id=conversation_id, + model=model, + reasoning_effort=reasoning_effort, ) req = self._build_request_async( diff --git a/src/glean/api_client/client_activity.py b/src/glean/api_client/client_activity.py index e601c3f79..6ff3a9fad 100644 --- a/src/glean/api_client/client_activity.py +++ b/src/glean/api_client/client_activity.py @@ -4,6 +4,10 @@ from .basesdk import BaseSDK from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import ( + activityevent as models_activityevent, + feedback as models_feedback, +) from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from typing import Iterable, List, Mapping, Optional, Union @@ -14,7 +18,8 @@ def report( self, *, events: Union[ - Iterable[models.ActivityEvent], Iterable[models.ActivityEventTypedDict] + Iterable[models_activityevent.ActivityEvent], + Iterable[models_activityevent.ActivityEventTypedDict], ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -109,7 +114,8 @@ async def report_async( self, *, events: Union[ - Iterable[models.ActivityEvent], Iterable[models.ActivityEventTypedDict] + Iterable[models_activityevent.ActivityEvent], + Iterable[models_activityevent.ActivityEventTypedDict], ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -204,7 +210,9 @@ def feedback( self, *, feedback_query_parameter: Optional[str] = None, - feedback1: Optional[Union[models.Feedback, models.FeedbackTypedDict]] = None, + feedback1: Optional[ + Union[models_feedback.Feedback, models_feedback.FeedbackTypedDict] + ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -304,7 +312,9 @@ async def feedback_async( self, *, feedback_query_parameter: Optional[str] = None, - feedback1: Optional[Union[models.Feedback, models.FeedbackTypedDict]] = None, + feedback1: Optional[ + Union[models_feedback.Feedback, models_feedback.FeedbackTypedDict] + ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, diff --git a/src/glean/api_client/client_agents.py b/src/glean/api_client/client_agents.py index 3d53f7389..db01c875b 100644 --- a/src/glean/api_client/client_agents.py +++ b/src/glean/api_client/client_agents.py @@ -4,6 +4,11 @@ from .basesdk import BaseSDK from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import ( + importagentrequest as models_importagentrequest, + importagentsyncmode as models_importagentsyncmode, + message_input as models_message_input, +) from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -904,14 +909,18 @@ def import_( self, *, agent_id: str, - bundle: Union[models.Bundle, models.BundleTypedDict], + bundle: Union[ + models_importagentrequest.Bundle, models_importagentrequest.BundleTypedDict + ], locale: Optional[str] = None, timezone_offset: Optional[int] = None, git_commit_sha: Optional[str] = None, git_author_id: Optional[str] = None, commit_message: Optional[str] = None, - sync_mode: Optional[models.ImportAgentSyncMode] = None, - version_source: Optional[models.VersionSource] = models.VersionSource.USER, + sync_mode: Optional[models_importagentsyncmode.ImportAgentSyncMode] = None, + version_source: Optional[ + models_importagentrequest.VersionSource + ] = models.VersionSource.USER, published_baseline_hash: Optional[str] = None, is_draft: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1041,14 +1050,18 @@ async def import__async( self, *, agent_id: str, - bundle: Union[models.Bundle, models.BundleTypedDict], + bundle: Union[ + models_importagentrequest.Bundle, models_importagentrequest.BundleTypedDict + ], locale: Optional[str] = None, timezone_offset: Optional[int] = None, git_commit_sha: Optional[str] = None, git_author_id: Optional[str] = None, commit_message: Optional[str] = None, - sync_mode: Optional[models.ImportAgentSyncMode] = None, - version_source: Optional[models.VersionSource] = models.VersionSource.USER, + sync_mode: Optional[models_importagentsyncmode.ImportAgentSyncMode] = None, + version_source: Optional[ + models_importagentrequest.VersionSource + ] = models.VersionSource.USER, published_baseline_hash: Optional[str] = None, is_draft: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1397,7 +1410,10 @@ def run_stream( agent_id: str, input: Optional[Mapping[str, Any]] = None, messages: Optional[ - Union[Iterable[models.MessageInput], Iterable[models.MessageInputTypedDict]] + Union[ + Iterable[models_message_input.MessageInput], + Iterable[models_message_input.MessageInputTypedDict], + ] ] = None, metadata: Optional[Mapping[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1522,7 +1538,10 @@ async def run_stream_async( agent_id: str, input: Optional[Mapping[str, Any]] = None, messages: Optional[ - Union[Iterable[models.MessageInput], Iterable[models.MessageInputTypedDict]] + Union[ + Iterable[models_message_input.MessageInput], + Iterable[models_message_input.MessageInputTypedDict], + ] ] = None, metadata: Optional[Mapping[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1647,7 +1666,10 @@ def run( agent_id: str, input: Optional[Mapping[str, Any]] = None, messages: Optional[ - Union[Iterable[models.MessageInput], Iterable[models.MessageInputTypedDict]] + Union[ + Iterable[models_message_input.MessageInput], + Iterable[models_message_input.MessageInputTypedDict], + ] ] = None, metadata: Optional[Mapping[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1769,7 +1791,10 @@ async def run_async( agent_id: str, input: Optional[Mapping[str, Any]] = None, messages: Optional[ - Union[Iterable[models.MessageInput], Iterable[models.MessageInputTypedDict]] + Union[ + Iterable[models_message_input.MessageInput], + Iterable[models_message_input.MessageInputTypedDict], + ] ] = None, metadata: Optional[Mapping[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, diff --git a/src/glean/api_client/client_chat.py b/src/glean/api_client/client_chat.py index 3443c1117..4e0bd8a58 100644 --- a/src/glean/api_client/client_chat.py +++ b/src/glean/api_client/client_chat.py @@ -4,6 +4,13 @@ from .basesdk import BaseSDK from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import ( + agentconfig as models_agentconfig, + chatmessage as models_chatmessage, + chatrestrictionfilters as models_chatrestrictionfilters, + sessioninfo as models_sessioninfo, + uploadchatfilesrequest as models_uploadchatfilesrequest, +) from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -16,23 +23,34 @@ def create( self, *, messages: Union[ - Iterable[models.ChatMessage], Iterable[models.ChatMessageTypedDict] + Iterable[models_chatmessage.ChatMessage], + Iterable[models_chatmessage.ChatMessageTypedDict], ], locale: Optional[str] = None, timezone_offset: Optional[int] = None, session_info: Optional[ - Union[models.SessionInfo, models.SessionInfoTypedDict] + Union[ + models_sessioninfo.SessionInfo, models_sessioninfo.SessionInfoTypedDict + ] ] = None, save_chat: Optional[bool] = None, chat_id: Optional[str] = None, agent_config: Optional[ - Union[models.AgentConfig, models.AgentConfigTypedDict] + Union[ + models_agentconfig.AgentConfig, models_agentconfig.AgentConfigTypedDict + ] ] = None, inclusions: Optional[ - Union[models.ChatRestrictionFilters, models.ChatRestrictionFiltersTypedDict] + Union[ + models_chatrestrictionfilters.ChatRestrictionFilters, + models_chatrestrictionfilters.ChatRestrictionFiltersTypedDict, + ] ] = None, exclusions: Optional[ - Union[models.ChatRestrictionFilters, models.ChatRestrictionFiltersTypedDict] + Union[ + models_chatrestrictionfilters.ChatRestrictionFilters, + models_chatrestrictionfilters.ChatRestrictionFiltersTypedDict, + ] ] = None, timeout_millis: Optional[int] = None, application_id: Optional[str] = None, @@ -165,23 +183,34 @@ async def create_async( self, *, messages: Union[ - Iterable[models.ChatMessage], Iterable[models.ChatMessageTypedDict] + Iterable[models_chatmessage.ChatMessage], + Iterable[models_chatmessage.ChatMessageTypedDict], ], locale: Optional[str] = None, timezone_offset: Optional[int] = None, session_info: Optional[ - Union[models.SessionInfo, models.SessionInfoTypedDict] + Union[ + models_sessioninfo.SessionInfo, models_sessioninfo.SessionInfoTypedDict + ] ] = None, save_chat: Optional[bool] = None, chat_id: Optional[str] = None, agent_config: Optional[ - Union[models.AgentConfig, models.AgentConfigTypedDict] + Union[ + models_agentconfig.AgentConfig, models_agentconfig.AgentConfigTypedDict + ] ] = None, inclusions: Optional[ - Union[models.ChatRestrictionFilters, models.ChatRestrictionFiltersTypedDict] + Union[ + models_chatrestrictionfilters.ChatRestrictionFilters, + models_chatrestrictionfilters.ChatRestrictionFiltersTypedDict, + ] ] = None, exclusions: Optional[ - Union[models.ChatRestrictionFilters, models.ChatRestrictionFiltersTypedDict] + Union[ + models_chatrestrictionfilters.ChatRestrictionFilters, + models_chatrestrictionfilters.ChatRestrictionFiltersTypedDict, + ] ] = None, timeout_millis: Optional[int] = None, application_id: Optional[str] = None, @@ -1348,8 +1377,8 @@ def upload_files( self, *, files: Union[ - Iterable[models.UploadChatFilesRequestFile], - Iterable[models.UploadChatFilesRequestFileTypedDict], + Iterable[models_uploadchatfilesrequest.UploadChatFilesRequestFile], + Iterable[models_uploadchatfilesrequest.UploadChatFilesRequestFileTypedDict], ], locale: Optional[str] = None, timezone_offset: Optional[int] = None, @@ -1457,8 +1486,8 @@ async def upload_files_async( self, *, files: Union[ - Iterable[models.UploadChatFilesRequestFile], - Iterable[models.UploadChatFilesRequestFileTypedDict], + Iterable[models_uploadchatfilesrequest.UploadChatFilesRequestFile], + Iterable[models_uploadchatfilesrequest.UploadChatFilesRequestFileTypedDict], ], locale: Optional[str] = None, timezone_offset: Optional[int] = None, @@ -2170,26 +2199,221 @@ async def retrieve_file_async( http_res_text = await utils.stream_to_text_async(http_res) raise errors.GleanError("Unexpected response received", http_res, http_res_text) + def retrieve_image( + self, + *, + key: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> httpx.Response: + r"""Download a document image + + Download an image from an indexed document, such as an image linked in a chat response. Chat responses link these images as `/api/v1/images?key=`; pass the same key here. Returns the image bytes with a Content-Type header matching the image format. Only document images are supported, and the caller must have access to the source document. + + + :param key: Image key from the image URL in a chat response. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetImageRequest( + key=key, + ) + + req = self._build_request( + method="GET", + path="/rest/api/v1/images", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="image/*", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="getImage", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Chat"], + extensions={ + "x-glean-release": {"stage": "ga"}, + "x-visibility": "Public", + }, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + stream=True, + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "image/*"): + return http_res + if utils.match_response(http_res, ["400", "401", "403", "404", "4XX"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, ["500", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("Unexpected response received", http_res, http_res_text) + + async def retrieve_image_async( + self, + *, + key: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> httpx.Response: + r"""Download a document image + + Download an image from an indexed document, such as an image linked in a chat response. Chat responses link these images as `/api/v1/images?key=`; pass the same key here. Returns the image bytes with a Content-Type header matching the image format. Only document images are supported, and the caller must have access to the source document. + + + :param key: Image key from the image URL in a chat response. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetImageRequest( + key=key, + ) + + req = self._build_request_async( + method="GET", + path="/rest/api/v1/images", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="image/*", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="getImage", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Chat"], + extensions={ + "x-glean-release": {"stage": "ga"}, + "x-visibility": "Public", + }, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + stream=True, + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "image/*"): + return http_res + if utils.match_response(http_res, ["400", "401", "403", "404", "4XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, ["500", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("Unexpected response received", http_res, http_res_text) + def create_stream( self, *, messages: Union[ - Iterable[models.ChatMessage], Iterable[models.ChatMessageTypedDict] + Iterable[models_chatmessage.ChatMessage], + Iterable[models_chatmessage.ChatMessageTypedDict], ], timezone_offset: Optional[int] = None, session_info: Optional[ - Union[models.SessionInfo, models.SessionInfoTypedDict] + Union[ + models_sessioninfo.SessionInfo, models_sessioninfo.SessionInfoTypedDict + ] ] = None, save_chat: Optional[bool] = None, chat_id: Optional[str] = None, agent_config: Optional[ - Union[models.AgentConfig, models.AgentConfigTypedDict] + Union[ + models_agentconfig.AgentConfig, models_agentconfig.AgentConfigTypedDict + ] ] = None, inclusions: Optional[ - Union[models.ChatRestrictionFilters, models.ChatRestrictionFiltersTypedDict] + Union[ + models_chatrestrictionfilters.ChatRestrictionFilters, + models_chatrestrictionfilters.ChatRestrictionFiltersTypedDict, + ] ] = None, exclusions: Optional[ - Union[models.ChatRestrictionFilters, models.ChatRestrictionFiltersTypedDict] + Union[ + models_chatrestrictionfilters.ChatRestrictionFilters, + models_chatrestrictionfilters.ChatRestrictionFiltersTypedDict, + ] ] = None, timeout_millis: Optional[int] = None, application_id: Optional[str] = None, @@ -2319,22 +2543,33 @@ async def create_stream_async( self, *, messages: Union[ - Iterable[models.ChatMessage], Iterable[models.ChatMessageTypedDict] + Iterable[models_chatmessage.ChatMessage], + Iterable[models_chatmessage.ChatMessageTypedDict], ], timezone_offset: Optional[int] = None, session_info: Optional[ - Union[models.SessionInfo, models.SessionInfoTypedDict] + Union[ + models_sessioninfo.SessionInfo, models_sessioninfo.SessionInfoTypedDict + ] ] = None, save_chat: Optional[bool] = None, chat_id: Optional[str] = None, agent_config: Optional[ - Union[models.AgentConfig, models.AgentConfigTypedDict] + Union[ + models_agentconfig.AgentConfig, models_agentconfig.AgentConfigTypedDict + ] ] = None, inclusions: Optional[ - Union[models.ChatRestrictionFilters, models.ChatRestrictionFiltersTypedDict] + Union[ + models_chatrestrictionfilters.ChatRestrictionFilters, + models_chatrestrictionfilters.ChatRestrictionFiltersTypedDict, + ] ] = None, exclusions: Optional[ - Union[models.ChatRestrictionFilters, models.ChatRestrictionFiltersTypedDict] + Union[ + models_chatrestrictionfilters.ChatRestrictionFilters, + models_chatrestrictionfilters.ChatRestrictionFiltersTypedDict, + ] ] = None, timeout_millis: Optional[int] = None, application_id: Optional[str] = None, diff --git a/src/glean/api_client/client_datasources.py b/src/glean/api_client/client_datasources.py index 2c083ce2c..f9b66ac93 100644 --- a/src/glean/api_client/client_datasources.py +++ b/src/glean/api_client/client_datasources.py @@ -4,6 +4,9 @@ from .basesdk import BaseSDK from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import ( + datasourceinstanceconfiguration as models_datasourceinstanceconfiguration, +) from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -215,8 +218,8 @@ def update_configuration( datasource_id: str, instance_id: str, configuration: Union[ - models.DatasourceInstanceConfiguration, - models.DatasourceInstanceConfigurationTypedDict, + models_datasourceinstanceconfiguration.DatasourceInstanceConfiguration, + models_datasourceinstanceconfiguration.DatasourceInstanceConfigurationTypedDict, ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -331,8 +334,8 @@ async def update_configuration_async( datasource_id: str, instance_id: str, configuration: Union[ - models.DatasourceInstanceConfiguration, - models.DatasourceInstanceConfigurationTypedDict, + models_datasourceinstanceconfiguration.DatasourceInstanceConfiguration, + models_datasourceinstanceconfiguration.DatasourceInstanceConfigurationTypedDict, ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -638,8 +641,8 @@ def rotate_credentials( *, datasource_instance_id: str, credentials: Union[ - models.DatasourceInstanceConfiguration, - models.DatasourceInstanceConfigurationTypedDict, + models_datasourceinstanceconfiguration.DatasourceInstanceConfiguration, + models_datasourceinstanceconfiguration.DatasourceInstanceConfigurationTypedDict, ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -752,8 +755,8 @@ async def rotate_credentials_async( *, datasource_instance_id: str, credentials: Union[ - models.DatasourceInstanceConfiguration, - models.DatasourceInstanceConfigurationTypedDict, + models_datasourceinstanceconfiguration.DatasourceInstanceConfiguration, + models_datasourceinstanceconfiguration.DatasourceInstanceConfigurationTypedDict, ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, diff --git a/src/glean/api_client/client_documents.py b/src/glean/api_client/client_documents.py index a46828955..2299e86f9 100644 --- a/src/glean/api_client/client_documents.py +++ b/src/glean/api_client/client_documents.py @@ -5,6 +5,11 @@ from datetime import datetime from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import ( + documentspec_union as models_documentspec_union, + getdocumentsbyfacetsrequest as models_getdocumentsbyfacetsrequest, + getdocumentsrequest as models_getdocumentsrequest, +) from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -221,7 +226,10 @@ def retrieve( *, locale: Optional[str] = None, get_documents_request: Optional[ - Union[models.GetDocumentsRequest, models.GetDocumentsRequestTypedDict] + Union[ + models_getdocumentsrequest.GetDocumentsRequest, + models_getdocumentsrequest.GetDocumentsRequestTypedDict, + ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -325,7 +333,10 @@ async def retrieve_async( *, locale: Optional[str] = None, get_documents_request: Optional[ - Union[models.GetDocumentsRequest, models.GetDocumentsRequestTypedDict] + Union[ + models_getdocumentsrequest.GetDocumentsRequest, + models_getdocumentsrequest.GetDocumentsRequestTypedDict, + ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -430,8 +441,8 @@ def retrieve_by_facets( locale: Optional[str] = None, get_documents_by_facets_request: Optional[ Union[ - models.GetDocumentsByFacetsRequest, - models.GetDocumentsByFacetsRequestTypedDict, + models_getdocumentsbyfacetsrequest.GetDocumentsByFacetsRequest, + models_getdocumentsbyfacetsrequest.GetDocumentsByFacetsRequestTypedDict, ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -542,8 +553,8 @@ async def retrieve_by_facets_async( locale: Optional[str] = None, get_documents_by_facets_request: Optional[ Union[ - models.GetDocumentsByFacetsRequest, - models.GetDocumentsByFacetsRequestTypedDict, + models_getdocumentsbyfacetsrequest.GetDocumentsByFacetsRequest, + models_getdocumentsbyfacetsrequest.GetDocumentsByFacetsRequestTypedDict, ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -652,8 +663,8 @@ def summarize( self, *, document_specs: Union[ - Iterable[models.DocumentSpecUnion], - Iterable[models.DocumentSpecUnionTypedDict], + Iterable[models_documentspec_union.DocumentSpecUnion], + Iterable[models_documentspec_union.DocumentSpecUnionTypedDict], ], locale: Optional[str] = None, timestamp: Optional[datetime] = None, @@ -767,8 +778,8 @@ async def summarize_async( self, *, document_specs: Union[ - Iterable[models.DocumentSpecUnion], - Iterable[models.DocumentSpecUnionTypedDict], + Iterable[models_documentspec_union.DocumentSpecUnion], + Iterable[models_documentspec_union.DocumentSpecUnionTypedDict], ], locale: Optional[str] = None, timestamp: Optional[datetime] = None, diff --git a/src/glean/api_client/client_search.py b/src/glean/api_client/client_search.py index 177d97a60..ec65a658e 100644 --- a/src/glean/api_client/client_search.py +++ b/src/glean/api_client/client_search.py @@ -5,6 +5,18 @@ from datetime import datetime from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import ( + authtoken as models_authtoken, + autocompleterequest as models_autocompleterequest, + document as models_document, + documentspec_union as models_documentspec_union, + feedrequest as models_feedrequest, + feedrequestoptions as models_feedrequestoptions, + recommendationsrequestoptions as models_recommendationsrequestoptions, + searchrequestinputdetails as models_searchrequestinputdetails, + searchrequestoptions as models_searchrequestoptions, + sessioninfo as models_sessioninfo, +) from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -20,10 +32,12 @@ def query_as_admin( timestamp: Optional[datetime] = None, tracking_token: Optional[str] = None, session_info: Optional[ - Union[models.SessionInfo, models.SessionInfoTypedDict] + Union[ + models_sessioninfo.SessionInfo, models_sessioninfo.SessionInfoTypedDict + ] ] = None, source_document: Optional[ - Union[models.Document, models.DocumentTypedDict] + Union[models_document.Document, models_document.DocumentTypedDict] ] = None, page_size: Optional[int] = None, max_snippet_size: Optional[int] = None, @@ -31,12 +45,15 @@ def query_as_admin( result_tab_ids: Optional[Iterable[str]] = None, input_details: Optional[ Union[ - models.SearchRequestInputDetails, - models.SearchRequestInputDetailsTypedDict, + models_searchrequestinputdetails.SearchRequestInputDetails, + models_searchrequestinputdetails.SearchRequestInputDetailsTypedDict, ] ] = None, request_options: Optional[ - Union[models.SearchRequestOptions, models.SearchRequestOptionsTypedDict] + Union[ + models_searchrequestoptions.SearchRequestOptions, + models_searchrequestoptions.SearchRequestOptionsTypedDict, + ] ] = None, timeout_millis: Optional[int] = None, disable_spellcheck: Optional[bool] = None, @@ -177,10 +194,12 @@ async def query_as_admin_async( timestamp: Optional[datetime] = None, tracking_token: Optional[str] = None, session_info: Optional[ - Union[models.SessionInfo, models.SessionInfoTypedDict] + Union[ + models_sessioninfo.SessionInfo, models_sessioninfo.SessionInfoTypedDict + ] ] = None, source_document: Optional[ - Union[models.Document, models.DocumentTypedDict] + Union[models_document.Document, models_document.DocumentTypedDict] ] = None, page_size: Optional[int] = None, max_snippet_size: Optional[int] = None, @@ -188,12 +207,15 @@ async def query_as_admin_async( result_tab_ids: Optional[Iterable[str]] = None, input_details: Optional[ Union[ - models.SearchRequestInputDetails, - models.SearchRequestInputDetailsTypedDict, + models_searchrequestinputdetails.SearchRequestInputDetails, + models_searchrequestinputdetails.SearchRequestInputDetailsTypedDict, ] ] = None, request_options: Optional[ - Union[models.SearchRequestOptions, models.SearchRequestOptionsTypedDict] + Union[ + models_searchrequestoptions.SearchRequestOptions, + models_searchrequestoptions.SearchRequestOptionsTypedDict, + ] ] = None, timeout_millis: Optional[int] = None, disable_spellcheck: Optional[bool] = None, @@ -332,15 +354,22 @@ def autocomplete( locale: Optional[str] = None, tracking_token: Optional[str] = None, session_info: Optional[ - Union[models.SessionInfo, models.SessionInfoTypedDict] + Union[ + models_sessioninfo.SessionInfo, models_sessioninfo.SessionInfoTypedDict + ] ] = None, query: Optional[str] = None, datasources_filter: Optional[Iterable[str]] = None, datasource: Optional[str] = None, - result_types: Optional[Iterable[models.AutocompleteRequestResultType]] = None, + result_types: Optional[ + Iterable[models_autocompleterequest.AutocompleteRequestResultType] + ] = None, result_size: Optional[int] = None, auth_tokens: Optional[ - Union[Iterable[models.AuthToken], Iterable[models.AuthTokenTypedDict]] + Union[ + Iterable[models_authtoken.AuthToken], + Iterable[models_authtoken.AuthTokenTypedDict], + ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -467,15 +496,22 @@ async def autocomplete_async( locale: Optional[str] = None, tracking_token: Optional[str] = None, session_info: Optional[ - Union[models.SessionInfo, models.SessionInfoTypedDict] + Union[ + models_sessioninfo.SessionInfo, models_sessioninfo.SessionInfoTypedDict + ] ] = None, query: Optional[str] = None, datasources_filter: Optional[Iterable[str]] = None, datasource: Optional[str] = None, - result_types: Optional[Iterable[models.AutocompleteRequestResultType]] = None, + result_types: Optional[ + Iterable[models_autocompleterequest.AutocompleteRequestResultType] + ] = None, result_size: Optional[int] = None, auth_tokens: Optional[ - Union[Iterable[models.AuthToken], Iterable[models.AuthTokenTypedDict]] + Union[ + Iterable[models_authtoken.AuthToken], + Iterable[models_authtoken.AuthTokenTypedDict], + ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -600,13 +636,18 @@ def retrieve_feed( self, *, locale: Optional[str] = None, - categories: Optional[Iterable[models.FeedRequestCategory]] = None, + categories: Optional[Iterable[models_feedrequest.FeedRequestCategory]] = None, request_options: Optional[ - Union[models.FeedRequestOptions, models.FeedRequestOptionsTypedDict] + Union[ + models_feedrequestoptions.FeedRequestOptions, + models_feedrequestoptions.FeedRequestOptionsTypedDict, + ] ] = None, timeout_millis: Optional[int] = None, session_info: Optional[ - Union[models.SessionInfo, models.SessionInfoTypedDict] + Union[ + models_sessioninfo.SessionInfo, models_sessioninfo.SessionInfoTypedDict + ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -717,13 +758,18 @@ async def retrieve_feed_async( self, *, locale: Optional[str] = None, - categories: Optional[Iterable[models.FeedRequestCategory]] = None, + categories: Optional[Iterable[models_feedrequest.FeedRequestCategory]] = None, request_options: Optional[ - Union[models.FeedRequestOptions, models.FeedRequestOptionsTypedDict] + Union[ + models_feedrequestoptions.FeedRequestOptions, + models_feedrequestoptions.FeedRequestOptionsTypedDict, + ] ] = None, timeout_millis: Optional[int] = None, session_info: Optional[ - Union[models.SessionInfo, models.SessionInfoTypedDict] + Union[ + models_sessioninfo.SessionInfo, models_sessioninfo.SessionInfoTypedDict + ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -837,20 +883,25 @@ def recommendations( timestamp: Optional[datetime] = None, tracking_token: Optional[str] = None, session_info: Optional[ - Union[models.SessionInfo, models.SessionInfoTypedDict] + Union[ + models_sessioninfo.SessionInfo, models_sessioninfo.SessionInfoTypedDict + ] ] = None, source_document: Optional[ - Union[models.Document, models.DocumentTypedDict] + Union[models_document.Document, models_document.DocumentTypedDict] ] = None, page_size: Optional[int] = None, max_snippet_size: Optional[int] = None, recommendation_document_spec: Optional[ - Union[models.DocumentSpecUnion, models.DocumentSpecUnionTypedDict] + Union[ + models_documentspec_union.DocumentSpecUnion, + models_documentspec_union.DocumentSpecUnionTypedDict, + ] ] = None, request_options: Optional[ Union[ - models.RecommendationsRequestOptions, - models.RecommendationsRequestOptionsTypedDict, + models_recommendationsrequestoptions.RecommendationsRequestOptions, + models_recommendationsrequestoptions.RecommendationsRequestOptionsTypedDict, ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -981,20 +1032,25 @@ async def recommendations_async( timestamp: Optional[datetime] = None, tracking_token: Optional[str] = None, session_info: Optional[ - Union[models.SessionInfo, models.SessionInfoTypedDict] + Union[ + models_sessioninfo.SessionInfo, models_sessioninfo.SessionInfoTypedDict + ] ] = None, source_document: Optional[ - Union[models.Document, models.DocumentTypedDict] + Union[models_document.Document, models_document.DocumentTypedDict] ] = None, page_size: Optional[int] = None, max_snippet_size: Optional[int] = None, recommendation_document_spec: Optional[ - Union[models.DocumentSpecUnion, models.DocumentSpecUnionTypedDict] + Union[ + models_documentspec_union.DocumentSpecUnion, + models_documentspec_union.DocumentSpecUnionTypedDict, + ] ] = None, request_options: Optional[ Union[ - models.RecommendationsRequestOptions, - models.RecommendationsRequestOptionsTypedDict, + models_recommendationsrequestoptions.RecommendationsRequestOptions, + models_recommendationsrequestoptions.RecommendationsRequestOptionsTypedDict, ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1126,10 +1182,12 @@ def query( timestamp: Optional[datetime] = None, tracking_token: Optional[str] = None, session_info: Optional[ - Union[models.SessionInfo, models.SessionInfoTypedDict] + Union[ + models_sessioninfo.SessionInfo, models_sessioninfo.SessionInfoTypedDict + ] ] = None, source_document: Optional[ - Union[models.Document, models.DocumentTypedDict] + Union[models_document.Document, models_document.DocumentTypedDict] ] = None, page_size: Optional[int] = None, max_snippet_size: Optional[int] = None, @@ -1137,12 +1195,15 @@ def query( result_tab_ids: Optional[Iterable[str]] = None, input_details: Optional[ Union[ - models.SearchRequestInputDetails, - models.SearchRequestInputDetailsTypedDict, + models_searchrequestinputdetails.SearchRequestInputDetails, + models_searchrequestinputdetails.SearchRequestInputDetailsTypedDict, ] ] = None, request_options: Optional[ - Union[models.SearchRequestOptions, models.SearchRequestOptionsTypedDict] + Union[ + models_searchrequestoptions.SearchRequestOptions, + models_searchrequestoptions.SearchRequestOptionsTypedDict, + ] ] = None, timeout_millis: Optional[int] = None, disable_spellcheck: Optional[bool] = None, @@ -1283,10 +1344,12 @@ async def query_async( timestamp: Optional[datetime] = None, tracking_token: Optional[str] = None, session_info: Optional[ - Union[models.SessionInfo, models.SessionInfoTypedDict] + Union[ + models_sessioninfo.SessionInfo, models_sessioninfo.SessionInfoTypedDict + ] ] = None, source_document: Optional[ - Union[models.Document, models.DocumentTypedDict] + Union[models_document.Document, models_document.DocumentTypedDict] ] = None, page_size: Optional[int] = None, max_snippet_size: Optional[int] = None, @@ -1294,12 +1357,15 @@ async def query_async( result_tab_ids: Optional[Iterable[str]] = None, input_details: Optional[ Union[ - models.SearchRequestInputDetails, - models.SearchRequestInputDetailsTypedDict, + models_searchrequestinputdetails.SearchRequestInputDetails, + models_searchrequestinputdetails.SearchRequestInputDetailsTypedDict, ] ] = None, request_options: Optional[ - Union[models.SearchRequestOptions, models.SearchRequestOptionsTypedDict] + Union[ + models_searchrequestoptions.SearchRequestOptions, + models_searchrequestoptions.SearchRequestOptionsTypedDict, + ] ] = None, timeout_millis: Optional[int] = None, disable_spellcheck: Optional[bool] = None, diff --git a/src/glean/api_client/client_shortcuts.py b/src/glean/api_client/client_shortcuts.py index 727b8570b..4bf3de66b 100644 --- a/src/glean/api_client/client_shortcuts.py +++ b/src/glean/api_client/client_shortcuts.py @@ -4,6 +4,14 @@ from .basesdk import BaseSDK from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import ( + facetfilter as models_facetfilter, + getshortcutrequest as models_getshortcutrequest, + listshortcutspaginatedrequest as models_listshortcutspaginatedrequest, + shortcutmutableproperties as models_shortcutmutableproperties, + sortoptions as models_sortoptions, + userrolespecification as models_userrolespecification, +) from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -15,7 +23,8 @@ def create( self, *, data: Union[ - models.ShortcutMutableProperties, models.ShortcutMutablePropertiesTypedDict + models_shortcutmutableproperties.ShortcutMutableProperties, + models_shortcutmutableproperties.ShortcutMutablePropertiesTypedDict, ], locale: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -119,7 +128,8 @@ async def create_async( self, *, data: Union[ - models.ShortcutMutableProperties, models.ShortcutMutablePropertiesTypedDict + models_shortcutmutableproperties.ShortcutMutableProperties, + models_shortcutmutableproperties.ShortcutMutablePropertiesTypedDict, ], locale: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -427,7 +437,8 @@ def retrieve( self, *, get_shortcut_request: Union[ - models.GetShortcutRequest, models.GetShortcutRequestTypedDict + models_getshortcutrequest.GetShortcutRequest, + models_getshortcutrequest.GetShortcutRequestTypedDict, ], locale: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -531,7 +542,8 @@ async def retrieve_async( self, *, get_shortcut_request: Union[ - models.GetShortcutRequest, models.GetShortcutRequestTypedDict + models_getshortcutrequest.GetShortcutRequest, + models_getshortcutrequest.GetShortcutRequestTypedDict, ], locale: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -637,13 +649,22 @@ def list( page_size: int, locale: Optional[str] = None, include_fields: Optional[ - Iterable[models.ListShortcutsPaginatedRequestIncludeField] + Iterable[ + models_listshortcutspaginatedrequest.ListShortcutsPaginatedRequestIncludeField + ] ] = None, cursor: Optional[str] = None, filters: Optional[ - Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] + Union[ + Iterable[models_facetfilter.FacetFilter], + Iterable[models_facetfilter.FacetFilterTypedDict], + ] + ] = None, + sort: Optional[ + Union[ + models_sortoptions.SortOptions, models_sortoptions.SortOptionsTypedDict + ] ] = None, - sort: Optional[Union[models.SortOptions, models.SortOptionsTypedDict]] = None, query: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -765,13 +786,22 @@ async def list_async( page_size: int, locale: Optional[str] = None, include_fields: Optional[ - Iterable[models.ListShortcutsPaginatedRequestIncludeField] + Iterable[ + models_listshortcutspaginatedrequest.ListShortcutsPaginatedRequestIncludeField + ] ] = None, cursor: Optional[str] = None, filters: Optional[ - Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] + Union[ + Iterable[models_facetfilter.FacetFilter], + Iterable[models_facetfilter.FacetFilterTypedDict], + ] + ] = None, + sort: Optional[ + Union[ + models_sortoptions.SortOptions, models_sortoptions.SortOptionsTypedDict + ] ] = None, - sort: Optional[Union[models.SortOptions, models.SortOptionsTypedDict]] = None, query: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -900,14 +930,14 @@ def update( url_template: Optional[str] = None, added_roles: Optional[ Union[ - Iterable[models.UserRoleSpecification], - Iterable[models.UserRoleSpecificationTypedDict], + Iterable[models_userrolespecification.UserRoleSpecification], + Iterable[models_userrolespecification.UserRoleSpecificationTypedDict], ] ] = None, removed_roles: Optional[ Union[ - Iterable[models.UserRoleSpecification], - Iterable[models.UserRoleSpecificationTypedDict], + Iterable[models_userrolespecification.UserRoleSpecification], + Iterable[models_userrolespecification.UserRoleSpecificationTypedDict], ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1040,14 +1070,14 @@ async def update_async( url_template: Optional[str] = None, added_roles: Optional[ Union[ - Iterable[models.UserRoleSpecification], - Iterable[models.UserRoleSpecificationTypedDict], + Iterable[models_userrolespecification.UserRoleSpecification], + Iterable[models_userrolespecification.UserRoleSpecificationTypedDict], ] ] = None, removed_roles: Optional[ Union[ - Iterable[models.UserRoleSpecification], - Iterable[models.UserRoleSpecificationTypedDict], + Iterable[models_userrolespecification.UserRoleSpecification], + Iterable[models_userrolespecification.UserRoleSpecificationTypedDict], ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, diff --git a/src/glean/api_client/client_verification.py b/src/glean/api_client/client_verification.py index 8a31ae72c..a32adc434 100644 --- a/src/glean/api_client/client_verification.py +++ b/src/glean/api_client/client_verification.py @@ -4,6 +4,7 @@ from .basesdk import BaseSDK from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import verifyrequest as models_verifyrequest from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -416,7 +417,7 @@ def verify( *, document_id: str, locale: Optional[str] = None, - action: Optional[models.VerifyRequestAction] = None, + action: Optional[models_verifyrequest.VerifyRequestAction] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -517,7 +518,7 @@ async def verify_async( *, document_id: str, locale: Optional[str] = None, - action: Optional[models.VerifyRequestAction] = None, + action: Optional[models_verifyrequest.VerifyRequestAction] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, diff --git a/src/glean/api_client/clients.py b/src/glean/api_client/clients.py index b2b6cc719..11cc3ed79 100644 --- a/src/glean/api_client/clients.py +++ b/src/glean/api_client/clients.py @@ -4,6 +4,9 @@ from .basesdk import BaseSDK from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import ( + platformoauthclientfilter as models_platformoauthclientfilter, +) from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -18,8 +21,10 @@ def list( cursor: Optional[str] = None, filters: Optional[ Union[ - Iterable[models.PlatformOAuthClientFilter], - Iterable[models.PlatformOAuthClientFilterTypedDict], + Iterable[models_platformoauthclientfilter.PlatformOAuthClientFilter], + Iterable[ + models_platformoauthclientfilter.PlatformOAuthClientFilterTypedDict + ], ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -144,8 +149,10 @@ async def list_async( cursor: Optional[str] = None, filters: Optional[ Union[ - Iterable[models.PlatformOAuthClientFilter], - Iterable[models.PlatformOAuthClientFilterTypedDict], + Iterable[models_platformoauthclientfilter.PlatformOAuthClientFilter], + Iterable[ + models_platformoauthclientfilter.PlatformOAuthClientFilterTypedDict + ], ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, diff --git a/src/glean/api_client/collections.py b/src/glean/api_client/collections.py index 422d978f5..ee64a0d06 100644 --- a/src/glean/api_client/collections.py +++ b/src/glean/api_client/collections.py @@ -4,6 +4,12 @@ from .basesdk import BaseSDK from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import ( + collectionitemdescriptor as models_collectionitemdescriptor, + facetfilter as models_facetfilter, + thumbnail as models_thumbnail, + userrolespecification as models_userrolespecification, +) from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -18,8 +24,10 @@ def add_items( locale: Optional[str] = None, added_collection_item_descriptors: Optional[ Union[ - Iterable[models.CollectionItemDescriptor], - Iterable[models.CollectionItemDescriptorTypedDict], + Iterable[models_collectionitemdescriptor.CollectionItemDescriptor], + Iterable[ + models_collectionitemdescriptor.CollectionItemDescriptorTypedDict + ], ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -131,8 +139,10 @@ async def add_items_async( locale: Optional[str] = None, added_collection_item_descriptors: Optional[ Union[ - Iterable[models.CollectionItemDescriptor], - Iterable[models.CollectionItemDescriptorTypedDict], + Iterable[models_collectionitemdescriptor.CollectionItemDescriptor], + Iterable[ + models_collectionitemdescriptor.CollectionItemDescriptorTypedDict + ], ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -245,23 +255,28 @@ def create( description: Optional[str] = None, added_roles: Optional[ Union[ - Iterable[models.UserRoleSpecification], - Iterable[models.UserRoleSpecificationTypedDict], + Iterable[models_userrolespecification.UserRoleSpecification], + Iterable[models_userrolespecification.UserRoleSpecificationTypedDict], ] ] = None, removed_roles: Optional[ Union[ - Iterable[models.UserRoleSpecification], - Iterable[models.UserRoleSpecificationTypedDict], + Iterable[models_userrolespecification.UserRoleSpecification], + Iterable[models_userrolespecification.UserRoleSpecificationTypedDict], ] ] = None, audience_filters: Optional[ - Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] + Union[ + Iterable[models_facetfilter.FacetFilter], + Iterable[models_facetfilter.FacetFilterTypedDict], + ] ] = None, icon: Optional[str] = None, admin_locked: Optional[bool] = None, parent_id: Optional[int] = None, - thumbnail: Optional[Union[models.Thumbnail, models.ThumbnailTypedDict]] = None, + thumbnail: Optional[ + Union[models_thumbnail.Thumbnail, models_thumbnail.ThumbnailTypedDict] + ] = None, allowed_datasource: Optional[str] = None, new_next_item_id: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -403,23 +418,28 @@ async def create_async( description: Optional[str] = None, added_roles: Optional[ Union[ - Iterable[models.UserRoleSpecification], - Iterable[models.UserRoleSpecificationTypedDict], + Iterable[models_userrolespecification.UserRoleSpecification], + Iterable[models_userrolespecification.UserRoleSpecificationTypedDict], ] ] = None, removed_roles: Optional[ Union[ - Iterable[models.UserRoleSpecification], - Iterable[models.UserRoleSpecificationTypedDict], + Iterable[models_userrolespecification.UserRoleSpecification], + Iterable[models_userrolespecification.UserRoleSpecificationTypedDict], ] ] = None, audience_filters: Optional[ - Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] + Union[ + Iterable[models_facetfilter.FacetFilter], + Iterable[models_facetfilter.FacetFilterTypedDict], + ] ] = None, icon: Optional[str] = None, admin_locked: Optional[bool] = None, parent_id: Optional[int] = None, - thumbnail: Optional[Union[models.Thumbnail, models.ThumbnailTypedDict]] = None, + thumbnail: Optional[ + Union[models_thumbnail.Thumbnail, models_thumbnail.ThumbnailTypedDict] + ] = None, allowed_datasource: Optional[str] = None, new_next_item_id: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1004,23 +1024,28 @@ def update( description: Optional[str] = None, added_roles: Optional[ Union[ - Iterable[models.UserRoleSpecification], - Iterable[models.UserRoleSpecificationTypedDict], + Iterable[models_userrolespecification.UserRoleSpecification], + Iterable[models_userrolespecification.UserRoleSpecificationTypedDict], ] ] = None, removed_roles: Optional[ Union[ - Iterable[models.UserRoleSpecification], - Iterable[models.UserRoleSpecificationTypedDict], + Iterable[models_userrolespecification.UserRoleSpecification], + Iterable[models_userrolespecification.UserRoleSpecificationTypedDict], ] ] = None, audience_filters: Optional[ - Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] + Union[ + Iterable[models_facetfilter.FacetFilter], + Iterable[models_facetfilter.FacetFilterTypedDict], + ] ] = None, icon: Optional[str] = None, admin_locked: Optional[bool] = None, parent_id: Optional[int] = None, - thumbnail: Optional[Union[models.Thumbnail, models.ThumbnailTypedDict]] = None, + thumbnail: Optional[ + Union[models_thumbnail.Thumbnail, models_thumbnail.ThumbnailTypedDict] + ] = None, allowed_datasource: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -1162,23 +1187,28 @@ async def update_async( description: Optional[str] = None, added_roles: Optional[ Union[ - Iterable[models.UserRoleSpecification], - Iterable[models.UserRoleSpecificationTypedDict], + Iterable[models_userrolespecification.UserRoleSpecification], + Iterable[models_userrolespecification.UserRoleSpecificationTypedDict], ] ] = None, removed_roles: Optional[ Union[ - Iterable[models.UserRoleSpecification], - Iterable[models.UserRoleSpecificationTypedDict], + Iterable[models_userrolespecification.UserRoleSpecification], + Iterable[models_userrolespecification.UserRoleSpecificationTypedDict], ] ] = None, audience_filters: Optional[ - Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] + Union[ + Iterable[models_facetfilter.FacetFilter], + Iterable[models_facetfilter.FacetFilterTypedDict], + ] ] = None, icon: Optional[str] = None, admin_locked: Optional[bool] = None, parent_id: Optional[int] = None, - thumbnail: Optional[Union[models.Thumbnail, models.ThumbnailTypedDict]] = None, + thumbnail: Optional[ + Union[models_thumbnail.Thumbnail, models_thumbnail.ThumbnailTypedDict] + ] = None, allowed_datasource: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, diff --git a/src/glean/api_client/custommetadata.py b/src/glean/api_client/custommetadata.py index e460a7f4c..abbc12824 100644 --- a/src/glean/api_client/custommetadata.py +++ b/src/glean/api_client/custommetadata.py @@ -4,6 +4,10 @@ from .basesdk import BaseSDK from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import ( + custommetadatapropertydefinition as models_custommetadatapropertydefinition, + customproperty as models_customproperty, +) from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -17,7 +21,8 @@ def upsert( doc_id: str, group_name: str, custom_metadata: Union[ - Iterable[models.CustomProperty], Iterable[models.CustomPropertyTypedDict] + Iterable[models_customproperty.CustomProperty], + Iterable[models_customproperty.CustomPropertyTypedDict], ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -140,7 +145,8 @@ async def upsert_async( doc_id: str, group_name: str, custom_metadata: Union[ - Iterable[models.CustomProperty], Iterable[models.CustomPropertyTypedDict] + Iterable[models_customproperty.CustomProperty], + Iterable[models_customproperty.CustomPropertyTypedDict], ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -684,8 +690,12 @@ def upsert_schema( *, group_name: str, metadata_keys: Union[ - Iterable[models.CustomMetadataPropertyDefinition], - Iterable[models.CustomMetadataPropertyDefinitionTypedDict], + Iterable[ + models_custommetadatapropertydefinition.CustomMetadataPropertyDefinition + ], + Iterable[ + models_custommetadatapropertydefinition.CustomMetadataPropertyDefinitionTypedDict + ], ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -807,8 +817,12 @@ async def upsert_schema_async( *, group_name: str, metadata_keys: Union[ - Iterable[models.CustomMetadataPropertyDefinition], - Iterable[models.CustomMetadataPropertyDefinitionTypedDict], + Iterable[ + models_custommetadatapropertydefinition.CustomMetadataPropertyDefinition + ], + Iterable[ + models_custommetadatapropertydefinition.CustomMetadataPropertyDefinitionTypedDict + ], ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, diff --git a/src/glean/api_client/departments.py b/src/glean/api_client/departments.py index 30acbc73d..b0f887461 100644 --- a/src/glean/api_client/departments.py +++ b/src/glean/api_client/departments.py @@ -4,6 +4,9 @@ from .basesdk import BaseSDK from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import ( + platformdepartmentfilter as models_platformdepartmentfilter, +) from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -18,8 +21,10 @@ def list( cursor: Optional[str] = None, filters: Optional[ Union[ - Iterable[models.PlatformDepartmentFilter], - Iterable[models.PlatformDepartmentFilterTypedDict], + Iterable[models_platformdepartmentfilter.PlatformDepartmentFilter], + Iterable[ + models_platformdepartmentfilter.PlatformDepartmentFilterTypedDict + ], ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -144,8 +149,10 @@ async def list_async( cursor: Optional[str] = None, filters: Optional[ Union[ - Iterable[models.PlatformDepartmentFilter], - Iterable[models.PlatformDepartmentFilterTypedDict], + Iterable[models_platformdepartmentfilter.PlatformDepartmentFilter], + Iterable[ + models_platformdepartmentfilter.PlatformDepartmentFilterTypedDict + ], ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, diff --git a/src/glean/api_client/documents_sdk.py b/src/glean/api_client/documents_sdk.py index afa96c1a7..fcd1d63b5 100644 --- a/src/glean/api_client/documents_sdk.py +++ b/src/glean/api_client/documents_sdk.py @@ -4,6 +4,10 @@ from .basesdk import BaseSDK from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import ( + platformdocumentinclude as models_platformdocumentinclude, + platformdocumentsbatchrequest as models_platformdocumentsbatchrequest, +) from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -15,7 +19,9 @@ def get_by_url( self, *, url: str, - include: Optional[Iterable[models.PlatformDocumentInclude]] = None, + include: Optional[ + Iterable[models_platformdocumentinclude.PlatformDocumentInclude] + ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -130,7 +136,9 @@ async def get_by_url_async( self, *, url: str, - include: Optional[Iterable[models.PlatformDocumentInclude]] = None, + include: Optional[ + Iterable[models_platformdocumentinclude.PlatformDocumentInclude] + ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -245,7 +253,9 @@ def get_by_id( self, *, document_id: str, - include: Optional[Iterable[models.PlatformDocumentInclude]] = None, + include: Optional[ + Iterable[models_platformdocumentinclude.PlatformDocumentInclude] + ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -361,7 +371,9 @@ async def get_by_id_async( self, *, document_id: str, - include: Optional[Iterable[models.PlatformDocumentInclude]] = None, + include: Optional[ + Iterable[models_platformdocumentinclude.PlatformDocumentInclude] + ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -477,10 +489,16 @@ def batch( self, *, document_specs: Union[ - Iterable[models.PlatformDocumentsBatchRequestDocumentSpec], - Iterable[models.PlatformDocumentsBatchRequestDocumentSpecTypedDict], + Iterable[ + models_platformdocumentsbatchrequest.PlatformDocumentsBatchRequestDocumentSpec + ], + Iterable[ + models_platformdocumentsbatchrequest.PlatformDocumentsBatchRequestDocumentSpecTypedDict + ], ], - include: Optional[Iterable[models.PlatformDocumentInclude]] = None, + include: Optional[ + Iterable[models_platformdocumentinclude.PlatformDocumentInclude] + ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -603,10 +621,16 @@ async def batch_async( self, *, document_specs: Union[ - Iterable[models.PlatformDocumentsBatchRequestDocumentSpec], - Iterable[models.PlatformDocumentsBatchRequestDocumentSpecTypedDict], + Iterable[ + models_platformdocumentsbatchrequest.PlatformDocumentsBatchRequestDocumentSpec + ], + Iterable[ + models_platformdocumentsbatchrequest.PlatformDocumentsBatchRequestDocumentSpecTypedDict + ], ], - include: Optional[Iterable[models.PlatformDocumentInclude]] = None, + include: Optional[ + Iterable[models_platformdocumentinclude.PlatformDocumentInclude] + ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, diff --git a/src/glean/api_client/entities.py b/src/glean/api_client/entities.py index 13ef0145b..91486d508 100644 --- a/src/glean/api_client/entities.py +++ b/src/glean/api_client/entities.py @@ -5,6 +5,12 @@ from enum import Enum from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import ( + facetfilter as models_facetfilter, + listentitiesrequest as models_listentitiesrequest, + peoplerequest as models_peoplerequest, + sortoptions as models_sortoptions, +) from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -22,24 +28,30 @@ def list( *, locale: Optional[str] = None, filter_: Optional[ - Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] + Union[ + Iterable[models_facetfilter.FacetFilter], + Iterable[models_facetfilter.FacetFilterTypedDict], + ] ] = None, sort: Optional[ - Union[Iterable[models.SortOptions], Iterable[models.SortOptionsTypedDict]] + Union[ + Iterable[models_sortoptions.SortOptions], + Iterable[models_sortoptions.SortOptionsTypedDict], + ] ] = None, entity_type: Optional[ - models.ListEntitiesRequestEntityType + models_listentitiesrequest.ListEntitiesRequestEntityType ] = models.ListEntitiesRequestEntityType.PEOPLE, datasource: Optional[str] = None, query: Optional[str] = None, include_fields: Optional[ - Iterable[models.ListEntitiesRequestIncludeField] + Iterable[models_listentitiesrequest.ListEntitiesRequestIncludeField] ] = None, page_size: Optional[int] = None, cursor: Optional[str] = None, source: Optional[str] = None, request_type: Optional[ - models.ListEntitiesRequestRequestType + models_listentitiesrequest.ListEntitiesRequestRequestType ] = models.ListEntitiesRequestRequestType.STANDARD, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -166,24 +178,30 @@ async def list_async( *, locale: Optional[str] = None, filter_: Optional[ - Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] + Union[ + Iterable[models_facetfilter.FacetFilter], + Iterable[models_facetfilter.FacetFilterTypedDict], + ] ] = None, sort: Optional[ - Union[Iterable[models.SortOptions], Iterable[models.SortOptionsTypedDict]] + Union[ + Iterable[models_sortoptions.SortOptions], + Iterable[models_sortoptions.SortOptionsTypedDict], + ] ] = None, entity_type: Optional[ - models.ListEntitiesRequestEntityType + models_listentitiesrequest.ListEntitiesRequestEntityType ] = models.ListEntitiesRequestEntityType.PEOPLE, datasource: Optional[str] = None, query: Optional[str] = None, include_fields: Optional[ - Iterable[models.ListEntitiesRequestIncludeField] + Iterable[models_listentitiesrequest.ListEntitiesRequestIncludeField] ] = None, page_size: Optional[int] = None, cursor: Optional[str] = None, source: Optional[str] = None, request_type: Optional[ - models.ListEntitiesRequestRequestType + models_listentitiesrequest.ListEntitiesRequestRequestType ] = models.ListEntitiesRequestRequestType.STANDARD, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -313,8 +331,10 @@ def read_people( timezone_offset: Optional[int] = None, obfuscated_ids: Optional[Iterable[str]] = None, email_ids: Optional[Iterable[str]] = None, - include_fields: Optional[Iterable[models.PeopleRequestIncludeField]] = None, - include_types: Optional[Iterable[models.IncludeType]] = None, + include_fields: Optional[ + Iterable[models_peoplerequest.PeopleRequestIncludeField] + ] = None, + include_types: Optional[Iterable[models_peoplerequest.IncludeType]] = None, source: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -433,8 +453,10 @@ async def read_people_async( timezone_offset: Optional[int] = None, obfuscated_ids: Optional[Iterable[str]] = None, email_ids: Optional[Iterable[str]] = None, - include_fields: Optional[Iterable[models.PeopleRequestIncludeField]] = None, - include_types: Optional[Iterable[models.IncludeType]] = None, + include_fields: Optional[ + Iterable[models_peoplerequest.PeopleRequestIncludeField] + ] = None, + include_types: Optional[Iterable[models_peoplerequest.IncludeType]] = None, source: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, diff --git a/src/glean/api_client/findings.py b/src/glean/api_client/findings.py index fe62fb850..0e686896f 100644 --- a/src/glean/api_client/findings.py +++ b/src/glean/api_client/findings.py @@ -4,6 +4,11 @@ from .basesdk import BaseSDK from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import ( + dlpexportfindingsrequest as models_dlpexportfindingsrequest, + dlpfindingfilter as models_dlpfindingfilter, + dlpissuefilter as models_dlpissuefilter, +) from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -14,15 +19,23 @@ class Findings(BaseSDK): def create( self, *, - export_type: Optional[models.DlpExportFindingsRequestExportType] = None, + export_type: Optional[ + models_dlpexportfindingsrequest.DlpExportFindingsRequestExportType + ] = None, filter_: Optional[ - Union[models.DlpFindingFilter, models.DlpFindingFilterTypedDict] + Union[ + models_dlpfindingfilter.DlpFindingFilter, + models_dlpfindingfilter.DlpFindingFilterTypedDict, + ] ] = None, issue_filter: Optional[ - Union[models.DlpIssueFilter, models.DlpIssueFilterTypedDict] + Union[ + models_dlpissuefilter.DlpIssueFilter, + models_dlpissuefilter.DlpIssueFilterTypedDict, + ] ] = None, file_name: Optional[str] = None, - field_scope: Optional[models.FieldScope] = None, + field_scope: Optional[models_dlpexportfindingsrequest.FieldScope] = None, fields_to_exclude: Optional[Iterable[str]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -129,15 +142,23 @@ def create( async def create_async( self, *, - export_type: Optional[models.DlpExportFindingsRequestExportType] = None, + export_type: Optional[ + models_dlpexportfindingsrequest.DlpExportFindingsRequestExportType + ] = None, filter_: Optional[ - Union[models.DlpFindingFilter, models.DlpFindingFilterTypedDict] + Union[ + models_dlpfindingfilter.DlpFindingFilter, + models_dlpfindingfilter.DlpFindingFilterTypedDict, + ] ] = None, issue_filter: Optional[ - Union[models.DlpIssueFilter, models.DlpIssueFilterTypedDict] + Union[ + models_dlpissuefilter.DlpIssueFilter, + models_dlpissuefilter.DlpIssueFilterTypedDict, + ] ] = None, file_name: Optional[str] = None, - field_scope: Optional[models.FieldScope] = None, + field_scope: Optional[models_dlpexportfindingsrequest.FieldScope] = None, fields_to_exclude: Optional[Iterable[str]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, diff --git a/src/glean/api_client/indexing_datasources.py b/src/glean/api_client/indexing_datasources.py index 4b36a694b..8e99b56e2 100644 --- a/src/glean/api_client/indexing_datasources.py +++ b/src/glean/api_client/indexing_datasources.py @@ -4,6 +4,12 @@ from .basesdk import BaseSDK from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import ( + canonicalizingregextype as models_canonicalizingregextype, + customdatasourceconfig as models_customdatasourceconfig, + objectdefinition as models_objectdefinition, + quicklink as models_quicklink, +) from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -17,37 +23,48 @@ def add( name: str, display_name: Optional[str] = None, datasource_category: Optional[ - models.DatasourceCategory + models_customdatasourceconfig.DatasourceCategory ] = models.DatasourceCategory.UNCATEGORIZED, url_regex: Optional[str] = None, icon_url: Optional[str] = None, object_definitions: Optional[ Union[ - Iterable[models.ObjectDefinition], - Iterable[models.ObjectDefinitionTypedDict], + Iterable[models_objectdefinition.ObjectDefinition], + Iterable[models_objectdefinition.ObjectDefinitionTypedDict], ] ] = None, suggestion_text: Optional[str] = None, home_url: Optional[str] = None, crawler_seed_urls: Optional[Iterable[str]] = None, icon_dark_url: Optional[str] = None, - hide_built_in_facets: Optional[Iterable[models.HideBuiltInFacet]] = None, + hide_built_in_facets: Optional[ + Iterable[models_customdatasourceconfig.HideBuiltInFacet] + ] = None, canonicalizing_url_regex: Optional[ Union[ - Iterable[models.CanonicalizingRegexType], - Iterable[models.CanonicalizingRegexTypeTypedDict], + Iterable[models_canonicalizingregextype.CanonicalizingRegexType], + Iterable[ + models_canonicalizingregextype.CanonicalizingRegexTypeTypedDict + ], ] ] = None, canonicalizing_title_regex: Optional[ Union[ - Iterable[models.CanonicalizingRegexType], - Iterable[models.CanonicalizingRegexTypeTypedDict], + Iterable[models_canonicalizingregextype.CanonicalizingRegexType], + Iterable[ + models_canonicalizingregextype.CanonicalizingRegexTypeTypedDict + ], ] ] = None, redlist_title_regex: Optional[str] = None, - connector_type: Optional[models.CustomDatasourceConfigConnectorType] = None, + connector_type: Optional[ + models_customdatasourceconfig.CustomDatasourceConfigConnectorType + ] = None, quicklinks: Optional[ - Union[Iterable[models.Quicklink], Iterable[models.QuicklinkTypedDict]] + Union[ + Iterable[models_quicklink.Quicklink], + Iterable[models_quicklink.QuicklinkTypedDict], + ] ] = None, render_config_preset: Optional[str] = None, aliases: Optional[Iterable[str]] = None, @@ -214,37 +231,48 @@ async def add_async( name: str, display_name: Optional[str] = None, datasource_category: Optional[ - models.DatasourceCategory + models_customdatasourceconfig.DatasourceCategory ] = models.DatasourceCategory.UNCATEGORIZED, url_regex: Optional[str] = None, icon_url: Optional[str] = None, object_definitions: Optional[ Union[ - Iterable[models.ObjectDefinition], - Iterable[models.ObjectDefinitionTypedDict], + Iterable[models_objectdefinition.ObjectDefinition], + Iterable[models_objectdefinition.ObjectDefinitionTypedDict], ] ] = None, suggestion_text: Optional[str] = None, home_url: Optional[str] = None, crawler_seed_urls: Optional[Iterable[str]] = None, icon_dark_url: Optional[str] = None, - hide_built_in_facets: Optional[Iterable[models.HideBuiltInFacet]] = None, + hide_built_in_facets: Optional[ + Iterable[models_customdatasourceconfig.HideBuiltInFacet] + ] = None, canonicalizing_url_regex: Optional[ Union[ - Iterable[models.CanonicalizingRegexType], - Iterable[models.CanonicalizingRegexTypeTypedDict], + Iterable[models_canonicalizingregextype.CanonicalizingRegexType], + Iterable[ + models_canonicalizingregextype.CanonicalizingRegexTypeTypedDict + ], ] ] = None, canonicalizing_title_regex: Optional[ Union[ - Iterable[models.CanonicalizingRegexType], - Iterable[models.CanonicalizingRegexTypeTypedDict], + Iterable[models_canonicalizingregextype.CanonicalizingRegexType], + Iterable[ + models_canonicalizingregextype.CanonicalizingRegexTypeTypedDict + ], ] ] = None, redlist_title_regex: Optional[str] = None, - connector_type: Optional[models.CustomDatasourceConfigConnectorType] = None, + connector_type: Optional[ + models_customdatasourceconfig.CustomDatasourceConfigConnectorType + ] = None, quicklinks: Optional[ - Union[Iterable[models.Quicklink], Iterable[models.QuicklinkTypedDict]] + Union[ + Iterable[models_quicklink.Quicklink], + Iterable[models_quicklink.QuicklinkTypedDict], + ] ] = None, render_config_preset: Optional[str] = None, aliases: Optional[Iterable[str]] = None, diff --git a/src/glean/api_client/indexing_documents.py b/src/glean/api_client/indexing_documents.py index 235cf11c2..9c9774ab9 100644 --- a/src/glean/api_client/indexing_documents.py +++ b/src/glean/api_client/indexing_documents.py @@ -4,6 +4,11 @@ from .basesdk import BaseSDK from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import ( + debugdocumentrequest as models_debugdocumentrequest, + documentdefinition as models_documentdefinition, + processalldocumentsrequest as models_processalldocumentsrequest, +) from glean.api_client.types import BaseModel, OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -15,7 +20,10 @@ class IndexingDocuments(BaseSDK): def add_or_update( self, *, - document: Union[models.DocumentDefinition, models.DocumentDefinitionTypedDict], + document: Union[ + models_documentdefinition.DocumentDefinition, + models_documentdefinition.DocumentDefinitionTypedDict, + ], version: Optional[int] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -107,7 +115,10 @@ def add_or_update( async def add_or_update_async( self, *, - document: Union[models.DocumentDefinition, models.DocumentDefinitionTypedDict], + document: Union[ + models_documentdefinition.DocumentDefinition, + models_documentdefinition.DocumentDefinitionTypedDict, + ], version: Optional[int] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -201,8 +212,8 @@ def index( *, datasource: str, documents: Union[ - Iterable[models.DocumentDefinition], - Iterable[models.DocumentDefinitionTypedDict], + Iterable[models_documentdefinition.DocumentDefinition], + Iterable[models_documentdefinition.DocumentDefinitionTypedDict], ], upload_id: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -301,8 +312,8 @@ async def index_async( *, datasource: str, documents: Union[ - Iterable[models.DocumentDefinition], - Iterable[models.DocumentDefinitionTypedDict], + Iterable[models_documentdefinition.DocumentDefinition], + Iterable[models_documentdefinition.DocumentDefinitionTypedDict], ], upload_id: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -402,8 +413,8 @@ def bulk_index( upload_id: str, datasource: str, documents: Union[ - Iterable[models.DocumentDefinition], - Iterable[models.DocumentDefinitionTypedDict], + Iterable[models_documentdefinition.DocumentDefinition], + Iterable[models_documentdefinition.DocumentDefinitionTypedDict], ], is_first_page: Optional[bool] = None, is_last_page: Optional[bool] = None, @@ -514,8 +525,8 @@ async def bulk_index_async( upload_id: str, datasource: str, documents: Union[ - Iterable[models.DocumentDefinition], - Iterable[models.DocumentDefinitionTypedDict], + Iterable[models_documentdefinition.DocumentDefinition], + Iterable[models_documentdefinition.DocumentDefinitionTypedDict], ], is_first_page: Optional[bool] = None, is_last_page: Optional[bool] = None, @@ -625,8 +636,8 @@ def process_all( *, request: Optional[ Union[ - models.ProcessAllDocumentsRequest, - models.ProcessAllDocumentsRequestTypedDict, + models_processalldocumentsrequest.ProcessAllDocumentsRequest, + models_processalldocumentsrequest.ProcessAllDocumentsRequestTypedDict, ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -736,8 +747,8 @@ async def process_all_async( *, request: Optional[ Union[ - models.ProcessAllDocumentsRequest, - models.ProcessAllDocumentsRequestTypedDict, + models_processalldocumentsrequest.ProcessAllDocumentsRequest, + models_processalldocumentsrequest.ProcessAllDocumentsRequestTypedDict, ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1251,8 +1262,8 @@ def debug_many( *, datasource: str, debug_documents: Union[ - Iterable[models.DebugDocumentRequest], - Iterable[models.DebugDocumentRequestTypedDict], + Iterable[models_debugdocumentrequest.DebugDocumentRequest], + Iterable[models_debugdocumentrequest.DebugDocumentRequestTypedDict], ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -1357,8 +1368,8 @@ async def debug_many_async( *, datasource: str, debug_documents: Union[ - Iterable[models.DebugDocumentRequest], - Iterable[models.DebugDocumentRequestTypedDict], + Iterable[models_debugdocumentrequest.DebugDocumentRequest], + Iterable[models_debugdocumentrequest.DebugDocumentRequestTypedDict], ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, diff --git a/src/glean/api_client/indexing_permissions.py b/src/glean/api_client/indexing_permissions.py index 8901c7875..ba1e2ff30 100644 --- a/src/glean/api_client/indexing_permissions.py +++ b/src/glean/api_client/indexing_permissions.py @@ -4,6 +4,14 @@ from .basesdk import BaseSDK from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import ( + datasourcebulkmembershipdefinition as models_datasourcebulkmembershipdefinition, + datasourcegroupdefinition as models_datasourcegroupdefinition, + datasourcemembershipdefinition as models_datasourcemembershipdefinition, + datasourceuserdefinition as models_datasourceuserdefinition, + documentpermissionsdefinition as models_documentpermissionsdefinition, + processallmembershipsrequest as models_processallmembershipsrequest, +) from glean.api_client.types import BaseModel, OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from typing import Iterable, List, Mapping, Optional, Union, cast @@ -15,8 +23,8 @@ def update_permissions( *, datasource: str, permissions: Union[ - models.DocumentPermissionsDefinition, - models.DocumentPermissionsDefinitionTypedDict, + models_documentpermissionsdefinition.DocumentPermissionsDefinition, + models_documentpermissionsdefinition.DocumentPermissionsDefinitionTypedDict, ], object_type: Optional[str] = None, id: Optional[str] = None, @@ -122,8 +130,8 @@ async def update_permissions_async( *, datasource: str, permissions: Union[ - models.DocumentPermissionsDefinition, - models.DocumentPermissionsDefinitionTypedDict, + models_documentpermissionsdefinition.DocumentPermissionsDefinition, + models_documentpermissionsdefinition.DocumentPermissionsDefinitionTypedDict, ], object_type: Optional[str] = None, id: Optional[str] = None, @@ -229,7 +237,8 @@ def index_user( *, datasource: str, user: Union[ - models.DatasourceUserDefinition, models.DatasourceUserDefinitionTypedDict + models_datasourceuserdefinition.DatasourceUserDefinition, + models_datasourceuserdefinition.DatasourceUserDefinitionTypedDict, ], version: Optional[int] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -326,7 +335,8 @@ async def index_user_async( *, datasource: str, user: Union[ - models.DatasourceUserDefinition, models.DatasourceUserDefinitionTypedDict + models_datasourceuserdefinition.DatasourceUserDefinition, + models_datasourceuserdefinition.DatasourceUserDefinitionTypedDict, ], version: Optional[int] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -424,8 +434,8 @@ def bulk_index_users( upload_id: str, datasource: str, users: Union[ - Iterable[models.DatasourceUserDefinition], - Iterable[models.DatasourceUserDefinitionTypedDict], + Iterable[models_datasourceuserdefinition.DatasourceUserDefinition], + Iterable[models_datasourceuserdefinition.DatasourceUserDefinitionTypedDict], ], is_first_page: Optional[bool] = None, is_last_page: Optional[bool] = None, @@ -538,8 +548,8 @@ async def bulk_index_users_async( upload_id: str, datasource: str, users: Union[ - Iterable[models.DatasourceUserDefinition], - Iterable[models.DatasourceUserDefinitionTypedDict], + Iterable[models_datasourceuserdefinition.DatasourceUserDefinition], + Iterable[models_datasourceuserdefinition.DatasourceUserDefinitionTypedDict], ], is_first_page: Optional[bool] = None, is_last_page: Optional[bool] = None, @@ -651,7 +661,8 @@ def index_group( *, datasource: str, group: Union[ - models.DatasourceGroupDefinition, models.DatasourceGroupDefinitionTypedDict + models_datasourcegroupdefinition.DatasourceGroupDefinition, + models_datasourcegroupdefinition.DatasourceGroupDefinitionTypedDict, ], version: Optional[int] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -748,7 +759,8 @@ async def index_group_async( *, datasource: str, group: Union[ - models.DatasourceGroupDefinition, models.DatasourceGroupDefinitionTypedDict + models_datasourcegroupdefinition.DatasourceGroupDefinition, + models_datasourcegroupdefinition.DatasourceGroupDefinitionTypedDict, ], version: Optional[int] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -846,8 +858,10 @@ def bulk_index_groups( upload_id: str, datasource: str, groups: Union[ - Iterable[models.DatasourceGroupDefinition], - Iterable[models.DatasourceGroupDefinitionTypedDict], + Iterable[models_datasourcegroupdefinition.DatasourceGroupDefinition], + Iterable[ + models_datasourcegroupdefinition.DatasourceGroupDefinitionTypedDict + ], ], is_first_page: Optional[bool] = None, is_last_page: Optional[bool] = None, @@ -960,8 +974,10 @@ async def bulk_index_groups_async( upload_id: str, datasource: str, groups: Union[ - Iterable[models.DatasourceGroupDefinition], - Iterable[models.DatasourceGroupDefinitionTypedDict], + Iterable[models_datasourcegroupdefinition.DatasourceGroupDefinition], + Iterable[ + models_datasourcegroupdefinition.DatasourceGroupDefinitionTypedDict + ], ], is_first_page: Optional[bool] = None, is_last_page: Optional[bool] = None, @@ -1073,8 +1089,8 @@ def index_membership( *, datasource: str, membership: Union[ - models.DatasourceMembershipDefinition, - models.DatasourceMembershipDefinitionTypedDict, + models_datasourcemembershipdefinition.DatasourceMembershipDefinition, + models_datasourcemembershipdefinition.DatasourceMembershipDefinitionTypedDict, ], version: Optional[int] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1173,8 +1189,8 @@ async def index_membership_async( *, datasource: str, membership: Union[ - models.DatasourceMembershipDefinition, - models.DatasourceMembershipDefinitionTypedDict, + models_datasourcemembershipdefinition.DatasourceMembershipDefinition, + models_datasourcemembershipdefinition.DatasourceMembershipDefinitionTypedDict, ], version: Optional[int] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1274,8 +1290,12 @@ def bulk_index_memberships( upload_id: str, datasource: str, memberships: Union[ - Iterable[models.DatasourceBulkMembershipDefinition], - Iterable[models.DatasourceBulkMembershipDefinitionTypedDict], + Iterable[ + models_datasourcebulkmembershipdefinition.DatasourceBulkMembershipDefinition + ], + Iterable[ + models_datasourcebulkmembershipdefinition.DatasourceBulkMembershipDefinitionTypedDict + ], ], is_first_page: Optional[bool] = None, is_last_page: Optional[bool] = None, @@ -1386,8 +1406,12 @@ async def bulk_index_memberships_async( upload_id: str, datasource: str, memberships: Union[ - Iterable[models.DatasourceBulkMembershipDefinition], - Iterable[models.DatasourceBulkMembershipDefinitionTypedDict], + Iterable[ + models_datasourcebulkmembershipdefinition.DatasourceBulkMembershipDefinition + ], + Iterable[ + models_datasourcebulkmembershipdefinition.DatasourceBulkMembershipDefinitionTypedDict + ], ], is_first_page: Optional[bool] = None, is_last_page: Optional[bool] = None, @@ -1497,8 +1521,8 @@ def process_memberships( *, request: Optional[ Union[ - models.ProcessAllMembershipsRequest, - models.ProcessAllMembershipsRequestTypedDict, + models_processallmembershipsrequest.ProcessAllMembershipsRequest, + models_processallmembershipsrequest.ProcessAllMembershipsRequestTypedDict, ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1598,8 +1622,8 @@ async def process_memberships_async( *, request: Optional[ Union[ - models.ProcessAllMembershipsRequest, - models.ProcessAllMembershipsRequestTypedDict, + models_processallmembershipsrequest.ProcessAllMembershipsRequest, + models_processallmembershipsrequest.ProcessAllMembershipsRequestTypedDict, ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -2087,8 +2111,8 @@ def delete_membership( *, datasource: str, membership: Union[ - models.DatasourceMembershipDefinition, - models.DatasourceMembershipDefinitionTypedDict, + models_datasourcemembershipdefinition.DatasourceMembershipDefinition, + models_datasourcemembershipdefinition.DatasourceMembershipDefinitionTypedDict, ], version: Optional[int] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -2187,8 +2211,8 @@ async def delete_membership_async( *, datasource: str, membership: Union[ - models.DatasourceMembershipDefinition, - models.DatasourceMembershipDefinitionTypedDict, + models_datasourcemembershipdefinition.DatasourceMembershipDefinition, + models_datasourcemembershipdefinition.DatasourceMembershipDefinitionTypedDict, ], version: Optional[int] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, diff --git a/src/glean/api_client/indexing_shortcuts.py b/src/glean/api_client/indexing_shortcuts.py index 155d0e2e3..758d8acb3 100644 --- a/src/glean/api_client/indexing_shortcuts.py +++ b/src/glean/api_client/indexing_shortcuts.py @@ -4,6 +4,10 @@ from .basesdk import BaseSDK from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import ( + externalshortcut as models_externalshortcut, + indexingshortcut as models_indexingshortcut, +) from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from typing import Iterable, List, Mapping, Optional, Union @@ -15,8 +19,8 @@ def bulk_index( *, upload_id: str, shortcuts: Union[ - Iterable[models.ExternalShortcut], - Iterable[models.ExternalShortcutTypedDict], + Iterable[models_externalshortcut.ExternalShortcut], + Iterable[models_externalshortcut.ExternalShortcutTypedDict], ], is_first_page: Optional[bool] = None, is_last_page: Optional[bool] = None, @@ -121,8 +125,8 @@ async def bulk_index_async( *, upload_id: str, shortcuts: Union[ - Iterable[models.ExternalShortcut], - Iterable[models.ExternalShortcutTypedDict], + Iterable[models_externalshortcut.ExternalShortcut], + Iterable[models_externalshortcut.ExternalShortcutTypedDict], ], is_first_page: Optional[bool] = None, is_last_page: Optional[bool] = None, @@ -227,8 +231,8 @@ def upload( *, upload_id: str, shortcuts: Union[ - Iterable[models.IndexingShortcut], - Iterable[models.IndexingShortcutTypedDict], + Iterable[models_indexingshortcut.IndexingShortcut], + Iterable[models_indexingshortcut.IndexingShortcutTypedDict], ], is_first_page: Optional[bool] = None, is_last_page: Optional[bool] = None, @@ -333,8 +337,8 @@ async def upload_async( *, upload_id: str, shortcuts: Union[ - Iterable[models.IndexingShortcut], - Iterable[models.IndexingShortcutTypedDict], + Iterable[models_indexingshortcut.IndexingShortcut], + Iterable[models_indexingshortcut.IndexingShortcutTypedDict], ], is_first_page: Optional[bool] = None, is_last_page: Optional[bool] = None, diff --git a/src/glean/api_client/insights.py b/src/glean/api_client/insights.py index 195014d05..b224c7c25 100644 --- a/src/glean/api_client/insights.py +++ b/src/glean/api_client/insights.py @@ -4,6 +4,13 @@ from .basesdk import BaseSDK from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import ( + agentsinsightsv2request as models_agentsinsightsv2request, + insightsassistantrequest as models_insightsassistantrequest, + insightsoverviewrequest as models_insightsoverviewrequest, + mcpbreakdowninsightsrequest as models_mcpbreakdowninsightsrequest, + mcpinsightsrequest as models_mcpinsightsrequest, +) from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -17,27 +24,32 @@ def retrieve( locale: Optional[str] = None, overview_request: Optional[ Union[ - models.InsightsOverviewRequest, models.InsightsOverviewRequestTypedDict + models_insightsoverviewrequest.InsightsOverviewRequest, + models_insightsoverviewrequest.InsightsOverviewRequestTypedDict, ] ] = None, assistant_request: Optional[ Union[ - models.InsightsAssistantRequest, - models.InsightsAssistantRequestTypedDict, + models_insightsassistantrequest.InsightsAssistantRequest, + models_insightsassistantrequest.InsightsAssistantRequestTypedDict, ] ] = None, agents_request: Optional[ Union[ - models.AgentsInsightsV2Request, models.AgentsInsightsV2RequestTypedDict + models_agentsinsightsv2request.AgentsInsightsV2Request, + models_agentsinsightsv2request.AgentsInsightsV2RequestTypedDict, ] ] = None, mcp_request: Optional[ - Union[models.McpInsightsRequest, models.McpInsightsRequestTypedDict] + Union[ + models_mcpinsightsrequest.McpInsightsRequest, + models_mcpinsightsrequest.McpInsightsRequestTypedDict, + ] ] = None, mcp_breakdown_request: Optional[ Union[ - models.McpBreakdownInsightsRequest, - models.McpBreakdownInsightsRequestTypedDict, + models_mcpbreakdowninsightsrequest.McpBreakdownInsightsRequest, + models_mcpbreakdowninsightsrequest.McpBreakdownInsightsRequestTypedDict, ] ] = None, disable_per_user_insights: Optional[bool] = None, @@ -160,27 +172,32 @@ async def retrieve_async( locale: Optional[str] = None, overview_request: Optional[ Union[ - models.InsightsOverviewRequest, models.InsightsOverviewRequestTypedDict + models_insightsoverviewrequest.InsightsOverviewRequest, + models_insightsoverviewrequest.InsightsOverviewRequestTypedDict, ] ] = None, assistant_request: Optional[ Union[ - models.InsightsAssistantRequest, - models.InsightsAssistantRequestTypedDict, + models_insightsassistantrequest.InsightsAssistantRequest, + models_insightsassistantrequest.InsightsAssistantRequestTypedDict, ] ] = None, agents_request: Optional[ Union[ - models.AgentsInsightsV2Request, models.AgentsInsightsV2RequestTypedDict + models_agentsinsightsv2request.AgentsInsightsV2Request, + models_agentsinsightsv2request.AgentsInsightsV2RequestTypedDict, ] ] = None, mcp_request: Optional[ - Union[models.McpInsightsRequest, models.McpInsightsRequestTypedDict] + Union[ + models_mcpinsightsrequest.McpInsightsRequest, + models_mcpinsightsrequest.McpInsightsRequestTypedDict, + ] ] = None, mcp_breakdown_request: Optional[ Union[ - models.McpBreakdownInsightsRequest, - models.McpBreakdownInsightsRequestTypedDict, + models_mcpbreakdowninsightsrequest.McpBreakdownInsightsRequest, + models_mcpbreakdowninsightsrequest.McpBreakdownInsightsRequestTypedDict, ] ] = None, disable_per_user_insights: Optional[bool] = None, diff --git a/src/glean/api_client/messages.py b/src/glean/api_client/messages.py index 00bad6ca8..1b1e73ed4 100644 --- a/src/glean/api_client/messages.py +++ b/src/glean/api_client/messages.py @@ -4,6 +4,7 @@ from .basesdk import BaseSDK from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import messagesrequest as models_messagesrequest from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -14,12 +15,12 @@ class Messages(BaseSDK): def retrieve( self, *, - id_type: models.IDType, + id_type: models_messagesrequest.IDType, id: str, - datasource: models.Datasource, + datasource: models_messagesrequest.Datasource, locale: Optional[str] = None, workspace_id: Optional[str] = None, - direction: Optional[models.MessagesRequestDirection] = None, + direction: Optional[models_messagesrequest.MessagesRequestDirection] = None, timestamp_millis: Optional[int] = None, include_root_message: Optional[bool] = None, datasource_instance_display_name: Optional[str] = None, @@ -133,12 +134,12 @@ def retrieve( async def retrieve_async( self, *, - id_type: models.IDType, + id_type: models_messagesrequest.IDType, id: str, - datasource: models.Datasource, + datasource: models_messagesrequest.Datasource, locale: Optional[str] = None, workspace_id: Optional[str] = None, - direction: Optional[models.MessagesRequestDirection] = None, + direction: Optional[models_messagesrequest.MessagesRequestDirection] = None, timestamp_millis: Optional[int] = None, include_root_message: Optional[bool] = None, datasource_instance_display_name: Optional[str] = None, diff --git a/src/glean/api_client/models/__init__.py b/src/glean/api_client/models/__init__.py index 172a0c63c..50b6c7b96 100644 --- a/src/glean/api_client/models/__init__.py +++ b/src/glean/api_client/models/__init__.py @@ -1008,6 +1008,7 @@ GetdocvisibilityRequest, GetdocvisibilityRequestTypedDict, ) + from .getimageop import GetImageRequest, GetImageRequestTypedDict from .getpersonphotoop import ( GetPersonPhotoRequest, GetPersonPhotoRequestTypedDict, @@ -1396,6 +1397,10 @@ PlatformDocumentsGetRequest, PlatformDocumentsGetRequestTypedDict, ) + from .platform_models_listop import ( + PlatformModelsListRequest, + PlatformModelsListRequestTypedDict, + ) from .platform_search_filtersop import ( PlatformSearchFiltersRequest, PlatformSearchFiltersRequestTypedDict, @@ -1670,6 +1675,10 @@ PlatformAgentUpdateRequest, PlatformAgentUpdateRequestTypedDict, ) + from .platformanonymousauthtoken import ( + PlatformAnonymousAuthToken, + PlatformAnonymousAuthTokenTypedDict, + ) from .platformauthenticationsuggestion import ( PlatformAuthenticationSuggestion, PlatformAuthenticationSuggestionTypedDict, @@ -1820,6 +1829,10 @@ PlatformContentScheduleWebhookEventTypedDict, ) from .platformcontenttype import PlatformContentType + from .platformcreateanonymousauthtokenresponse import ( + PlatformCreateAnonymousAuthTokenResponse, + PlatformCreateAnonymousAuthTokenResponseTypedDict, + ) from .platformdatasourcefilterinfo import ( PlatformDatasourceFilterInfo, PlatformDatasourceFilterInfoTypedDict, @@ -1943,6 +1956,19 @@ PlatformMessageTextBlockInput, PlatformMessageTextBlockInputTypedDict, ) + from .platformmodel import PlatformModel, PlatformModelTypedDict + from .platformmodelchatendpoint import ( + PlatformModelChatEndpoint, + PlatformModelChatEndpointTypedDict, + ) + from .platformmodelendpoints import ( + PlatformModelEndpoints, + PlatformModelEndpointsTypedDict, + ) + from .platformmodelslistresponse import ( + PlatformModelsListResponse, + PlatformModelsListResponseTypedDict, + ) from .platformoauthclient import PlatformOAuthClient, PlatformOAuthClientTypedDict from .platformoauthclientaigateway import ( PlatformOAuthClientAiGateway, @@ -1974,6 +2000,7 @@ PlatformProblemDetailError, PlatformProblemDetailErrorTypedDict, ) + from .platformreasoningeffort import PlatformReasoningEffort from .platformresult import PlatformResult, PlatformResultTypedDict from .platformsearchfiltersresponse import ( PlatformSearchFiltersResponse, @@ -3365,6 +3392,8 @@ "GetDocumentsRequestTypedDict", "GetDocumentsResponse", "GetDocumentsResponseTypedDict", + "GetImageRequest", + "GetImageRequestTypedDict", "GetPersonPhotoRequest", "GetPersonPhotoRequestTypedDict", "GetPersonPhotoResponse", @@ -3777,6 +3806,8 @@ "PlatformAgentsSearchResponseTypedDict", "PlatformAgentsUpdateRequest", "PlatformAgentsUpdateRequestTypedDict", + "PlatformAnonymousAuthToken", + "PlatformAnonymousAuthTokenTypedDict", "PlatformAuthenticationSuggestion", "PlatformAuthenticationSuggestionTypedDict", "PlatformChat", @@ -3880,6 +3911,8 @@ "PlatformContentScheduleWebhookEvent", "PlatformContentScheduleWebhookEventTypedDict", "PlatformContentType", + "PlatformCreateAnonymousAuthTokenResponse", + "PlatformCreateAnonymousAuthTokenResponseTypedDict", "PlatformDatasourceFilterInfo", "PlatformDatasourceFilterInfoTypedDict", "PlatformDepartmentFilter", @@ -3959,6 +3992,16 @@ "PlatformMessageTextBlockInputTypedDict", "PlatformMessageTextBlockTypedDict", "PlatformMessageTypedDict", + "PlatformModel", + "PlatformModelChatEndpoint", + "PlatformModelChatEndpointTypedDict", + "PlatformModelEndpoints", + "PlatformModelEndpointsTypedDict", + "PlatformModelTypedDict", + "PlatformModelsListRequest", + "PlatformModelsListRequestTypedDict", + "PlatformModelsListResponse", + "PlatformModelsListResponseTypedDict", "PlatformOAuthClient", "PlatformOAuthClientAiGateway", "PlatformOAuthClientAiGatewayTypedDict", @@ -3979,6 +4022,7 @@ "PlatformProblemDetailError", "PlatformProblemDetailErrorTypedDict", "PlatformProblemDetailTypedDict", + "PlatformReasoningEffort", "PlatformResult", "PlatformResultTypedDict", "PlatformSearchFiltersRequest", @@ -5235,6 +5279,8 @@ "GetDocumentVisibilityOverridesResponseTypedDict": ".getdocumentvisibilityoverridesresponse", "GetdocvisibilityRequest": ".getdocvisibilityop", "GetdocvisibilityRequestTypedDict": ".getdocvisibilityop", + "GetImageRequest": ".getimageop", + "GetImageRequestTypedDict": ".getimageop", "GetPersonPhotoRequest": ".getpersonphotoop", "GetPersonPhotoRequestTypedDict": ".getpersonphotoop", "GetPersonPhotoResponse": ".getpersonphotoop", @@ -5531,6 +5577,8 @@ "PlatformDocumentsGetByURLRequestTypedDict": ".platform_documents_get_by_urlop", "PlatformDocumentsGetRequest": ".platform_documents_getop", "PlatformDocumentsGetRequestTypedDict": ".platform_documents_getop", + "PlatformModelsListRequest": ".platform_models_listop", + "PlatformModelsListRequestTypedDict": ".platform_models_listop", "PlatformSearchFiltersRequest": ".platform_search_filtersop", "PlatformSearchFiltersRequestTypedDict": ".platform_search_filtersop", "PlatformSearchFiltersResponseResponse": ".platform_search_filtersop", @@ -5683,6 +5731,8 @@ "PlatformAgentTriggerTypedDict": ".platformagenttrigger", "PlatformAgentUpdateRequest": ".platformagentupdaterequest", "PlatformAgentUpdateRequestTypedDict": ".platformagentupdaterequest", + "PlatformAnonymousAuthToken": ".platformanonymousauthtoken", + "PlatformAnonymousAuthTokenTypedDict": ".platformanonymousauthtoken", "PlatformAuthenticationSuggestion": ".platformauthenticationsuggestion", "PlatformAuthenticationSuggestionTypedDict": ".platformauthenticationsuggestion", "PlatformChat": ".platformchat", @@ -5772,6 +5822,8 @@ "PlatformContentScheduleWebhookEvent": ".platformcontentschedulewebhookevent", "PlatformContentScheduleWebhookEventTypedDict": ".platformcontentschedulewebhookevent", "PlatformContentType": ".platformcontenttype", + "PlatformCreateAnonymousAuthTokenResponse": ".platformcreateanonymousauthtokenresponse", + "PlatformCreateAnonymousAuthTokenResponseTypedDict": ".platformcreateanonymousauthtokenresponse", "PlatformDatasourceFilterInfo": ".platformdatasourcefilterinfo", "PlatformDatasourceFilterInfoTypedDict": ".platformdatasourcefilterinfo", "PlatformDepartmentFilter": ".platformdepartmentfilter", @@ -5843,6 +5895,14 @@ "PlatformMessageTextBlockTypedDict": ".platformmessagetextblock", "PlatformMessageTextBlockInput": ".platformmessagetextblock_input", "PlatformMessageTextBlockInputTypedDict": ".platformmessagetextblock_input", + "PlatformModel": ".platformmodel", + "PlatformModelTypedDict": ".platformmodel", + "PlatformModelChatEndpoint": ".platformmodelchatendpoint", + "PlatformModelChatEndpointTypedDict": ".platformmodelchatendpoint", + "PlatformModelEndpoints": ".platformmodelendpoints", + "PlatformModelEndpointsTypedDict": ".platformmodelendpoints", + "PlatformModelsListResponse": ".platformmodelslistresponse", + "PlatformModelsListResponseTypedDict": ".platformmodelslistresponse", "PlatformOAuthClient": ".platformoauthclient", "PlatformOAuthClientTypedDict": ".platformoauthclient", "PlatformOAuthClientAiGateway": ".platformoauthclientaigateway", @@ -5863,6 +5923,7 @@ "PlatformProblemDetailCode": ".platformproblemdetailcode", "PlatformProblemDetailError": ".platformproblemdetailerror", "PlatformProblemDetailErrorTypedDict": ".platformproblemdetailerror", + "PlatformReasoningEffort": ".platformreasoningeffort", "PlatformResult": ".platformresult", "PlatformResultTypedDict": ".platformresult", "PlatformSearchFiltersResponse": ".platformsearchfiltersresponse", diff --git a/src/glean/api_client/models/getimageop.py b/src/glean/api_client/models/getimageop.py new file mode 100644 index 000000000..394d92638 --- /dev/null +++ b/src/glean/api_client/models/getimageop.py @@ -0,0 +1,19 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: f5895c42d3c7 + +from __future__ import annotations +from glean.api_client.types import BaseModel +from glean.api_client.utils import FieldMetadata, QueryParamMetadata +from typing_extensions import Annotated, TypedDict + + +class GetImageRequestTypedDict(TypedDict): + key: str + r"""Image key from the image URL in a chat response.""" + + +class GetImageRequest(BaseModel): + key: Annotated[ + str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""Image key from the image URL in a chat response.""" diff --git a/src/glean/api_client/models/platform_admin_agents_listop.py b/src/glean/api_client/models/platform_admin_agents_listop.py index 38fa6be72..ba9abfb8a 100644 --- a/src/glean/api_client/models/platform_admin_agents_listop.py +++ b/src/glean/api_client/models/platform_admin_agents_listop.py @@ -27,7 +27,7 @@ class PlatformAdminAgentsListRequestTypedDict(TypedDict): """ filters: NotRequired[List[PlatformAdminAgentFilterTypedDict]] - r"""JSON-encoded filters that choose which agents are returned. The supported fields are name and description, with the operator EQUALS. Multiple values OR within a filter. Multiple filters AND together, and each field can appear in only one filter. For example, to return agents whose name contains \"HR\", send [{\"field\":\"name\",\"values\":[\"HR\"]}]. + r"""JSON-encoded filters that choose which agents are returned. The supported fields are name, description, and is_orphaned, with the operator EQUALS. Multiple values OR within a filter. Multiple filters AND together, and each field can appear in only one filter. For example, to return agents whose name contains \"HR\", send [{\"field\":\"name\",\"values\":[\"HR\"]}]. To return orphaned agents, send [{\"field\":\"is_orphaned\",\"values\":[\"true\"]}]. """ @@ -51,7 +51,7 @@ class PlatformAdminAgentsListRequest(BaseModel): Optional[List[PlatformAdminAgentFilter]], FieldMetadata(query=QueryParamMetadata(serialization="json")), ] = None - r"""JSON-encoded filters that choose which agents are returned. The supported fields are name and description, with the operator EQUALS. Multiple values OR within a filter. Multiple filters AND together, and each field can appear in only one filter. For example, to return agents whose name contains \"HR\", send [{\"field\":\"name\",\"values\":[\"HR\"]}]. + r"""JSON-encoded filters that choose which agents are returned. The supported fields are name, description, and is_orphaned, with the operator EQUALS. Multiple values OR within a filter. Multiple filters AND together, and each field can appear in only one filter. For example, to return agents whose name contains \"HR\", send [{\"field\":\"name\",\"values\":[\"HR\"]}]. To return orphaned agents, send [{\"field\":\"is_orphaned\",\"values\":[\"true\"]}]. """ diff --git a/src/glean/api_client/models/platform_chat_create_streamop.py b/src/glean/api_client/models/platform_chat_create_streamop.py index de4b200b3..7d738299b 100644 --- a/src/glean/api_client/models/platform_chat_create_streamop.py +++ b/src/glean/api_client/models/platform_chat_create_streamop.py @@ -6,6 +6,8 @@ PlatformChatInputMessage, PlatformChatInputMessageTypedDict, ) +from .platformreasoningeffort import PlatformReasoningEffort +from glean.api_client import models from glean.api_client.types import ( BaseModel, UNSET_SENTINEL, @@ -15,7 +17,7 @@ from glean.api_client.types.basemodel import current_filtered_dump from glean.api_client.utils import validate_const import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from pydantic.functional_validators import AfterValidator from typing import List, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -52,6 +54,14 @@ class PlatformChatCreateStreamRequestTypedDict(TypedDict): r"""Continue an existing stored conversation. Incompatible with message-array `input` and with `store: false`. """ + model: NotRequired[str] + r"""Model for this turn, matched exactly to an id from GET /api/models. When GET /api/models reports `endpoints.chat` for the model, `POST /api/chat` does not reject this value at `/model`, except across a deployment change. Other request checks still apply. The model is requested, not guaranteed: deployment configuration can still run the turn on a different model. + + """ + reasoning_effort: NotRequired[PlatformReasoningEffort] + r"""Reasoning effort for this turn. Requires `model`. When omitted, the model's default effort applies. When GET /api/models lists this value in `endpoints.chat.reasoning_efforts` for the model, `POST /api/chat` does not reject it at `/reasoning_effort`, except across a deployment change. Other request checks still apply. + + """ class PlatformChatCreateStreamRequest(BaseModel): @@ -75,12 +85,33 @@ class PlatformChatCreateStreamRequest(BaseModel): """ + model: Optional[str] = None + r"""Model for this turn, matched exactly to an id from GET /api/models. When GET /api/models reports `endpoints.chat` for the model, `POST /api/chat` does not reject this value at `/model`, except across a deployment change. Other request checks still apply. The model is requested, not guaranteed: deployment configuration can still run the turn on a different model. + + """ + + reasoning_effort: Optional[PlatformReasoningEffort] = None + r"""Reasoning effort for this turn. Requires `model`. When omitted, the model's default effort applies. When GET /api/models lists this value in `endpoints.chat.reasoning_efforts` for the model, `POST /api/chat` does not reject it at `/reasoning_effort`, except across a deployment change. Other request checks still apply. + + """ + + @field_serializer("reasoning_effort") + def serialize_reasoning_effort(self, value): + if isinstance(value, str): + try: + return models.PlatformReasoningEffort(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def _serialize_model_with_info(self, handler, info): return serialize_with_info(self.serialize_model, handler, info) def serialize_model(self, handler): - optional_fields = set(["stream", "store", "conversation_id"]) + optional_fields = set( + ["stream", "store", "conversation_id", "model", "reasoning_effort"] + ) exclude_none = current_exclude_none() skip_filtered = exclude_none is False or current_filtered_dump() serialized = handler(self) diff --git a/src/glean/api_client/models/platform_chat_createop.py b/src/glean/api_client/models/platform_chat_createop.py index 3fdfd22a2..46e6374d8 100644 --- a/src/glean/api_client/models/platform_chat_createop.py +++ b/src/glean/api_client/models/platform_chat_createop.py @@ -6,6 +6,8 @@ PlatformChatInputMessage, PlatformChatInputMessageTypedDict, ) +from .platformreasoningeffort import PlatformReasoningEffort +from glean.api_client import models from glean.api_client.types import ( BaseModel, UNSET_SENTINEL, @@ -15,7 +17,7 @@ from glean.api_client.types.basemodel import current_filtered_dump from glean.api_client.utils import validate_const import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from pydantic.functional_validators import AfterValidator from typing import List, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -52,6 +54,14 @@ class PlatformChatCreateRequestTypedDict(TypedDict): r"""Continue an existing stored conversation. Incompatible with message-array `input` and with `store: false`. """ + model: NotRequired[str] + r"""Model for this turn, matched exactly to an id from GET /api/models. When GET /api/models reports `endpoints.chat` for the model, `POST /api/chat` does not reject this value at `/model`, except across a deployment change. Other request checks still apply. The model is requested, not guaranteed: deployment configuration can still run the turn on a different model. + + """ + reasoning_effort: NotRequired[PlatformReasoningEffort] + r"""Reasoning effort for this turn. Requires `model`. When omitted, the model's default effort applies. When GET /api/models lists this value in `endpoints.chat.reasoning_efforts` for the model, `POST /api/chat` does not reject it at `/reasoning_effort`, except across a deployment change. Other request checks still apply. + + """ class PlatformChatCreateRequest(BaseModel): @@ -75,12 +85,33 @@ class PlatformChatCreateRequest(BaseModel): """ + model: Optional[str] = None + r"""Model for this turn, matched exactly to an id from GET /api/models. When GET /api/models reports `endpoints.chat` for the model, `POST /api/chat` does not reject this value at `/model`, except across a deployment change. Other request checks still apply. The model is requested, not guaranteed: deployment configuration can still run the turn on a different model. + + """ + + reasoning_effort: Optional[PlatformReasoningEffort] = None + r"""Reasoning effort for this turn. Requires `model`. When omitted, the model's default effort applies. When GET /api/models lists this value in `endpoints.chat.reasoning_efforts` for the model, `POST /api/chat` does not reject it at `/reasoning_effort`, except across a deployment change. Other request checks still apply. + + """ + + @field_serializer("reasoning_effort") + def serialize_reasoning_effort(self, value): + if isinstance(value, str): + try: + return models.PlatformReasoningEffort(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def _serialize_model_with_info(self, handler, info): return serialize_with_info(self.serialize_model, handler, info) def serialize_model(self, handler): - optional_fields = set(["stream", "store", "conversation_id"]) + optional_fields = set( + ["stream", "store", "conversation_id", "model", "reasoning_effort"] + ) exclude_none = current_exclude_none() skip_filtered = exclude_none is False or current_filtered_dump() serialized = handler(self) diff --git a/src/glean/api_client/models/platform_models_listop.py b/src/glean/api_client/models/platform_models_listop.py new file mode 100644 index 000000000..81c426106 --- /dev/null +++ b/src/glean/api_client/models/platform_models_listop.py @@ -0,0 +1,63 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 32919b516f6a + +from __future__ import annotations +from glean.api_client.types import ( + BaseModel, + UNSET_SENTINEL, + current_exclude_none, + serialize_with_info, +) +from glean.api_client.types.basemodel import current_filtered_dump +from glean.api_client.utils import FieldMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class PlatformModelsListRequestTypedDict(TypedDict): + page_size: NotRequired[int] + r"""Maximum number of models to return. Defaults to 20. Maximum is 100.""" + cursor: NotRequired[str] + r"""Opaque pagination cursor from a previous response. Cursors do not expire. + + """ + + +class PlatformModelsListRequest(BaseModel): + page_size: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 20 + r"""Maximum number of models to return. Defaults to 20. Maximum is 100.""" + + cursor: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Opaque pagination cursor from a previous response. Cursors do not expire. + + """ + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + optional_fields = set(["page_size", "cursor"]) + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/glean/api_client/models/platformadminagentfilter.py b/src/glean/api_client/models/platformadminagentfilter.py index 770bd89bc..d4f2de244 100644 --- a/src/glean/api_client/models/platformadminagentfilter.py +++ b/src/glean/api_client/models/platformadminagentfilter.py @@ -31,7 +31,20 @@ class PlatformAdminAgentFilterTypedDict(TypedDict): r"""A filter on one agent field.""" field: str - r"""The agent field to filter on. name matches agents whose name contains the value. description matches agents whose description contains the value. Matching ignores case and surrounding whitespace. Each value is at most 256 characters. + r"""What to filter on. + - name: matches agents whose name contains the value, ignoring case and + surrounding whitespace. Each value is at most 256 characters. + + - description: matches agents whose description contains the value, + ignoring case and surrounding whitespace. Each value is at most 256 + characters. + + - is_orphaned: \"true\" matches agents with no owner who is an active user, + meaning a user who is still in the workspace's people directory. This + includes agents owned only by identity-provider groups or departments and + agents with no owner. \"false\" matches the other agents. Agents built by + Glean, including Turnkey agents, are never orphaned. Any other value + returns 400. """ values: List[str] @@ -44,7 +57,20 @@ class PlatformAdminAgentFilter(BaseModel): r"""A filter on one agent field.""" field: Annotated[str, FieldMetadata(query=True)] - r"""The agent field to filter on. name matches agents whose name contains the value. description matches agents whose description contains the value. Matching ignores case and surrounding whitespace. Each value is at most 256 characters. + r"""What to filter on. + - name: matches agents whose name contains the value, ignoring case and + surrounding whitespace. Each value is at most 256 characters. + + - description: matches agents whose description contains the value, + ignoring case and surrounding whitespace. Each value is at most 256 + characters. + + - is_orphaned: \"true\" matches agents with no owner who is an active user, + meaning a user who is still in the workspace's people directory. This + includes agents owned only by identity-provider groups or departments and + agents with no owner. \"false\" matches the other agents. Agents built by + Glean, including Turnkey agents, are never orphaned. Any other value + returns 400. """ diff --git a/src/glean/api_client/models/platformagentupdaterequest.py b/src/glean/api_client/models/platformagentupdaterequest.py index 80f0d5b1a..526ebbbba 100644 --- a/src/glean/api_client/models/platformagentupdaterequest.py +++ b/src/glean/api_client/models/platformagentupdaterequest.py @@ -45,23 +45,31 @@ class PlatformAgentUpdateRequestTypedDict(TypedDict): instructions: NotRequired[str] r"""System prompt the agent follows.""" skills: NotRequired[List[PlatformAgentSkillTypedDict]] - r"""Skills defined inline.""" + r"""Skills defined inline. The supplied list replaces the entire saved list. + + """ dependencies: NotRequired[List[PlatformAgentDependencyTypedDict]] - r"""Published artifacts referenced by platform ID. Their content is not inlined in `skills` or `subagents`. + r"""Published artifacts referenced by platform ID. Their content is not inlined in `skills` or `subagents`. The supplied list replaces the entire saved list. """ tools: NotRequired[List[PlatformAgentToolsetTypedDict]] - r"""Tool providers and the subset of their tools available to the agent.""" + r"""Tool providers and the subset of their tools available to the agent. The supplied list replaces the entire saved list. + + """ glean_search_config: NotRequired[Nullable[PlatformAgentGleanSearchConfigTypedDict]] - r"""Glean Search configuration. Send `null` to turn off Glean Search.""" + r"""Glean Search configuration. The supplied object replaces the entire saved configuration, including `datasource_instances` and `urls`, so omitted fields are not kept. Send `null` to turn off Glean Search. + + """ model: NotRequired[PlatformAgentLlmModelTypedDict] r"""Agentic model the agent runs on and its reasoning effort.""" service_credentials: NotRequired[List[PlatformAgentServiceCredentialTypedDict]] - r"""Service credentials the agent uses to call tools.""" + r"""Service credentials the agent uses to call tools. The supplied list replaces the entire saved list. + + """ channels: NotRequired[PlatformAgentChannelsTypedDict] r"""Messaging channels the agent is deployed to. Requires `use_agent_identity`.""" subagents: NotRequired[List[PlatformSubagentTypedDict]] - r"""Subagents the agent dispatches work to. Subagents cannot contain subagents. Keep a saved subagent's `subagent_id` to preserve it, and omit `subagent_id` to add a subagent. + r"""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: NotRequired[PlatformAgentTriggerTypedDict] @@ -81,30 +89,38 @@ class PlatformAgentUpdateRequest(BaseModel): r"""System prompt the agent follows.""" skills: Optional[List[PlatformAgentSkill]] = None - r"""Skills defined inline.""" + r"""Skills defined inline. The supplied list replaces the entire saved list. + + """ dependencies: Optional[List[PlatformAgentDependency]] = None - r"""Published artifacts referenced by platform ID. Their content is not inlined in `skills` or `subagents`. + r"""Published artifacts referenced by platform ID. Their content is not inlined in `skills` or `subagents`. The supplied list replaces the entire saved list. """ tools: Optional[List[PlatformAgentToolset]] = None - r"""Tool providers and the subset of their tools available to the agent.""" + r"""Tool providers and the subset of their tools available to the agent. The supplied list replaces the entire saved list. + + """ glean_search_config: OptionalNullable[PlatformAgentGleanSearchConfig] = UNSET - r"""Glean Search configuration. Send `null` to turn off Glean Search.""" + r"""Glean Search configuration. The supplied object replaces the entire saved configuration, including `datasource_instances` and `urls`, so omitted fields are not kept. Send `null` to turn off Glean Search. + + """ model: Optional[PlatformAgentLlmModel] = None r"""Agentic model the agent runs on and its reasoning effort.""" service_credentials: Optional[List[PlatformAgentServiceCredential]] = None - r"""Service credentials the agent uses to call tools.""" + r"""Service credentials the agent uses to call tools. The supplied list replaces the entire saved list. + + """ channels: Optional[PlatformAgentChannels] = None r"""Messaging channels the agent is deployed to. Requires `use_agent_identity`.""" subagents: Optional[List[PlatformSubagent]] = None - r"""Subagents the agent dispatches work to. Subagents cannot contain subagents. Keep a saved subagent's `subagent_id` to preserve it, and omit `subagent_id` to add a subagent. + r"""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. """ diff --git a/src/glean/api_client/models/platformanonymousauthtoken.py b/src/glean/api_client/models/platformanonymousauthtoken.py new file mode 100644 index 000000000..9da734425 --- /dev/null +++ b/src/glean/api_client/models/platformanonymousauthtoken.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: d6ed962e28a2 + +from __future__ import annotations +from datetime import datetime +from glean.api_client.types import BaseModel +from typing_extensions import TypedDict + + +class PlatformAnonymousAuthTokenTypedDict(TypedDict): + r"""A short-lived auth token for anonymous external search.""" + + token: str + r"""The auth token. Treat it as a secret until it expires, and do not log it. + + """ + expires_at: datetime + r"""When the auth token expires.""" + + +class PlatformAnonymousAuthToken(BaseModel): + r"""A short-lived auth token for anonymous external search.""" + + token: str + r"""The auth token. Treat it as a secret until it expires, and do not log it. + + """ + + expires_at: datetime + r"""When the auth token expires.""" diff --git a/src/glean/api_client/models/platformcreateanonymousauthtokenresponse.py b/src/glean/api_client/models/platformcreateanonymousauthtokenresponse.py new file mode 100644 index 000000000..9bb13ec74 --- /dev/null +++ b/src/glean/api_client/models/platformcreateanonymousauthtokenresponse.py @@ -0,0 +1,29 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 0a1839458aab + +from __future__ import annotations +from .platformanonymousauthtoken import ( + PlatformAnonymousAuthToken, + PlatformAnonymousAuthTokenTypedDict, +) +from glean.api_client.types import BaseModel +from typing_extensions import TypedDict + + +class PlatformCreateAnonymousAuthTokenResponseTypedDict(TypedDict): + r"""The anonymous auth token that was created.""" + + anonymous_auth_token: PlatformAnonymousAuthTokenTypedDict + r"""A short-lived auth token for anonymous external search.""" + request_id: str + r"""Platform-generated request ID for support correlation.""" + + +class PlatformCreateAnonymousAuthTokenResponse(BaseModel): + r"""The anonymous auth token that was created.""" + + anonymous_auth_token: PlatformAnonymousAuthToken + r"""A short-lived auth token for anonymous external search.""" + + request_id: str + r"""Platform-generated request ID for support correlation.""" diff --git a/src/glean/api_client/models/platformmodel.py b/src/glean/api_client/models/platformmodel.py new file mode 100644 index 000000000..b7203e66e --- /dev/null +++ b/src/glean/api_client/models/platformmodel.py @@ -0,0 +1,83 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 15b73599b85d + +from __future__ import annotations +from .platformmodelendpoints import ( + PlatformModelEndpoints, + PlatformModelEndpointsTypedDict, +) +from glean.api_client.types import ( + BaseModel, + UNSET_SENTINEL, + current_exclude_none, + serialize_with_info, +) +from glean.api_client.types.basemodel import current_filtered_dump +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class PlatformModelTypedDict(TypedDict): + r"""A model configured for the caller.""" + + id: str + r"""Opaque model identifier: the internal model enum name (for example `GPT5_6_LUNA`). Case-sensitive; never parse it. + + """ + display_name: str + r"""Human-readable name for the model.""" + creator: str + r"""Organization that created the model.""" + endpoints: PlatformModelEndpointsTypedDict + r"""The Platform endpoints that accept this model, one property per endpoint. A property is absent when that endpoint does not accept the model. For a caller that passes the access check, a model without `chat` is rejected at `/model` by `POST /api/chat`. Other request checks still apply. Clients must tolerate unknown properties. + + """ + description: NotRequired[str] + r"""Description of the model. Omitted when the deployment has none.""" + + +class PlatformModel(BaseModel): + r"""A model configured for the caller.""" + + id: str + r"""Opaque model identifier: the internal model enum name (for example `GPT5_6_LUNA`). Case-sensitive; never parse it. + + """ + + display_name: str + r"""Human-readable name for the model.""" + + creator: str + r"""Organization that created the model.""" + + endpoints: PlatformModelEndpoints + r"""The Platform endpoints that accept this model, one property per endpoint. A property is absent when that endpoint does not accept the model. For a caller that passes the access check, a model without `chat` is rejected at `/model` by `POST /api/chat`. Other request checks still apply. Clients must tolerate unknown properties. + + """ + + description: Optional[str] = None + r"""Description of the model. Omitted when the deployment has none.""" + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + optional_fields = set(["description"]) + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/glean/api_client/models/platformmodelchatendpoint.py b/src/glean/api_client/models/platformmodelchatendpoint.py new file mode 100644 index 000000000..d27f3256d --- /dev/null +++ b/src/glean/api_client/models/platformmodelchatendpoint.py @@ -0,0 +1,26 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: e6cfe86cf813 + +from __future__ import annotations +from .platformreasoningeffort import PlatformReasoningEffort +from glean.api_client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class PlatformModelChatEndpointTypedDict(TypedDict): + r"""The model is usable with Platform chat, and `POST /api/chat` accepts it as `model`. When `chat` is present, `POST /api/chat` does not reject the model at `/model`, except across a deployment change. Other request checks still apply, and the access check runs before the model check. Acceptance does not guarantee which model runs: deployment configuration can still run the turn on a different model, and agent routing and expert handoffs can delegate parts of a turn.""" + + reasoning_efforts: List[PlatformReasoningEffort] + r"""Reasoning efforts that `POST /api/chat` accepts for this model as `reasoning_effort`, ordered from least to most. The list comes from the chat decision for the caller. `POST /api/chat` does not reject a listed effort at `/reasoning_effort`, except across a deployment change. Other request checks still apply. An empty array means that the model accepts no `reasoning_effort`. Clients must tolerate unknown values. + + """ + + +class PlatformModelChatEndpoint(BaseModel): + r"""The model is usable with Platform chat, and `POST /api/chat` accepts it as `model`. When `chat` is present, `POST /api/chat` does not reject the model at `/model`, except across a deployment change. Other request checks still apply, and the access check runs before the model check. Acceptance does not guarantee which model runs: deployment configuration can still run the turn on a different model, and agent routing and expert handoffs can delegate parts of a turn.""" + + reasoning_efforts: List[PlatformReasoningEffort] + r"""Reasoning efforts that `POST /api/chat` accepts for this model as `reasoning_effort`, ordered from least to most. The list comes from the chat decision for the caller. `POST /api/chat` does not reject a listed effort at `/reasoning_effort`, except across a deployment change. Other request checks still apply. An empty array means that the model accepts no `reasoning_effort`. Clients must tolerate unknown values. + + """ diff --git a/src/glean/api_client/models/platformmodelendpoints.py b/src/glean/api_client/models/platformmodelendpoints.py new file mode 100644 index 000000000..afe2c96df --- /dev/null +++ b/src/glean/api_client/models/platformmodelendpoints.py @@ -0,0 +1,59 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 22d44128721c + +from __future__ import annotations +from .platformmodelchatendpoint import ( + PlatformModelChatEndpoint, + PlatformModelChatEndpointTypedDict, +) +from glean.api_client.types import ( + BaseModel, + UNSET_SENTINEL, + current_exclude_none, + serialize_with_info, +) +from glean.api_client.types.basemodel import current_filtered_dump +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class PlatformModelEndpointsTypedDict(TypedDict): + r"""The Platform endpoints that accept this model, one property per endpoint. A property is absent when that endpoint does not accept the model. For a caller that passes the access check, a model without `chat` is rejected at `/model` by `POST /api/chat`. Other request checks still apply. Clients must tolerate unknown properties.""" + + chat: NotRequired[PlatformModelChatEndpointTypedDict] + r"""The model is usable with Platform chat, and `POST /api/chat` accepts it as `model`. When `chat` is present, `POST /api/chat` does not reject the model at `/model`, except across a deployment change. Other request checks still apply, and the access check runs before the model check. Acceptance does not guarantee which model runs: deployment configuration can still run the turn on a different model, and agent routing and expert handoffs can delegate parts of a turn. + + """ + + +class PlatformModelEndpoints(BaseModel): + r"""The Platform endpoints that accept this model, one property per endpoint. A property is absent when that endpoint does not accept the model. For a caller that passes the access check, a model without `chat` is rejected at `/model` by `POST /api/chat`. Other request checks still apply. Clients must tolerate unknown properties.""" + + chat: Optional[PlatformModelChatEndpoint] = None + r"""The model is usable with Platform chat, and `POST /api/chat` accepts it as `model`. When `chat` is present, `POST /api/chat` does not reject the model at `/model`, except across a deployment change. Other request checks still apply, and the access check runs before the model check. Acceptance does not guarantee which model runs: deployment configuration can still run the turn on a different model, and agent routing and expert handoffs can delegate parts of a turn. + + """ + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + optional_fields = set(["chat"]) + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/glean/api_client/models/platformmodelslistresponse.py b/src/glean/api_client/models/platformmodelslistresponse.py new file mode 100644 index 000000000..f2e789aa3 --- /dev/null +++ b/src/glean/api_client/models/platformmodelslistresponse.py @@ -0,0 +1,66 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: c346eefbc295 + +from __future__ import annotations +from .platformmodel import PlatformModel, PlatformModelTypedDict +from glean.api_client.types import ( + BaseModel, + Nullable, + UNSET_SENTINEL, + current_exclude_none, + serialize_with_info, +) +from glean.api_client.types.basemodel import current_filtered_dump +from pydantic import model_serializer +from typing import List +from typing_extensions import TypedDict + + +class PlatformModelsListResponseTypedDict(TypedDict): + r"""A paginated list of models configured for the caller.""" + + results: List[PlatformModelTypedDict] + r"""Models configured for the caller, ordered by `id`.""" + has_more: bool + r"""Whether additional results are available.""" + next_cursor: Nullable[str] + r"""Cursor for the next page, or null when no more results are available.""" + request_id: str + r"""Platform-generated request ID for support correlation.""" + + +class PlatformModelsListResponse(BaseModel): + r"""A paginated list of models configured for the caller.""" + + results: List[PlatformModel] + r"""Models configured for the caller, ordered by `id`.""" + + has_more: bool + r"""Whether additional results are available.""" + + next_cursor: Nullable[str] + r"""Cursor for the next page, or null when no more results are available.""" + + request_id: str + r"""Platform-generated request ID for support correlation.""" + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/glean/api_client/models/platformreasoningeffort.py b/src/glean/api_client/models/platformreasoningeffort.py new file mode 100644 index 000000000..5b395feea --- /dev/null +++ b/src/glean/api_client/models/platformreasoningeffort.py @@ -0,0 +1,18 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 6ea219681ed2 + +from __future__ import annotations +from enum import Enum +from glean.api_client import utils + + +class PlatformReasoningEffort(str, Enum, metaclass=utils.OpenEnumMeta): + r"""How much reasoning a model applies to a turn, from least effort to most.""" + + NONE = "NONE" + MINIMAL = "MINIMAL" + LOW = "LOW" + MEDIUM = "MEDIUM" + HIGH = "HIGH" + XHIGH = "XHIGH" + MAX = "MAX" diff --git a/src/glean/api_client/models_.py b/src/glean/api_client/models_.py new file mode 100644 index 000000000..9b63d0b26 --- /dev/null +++ b/src/glean/api_client/models_.py @@ -0,0 +1,238 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: f29d3a399c2f + +from .basesdk import BaseSDK +from glean.api_client import errors, models, utils +from glean.api_client._hooks import HookContext +from glean.api_client.types import OptionalNullable, UNSET +from glean.api_client.utils import get_security_from_env +from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, Mapping, Optional + + +class Models(BaseSDK): + def list( + self, + *, + page_size: Optional[int] = 20, + cursor: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PlatformModelsListResponse: + r"""List models + + Lists the models that the deployment configures for the caller. `endpoints` reports which Platform endpoints accept each model. For a caller that passes the access check, a model without `endpoints.chat` is rejected at `/model`. Other request checks still apply. + + + :param page_size: Maximum number of models to return. Defaults to 20. Maximum is 100. + :param cursor: Opaque pagination cursor from a previous response. Cursors do not expire. + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PlatformModelsListRequest( + page_size=page_size, + cursor=cursor, + ) + + req = self._build_request( + method="GET", + path="/api/models", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="platform-models-list", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Models"], + extensions={ + "x-glean-release": {"introduced": "2026-10-07", "stage": "beta"}, + "x-glean-scopes": { + "legacy": ["MODELS"], + "platform": ["models:read"], + }, + "x-visibility": "Public", + }, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.PlatformModelsListResponse, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "408", "429"], + "application/problem+json", + ): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, ["500", "503"], "application/problem+json"): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) + + async def list_async( + self, + *, + page_size: Optional[int] = 20, + cursor: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PlatformModelsListResponse: + r"""List models + + Lists the models that the deployment configures for the caller. `endpoints` reports which Platform endpoints accept each model. For a caller that passes the access check, a model without `endpoints.chat` is rejected at `/model`. Other request checks still apply. + + + :param page_size: Maximum number of models to return. Defaults to 20. Maximum is 100. + :param cursor: Opaque pagination cursor from a previous response. Cursors do not expire. + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PlatformModelsListRequest( + page_size=page_size, + cursor=cursor, + ) + + req = self._build_request_async( + method="GET", + path="/api/models", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="platform-models-list", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Models"], + extensions={ + "x-glean-release": {"introduced": "2026-10-07", "stage": "beta"}, + "x-glean-scopes": { + "legacy": ["MODELS"], + "platform": ["models:read"], + }, + "x-visibility": "Public", + }, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.PlatformModelsListResponse, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "408", "429"], + "application/problem+json", + ): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, ["500", "503"], "application/problem+json"): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) diff --git a/src/glean/api_client/people.py b/src/glean/api_client/people.py index 02f260b9c..a3908d2be 100644 --- a/src/glean/api_client/people.py +++ b/src/glean/api_client/people.py @@ -4,6 +4,10 @@ from .basesdk import BaseSDK from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import ( + employeeinfodefinition as models_employeeinfodefinition, + teaminfodefinition as models_teaminfodefinition, +) from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -426,7 +430,8 @@ def index( self, *, employee: Union[ - models.EmployeeInfoDefinition, models.EmployeeInfoDefinitionTypedDict + models_employeeinfodefinition.EmployeeInfoDefinition, + models_employeeinfodefinition.EmployeeInfoDefinitionTypedDict, ], version: Optional[int] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -520,7 +525,8 @@ async def index_async( self, *, employee: Union[ - models.EmployeeInfoDefinition, models.EmployeeInfoDefinitionTypedDict + models_employeeinfodefinition.EmployeeInfoDefinition, + models_employeeinfodefinition.EmployeeInfoDefinitionTypedDict, ], version: Optional[int] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -618,8 +624,8 @@ def bulk_index( *, upload_id: str, employees: Union[ - Iterable[models.EmployeeInfoDefinition], - Iterable[models.EmployeeInfoDefinitionTypedDict], + Iterable[models_employeeinfodefinition.EmployeeInfoDefinition], + Iterable[models_employeeinfodefinition.EmployeeInfoDefinitionTypedDict], ], is_first_page: Optional[bool] = None, is_last_page: Optional[bool] = None, @@ -739,8 +745,8 @@ async def bulk_index_async( *, upload_id: str, employees: Union[ - Iterable[models.EmployeeInfoDefinition], - Iterable[models.EmployeeInfoDefinitionTypedDict], + Iterable[models_employeeinfodefinition.EmployeeInfoDefinition], + Iterable[models_employeeinfodefinition.EmployeeInfoDefinitionTypedDict], ], is_first_page: Optional[bool] = None, is_last_page: Optional[bool] = None, @@ -1199,7 +1205,10 @@ async def delete_async( def index_team( self, *, - team: Union[models.TeamInfoDefinition, models.TeamInfoDefinitionTypedDict], + team: Union[ + models_teaminfodefinition.TeamInfoDefinition, + models_teaminfodefinition.TeamInfoDefinitionTypedDict, + ], version: Optional[int] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -1291,7 +1300,10 @@ def index_team( async def index_team_async( self, *, - team: Union[models.TeamInfoDefinition, models.TeamInfoDefinitionTypedDict], + team: Union[ + models_teaminfodefinition.TeamInfoDefinition, + models_teaminfodefinition.TeamInfoDefinitionTypedDict, + ], version: Optional[int] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -1563,8 +1575,8 @@ def bulk_index_teams( *, upload_id: str, teams: Union[ - Iterable[models.TeamInfoDefinition], - Iterable[models.TeamInfoDefinitionTypedDict], + Iterable[models_teaminfodefinition.TeamInfoDefinition], + Iterable[models_teaminfodefinition.TeamInfoDefinitionTypedDict], ], is_first_page: Optional[bool] = None, is_last_page: Optional[bool] = None, @@ -1667,8 +1679,8 @@ async def bulk_index_teams_async( *, upload_id: str, teams: Union[ - Iterable[models.TeamInfoDefinition], - Iterable[models.TeamInfoDefinitionTypedDict], + Iterable[models_teaminfodefinition.TeamInfoDefinition], + Iterable[models_teaminfodefinition.TeamInfoDefinitionTypedDict], ], is_first_page: Optional[bool] = None, is_last_page: Optional[bool] = None, diff --git a/src/glean/api_client/pins.py b/src/glean/api_client/pins.py index ab2043170..5c3db3cd2 100644 --- a/src/glean/api_client/pins.py +++ b/src/glean/api_client/pins.py @@ -4,6 +4,10 @@ from .basesdk import BaseSDK from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import ( + facetfilter as models_facetfilter, + listpinsop as models_listpinsop, +) from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -17,7 +21,10 @@ def update( locale: Optional[str] = None, queries: Optional[Iterable[str]] = None, audience_filters: Optional[ - Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] + Union[ + Iterable[models_facetfilter.FacetFilter], + Iterable[models_facetfilter.FacetFilterTypedDict], + ] ] = None, id: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -125,7 +132,10 @@ async def update_async( locale: Optional[str] = None, queries: Optional[Iterable[str]] = None, audience_filters: Optional[ - Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] + Union[ + Iterable[models_facetfilter.FacetFilter], + Iterable[models_facetfilter.FacetFilterTypedDict], + ] ] = None, id: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -427,7 +437,8 @@ def list( self, *, request_body: Union[ - models.ListpinsRequestBody, models.ListpinsRequestBodyTypedDict + models_listpinsop.ListpinsRequestBody, + models_listpinsop.ListpinsRequestBodyTypedDict, ], locale: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -527,7 +538,8 @@ async def list_async( self, *, request_body: Union[ - models.ListpinsRequestBody, models.ListpinsRequestBodyTypedDict + models_listpinsop.ListpinsRequestBody, + models_listpinsop.ListpinsRequestBodyTypedDict, ], locale: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -629,7 +641,10 @@ def create( locale: Optional[str] = None, queries: Optional[Iterable[str]] = None, audience_filters: Optional[ - Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] + Union[ + Iterable[models_facetfilter.FacetFilter], + Iterable[models_facetfilter.FacetFilterTypedDict], + ] ] = None, document_id: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -737,7 +752,10 @@ async def create_async( locale: Optional[str] = None, queries: Optional[Iterable[str]] = None, audience_filters: Optional[ - Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] + Union[ + Iterable[models_facetfilter.FacetFilter], + Iterable[models_facetfilter.FacetFilterTypedDict], + ] ] = None, document_id: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, diff --git a/src/glean/api_client/policies.py b/src/glean/api_client/policies.py index 0fc83f5d8..6c1d183c4 100644 --- a/src/glean/api_client/policies.py +++ b/src/glean/api_client/policies.py @@ -4,6 +4,11 @@ from .basesdk import BaseSDK from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import ( + dlpconfig as models_dlpconfig, + dlpfrequency as models_dlpfrequency, + dlpreportstatus as models_dlpreportstatus, +) from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -199,9 +204,11 @@ def update( self, *, id: str, - config: Optional[Union[models.DlpConfig, models.DlpConfigTypedDict]] = None, - frequency: Optional[models.DlpFrequency] = None, - status: Optional[models.DlpReportStatus] = None, + config: Optional[ + Union[models_dlpconfig.DlpConfig, models_dlpconfig.DlpConfigTypedDict] + ] = None, + frequency: Optional[models_dlpfrequency.DlpFrequency] = None, + status: Optional[models_dlpreportstatus.DlpReportStatus] = None, auto_hide_docs: Optional[bool] = None, report_name: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -312,9 +319,11 @@ async def update_async( self, *, id: str, - config: Optional[Union[models.DlpConfig, models.DlpConfigTypedDict]] = None, - frequency: Optional[models.DlpFrequency] = None, - status: Optional[models.DlpReportStatus] = None, + config: Optional[ + Union[models_dlpconfig.DlpConfig, models_dlpconfig.DlpConfigTypedDict] + ] = None, + frequency: Optional[models_dlpfrequency.DlpFrequency] = None, + status: Optional[models_dlpreportstatus.DlpReportStatus] = None, auto_hide_docs: Optional[bool] = None, report_name: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -609,8 +618,10 @@ def create( self, *, name: Optional[str] = None, - config: Optional[Union[models.DlpConfig, models.DlpConfigTypedDict]] = None, - frequency: Optional[models.DlpFrequency] = None, + config: Optional[ + Union[models_dlpconfig.DlpConfig, models_dlpconfig.DlpConfigTypedDict] + ] = None, + frequency: Optional[models_dlpfrequency.DlpFrequency] = None, auto_hide_docs: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -710,8 +721,10 @@ async def create_async( self, *, name: Optional[str] = None, - config: Optional[Union[models.DlpConfig, models.DlpConfigTypedDict]] = None, - frequency: Optional[models.DlpFrequency] = None, + config: Optional[ + Union[models_dlpconfig.DlpConfig, models_dlpconfig.DlpConfigTypedDict] + ] = None, + frequency: Optional[models_dlpfrequency.DlpFrequency] = None, auto_hide_docs: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, diff --git a/src/glean/api_client/reports.py b/src/glean/api_client/reports.py index b7c827079..542a090bb 100644 --- a/src/glean/api_client/reports.py +++ b/src/glean/api_client/reports.py @@ -4,6 +4,7 @@ from .basesdk import BaseSDK from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import dlpconfig as models_dlpconfig from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -14,7 +15,9 @@ class Reports(BaseSDK): def create( self, *, - config: Optional[Union[models.DlpConfig, models.DlpConfigTypedDict]] = None, + config: Optional[ + Union[models_dlpconfig.DlpConfig, models_dlpconfig.DlpConfigTypedDict] + ] = None, frequency: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -109,7 +112,9 @@ def create( async def create_async( self, *, - config: Optional[Union[models.DlpConfig, models.DlpConfigTypedDict]] = None, + config: Optional[ + Union[models_dlpconfig.DlpConfig, models_dlpconfig.DlpConfigTypedDict] + ] = None, frequency: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, diff --git a/src/glean/api_client/sdk.py b/src/glean/api_client/sdk.py index f294e6d0b..e6c70c905 100644 --- a/src/glean/api_client/sdk.py +++ b/src/glean/api_client/sdk.py @@ -18,11 +18,13 @@ if TYPE_CHECKING: from glean.api_client.admin import Admin from glean.api_client.agents import Agents + from glean.api_client.anonymousauthtokens import Anonymousauthtokens from glean.api_client.chat_sdk import ChatSDK from glean.api_client.client import Client from glean.api_client.departments import Departments from glean.api_client.documents_sdk import DocumentsSDK from glean.api_client.indexing import Indexing + from glean.api_client.models_ import Models from glean.api_client.search import Search from glean.api_client.skills import Skills from glean.api_client.triggers import Triggers @@ -51,10 +53,12 @@ class Glean(BaseSDK): agents: "Agents" chat: "ChatSDK" + models: "Models" skills: "Skills" search: "Search" admin: "Admin" departments: "Departments" + anonymousauthtokens: "Anonymousauthtokens" users: "Users" documents: "DocumentsSDK" triggers: "Triggers" @@ -63,10 +67,15 @@ class Glean(BaseSDK): _sub_sdk_map = { "agents": ("glean.api_client.agents", "Agents"), "chat": ("glean.api_client.chat_sdk", "ChatSDK"), + "models": ("glean.api_client.models_", "Models"), "skills": ("glean.api_client.skills", "Skills"), "search": ("glean.api_client.search", "Search"), "admin": ("glean.api_client.admin", "Admin"), "departments": ("glean.api_client.departments", "Departments"), + "anonymousauthtokens": ( + "glean.api_client.anonymousauthtokens", + "Anonymousauthtokens", + ), "users": ("glean.api_client.users", "Users"), "documents": ("glean.api_client.documents_sdk", "DocumentsSDK"), "triggers": ("glean.api_client.triggers", "Triggers"), diff --git a/src/glean/api_client/search.py b/src/glean/api_client/search.py index 4a1568231..7d8c07a05 100644 --- a/src/glean/api_client/search.py +++ b/src/glean/api_client/search.py @@ -4,6 +4,10 @@ from .basesdk import BaseSDK from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import ( + platformfilter as models_platformfilter, + platformtimerange as models_platformtimerange, +) from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -20,12 +24,15 @@ def query( datasources: Optional[Iterable[str]] = None, filters: Optional[ Union[ - Iterable[models.PlatformFilter], - Iterable[models.PlatformFilterTypedDict], + Iterable[models_platformfilter.PlatformFilter], + Iterable[models_platformfilter.PlatformFilterTypedDict], ] ] = None, time_range: Optional[ - Union[models.PlatformTimeRange, models.PlatformTimeRangeTypedDict] + Union[ + models_platformtimerange.PlatformTimeRange, + models_platformtimerange.PlatformTimeRangeTypedDict, + ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -164,12 +171,15 @@ async def query_async( datasources: Optional[Iterable[str]] = None, filters: Optional[ Union[ - Iterable[models.PlatformFilter], - Iterable[models.PlatformFilterTypedDict], + Iterable[models_platformfilter.PlatformFilter], + Iterable[models_platformfilter.PlatformFilterTypedDict], ] ] = None, time_range: Optional[ - Union[models.PlatformTimeRange, models.PlatformTimeRangeTypedDict] + Union[ + models_platformtimerange.PlatformTimeRange, + models_platformtimerange.PlatformTimeRangeTypedDict, + ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, diff --git a/src/glean/api_client/skills.py b/src/glean/api_client/skills.py index e6b272dec..444b4c5dd 100644 --- a/src/glean/api_client/skills.py +++ b/src/glean/api_client/skills.py @@ -4,6 +4,12 @@ from .basesdk import BaseSDK from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import ( + platformskillcreaterequest as models_platformskillcreaterequest, + platformskillupdatestatus as models_platformskillupdatestatus, + platformskillvalidationrequest as models_platformskillvalidationrequest, + platformskillversioncreaterequest as models_platformskillversioncreaterequest, +) from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import eventstreaming, get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -15,8 +21,8 @@ def create( self, *, file: Union[ - models.PlatformSkillCreateRequestFile, - models.PlatformSkillCreateRequestFileTypedDict, + models_platformskillcreaterequest.PlatformSkillCreateRequestFile, + models_platformskillcreaterequest.PlatformSkillCreateRequestFileTypedDict, ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -130,8 +136,8 @@ async def create_async( self, *, file: Union[ - models.PlatformSkillCreateRequestFile, - models.PlatformSkillCreateRequestFileTypedDict, + models_platformskillcreaterequest.PlatformSkillCreateRequestFile, + models_platformskillcreaterequest.PlatformSkillCreateRequestFileTypedDict, ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -709,8 +715,8 @@ def validate( self, *, file: Union[ - models.PlatformSkillValidationRequestFile, - models.PlatformSkillValidationRequestFileTypedDict, + models_platformskillvalidationrequest.PlatformSkillValidationRequestFile, + models_platformskillvalidationrequest.PlatformSkillValidationRequestFileTypedDict, ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -832,8 +838,8 @@ async def validate_async( self, *, file: Union[ - models.PlatformSkillValidationRequestFile, - models.PlatformSkillValidationRequestFileTypedDict, + models_platformskillvalidationrequest.PlatformSkillValidationRequestFile, + models_platformskillvalidationrequest.PlatformSkillValidationRequestFileTypedDict, ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -1199,7 +1205,7 @@ def update( self, *, skill_id: str, - status: models.PlatformSkillUpdateStatus, + status: models_platformskillupdatestatus.PlatformSkillUpdateStatus, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -1321,7 +1327,7 @@ async def update_async( self, *, skill_id: str, - status: models.PlatformSkillUpdateStatus, + status: models_platformskillupdatestatus.PlatformSkillUpdateStatus, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -2350,8 +2356,8 @@ def create_version( *, skill_id: str, file: Union[ - models.PlatformSkillVersionCreateRequestFile, - models.PlatformSkillVersionCreateRequestFileTypedDict, + models_platformskillversioncreaterequest.PlatformSkillVersionCreateRequestFile, + models_platformskillversioncreaterequest.PlatformSkillVersionCreateRequestFileTypedDict, ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -2478,8 +2484,8 @@ async def create_version_async( *, skill_id: str, file: Union[ - models.PlatformSkillVersionCreateRequestFile, - models.PlatformSkillVersionCreateRequestFileTypedDict, + models_platformskillversioncreaterequest.PlatformSkillVersionCreateRequestFile, + models_platformskillversioncreaterequest.PlatformSkillVersionCreateRequestFileTypedDict, ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, diff --git a/src/glean/api_client/tools.py b/src/glean/api_client/tools.py index 4d0d76953..b0de42347 100644 --- a/src/glean/api_client/tools.py +++ b/src/glean/api_client/tools.py @@ -4,6 +4,7 @@ from .basesdk import BaseSDK from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import toolscallparameter as models_toolscallparameter from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -194,8 +195,8 @@ def run( *, name: str, parameters: Union[ - Mapping[str, models.ToolsCallParameter], - Mapping[str, models.ToolsCallParameterTypedDict], + Mapping[str, models_toolscallparameter.ToolsCallParameter], + Mapping[str, models_toolscallparameter.ToolsCallParameterTypedDict], ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -294,8 +295,8 @@ async def run_async( *, name: str, parameters: Union[ - Mapping[str, models.ToolsCallParameter], - Mapping[str, models.ToolsCallParameterTypedDict], + Mapping[str, models_toolscallparameter.ToolsCallParameter], + Mapping[str, models_toolscallparameter.ToolsCallParameterTypedDict], ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, diff --git a/src/glean/api_client/triggers.py b/src/glean/api_client/triggers.py index a8a4e2853..0528d9158 100644 --- a/src/glean/api_client/triggers.py +++ b/src/glean/api_client/triggers.py @@ -4,6 +4,10 @@ from .basesdk import BaseSDK from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import ( + platformtriggerdelivery as models_platformtriggerdelivery, + platformtriggerstatus as models_platformtriggerstatus, +) from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -16,7 +20,8 @@ def create( *, preset_id: str, delivery: Union[ - models.PlatformTriggerDelivery, models.PlatformTriggerDeliveryTypedDict + models_platformtriggerdelivery.PlatformTriggerDelivery, + models_platformtriggerdelivery.PlatformTriggerDeliveryTypedDict, ], description: Optional[str] = None, inputs: Optional[Mapping[str, Any]] = None, @@ -142,7 +147,8 @@ async def create_async( *, preset_id: str, delivery: Union[ - models.PlatformTriggerDelivery, models.PlatformTriggerDeliveryTypedDict + models_platformtriggerdelivery.PlatformTriggerDelivery, + models_platformtriggerdelivery.PlatformTriggerDeliveryTypedDict, ], description: Optional[str] = None, inputs: Optional[Mapping[str, Any]] = None, @@ -705,12 +711,13 @@ def update( self, *, trigger_id: str, - status: Optional[models.PlatformTriggerStatus] = None, + status: Optional[models_platformtriggerstatus.PlatformTriggerStatus] = None, description: Optional[str] = None, inputs: Optional[Mapping[str, Any]] = None, delivery: Optional[ Union[ - models.PlatformTriggerDelivery, models.PlatformTriggerDeliveryTypedDict + models_platformtriggerdelivery.PlatformTriggerDelivery, + models_platformtriggerdelivery.PlatformTriggerDeliveryTypedDict, ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -842,12 +849,13 @@ async def update_async( self, *, trigger_id: str, - status: Optional[models.PlatformTriggerStatus] = None, + status: Optional[models_platformtriggerstatus.PlatformTriggerStatus] = None, description: Optional[str] = None, inputs: Optional[Mapping[str, Any]] = None, delivery: Optional[ Union[ - models.PlatformTriggerDelivery, models.PlatformTriggerDeliveryTypedDict + models_platformtriggerdelivery.PlatformTriggerDelivery, + models_platformtriggerdelivery.PlatformTriggerDeliveryTypedDict, ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, diff --git a/src/glean/api_client/users.py b/src/glean/api_client/users.py index 8f9e682e5..2e13bdb51 100644 --- a/src/glean/api_client/users.py +++ b/src/glean/api_client/users.py @@ -4,6 +4,10 @@ from .basesdk import BaseSDK from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import ( + platformuserfilter as models_platformuserfilter, + platformuserinclude as models_platformuserinclude, +) from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -18,11 +22,13 @@ def list( cursor: Optional[str] = None, filters: Optional[ Union[ - Iterable[models.PlatformUserFilter], - Iterable[models.PlatformUserFilterTypedDict], + Iterable[models_platformuserfilter.PlatformUserFilter], + Iterable[models_platformuserfilter.PlatformUserFilterTypedDict], ] ] = None, - include: Optional[Iterable[models.PlatformUserInclude]] = None, + include: Optional[ + Iterable[models_platformuserinclude.PlatformUserInclude] + ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -148,11 +154,13 @@ async def list_async( cursor: Optional[str] = None, filters: Optional[ Union[ - Iterable[models.PlatformUserFilter], - Iterable[models.PlatformUserFilterTypedDict], + Iterable[models_platformuserfilter.PlatformUserFilter], + Iterable[models_platformuserfilter.PlatformUserFilterTypedDict], ] ] = None, - include: Optional[Iterable[models.PlatformUserInclude]] = None, + include: Optional[ + Iterable[models_platformuserinclude.PlatformUserInclude] + ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -275,7 +283,9 @@ def get( self, *, user_id: str, - include: Optional[Iterable[models.PlatformUserInclude]] = None, + include: Optional[ + Iterable[models_platformuserinclude.PlatformUserInclude] + ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -390,7 +400,9 @@ async def get_async( self, *, user_id: str, - include: Optional[Iterable[models.PlatformUserInclude]] = None, + include: Optional[ + Iterable[models_platformuserinclude.PlatformUserInclude] + ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, diff --git a/src/glean/api_client/visibilityoverrides.py b/src/glean/api_client/visibilityoverrides.py index 0b84388ed..b8e63b05e 100644 --- a/src/glean/api_client/visibilityoverrides.py +++ b/src/glean/api_client/visibilityoverrides.py @@ -4,6 +4,9 @@ from .basesdk import BaseSDK from glean.api_client import errors, models, utils from glean.api_client._hooks import HookContext +from glean.api_client.models import ( + documentvisibilityoverride as models_documentvisibilityoverride, +) from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response @@ -198,8 +201,10 @@ def create( *, visibility_overrides: Optional[ Union[ - Iterable[models.DocumentVisibilityOverride], - Iterable[models.DocumentVisibilityOverrideTypedDict], + Iterable[models_documentvisibilityoverride.DocumentVisibilityOverride], + Iterable[ + models_documentvisibilityoverride.DocumentVisibilityOverrideTypedDict + ], ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -303,8 +308,10 @@ async def create_async( *, visibility_overrides: Optional[ Union[ - Iterable[models.DocumentVisibilityOverride], - Iterable[models.DocumentVisibilityOverrideTypedDict], + Iterable[models_documentvisibilityoverride.DocumentVisibilityOverride], + Iterable[ + models_documentvisibilityoverride.DocumentVisibilityOverrideTypedDict + ], ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, diff --git a/tests/mockserver/internal/handler/generated_handlers.go b/tests/mockserver/internal/handler/generated_handlers.go index 4799cec19..6b63ed70c 100644 --- a/tests/mockserver/internal/handler/generated_handlers.go +++ b/tests/mockserver/internal/handler/generated_handlers.go @@ -27,6 +27,7 @@ func GeneratedHandlers(ctx context.Context, dir *logging.HTTPFileDirectory, rt * NewGeneratedHandler(ctx, http.MethodGet, "/api/departments/{department_id}", pathGetAPIDepartmentsDepartmentID(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/api/documents", pathGetAPIDocuments(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/api/documents/{document_id}", pathGetAPIDocumentsDocumentID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/api/models", pathGetAPIModels(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/api/search/filters", pathGetAPISearchFilters(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/api/skills", pathGetAPISkills(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/api/skills/{skill_id}", pathGetAPISkillsSkillID(dir, rt)), @@ -51,6 +52,7 @@ func GeneratedHandlers(ctx context.Context, dir *logging.HTTPFileDirectory, rt * NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/governance/data/findings/exports", pathGetRestAPIV1GovernanceDataFindingsExports(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/governance/data/policies", pathGetRestAPIV1GovernanceDataPolicies(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/governance/data/policies/{id}", pathGetRestAPIV1GovernanceDataPoliciesID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/images", pathGetRestAPIV1Images(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/people/{person_id}/photo", pathGetRestAPIV1PeoplePersonIDPhoto(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/tool-servers/{serverId}/auth", pathGetRestAPIV1ToolServersServerIDAuth(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/tool-servers/{serverId}/tools", pathGetRestAPIV1ToolServersServerIDTools(dir, rt)), @@ -65,6 +67,7 @@ func GeneratedHandlers(ctx context.Context, dir *logging.HTTPFileDirectory, rt * NewGeneratedHandler(ctx, http.MethodPost, "/api/agents/{agent_id}/cancellations", pathPostAPIAgentsAgentIDCancellations(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/api/agents/{agent_id}/responses", pathPostAPIAgentsAgentIDResponses(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/api/agents/{agent_id}/runs", pathPostAPIAgentsAgentIDRuns(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/api/anonymous-auth-tokens", pathPostAPIAnonymousAuthTokens(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/api/chat", pathPostAPIChat(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/api/chats/{chat_id}/cancellations", pathPostAPIChatsChatIDCancellations(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/api/documents/batch", pathPostAPIDocumentsBatch(dir, rt)), diff --git a/tests/mockserver/internal/handler/pathgetapimodels.go b/tests/mockserver/internal/handler/pathgetapimodels.go new file mode 100644 index 000000000..c1515da84 --- /dev/null +++ b/tests/mockserver/internal/handler/pathgetapimodels.go @@ -0,0 +1,76 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: d190cd929c5c + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetAPIModels(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "platform-models-list[0]": + dir.HandlerFunc("platform-models-list", testPlatformModelsListPlatformModelsList0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPlatformModelsListPlatformModelsList0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + var respBody *components.PlatformModelsListResponse = &components.PlatformModelsListResponse{ + Results: []components.PlatformModel{ + components.PlatformModel{ + ID: "GPT5_6_LUNA", + DisplayName: "Aliyah76", + Creator: "", + Endpoints: components.PlatformModelEndpoints{}, + }, + }, + HasMore: false, + NextCursor: types.String(""), + RequestID: "", + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathgetrestapiv1images.go b/tests/mockserver/internal/handler/pathgetrestapiv1images.go new file mode 100644 index 000000000..0cd658d3d --- /dev/null +++ b/tests/mockserver/internal/handler/pathgetrestapiv1images.go @@ -0,0 +1,52 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: c69c4f156542 + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/handler/values" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetRestAPIV1Images(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getImage[0]": + dir.HandlerFunc("getImage", testGetImageGetImage0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testGetImageGetImage0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.AcceptHeader(req, []string{"image/*"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBodyBytes := values.ReadFileToBytes("./testdata/example.file") + w.Header().Set("Content-Type", "image/*") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostapianonymousauthtokens.go b/tests/mockserver/internal/handler/pathpostapianonymousauthtokens.go new file mode 100644 index 000000000..a2d64347c --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostapianonymousauthtokens.go @@ -0,0 +1,70 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 32a0be7ec363 + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostAPIAnonymousAuthTokens(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "platform-anonymous-auth-tokens-create[0]": + dir.HandlerFunc("platform-anonymous-auth-tokens-create", testPlatformAnonymousAuthTokensCreatePlatformAnonymousAuthTokensCreate0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPlatformAnonymousAuthTokensCreatePlatformAnonymousAuthTokensCreate0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + var respBody *components.PlatformCreateAnonymousAuthTokenResponse = &components.PlatformCreateAnonymousAuthTokenResponse{ + AnonymousAuthToken: components.PlatformAnonymousAuthToken{ + Token: "", + ExpiresAt: types.MustTimeFromString("2026-08-31T08:43:32.756Z"), + }, + RequestID: "", + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusCreated) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/sdk/models/components/platformadminagentfilter.go b/tests/mockserver/internal/sdk/models/components/platformadminagentfilter.go index ecfc7be42..d34c4f86a 100644 --- a/tests/mockserver/internal/sdk/models/components/platformadminagentfilter.go +++ b/tests/mockserver/internal/sdk/models/components/platformadminagentfilter.go @@ -50,7 +50,20 @@ func (e *PlatformAdminAgentFilterOperator) UnmarshalJSON(data []byte) error { // PlatformAdminAgentFilter - A filter on one agent field. type PlatformAdminAgentFilter struct { - // The agent field to filter on. name matches agents whose name contains the value. description matches agents whose description contains the value. Matching ignores case and surrounding whitespace. Each value is at most 256 characters. + // What to filter on. + // - name: matches agents whose name contains the value, ignoring case and + // surrounding whitespace. Each value is at most 256 characters. + // + // - description: matches agents whose description contains the value, + // ignoring case and surrounding whitespace. Each value is at most 256 + // characters. + // + // - is_orphaned: "true" matches agents with no owner who is an active user, + // meaning a user who is still in the workspace's people directory. This + // includes agents owned only by identity-provider groups or departments and + // agents with no owner. "false" matches the other agents. Agents built by + // Glean, including Turnkey agents, are never orphaned. Any other value + // returns 400. // Field string `json:"field" queryParam:"name=field"` // The values to match. An agent matches when any value matches. diff --git a/tests/mockserver/internal/sdk/models/components/platformagentupdaterequest.go b/tests/mockserver/internal/sdk/models/components/platformagentupdaterequest.go index 588a5c570..3cf44a122 100644 --- a/tests/mockserver/internal/sdk/models/components/platformagentupdaterequest.go +++ b/tests/mockserver/internal/sdk/models/components/platformagentupdaterequest.go @@ -15,22 +15,26 @@ type PlatformAgentUpdateRequest struct { Description *string `json:"description,omitempty"` // System prompt the agent follows. Instructions *string `json:"instructions,omitempty"` - // Skills defined inline. + // Skills defined inline. The supplied list replaces the entire saved list. + // Skills []PlatformAgentSkill `json:"skills,omitempty"` - // Published artifacts referenced by platform ID. Their content is not inlined in `skills` or `subagents`. + // Published artifacts referenced by platform ID. Their content is not inlined in `skills` or `subagents`. The supplied list replaces the entire saved list. // Dependencies []PlatformAgentDependency `json:"dependencies,omitempty"` - // Tool providers and the subset of their tools available to the agent. + // Tool providers and the subset of their tools available to the agent. The supplied list replaces the entire saved list. + // Tools []PlatformAgentToolset `json:"tools,omitempty"` - // Glean Search configuration. Send `null` to turn off Glean Search. + // Glean Search configuration. The supplied object replaces the entire saved configuration, including `datasource_instances` and `urls`, so omitted fields are not kept. Send `null` to turn off Glean Search. + // GleanSearchConfig optionalnullable.OptionalNullable[PlatformAgentGleanSearchConfig] `json:"glean_search_config,omitempty"` // Agentic model the agent runs on and its reasoning effort. Model *PlatformAgentLlmModel `json:"model,omitempty"` - // Service credentials the agent uses to call tools. + // Service credentials the agent uses to call tools. The supplied list replaces the entire saved list. + // ServiceCredentials []PlatformAgentServiceCredential `json:"service_credentials,omitempty"` // Messaging channels the agent is deployed to. Requires `use_agent_identity`. Channels *PlatformAgentChannels `json:"channels,omitempty"` - // Subagents the agent dispatches work to. Subagents cannot contain subagents. Keep a saved subagent's `subagent_id` to preserve it, and omit `subagent_id` to add a subagent. + // 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. // Subagents []PlatformSubagent `json:"subagents,omitempty"` // How the agent is invoked. Applies to top-level agents only. diff --git a/tests/mockserver/internal/sdk/models/components/platformanonymousauthtoken.go b/tests/mockserver/internal/sdk/models/components/platformanonymousauthtoken.go new file mode 100644 index 000000000..bb2816c30 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformanonymousauthtoken.go @@ -0,0 +1,43 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 40614e5e590d + +package components + +import ( + "mockserver/internal/sdk/utils" + "time" +) + +// PlatformAnonymousAuthToken - A short-lived auth token for anonymous external search. +type PlatformAnonymousAuthToken struct { + // The auth token. Treat it as a secret until it expires, and do not log it. + // + Token string `json:"token"` + // When the auth token expires. + ExpiresAt time.Time `json:"expires_at"` +} + +func (p PlatformAnonymousAuthToken) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PlatformAnonymousAuthToken) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, []string{"token", "expires_at"}); err != nil { + return err + } + return nil +} + +func (o *PlatformAnonymousAuthToken) GetToken() string { + if o == nil { + return "" + } + return o.Token +} + +func (o *PlatformAnonymousAuthToken) GetExpiresAt() time.Time { + if o == nil { + return time.Time{} + } + return o.ExpiresAt +} diff --git a/tests/mockserver/internal/sdk/models/components/platformcreateanonymousauthtokenresponse.go b/tests/mockserver/internal/sdk/models/components/platformcreateanonymousauthtokenresponse.go new file mode 100644 index 000000000..78f039bfe --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformcreateanonymousauthtokenresponse.go @@ -0,0 +1,26 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: d52281c486cf + +package components + +// PlatformCreateAnonymousAuthTokenResponse - The anonymous auth token that was created. +type PlatformCreateAnonymousAuthTokenResponse struct { + // A short-lived auth token for anonymous external search. + AnonymousAuthToken PlatformAnonymousAuthToken `json:"anonymous_auth_token"` + // Platform-generated request ID for support correlation. + RequestID string `json:"request_id"` +} + +func (o *PlatformCreateAnonymousAuthTokenResponse) GetAnonymousAuthToken() PlatformAnonymousAuthToken { + if o == nil { + return PlatformAnonymousAuthToken{} + } + return o.AnonymousAuthToken +} + +func (o *PlatformCreateAnonymousAuthTokenResponse) GetRequestID() string { + if o == nil { + return "" + } + return o.RequestID +} diff --git a/tests/mockserver/internal/sdk/models/components/platformmodel.go b/tests/mockserver/internal/sdk/models/components/platformmodel.go new file mode 100644 index 000000000..856e4339e --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformmodel.go @@ -0,0 +1,55 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: eccc3f228e2a + +package components + +// PlatformModel - A model configured for the caller. +type PlatformModel struct { + // Opaque model identifier: the internal model enum name (for example `GPT5_6_LUNA`). Case-sensitive; never parse it. + // + ID string `json:"id"` + // Human-readable name for the model. + DisplayName string `json:"display_name"` + // Organization that created the model. + Creator string `json:"creator"` + // Description of the model. Omitted when the deployment has none. + Description *string `json:"description,omitempty"` + // The Platform endpoints that accept this model, one property per endpoint. A property is absent when that endpoint does not accept the model. For a caller that passes the access check, a model without `chat` is rejected at `/model` by `POST /api/chat`. Other request checks still apply. Clients must tolerate unknown properties. + // + Endpoints PlatformModelEndpoints `json:"endpoints"` +} + +func (o *PlatformModel) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *PlatformModel) GetDisplayName() string { + if o == nil { + return "" + } + return o.DisplayName +} + +func (o *PlatformModel) GetCreator() string { + if o == nil { + return "" + } + return o.Creator +} + +func (o *PlatformModel) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *PlatformModel) GetEndpoints() PlatformModelEndpoints { + if o == nil { + return PlatformModelEndpoints{} + } + return o.Endpoints +} diff --git a/tests/mockserver/internal/sdk/models/components/platformmodelchatendpoint.go b/tests/mockserver/internal/sdk/models/components/platformmodelchatendpoint.go new file mode 100644 index 000000000..5ccdfc6a1 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformmodelchatendpoint.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: baf8a9913d78 + +package components + +// PlatformModelChatEndpoint - The model is usable with Platform chat, and `POST /api/chat` accepts it as `model`. When `chat` is present, `POST /api/chat` does not reject the model at `/model`, except across a deployment change. Other request checks still apply, and the access check runs before the model check. Acceptance does not guarantee which model runs: deployment configuration can still run the turn on a different model, and agent routing and expert handoffs can delegate parts of a turn. +type PlatformModelChatEndpoint struct { + // Reasoning efforts that `POST /api/chat` accepts for this model as `reasoning_effort`, ordered from least to most. The list comes from the chat decision for the caller. `POST /api/chat` does not reject a listed effort at `/reasoning_effort`, except across a deployment change. Other request checks still apply. An empty array means that the model accepts no `reasoning_effort`. Clients must tolerate unknown values. + // + ReasoningEfforts []PlatformReasoningEffort `json:"reasoning_efforts"` +} + +func (o *PlatformModelChatEndpoint) GetReasoningEfforts() []PlatformReasoningEffort { + if o == nil { + return []PlatformReasoningEffort{} + } + return o.ReasoningEfforts +} diff --git a/tests/mockserver/internal/sdk/models/components/platformmodelendpoints.go b/tests/mockserver/internal/sdk/models/components/platformmodelendpoints.go new file mode 100644 index 000000000..d663dd2ea --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformmodelendpoints.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 3178ef28f7f7 + +package components + +// PlatformModelEndpoints - The Platform endpoints that accept this model, one property per endpoint. A property is absent when that endpoint does not accept the model. For a caller that passes the access check, a model without `chat` is rejected at `/model` by `POST /api/chat`. Other request checks still apply. Clients must tolerate unknown properties. +type PlatformModelEndpoints struct { + // The model is usable with Platform chat, and `POST /api/chat` accepts it as `model`. When `chat` is present, `POST /api/chat` does not reject the model at `/model`, except across a deployment change. Other request checks still apply, and the access check runs before the model check. Acceptance does not guarantee which model runs: deployment configuration can still run the turn on a different model, and agent routing and expert handoffs can delegate parts of a turn. + // + Chat *PlatformModelChatEndpoint `json:"chat,omitempty"` +} + +func (o *PlatformModelEndpoints) GetChat() *PlatformModelChatEndpoint { + if o == nil { + return nil + } + return o.Chat +} diff --git a/tests/mockserver/internal/sdk/models/components/platformmodelslistresponse.go b/tests/mockserver/internal/sdk/models/components/platformmodelslistresponse.go new file mode 100644 index 000000000..1be3d2ca4 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformmodelslistresponse.go @@ -0,0 +1,44 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 3c90ab69eeb5 + +package components + +// PlatformModelsListResponse - A paginated list of models configured for the caller. +type PlatformModelsListResponse struct { + // Models configured for the caller, ordered by `id`. + Results []PlatformModel `json:"results"` + // Whether additional results are available. + HasMore bool `json:"has_more"` + // Cursor for the next page, or null when no more results are available. + NextCursor *string `json:"next_cursor"` + // Platform-generated request ID for support correlation. + RequestID string `json:"request_id"` +} + +func (o *PlatformModelsListResponse) GetResults() []PlatformModel { + if o == nil { + return []PlatformModel{} + } + return o.Results +} + +func (o *PlatformModelsListResponse) GetHasMore() bool { + if o == nil { + return false + } + return o.HasMore +} + +func (o *PlatformModelsListResponse) GetNextCursor() *string { + if o == nil { + return nil + } + return o.NextCursor +} + +func (o *PlatformModelsListResponse) GetRequestID() string { + if o == nil { + return "" + } + return o.RequestID +} diff --git a/tests/mockserver/internal/sdk/models/components/platformreasoningeffort.go b/tests/mockserver/internal/sdk/models/components/platformreasoningeffort.go new file mode 100644 index 000000000..5da5a028c --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformreasoningeffort.go @@ -0,0 +1,51 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: b222921acbd1 + +package components + +import ( + "encoding/json" + "fmt" +) + +// PlatformReasoningEffort - How much reasoning a model applies to a turn, from least effort to most. +type PlatformReasoningEffort string + +const ( + PlatformReasoningEffortNone PlatformReasoningEffort = "NONE" + PlatformReasoningEffortMinimal PlatformReasoningEffort = "MINIMAL" + PlatformReasoningEffortLow PlatformReasoningEffort = "LOW" + PlatformReasoningEffortMedium PlatformReasoningEffort = "MEDIUM" + PlatformReasoningEffortHigh PlatformReasoningEffort = "HIGH" + PlatformReasoningEffortXhigh PlatformReasoningEffort = "XHIGH" + PlatformReasoningEffortMax PlatformReasoningEffort = "MAX" +) + +func (e PlatformReasoningEffort) ToPointer() *PlatformReasoningEffort { + return &e +} +func (e *PlatformReasoningEffort) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "NONE": + fallthrough + case "MINIMAL": + fallthrough + case "LOW": + fallthrough + case "MEDIUM": + fallthrough + case "HIGH": + fallthrough + case "XHIGH": + fallthrough + case "MAX": + *e = PlatformReasoningEffort(v) + return nil + default: + return fmt.Errorf("invalid value for PlatformReasoningEffort: %v", v) + } +} diff --git a/tests/mockserver/internal/sdk/models/operations/getimage.go b/tests/mockserver/internal/sdk/models/operations/getimage.go new file mode 100644 index 000000000..3241be108 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/getimage.go @@ -0,0 +1,42 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: de9a777c8d5b + +package operations + +import ( + "io" + "mockserver/internal/sdk/models/components" +) + +type GetImageRequest struct { + // Image key from the image URL in a chat response. + Key string `queryParam:"style=form,explode=true,name=key"` +} + +func (o *GetImageRequest) GetKey() string { + if o == nil { + return "" + } + return o.Key +} + +type GetImageResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Image content. + // The Close method must be called on this field, even if it is not used, to prevent resource leaks. + ResponseStream io.ReadCloser +} + +func (o *GetImageResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetImageResponse) GetResponseStream() io.ReadCloser { + if o == nil { + return nil + } + return o.ResponseStream +} diff --git a/tests/mockserver/internal/sdk/models/operations/platformadminagentslist.go b/tests/mockserver/internal/sdk/models/operations/platformadminagentslist.go index 6f6761337..d5a9bbf5e 100644 --- a/tests/mockserver/internal/sdk/models/operations/platformadminagentslist.go +++ b/tests/mockserver/internal/sdk/models/operations/platformadminagentslist.go @@ -14,7 +14,7 @@ type PlatformAdminAgentsListRequest struct { // Opaque pagination cursor from a previous response. Send the same filters that the previous request used. // Cursor *string `queryParam:"style=form,explode=true,name=cursor"` - // JSON-encoded filters that choose which agents are returned. The supported fields are name and description, with the operator EQUALS. Multiple values OR within a filter. Multiple filters AND together, and each field can appear in only one filter. For example, to return agents whose name contains "HR", send [{"field":"name","values":["HR"]}]. + // JSON-encoded filters that choose which agents are returned. The supported fields are name, description, and is_orphaned, with the operator EQUALS. Multiple values OR within a filter. Multiple filters AND together, and each field can appear in only one filter. For example, to return agents whose name contains "HR", send [{"field":"name","values":["HR"]}]. To return orphaned agents, send [{"field":"is_orphaned","values":["true"]}]. // Filters []components.PlatformAdminAgentFilter `queryParam:"serialization=json,name=filters"` } diff --git a/tests/mockserver/internal/sdk/models/operations/platformanonymousauthtokenscreate.go b/tests/mockserver/internal/sdk/models/operations/platformanonymousauthtokenscreate.go new file mode 100644 index 000000000..4b4f98bf5 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/platformanonymousauthtokenscreate.go @@ -0,0 +1,28 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: b25fec134c50 + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PlatformAnonymousAuthTokensCreateResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The anonymous auth token was created. + PlatformCreateAnonymousAuthTokenResponse *components.PlatformCreateAnonymousAuthTokenResponse +} + +func (o *PlatformAnonymousAuthTokensCreateResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PlatformAnonymousAuthTokensCreateResponse) GetPlatformCreateAnonymousAuthTokenResponse() *components.PlatformCreateAnonymousAuthTokenResponse { + if o == nil { + return nil + } + return o.PlatformCreateAnonymousAuthTokenResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/platformchatcreate.go b/tests/mockserver/internal/sdk/models/operations/platformchatcreate.go index 20fbab2c9..be2809fce 100644 --- a/tests/mockserver/internal/sdk/models/operations/platformchatcreate.go +++ b/tests/mockserver/internal/sdk/models/operations/platformchatcreate.go @@ -86,6 +86,12 @@ type PlatformChatCreateRequest struct { // Continue an existing stored conversation. Incompatible with message-array `input` and with `store: false`. // ConversationID *string `json:"conversation_id,omitempty"` + // Model for this turn, matched exactly to an id from GET /api/models. When GET /api/models reports `endpoints.chat` for the model, `POST /api/chat` does not reject this value at `/model`, except across a deployment change. Other request checks still apply. The model is requested, not guaranteed: deployment configuration can still run the turn on a different model. + // + Model *string `json:"model,omitempty"` + // Reasoning effort for this turn. Requires `model`. When omitted, the model's default effort applies. When GET /api/models lists this value in `endpoints.chat.reasoning_efforts` for the model, `POST /api/chat` does not reject it at `/reasoning_effort`, except across a deployment change. Other request checks still apply. + // + ReasoningEffort *components.PlatformReasoningEffort `json:"reasoning_effort,omitempty"` } func (p PlatformChatCreateRequest) MarshalJSON() ([]byte, error) { @@ -124,6 +130,20 @@ func (o *PlatformChatCreateRequest) GetConversationID() *string { return o.ConversationID } +func (o *PlatformChatCreateRequest) GetModel() *string { + if o == nil { + return nil + } + return o.Model +} + +func (o *PlatformChatCreateRequest) GetReasoningEffort() *components.PlatformReasoningEffort { + if o == nil { + return nil + } + return o.ReasoningEffort +} + type PlatformChatCreateResponse struct { HTTPMeta components.HTTPMetadata `json:"-"` // Successful response. diff --git a/tests/mockserver/internal/sdk/models/operations/platformchatcreatestream.go b/tests/mockserver/internal/sdk/models/operations/platformchatcreatestream.go index 318fba57a..e37a1afd0 100644 --- a/tests/mockserver/internal/sdk/models/operations/platformchatcreatestream.go +++ b/tests/mockserver/internal/sdk/models/operations/platformchatcreatestream.go @@ -87,6 +87,12 @@ type PlatformChatCreateStreamRequest struct { // Continue an existing stored conversation. Incompatible with message-array `input` and with `store: false`. // ConversationID *string `json:"conversation_id,omitempty"` + // Model for this turn, matched exactly to an id from GET /api/models. When GET /api/models reports `endpoints.chat` for the model, `POST /api/chat` does not reject this value at `/model`, except across a deployment change. Other request checks still apply. The model is requested, not guaranteed: deployment configuration can still run the turn on a different model. + // + Model *string `json:"model,omitempty"` + // Reasoning effort for this turn. Requires `model`. When omitted, the model's default effort applies. When GET /api/models lists this value in `endpoints.chat.reasoning_efforts` for the model, `POST /api/chat` does not reject it at `/reasoning_effort`, except across a deployment change. Other request checks still apply. + // + ReasoningEffort *components.PlatformReasoningEffort `json:"reasoning_effort,omitempty"` } func (p PlatformChatCreateStreamRequest) MarshalJSON() ([]byte, error) { @@ -125,6 +131,20 @@ func (o *PlatformChatCreateStreamRequest) GetConversationID() *string { return o.ConversationID } +func (o *PlatformChatCreateStreamRequest) GetModel() *string { + if o == nil { + return nil + } + return o.Model +} + +func (o *PlatformChatCreateStreamRequest) GetReasoningEffort() *components.PlatformReasoningEffort { + if o == nil { + return nil + } + return o.ReasoningEffort +} + type PlatformChatCreateStreamResponse struct { HTTPMeta components.HTTPMetadata `json:"-"` // Successful response. diff --git a/tests/mockserver/internal/sdk/models/operations/platformmodelslist.go b/tests/mockserver/internal/sdk/models/operations/platformmodelslist.go new file mode 100644 index 000000000..e4e5edab8 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/platformmodelslist.go @@ -0,0 +1,62 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 5ef9bdbf5986 + +package operations + +import ( + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type PlatformModelsListRequest struct { + // Maximum number of models to return. Defaults to 20. Maximum is 100. + PageSize *int64 `default:"20" queryParam:"style=form,explode=true,name=page_size"` + // Opaque pagination cursor from a previous response. Cursors do not expire. + // + Cursor *string `queryParam:"style=form,explode=true,name=cursor"` +} + +func (p PlatformModelsListRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PlatformModelsListRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, nil); err != nil { + return err + } + return nil +} + +func (o *PlatformModelsListRequest) GetPageSize() *int64 { + if o == nil { + return nil + } + return o.PageSize +} + +func (o *PlatformModelsListRequest) GetCursor() *string { + if o == nil { + return nil + } + return o.Cursor +} + +type PlatformModelsListResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Models configured for the caller. + PlatformModelsListResponse *components.PlatformModelsListResponse +} + +func (o *PlatformModelsListResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PlatformModelsListResponse) GetPlatformModelsListResponse() *components.PlatformModelsListResponse { + if o == nil { + return nil + } + return o.PlatformModelsListResponse +} diff --git a/tests/test_anonymousauthtokens.py b/tests/test_anonymousauthtokens.py new file mode 100644 index 000000000..6f66c2723 --- /dev/null +++ b/tests/test_anonymousauthtokens.py @@ -0,0 +1,20 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 551c2af8a8bd + +from glean.api_client import Glean +import os +from tests.test_client import create_test_http_client + + +def test_anonymousauthtokens_platform_anonymous_auth_tokens_create(): + test_http_client = create_test_http_client("platform-anonymous-auth-tokens-create") + + with Glean( + server_url=os.getenv("TEST_SERVER_URL", "http://localhost:18080"), + client=test_http_client, + api_token=os.getenv("GLEAN_API_TOKEN", "value"), + ) as glean: + assert glean is not None + + res = glean.anonymousauthtokens.create() + assert res is not None diff --git a/tests/test_chat_sdk.py b/tests/test_chat_sdk.py index c7411a414..3bda236f8 100644 --- a/tests/test_chat_sdk.py +++ b/tests/test_chat_sdk.py @@ -17,7 +17,9 @@ def test_chat_sdk_platform_chat_create(): assert glean is not None res = glean.chat.create( - input="Summarize our parental leave policy.", store=True + input="Summarize our parental leave policy.", + store=True, + model="GPT5_6_LUNA", ) assert res is not None diff --git a/tests/test_client_chat.py b/tests/test_client_chat.py index f8a55f588..2d574e316 100644 --- a/tests/test_client_chat.py +++ b/tests/test_client_chat.py @@ -9143,3 +9143,17 @@ def test_client_chat_get_chat_file(): res = glean.client.chat.retrieve_file(file_id="") assert res is not None + + +def test_client_chat_get_image(): + test_http_client = create_test_http_client("getImage") + + with Glean( + server_url=os.getenv("TEST_SERVER_URL", "http://localhost:18080"), + client=test_http_client, + api_token=os.getenv("GLEAN_API_TOKEN", "value"), + ) as glean: + assert glean is not None + + res = glean.client.chat.retrieve_image(key="") + assert res is not None diff --git a/tests/test_models.py b/tests/test_models.py new file mode 100644 index 000000000..86257478f --- /dev/null +++ b/tests/test_models.py @@ -0,0 +1,20 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 044905dfea3f + +from glean.api_client import Glean +import os +from tests.test_client import create_test_http_client + + +def test_models_platform_models_list(): + test_http_client = create_test_http_client("platform-models-list") + + with Glean( + server_url=os.getenv("TEST_SERVER_URL", "http://localhost:18080"), + client=test_http_client, + api_token=os.getenv("GLEAN_API_TOKEN", "value"), + ) as glean: + assert glean is not None + + res = glean.models.list(page_size=20) + assert res is not None diff --git a/tests/test_summarize.py b/tests/test_summarize.py index 5e6c5d28f..59a3def44 100644 --- a/tests/test_summarize.py +++ b/tests/test_summarize.py @@ -19,12 +19,11 @@ def test_summarize_summarize(): res = glean.client.documents.summarize( document_specs=[ { - "ugc_type": models.DocumentSpecUgcType2.ANNOUNCEMENTS, + "ugc_type": models.DocumentSpecUgcType2.CHATS, "ugc_id": "", }, { - "ugc_type": models.DocumentSpecUgcType2.ANNOUNCEMENTS, - "ugc_id": "", + "url": "https://heavy-castanet.name", }, ] )