diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index ab0a896b..729622d2 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: c3e8d632c494016ee2d149b060c5b122 + docChecksum: 57d941bf65abd419f42d9dbbad9f20eb docVersion: 0.9.0 - speakeasyVersion: 1.750.0 - generationVersion: 2.856.1 - releaseVersion: 0.12.9 - configChecksum: 7fcb9aea80caa0123a1d1b4b07dfed9b + speakeasyVersion: 1.751.0 + generationVersion: 2.858.2 + releaseVersion: 0.12.10 + configChecksum: e56659593634818fc7d98885ed25c2cf repoURL: https://github.com/gleanwork/api-client-python.git installationURL: https://github.com/gleanwork/api-client-python.git published: true persistentEdits: - generation_id: 6c6068e6-08a1-4390-a88d-daf8603926f2 - pristine_commit_hash: be29e516edf907afd1e92d3757c52435c82ce65a - pristine_tree_hash: 0340c3c613417009997f442194444f068547011b + generation_id: ba84f788-e8f3-4338-9678-4c94cc5647c1 + pristine_commit_hash: 54910b3dff467ece6762583f43c5b88e642e28ec + pristine_tree_hash: 28df9440e2539350dd21d4ec8ff66895bbb41c74 features: python: additionalDependencies: 1.0.0 @@ -35,7 +35,7 @@ features: globalServerURLs: 3.2.1 groups: 3.0.1 methodArguments: 1.0.2 - mockServer: 0.1.1 + mockServer: 0.1.2 multipartFileContentType: 1.0.0 nameOverrides: 3.0.3 responseFormat: 1.1.0 @@ -175,8 +175,8 @@ trackedFiles: pristine_git_object: 51fc6fc76b0487468b5e073f048628ed03b38836 docs/models/agentschemas.md: id: a2193f5fe96f - last_write_checksum: sha1:80cd7c0804922dcf867d6ca3a1399c5729f35f64 - pristine_git_object: 92a22165a0fd9e125ceef19573b66a3ca2fbb3c8 + last_write_checksum: sha1:e6801938b086307067b31fe554e3d4f87fc22d4f + pristine_git_object: 4ccba78fab4fe2cae243e8a654413edb6e01c422 docs/models/agentsinsightsv2request.md: id: 9d5fdb90e1e6 last_write_checksum: sha1:a02b97b0fa1b6993913ce744e120681213094041 @@ -259,8 +259,8 @@ trackedFiles: pristine_git_object: 022c4ee4c9a283e7da5cb032c267577bd95cfba3 docs/models/authconfig.md: id: fbdae66f0362 - last_write_checksum: sha1:2061e1df46def924a504b7bccf89cd2f408059fc - pristine_git_object: 27e35de0f1bb6869a3c1c53979c4e906b2fa3ce6 + last_write_checksum: sha1:c565685e22f3411d4c4e50f089be513b3ba98187 + pristine_git_object: e28f87707e1a35b32887f571b7fe43c2903a4d9d docs/models/authconfigstatus.md: id: faed76680e4f last_write_checksum: sha1:b4337cf080b32707bf4d897552f3433ecd409f5b @@ -2361,6 +2361,10 @@ trackedFiles: id: f0522eda6cc6 last_write_checksum: sha1:45e661129d7ef5a7b7d53c4c359f1d1a1933670a pristine_git_object: 64f1bba3aefec45ea846c103a9c666f9149e868e + docs/models/tokenendpointauthmethod.md: + id: ecc9be73734a + last_write_checksum: sha1:e4f508af54804043c21b96405f33cf17c1186b67 + pristine_git_object: 292a955adca4baebcc7fec90e4cd745ed26489da docs/models/tool.md: id: 8966139dbeed last_write_checksum: sha1:e49814f5bc36e497d901a65b3a4aa64261f8a1a6 @@ -2767,8 +2771,8 @@ trackedFiles: pristine_git_object: e2fda7fe263c2a111e53872e3ad5bc324b4dccfe pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:4303358b763c488897a3ec7f2f11e666cbed14ab - pristine_git_object: 3dce96bfa6c29e5d5d8367a56a3296bea2766f72 + last_write_checksum: sha1:422adc083ddcc3459f00dff39e4e437ec4d4d3be + pristine_git_object: 45aaadd11dbe9bc96798c61e5f34f1f66e6a23e1 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:c2c83f71dea61eb50c9e05da83b16d18b4da8794 @@ -2795,8 +2799,8 @@ trackedFiles: pristine_git_object: 58c4d70ac1797b86ff5c4237cafbc344c42d8f64 src/glean/api_client/_version.py: id: 0ce22b26136b - last_write_checksum: sha1:62ecd9389d6c950fea4d5a628be9e4ff857a7b19 - pristine_git_object: 13209684f1ddace23df25c4da2e4e88717359a6f + last_write_checksum: sha1:c556c33f9c2687a375fb00f4db4daee3aab36dfb + pristine_git_object: 5e6821e02fdc53afbc65e25e18681a435d0a7088 src/glean/api_client/agents.py: id: b925701a9217 last_write_checksum: sha1:ee99ae3d58f7f77ac2eba99c104d04d53c16c09c @@ -2947,8 +2951,8 @@ trackedFiles: pristine_git_object: 1c182cb0150642014463e1ceec8bc8b785e5b9f3 src/glean/api_client/models/__init__.py: id: d5f6ea5efcbe - last_write_checksum: sha1:6239f4bb2a3b69fe65135925bcc3e04983c6af4d - pristine_git_object: 980bdd63db8f58a09de5485817a4cafadb1b3367 + last_write_checksum: sha1:b0e5531849a2dfb911367b7dc47b9d5cd78d6880 + pristine_git_object: b70da8c195e1135d746858d7a1e6663864a66d42 src/glean/api_client/models/actionsummary.py: id: 34ccdf9f1526 last_write_checksum: sha1:cfefc6678a5612dc8d50f2b0074dc54bb88e00e0 @@ -3019,8 +3023,8 @@ trackedFiles: pristine_git_object: e09e51eb6c09dbb2493276a6e99dbfd43503f18d src/glean/api_client/models/agentschemas.py: id: db15c1840e94 - last_write_checksum: sha1:79afa78f45c1dd30adcbdbb6fb133ef292985720 - pristine_git_object: 9feaabfec6f4b7225c1b4ba572671b0bd900ef7c + last_write_checksum: sha1:d401bc6e8c268f7181850a0eeacce99c32dfa07f + pristine_git_object: f69f31564d278cd6d06e5ed963930d0ff6889988 src/glean/api_client/models/agentsinsightsv2request.py: id: 754887d301a3 last_write_checksum: sha1:1311b9194f1aab2b93f646175c54b7ced2522651 @@ -3079,8 +3083,8 @@ trackedFiles: pristine_git_object: d6fa5492574a8b8fd863a26764f321e628d96cae src/glean/api_client/models/authconfig.py: id: 9e88a246ee36 - last_write_checksum: sha1:2f21b4a21e546d8d9ea9732843084855eb976a0d - pristine_git_object: 65c26d2e98d6db6ffed8f5c7fab6356c642a1f69 + last_write_checksum: sha1:e25f69a5ddae03308bdbc2391ce3449de236b4ed + pristine_git_object: f01e07f8513fdb529c333b6bccf6d5114ee80cc0 src/glean/api_client/models/authstatus.py: id: 75167e3b3ad0 last_write_checksum: sha1:4cdc7988894d6c50dbc42d0613bc22dbe6a29666 @@ -5246,7 +5250,7 @@ trackedFiles: tests/mockserver/internal/handler/pathpostrestapiv1getanswer.go: last_write_checksum: sha1:80bc08894cebfd78f82d3d80f93fd85a11b55d45 tests/mockserver/internal/handler/pathpostrestapiv1getchat.go: - last_write_checksum: sha1:b48e2313407814ee4f8ed181b8e5299a84960c44 + last_write_checksum: sha1:2267292ba8173cf8df70ddbc6ac02ff3439cb879 tests/mockserver/internal/handler/pathpostrestapiv1getchatapplication.go: last_write_checksum: sha1:7b81898137fdb3a89b4dcfa318b9b5b92e8860c0 tests/mockserver/internal/handler/pathpostrestapiv1getchatfiles.go: @@ -5348,7 +5352,7 @@ trackedFiles: tests/mockserver/internal/sdk/models/components/agentrunwaitresponse.go: last_write_checksum: sha1:75b0a516ab1c183abeeb9e27abc8a00f265f32ad tests/mockserver/internal/sdk/models/components/agentschemas.go: - last_write_checksum: sha1:f5a60dbfccd07c90dd33675735d521285485286c + last_write_checksum: sha1:d0cbb79eee354dff93838a2d6525538d440b7ffc tests/mockserver/internal/sdk/models/components/agentsinsightsv2request.go: last_write_checksum: sha1:5bbebc8109a68e2b22dc0ca044b009a4ff491d1f tests/mockserver/internal/sdk/models/components/agentsinsightsv2response.go: @@ -5378,7 +5382,7 @@ trackedFiles: tests/mockserver/internal/sdk/models/components/assistantinsightsresponse.go: last_write_checksum: sha1:1646bc05ef8352596a60c567dd6c437008d79e31 tests/mockserver/internal/sdk/models/components/authconfig.go: - last_write_checksum: sha1:93a6fcb3623220dc1540f3f09780edf67be51add + last_write_checksum: sha1:e9e386e4a0c3ea918f1a2b332f91a129d77ac307 tests/mockserver/internal/sdk/models/components/authstatus.go: last_write_checksum: sha1:ca2727d0dcddf2ee072f3b26529d2952d7e72a21 tests/mockserver/internal/sdk/models/components/authtoken.go: @@ -6563,8 +6567,8 @@ trackedFiles: pristine_git_object: 6cc8aeec3c52329d389081db0a27f10f53f214b9 tests/test_messages.py: id: be23089b1f8b - last_write_checksum: sha1:5db8087e85104ab50b362638150fa1f6686a3c30 - pristine_git_object: c0fd29dab7d365ef9d78c0c291b925e6b9fd7298 + last_write_checksum: sha1:bef200db8e7fff0aa33ef17846f5054a2d035a88 + pristine_git_object: 36643db35a2d2a3cf9d327379ee7a6cb30da51d0 tests/test_people.py: id: 37c243940039 last_write_checksum: sha1:7c7268ffeebe48d81ed25e9b1cfc3a395abf5c1f @@ -6587,8 +6591,8 @@ trackedFiles: pristine_git_object: df2944ebda36db652b2770dd1c23be83df90fc99 tests/test_summarize.py: id: a255d8a6f627 - last_write_checksum: sha1:7e6d84411c7d56aa6df996d6e537a453975187c4 - pristine_git_object: b2b5588acaca612fa0ab7a37426173589f38338f + last_write_checksum: sha1:d0c5ef6e9d2f15c2d3b3dc14af036d21726a0ad5 + pristine_git_object: 0be6abb5ccd1b20ece05a39af211b20e1286d0cd tests/test_tools.py: id: 70889bdf7321 last_write_checksum: sha1:3c0c220f8975b050c322f6475e95f7af4e65b995 @@ -6786,7 +6790,7 @@ examples: agent_id: "" responses: "200": - application/json: {"agent_id": "mho4lwzylcozgoc2", "input_schema": {}, "output_schema": {}} + application/json: {"agent_id": "mho4lwzylcozgoc2", "name": "HR Policy Agent", "input_schema": {}, "output_schema": {}} "404": application/json: {} searchAgents: @@ -7516,7 +7520,7 @@ generatedTests: checkdatasourceauth: "2026-02-19T15:48:52Z" getDatasourceInstanceConfiguration: "2026-03-09T18:34:29Z" updateDatasourceInstanceConfiguration: "2026-03-09T18:34:29Z" -releaseNotes: "## Python SDK Changes:\n* `glean.client.chat.create()`: \n * `request.messages[]` **Changed**\n * `response` **Changed** (Breaking ⚠️)\n* `glean.client.search.query()`: \n * `request.source_document.metadata.author.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n * `response` **Changed** (Breaking ⚠️)\n * `error.unauthorized_datasource_instances` **Removed** (Breaking ⚠️)\n* `glean.client.search.recommendations()`: \n * `request.source_document.metadata.author.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n * `response` **Changed** (Breaking ⚠️)\n* `glean.client.search.autocomplete()`: `response` **Changed** (Breaking ⚠️)\n* `glean.client.search.query_as_admin()`: \n * `request.source_document.metadata.author.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n * `response` **Changed** (Breaking ⚠️)\n * `error.unauthorized_datasource_instances` **Removed** (Breaking ⚠️)\n* `glean.client.messages.retrieve()`: `response.search_response` **Changed** (Breaking ⚠️)\n* `glean.client.collections.list()`: `response.collections[].added_roles[].person.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n* `glean.client.insights.retrieve()`: `response.glean_assist.activity_insights[].user.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n* `glean.client.answers.retrieve()`: `response.answer_result.answer.added_roles[].person.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n* `glean.client.chat.retrieve()`: `response.chat_result.chat` **Changed**\n* `glean.client.chat.list()`: `response` **Changed**\n* `glean.client.chat.create_stream()`: \n * `request.messages[]` **Changed**\n* `glean.client.agents.retrieve()`: `error.status[404]` **Added**\n* `glean.client.agents.retrieve_schemas()`: \n * `response.tools[]` **Changed**\n * `error` **Changed**\n* `glean.client.agents.list()`: `error` **Changed**\n* `glean.client.agents.run_stream()`: `error` **Changed**\n* `glean.client.collections.add_items()`: `response.collection.added_roles[].person.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n* `glean.client.collections.create()`: \n * `request.added_roles[].person.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n * `response.union(class (0)).collection.added_roles[].person.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n* `glean.client.collections.delete_item()`: `response.collection.added_roles[].person.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n* `glean.client.collections.update()`: \n * `request.added_roles[].person.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n * `response.added_roles[].person.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n* `glean.client.collections.update_item()`: `response.collection.added_roles[].person.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n* `glean.client.collections.retrieve()`: `response.collection.added_roles[].person.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n* `glean.datasources.get_datasource_instance_configuration()`: **Added**\n* `glean.client.documents.retrieve()`: `response.documents.Map.union(Document).metadata.author.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n* `glean.client.documents.retrieve_by_facets()`: `response.documents[].metadata.author.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n* `glean.client.answers.list()`: `response.answer_results[].answer.added_roles[].person.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n* `glean.client.answers.update()`: \n * `request.added_roles[].person.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n * `response.added_roles[].person.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n* `glean.client.pins.update()`: `response.attribution.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n* `glean.client.pins.retrieve()`: `response.pin.attribution.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n* `glean.client.pins.list()`: `response.pins[].attribution.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n* `glean.client.pins.create()`: `response.attribution.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n* `glean.client.answers.create()`: \n * `request.data.added_roles[].person.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n * `response.added_roles[].person.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n* `glean.client.announcements.update()`: \n * `request.body.structured_list[].document.metadata.author.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n * `response.body.structured_list[].document.metadata.author.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n* `glean.client.search.retrieve_feed()`: `response.results[]` **Changed**\n* `glean.client.announcements.create()`: \n * `request.body.structured_list[].document.metadata.author.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n * `response.body.structured_list[].document.metadata.author.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n* `glean.datasources.update_datasource_instance_configuration()`: **Added**\n* `glean.client.entities.list()`: `response.results[].related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n* `glean.client.entities.read_people()`: `response.results[].related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n* `glean.client.shortcuts.create()`: \n * `request.data.added_roles[].person.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n * `response.shortcut.added_roles[].person.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n* `glean.client.shortcuts.retrieve()`: `response.shortcut.added_roles[].person.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n* `glean.client.shortcuts.list()`: `response.shortcuts[].added_roles[].person.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n* `glean.client.shortcuts.update()`: \n * `request.added_roles[].person.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n * `response.shortcut.added_roles[].person.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n* `glean.client.verification.add_reminder()`: `response.metadata.last_verifier.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n* `glean.client.verification.list()`: `response.documents[].metadata.last_verifier.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n* `glean.client.verification.verify()`: `response.metadata.last_verifier.related_documents[].results[].structured_results[].snippets[].snippet` **Changed**\n* `glean.indexing.people.bulk_index()`: **Deprecated**\n" +releaseNotes: "## Python SDK Changes:\n* `glean.client.chat.create()`: \n * `request.messages[].fragments[].action.metadata.auth.token_endpoint_auth_method` **Added**\n * `response.messages[].fragments[].action.metadata.auth.token_endpoint_auth_method` **Added**\n* `glean.client.chat.retrieve()`: `response.chat_result.chat.messages[].fragments[].action.metadata.auth.token_endpoint_auth_method` **Added**\n* `glean.client.chat.create_stream()`: \n * `request.messages[].fragments[].action.metadata.auth.token_endpoint_auth_method` **Added**\n* `glean.client.agents.retrieve_schemas()`: `response.name` **Added**\n" generatedFiles: - .devcontainer/README.md - .devcontainer/devcontainer.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 7f8ba298..c0115a74 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -34,7 +34,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: true python: - version: 0.12.9 + version: 0.12.10 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/glean-merged-spec.yaml b/.speakeasy/glean-merged-spec.yaml index 67e779f1..3e990daa 100644 --- a/.speakeasy/glean-merged-spec.yaml +++ b/.speakeasy/glean-merged-spec.yaml @@ -2,7 +2,7 @@ openapi: 3.0.0 info: version: 0.9.0 title: Glean API - x-source-commit-sha: 019fa78169e9b442a41ce6c77fc17a855db29347 + x-source-commit-sha: a5baf32ff20e181a9adf12f9b9eba1c2421e5024 description: | # Introduction In addition to the data sources that Glean has built-in support for, Glean also provides a REST API that enables customers to put arbitrary content in the search index. This is useful, for example, for doing permissions-aware search over content in internal tools that reside on-prem as well as for searching over applications that Glean does not currently support first class. In addition these APIs allow the customer to push organization data (people info, organization structure etc) into Glean. @@ -22,7 +22,7 @@ info: These API clients provide type-safe, idiomatic interfaces for working with Glean IndexingAPIs in your language of choice. x-logo: url: https://app.glean.com/images/glean-text2.svg - x-open-api-commit-sha: b6a55d676d9794248f2cd49c3935feff817d05d7 + x-open-api-commit-sha: 238bce820eef8f0f78d4793d3424d4e78944d066 x-speakeasy-name: 'Glean API' servers: - url: https://{instance}-be.glean.com @@ -7969,6 +7969,13 @@ components: type: string format: url description: The OAuth 2.0 Resource Indicator (RFC 8707) for the protected resource. Discovered from Protected Resource Metadata (RFC 9728) during DCR. Included in authorization and token exchange requests when present. + token_endpoint_auth_method: + type: string + enum: + - client_secret_post + - client_secret_basic + - none + description: The OAuth 2.0 token endpoint authentication method (RFC 7591). Determines how the client authenticates when exchanging an authorization code for a token. client_secret_post sends credentials as form fields, client_secret_basic sends them via Authorization header, none omits client secret and relies on PKCE only. Values use lowercase to match the OAuth 2.0 wire format (RFC 7591 Section 2). lastAuthorizedAt: type: string format: date-time @@ -8514,6 +8521,11 @@ components: title: Agent Id description: The ID of the agent. example: mho4lwzylcozgoc2 + name: + type: string + title: Agent Name + description: The name of the agent. + example: HR Policy Agent input_schema: type: object title: Input Schema diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 6f5b95cc..e6aa1565 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.750.0 +speakeasyVersion: 1.751.0 sources: Glean API: sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:6424153a91d5bb333b40f80a1b5228e02d4486ccdc6f57a19a9a2245b4812ae2 - sourceBlobDigest: sha256:e3f2e470a2e1963b3919b05eed4ee93d1dfa5bbafea1a3199944b5ccce93bfe1 + sourceRevisionDigest: sha256:f166c61c7e7a52f62d5ddcc80f0e1247867cfa9a89d6bdf2679daca84d0efadc + sourceBlobDigest: sha256:a5efacbcf3c78ffd7268b357723e4892a115562dd5392fbcd6ab6141c014516f tags: - latest Glean Client API: @@ -16,10 +16,10 @@ targets: glean: source: Glean API sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:6424153a91d5bb333b40f80a1b5228e02d4486ccdc6f57a19a9a2245b4812ae2 - sourceBlobDigest: sha256:e3f2e470a2e1963b3919b05eed4ee93d1dfa5bbafea1a3199944b5ccce93bfe1 + sourceRevisionDigest: sha256:f166c61c7e7a52f62d5ddcc80f0e1247867cfa9a89d6bdf2679daca84d0efadc + sourceBlobDigest: sha256:a5efacbcf3c78ffd7268b357723e4892a115562dd5392fbcd6ab6141c014516f codeSamplesNamespace: glean-api-specs-python-code-samples - codeSamplesRevisionDigest: sha256:df543b293a8284ffd151396bc73e4a80ac8afeac2ea651d41c07926d7c98c908 + codeSamplesRevisionDigest: sha256:dac0cc25e8448625efa55da8fa7c5d7da718e204f3c52763fe7bcce62d679838 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/RELEASES.md b/RELEASES.md index 8bf42b71..e389b20c 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -598,4 +598,14 @@ Based on: ### Generated - [python v0.12.9] . ### Releases -- [PyPI v0.12.9] https://pypi.org/project/glean-api-client/0.12.9 - . \ No newline at end of file +- [PyPI v0.12.9] https://pypi.org/project/glean-api-client/0.12.9 - . + +## 2026-03-11 09:01:27 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.751.0 (2.858.2) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.12.10] . +### Releases +- [PyPI v0.12.10] https://pypi.org/project/glean-api-client/0.12.10 - . \ No newline at end of file diff --git a/docs/models/agentschemas.md b/docs/models/agentschemas.md index 92a22165..4ccba78f 100644 --- a/docs/models/agentschemas.md +++ b/docs/models/agentschemas.md @@ -8,6 +8,7 @@ Defines the structure and properties of an agent. | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | | `agent_id` | *str* | :heavy_check_mark: | The ID of the agent. | mho4lwzylcozgoc2 | +| `name` | *Optional[str]* | :heavy_minus_sign: | The name of the agent. | HR Policy Agent | | `input_schema` | [models.InputSchema](../models/inputschema.md) | :heavy_check_mark: | The schema for the agent input. In JSON Schema format. | | | `output_schema` | [models.OutputSchema](../models/outputschema.md) | :heavy_check_mark: | The schema for the agent output. In JSON Schema format. | | | `tools` | List[[models.ActionSummary](../models/actionsummary.md)] | :heavy_minus_sign: | List of tools that the agent can invoke. Only included when include_tools query parameter is set to true. | | \ No newline at end of file diff --git a/docs/models/authconfig.md b/docs/models/authconfig.md index 27e35de0..e28f8770 100644 --- a/docs/models/authconfig.md +++ b/docs/models/authconfig.md @@ -5,16 +5,17 @@ Config for tool's authentication method. ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `is_on_prem` | *Optional[bool]* | :heavy_minus_sign: | Whether or not this tool is hosted on-premise. | -| `uses_central_auth` | *Optional[bool]* | :heavy_minus_sign: | Whether or not this uses central auth. | -| `type` | [Optional[models.AuthConfigType]](../models/authconfigtype.md) | :heavy_minus_sign: | The type of authentication being used.
Use 'OAUTH_*' when Glean calls an external API (e.g., Jira) on behalf of a user to obtain an OAuth token.
'OAUTH_ADMIN' utilizes an admin token for external API calls on behalf all users.
'OAUTH_USER' uses individual user tokens for external API calls.
'DWD' refers to domain wide delegation.
| -| `grant_type` | [Optional[models.GrantType]](../models/granttype.md) | :heavy_minus_sign: | The type of grant type being used. | -| `status` | [Optional[models.AuthConfigStatus]](../models/authconfigstatus.md) | :heavy_minus_sign: | Auth status of the tool. | -| `client_url` | *Optional[str]* | :heavy_minus_sign: | The URL where users will be directed to start the OAuth flow. | -| `scopes` | List[*str*] | :heavy_minus_sign: | A list of strings denoting the different scopes or access levels required by the tool. | -| `audiences` | List[*str*] | :heavy_minus_sign: | A list of strings denoting the different audience which can access the tool. | -| `authorization_url` | *Optional[str]* | :heavy_minus_sign: | The OAuth provider's endpoint, where access tokens are requested. | -| `resource` | *Optional[str]* | :heavy_minus_sign: | The OAuth 2.0 Resource Indicator (RFC 8707) for the protected resource. Discovered from Protected Resource Metadata (RFC 9728) during DCR. Included in authorization and token exchange requests when present. | -| `last_authorized_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The time the tool was last authorized in ISO format (ISO 8601). | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `is_on_prem` | *Optional[bool]* | :heavy_minus_sign: | Whether or not this tool is hosted on-premise. | +| `uses_central_auth` | *Optional[bool]* | :heavy_minus_sign: | Whether or not this uses central auth. | +| `type` | [Optional[models.AuthConfigType]](../models/authconfigtype.md) | :heavy_minus_sign: | The type of authentication being used.
Use 'OAUTH_*' when Glean calls an external API (e.g., Jira) on behalf of a user to obtain an OAuth token.
'OAUTH_ADMIN' utilizes an admin token for external API calls on behalf all users.
'OAUTH_USER' uses individual user tokens for external API calls.
'DWD' refers to domain wide delegation.
| +| `grant_type` | [Optional[models.GrantType]](../models/granttype.md) | :heavy_minus_sign: | The type of grant type being used. | +| `status` | [Optional[models.AuthConfigStatus]](../models/authconfigstatus.md) | :heavy_minus_sign: | Auth status of the tool. | +| `client_url` | *Optional[str]* | :heavy_minus_sign: | The URL where users will be directed to start the OAuth flow. | +| `scopes` | List[*str*] | :heavy_minus_sign: | A list of strings denoting the different scopes or access levels required by the tool. | +| `audiences` | List[*str*] | :heavy_minus_sign: | A list of strings denoting the different audience which can access the tool. | +| `authorization_url` | *Optional[str]* | :heavy_minus_sign: | The OAuth provider's endpoint, where access tokens are requested. | +| `resource` | *Optional[str]* | :heavy_minus_sign: | The OAuth 2.0 Resource Indicator (RFC 8707) for the protected resource. Discovered from Protected Resource Metadata (RFC 9728) during DCR. Included in authorization and token exchange requests when present. | +| `token_endpoint_auth_method` | [Optional[models.TokenEndpointAuthMethod]](../models/tokenendpointauthmethod.md) | :heavy_minus_sign: | The OAuth 2.0 token endpoint authentication method (RFC 7591). Determines how the client authenticates when exchanging an authorization code for a token. client_secret_post sends credentials as form fields, client_secret_basic sends them via Authorization header, none omits client secret and relies on PKCE only. Values use lowercase to match the OAuth 2.0 wire format (RFC 7591 Section 2). | +| `last_authorized_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The time the tool was last authorized in ISO format (ISO 8601). | \ No newline at end of file diff --git a/docs/models/tokenendpointauthmethod.md b/docs/models/tokenendpointauthmethod.md new file mode 100644 index 00000000..292a955a --- /dev/null +++ b/docs/models/tokenendpointauthmethod.md @@ -0,0 +1,22 @@ +# TokenEndpointAuthMethod + +The OAuth 2.0 token endpoint authentication method (RFC 7591). Determines how the client authenticates when exchanging an authorization code for a token. client_secret_post sends credentials as form fields, client_secret_basic sends them via Authorization header, none omits client secret and relies on PKCE only. Values use lowercase to match the OAuth 2.0 wire format (RFC 7591 Section 2). + +## Example Usage + +```python +from glean.api_client.models import TokenEndpointAuthMethod + +value = TokenEndpointAuthMethod.CLIENT_SECRET_POST + +# Open enum: unrecognized values are captured as UnrecognizedStr +``` + + +## Values + +| Name | Value | +| --------------------- | --------------------- | +| `CLIENT_SECRET_POST` | client_secret_post | +| `CLIENT_SECRET_BASIC` | client_secret_basic | +| `NONE` | none | \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 3dce96bf..45aaadd1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "glean-api-client" -version = "0.12.9" +version = "0.12.10" 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 13209684..5e6821e0 100644 --- a/src/glean/api_client/_version.py +++ b/src/glean/api_client/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "glean-api-client" -__version__: str = "0.12.9" +__version__: str = "0.12.10" __openapi_doc_version__: str = "0.9.0" -__gen_version__: str = "2.856.1" -__user_agent__: str = "speakeasy-sdk/python 0.12.9 2.856.1 0.9.0 glean-api-client" +__gen_version__: str = "2.858.2" +__user_agent__: str = "speakeasy-sdk/python 0.12.10 2.858.2 0.9.0 glean-api-client" try: if __package__ is not None: diff --git a/src/glean/api_client/models/__init__.py b/src/glean/api_client/models/__init__.py index 980bdd63..b70da8c1 100644 --- a/src/glean/api_client/models/__init__.py +++ b/src/glean/api_client/models/__init__.py @@ -175,6 +175,7 @@ AuthConfigType, AuthConfigTypedDict, GrantType, + TokenEndpointAuthMethod, ) from .authstatus import AuthStatus from .authtoken import AuthToken, AuthTokenTypedDict @@ -2453,6 +2454,7 @@ "TimeRangeFilterTimePeriodType", "TimeRangeFilterTypedDict", "TimeRangeTypedDict", + "TokenEndpointAuthMethod", "Tool", "ToolInfo", "ToolInfoTypedDict", @@ -2658,6 +2660,7 @@ "AuthConfigType": ".authconfig", "AuthConfigTypedDict": ".authconfig", "GrantType": ".authconfig", + "TokenEndpointAuthMethod": ".authconfig", "AuthStatus": ".authstatus", "AuthToken": ".authtoken", "AuthTokenTypedDict": ".authtoken", diff --git a/src/glean/api_client/models/agentschemas.py b/src/glean/api_client/models/agentschemas.py index 9feaabfe..f69f3156 100644 --- a/src/glean/api_client/models/agentschemas.py +++ b/src/glean/api_client/models/agentschemas.py @@ -33,6 +33,8 @@ class AgentSchemasTypedDict(TypedDict): r"""The schema for the agent input. In JSON Schema format.""" output_schema: OutputSchemaTypedDict r"""The schema for the agent output. In JSON Schema format.""" + name: NotRequired[str] + r"""The name of the agent.""" tools: NotRequired[List[ActionSummaryTypedDict]] r"""List of tools that the agent can invoke. Only included when include_tools query parameter is set to true.""" @@ -49,12 +51,15 @@ class AgentSchemas(BaseModel): output_schema: OutputSchema r"""The schema for the agent output. In JSON Schema format.""" + name: Optional[str] = None + r"""The name of the agent.""" + tools: Optional[List[ActionSummary]] = None r"""List of tools that the agent can invoke. Only included when include_tools query parameter is set to true.""" @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["tools"]) + optional_fields = set(["name", "tools"]) serialized = handler(self) m = {} diff --git a/src/glean/api_client/models/authconfig.py b/src/glean/api_client/models/authconfig.py index 65c26d2e..f01e07f8 100644 --- a/src/glean/api_client/models/authconfig.py +++ b/src/glean/api_client/models/authconfig.py @@ -43,6 +43,14 @@ class AuthConfigStatus(str, Enum, metaclass=utils.OpenEnumMeta): AUTH_DISABLED = "AUTH_DISABLED" +class TokenEndpointAuthMethod(str, Enum, metaclass=utils.OpenEnumMeta): + r"""The OAuth 2.0 token endpoint authentication method (RFC 7591). Determines how the client authenticates when exchanging an authorization code for a token. client_secret_post sends credentials as form fields, client_secret_basic sends them via Authorization header, none omits client secret and relies on PKCE only. Values use lowercase to match the OAuth 2.0 wire format (RFC 7591 Section 2).""" + + CLIENT_SECRET_POST = "client_secret_post" + CLIENT_SECRET_BASIC = "client_secret_basic" + NONE = "none" + + class AuthConfigTypedDict(TypedDict): r"""Config for tool's authentication method.""" @@ -72,6 +80,8 @@ class AuthConfigTypedDict(TypedDict): r"""The OAuth provider's endpoint, where access tokens are requested.""" resource: NotRequired[str] r"""The OAuth 2.0 Resource Indicator (RFC 8707) for the protected resource. Discovered from Protected Resource Metadata (RFC 9728) during DCR. Included in authorization and token exchange requests when present.""" + token_endpoint_auth_method: NotRequired[TokenEndpointAuthMethod] + r"""The OAuth 2.0 token endpoint authentication method (RFC 7591). Determines how the client authenticates when exchanging an authorization code for a token. client_secret_post sends credentials as form fields, client_secret_basic sends them via Authorization header, none omits client secret and relies on PKCE only. Values use lowercase to match the OAuth 2.0 wire format (RFC 7591 Section 2).""" last_authorized_at: NotRequired[datetime] r"""The time the tool was last authorized in ISO format (ISO 8601).""" @@ -117,6 +127,9 @@ class AuthConfig(BaseModel): resource: Optional[str] = None r"""The OAuth 2.0 Resource Indicator (RFC 8707) for the protected resource. Discovered from Protected Resource Metadata (RFC 9728) during DCR. Included in authorization and token exchange requests when present.""" + token_endpoint_auth_method: Optional[TokenEndpointAuthMethod] = None + r"""The OAuth 2.0 token endpoint authentication method (RFC 7591). Determines how the client authenticates when exchanging an authorization code for a token. client_secret_post sends credentials as form fields, client_secret_basic sends them via Authorization header, none omits client secret and relies on PKCE only. Values use lowercase to match the OAuth 2.0 wire format (RFC 7591 Section 2).""" + last_authorized_at: Annotated[ Optional[datetime], pydantic.Field(alias="lastAuthorizedAt") ] = None @@ -149,6 +162,15 @@ def serialize_status(self, value): return value return value + @field_serializer("token_endpoint_auth_method") + def serialize_token_endpoint_auth_method(self, value): + if isinstance(value, str): + try: + return models.TokenEndpointAuthMethod(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -163,6 +185,7 @@ def serialize_model(self, handler): "audiences", "authorization_url", "resource", + "token_endpoint_auth_method", "lastAuthorizedAt", ] ) diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1getchat.go b/tests/mockserver/internal/handler/pathpostrestapiv1getchat.go index 96d4127e..87401958 100644 --- a/tests/mockserver/internal/handler/pathpostrestapiv1getchat.go +++ b/tests/mockserver/internal/handler/pathpostrestapiv1getchat.go @@ -628,8 +628,8 @@ func testGetchatGetchat0(w http.ResponseWriter, req *http.Request) { Roles: []components.UserRoleSpecification{}, SourceDocumentSpec: types.Pointer(components.CreateDocumentSpecUnionDocumentSpec3( components.DocumentSpec3{ - UgcType: components.DocumentSpecUgcType1Announcements, - ContentID: 848009, + UgcType: components.DocumentSpecUgcType1Shortcuts, + ContentID: 602763, }, )), SourceType: components.AnswerSourceTypeAssistant.ToPointer(), diff --git a/tests/mockserver/internal/sdk/models/components/agentschemas.go b/tests/mockserver/internal/sdk/models/components/agentschemas.go index ac026fb3..262d8813 100644 --- a/tests/mockserver/internal/sdk/models/components/agentschemas.go +++ b/tests/mockserver/internal/sdk/models/components/agentschemas.go @@ -14,6 +14,8 @@ type OutputSchema struct { type AgentSchemas struct { // The ID of the agent. AgentID string `json:"agent_id"` + // The name of the agent. + Name *string `json:"name,omitempty"` // The schema for the agent input. In JSON Schema format. InputSchema InputSchema `json:"input_schema"` // The schema for the agent output. In JSON Schema format. @@ -29,6 +31,13 @@ func (o *AgentSchemas) GetAgentID() string { return o.AgentID } +func (o *AgentSchemas) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + func (o *AgentSchemas) GetInputSchema() InputSchema { if o == nil { return InputSchema{} diff --git a/tests/mockserver/internal/sdk/models/components/authconfig.go b/tests/mockserver/internal/sdk/models/components/authconfig.go index d9dd9049..483958ea 100644 --- a/tests/mockserver/internal/sdk/models/components/authconfig.go +++ b/tests/mockserver/internal/sdk/models/components/authconfig.go @@ -109,6 +109,36 @@ func (e *AuthConfigStatus) UnmarshalJSON(data []byte) error { } } +// TokenEndpointAuthMethod - The OAuth 2.0 token endpoint authentication method (RFC 7591). Determines how the client authenticates when exchanging an authorization code for a token. client_secret_post sends credentials as form fields, client_secret_basic sends them via Authorization header, none omits client secret and relies on PKCE only. Values use lowercase to match the OAuth 2.0 wire format (RFC 7591 Section 2). +type TokenEndpointAuthMethod string + +const ( + TokenEndpointAuthMethodClientSecretPost TokenEndpointAuthMethod = "client_secret_post" + TokenEndpointAuthMethodClientSecretBasic TokenEndpointAuthMethod = "client_secret_basic" + TokenEndpointAuthMethodNone TokenEndpointAuthMethod = "none" +) + +func (e TokenEndpointAuthMethod) ToPointer() *TokenEndpointAuthMethod { + return &e +} +func (e *TokenEndpointAuthMethod) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "client_secret_post": + fallthrough + case "client_secret_basic": + fallthrough + case "none": + *e = TokenEndpointAuthMethod(v) + return nil + default: + return fmt.Errorf("invalid value for TokenEndpointAuthMethod: %v", v) + } +} + // AuthConfig - Config for tool's authentication method. type AuthConfig struct { // Whether or not this tool is hosted on-premise. @@ -136,6 +166,8 @@ type AuthConfig struct { AuthorizationURL *string `json:"authorization_url,omitempty"` // The OAuth 2.0 Resource Indicator (RFC 8707) for the protected resource. Discovered from Protected Resource Metadata (RFC 9728) during DCR. Included in authorization and token exchange requests when present. Resource *string `json:"resource,omitempty"` + // The OAuth 2.0 token endpoint authentication method (RFC 7591). Determines how the client authenticates when exchanging an authorization code for a token. client_secret_post sends credentials as form fields, client_secret_basic sends them via Authorization header, none omits client secret and relies on PKCE only. Values use lowercase to match the OAuth 2.0 wire format (RFC 7591 Section 2). + TokenEndpointAuthMethod *TokenEndpointAuthMethod `json:"token_endpoint_auth_method,omitempty"` // The time the tool was last authorized in ISO format (ISO 8601). LastAuthorizedAt *time.Time `json:"lastAuthorizedAt,omitempty"` } @@ -221,6 +253,13 @@ func (o *AuthConfig) GetResource() *string { return o.Resource } +func (o *AuthConfig) GetTokenEndpointAuthMethod() *TokenEndpointAuthMethod { + if o == nil { + return nil + } + return o.TokenEndpointAuthMethod +} + func (o *AuthConfig) GetLastAuthorizedAt() *time.Time { if o == nil { return nil diff --git a/tests/test_messages.py b/tests/test_messages.py index c0fd29da..36643db3 100644 --- a/tests/test_messages.py +++ b/tests/test_messages.py @@ -18,7 +18,7 @@ def test_messages_messages(): res = glean.client.messages.retrieve( id_type=models.IDType.CONVERSATION_ID, id="", - datasource=models.Datasource.SLACK, + datasource=models.Datasource.MICROSOFTTEAMS, timestamp_millis=558834, ) assert res is not None diff --git a/tests/test_summarize.py b/tests/test_summarize.py index b2b5588a..0be6abb5 100644 --- a/tests/test_summarize.py +++ b/tests/test_summarize.py @@ -18,11 +18,10 @@ def test_summarize_summarize(): res = glean.client.documents.summarize( document_specs=[ { - "ugc_type": models.DocumentSpecUgcType2.COLLECTIONS, - "ugc_id": "", + "url": "https://huge-gym.net/", }, { - "ugc_type": models.DocumentSpecUgcType2.COLLECTIONS, + "ugc_type": models.DocumentSpecUgcType2.SHORTCUTS, "ugc_id": "", }, ]