From 524a08551e24a4941c0af1a8c9235edd6514c431 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Tue, 17 Nov 2026 20:24:40 +0000 Subject: [PATCH 1/2] =?UTF-8?q?##=20Python=20SDK=20Changes:=20*=20`glean.s?= =?UTF-8?q?earch.enumerate()`:=20**Removed**=20(Breaking=20=E2=9A=A0?= =?UTF-8?q?=EF=B8=8F)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .speakeasy/gen.lock | 112 ++----- .speakeasy/gen.yaml | 2 +- .speakeasy/glean-merged-spec.yaml | 306 +++++------------ .speakeasy/workflow.lock | 12 +- README.md | 1 - RELEASES.md | 12 +- docs/models/platformdocumentreference.md | 17 - .../platformsearchenumerationinclude.md | 18 - .../platformsearchenumerationrequest.md | 17 - .../platformsearchenumerationresponse.md | 11 - docs/sdks/search/README.md | 64 +--- pyproject.toml | 2 +- src/glean/api_client/_version.py | 4 +- src/glean/api_client/models/__init__.py | 27 -- .../models/platformdocumentreference.py | 125 ------- .../platformsearchenumerationinclude.py | 11 - .../platformsearchenumerationrequest.py | 125 ------- .../platformsearchenumerationresponse.py | 68 ---- src/glean/api_client/search.py | 312 ------------------ .../internal/handler/generated_handlers.go | 1 - .../handler/pathpostapisearchenumeration.go | 72 ---- .../handler/pathpostrestapiv1getchat.go | 4 +- .../components/platformdocumentreference.go | 115 ------- .../platformsearchenumerationinclude.go | 32 -- .../platformsearchenumerationrequest.go | 91 ----- .../platformsearchenumerationresponse.go | 43 --- .../operations/platformsearchenumeration.go | 27 -- tests/test_messages.py | 2 +- tests/test_search.py | 30 +- tests/test_summarize.py | 8 +- 30 files changed, 152 insertions(+), 1519 deletions(-) delete mode 100644 docs/models/platformdocumentreference.md delete mode 100644 docs/models/platformsearchenumerationinclude.md delete mode 100644 docs/models/platformsearchenumerationrequest.md delete mode 100644 docs/models/platformsearchenumerationresponse.md delete mode 100644 src/glean/api_client/models/platformdocumentreference.py delete mode 100644 src/glean/api_client/models/platformsearchenumerationinclude.py delete mode 100644 src/glean/api_client/models/platformsearchenumerationrequest.py delete mode 100644 src/glean/api_client/models/platformsearchenumerationresponse.py delete mode 100644 tests/mockserver/internal/handler/pathpostapisearchenumeration.go delete mode 100644 tests/mockserver/internal/sdk/models/components/platformdocumentreference.go delete mode 100644 tests/mockserver/internal/sdk/models/components/platformsearchenumerationinclude.go delete mode 100644 tests/mockserver/internal/sdk/models/components/platformsearchenumerationrequest.go delete mode 100644 tests/mockserver/internal/sdk/models/components/platformsearchenumerationresponse.go delete mode 100644 tests/mockserver/internal/sdk/models/operations/platformsearchenumeration.go diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 0e6bd9ea..854bfb03 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: 9d8ec68225b876cf9682078cfb491edd + docChecksum: b5e6aaf09569e076c7321d15cf12c515 docVersion: 0.9.0 - speakeasyVersion: 1.809.0 + speakeasyVersion: 1.810.0 generationVersion: 2.961.1 - releaseVersion: 0.17.23 - configChecksum: d147721181a90690bab7769f551ba3ec + releaseVersion: 0.17.24 + configChecksum: 116488d5830105475c1bd67473354480 repoURL: https://github.com/gleanwork/api-client-python.git installationURL: https://github.com/gleanwork/api-client-python.git published: true persistentEdits: - generation_id: 9da090f1-ab9d-4250-83fb-11af52891dc6 - pristine_commit_hash: 05b1c9625bbd71235db45061abef605387c1c517 - pristine_tree_hash: 8531fc047663d75228af7126868bca39b0e73afa + generation_id: 08a78376-586f-40be-bb90-2695174f008a + pristine_commit_hash: 1438fc36fbbcda477e755c0b0bd4ea9917fdf1bd + pristine_tree_hash: 588c5bbd1132019cf7d1de13996833012c76153b features: python: acceptHeaders: 3.0.0 @@ -2708,10 +2708,6 @@ trackedFiles: id: 3a6464744337 last_write_checksum: sha1:edb2eec75d654d6cdc40d7b84fba0d267e575065 pristine_git_object: 3829848e491fd4bf05ef6d7bbc0695ef25002d11 - docs/models/platformdocumentreference.md: - id: 5f049b42748d - last_write_checksum: sha1:c8e500e5034bb58f303072846f236baee72c6640 - pristine_git_object: 93d5cdeab436544f22f3caa375a8d3acac67d95a docs/models/platformdocumentsbatchrequest.md: id: 09737916458e last_write_checksum: sha1:90ac6d7745ea0616563fc1724d019a8f249bd679 @@ -2896,18 +2892,6 @@ trackedFiles: id: 0fe3fed8d508 last_write_checksum: sha1:8f0ae4b5184abebeda23cbd2348fd8808e5f9f62 pristine_git_object: c37af26a911e31beee67109e7772c26de46f3a17 - docs/models/platformsearchenumerationinclude.md: - id: 7cb057ee602b - last_write_checksum: sha1:72ef9dc8d93aef3a2ba115157972b2f95bba631c - pristine_git_object: bced8b4a639918f104ce6e73090c9f14c486e561 - docs/models/platformsearchenumerationrequest.md: - id: 7255fed49b41 - last_write_checksum: sha1:69d295262e368ea6520afee73a7e6a8f86b8ef86 - pristine_git_object: 85bb7ea66538372a6e5bc94070cd238e8612ad44 - docs/models/platformsearchenumerationresponse.md: - id: c65068eb3bac - last_write_checksum: sha1:dbf03a38111df00d42f9b407e982e4e9d853adfc - pristine_git_object: 3c79d022d967128daa7def992939ba06be049635 docs/models/platformsearchfiltersrequest.md: id: 8bbc53cc30ee last_write_checksum: sha1:e72c60e81d9b005abde6716e7036d8937aad2615 @@ -4298,8 +4282,8 @@ trackedFiles: pristine_git_object: 6dae1cb2e68a7b2f8bcf338543f8a5a222830a13 docs/sdks/search/README.md: id: 5c534716244c - last_write_checksum: sha1:5429a2147b3b4a68a46b6811a0b6483403695cec - pristine_git_object: d1aa1757de4f5860300a19d6ae853b6a41efce9c + last_write_checksum: sha1:022e913d9c00b87af808f366156b31a6f3a23b0b + pristine_git_object: 816c6349ca6c0222e83d4bc0399a8479c9c726dc docs/sdks/skills/README.md: id: 3a14a5c90791 last_write_checksum: sha1:9e6769748ecd96d412e3fea2367d2749d24753f5 @@ -4334,8 +4318,8 @@ trackedFiles: pristine_git_object: 79e388be87446ab6a4064b372bad0e8376d0cb5e pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:6eedf3ff61a283b18a7ea32c69f4a9c3c5b7948b - pristine_git_object: 2671884cf101ca259f3c221f7610cb67a2d59533 + last_write_checksum: sha1:ba2f72d754318d9e0a40a5eb1e52c19e05c489e6 + pristine_git_object: c1aeb95aa4528b02ec9990cd7080c5bce5587472 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:c2c83f71dea61eb50c9e05da83b16d18b4da8794 @@ -4362,8 +4346,8 @@ trackedFiles: pristine_git_object: 55f23c1feabfedeb7e8cd5bea8b910f0ae0b77d9 src/glean/api_client/_version.py: id: 0ce22b26136b - last_write_checksum: sha1:f423eb122a2323ad02b26bed19e16b3d2136eb7c - pristine_git_object: e6983fed3f0401ae7df07c17c4b52ed8a7d54368 + last_write_checksum: sha1:69b02cb1fefad4a4bfe632daba7a35cfbb1e00f3 + pristine_git_object: 75f528b2b79af3c579327ab727be3c0967494eb9 src/glean/api_client/admin.py: id: 583cfae82adf last_write_checksum: sha1:3c462f418d2b32a90c92f88121867a73295b0c6c @@ -4570,8 +4554,8 @@ trackedFiles: pristine_git_object: b140b656b788bb0deb8a974420783b338f0521e2 src/glean/api_client/models/__init__.py: id: d5f6ea5efcbe - last_write_checksum: sha1:b375559484c01b03309e772b0d9bd8e3d2e91c9f - pristine_git_object: 3693ca1bc4447b3b745508274971c89757ad13fd + last_write_checksum: sha1:f3721e5c48040f1f8d253b4bfb7d8515798511a0 + pristine_git_object: 1f55fb2312489bb9d7a6d2bf7144e872d2b4635b src/glean/api_client/models/accessrequestpermissiondeniedresponse_error.py: id: 22a2fa0d5899 last_write_checksum: sha1:f7dd6f906a4dd7433992f77395f9fb491fa5ac5c @@ -6700,10 +6684,6 @@ trackedFiles: id: 0a0ce32c810e last_write_checksum: sha1:c4f17e0ec93a6ccea3a6d43f69f3a334dbf4a9ab pristine_git_object: 1d08732c2202e4c727ba2858e9758a5d4f2c87ec - src/glean/api_client/models/platformdocumentreference.py: - id: d55f7b56a802 - last_write_checksum: sha1:807a7b49e268972afd8f9fc6e89e76678e7330d5 - pristine_git_object: b5f21f2b8540aed0480f2a6afbc3a2b9b2038a27 src/glean/api_client/models/platformdocumentsbatchrequest.py: id: 57885313154d last_write_checksum: sha1:f9724bf72f716be89770900b2435e132d32f299a @@ -6868,18 +6848,6 @@ trackedFiles: id: 65de4ed5c1b3 last_write_checksum: sha1:2916fc096e4cfe89375626f2a945b4785ad2ade7 pristine_git_object: 88ce5a1715908f6528fd68563f08aff1ff59ce6a - src/glean/api_client/models/platformsearchenumerationinclude.py: - id: a2077a23e376 - last_write_checksum: sha1:71068aeef9a21f2a9b1883f9d295448dbb252b3c - pristine_git_object: ebcdb647eb9d950315368093642624a82ff3eccd - src/glean/api_client/models/platformsearchenumerationrequest.py: - id: e550d00ad0b9 - last_write_checksum: sha1:cc30f2dd5e06e51934107760ae92a5f38509609b - pristine_git_object: 6053594cec51150ffc11861562f8d655c2825718 - src/glean/api_client/models/platformsearchenumerationresponse.py: - id: 2cf782f15ab7 - last_write_checksum: sha1:196e98e57a93ba1b265bfa3fad159965aae38edb - pristine_git_object: 3f9321422693867e9a064d2b6f41dd06f23bcc73 src/glean/api_client/models/platformsearchfiltersresponse.py: id: 743edd99f7aa last_write_checksum: sha1:9c6e81390c3f1665bc2d26c2e3c5face283f759d @@ -7830,8 +7798,8 @@ trackedFiles: pristine_git_object: 22e0a4eab0ef8e54dcfd986084d01c14a56f47a6 src/glean/api_client/search.py: id: a3b404a8b402 - last_write_checksum: sha1:d36143ac4120f0ecc22e1fe524a7d0d2cc994d6d - pristine_git_object: a2fdfcbab238d70351cdd3b8dea25dfaf9fa7178 + last_write_checksum: sha1:b2c68f6baaabeaf0e14fd6e77dbde9bb80802696 + pristine_git_object: 7150efbff6e08314d6f576f8c0c38235d0e41db5 src/glean/api_client/skills.py: id: 79f3c37e1b5a last_write_checksum: sha1:a9f6ddb1d28b6428e95bbe4c842e30a75f2b197b @@ -7998,8 +7966,8 @@ trackedFiles: pristine_git_object: 929558ef2e1165f7e09da6d0a64f016c90971655 tests/mockserver/internal/handler/generated_handlers.go: id: 61ac4f7cce9e - last_write_checksum: sha1:82b6fc55b4750de9daea2f5a47738ab3df43a094 - pristine_git_object: 10cb3da083d847ee748d0a76caacc5f1a3beb08f + last_write_checksum: sha1:9b4637a979a61dabdc65e81ae71068c54a97ec4c + pristine_git_object: 75f142bb7cdeedab3d92bdb85c68fc6693d94e7a tests/mockserver/internal/handler/pathdeleterestapiindexcustommetadataschemagroupname.go: id: 979e4583765b last_write_checksum: sha1:b1d4edb259d907c7a88b634bf16f0cf152321693 @@ -8328,10 +8296,6 @@ trackedFiles: id: 53e6a34b5b4b last_write_checksum: sha1:5c878b42ee0ffe08f9ad98c3e1f1c9c20ce4d21a pristine_git_object: 1e3fe6a9bed655ba32d7c59fe577f41beac69da8 - tests/mockserver/internal/handler/pathpostapisearchenumeration.go: - id: 67082f434e1a - last_write_checksum: sha1:498a79199ca09e8822326a7c0a503bf64e4d5851 - pristine_git_object: 8434a2e3fa8ed39ee5e80accb6b18fa4f2a0642c tests/mockserver/internal/handler/pathpostapiskills.go: id: 8ed490cc6d95 last_write_checksum: sha1:baf2227d6bd2c85e94842170a811ed97ec2e2b5c @@ -8498,8 +8462,8 @@ trackedFiles: pristine_git_object: abb763ddc8504b28c0cb6fdf8d25237d46e21bab tests/mockserver/internal/handler/pathpostrestapiv1getchat.go: id: a0ec7bafa599 - last_write_checksum: sha1:b48e2313407814ee4f8ed181b8e5299a84960c44 - pristine_git_object: 96d4127e0455272a9842e2d1954e5fcefa3278cc + last_write_checksum: sha1:2267292ba8173cf8df70ddbc6ac02ff3439cb879 + pristine_git_object: 8740195860b6c08e036caae19aab8e7374350960 tests/mockserver/internal/handler/pathpostrestapiv1getchatapplication.go: id: 7d101c69d4bc last_write_checksum: sha1:7b81898137fdb3a89b4dcfa318b9b5b92e8860c0 @@ -10336,10 +10300,6 @@ trackedFiles: id: 069550e90b62 last_write_checksum: sha1:122dd8b1f581cd4afc74aa66ebd40482ef6f8bf6 pristine_git_object: 3eec0b1a224a0957a1bd736990f5c3ab50491041 - tests/mockserver/internal/sdk/models/components/platformdocumentreference.go: - id: a4be70b2ac95 - last_write_checksum: sha1:f796641c9358ecab9a9d48d2b867621ae9ce3f25 - pristine_git_object: 8d5ee032af16e685ba1db9e4d3a47307a5731619 tests/mockserver/internal/sdk/models/components/platformdocumentsbatchrequest.go: id: 9037807c5a98 last_write_checksum: sha1:727bc02cec152b7c3d5b939a4334ea1b7d732405 @@ -10504,18 +10464,6 @@ trackedFiles: id: dd777258615b last_write_checksum: sha1:0aa6e9a8d84b38bb403af1bb505adc2666c03c5e pristine_git_object: 1588f7394695e92cf3cd2b4a620d7c239f179815 - tests/mockserver/internal/sdk/models/components/platformsearchenumerationinclude.go: - id: 24497ab12dde - last_write_checksum: sha1:a56244a9def88eb48ab13e03761555e69c603bf0 - pristine_git_object: e944cdb02de2b6177253b5118fdf80526ceef786 - tests/mockserver/internal/sdk/models/components/platformsearchenumerationrequest.go: - id: 8a9eb0db18c3 - last_write_checksum: sha1:bb43060068d5be70facc0176eb162b6d1df219fb - pristine_git_object: a5fd5eaf5e4ad844969ceecc566936c3a9003bd2 - tests/mockserver/internal/sdk/models/components/platformsearchenumerationresponse.go: - id: 163130806d65 - last_write_checksum: sha1:7e45670b21e5c4d4213902e83d944fafe99efc02 - pristine_git_object: f2ecd205bc3ca5b2e7d92d84ef9491b15439fb4d tests/mockserver/internal/sdk/models/components/platformsearchfiltersresponse.go: id: c6e01fb5cff1 last_write_checksum: sha1:94caa146dcfafb521d396d19e5358da8c598faab @@ -11760,10 +11708,6 @@ trackedFiles: id: d990791ac101 last_write_checksum: sha1:9da9b49850375b74bf6296fcec336ba9ad1e1eea pristine_git_object: 381c8530dfb959419e47dee10c46cfdd5846f611 - tests/mockserver/internal/sdk/models/operations/platformsearchenumeration.go: - id: e1aa6765ff1d - last_write_checksum: sha1:2fe9178766a7764ee8cf4c3d88de9d8d481e6265 - pristine_git_object: 4b5ba7fe7a18912ff655d60271fa463d3edd1933 tests/mockserver/internal/sdk/models/operations/platformsearchfilters.go: id: 3f6c4119e4bd last_write_checksum: sha1:e0836460229365773a66a5b310ba886d5fbdf202 @@ -12346,8 +12290,8 @@ trackedFiles: pristine_git_object: 6cc8aeec3c52329d389081db0a27f10f53f214b9 tests/test_messages.py: id: be23089b1f8b - last_write_checksum: sha1:b7415512608102fa07b1990a350a7da66946fe46 - pristine_git_object: 636f01d348f30db3ee81985044634511b615af16 + last_write_checksum: sha1:5db8087e85104ab50b362638150fa1f6686a3c30 + pristine_git_object: c0fd29dab7d365ef9d78c0c291b925e6b9fd7298 tests/test_people.py: id: 37c243940039 last_write_checksum: sha1:2b78b1c5ea17f267895188b1b48ff9fe2bc19f17 @@ -12366,16 +12310,16 @@ trackedFiles: pristine_git_object: 3fa82f944c8693f534f71d96c489225c3f65cb5d tests/test_search.py: id: dd86606b335f - last_write_checksum: sha1:919bdabee66eeaedf6ecaf8354eedb5f7c4f2a3a - pristine_git_object: 401f18888fd24c25a0d9e6ee5d79dc695773fe99 + last_write_checksum: sha1:a199c116dd8185a318296ea721b4edf51281899c + pristine_git_object: b1901aa9fb882ebb51d8f43d1e79a6d9d0287359 tests/test_skills.py: id: ac5db26bd6b1 last_write_checksum: sha1:c01d9e86a9686459777a922246762675ffd9a41a pristine_git_object: 1c854370da050c261cb2cbcf9cc16829f5d8e78c tests/test_summarize.py: id: a255d8a6f627 - last_write_checksum: sha1:27f1c7a6c3acd199a3ed350b4bfc8a09c48a96bd - pristine_git_object: 9efa5c1d63d430a96553b99c2e2c987c64941690 + last_write_checksum: sha1:dc8fc131020d3c55cda6a5a506cd62032c44171e + pristine_git_object: 28d18f609bba559e061ac9a444c5826794e52f7d tests/test_tools.py: id: 70889bdf7321 last_write_checksum: sha1:e9e37efd6a65d805c02d70d548df9c87dd062b0e @@ -14251,7 +14195,7 @@ generatedTests: platform-search-enumeration: "2026-11-16T11:51:20Z" releaseNotes: | ## Python SDK Changes: - * `glean.client.insights.retrieve()`: `response.overview_response.total_signups_week_ago` **Added** + * `glean.search.enumerate()`: **Removed** (Breaking ⚠️) generatedFiles: - .devcontainer/README.md - .devcontainer/devcontainer.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index d8f363f6..353ae39e 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -35,7 +35,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: true python: - version: 0.17.23 + version: 0.17.24 additionalDependencies: dev: {} main: diff --git a/.speakeasy/glean-merged-spec.yaml b/.speakeasy/glean-merged-spec.yaml index 678935a3..ad10f296 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: 92084e408d64f4792098b2dcd1013e0af7abe611 - x-open-api-commit-sha: fee2a7ed1565ad90159fb31b1a05283058c83f3f + x-source-commit-sha: 2f6fc4fe9fed01ad76ee9aa694041c743bd74875 + x-open-api-commit-sha: 241062eca12866ea62b6e58d504ef481935fcf48 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. @@ -1496,63 +1496,6 @@ paths: x-speakeasy-name-override: listFilters security: - APIToken: [] - /api/search/enumeration: - post: - tags: - - Search - summary: Enumerate matching documents - description: | - Walk every indexed document that matches a selection and that the caller is permitted to see. Returns document references with minimal metadata and never bodies; request `SNIPPETS` via `include` for query-relevant excerpts, and hydrate full documents with `POST /api/documents/batch`. Unlike `POST /api/search`, `query` is optional: omit it to enumerate by `datasources`, `filters`, and `time_range` alone. Results are ordered for completeness, not relevance. - Follow `next_cursor` until `has_more` is `false`, regardless of page size. This is a live scan, not a snapshot: concurrent index changes can cause duplicates or omissions. Deduplicate by `document_id`. - A page is either complete at its cursor position or an error. A shard or datasource failure returns HTTP 503 and the same cursor stays valid for retry; this endpoint never returns a partial page. A cursor reused with a different selection returns HTTP 400 `invalid_cursor`. - operationId: platform-search-enumeration - x-glean-scopes: - legacy: - - SEARCH - platform: - - search:query - x-visibility: Public - x-glean-experimental: - id: 9ce7bb73-1e30-460a-a917-cae09ac3a3ea - introduced: "2026-11-02" - x-codegen-request-body-name: payload - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/PlatformSearchEnumerationRequest" - responses: - "200": - description: Successful response. - content: - application/json: - schema: - $ref: "#/components/schemas/PlatformSearchEnumerationResponse" - "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" - "413": - $ref: "#/components/responses/PlatformRequestTooLarge" - "422": - $ref: "#/components/responses/PlatformUnprocessableEntity" - "429": - $ref: "#/components/responses/PlatformTooManyRequests" - "500": - $ref: "#/components/responses/PlatformInternalServerError" - "503": - $ref: "#/components/responses/PlatformServiceUnavailable" - x-speakeasy-group: search - x-speakeasy-name-override: enumerate - security: - - APIToken: [] /api/admin/usage/settings: get: tags: @@ -11124,158 +11067,6 @@ components: type: string minLength: 1 description: Platform-generated request ID for support correlation. - PlatformSearchEnumerationInclude: - type: string - description: Optional document reference projection. - enum: - - SNIPPETS - x-enumDescriptions: - SNIPPETS: Add snippets, query-relevant plain-text excerpts from the document body. Only produced when `query` is present; a scope-only scan has nothing to excerpt. - x-speakeasy-enum-descriptions: - SNIPPETS: Add snippets, query-relevant plain-text excerpts from the document body. Only produced when `query` is present; a scope-only scan has nothing to excerpt. - PlatformSearchEnumerationRequest: - type: object - additionalProperties: false - description: | - Selection to enumerate. At least one of `datasources`, `query`, or `filters` must be set. - example: - query: amoxicillin - datasources: - - gdrive - page_size: 500 - properties: - query: - type: string - minLength: 1 - description: | - The search query string. Supports inline operators such as `from:jane type:document app:confluence`. Inline operators are AND'd with structured `filters`. - datasources: - type: array - minItems: 1 - items: - type: string - minLength: 1 - description: | - Restrict results to specific datasource identifiers returned by `GET /api/search/filters`. Scopes by datasource type and may include results from multiple instances of that type. Omit to enumerate across all visible datasources matching `query` or `filters`. - filters: - type: array - minItems: 1 - items: - $ref: "#/components/schemas/PlatformFilter" - description: | - Structured filters applied to search results. Multiple values within a filter with `EQUALS` are OR'd; separate filters are AND'd. Conflicting constraints on the same field (for example, `type:document` in `query` and `type:spreadsheet` in a filter) return an empty result set. See `Filter.field` for built-in field names and operators. Other nonblank field names are accepted as custom filters without validation; behavior depends on your connected sources. - time_range: - $ref: "#/components/schemas/PlatformTimeRange" - page_size: - type: integer - minimum: 1 - maximum: 1000 - default: 100 - description: Number of results to return per page. - cursor: - type: - - string - - "null" - description: | - Opaque pagination token from a previous response's `next_cursor` field. Omit on the first request. Cursors do not expire and are valid only for the original selection. - include: - type: array - minItems: 1 - uniqueItems: true - items: - $ref: "#/components/schemas/PlatformSearchEnumerationInclude" - description: | - Optional field groups to add to each document reference. Each value only adds fields; it does not change which documents are returned. - PlatformDocumentReference: - type: object - additionalProperties: false - required: - - document_id - - url - - title - - datasource - properties: - document_id: - type: string - minLength: 1 - description: | - Indexed Glean store ID. Stable identity for deduplication and the selector accepted by `POST /api/documents/batch`. - example: doc_123 - url: - type: string - format: uri - minLength: 1 - description: Canonical URL of the result. - example: https://docs.google.com/spreadsheets/d/abc - title: - type: string - minLength: 1 - description: Display title. For a conversation, this is a title built from the participants, such as "Alice and Bob", including when the indexed title is the message body. When the result has no title, the server returns Untitled. - example: Amoxicillin inventory - datasource: - type: string - minLength: 1 - description: The datasource this result originates from. - example: gdrive - document_type: - type: - - string - - "null" - minLength: 1 - description: The document type within the datasource. - example: spreadsheet - creator: - $ref: "#/components/schemas/PlatformPersonReference" - owner: - $ref: "#/components/schemas/PlatformPersonReference" - updated_at: - type: - - string - - "null" - format: date-time - description: When the result was last modified. - created_at: - type: - - string - - "null" - format: date-time - description: When the result was created. - snippets: - type: array - items: - type: string - minLength: 1 - description: | - Query-relevant plain-text excerpts from the document body. Present only when the request's `include` contains `SNIPPETS` and `query` is set. - example: - - Amoxicillin 500mg inventory was last counted on... - PlatformSearchEnumerationResponse: - type: object - additionalProperties: false - required: - - results - - has_more - - next_cursor - - request_id - properties: - results: - type: array - items: - $ref: "#/components/schemas/PlatformDocumentReference" - description: Document references at this cursor position. - has_more: - type: boolean - description: Indicates whether additional pages of results are available. - next_cursor: - type: - - string - - "null" - description: | - Opaque token to pass as `cursor` in the next request. Null exactly when `has_more` is false. - request_id: - type: string - minLength: 1 - description: Platform-generated request ID for support correlation. PlatformPerMemberSettings: type: object additionalProperties: false @@ -12227,6 +12018,38 @@ components: source: $ref: "#/components/schemas/PlatformUsagePolicySourceTarget" description: Configured policy supplying this restriction. + PlatformUsageUsedValue: + type: object + additionalProperties: false + description: Accrued usage in one unit, without combining or converting units. + required: + - used + - unit + properties: + used: + type: string + minLength: 1 + maxLength: 24 + pattern: ^(0|[1-9][0-9]*)(\.[0-9]{1,6})?$ + description: Nonnegative decimal usage with at most six fractional digits. + unit: + $ref: "#/components/schemas/PlatformUsageUnit" + description: Unit of accrued usage. + PlatformUsageAggregateUsage: + type: object + additionalProperties: false + description: | + Existing clientless AGENT counter usage in the current UTC calendar month, independent of agent/default policies and the selected spend client. This records aggregate attribution, not certified run lineage or exact app usage. Counter failures omit aggregate_usage, never fabricate zero amounts. + required: + - used_by_unit + properties: + used_by_unit: + type: array + minItems: 2 + maxItems: 2 + description: Existing aggregate counters in USD then CREDITS, including zero amounts. + items: + $ref: "#/components/schemas/PlatformUsageUsedValue" PlatformUsageLimitDecision: type: string description: Configured-budget status for the target, independent of runtime admission switches. @@ -12366,6 +12189,7 @@ components: - period - value - used + - used_unit - decision - active_actions properties: @@ -12392,7 +12216,13 @@ components: description: Configured cap before approved one-period grants; value.amount is not remaining headroom. used: type: string - description: Decimal amount of accrued usage for this limit. + description: Decimal amount of accrued usage for this limit in used_unit. + used_unit: + $ref: "#/components/schemas/PlatformUsageUnit" + x-glean-experimental: + id: 5c21ff70-7182-49f9-89c7-9c8f4929695f + introduced: "2026-11-16" + description: Resolved counter denomination, including when value.mode is UNLIMITED. current_period_amount: type: string minLength: 1 @@ -12453,7 +12283,7 @@ components: type: object additionalProperties: false description: | - Configured-budget evaluation for a concrete target and period, not runtime admission, model eligibility, or agent-run preflight. AVAILABLE can mean that no configured policy applies; inspect applicable_policy_count and the normalized target and exact period echo. Configured caps are evaluated_limits[].value.amount, accrued usage is evaluated_limits[].used, the cap enforced this period is evaluated_limits[].current_period_amount, per-rule headroom is evaluated_limits[].remaining, and tightest headroom is effective_limits[].remaining. Approved one-period grants raise the current-period amount and headroom without changing the configured cap. Units are never combined or converted. Non-admin evaluation omits shared budgets from applicable_policy_count, evaluated_limits, and effective_limits; decision can be BLOCKED by a shared budget even when the target's own limits show remaining headroom. decision_causes explains every non-AVAILABLE decision, including one caused by a budget that is not listed. + Configured-budget evaluation for a concrete target and period, not runtime admission, model eligibility, or agent-run preflight. AVAILABLE can mean that no configured policy applies; inspect applicable_policy_count and the normalized target and exact period echo. Optional used_by_unit reports exact subject and app usage for USER and ORGANIZATION, independent of policies; AGENT omits it and instead returns clientless aggregate_usage independent of configured policies. Both are omitted, as unknown, when their counters are unavailable; a counter failure returns 503 only when an applicable policy needs a counter. Non-admin evaluation omits shared budgets regardless of the caller's permissions. Hidden shared budgets can block the decision but never contribute counts or soft warnings. Configured caps are evaluated_limits[].value.amount, policy counter usage is evaluated_limits[].used, the cap enforced this period is evaluated_limits[].current_period_amount, per-rule headroom is evaluated_limits[].remaining, and tightest headroom is effective_limits[].remaining. Approved one-period grants raise the current-period amount and headroom without changing the configured cap. Units are never combined or converted. Non-admin evaluation omits shared budgets from applicable_policy_count, evaluated_limits, and effective_limits; decision can be BLOCKED by a shared budget even when the target's own limits show remaining headroom. decision_causes explains every non-AVAILABLE decision, including one caused by a budget that is not listed. example: target: type: USER @@ -12462,6 +12292,11 @@ components: period: type: RECURRING_CALENDAR_MONTH applicable_policy_count: 1 + used_by_unit: + - used: "20" + unit: USD + - used: "0" + unit: CREDITS decision: BLOCKED decision_causes: - decision: BLOCKED @@ -12484,6 +12319,7 @@ components: unit: USD enforcement: HARD used: "20" + used_unit: USD current_period_amount: "80" remaining: "60" decision: AVAILABLE @@ -12543,6 +12379,25 @@ components: minimum: 0 description: | Number of applicable configured policies returned in evaluated_limits, including UNLIMITED policies. Zero explicitly means no returned policy matched, not an unlimited configured rule. Non-admin evaluation excludes shared budgets. Included even when zero. + aggregate_usage: + $ref: "#/components/schemas/PlatformUsageAggregateUsage" + x-glean-experimental: + id: 3a6dcfc9-9429-45da-ba71-945c43c1dfd7 + introduced: "2026-11-16" + description: | + Present only for AGENT, including without configured policies. Existing clientless AGENT counters, never relabeled as selected-client usage. Omitted, as unknown, when the counters are unavailable. + used_by_unit: + type: array + x-go-type-skip-optional-pointer: true + x-glean-experimental: + id: 9d805f36-84ee-43de-a21a-a41426dce590 + introduced: "2026-11-16" + minItems: 2 + maxItems: 2 + items: + $ref: "#/components/schemas/PlatformUsageUsedValue" + description: | + Live accrued usage for exactly the normalized USER or ORGANIZATION and selected app in the current UTC calendar month. When present, contains USD then CREDITS, including zero amounts and when no policy applies. AGENT omits this field until exact per-app counters are ready; existing agent policy evaluation, usage, headroom and decisions remain available. Also omitted when the counters are unavailable. Absence is unknown, not zero or relabeled aggregate usage. This field is not a sum of policy counters or workspace constraints. decision: $ref: "#/components/schemas/PlatformUsageLimitDecision" description: | @@ -12560,7 +12415,7 @@ components: items: $ref: "#/components/schemas/PlatformUsageHeadroomValue" description: | - Tightest remaining budget per finite unit, ordered USD then CREDITS. remaining is headroom after accrued usage and approved one-period grants, not a configured cap. Units are never combined or converted. When no finite policy applies, contains a single UNLIMITED entry without remaining, unit, or enforcement, including when applicable_policy_count is zero. Covers only returned evaluated_limits, so non-admin headroom excludes shared budgets. This configured-budget result is not a runtime admission guarantee. + Tightest visible remaining budget per finite unit, ordered USD then CREDITS. remaining is headroom after accrued usage and approved one-period grants, not a configured cap. Units are never combined or converted. When no visible finite policy applies, contains a single UNLIMITED entry without remaining, unit, or enforcement, including when applicable_policy_count is zero. Covers only returned evaluated_limits, so non-admin headroom excludes shared budgets and is not evidence that they are unlimited or available. This configured-budget result is not a runtime admission guarantee. evaluated_limits: type: array items: @@ -12754,6 +12609,11 @@ components: next_cursor: type: "null" description: If present on the last page, the cursor must be null. + PlatformDesiredLimitAmount: + type: string + pattern: ^([1-9][0-9]*(\.[0-9]+)?|0\.[0-9]*[1-9][0-9]*)$ + description: | + Desired new total monthly limit in the applicable limit's denomination, encoded as a positive plain decimal string, not an additive increase. Required on creation when the workspace requires an amount and business justification; otherwise optional. The backend stores float32 values, not arbitrary-precision decimals. This is a request, not an approval. PlatformRequestEntityType: type: string enum: @@ -12784,6 +12644,9 @@ components: description: | A request as its requester or agent editor sees it: the outcome, approved amount, and note, but not who resolved it or how broadly. The Glean app shows those details only to billing readers, through AdministrativeLimitIncreaseRequest. properties: + desired_limit_amount: + $ref: "#/components/schemas/PlatformDesiredLimitAmount" + description: Stored desired total monthly limit, when supplied; older requests may omit it. request_id: type: string description: Server-assigned resource identifier, distinct from the response's trace request_id. @@ -12894,7 +12757,11 @@ components: type: string maxLength: 4096 description: | - Explanation of why the increase is needed. Required, and nonblank, when the workspace's request-more configuration requires a business justification. + Explanation of why the increase is needed. Required, and nonblank, when the workspace's request-more configuration requires an amount and business justification. + desired_limit_amount: + $ref: "#/components/schemas/PlatformDesiredLimitAmount" + description: | + Desired total limit for the current UTC month. Required when the workspace requires an amount and justification. PlatformPersonalRequestResponse: type: object additionalProperties: false @@ -12984,6 +12851,9 @@ components: description: | A request as a billing reader sees it: every PersonalLimitIncreaseRequest field, plus who resolved it and the approval's scope and breadth. properties: + desired_limit_amount: + $ref: "#/components/schemas/PlatformDesiredLimitAmount" + description: Stored desired total monthly limit, when supplied; older requests may omit it. request_id: type: string description: Server-assigned resource identifier, distinct from the response's trace request_id. @@ -13128,7 +12998,11 @@ components: type: string maxLength: 4096 description: | - Explanation of why the increase is needed. Required, and nonblank, when the workspace's request-more configuration requires a business justification. + Explanation of why the increase is needed. Required, and nonblank, when the workspace's request-more configuration requires an amount and business justification. + desired_limit_amount: + $ref: "#/components/schemas/PlatformDesiredLimitAmount" + description: | + Desired total agent limit for the current UTC month. Required when the workspace requires an amount and justification. PlatformAdministrativeRequestResponse: type: object additionalProperties: false diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 78adcb49..22dadb7b 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.809.0 +speakeasyVersion: 1.810.0 sources: Glean API: sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:9520eaea4f882d898719574ee75afc5c9289562b08a4ddbf337693f3041aaae3 - sourceBlobDigest: sha256:d1b9b1adb0aa1d72885cc0bd86db9adc236a161f7f0b70b9f5cc61cf5c7052bd + sourceRevisionDigest: sha256:0ce4e9b2b8560aa2004ea154dba75c6bb685cccc1fc5dd9a0b10c8825182e0b5 + sourceBlobDigest: sha256:4f89567ad6174b01fa95ea0e4c705bcfe303ad158f8935313105767ec9cd3492 tags: - latest Glean Client API: @@ -16,10 +16,10 @@ targets: glean: source: Glean API sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:9520eaea4f882d898719574ee75afc5c9289562b08a4ddbf337693f3041aaae3 - sourceBlobDigest: sha256:d1b9b1adb0aa1d72885cc0bd86db9adc236a161f7f0b70b9f5cc61cf5c7052bd + sourceRevisionDigest: sha256:0ce4e9b2b8560aa2004ea154dba75c6bb685cccc1fc5dd9a0b10c8825182e0b5 + sourceBlobDigest: sha256:4f89567ad6174b01fa95ea0e4c705bcfe303ad158f8935313105767ec9cd3492 codeSamplesNamespace: glean-api-specs-python-code-samples - codeSamplesRevisionDigest: sha256:e02f2f96de6e317bfd39479bff867bdec1603771e2f754bb2eedcfa1d1c0e4fd + codeSamplesRevisionDigest: sha256:491648483ef0c88e55908bf76ebf15e746ebf4656f736ba3b0dc1c5403611c88 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 65307840..c105f90f 100644 --- a/README.md +++ b/README.md @@ -587,7 +587,6 @@ For more information on obtaining the appropriate token type, please contact you * [query](docs/sdks/search/README.md#query) - Search * [list_filters](docs/sdks/search/README.md#list_filters) - List search filters -* [enumerate](docs/sdks/search/README.md#enumerate) - Enumerate matching documents ### [Skills](docs/sdks/skills/README.md) diff --git a/RELEASES.md b/RELEASES.md index 74651194..cb00306e 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1088,4 +1088,14 @@ Based on: ### Generated - [python v0.17.23] . ### Releases -- [PyPI v0.17.23] https://pypi.org/project/glean-api-client/0.17.23 - . \ No newline at end of file +- [PyPI v0.17.23] https://pypi.org/project/glean-api-client/0.17.23 - . + +## 2026-11-17 20:21:00 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.810.0 (2.961.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.17.24] . +### Releases +- [PyPI v0.17.24] https://pypi.org/project/glean-api-client/0.17.24 - . \ No newline at end of file diff --git a/docs/models/platformdocumentreference.md b/docs/models/platformdocumentreference.md deleted file mode 100644 index 93d5cdea..00000000 --- a/docs/models/platformdocumentreference.md +++ /dev/null @@ -1,17 +0,0 @@ -# PlatformDocumentReference - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `document_id` | *str* | :heavy_check_mark: | Indexed Glean store ID. Stable identity for deduplication and the selector accepted by `POST /api/documents/batch`.
| doc_123 | -| `url` | *str* | :heavy_check_mark: | Canonical URL of the result. | https://docs.google.com/spreadsheets/d/abc | -| `title` | *str* | :heavy_check_mark: | Display title. For a conversation, this is a title built from the participants, such as "Alice and Bob", including when the indexed title is the message body. When the result has no title, the server returns Untitled. | Amoxicillin inventory | -| `datasource` | *str* | :heavy_check_mark: | The datasource this result originates from. | gdrive | -| `document_type` | *OptionalNullable[str]* | :heavy_minus_sign: | The document type within the datasource. | spreadsheet | -| `creator` | [Optional[models.PlatformPersonReference]](../models/platformpersonreference.md) | :heavy_minus_sign: | A lightweight reference to a person, used where a payload merely points at someone. | | -| `owner` | [Optional[models.PlatformPersonReference]](../models/platformpersonreference.md) | :heavy_minus_sign: | A lightweight reference to a person, used where a payload merely points at someone. | | -| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | When the result was last modified. | | -| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | When the result was created. | | -| `snippets` | List[*str*] | :heavy_minus_sign: | Query-relevant plain-text excerpts from the document body. Present only when the request's `include` contains `SNIPPETS` and `query` is set.
| [
"Amoxicillin 500mg inventory was last counted on..."
] | \ No newline at end of file diff --git a/docs/models/platformsearchenumerationinclude.md b/docs/models/platformsearchenumerationinclude.md deleted file mode 100644 index bced8b4a..00000000 --- a/docs/models/platformsearchenumerationinclude.md +++ /dev/null @@ -1,18 +0,0 @@ -# PlatformSearchEnumerationInclude - -Optional document reference projection. - -## Example Usage - -```python -from glean.api_client.models import PlatformSearchEnumerationInclude - -value = PlatformSearchEnumerationInclude.SNIPPETS -``` - - -## Values - -| Name | Value | -| ---------- | ---------- | -| `SNIPPETS` | SNIPPETS | \ No newline at end of file diff --git a/docs/models/platformsearchenumerationrequest.md b/docs/models/platformsearchenumerationrequest.md deleted file mode 100644 index 85bb7ea6..00000000 --- a/docs/models/platformsearchenumerationrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# PlatformSearchEnumerationRequest - -Selection to enumerate. At least one of `datasources`, `query`, or `filters` must be set. - - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `query` | *Optional[str]* | :heavy_minus_sign: | The search query string. Supports inline operators such as `from:jane type:document app:confluence`. Inline operators are AND'd with structured `filters`.
| -| `datasources` | List[*str*] | :heavy_minus_sign: | Restrict results to specific datasource identifiers returned by `GET /api/search/filters`. Scopes by datasource type and may include results from multiple instances of that type. Omit to enumerate across all visible datasources matching `query` or `filters`.
| -| `filters` | List[[models.PlatformFilter](../models/platformfilter.md)] | :heavy_minus_sign: | Structured filters applied to search results. Multiple values within a filter with `EQUALS` are OR'd; separate filters are AND'd. Conflicting constraints on the same field (for example, `type:document` in `query` and `type:spreadsheet` in a filter) return an empty result set. See `Filter.field` for built-in field names and operators. Other nonblank field names are accepted as custom filters without validation; behavior depends on your connected sources.
| -| `time_range` | [Optional[models.PlatformTimeRange]](../models/platformtimerange.md) | :heavy_minus_sign: | Filter results to those last updated within this range. | -| `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of results to return per page. | -| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Opaque pagination token from a previous response's `next_cursor` field. Omit on the first request. Cursors do not expire and are valid only for the original selection.
| -| `include` | List[[models.PlatformSearchEnumerationInclude](../models/platformsearchenumerationinclude.md)] | :heavy_minus_sign: | Optional field groups to add to each document reference. Each value only adds fields; it does not change which documents are returned.
| \ No newline at end of file diff --git a/docs/models/platformsearchenumerationresponse.md b/docs/models/platformsearchenumerationresponse.md deleted file mode 100644 index 3c79d022..00000000 --- a/docs/models/platformsearchenumerationresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# PlatformSearchEnumerationResponse - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `results` | List[[models.PlatformDocumentReference](../models/platformdocumentreference.md)] | :heavy_check_mark: | Document references at this cursor position. | -| `has_more` | *bool* | :heavy_check_mark: | Indicates whether additional pages of results are available. | -| `next_cursor` | *Nullable[str]* | :heavy_check_mark: | Opaque token to pass as `cursor` in the next request. Null exactly when `has_more` is false.
| -| `request_id` | *str* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md index d1aa1757..816c6349 100644 --- a/docs/sdks/search/README.md +++ b/docs/sdks/search/README.md @@ -6,7 +6,6 @@ * [query](#query) - Search * [list_filters](#list_filters) - List search filters -* [enumerate](#enumerate) - Enumerate matching documents ## query @@ -108,65 +107,4 @@ with Glean( | --------------------------------- | --------------------------------- | --------------------------------- | | errors.PlatformProblemDetailError | 400, 401, 403, 404, 408, 429 | application/problem+json | | errors.PlatformProblemDetailError | 500, 503 | application/problem+json | -| errors.GleanError | 4XX, 5XX | \*/\* | - -## enumerate - -Walk every indexed document that matches a selection and that the caller is permitted to see. Returns document references with minimal metadata and never bodies; request `SNIPPETS` via `include` for query-relevant excerpts, and hydrate full documents with `POST /api/documents/batch`. Unlike `POST /api/search`, `query` is optional: omit it to enumerate by `datasources`, `filters`, and `time_range` alone. Results are ordered for completeness, not relevance. -Follow `next_cursor` until `has_more` is `false`, regardless of page size. This is a live scan, not a snapshot: concurrent index changes can cause duplicates or omissions. Deduplicate by `document_id`. -A page is either complete at its cursor position or an error. A shard or datasource failure returns HTTP 503 and the same cursor stays valid for retry; this endpoint never returns a partial page. A cursor reused with a different selection returns HTTP 400 `invalid_cursor`. - - -### Example Usage - - -```python -from glean.api_client import Glean -import os - - -with Glean( - api_token=os.getenv("GLEAN_API_TOKEN"), -) as glean: - - res = glean.search.enumerate(query="amoxicillin", datasources=[ - "gdrive", - ], filters=[ - { - "field": "type", - "values": [ - "spreadsheet", - "presentation", - ], - }, - ], page_size=500) - - # Handle response - print(res) - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `query` | *Optional[str]* | :heavy_minus_sign: | The search query string. Supports inline operators such as `from:jane type:document app:confluence`. Inline operators are AND'd with structured `filters`.
| -| `datasources` | List[*str*] | :heavy_minus_sign: | Restrict results to specific datasource identifiers returned by `GET /api/search/filters`. Scopes by datasource type and may include results from multiple instances of that type. Omit to enumerate across all visible datasources matching `query` or `filters`.
| -| `filters` | List[[models.PlatformFilter](../../models/platformfilter.md)] | :heavy_minus_sign: | Structured filters applied to search results. Multiple values within a filter with `EQUALS` are OR'd; separate filters are AND'd. Conflicting constraints on the same field (for example, `type:document` in `query` and `type:spreadsheet` in a filter) return an empty result set. See `Filter.field` for built-in field names and operators. Other nonblank field names are accepted as custom filters without validation; behavior depends on your connected sources.
| -| `time_range` | [Optional[models.PlatformTimeRange]](../../models/platformtimerange.md) | :heavy_minus_sign: | Filter results to those last updated within this range. | -| `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of results to return per page. | -| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Opaque pagination token from a previous response's `next_cursor` field. Omit on the first request. Cursors do not expire and are valid only for the original selection.
| -| `include` | List[[models.PlatformSearchEnumerationInclude](../../models/platformsearchenumerationinclude.md)] | :heavy_minus_sign: | Optional field groups to add to each document reference. Each value only adds fields; it does not change which documents are returned.
| -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | - -### Response - -**[models.PlatformSearchEnumerationResponse](../../models/platformsearchenumerationresponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.PlatformProblemDetailError | 400, 401, 403, 404, 408, 413, 422, 429 | application/problem+json | -| errors.PlatformProblemDetailError | 500, 503 | application/problem+json | -| errors.GleanError | 4XX, 5XX | \*/\* | \ No newline at end of file +| errors.GleanError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 2671884c..c1aeb95a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "glean-api-client" -version = "0.17.23" +version = "0.17.24" 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 e6983fed..75f528b2 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.17.23" +__version__: str = "0.17.24" __openapi_doc_version__: str = "0.9.0" __gen_version__: str = "2.961.1" -__user_agent__: str = "speakeasy-sdk/python 0.17.23 2.961.1 0.9.0 glean-api-client" +__user_agent__: str = "speakeasy-sdk/python 0.17.24 2.961.1 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 3693ca1b..1f55fb23 100644 --- a/src/glean/api_client/models/__init__.py +++ b/src/glean/api_client/models/__init__.py @@ -1710,10 +1710,6 @@ PlatformDocumentGetResponseTypedDict, ) from .platformdocumentinclude import PlatformDocumentInclude - from .platformdocumentreference import ( - PlatformDocumentReference, - PlatformDocumentReferenceTypedDict, - ) from .platformdocumentsbatchrequest import ( PlatformDocumentsBatchRequest, PlatformDocumentsBatchRequestDocumentSpec, @@ -1842,15 +1838,6 @@ PlatformProblemDetailErrorTypedDict, ) from .platformresult import PlatformResult, PlatformResultTypedDict - from .platformsearchenumerationinclude import PlatformSearchEnumerationInclude - from .platformsearchenumerationrequest import ( - PlatformSearchEnumerationRequest, - PlatformSearchEnumerationRequestTypedDict, - ) - from .platformsearchenumerationresponse import ( - PlatformSearchEnumerationResponse, - PlatformSearchEnumerationResponseTypedDict, - ) from .platformsearchfiltersresponse import ( PlatformSearchFiltersResponse, PlatformSearchFiltersResponseTypedDict, @@ -3699,8 +3686,6 @@ "PlatformDocumentGetResponse", "PlatformDocumentGetResponseTypedDict", "PlatformDocumentInclude", - "PlatformDocumentReference", - "PlatformDocumentReferenceTypedDict", "PlatformDocumentTypedDict", "PlatformDocumentsBatchRequest", "PlatformDocumentsBatchRequestDocumentSpec", @@ -3783,11 +3768,6 @@ "PlatformProblemDetailTypedDict", "PlatformResult", "PlatformResultTypedDict", - "PlatformSearchEnumerationInclude", - "PlatformSearchEnumerationRequest", - "PlatformSearchEnumerationRequestTypedDict", - "PlatformSearchEnumerationResponse", - "PlatformSearchEnumerationResponseTypedDict", "PlatformSearchFiltersRequest", "PlatformSearchFiltersRequestTypedDict", "PlatformSearchFiltersResponse", @@ -5518,8 +5498,6 @@ "PlatformDocumentGetResponse": ".platformdocumentgetresponse", "PlatformDocumentGetResponseTypedDict": ".platformdocumentgetresponse", "PlatformDocumentInclude": ".platformdocumentinclude", - "PlatformDocumentReference": ".platformdocumentreference", - "PlatformDocumentReferenceTypedDict": ".platformdocumentreference", "PlatformDocumentsBatchRequest": ".platformdocumentsbatchrequest", "PlatformDocumentsBatchRequestDocumentSpec": ".platformdocumentsbatchrequest", "PlatformDocumentsBatchRequestDocumentSpecTypedDict": ".platformdocumentsbatchrequest", @@ -5597,11 +5575,6 @@ "PlatformProblemDetailErrorTypedDict": ".platformproblemdetailerror", "PlatformResult": ".platformresult", "PlatformResultTypedDict": ".platformresult", - "PlatformSearchEnumerationInclude": ".platformsearchenumerationinclude", - "PlatformSearchEnumerationRequest": ".platformsearchenumerationrequest", - "PlatformSearchEnumerationRequestTypedDict": ".platformsearchenumerationrequest", - "PlatformSearchEnumerationResponse": ".platformsearchenumerationresponse", - "PlatformSearchEnumerationResponseTypedDict": ".platformsearchenumerationresponse", "PlatformSearchFiltersResponse": ".platformsearchfiltersresponse", "PlatformSearchFiltersResponseTypedDict": ".platformsearchfiltersresponse", "PlatformSearchRequest": ".platformsearchrequest", diff --git a/src/glean/api_client/models/platformdocumentreference.py b/src/glean/api_client/models/platformdocumentreference.py deleted file mode 100644 index b5f21f2b..00000000 --- a/src/glean/api_client/models/platformdocumentreference.py +++ /dev/null @@ -1,125 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .platformpersonreference import ( - PlatformPersonReference, - PlatformPersonReferenceTypedDict, -) -from datetime import datetime -from glean.api_client.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - 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, Optional -from typing_extensions import NotRequired, TypedDict - - -class PlatformDocumentReferenceTypedDict(TypedDict): - document_id: str - r"""Indexed Glean store ID. Stable identity for deduplication and the selector accepted by `POST /api/documents/batch`. - - """ - url: str - r"""Canonical URL of the result.""" - title: str - r"""Display title. For a conversation, this is a title built from the participants, such as \"Alice and Bob\", including when the indexed title is the message body. When the result has no title, the server returns Untitled.""" - datasource: str - r"""The datasource this result originates from.""" - document_type: NotRequired[Nullable[str]] - r"""The document type within the datasource.""" - creator: NotRequired[PlatformPersonReferenceTypedDict] - r"""A lightweight reference to a person, used where a payload merely points at someone.""" - owner: NotRequired[PlatformPersonReferenceTypedDict] - r"""A lightweight reference to a person, used where a payload merely points at someone.""" - updated_at: NotRequired[Nullable[datetime]] - r"""When the result was last modified.""" - created_at: NotRequired[Nullable[datetime]] - r"""When the result was created.""" - snippets: NotRequired[List[str]] - r"""Query-relevant plain-text excerpts from the document body. Present only when the request's `include` contains `SNIPPETS` and `query` is set. - - """ - - -class PlatformDocumentReference(BaseModel): - document_id: str - r"""Indexed Glean store ID. Stable identity for deduplication and the selector accepted by `POST /api/documents/batch`. - - """ - - url: str - r"""Canonical URL of the result.""" - - title: str - r"""Display title. For a conversation, this is a title built from the participants, such as \"Alice and Bob\", including when the indexed title is the message body. When the result has no title, the server returns Untitled.""" - - datasource: str - r"""The datasource this result originates from.""" - - document_type: OptionalNullable[str] = UNSET - r"""The document type within the datasource.""" - - creator: Optional[PlatformPersonReference] = None - r"""A lightweight reference to a person, used where a payload merely points at someone.""" - - owner: Optional[PlatformPersonReference] = None - r"""A lightweight reference to a person, used where a payload merely points at someone.""" - - updated_at: OptionalNullable[datetime] = UNSET - r"""When the result was last modified.""" - - created_at: OptionalNullable[datetime] = UNSET - r"""When the result was created.""" - - snippets: Optional[List[str]] = None - r"""Query-relevant plain-text excerpts from the document body. Present only when the request's `include` contains `SNIPPETS` and `query` is set. - - """ - - @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( - [ - "document_type", - "creator", - "owner", - "updated_at", - "created_at", - "snippets", - ] - ) - nullable_fields = set(["document_type", "updated_at", "created_at"]) - 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)) - is_nullable_and_explicitly_set = ( - k in nullable_fields - and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member - ) - - if val != UNSET_SENTINEL: - if ( - val is not None - or k not in optional_fields - or is_nullable_and_explicitly_set - ): - m[k] = val - - return m diff --git a/src/glean/api_client/models/platformsearchenumerationinclude.py b/src/glean/api_client/models/platformsearchenumerationinclude.py deleted file mode 100644 index ebcdb647..00000000 --- a/src/glean/api_client/models/platformsearchenumerationinclude.py +++ /dev/null @@ -1,11 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from enum import Enum - - -class PlatformSearchEnumerationInclude(str, Enum): - r"""Optional document reference projection.""" - - # Add snippets, query-relevant plain-text excerpts from the document body. Only produced when `query` is present; a scope-only scan has nothing to excerpt. - SNIPPETS = "SNIPPETS" diff --git a/src/glean/api_client/models/platformsearchenumerationrequest.py b/src/glean/api_client/models/platformsearchenumerationrequest.py deleted file mode 100644 index 6053594c..00000000 --- a/src/glean/api_client/models/platformsearchenumerationrequest.py +++ /dev/null @@ -1,125 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .platformfilter import PlatformFilter, PlatformFilterTypedDict -from .platformsearchenumerationinclude import PlatformSearchEnumerationInclude -from .platformtimerange import PlatformTimeRange, PlatformTimeRangeTypedDict -from glean.api_client.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - 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, Optional -from typing_extensions import NotRequired, TypedDict - - -class PlatformSearchEnumerationRequestTypedDict(TypedDict): - r"""Selection to enumerate. At least one of `datasources`, `query`, or `filters` must be set.""" - - query: NotRequired[str] - r"""The search query string. Supports inline operators such as `from:jane type:document app:confluence`. Inline operators are AND'd with structured `filters`. - - """ - datasources: NotRequired[List[str]] - r"""Restrict results to specific datasource identifiers returned by `GET /api/search/filters`. Scopes by datasource type and may include results from multiple instances of that type. Omit to enumerate across all visible datasources matching `query` or `filters`. - - """ - filters: NotRequired[List[PlatformFilterTypedDict]] - r"""Structured filters applied to search results. Multiple values within a filter with `EQUALS` are OR'd; separate filters are AND'd. Conflicting constraints on the same field (for example, `type:document` in `query` and `type:spreadsheet` in a filter) return an empty result set. See `Filter.field` for built-in field names and operators. Other nonblank field names are accepted as custom filters without validation; behavior depends on your connected sources. - - """ - time_range: NotRequired[PlatformTimeRangeTypedDict] - r"""Filter results to those last updated within this range.""" - page_size: NotRequired[int] - r"""Number of results to return per page.""" - cursor: NotRequired[Nullable[str]] - r"""Opaque pagination token from a previous response's `next_cursor` field. Omit on the first request. Cursors do not expire and are valid only for the original selection. - - """ - include: NotRequired[List[PlatformSearchEnumerationInclude]] - r"""Optional field groups to add to each document reference. Each value only adds fields; it does not change which documents are returned. - - """ - - -class PlatformSearchEnumerationRequest(BaseModel): - r"""Selection to enumerate. At least one of `datasources`, `query`, or `filters` must be set.""" - - query: Optional[str] = None - r"""The search query string. Supports inline operators such as `from:jane type:document app:confluence`. Inline operators are AND'd with structured `filters`. - - """ - - datasources: Optional[List[str]] = None - r"""Restrict results to specific datasource identifiers returned by `GET /api/search/filters`. Scopes by datasource type and may include results from multiple instances of that type. Omit to enumerate across all visible datasources matching `query` or `filters`. - - """ - - filters: Optional[List[PlatformFilter]] = None - r"""Structured filters applied to search results. Multiple values within a filter with `EQUALS` are OR'd; separate filters are AND'd. Conflicting constraints on the same field (for example, `type:document` in `query` and `type:spreadsheet` in a filter) return an empty result set. See `Filter.field` for built-in field names and operators. Other nonblank field names are accepted as custom filters without validation; behavior depends on your connected sources. - - """ - - time_range: Optional[PlatformTimeRange] = None - r"""Filter results to those last updated within this range.""" - - page_size: Optional[int] = 100 - r"""Number of results to return per page.""" - - cursor: OptionalNullable[str] = UNSET - r"""Opaque pagination token from a previous response's `next_cursor` field. Omit on the first request. Cursors do not expire and are valid only for the original selection. - - """ - - include: Optional[List[PlatformSearchEnumerationInclude]] = None - r"""Optional field groups to add to each document reference. Each value only adds fields; it does not change which documents are returned. - - """ - - @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( - [ - "query", - "datasources", - "filters", - "time_range", - "page_size", - "cursor", - "include", - ] - ) - nullable_fields = set(["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)) - is_nullable_and_explicitly_set = ( - k in nullable_fields - and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member - ) - - if val != UNSET_SENTINEL: - if ( - val is not None - or k not in optional_fields - or is_nullable_and_explicitly_set - ): - m[k] = val - - return m diff --git a/src/glean/api_client/models/platformsearchenumerationresponse.py b/src/glean/api_client/models/platformsearchenumerationresponse.py deleted file mode 100644 index 3f932142..00000000 --- a/src/glean/api_client/models/platformsearchenumerationresponse.py +++ /dev/null @@ -1,68 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .platformdocumentreference import ( - PlatformDocumentReference, - PlatformDocumentReferenceTypedDict, -) -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 PlatformSearchEnumerationResponseTypedDict(TypedDict): - results: List[PlatformDocumentReferenceTypedDict] - r"""Document references at this cursor position.""" - has_more: bool - r"""Indicates whether additional pages of results are available.""" - next_cursor: Nullable[str] - r"""Opaque token to pass as `cursor` in the next request. Null exactly when `has_more` is false. - - """ - request_id: str - r"""Platform-generated request ID for support correlation.""" - - -class PlatformSearchEnumerationResponse(BaseModel): - results: List[PlatformDocumentReference] - r"""Document references at this cursor position.""" - - has_more: bool - r"""Indicates whether additional pages of results are available.""" - - next_cursor: Nullable[str] - r"""Opaque token to pass as `cursor` in the next request. Null exactly when `has_more` is false. - - """ - - 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/search.py b/src/glean/api_client/search.py index a2fdfcba..7150efbf 100644 --- a/src/glean/api_client/search.py +++ b/src/glean/api_client/search.py @@ -533,315 +533,3 @@ async def list_filters_async( raise errors.GleanError("API error occurred", http_res, http_res_text) raise errors.GleanError("Unexpected response received", http_res) - - def enumerate( - self, - *, - query: Optional[str] = None, - datasources: Optional[Iterable[str]] = None, - filters: Optional[ - Union[ - Iterable[models.PlatformFilter], - Iterable[models.PlatformFilterTypedDict], - ] - ] = None, - time_range: Optional[ - Union[models.PlatformTimeRange, models.PlatformTimeRangeTypedDict] - ] = None, - page_size: Optional[int] = 100, - cursor: OptionalNullable[str] = UNSET, - include: Optional[Iterable[models.PlatformSearchEnumerationInclude]] = None, - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> models.PlatformSearchEnumerationResponse: - r"""Enumerate matching documents - - Walk every indexed document that matches a selection and that the caller is permitted to see. Returns document references with minimal metadata and never bodies; request `SNIPPETS` via `include` for query-relevant excerpts, and hydrate full documents with `POST /api/documents/batch`. Unlike `POST /api/search`, `query` is optional: omit it to enumerate by `datasources`, `filters`, and `time_range` alone. Results are ordered for completeness, not relevance. - Follow `next_cursor` until `has_more` is `false`, regardless of page size. This is a live scan, not a snapshot: concurrent index changes can cause duplicates or omissions. Deduplicate by `document_id`. - A page is either complete at its cursor position or an error. A shard or datasource failure returns HTTP 503 and the same cursor stays valid for retry; this endpoint never returns a partial page. A cursor reused with a different selection returns HTTP 400 `invalid_cursor`. - - - :param query: The search query string. Supports inline operators such as `from:jane type:document app:confluence`. Inline operators are AND'd with structured `filters`. - - :param datasources: Restrict results to specific datasource identifiers returned by `GET /api/search/filters`. Scopes by datasource type and may include results from multiple instances of that type. Omit to enumerate across all visible datasources matching `query` or `filters`. - - :param filters: Structured filters applied to search results. Multiple values within a filter with `EQUALS` are OR'd; separate filters are AND'd. Conflicting constraints on the same field (for example, `type:document` in `query` and `type:spreadsheet` in a filter) return an empty result set. See `Filter.field` for built-in field names and operators. Other nonblank field names are accepted as custom filters without validation; behavior depends on your connected sources. - - :param time_range: Filter results to those last updated within this range. - :param page_size: Number of results to return per page. - :param cursor: Opaque pagination token from a previous response's `next_cursor` field. Omit on the first request. Cursors do not expire and are valid only for the original selection. - - :param include: Optional field groups to add to each document reference. Each value only adds fields; it does not change which documents are returned. - - :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.PlatformSearchEnumerationRequest( - query=query, - datasources=utils.unmarshal(datasources, Optional[List[str]]), - filters=utils.get_pydantic_model( - filters, Optional[List[models.PlatformFilter]] - ), - time_range=utils.get_pydantic_model( - time_range, Optional[models.PlatformTimeRange] - ), - page_size=page_size, - cursor=cursor, - include=utils.unmarshal( - include, Optional[List[models.PlatformSearchEnumerationInclude]] - ), - ) - - req = self._build_request( - method="POST", - path="/api/search/enumeration", - base_url=base_url, - url_variables=url_variables, - request=request, - request_body_required=True, - request_has_path_params=False, - request_has_query_params=True, - user_agent_header="user-agent", - accept_header_value="application/json", - http_headers=http_headers, - security=self.sdk_configuration.security, - get_serialized_body=lambda: utils.serialize_request_body( - request, False, False, "json", models.PlatformSearchEnumerationRequest - ), - 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-search-enumeration", - oauth2_scopes=None, - security_source=get_security_from_env( - self.sdk_configuration.security, models.Security - ), - tags=["Search"], - extensions={ - "x-codegen-request-body-name": "payload", - "x-glean-experimental": { - "id": "9ce7bb73-1e30-460a-a917-cae09ac3a3ea", - "introduced": "2026-11-02", - }, - "x-glean-scopes": { - "legacy": ["SEARCH"], - "platform": ["search:query"], - }, - "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.PlatformSearchEnumerationResponse, http_res - ) - if utils.match_response( - http_res, - ["400", "401", "403", "404", "408", "413", "422", "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 enumerate_async( - self, - *, - query: Optional[str] = None, - datasources: Optional[Iterable[str]] = None, - filters: Optional[ - Union[ - Iterable[models.PlatformFilter], - Iterable[models.PlatformFilterTypedDict], - ] - ] = None, - time_range: Optional[ - Union[models.PlatformTimeRange, models.PlatformTimeRangeTypedDict] - ] = None, - page_size: Optional[int] = 100, - cursor: OptionalNullable[str] = UNSET, - include: Optional[Iterable[models.PlatformSearchEnumerationInclude]] = None, - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> models.PlatformSearchEnumerationResponse: - r"""Enumerate matching documents - - Walk every indexed document that matches a selection and that the caller is permitted to see. Returns document references with minimal metadata and never bodies; request `SNIPPETS` via `include` for query-relevant excerpts, and hydrate full documents with `POST /api/documents/batch`. Unlike `POST /api/search`, `query` is optional: omit it to enumerate by `datasources`, `filters`, and `time_range` alone. Results are ordered for completeness, not relevance. - Follow `next_cursor` until `has_more` is `false`, regardless of page size. This is a live scan, not a snapshot: concurrent index changes can cause duplicates or omissions. Deduplicate by `document_id`. - A page is either complete at its cursor position or an error. A shard or datasource failure returns HTTP 503 and the same cursor stays valid for retry; this endpoint never returns a partial page. A cursor reused with a different selection returns HTTP 400 `invalid_cursor`. - - - :param query: The search query string. Supports inline operators such as `from:jane type:document app:confluence`. Inline operators are AND'd with structured `filters`. - - :param datasources: Restrict results to specific datasource identifiers returned by `GET /api/search/filters`. Scopes by datasource type and may include results from multiple instances of that type. Omit to enumerate across all visible datasources matching `query` or `filters`. - - :param filters: Structured filters applied to search results. Multiple values within a filter with `EQUALS` are OR'd; separate filters are AND'd. Conflicting constraints on the same field (for example, `type:document` in `query` and `type:spreadsheet` in a filter) return an empty result set. See `Filter.field` for built-in field names and operators. Other nonblank field names are accepted as custom filters without validation; behavior depends on your connected sources. - - :param time_range: Filter results to those last updated within this range. - :param page_size: Number of results to return per page. - :param cursor: Opaque pagination token from a previous response's `next_cursor` field. Omit on the first request. Cursors do not expire and are valid only for the original selection. - - :param include: Optional field groups to add to each document reference. Each value only adds fields; it does not change which documents are returned. - - :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.PlatformSearchEnumerationRequest( - query=query, - datasources=utils.unmarshal(datasources, Optional[List[str]]), - filters=utils.get_pydantic_model( - filters, Optional[List[models.PlatformFilter]] - ), - time_range=utils.get_pydantic_model( - time_range, Optional[models.PlatformTimeRange] - ), - page_size=page_size, - cursor=cursor, - include=utils.unmarshal( - include, Optional[List[models.PlatformSearchEnumerationInclude]] - ), - ) - - req = self._build_request_async( - method="POST", - path="/api/search/enumeration", - base_url=base_url, - url_variables=url_variables, - request=request, - request_body_required=True, - request_has_path_params=False, - request_has_query_params=True, - user_agent_header="user-agent", - accept_header_value="application/json", - http_headers=http_headers, - security=self.sdk_configuration.security, - get_serialized_body=lambda: utils.serialize_request_body( - request, False, False, "json", models.PlatformSearchEnumerationRequest - ), - 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-search-enumeration", - oauth2_scopes=None, - security_source=get_security_from_env( - self.sdk_configuration.security, models.Security - ), - tags=["Search"], - extensions={ - "x-codegen-request-body-name": "payload", - "x-glean-experimental": { - "id": "9ce7bb73-1e30-460a-a917-cae09ac3a3ea", - "introduced": "2026-11-02", - }, - "x-glean-scopes": { - "legacy": ["SEARCH"], - "platform": ["search:query"], - }, - "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.PlatformSearchEnumerationResponse, http_res - ) - if utils.match_response( - http_res, - ["400", "401", "403", "404", "408", "413", "422", "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/tests/mockserver/internal/handler/generated_handlers.go b/tests/mockserver/internal/handler/generated_handlers.go index 10cb3da0..75f142bb 100644 --- a/tests/mockserver/internal/handler/generated_handlers.go +++ b/tests/mockserver/internal/handler/generated_handlers.go @@ -94,7 +94,6 @@ func GeneratedHandlers(ctx context.Context, dir *logging.HTTPFileDirectory, rt * NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/rotatetoken", pathPostAPIIndexV1Rotatetoken(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/updatepermissions", pathPostAPIIndexV1Updatepermissions(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/api/search", pathPostAPISearch(dir, rt)), - NewGeneratedHandler(ctx, http.MethodPost, "/api/search/enumeration", pathPostAPISearchEnumeration(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/api/skills", pathPostAPISkills(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/api/skills/import", pathPostAPISkillsImport(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/api/skills/sources/preview", pathPostAPISkillsSourcesPreview(dir, rt)), diff --git a/tests/mockserver/internal/handler/pathpostapisearchenumeration.go b/tests/mockserver/internal/handler/pathpostapisearchenumeration.go deleted file mode 100644 index 8434a2e3..00000000 --- a/tests/mockserver/internal/handler/pathpostapisearchenumeration.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package handler - -import ( - "fmt" - "log" - "mockserver/internal/handler/assert" - "mockserver/internal/logging" - "mockserver/internal/sdk/models/components" - "mockserver/internal/sdk/utils" - "mockserver/internal/tracking" - "net/http" -) - -func pathPostAPISearchEnumeration(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-search-enumeration[0]": - dir.HandlerFunc("platform-search-enumeration", testPlatformSearchEnumerationPlatformSearchEnumeration0)(w, req) - default: - http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) - } - } -} - -func testPlatformSearchEnumerationPlatformSearchEnumeration0(w http.ResponseWriter, req *http.Request) { - if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { - log.Printf("assertion error: %s\n", err) - http.Error(w, err.Error(), http.StatusUnauthorized) - return - } - if err := assert.ContentType(req, "application/json", true); err != nil { - log.Printf("assertion error: %s\n", err) - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { - log.Printf("assertion error: %s\n", err) - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - if err := assert.HeaderExists(req, "User-Agent"); err != nil { - log.Printf("assertion error: %s\n", err) - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - var respBody *components.PlatformSearchEnumerationResponse = &components.PlatformSearchEnumerationResponse{ - Results: []components.PlatformDocumentReference{}, - HasMore: false, - NextCursor: nil, - 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/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/platformdocumentreference.go b/tests/mockserver/internal/sdk/models/components/platformdocumentreference.go deleted file mode 100644 index 8d5ee032..00000000 --- a/tests/mockserver/internal/sdk/models/components/platformdocumentreference.go +++ /dev/null @@ -1,115 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package components - -import ( - "mockserver/internal/sdk/optionalnullable" - "mockserver/internal/sdk/utils" - "time" -) - -type PlatformDocumentReference struct { - // Indexed Glean store ID. Stable identity for deduplication and the selector accepted by `POST /api/documents/batch`. - // - DocumentID string `json:"document_id"` - // Canonical URL of the result. - URL string `json:"url"` - // Display title. For a conversation, this is a title built from the participants, such as "Alice and Bob", including when the indexed title is the message body. When the result has no title, the server returns Untitled. - Title string `json:"title"` - // The datasource this result originates from. - Datasource string `json:"datasource"` - // The document type within the datasource. - DocumentType optionalnullable.OptionalNullable[string] `json:"document_type,omitempty"` - // A lightweight reference to a person, used where a payload merely points at someone. - Creator *PlatformPersonReference `json:"creator,omitempty"` - // A lightweight reference to a person, used where a payload merely points at someone. - Owner *PlatformPersonReference `json:"owner,omitempty"` - // When the result was last modified. - UpdatedAt optionalnullable.OptionalNullable[time.Time] `json:"updated_at,omitempty"` - // When the result was created. - CreatedAt optionalnullable.OptionalNullable[time.Time] `json:"created_at,omitempty"` - // Query-relevant plain-text excerpts from the document body. Present only when the request's `include` contains `SNIPPETS` and `query` is set. - // - Snippets []string `json:"snippets,omitempty"` -} - -func (p PlatformDocumentReference) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(p, "", false) -} - -func (p *PlatformDocumentReference) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &p, "", false, []string{"document_id", "url", "title", "datasource"}); err != nil { - return err - } - return nil -} - -func (o *PlatformDocumentReference) GetDocumentID() string { - if o == nil { - return "" - } - return o.DocumentID -} - -func (o *PlatformDocumentReference) GetURL() string { - if o == nil { - return "" - } - return o.URL -} - -func (o *PlatformDocumentReference) GetTitle() string { - if o == nil { - return "" - } - return o.Title -} - -func (o *PlatformDocumentReference) GetDatasource() string { - if o == nil { - return "" - } - return o.Datasource -} - -func (o *PlatformDocumentReference) GetDocumentType() optionalnullable.OptionalNullable[string] { - if o == nil { - return nil - } - return o.DocumentType -} - -func (o *PlatformDocumentReference) GetCreator() *PlatformPersonReference { - if o == nil { - return nil - } - return o.Creator -} - -func (o *PlatformDocumentReference) GetOwner() *PlatformPersonReference { - if o == nil { - return nil - } - return o.Owner -} - -func (o *PlatformDocumentReference) GetUpdatedAt() optionalnullable.OptionalNullable[time.Time] { - if o == nil { - return nil - } - return o.UpdatedAt -} - -func (o *PlatformDocumentReference) GetCreatedAt() optionalnullable.OptionalNullable[time.Time] { - if o == nil { - return nil - } - return o.CreatedAt -} - -func (o *PlatformDocumentReference) GetSnippets() []string { - if o == nil { - return nil - } - return o.Snippets -} diff --git a/tests/mockserver/internal/sdk/models/components/platformsearchenumerationinclude.go b/tests/mockserver/internal/sdk/models/components/platformsearchenumerationinclude.go deleted file mode 100644 index e944cdb0..00000000 --- a/tests/mockserver/internal/sdk/models/components/platformsearchenumerationinclude.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package components - -import ( - "encoding/json" - "fmt" -) - -// PlatformSearchEnumerationInclude - Optional document reference projection. -type PlatformSearchEnumerationInclude string - -const ( - PlatformSearchEnumerationIncludeSnippets PlatformSearchEnumerationInclude = "SNIPPETS" -) - -func (e PlatformSearchEnumerationInclude) ToPointer() *PlatformSearchEnumerationInclude { - return &e -} -func (e *PlatformSearchEnumerationInclude) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "SNIPPETS": - *e = PlatformSearchEnumerationInclude(v) - return nil - default: - return fmt.Errorf("invalid value for PlatformSearchEnumerationInclude: %v", v) - } -} diff --git a/tests/mockserver/internal/sdk/models/components/platformsearchenumerationrequest.go b/tests/mockserver/internal/sdk/models/components/platformsearchenumerationrequest.go deleted file mode 100644 index a5fd5eaf..00000000 --- a/tests/mockserver/internal/sdk/models/components/platformsearchenumerationrequest.go +++ /dev/null @@ -1,91 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package components - -import ( - "mockserver/internal/sdk/optionalnullable" - "mockserver/internal/sdk/utils" -) - -// PlatformSearchEnumerationRequest - Selection to enumerate. At least one of `datasources`, `query`, or `filters` must be set. -type PlatformSearchEnumerationRequest struct { - // The search query string. Supports inline operators such as `from:jane type:document app:confluence`. Inline operators are AND'd with structured `filters`. - // - Query *string `json:"query,omitempty"` - // Restrict results to specific datasource identifiers returned by `GET /api/search/filters`. Scopes by datasource type and may include results from multiple instances of that type. Omit to enumerate across all visible datasources matching `query` or `filters`. - // - Datasources []string `json:"datasources,omitempty"` - // Structured filters applied to search results. Multiple values within a filter with `EQUALS` are OR'd; separate filters are AND'd. Conflicting constraints on the same field (for example, `type:document` in `query` and `type:spreadsheet` in a filter) return an empty result set. See `Filter.field` for built-in field names and operators. Other nonblank field names are accepted as custom filters without validation; behavior depends on your connected sources. - // - Filters []PlatformFilter `json:"filters,omitempty"` - // Filter results to those last updated within this range. - TimeRange *PlatformTimeRange `json:"time_range,omitempty"` - // Number of results to return per page. - PageSize *int64 `default:"100" json:"page_size"` - // Opaque pagination token from a previous response's `next_cursor` field. Omit on the first request. Cursors do not expire and are valid only for the original selection. - // - Cursor optionalnullable.OptionalNullable[string] `json:"cursor,omitempty"` - // Optional field groups to add to each document reference. Each value only adds fields; it does not change which documents are returned. - // - Include []PlatformSearchEnumerationInclude `json:"include,omitempty"` -} - -func (p PlatformSearchEnumerationRequest) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(p, "", false) -} - -func (p *PlatformSearchEnumerationRequest) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &p, "", false, nil); err != nil { - return err - } - return nil -} - -func (o *PlatformSearchEnumerationRequest) GetQuery() *string { - if o == nil { - return nil - } - return o.Query -} - -func (o *PlatformSearchEnumerationRequest) GetDatasources() []string { - if o == nil { - return nil - } - return o.Datasources -} - -func (o *PlatformSearchEnumerationRequest) GetFilters() []PlatformFilter { - if o == nil { - return nil - } - return o.Filters -} - -func (o *PlatformSearchEnumerationRequest) GetTimeRange() *PlatformTimeRange { - if o == nil { - return nil - } - return o.TimeRange -} - -func (o *PlatformSearchEnumerationRequest) GetPageSize() *int64 { - if o == nil { - return nil - } - return o.PageSize -} - -func (o *PlatformSearchEnumerationRequest) GetCursor() optionalnullable.OptionalNullable[string] { - if o == nil { - return nil - } - return o.Cursor -} - -func (o *PlatformSearchEnumerationRequest) GetInclude() []PlatformSearchEnumerationInclude { - if o == nil { - return nil - } - return o.Include -} diff --git a/tests/mockserver/internal/sdk/models/components/platformsearchenumerationresponse.go b/tests/mockserver/internal/sdk/models/components/platformsearchenumerationresponse.go deleted file mode 100644 index f2ecd205..00000000 --- a/tests/mockserver/internal/sdk/models/components/platformsearchenumerationresponse.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package components - -type PlatformSearchEnumerationResponse struct { - // Document references at this cursor position. - Results []PlatformDocumentReference `json:"results"` - // Indicates whether additional pages of results are available. - HasMore bool `json:"has_more"` - // Opaque token to pass as `cursor` in the next request. Null exactly when `has_more` is false. - // - NextCursor *string `json:"next_cursor"` - // Platform-generated request ID for support correlation. - RequestID string `json:"request_id"` -} - -func (o *PlatformSearchEnumerationResponse) GetResults() []PlatformDocumentReference { - if o == nil { - return []PlatformDocumentReference{} - } - return o.Results -} - -func (o *PlatformSearchEnumerationResponse) GetHasMore() bool { - if o == nil { - return false - } - return o.HasMore -} - -func (o *PlatformSearchEnumerationResponse) GetNextCursor() *string { - if o == nil { - return nil - } - return o.NextCursor -} - -func (o *PlatformSearchEnumerationResponse) GetRequestID() string { - if o == nil { - return "" - } - return o.RequestID -} diff --git a/tests/mockserver/internal/sdk/models/operations/platformsearchenumeration.go b/tests/mockserver/internal/sdk/models/operations/platformsearchenumeration.go deleted file mode 100644 index 4b5ba7fe..00000000 --- a/tests/mockserver/internal/sdk/models/operations/platformsearchenumeration.go +++ /dev/null @@ -1,27 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package operations - -import ( - "mockserver/internal/sdk/models/components" -) - -type PlatformSearchEnumerationResponse struct { - HTTPMeta components.HTTPMetadata `json:"-"` - // Successful response. - PlatformSearchEnumerationResponse *components.PlatformSearchEnumerationResponse -} - -func (o *PlatformSearchEnumerationResponse) GetHTTPMeta() components.HTTPMetadata { - if o == nil { - return components.HTTPMetadata{} - } - return o.HTTPMeta -} - -func (o *PlatformSearchEnumerationResponse) GetPlatformSearchEnumerationResponse() *components.PlatformSearchEnumerationResponse { - if o == nil { - return nil - } - return o.PlatformSearchEnumerationResponse -} diff --git a/tests/test_messages.py b/tests/test_messages.py index 636f01d3..c0fd29da 100644 --- a/tests/test_messages.py +++ b/tests/test_messages.py @@ -18,7 +18,7 @@ def test_messages_messages(): res = glean.client.messages.retrieve( id_type=models.IDType.CONVERSATION_ID, id="", - datasource=models.Datasource.GCHAT, + datasource=models.Datasource.SLACK, timestamp_millis=558834, ) assert res is not None diff --git a/tests/test_search.py b/tests/test_search.py index 401f1888..b1901aa9 100644 --- a/tests/test_search.py +++ b/tests/test_search.py @@ -2260,30 +2260,8 @@ def test_search_platform_search_filters(): assert res is not None +@pytest.mark.skip( + reason="incomplete test found please make sure to address the following errors: [`workflow step platform-search-enumeration.test referencing operation platform-search-enumeration not found in document`]" +) def test_search_platform_search_enumeration(): - test_http_client = create_test_http_client("platform-search-enumeration") - - 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.search.enumerate( - query="amoxicillin", - datasources=[ - "gdrive", - ], - filters=[ - { - "field": "type", - "values": [ - "spreadsheet", - "presentation", - ], - }, - ], - page_size=500, - ) - assert res is not None + pass diff --git a/tests/test_summarize.py b/tests/test_summarize.py index 9efa5c1d..28d18f60 100644 --- a/tests/test_summarize.py +++ b/tests/test_summarize.py @@ -1,6 +1,6 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -from glean.api_client import Glean +from glean.api_client import Glean, models import os from tests.test_client import create_test_http_client @@ -18,10 +18,12 @@ def test_summarize_summarize(): res = glean.client.documents.summarize( document_specs=[ { - "url": "https://intelligent-lyre.net", + "ugc_type": models.DocumentSpecUgcType1.CHATS, + "content_id": 735985, }, { - "url": "https://intelligent-lyre.net", + "ugc_type": models.DocumentSpecUgcType1.CHATS, + "content_id": 735985, }, ] ) From 0bf4f1f1795f29c6dd8a241bd86046a62e0a7acb Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Tue, 17 Nov 2026 20:24:46 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow