From c475f5b6f93a0f1c9bfce26304dcfb641594d4ac Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Fri, 24 Jul 2026 02:23:26 +0000 Subject: [PATCH 1/2] =?UTF-8?q?##=20Typescript=20SDK=20Changes:=20*=20`gle?= =?UTF-8?q?an.search.query()`:=20=20=20*=20=20`request.datasourceInstances?= =?UTF-8?q?`=20**Removed**=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20=20=20*=20?= =?UTF-8?q?=20`response`=20**Changed**=20(Breaking=20=E2=9A=A0=EF=B8=8F)?= =?UTF-8?q?=20=20=20*=20=20`error.status[422]`=20**Added**=20*=20`glean.sk?= =?UTF-8?q?ills.update()`:=20**Added**=20*=20`glean.search.listFilters()`:?= =?UTF-8?q?=20**Added**=20*=20`glean.indexing.datasources.add()`:=20=20`re?= =?UTF-8?q?quest`=20**Changed**=20*=20`glean.indexing.datasources.retrieve?= =?UTF-8?q?Config()`:=20=20`response`=20**Changed**?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .speakeasy/gen.lock | 369 +++++++++++++----- .speakeasy/gen.yaml | 2 +- .speakeasy/glean-merged-spec.yaml | 321 +++++++++++++-- .speakeasy/tests.arazzo.yaml | 36 +- .speakeasy/workflow.lock | 10 +- README.md | 6 + RELEASES.md | 12 +- docs/models/components/datasourcecategory.md | 4 +- docs/models/components/doccategory.md | 2 +- .../platformdatasourcefilterinfo.md | 27 ++ docs/models/components/platformfilter.md | 12 +- .../components/platformfilterfieldinfo.md | 22 ++ .../components/platformfilteroperator.md | 4 +- docs/models/components/platformresult.md | 2 - .../platformsearchfiltersresponse.md | 19 + .../components/platformsearchrequest.md | 17 +- .../components/platformsearchresponse.md | 14 +- .../components/platformskillupdaterequest.md | 17 + .../components/platformskillupdateresponse.md | 32 ++ .../components/platformskillupdatestatus.md | 17 + .../platformskillvalidationresponse.md | 2 +- .../platformskillvalidationwarning.md | 19 - docs/models/components/platformwarning.md | 21 + .../platformsearchfiltersrequest.md | 16 + .../platformsearchfiltersresponse.md | 26 ++ .../operations/platformskillsupdaterequest.md | 21 + docs/sdks/search/README.md | 108 ++++- docs/sdks/skills/README.md | 95 +++++ examples/package-lock.json | 2 +- jsr.json | 2 +- package-lock.json | 4 +- package.json | 2 +- src/__tests__/messages.test.ts | 2 +- .../internal/handler/generated_handlers.go | 2 + .../handler/pathgetapisearchfilters.go | 66 ++++ .../handler/pathpatchapiskillsskillid.go | 85 ++++ .../internal/handler/pathpostapisearch.go | 1 + .../handler/pathpostapiskillsvalidation.go | 2 +- .../handler/pathpostrestapiv1getchat.go | 4 +- .../components/customdatasourceconfig.go | 6 + .../sdk/models/components/objectdefinition.go | 6 + .../platformdatasourcefilterinfo.go | 27 ++ .../sdk/models/components/platformfilter.go | 9 +- .../components/platformfilterfieldinfo.go | 46 +++ .../sdk/models/components/platformresult.go | 9 - .../platformsearchfiltersresponse.go | 26 ++ .../components/platformsearchrequest.go | 14 +- .../components/platformsearchresponse.go | 13 +- .../components/platformskillupdaterequest.go | 16 + .../components/platformskillupdateresponse.go | 24 ++ .../components/platformskillupdatestatus.go | 36 ++ .../platformskillvalidationresponse.go | 6 +- .../platformskillvalidationwarning.go | 25 -- .../sdk/models/components/platformwarning.go | 27 ++ .../sdk/models/operations/platformsearch.go | 2 +- .../operations/platformsearchfilters.go | 59 +++ .../models/operations/platformskillsupdate.go | 48 +++ src/__tests__/search.test.ts | 13 + src/__tests__/skills.test.ts | 15 + src/__tests__/summarize.test.ts | 7 +- src/funcs/searchListFilters.ts | 197 ++++++++++ src/funcs/searchQuery.ts | 5 +- src/funcs/skillsUpdate.ts | 197 ++++++++++ src/lib/config.ts | 4 +- .../components/customdatasourceconfig.ts | 2 + src/models/components/index.ts | 8 +- src/models/components/objectdefinition.ts | 2 + .../platformdatasourcefilterinfo.ts | 48 +++ src/models/components/platformfilter.ts | 10 +- .../components/platformfilterfieldinfo.ts | 60 +++ .../components/platformfilteroperator.ts | 19 +- src/models/components/platformresult.ts | 5 - .../platformsearchfiltersresponse.ts | 46 +++ .../components/platformsearchrequest.ts | 12 +- .../components/platformsearchresponse.ts | 15 +- .../components/platformskillupdaterequest.ts | 39 ++ .../components/platformskillupdateresponse.ts | 38 ++ .../components/platformskillupdatestatus.ts | 26 ++ .../platformskillvalidationresponse.ts | 10 +- ...alidationwarning.ts => platformwarning.ts} | 23 +- src/models/operations/index.ts | 2 + .../operations/platformsearchfilters.ts | 81 ++++ src/models/operations/platformskillsupdate.ts | 47 +++ src/react-query/index.ts | 2 + src/react-query/searchListFilters.core.ts | 81 ++++ src/react-query/searchListFilters.ts | 156 ++++++++ src/react-query/searchQuery.ts | 3 +- src/react-query/skillsUpdate.ts | 114 ++++++ src/sdk/search.ts | 25 +- src/sdk/skills.ts | 20 + 90 files changed, 2843 insertions(+), 313 deletions(-) create mode 100644 docs/models/components/platformdatasourcefilterinfo.md create mode 100644 docs/models/components/platformfilterfieldinfo.md create mode 100644 docs/models/components/platformsearchfiltersresponse.md create mode 100644 docs/models/components/platformskillupdaterequest.md create mode 100644 docs/models/components/platformskillupdateresponse.md create mode 100644 docs/models/components/platformskillupdatestatus.md delete mode 100644 docs/models/components/platformskillvalidationwarning.md create mode 100644 docs/models/components/platformwarning.md create mode 100644 docs/models/operations/platformsearchfiltersrequest.md create mode 100644 docs/models/operations/platformsearchfiltersresponse.md create mode 100644 docs/models/operations/platformskillsupdaterequest.md create mode 100644 src/__tests__/mockserver/internal/handler/pathgetapisearchfilters.go create mode 100644 src/__tests__/mockserver/internal/handler/pathpatchapiskillsskillid.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformdatasourcefilterinfo.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformfilterfieldinfo.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformsearchfiltersresponse.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformskillupdaterequest.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformskillupdateresponse.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformskillupdatestatus.go delete mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformskillvalidationwarning.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformwarning.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/operations/platformsearchfilters.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/operations/platformskillsupdate.go create mode 100644 src/funcs/searchListFilters.ts create mode 100644 src/funcs/skillsUpdate.ts create mode 100644 src/models/components/platformdatasourcefilterinfo.ts create mode 100644 src/models/components/platformfilterfieldinfo.ts create mode 100644 src/models/components/platformsearchfiltersresponse.ts create mode 100644 src/models/components/platformskillupdaterequest.ts create mode 100644 src/models/components/platformskillupdateresponse.ts create mode 100644 src/models/components/platformskillupdatestatus.ts rename src/models/components/{platformskillvalidationwarning.ts => platformwarning.ts} (50%) create mode 100644 src/models/operations/platformsearchfilters.ts create mode 100644 src/models/operations/platformskillsupdate.ts create mode 100644 src/react-query/searchListFilters.core.ts create mode 100644 src/react-query/searchListFilters.ts create mode 100644 src/react-query/skillsUpdate.ts diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 4ce68c70b..f2ece66ee 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 664aaca5-a41f-4434-8f2a-642dba92fe68 management: - docChecksum: 586f40e432b9bb469fad89ebabfbc480 + docChecksum: b1de8635637b0e83c112aebcd85be7da docVersion: 0.9.0 speakeasyVersion: 1.790.3 generationVersion: 2.918.4 - releaseVersion: 0.18.0 - configChecksum: c46e4d263981bd07c6768121df37be5c + releaseVersion: 0.18.1 + configChecksum: b41e1af1adbc70d0bc4b01c65b187d4e repoURL: https://github.com/gleanwork/api-client-typescript.git installationURL: https://github.com/gleanwork/api-client-typescript published: true persistentEdits: - generation_id: 9e95817a-40c5-4743-a499-0250106c03da - pristine_commit_hash: a9f04c569c07ecd3b65bc08d93030574d4d5c168 - pristine_tree_hash: ad92bc963dbd9d2df9c7dad95a55dd9edd00cc92 + generation_id: c80b6a1b-d716-4be1-ab67-61a2d0d45ccb + pristine_commit_hash: 8d4cf102f8852a05c7d74891a7d25e32bb739581 + pristine_tree_hash: 1dd47f44ca7fa52726930d4912d70c9521676d42 features: typescript: acceptHeaders: 2.81.2 @@ -744,8 +744,8 @@ trackedFiles: pristine_git_object: 09021e17a77ee3bdf5e884848568f265d33fdaec docs/models/components/datasourcecategory.md: id: bf1ff23e01ec - last_write_checksum: sha1:f55a55306ed1260a4d15e51b4f2f5c29ae7173be - pristine_git_object: 1b6c77217ee73310a6cf3abfab4a9900e0bafabd + last_write_checksum: sha1:5c7137db411c8dcb96c717482d0868552e5e1556 + pristine_git_object: 189f462fd440d4913caded863d559089b1bf9b1f docs/models/components/datasourceconfigurationresponse.md: id: 607cfe536656 last_write_checksum: sha1:98d2644b0b0624e133fc941d52850853cbcdaf39 @@ -976,8 +976,8 @@ trackedFiles: pristine_git_object: d09fe3ea5c05d25694533bef8fceccec4e0d58ad docs/models/components/doccategory.md: id: e73cc6ee1e8d - last_write_checksum: sha1:231b8e260a0681ac6ece94d8e1e5adb94fe06179 - pristine_git_object: b97d4db6dc2311bb621a200d6a717da94fece3eb + last_write_checksum: sha1:ab871d8f8c5d76fa43372d5c8da5a2ecc94cf382 + pristine_git_object: f221829e843dd577add2709562d4ad427041a841 docs/models/components/document.md: id: 73a00acee39f last_write_checksum: sha1:e9ad00fe51f515673c1e039be460101bf285afe7 @@ -1898,14 +1898,22 @@ trackedFiles: id: f5a30f465d14 last_write_checksum: sha1:d225b587d2a1d67643445aef678a99ded30fb27a pristine_git_object: 774fd352e44f69b1519c32403603321ea4ff768f + docs/models/components/platformdatasourcefilterinfo.md: + id: a136737cacdd + last_write_checksum: sha1:ca7fd1352eb694766778a6147488922ef34789a7 + pristine_git_object: f130748a198a9dd4d0234d5f5be6de4f1d92f399 docs/models/components/platformfilter.md: id: 97ac5bc59c2c - last_write_checksum: sha1:b51c7262b4799e2be0a899f52b711f7c4bd51bd6 - pristine_git_object: 6492968d389ba43afc72366fc810bf43752a2385 + last_write_checksum: sha1:e80ec75f5fbf157e2287cf4ff04fd667dea2c9e3 + pristine_git_object: 16117c10890c3bce4bf28bcf796cf39727fb42d4 + docs/models/components/platformfilterfieldinfo.md: + id: "489767891383" + last_write_checksum: sha1:e44fd686e7075b888481ba8a19ffc9731ea92792 + pristine_git_object: d4b873ee5147ba5f5f1c0304bbd1aef9a33016fe docs/models/components/platformfilteroperator.md: id: a1742bb6ba12 - last_write_checksum: sha1:39bff477c13794d8a40d7eff4b84eb5ef4047f7d - pristine_git_object: ce944be95aaff609737125a0f6f2fa85015601b0 + last_write_checksum: sha1:a15ca02f347e24fd65f76fb7b30bc3b64bb869c0 + pristine_git_object: 38c3adcaa84abab870580427507e1723608aa584 docs/models/components/platformmessage.md: id: bc7ba681e94f last_write_checksum: sha1:3fe0a3148363e29e26fad4a954c76c616c767b3e @@ -1932,16 +1940,20 @@ trackedFiles: pristine_git_object: 7bd60c922d1b5787e315e6919b9589ebbe5a84d1 docs/models/components/platformresult.md: id: ad76c5d23cfa - last_write_checksum: sha1:910ce422ba84ef3396de314db8176d947ac04a5d - pristine_git_object: b6adfbdb2afa41cfce10f3cb52ad09b9904e29bc + last_write_checksum: sha1:3f9897ed96c61587e17f0e393e901a06df715728 + pristine_git_object: 1d44baa1e426bbe8f725a7434f7f7bdcd1df35cb + docs/models/components/platformsearchfiltersresponse.md: + id: b5bbeb0cb663 + last_write_checksum: sha1:ac51e7f404a2235c4254eb5b29e2cfff0d1fd132 + pristine_git_object: cc6c059e7c04f64bfe696ecfdd5dfb1f17ab7b7b docs/models/components/platformsearchrequest.md: id: 8636ff30ae76 - last_write_checksum: sha1:eb9dd308b695969dd95811100da4123a2fced2d2 - pristine_git_object: 64e6b9aaff753db7e8f19cfe677cb516962ab046 + last_write_checksum: sha1:5f8e079b9766c7d42b923f7c268c1eaa9250a78a + pristine_git_object: 0f34f62e55253f65b82e67618d555a61d1a7e27d docs/models/components/platformsearchresponse.md: id: d398b8139176 - last_write_checksum: sha1:e87b453fc43313b7275d35a14db9f3a0292f45a4 - pristine_git_object: 404fa57a35d0fa2d12fc8c923ddac48e5ede9667 + last_write_checksum: sha1:4de3236979e371dbd60fb0bd495f86dad84d76ed + pristine_git_object: 2f502d60a2a6ff55a2ff38175eda3c52f9bd149e docs/models/components/platformskill.md: id: 0085679a1f14 last_write_checksum: sha1:fc27bcaf60d14961e709f8c017c67a792ed2aba8 @@ -1982,6 +1994,18 @@ trackedFiles: id: b4dfbecbfcf6 last_write_checksum: sha1:83277f661926e6cf54883ebf380591dd144fc4f0 pristine_git_object: 52ad9e9017bf515f7efb7ecd0a9485571c4feaf1 + docs/models/components/platformskillupdaterequest.md: + id: 7c7b69c95f16 + last_write_checksum: sha1:f684cbd3df9fd254b409c1a6a353ab9afc7f457a + pristine_git_object: 9d89f5e3a2b02220cbeba91cf9101a7245234220 + docs/models/components/platformskillupdateresponse.md: + id: 2c9b32e3f96a + last_write_checksum: sha1:73d0ffe7c0bd128030a50e03cfb4793ca32dbc72 + pristine_git_object: 7d5b9206989f45749abe03cad539d4e364d5a44e + docs/models/components/platformskillupdatestatus.md: + id: dae697abc652 + last_write_checksum: sha1:ab4d388d84551d3c5c7082e6eda48ac04500d51c + pristine_git_object: d40abfe8e9033762427d561a92b0467d52472e03 docs/models/components/platformskillvalidationfile.md: id: 745acf6f2b41 last_write_checksum: sha1:c83e4c165251568b765d3e2441ca669dd61f1c8e @@ -2000,12 +2024,8 @@ trackedFiles: pristine_git_object: 0d74a6e05fd0b1f1772a5f2e710f38c92200a701 docs/models/components/platformskillvalidationresponse.md: id: 54c67702e75e - last_write_checksum: sha1:89592456343aa59d384f1d2fc265407282fd3a12 - pristine_git_object: 953912739b8be4b4b1c0a45ebb2911112a7b3c4c - docs/models/components/platformskillvalidationwarning.md: - id: a108dbb4d802 - last_write_checksum: sha1:7f8e2c9db3013e1dfb208c65ef614a82ec4e79bf - pristine_git_object: 4bf12c9c65b00fa6d5b273cc0c24e2bac6c92d39 + last_write_checksum: sha1:6223df897fd95dbe986aca55b8e387917d7615d3 + pristine_git_object: 0d68c62f83cfe6dd5c24d990d3b91eff82c4703f docs/models/components/platformskillversion.md: id: e8ce8fdac3ed last_write_checksum: sha1:f118faff7469b900398ba743766f87e5900d089d @@ -2034,6 +2054,10 @@ trackedFiles: id: d2e589bb488c last_write_checksum: sha1:b16b0fb45a16cafd4942fc70075e8ba92d0b9386 pristine_git_object: 28f98d038baa3731367724285537485f3c8f5c20 + docs/models/components/platformwarning.md: + id: 615bac51a737 + last_write_checksum: sha1:cb3d9a4127f9aba55ce674a8306f254e902cd6d3 + pristine_git_object: 952b64fc78a9042e904027eebb2ca75bda312b5a docs/models/components/possiblevalue.md: id: 77671a7accb8 last_write_checksum: sha1:59a61ea5b060cb0a6f7debd975eb7167cfc16631 @@ -3038,6 +3062,14 @@ trackedFiles: id: 58d615b7c78f last_write_checksum: sha1:f72548f52835bd70987fa96727569f7fd5d32f9f pristine_git_object: 86d0551865da2973d4bc49c26a9ae3fab6829f85 + docs/models/operations/platformsearchfiltersrequest.md: + id: fb15f593735d + last_write_checksum: sha1:f2d1bd989b9012c481f0131bb912764e6ac1b702 + pristine_git_object: 55f49edc97dc7c999d9f0d16e902609c63f45835 + docs/models/operations/platformsearchfiltersresponse.md: + id: 060d76293b9d + last_write_checksum: sha1:6a9f13ca84e024f7ea06e60ba8789167cf13acb6 + pristine_git_object: b632d8d1155d3cacb51aa92301d71ac4798dcfe0 docs/models/operations/platformskillscreateversionrequest.md: id: "2144541424e6" last_write_checksum: sha1:ae8c31be517af1b8d10a6a016812899bf059bec6 @@ -3074,6 +3106,10 @@ trackedFiles: id: 6445143da2e1 last_write_checksum: sha1:ee8144358fe287c81a6675c284216168fa9e0586 pristine_git_object: f5215f8a3f1ae9373c2d255ad331c6b4fd739fd1 + docs/models/operations/platformskillsupdaterequest.md: + id: 0ecd8af8f701 + last_write_checksum: sha1:8b58b56477bd6f5fb4eab11b2ba3eb48d92c6978 + pristine_git_object: 7740772104f89ae3b723fadb59fad3ece476c0e0 docs/models/operations/postapiindexv1debugdatasourcedocumenteventsrequest.md: id: 13205d748dcd last_write_checksum: sha1:a4343ef66a0c237e1eada5f9fe0ca897db13a0a2 @@ -3272,12 +3308,12 @@ trackedFiles: pristine_git_object: 6025b94e7355f974a45c9c00c892db4ad5f11bd0 docs/sdks/search/README.md: id: 5c534716244c - last_write_checksum: sha1:8a3c41c736e3ce7dfd9b0f5d733beed5f7446648 - pristine_git_object: 233dcbff8035e0284a82067af91f627201db89df + last_write_checksum: sha1:0ba414ed6689e9a91d151519f34bd6421da2c635 + pristine_git_object: 2c29a709d3d1b54d4abef32fe9f29f6364bfee38 docs/sdks/skills/README.md: id: 3a14a5c90791 - last_write_checksum: sha1:cea7719a8a49d7ae6e4728ce3c6d65fff53956dc - pristine_git_object: 53e8324409c5f7949cd59a3a4cf6045f74a25449 + last_write_checksum: sha1:fe9fe014066dfa18ea7cb0a3a9833103fbc119f1 + pristine_git_object: e4af1510aadcab22ee55210309be7d1bc747d01a docs/sdks/tools/README.md: id: 044286549bac last_write_checksum: sha1:15085522c8371637004ea441fe579e3ab1f0b47b @@ -3316,12 +3352,12 @@ trackedFiles: pristine_git_object: 5a2797590d4be351d62915017d5b2a0f853537c8 jsr.json: id: 7f6ab7767282 - last_write_checksum: sha1:72760fce1a4a085f0fbd440fdb19b7426f08458b - pristine_git_object: 8b5402c972521a31c3633c162fce20667eb7be6b + last_write_checksum: sha1:4d1be527ed9db32b91078dd54c04f39fe72ed642 + pristine_git_object: 6252229ac6decc07bb05e2d5b1da9186bd8f789c package.json: id: 7030d0b2f71b - last_write_checksum: sha1:ee6482e9f26c8796220e8a867e0f3ce54c38ab62 - pristine_git_object: 6f0ccb839633e10f694dc84929d8d22e274f1803 + last_write_checksum: sha1:4f731e1df17b33991b0c2f542f9f95fd28c35a50 + pristine_git_object: 1aa7344f7cf0340c13677ac09efde9c5b6181fc2 src/__tests__/activities.test.ts: id: 65fa859b8f59 last_write_checksum: sha1:756bc40095f4495bbf62739b8218bb4a559a24f2 @@ -3436,8 +3472,8 @@ trackedFiles: pristine_git_object: d252821b825c62856886e3ab9287181d7ef7f9de src/__tests__/messages.test.ts: id: 39e293f09219 - last_write_checksum: sha1:17d923a23384341a26ce4774612e47a9bcfc8dc6 - pristine_git_object: 41c0b3c93454418989eac9a34b10c888541e3e2e + last_write_checksum: sha1:35170c1c2c6d5e4a4dca5a35ae5d74d602f5294c + pristine_git_object: 01382f0c48dc70391beb3802de74c92eb8480822 src/__tests__/mockserver/.gitignore: id: 4a7fc421b6b6 last_write_checksum: sha1:228e1b05712a973948fd771323a2140a3b355ff4 @@ -3492,8 +3528,8 @@ trackedFiles: pristine_git_object: af3a6d136d837850b34ed893a8faf800ea114721 src/__tests__/mockserver/internal/handler/generated_handlers.go: id: e6f590a8ce11 - last_write_checksum: sha1:5fac7733e60f50b01303449747a684d19e3e4ae0 - pristine_git_object: 6d7e94030527bc769fb794dd5e05a6287e766d49 + last_write_checksum: sha1:86be2ce6d760f5252c37bacaf2b2c77169e59bfa + pristine_git_object: 0c3bacf903a7716789dd263f6781c0602e0623ba src/__tests__/mockserver/internal/handler/pathdeleterestapiindexcustommetadataschemagroupname.go: id: ef047f0e0f32 last_write_checksum: sha1:187ff16d05efa1c937632f61dd3f49e49691d5ff @@ -3510,6 +3546,10 @@ trackedFiles: id: e095cf890e73 last_write_checksum: sha1:dec4b7dbf683ac9ab16c749e9e2bf7d1f29b0046 pristine_git_object: 4acc6c497e6435bb7c095577f9a0db82043ac61f + src/__tests__/mockserver/internal/handler/pathgetapisearchfilters.go: + id: 6661dbd9dd78 + last_write_checksum: sha1:2649d4d586804716eb0cf86ecb7cc048acea7555 + pristine_git_object: bdc179fdf45dc74eb15c87dfafed7cad5516be0f src/__tests__/mockserver/internal/handler/pathgetapiskills.go: id: 7a35981bf5e0 last_write_checksum: sha1:1d7ab0e5d4f9b9b75b257b9e4e2a59b96f9cfe50 @@ -3586,6 +3626,10 @@ trackedFiles: id: ff6366c93e84 last_write_checksum: sha1:76b315d72f8ed70773ffda031d3668948bbda043 pristine_git_object: c852da8dde5194ba353bbf4014f59d7aa88454c3 + src/__tests__/mockserver/internal/handler/pathpatchapiskillsskillid.go: + id: 280e3c3128d3 + last_write_checksum: sha1:8a67ea67346ae87b7dca6f9364f8bea8168edcef + pristine_git_object: b34f7bb79e934d0bfea1e3fab523553b2edd055a src/__tests__/mockserver/internal/handler/pathpatchrestapiv1configuredatasourcesdatasourceidinstancesinstanceid.go: id: 4a84c44a0136 last_write_checksum: sha1:39b22d980421128b90c41c84170e2517e737ddd2 @@ -3700,8 +3744,8 @@ trackedFiles: pristine_git_object: c2e8c29077f6c5f3aca9fea9aaab59318ca4a6f9 src/__tests__/mockserver/internal/handler/pathpostapisearch.go: id: 53fb32000093 - last_write_checksum: sha1:81fd212ba125c73b475a1f479e7555e441369ab5 - pristine_git_object: 9baa62914befd9597996b2c8ad6fe1f93f93440f + last_write_checksum: sha1:b54b6d91bb75e3e8d0b4eee44dbbef94c75b5271 + pristine_git_object: eec216ead5ddcff56fd1a98021189e09ade1c128 src/__tests__/mockserver/internal/handler/pathpostapiskills.go: id: 3ea49d94d44f last_write_checksum: sha1:88142842749a56eb5a034652b9146db1bfb2b729 @@ -3712,8 +3756,8 @@ trackedFiles: pristine_git_object: 644e8bc8c9576ec59c8a7b5578eed57773a6e590 src/__tests__/mockserver/internal/handler/pathpostapiskillsvalidation.go: id: 352938cf16f1 - last_write_checksum: sha1:23bd3bdc3394c0a47ce68226f28c89459ec477c9 - pristine_git_object: 20d53bc57edcdc2eac6dd88c8d6b546d35806330 + last_write_checksum: sha1:32820997decd4c3178b0821c69eb534767e8471d + pristine_git_object: a610cb5bf45d86cce7e7ff810a2b03503df3d64b src/__tests__/mockserver/internal/handler/pathpostrestapiindexsubmissionsdatasourceinstancetype.go: id: 410f5ff99a6d last_write_checksum: sha1:71db746b9c36c16fcc088c2fe953b5f73ca232e8 @@ -3840,8 +3884,8 @@ trackedFiles: pristine_git_object: 2e612d4143e02dd5e90750945b781302230969b3 src/__tests__/mockserver/internal/handler/pathpostrestapiv1getchat.go: id: 4a9c64bf3a68 - last_write_checksum: sha1:2766e6a943d9c18dc4d8a7f9e3bc7122a76bde0c - pristine_git_object: e2243868c4ccfbb9c80e49f9ca99c92735f4978f + last_write_checksum: sha1:bd92836a7e38740708f76f52b19704fda11d9ab7 + pristine_git_object: a7e16d16bf67e08174b9a7ec990934165ce72f6a src/__tests__/mockserver/internal/handler/pathpostrestapiv1getchatapplication.go: id: 069e6f3638f9 last_write_checksum: sha1:fe7b6e94356f030628f826fdaa494f1f87bcba8a @@ -4448,8 +4492,8 @@ trackedFiles: pristine_git_object: 54a9e9e90083c840fc6f32abdef5a9df9f2a3912 src/__tests__/mockserver/internal/sdk/models/components/customdatasourceconfig.go: id: 9bbc8cc2edb5 - last_write_checksum: sha1:523cd17f04847991d87247aaac57fbd725b5a641 - pristine_git_object: d878d105b8f6f975b4c635cc3cb2e2ecda9929b9 + last_write_checksum: sha1:4d3a3f1c3135cd653134db2706751456462a672c + pristine_git_object: 9b400d062510b4d8a31e81b840c3bff18246c4e8 src/__tests__/mockserver/internal/sdk/models/components/customdatavalue.go: id: c9c2c40268f8 last_write_checksum: sha1:399634e378da8fcad024c25a0d39c6b24fb7a89d @@ -5288,8 +5332,8 @@ trackedFiles: pristine_git_object: dba55181e379facb020cd4cf9f2ba2c5ed07f697 src/__tests__/mockserver/internal/sdk/models/components/objectdefinition.go: id: c9a43dd96d83 - last_write_checksum: sha1:45fbeb4093bb5c395e57f07ec28202fd670e206f - pristine_git_object: 92608363c518301902df0b003180b3b733aeae79 + last_write_checksum: sha1:3b4c59914fa9a74b4d47d839e00f19833a8a8edb + pristine_git_object: 51589504906472cbc8d907e6b416d67ff8d5ca40 src/__tests__/mockserver/internal/sdk/models/components/objectpermissions.go: id: a205c928a1b2 last_write_checksum: sha1:a14559cd975bb1e15f24bbaf2afd0f0b68144932 @@ -5414,10 +5458,18 @@ trackedFiles: id: 35fc64c34a6d last_write_checksum: sha1:ccf4b0720954621f96c5f58cd961c0c9d2cf6e7b pristine_git_object: 858173bc8b32525c9b0096849cd5750c82a1a84c + src/__tests__/mockserver/internal/sdk/models/components/platformdatasourcefilterinfo.go: + id: c443191c9b7d + last_write_checksum: sha1:53ad3d12274dddd6baf162024c244ceb7a5cd350 + pristine_git_object: 73410740eccc6e408393ca03dc6d757fac686239 src/__tests__/mockserver/internal/sdk/models/components/platformfilter.go: id: 81cb594b3436 - last_write_checksum: sha1:4bf42923f90533fdb894212edc6c05e0b4d6795e - pristine_git_object: 7e8a8259e5c404a9cf209368e998ea09c14cbcfa + last_write_checksum: sha1:6323c368b8503432e07b7d6ca7fde8d535332a88 + pristine_git_object: 4d35a0f79b5c7d7f55d9889cffabc0f9ee20d365 + src/__tests__/mockserver/internal/sdk/models/components/platformfilterfieldinfo.go: + id: 25a345f68b1d + last_write_checksum: sha1:e6d002c006656991b7d4ab03fd8e65b89be61c1b + pristine_git_object: 666d21225c4aee4072dec35cacc604655398695d src/__tests__/mockserver/internal/sdk/models/components/platformfilteroperator.go: id: 69a989d8c41e last_write_checksum: sha1:4623e784ed2b878a64e50037b22d6f283b377d4d @@ -5448,16 +5500,20 @@ trackedFiles: pristine_git_object: be26512c1ffadae6461198779d64746313efb886 src/__tests__/mockserver/internal/sdk/models/components/platformresult.go: id: ac8208a62711 - last_write_checksum: sha1:0f1ab5cb7fa8fe0de1d74937c7846742427928c9 - pristine_git_object: 891cc5f53aac57c9bdf81fd152575996bc83a400 + last_write_checksum: sha1:e2c59d694673f79ae4ee5842e9b33308ffbcb62c + pristine_git_object: 5c1a2ba33be3cd80ff9813b229cd574ead187be5 + src/__tests__/mockserver/internal/sdk/models/components/platformsearchfiltersresponse.go: + id: f7cfacf23cce + last_write_checksum: sha1:6a7d047710220c84d2ef81ae8c1997a8209b5aa1 + pristine_git_object: 6df27c8541e2fc2b6d32285c2d19408de1254231 src/__tests__/mockserver/internal/sdk/models/components/platformsearchrequest.go: id: f07f66ad8a85 - last_write_checksum: sha1:ae81ab85c958a556d1db8ab4b294ce9174708f79 - pristine_git_object: 4b25d70d179f13ee7a928beee60b116edd155ea8 + last_write_checksum: sha1:52f5c956ff1761f1b6af89984a9bad2323752e7d + pristine_git_object: 4dfa9fb247af09bb430bf8e764d61ebe8b111fd3 src/__tests__/mockserver/internal/sdk/models/components/platformsearchresponse.go: id: 609dccefec94 - last_write_checksum: sha1:8a87c40e6ec0ea1471bb5702ee6d9c9b7c60d7c8 - pristine_git_object: 95bffd73a040f0b46fd8961c78a364f65be25416 + last_write_checksum: sha1:02f92864fa70a35fdde824be79bbdbd226f072ba + pristine_git_object: c488256d2d60fdd32326b9a1c603fa48baabd354 src/__tests__/mockserver/internal/sdk/models/components/platformskill.go: id: 9348b7a0ba5c last_write_checksum: sha1:6a7d58754e05d3de8095415bd6d34b98800a849f @@ -5494,6 +5550,18 @@ trackedFiles: id: bc07f04da2f3 last_write_checksum: sha1:e2dbfb1023f704f09d4d25e60abdac8c710e2c56 pristine_git_object: 1d30df91449dcb75231c193ad5857d2c0b801f8a + src/__tests__/mockserver/internal/sdk/models/components/platformskillupdaterequest.go: + id: 73d62c51ad85 + last_write_checksum: sha1:5204f02a7db82e71592e205183672cb770cab85e + pristine_git_object: 726954ccd0c092704bf669076d60465a22643f89 + src/__tests__/mockserver/internal/sdk/models/components/platformskillupdateresponse.go: + id: a660e493e930 + last_write_checksum: sha1:e6d3716f9fc79da64c6d3ba39a67d11561657817 + pristine_git_object: 2ec3541936df61fdbe1398a76e4e2cd2b69455d3 + src/__tests__/mockserver/internal/sdk/models/components/platformskillupdatestatus.go: + id: 9400da1298da + last_write_checksum: sha1:ef4fef2ef5d74193984d73393b396eae01f0c64d + pristine_git_object: e1592a974d4d62a0db42a3723a0ee44f08f1bbf6 src/__tests__/mockserver/internal/sdk/models/components/platformskillvalidationfile.go: id: 32335c0f8fd4 last_write_checksum: sha1:577edc4d1458c07954e42c2f7c7446a11132b7d7 @@ -5508,12 +5576,8 @@ trackedFiles: pristine_git_object: 6c8817346b9be5c7403f00c010cee04cbea89660 src/__tests__/mockserver/internal/sdk/models/components/platformskillvalidationresponse.go: id: 7d765ea13b6e - last_write_checksum: sha1:0fe37f1925ab3f29baf0ea936e7152c3e91cb76c - pristine_git_object: 86d8b6841cf3a4f8b439852bf25bff6ac988f656 - src/__tests__/mockserver/internal/sdk/models/components/platformskillvalidationwarning.go: - id: 03b68047dab7 - last_write_checksum: sha1:f7a8da11de8e21d7f2ccec1d3cbd82b2e77a86d2 - pristine_git_object: 76745cb0d6476e8f3dfc27c974bf0a924510ea25 + last_write_checksum: sha1:df431d6459bec7e0cdec7377f8a94273f26e355b + pristine_git_object: 0729b9f548db62f1f89dfa927f43c2e54d3c3547 src/__tests__/mockserver/internal/sdk/models/components/platformskillversion.go: id: 54223c53b14e last_write_checksum: sha1:37d8c920413d84e81dd0b29cb9dee3b89f353263 @@ -5538,6 +5602,10 @@ trackedFiles: id: b8e92c9af7ab last_write_checksum: sha1:4e21c170201779eccc4d8c31ddbd56673895e674 pristine_git_object: 324a22fd24bcaec171674bdcb42eee769463f21e + src/__tests__/mockserver/internal/sdk/models/components/platformwarning.go: + id: 47e6f65a8f0e + last_write_checksum: sha1:a1e791366d778cca8b2510ed34e2fe62796191a6 + pristine_git_object: 41086e7e6523654827dffa4fb8af755add05ecd7 src/__tests__/mockserver/internal/sdk/models/components/possiblevalue.go: id: e74ffb55949f last_write_checksum: sha1:762425cc650e2e5fb24922f713ae5d6f8604b93b @@ -6388,8 +6456,12 @@ trackedFiles: pristine_git_object: 400797ac0ae0d3518c1e2fd0e75fad70ad0e9373 src/__tests__/mockserver/internal/sdk/models/operations/platformsearch.go: id: 8d5d0787d271 - last_write_checksum: sha1:99dd76e44d3d48fb22d7582ecea439e2505ca224 - pristine_git_object: 20b4d8b2efb5bc9a67f3e927fe3d3f919bf85897 + last_write_checksum: sha1:9fd7d66f3b3832e327c5943481aabf7a8f81578d + pristine_git_object: ed8ec6f66350d807dfc7c490b149ca47f44d644f + src/__tests__/mockserver/internal/sdk/models/operations/platformsearchfilters.go: + id: 7a1841a46be9 + last_write_checksum: sha1:7815f56d3f25cc592775e0a06bb06a74b4750dbb + pristine_git_object: 9f3bc5283b53d7b53a8ec73e3815732e4217e85a src/__tests__/mockserver/internal/sdk/models/operations/platformskillscreate.go: id: 5926ffd35a42 last_write_checksum: sha1:e892d1b2d5ffa19a40b2007cbdfbeca9fe358e63 @@ -6422,6 +6494,10 @@ trackedFiles: id: 3bdf8967c612 last_write_checksum: sha1:968aa0d910a052fb38c9772779edbb8372a6dd8a pristine_git_object: 556fde5ba2a9c1874505ffe499cf7aadbf082a5c + src/__tests__/mockserver/internal/sdk/models/operations/platformskillsupdate.go: + id: 97d92031e4a1 + last_write_checksum: sha1:67987d21eb0403505c83f96014b8b96c860e6c80 + pristine_git_object: d88ab8e801f65874506ceb31c7798edc737c4d7f src/__tests__/mockserver/internal/sdk/models/operations/platformskillsvalidate.go: id: 5dab5ea12f2b last_write_checksum: sha1:dae94b074a43988aaff25ae114e9c8f68a29d495 @@ -6768,16 +6844,16 @@ trackedFiles: pristine_git_object: 7ce8f5effc329f11e78343356b16576bf94b9fed src/__tests__/search.test.ts: id: 97f2005515d0 - last_write_checksum: sha1:ddd72ab0c544d9bdc041891b5d6c85921c1f4a5b - pristine_git_object: e36f1fde9af40fca3a6eee03a93a8c9c43e424bd + last_write_checksum: sha1:070b81b6acb9b6207f71dbddaa59f21c99cbca86 + pristine_git_object: 7e6a25ad28e03b2bc7e9b9ec272d1b8424e81ae6 src/__tests__/skills.test.ts: id: 3fa6e540c659 - last_write_checksum: sha1:20dae6491eee103f9b7156ef7193199e5e1eda4f - pristine_git_object: 21c6d6a4c46995ac2618790de8695c8169cca9fa + last_write_checksum: sha1:1148c50073d6d2ccdf103bb6893ea465ba1cc48d + pristine_git_object: 685b5a52c8a665cf79307983eac65b8aea4118cc src/__tests__/summarize.test.ts: id: 3105d6ebc7eb - last_write_checksum: sha1:687786e8909fc65b8bea8778b6f48ca1b4eac734 - pristine_git_object: 59161d47cdbb7680e2c2efabb041c8765191c1b5 + last_write_checksum: sha1:7d9dc5a965a96b0567e899de7b691458409b6cd4 + pristine_git_object: e042ecbcbc30256beeadd39aa01e215768056c00 src/__tests__/testclient.ts: id: f142c080bff8 last_write_checksum: sha1:3a38647391f52221c009a9273eebf90793b3d430 @@ -7346,10 +7422,14 @@ trackedFiles: id: d3415b0af8c7 last_write_checksum: sha1:5d1ec60b7b232f01db017d50c7de0bdd3be15e7d pristine_git_object: 8ac792c66214838901f88f279840f31cb33b1472 + src/funcs/searchListFilters.ts: + id: 16efa68fb063 + last_write_checksum: sha1:8531ba23678748489d04f4fd584ce0a1c823e85e + pristine_git_object: 1a35bac3b8ac53682168d037709ec3ea752aad19 src/funcs/searchQuery.ts: id: cc6075d2a5d0 - last_write_checksum: sha1:2b013dc9368701f9b40ca2cd755094fcd72aba45 - pristine_git_object: ad23061a8f21ce08b627a6ab903b462441bc1116 + last_write_checksum: sha1:e1625c48b3346dcaf5a889a497bc56fdfbd458c9 + pristine_git_object: 3468f4154ae89cba891c3683d4973636eb309c7e src/funcs/skillsCreate.ts: id: 58256c9d32bf last_write_checksum: sha1:0c1f6554cbddfd18df4b859ab3c3e19b1c5cd8ed @@ -7382,6 +7462,10 @@ trackedFiles: id: d466e3621984 last_write_checksum: sha1:412592b6ebbb48b864e8d265da704f1ed466a711 pristine_git_object: 4f06adc830c8b5622f45fe3b850f4dcff23c2a9a + src/funcs/skillsUpdate.ts: + id: 4f45a2e98be7 + last_write_checksum: sha1:4804cd77464d7b684ea08f3f180a803687b403cf + pristine_git_object: 63da83107e49e77e8deed392fcd5eef96a4993af src/funcs/skillsValidate.ts: id: 4fe727b61c05 last_write_checksum: sha1:a2eae2592460b35910407b62dfa0c948e0d1b4b2 @@ -7408,8 +7492,8 @@ trackedFiles: pristine_git_object: 42d9739ab67c2fec0689f83777ffa5e1f875e5d5 src/lib/config.ts: id: 320761608fb3 - last_write_checksum: sha1:366fbe71d325c1c559ff7c875b5a9d54c4915963 - pristine_git_object: 2e610ceda8d0fef79daebd2ee1664b78ac9f1bcf + last_write_checksum: sha1:ac0e70f74eeabdc0b6ab65b2db26cbfd7cdd1891 + pristine_git_object: d7c000e27f2cfe0d6c7d80a2af6e504a17a6e9ce src/lib/encodings.ts: id: 3bd8ead98afd last_write_checksum: sha1:a74725064d06b6994b95873c037975d2f2e63467 @@ -7908,8 +7992,8 @@ trackedFiles: pristine_git_object: fa5c9e0c66f24c73f3900f4fb6416467517f7d4c src/models/components/customdatasourceconfig.ts: id: a0d3e7391814 - last_write_checksum: sha1:4f7bb93cf2ef5d8a31a4dd0bc0d443d8f9bac5ce - pristine_git_object: 230c1f82c64d1550e867042934c749d96a359066 + last_write_checksum: sha1:f93f7dad6ff02860d38b8c8049e6daf0a4333f5d + pristine_git_object: bc2ff7d6bba6d22ef727681df02aa86741136617 src/models/components/customdatavalue.ts: id: 4a4265122008 last_write_checksum: sha1:3a3c35aaddd083dff3a52c325ed8c1c1df92c7b7 @@ -8556,8 +8640,8 @@ trackedFiles: pristine_git_object: c1b51fb164e5fddc23f344a60899933a91902f4c src/models/components/index.ts: id: 0aa842dce54d - last_write_checksum: sha1:1e184c24922f8297cde74342603942260a6e859c - pristine_git_object: 00ee413cea6e347de0c14eca79e186216362896a + last_write_checksum: sha1:8f6e20ec1dfe41de047650927b405aa27306d791 + pristine_git_object: aa507f977eef3e83c1aacc3b2b9f5dae9261cf55 src/models/components/indexdocumentrequest.ts: id: deb13e2cdc65 last_write_checksum: sha1:33e2093c7fcdd3c90ef45c48e7b79c4cb2aea6e5 @@ -8748,8 +8832,8 @@ trackedFiles: pristine_git_object: 310166b632cb704d915fc29c2bcdbf9f4d881714 src/models/components/objectdefinition.ts: id: d0faf3206877 - last_write_checksum: sha1:58e46a93ea9675e2eeee69e0e428a46b11cb270b - pristine_git_object: fbd7c8471d06d015b9fe7945d28149ee4275d23b + last_write_checksum: sha1:3f22eab0d40baf80d7594e0d60a507ac2e0335b0 + pristine_git_object: cd27415d753a7cda3222bbd2c47effdf7674b0f1 src/models/components/objectpermissions.ts: id: baa172d004ca last_write_checksum: sha1:83eb9e09caf43cd90952fad036d451af73a4483c @@ -8874,14 +8958,22 @@ trackedFiles: id: 982868bad9f7 last_write_checksum: sha1:6c16562e35fae21b7912e35a923dffeeb85b3dc6 pristine_git_object: 99ea1d2d103037edf8e7a29d0575841d814aa4a0 + src/models/components/platformdatasourcefilterinfo.ts: + id: f7d5af2a32f8 + last_write_checksum: sha1:bc62f57477214b82ec17667caa46aa78541498fd + pristine_git_object: 407689f01781ef06badbb7353e625c0ee35d74f8 src/models/components/platformfilter.ts: id: 606c0824e0d8 - last_write_checksum: sha1:b5398a367cd26311aa5709921c1bf82b841b225e - pristine_git_object: 55f896e8a37b238bce97cbb0facce0790f14c3be + last_write_checksum: sha1:5634e3231510ea3ee9fa3fbe00e310a25e951df2 + pristine_git_object: 23032672203d2306b2a6e7b4f02035b094c8db85 + src/models/components/platformfilterfieldinfo.ts: + id: 9d7ef9794894 + last_write_checksum: sha1:7a2750bf6e893f0d7111074d892fe151d6e0eac2 + pristine_git_object: 3f104fe9815a99b2a3ac91e099dae73498de2673 src/models/components/platformfilteroperator.ts: id: 4b1aaa52245c - last_write_checksum: sha1:7a75f66264b864d314de49a50cb6943737407b6c - pristine_git_object: 747dc820738057ab246ebe99a94da5599c0353a7 + last_write_checksum: sha1:0e3d75a41f8daaf2f812e813f44245ce35ce4e69 + pristine_git_object: bc7725a95fdadcd1939b56fa4af28f29e953a278 src/models/components/platformmessage.ts: id: 8869a2cf3a64 last_write_checksum: sha1:183efba262b4553d68dcbfc06d75a9171c439863 @@ -8908,16 +9000,20 @@ trackedFiles: pristine_git_object: 7ec20f406021300fb79032e8100150465e55e549 src/models/components/platformresult.ts: id: ace03f2ab3c3 - last_write_checksum: sha1:546daa4ca683b17b98b9af24cf5575f4aafaf025 - pristine_git_object: 35599c8206f922ddce4fd7a2f67d5309e7c5aa32 + last_write_checksum: sha1:cd08ed9efaa891bb744b2aa3bade4d9a2e59d0d4 + pristine_git_object: f0fe4c0c002edf411f57a45babef8d52a6d48487 + src/models/components/platformsearchfiltersresponse.ts: + id: 47e0d72542f6 + last_write_checksum: sha1:cc7b9e149e09bc719acf4212115d36e8e6616b3a + pristine_git_object: bec5ee0a76cd2fa787fb7485ae49a808f0b9a4d7 src/models/components/platformsearchrequest.ts: id: 649980857a72 - last_write_checksum: sha1:5ec46838131e1ccfba6f3b63deb6f292bc991fa9 - pristine_git_object: 8fe02b7e826bbf3eec5b6c989e984cf7e9d7f146 + last_write_checksum: sha1:569f65304e6bd274f0214ccd7298fed481cc17e8 + pristine_git_object: 89296931fb7929c6771a2cfd0e16f7b76bcc289b src/models/components/platformsearchresponse.ts: id: a12b46a101c0 - last_write_checksum: sha1:55664d86976b98357e67d15dc592c37be042f3c2 - pristine_git_object: e26c0612c799afdf42ca17bbb685881e6c07a101 + last_write_checksum: sha1:166d083b4eff956413166690b04c71d7f8f67857 + pristine_git_object: 3257e21294e77e4de6f1db64140d99c1d36e72a3 src/models/components/platformskill.ts: id: d34696ea810b last_write_checksum: sha1:ace2a7de3be1bdd74889516f88ce49f5635775a4 @@ -8954,6 +9050,18 @@ trackedFiles: id: 474e34580f2d last_write_checksum: sha1:5b5383fea1d9cc953c97e366214c75a0baf97268 pristine_git_object: 2efda9b8a2656f343a15314dd77bfbd1c10636e1 + src/models/components/platformskillupdaterequest.ts: + id: 3df8f4155bd1 + last_write_checksum: sha1:839e0eb9d0cd3840c32cae61d4c90e4fb0057528 + pristine_git_object: 50a17e80e10427a5ff64ecc3d5bddbbd9d088e8a + src/models/components/platformskillupdateresponse.ts: + id: 2548b5414735 + last_write_checksum: sha1:ef4440c9cab4232fc3086de7bf455632f8cf3ec4 + pristine_git_object: 0e52cc58fe4965f7fab5090fa4abe4a81562bda9 + src/models/components/platformskillupdatestatus.ts: + id: 5f8d04c5a43c + last_write_checksum: sha1:71743353c05eb10e9337552397737960cb87430d + pristine_git_object: f5ae8962ffd4277b209a3405ec56cfd9ce0562a5 src/models/components/platformskillvalidationfile.ts: id: ed89a1d60695 last_write_checksum: sha1:8bfc3a13a3d913a1ec080ec4a97c51d6600af9a5 @@ -8968,12 +9076,8 @@ trackedFiles: pristine_git_object: a18b7b028e84c04993d7632860ff20836abfb282 src/models/components/platformskillvalidationresponse.ts: id: 72e990f8b408 - last_write_checksum: sha1:974d92f3b16c83264e8fc634b3f7eedb1ff3a775 - pristine_git_object: 037388bd4167ab5bf64208f1c38b924097ea52b5 - src/models/components/platformskillvalidationwarning.ts: - id: 9f6d3a564161 - last_write_checksum: sha1:5e04b8c9f66d6d7ed5b30e80ac3317f936c3e3d7 - pristine_git_object: 73238ea01b138bad4f5836c71ac69c33a57edff9 + last_write_checksum: sha1:c364e3b93e921135e10cf00ccdd4ebf259e219b1 + pristine_git_object: d72fe6545d97367b38e0b48a767c8c9816a7b2de src/models/components/platformskillversion.ts: id: f58a116c278b last_write_checksum: sha1:4f0df0041dbc192f9913929b37b2462a5a74a42d @@ -8998,6 +9102,10 @@ trackedFiles: id: fb9ab6343c3a last_write_checksum: sha1:5816eda5ae4c626e40a45ad8f94a2409bc885d49 pristine_git_object: d0a44b8ce73a42839eb9cebe4a30737ba0b7eda1 + src/models/components/platformwarning.ts: + id: 172530a57f1e + last_write_checksum: sha1:a5663eeadbd79401370bb2d2c7a79e464169c63b + pristine_git_object: 8dce2cc259043dbfb75de40f38053758199c49cd src/models/components/possiblevalue.ts: id: c850c4f7068a last_write_checksum: sha1:7e25bb0b342c9435b772e48dc5da93d35bb2d462 @@ -9792,8 +9900,8 @@ trackedFiles: pristine_git_object: ddf76652b5d27d602a300b5909b728b59be4ad73 src/models/operations/index.ts: id: 0d9ffaf774d2 - last_write_checksum: sha1:1e70671a266409d922dfefea502fc9defb6045e3 - pristine_git_object: 270171c35788f02fd1cd16672e634631aff83a10 + last_write_checksum: sha1:7e2c88161f71823890cad5bca27511475c947cb6 + pristine_git_object: e183c22f159dfc690e6d03ca453e88221a3f5bae src/models/operations/insights.ts: id: 7bef0edaab32 last_write_checksum: sha1:37db16bc7603defd715210dfd8c12de88bde8b72 @@ -9854,6 +9962,10 @@ trackedFiles: id: c025879102b3 last_write_checksum: sha1:65d7361ac886e2c8f3200c6cc3141daf78ba1eac pristine_git_object: 69bd1349edebd305537e0ec66afbe70db4e9aa14 + src/models/operations/platformsearchfilters.ts: + id: 40fe427dde80 + last_write_checksum: sha1:1fe72e92d082f160e9107be4f8129c6a84a372b5 + pristine_git_object: df73d13d6c89d499b4236f41bb64b1357ce31a63 src/models/operations/platformskillscreateversion.ts: id: 9006c3c1a29c last_write_checksum: sha1:c180d3d0bfa13c7661e8c84a4a49dc6c54557b11 @@ -9882,6 +9994,10 @@ trackedFiles: id: 826a93a86c4e last_write_checksum: sha1:cb4f58426327b3007a56744d33f8fe77578ba10b pristine_git_object: e03a136af2eb65628713a5f1e9fd5ed1b4dbac4f + src/models/operations/platformskillsupdate.ts: + id: ece660fa7848 + last_write_checksum: sha1:1d3cf79cdc8bd6023cd52353661c726bbc379d93 + pristine_git_object: 92786fd5572338b397fe773f2d8840daa2fe1bbf src/models/operations/postapiindexv1debugdatasourcedocument.ts: id: 03753664a7e3 last_write_checksum: sha1:1fc8451990ad08329b62b2915f227f575e7e4b0b @@ -10416,8 +10532,8 @@ trackedFiles: pristine_git_object: 7ea1d5c56f074fe08998790eed62e014c840891b src/react-query/index.ts: id: 9e975471aa65 - last_write_checksum: sha1:c31d2d63d0e338e1515a1d0d6d7581ec98af773d - pristine_git_object: a4a0c405f98e6904b43e5bde0747872c7a96f58d + last_write_checksum: sha1:d89d42577223aa37b857be163bd5a9f4e6c147b9 + pristine_git_object: 672c6e2d136db68aa37587f79bbfe5efcba3bb78 src/react-query/indexingAuthenticationRotateToken.ts: id: e56c0845e38e last_write_checksum: sha1:035d7baae9a7fd7c32f69211cfe85b0f6ccbbf8c @@ -10598,10 +10714,18 @@ trackedFiles: id: f539f36cd532 last_write_checksum: sha1:91e8ee4d5848461ccc058920574bd1658c96a7da pristine_git_object: 60853a79fd3d357b9c225d1469569ba18e4bb834 + src/react-query/searchListFilters.core.ts: + id: c09038b64f46 + last_write_checksum: sha1:a102aaea3217d552637d897ddd5084317b76814d + pristine_git_object: c828118facf4777b04225a40f314a692f755bbc0 + src/react-query/searchListFilters.ts: + id: fb6d3135bc3a + last_write_checksum: sha1:15fd1aabb92eed104a2ba9bb03298e92d35e9b2d + pristine_git_object: ab0ebdc87a801fc874ab2f1498cd0ec8870662df src/react-query/searchQuery.ts: id: a67629da8040 - last_write_checksum: sha1:5ce8b5811af2d6dd5bc95afd2e9358c16d7c7a99 - pristine_git_object: bc4f7e63f7066516b637ad801275acd0fa53c9e0 + last_write_checksum: sha1:1a06345e62ddc12b48112f69e02ba4d5c7822ef9 + pristine_git_object: b09d842c9bc8c2eac5d42584c6a14d73e10c2575 src/react-query/skillsCreate.ts: id: 7726086743dc last_write_checksum: sha1:3409d7b9f44ec43b20674cda6aa520c0bf70a808 @@ -10658,6 +10782,10 @@ trackedFiles: id: df4ac1f925b8 last_write_checksum: sha1:69104669b5a1ff88bbf1c1cb93c45865c2817d88 pristine_git_object: 8f8681a4c0e351034a5b0df66a79b9093dcc1453 + src/react-query/skillsUpdate.ts: + id: e62e124a1043 + last_write_checksum: sha1:1c7760a6c4c67d0509520ba798cc4ed2de25a916 + pristine_git_object: b0ba56fad15269feb9e81faee769d822a90975a6 src/react-query/skillsValidate.ts: id: 03ea65130133 last_write_checksum: sha1:701439a52242439ae477cc1578a090c621af85b5 @@ -10800,12 +10928,12 @@ trackedFiles: pristine_git_object: 2cca83bdec91898235f72cc7138b1ebebbdc1956 src/sdk/search.ts: id: b88871d87236 - last_write_checksum: sha1:7aa823227d511aea3f70dd460e70b7478c6daf1f - pristine_git_object: d8b2b8c62743cb5b2e9d524fe24884ac23681858 + last_write_checksum: sha1:f9a6896781f5884e76434b7d93c7db7758edfb1f + pristine_git_object: a4ecf2ede22740e3ccd9b84253b0e065d934c916 src/sdk/skills.ts: id: 847667a72f83 - last_write_checksum: sha1:edb8c0137cf0bf51e06cbc592522227d0db8fe84 - pristine_git_object: 9155b69114897a43a5bcc9d22b85c17130173bbe + last_write_checksum: sha1:5323c971d107e1ab19c0f52e9b4c92521fd9a6fe + pristine_git_object: 895076db0fb24c3d96aaa971c0ba6b32e2e65922 src/sdk/tools.ts: id: f997ccdd9dd9 last_write_checksum: sha1:803cc691fc4535aba26609bc73553dcef9edda58 @@ -11843,7 +11971,7 @@ examples: application/json: {"query": "quarterly planning 2026", "page_size": 10, "datasources": ["confluence", "google_drive"], "filters": [{"field": "type", "values": ["spreadsheet", "presentation"]}]} responses: "200": - application/json: {"results": [], "has_more": false, "next_cursor": "", "request_id": ""} + application/json: {"results": [], "has_more": false, "next_cursor": "", "request_id": "", "warnings": []} "400": application/problem+json: {"type": "https://developer.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developer.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} "500": @@ -11988,6 +12116,29 @@ examples: application/json: {"error": ""} "500": application/json: {"error": ""} + platform-skills-update: + speakeasy-default-platform-skills-update: + parameters: + path: + skill_id: "" + requestBody: + application/json: {"status": "DISABLED"} + responses: + "200": + application/json: {"skill": {"id": "", "display_name": "Afton14", "description": "taut netsuke duh sonata boastfully elegantly management come", "latest_version": 425795, "latest_minor_version": 741364, "status": "DISABLED", "origin": "CUSTOM", "owner": {"name": ""}, "created_at": "2024-12-20T01:31:39.364Z", "updated_at": "2025-12-04T02:59:37.124Z"}, "request_id": ""} + "400": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + "500": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + platform-search-filters: + speakeasy-default-platform-search-filters: + responses: + "200": + application/json: {"datasources": [], "request_id": ""} + "400": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + "500": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} examplesVersion: 1.0.2 generatedTests: activity: "2025-05-05T15:08:35-05:00" @@ -12165,7 +12316,9 @@ generatedTests: platform-skills-get-version: "2026-07-21T09:01:01Z" platform-skills-get-version-content: "2026-07-21T09:01:01Z" post_/rest/api/index/submissions/{datasourceInstance}/{type}: "2026-07-21T09:01:02Z" -releaseNotes: "## Typescript SDK Changes:\n* `glean.skills.create()`: **Added**\n* `glean.skills.list()`: **Added**\n* `glean.skills.validate()`: **Added**\n* `glean.skills.retrieve()`: **Added**\n* `glean.skills.retrieveContent()`: **Added**\n* `glean.skills.createVersion()`: **Added**\n* `glean.skills.listVersions()`: **Added**\n* `glean.skills.retrieveVersion()`: **Added**\n* `glean.skills.retrieveVersionContent()`: **Added**\n* `glean.indexing.datasources.submit()`: **Added**\n* `glean.client.chat.create()`: \n * `request.chatRequest.messages[].fragments[].action.metadata.actionTypeSource` **Added**\n * `response.messages[].fragments[].action.metadata.actionTypeSource` **Added**\n* `glean.client.chat.retrieve()`: `response.chatResult.chat.messages[].fragments[].action.metadata.actionTypeSource` **Added**\n* `glean.client.chat.createStream()`: \n * `request.chatRequest.messages[].fragments[].action.metadata.actionTypeSource` **Added**\n* `glean.client.agents.create()`: `response.workflow.webhookUrl` **Added**\n* `glean.client.search.retrieveFeed()`: `response.results[].primaryEntry.workflow.workflow.webhookUrl` **Added**\n* `glean.client.governance.data.findings.create()`: \n * `request` **Changed**\n * `response` **Changed**\n* `glean.client.governance.data.findings.list()`: `response.exports[]` **Changed**\n" + platform-skills-update: "2026-07-24T02:19:25Z" + platform-search-filters: "2026-07-24T02:19:25Z" +releaseNotes: "## Typescript SDK Changes:\n* `glean.search.query()`: \n * `request.datasourceInstances` **Removed** (Breaking ⚠️)\n * `response` **Changed** (Breaking ⚠️)\n * `error.status[422]` **Added**\n* `glean.skills.update()`: **Added**\n* `glean.search.listFilters()`: **Added**\n* `glean.indexing.datasources.add()`: `request` **Changed**\n* `glean.indexing.datasources.retrieveConfig()`: `response` **Changed**\n" generatedFiles: - .devcontainer/README.md - .devcontainer/devcontainer.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index ad1a9116b..473a7a5e1 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -35,7 +35,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: true typescript: - version: 0.18.0 + version: 0.18.1 acceptHeaderEnum: true additionalDependencies: dependencies: {} diff --git a/.speakeasy/glean-merged-spec.yaml b/.speakeasy/glean-merged-spec.yaml index 9b00266de..74254cec4 100644 --- a/.speakeasy/glean-merged-spec.yaml +++ b/.speakeasy/glean-merged-spec.yaml @@ -2,8 +2,8 @@ openapi: 3.0.0 info: version: "0.9.0" title: Glean API - x-source-commit-sha: 2822daae55430107c738db822cbeeb5a6bef463b - x-open-api-commit-sha: 0bdefe83a21f917592624e6f1dbaa180e89d5224 + x-source-commit-sha: ddfed6efdc1718ea7d54ca0d329ead6516dc6a72 + x-open-api-commit-sha: 61cfdba0b21e5c13a65cb72a527d3bc89ba8fc26 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. @@ -401,6 +401,63 @@ paths: security: - APIToken: [] /api/skills/{skill_id}: + patch: + tags: + - Skills + summary: Update skill + description: | + Update mutable metadata for a skill. V1 supports enabling or disabling a skill without changing its content. + operationId: platform-skills-update + x-visibility: Public + x-glean-experimental: + id: 262e1f6b-6c2d-4d6d-943b-fc251d2fb38b + introduced: "2026-07-20" + parameters: + - name: skill_id + in: path + required: true + description: Glean skill ID. + schema: + type: string + minLength: 1 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformSkillUpdateRequest" + x-codegen-request-body-name: request + responses: + "200": + description: Successful response. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformSkillUpdateResponse" + "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" + "409": + $ref: "#/components/responses/PlatformConflict" + "413": + $ref: "#/components/responses/PlatformRequestTooLarge" + "429": + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: skills + x-speakeasy-name-override: update + security: + - APIToken: [] get: tags: - Skills @@ -739,7 +796,8 @@ paths: - Search summary: Search description: | - Execute a search query and retrieve ranked results. This is the data retrieval variant of the search API and returns only results and pagination state. + Search your organization's connected content and return ranked document results with cursor pagination. Use `GET /api/search/filters` to discover datasource identifiers and common filter fields. Built-in filter names are validated; other field names are accepted as custom filters and behavior depends on your Glean configuration and connected sources. + Errors: HTTP 422 `unprocessable_query` returns no `results` or `next_cursor`. See `warnings` on the response for non-blocking issues such as partially available results. Not every query issue produces a warning or error. operationId: platform-search x-visibility: Public x-glean-experimental: @@ -754,7 +812,7 @@ paths: $ref: "#/components/schemas/PlatformSearchRequest" responses: "200": - description: Successful search. + description: Successful response. content: application/json: schema: @@ -771,6 +829,8 @@ paths: $ref: "#/components/responses/PlatformRequestTimeout" "413": $ref: "#/components/responses/PlatformRequestTooLarge" + "422": + $ref: "#/components/responses/PlatformUnprocessableEntity" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": @@ -781,6 +841,73 @@ paths: x-speakeasy-name-override: query security: - APIToken: [] + /api/search/filters: + get: + tags: + - Search + summary: List search filters + description: | + List datasources and common built-in filter fields visible to the authenticated user. This is a best-effort catalog, not an exhaustive list of every filter search accepts. + Without `query`, returns field metadata only and does not run a search. With a nonblank `query`, provide exactly one `datasources` value to request suggested filter values for that query; no documents are returned and this endpoint does not include warning objects. See `FilterFieldInfo.values` for limitations on suggested values. Rate-limited requests return HTTP 429 with `Retry-After`; temporary backend unavailability returns HTTP 503. + operationId: platform-search-filters + x-visibility: Public + x-glean-experimental: + id: 0b585621-13fb-4544-bf20-5e1c99452735 + introduced: "2026-05-12" + parameters: + - in: query + name: datasources + description: | + Restrict metadata to one or more datasource identifiers as returned by this endpoint (for example, `jira`). With a nonblank `query`, exactly one datasource is required. Unknown or inaccessible identifiers return `invalid_datasource`. + required: false + schema: + type: array + minItems: 1 + items: + type: string + minLength: 1 + - in: query + name: query + description: | + Optional search query that requests suggested filter values for the selected datasource. Must be nonblank when present. Triggers a search for facet values only; does not return documents. + required: false + schema: + type: string + minLength: 1 + responses: + "200": + description: Successful response. + headers: + Cache-Control: + description: | + Present as `no-store` for query-backed discovery responses. Catalog-only responses omit this endpoint-specific override. + schema: + type: string + example: no-store + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformSearchFiltersResponse" + "400": + $ref: "#/components/responses/PlatformBadRequest" + "401": + $ref: "#/components/responses/PlatformUnauthorized" + "403": + $ref: "#/components/responses/PlatformForbidden" + "404": + $ref: "#/components/responses/PlatformNotFound" + "408": + $ref: "#/components/responses/PlatformRequestTimeout" + "429": + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: search + x-speakeasy-name-override: listFilters + security: + - APIToken: [] /rest/api/v1/activity: post: operationId: activity @@ -5640,6 +5767,24 @@ components: description: >- HTTP bearer token. Accepts a Glean-issued API token, an OAuth access token from the Glean OAuth Authorization Server (including Dynamic Client Registration clients), or an OAuth access token issued by an external identity provider. External-IdP OAuth tokens must also include the `X-Glean-Auth-Type: OAUTH` request header. OAuth is supported on the Client API only; the Indexing API requires a Glean-issued token. schemas: + PlatformWarning: + type: object + additionalProperties: false + required: + - code + - message + description: Non-blocking warning attached to a successful Platform response. + properties: + code: + type: string + minLength: 1 + description: | + Open snake_case warning code. Clients must tolerate unknown values; the set of codes is not a closed enum. + example: results_incomplete + message: + type: string + minLength: 1 + description: Human-readable warning message. PlatformAgentsSearchRequest: type: object additionalProperties: false @@ -6205,18 +6350,6 @@ components: is_manifest: type: boolean description: Whether this file is the skill manifest. - PlatformSkillValidationWarning: - type: object - required: - - code - - message - properties: - code: - type: string - description: Stable warning code. - message: - type: string - description: Human-readable warning message. PlatformSkillValidationResponse: type: object required: @@ -6236,7 +6369,7 @@ components: type: array description: Non-blocking validation warnings. items: - $ref: "#/components/schemas/PlatformSkillValidationWarning" + $ref: "#/components/schemas/PlatformWarning" request_id: type: string description: Platform-generated request ID for support correlation. @@ -6251,6 +6384,31 @@ components: request_id: type: string description: Platform-generated request ID for support correlation. + PlatformSkillUpdateStatus: + type: string + enum: + - ENABLED + - DISABLED + description: New status for the skill. + PlatformSkillUpdateRequest: + type: object + additionalProperties: false + required: + - status + properties: + status: + $ref: "#/components/schemas/PlatformSkillUpdateStatus" + PlatformSkillUpdateResponse: + type: object + required: + - skill + - request_id + properties: + skill: + $ref: "#/components/schemas/PlatformSkill" + request_id: + type: string + description: Platform-generated request ID for support correlation. PlatformSkillVersion: type: object required: @@ -6353,23 +6511,27 @@ components: - LTE PlatformFilter: type: object + additionalProperties: false required: - field - values description: | - A single filter criterion. For `EQUALS`, multiple values within a filter are OR'd. For `NOT_EQUALS`, multiple values exclude all listed values. Filters are AND'd with each other and with any inline query operators. + A single filter criterion. For `EQUALS`, multiple values within a filter are OR'd; for `NOT_EQUALS`, listed values are excluded. Separate filters are AND'd with each other and with inline operators in `query`. Repeated same-field `EQUALS` filters are rejected. properties: field: type: string + minLength: 1 description: | - The field to filter on. Accepts built-in filter field names such as `type`, `owner`, `from`, `author`, `channel`, `status`, `assignee`, `reporter`, `component`, `mentions`, and `collection`, plus custom datasource property names. + Filter field name. Built-in names (case-sensitive, lowercase only): `type`, `owner`, `from`, `author`, `channel`, `status`, `assignee`, `reporter`, `component`, `mentions`, and `collection`. Built-ins accept only `EQUALS` and `NOT_EQUALS`. Any other nonblank name is accepted as a custom filter without spelling, existence, or type checks; behavior depends on your connected sources. example: type values: type: array minItems: 1 items: type: string - description: One or more values to match. + minLength: 1 + description: | + One or more values to match. Prefer values returned by filter discovery unchanged. For people (`USER`) fields, values may be email addresses or display names. example: - spreadsheet - presentation @@ -6377,9 +6539,10 @@ components: allOf: - $ref: "#/components/schemas/PlatformFilterOperator" description: | - Comparison operator to apply to this filter. Defaults to `EQUALS`. `GT`, `GTE`, `LT`, and `LTE` range operators require exactly one value; express bounded ranges with multiple filters on the same field. + Comparison operator. Defaults to `EQUALS`. Built-in fields support only `EQUALS` and `NOT_EQUALS`. Range operators (`GT`, `GTE`, `LT`, `LTE`) require exactly one value; express ranges with multiple filters on the same field. Custom fields may support different operators depending on the data source. PlatformTimeRange: type: object + additionalProperties: false description: Filter results to those last updated within this range. properties: start: @@ -6408,6 +6571,7 @@ components: 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`. page_size: @@ -6423,26 +6587,24 @@ components: Opaque pagination token from a previous response's `next_cursor` field. Omit on the first request. datasources: type: array + minItems: 1 items: type: string + minLength: 1 description: | - Restrict results to specific datasources. Requests must not specify both `datasources` and `datasource_instances`. - datasource_instances: - type: array - items: - type: string - description: | - Restrict results to specific datasource instances. Values are datasource instance identifiers returned by `GET /api/search/filters`. Requests must not specify both `datasources` and `datasource_instances`. + 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. filters: type: array + minItems: 1 items: $ref: "#/components/schemas/PlatformFilter" description: | - Structured filters applied to search results. Equality operators OR multiple values within a filter. Multiple filters are AND'd together, including range filters on the same field. Filters are AND'd with any inline operators in `query`. Note that conflicting constraints on the same field (e.g., `type:document` in the query and `type: spreadsheet` in a filter) produce an empty result set. + 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" PlatformResult: type: object + additionalProperties: false required: - url - title @@ -6451,31 +6613,31 @@ components: url: type: string format: uri + minLength: 1 description: Canonical URL of the result. example: https://company.atlassian.net/wiki/spaces/ENG/pages/12345 title: type: string + minLength: 1 description: Result title. example: Q2 2026 Platform Roadmap snippets: type: array items: type: string + minLength: 1 description: Query-relevant plain-text excerpts from the result body. example: - The platform team will focus on API stability and... datasource: type: string + minLength: 1 description: The datasource this result originates from. example: confluence - datasource_instance: - type: string - nullable: true - description: The datasource instance this result originates from, if known. - example: confluence_acme document_type: type: string nullable: true + minLength: 1 description: The document type within the datasource. example: page creator: @@ -6494,17 +6656,20 @@ components: description: When the result was created. PlatformSearchResponse: type: object + additionalProperties: false required: - results - has_more - next_cursor - request_id + - warnings properties: results: type: array items: $ref: "#/components/schemas/PlatformResult" - description: Ordered list of search results. + description: | + Ordered list of ranked document results. People cards, Q&A blocks, and other UI-only result types are not included. has_more: type: boolean description: Indicates whether additional pages of results are available. @@ -6514,6 +6679,82 @@ components: description: Opaque token to pass as `cursor` in the next request. request_id: type: string + minLength: 1 + description: Platform-generated request ID for support correlation. + warnings: + type: array + description: | + Non-blocking warnings for this response. Required; use `[]` when there are none. Clients must tolerate unknown warning codes. `results_incomplete` means some results may be unavailable for the requested datasource scope while `results`, `has_more`, and `next_cursor` remain present. Warning messages are generic and do not include query text or internal identifiers. + items: + $ref: "#/components/schemas/PlatformWarning" + PlatformFilterFieldInfo: + type: object + additionalProperties: false + required: + - field + - type + - operators + properties: + field: + type: string + minLength: 1 + description: Field name usable in the `filters` array for `POST /api/search`. + example: status + type: + type: string + minLength: 1 + description: | + Open field-type string. Current values are `STRING` for text and keyword fields and `USER` for people fields (`owner`, `from`, `author`, `assignee`, `reporter`, `mentions`). Clients must tolerate unknown values. + example: STRING + operators: + type: array + minItems: 1 + description: | + Comparison operators supported for this field. Built-in fields expose `EQUALS` and `NOT_EQUALS`. + items: + $ref: "#/components/schemas/PlatformFilterOperator" + values: + type: array + description: | + Suggested filter values observed for the supplied `query`. Omitted in catalog-only responses. Present as an array, including `[]`, when `query` is provided. Values are a bounded, non-exhaustive sample in search-provider order and may include duplicates; blank values are omitted. No additional endpoint-specific truncation is applied. Grouping in the search UI is not preserved; each value applies to the field broadly. An empty array does not mean no valid value exists. Availability varies by data source; federated and MCP integrations may return page-derived values or none at all. Reusing a suggested value in `POST /api/search` does not guarantee matching results or identical filter behavior. For `USER` fields, values may be email addresses or display names. + items: + type: string + minLength: 1 + PlatformDatasourceFilterInfo: + type: object + additionalProperties: false + required: + - datasource + - filters + properties: + datasource: + type: string + minLength: 1 + description: | + Datasource identifier usable in `POST /api/search` `datasources`. + example: jira + filters: + type: array + description: | + Common built-in filter fields for this datasource. May be empty. A built-in omitted here can still be valid in `POST /api/search`; see `Filter.field` for the full built-in name list. + items: + $ref: "#/components/schemas/PlatformFilterFieldInfo" + PlatformSearchFiltersResponse: + type: object + additionalProperties: false + required: + - datasources + - request_id + properties: + datasources: + type: array + description: | + Datasources visible to the authenticated user. Each `datasource` is an identifier you can pass to `POST /api/search` `datasources`. An empty array means no visible datasources. + items: + $ref: "#/components/schemas/PlatformDatasourceFilterInfo" + request_id: + type: string + minLength: 1 description: Platform-generated request ID for support correlation. ActivityEventParams: properties: @@ -15845,6 +16086,8 @@ components: - ENTITY - CALENDAR - AGENTS + - AI_CONVERSATION + - AI_ARTIFACT description: The document category of this object type. propertyDefinitions: type: array @@ -15898,6 +16141,8 @@ components: - ENTITY - CALENDAR - AGENTS + - AI_CONVERSATION + - AI_ARTIFACT description: The type of this datasource. It is an important signal for relevance and must be specified and cannot be UNCATEGORIZED. Please refer to [this](https://developers.glean.com/docs/indexing_api_datasource_category/) for more details. default: UNCATEGORIZED urlRegex: @@ -17028,6 +17273,12 @@ components: application/problem+json: schema: $ref: "#/components/schemas/PlatformProblemDetail" + PlatformUnprocessableEntity: + description: Syntactically valid but semantically incorrect request. + content: + application/problem+json: + schema: + $ref: "#/components/schemas/PlatformProblemDetail" SuccessResponse: description: OK content: diff --git a/.speakeasy/tests.arazzo.yaml b/.speakeasy/tests.arazzo.yaml index d458c216b..a7eee2713 100644 --- a/.speakeasy/tests.arazzo.yaml +++ b/.speakeasy/tests.arazzo.yaml @@ -164705,7 +164705,7 @@ workflows: - condition: $response.header.Content-Type == application/json - context: $response.body condition: | - {"results":[],"has_more":false,"next_cursor":"","request_id":""} + {"results":[],"has_more":false,"next_cursor":"","request_id":"","warnings":[]} type: simple x-speakeasy-test-group: search x-speakeasy-test-rebuild: true @@ -164932,3 +164932,37 @@ workflows: type: simple x-speakeasy-test-group: indexing_datasources x-speakeasy-test-rebuild: true + - workflowId: platform-skills-update + steps: + - stepId: test + operationId: platform-skills-update + parameters: + - name: skill_id + in: path + value: + requestBody: + contentType: application/json + payload: + status: DISABLED + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"skill":{"id":"","display_name":"Afton14","description":"taut netsuke duh sonata boastfully elegantly management come","latest_version":425795,"latest_minor_version":741364,"status":"DISABLED","origin":"CUSTOM","owner":{"name":""},"created_at":"2024-12-20T01:31:39.364Z","updated_at":"2025-12-04T02:59:37.124Z"},"request_id":""} + type: simple + x-speakeasy-test-group: skills + x-speakeasy-test-rebuild: true + - workflowId: platform-search-filters + steps: + - stepId: test + operationId: platform-search-filters + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"datasources":[],"request_id":""} + type: simple + x-speakeasy-test-group: search + x-speakeasy-test-rebuild: true diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 64afd73d3..ffc8b04ab 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.790.3 sources: Glean API: sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:bb3bada7cfd1fef35eb00e096010fcd9238a6dde135ee387c782bba65dfa45fb - sourceBlobDigest: sha256:5552ea5e20187c775de44c60abbd112a31cf189b9486aafe2e303b5f71e76f0b + sourceRevisionDigest: sha256:8646b9ae43c3e7c3f89b5f4dd0deecb3a19003c99abe37877a979cbea71d5d21 + sourceBlobDigest: sha256:287ed98d1375a1916aa7ff513bec709114f347184660504a504a9df53c3c1dfa tags: - latest Glean Client API: @@ -17,10 +17,10 @@ targets: glean: source: Glean API sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:bb3bada7cfd1fef35eb00e096010fcd9238a6dde135ee387c782bba65dfa45fb - sourceBlobDigest: sha256:5552ea5e20187c775de44c60abbd112a31cf189b9486aafe2e303b5f71e76f0b + sourceRevisionDigest: sha256:8646b9ae43c3e7c3f89b5f4dd0deecb3a19003c99abe37877a979cbea71d5d21 + sourceBlobDigest: sha256:287ed98d1375a1916aa7ff513bec709114f347184660504a504a9df53c3c1dfa codeSamplesNamespace: glean-api-specs-typescript-code-samples - codeSamplesRevisionDigest: sha256:4fccf3340ecfd3b8983f80b9a4fd877136f252809bab9111058d76b4637a86a7 + codeSamplesRevisionDigest: sha256:206bc21641d2615e59c575a2b5638259e60085bf3a5de7d224ff941620f6a214 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index cfa87548d..fadf66341 100644 --- a/README.md +++ b/README.md @@ -494,12 +494,14 @@ For more information on obtaining the appropriate token type, please contact you ### [Search](docs/sdks/search/README.md) * [query](docs/sdks/search/README.md#query) - Search +* [listFilters](docs/sdks/search/README.md#listfilters) - List search filters ### [Skills](docs/sdks/skills/README.md) * [create](docs/sdks/skills/README.md#create) - Create skill * [list](docs/sdks/skills/README.md#list) - List skills * [validate](docs/sdks/skills/README.md#validate) - Validate skill bundle +* [update](docs/sdks/skills/README.md#update) - Update skill * [retrieve](docs/sdks/skills/README.md#retrieve) - Retrieve skill * [retrieveContent](docs/sdks/skills/README.md#retrievecontent) - Download skill content * [createVersion](docs/sdks/skills/README.md#createversion) - Create skill version @@ -662,6 +664,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). - [`indexingPermissionsUpdatePermissions`](docs/sdks/permissions/README.md#updatepermissions) - Update document permissions - [`indexingShortcutsBulkIndex`](docs/sdks/indexingshortcuts/README.md#bulkindex) - Bulk index external shortcuts - [`indexingShortcutsUpload`](docs/sdks/indexingshortcuts/README.md#upload) - Upload shortcuts +- [`searchListFilters`](docs/sdks/search/README.md#listfilters) - List search filters - [`searchQuery`](docs/sdks/search/README.md#query) - Search - [`skillsCreate`](docs/sdks/skills/README.md#create) - Create skill - [`skillsCreateVersion`](docs/sdks/skills/README.md#createversion) - Create skill version @@ -671,6 +674,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). - [`skillsRetrieveContent`](docs/sdks/skills/README.md#retrievecontent) - Download skill content - [`skillsRetrieveVersion`](docs/sdks/skills/README.md#retrieveversion) - Retrieve skill version - [`skillsRetrieveVersionContent`](docs/sdks/skills/README.md#retrieveversioncontent) - Download skill version content +- [`skillsUpdate`](docs/sdks/skills/README.md#update) - Update skill - [`skillsValidate`](docs/sdks/skills/README.md#validate) - Validate skill bundle - ~~[`clientAnswersList`](docs/sdks/answers/README.md#list)~~ - List Answers :warning: **Deprecated** - ~~[`indexingDocumentsCount`](docs/sdks/indexingdocuments/README.md#count)~~ - Get document count :warning: **Deprecated** @@ -840,6 +844,7 @@ To learn about this feature and how to get started, check - [`useIndexingPermissionsUpdatePermissionsMutation`](docs/sdks/permissions/README.md#updatepermissions) - Update document permissions - [`useIndexingShortcutsBulkIndexMutation`](docs/sdks/indexingshortcuts/README.md#bulkindex) - Bulk index external shortcuts - [`useIndexingShortcutsUploadMutation`](docs/sdks/indexingshortcuts/README.md#upload) - Upload shortcuts +- [`useSearchListFilters`](docs/sdks/search/README.md#listfilters) - List search filters - [`useSearchQueryMutation`](docs/sdks/search/README.md#query) - Search - [`useSkillsCreateMutation`](docs/sdks/skills/README.md#create) - Create skill - [`useSkillsCreateVersionMutation`](docs/sdks/skills/README.md#createversion) - Create skill version @@ -849,6 +854,7 @@ To learn about this feature and how to get started, check - [`useSkillsRetrieveContent`](docs/sdks/skills/README.md#retrievecontent) - Download skill content - [`useSkillsRetrieveVersion`](docs/sdks/skills/README.md#retrieveversion) - Retrieve skill version - [`useSkillsRetrieveVersionContent`](docs/sdks/skills/README.md#retrieveversioncontent) - Download skill version content +- [`useSkillsUpdateMutation`](docs/sdks/skills/README.md#update) - Update skill - [`useSkillsValidateMutation`](docs/sdks/skills/README.md#validate) - Validate skill bundle - ~~[`useClientAnswersListMutation`](docs/sdks/answers/README.md#list)~~ - List Answers :warning: **Deprecated** - ~~[`useIndexingDocumentsCountMutation`](docs/sdks/indexingdocuments/README.md#count)~~ - Get document count :warning: **Deprecated** diff --git a/RELEASES.md b/RELEASES.md index 9722ce5cf..6c84c584c 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -838,4 +838,14 @@ Based on: ### Generated - [typescript v0.18.0] . ### Releases -- [NPM v0.18.0] https://www.npmjs.com/package/@gleanwork/api-client/v/0.18.0 - . \ No newline at end of file +- [NPM v0.18.0] https://www.npmjs.com/package/@gleanwork/api-client/v/0.18.0 - . + +## 2026-07-24 02:15:49 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.790.3 (2.918.4) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.18.1] . +### Releases +- [NPM v0.18.1] https://www.npmjs.com/package/@gleanwork/api-client/v/0.18.1 - . \ No newline at end of file diff --git a/docs/models/components/datasourcecategory.md b/docs/models/components/datasourcecategory.md index 1b6c77217..189f462fd 100644 --- a/docs/models/components/datasourcecategory.md +++ b/docs/models/components/datasourcecategory.md @@ -7,7 +7,7 @@ The type of this datasource. It is an important signal for relevance and must be ```typescript import { DatasourceCategory } from "@gleanwork/api-client/models/components"; -let value: DatasourceCategory = "EXTERNAL_SHORTCUT"; +let value: DatasourceCategory = "ENTITY"; // Open enum: unrecognized values are captured as Unrecognized ``` @@ -15,5 +15,5 @@ let value: DatasourceCategory = "EXTERNAL_SHORTCUT"; ## Values ```typescript -"UNCATEGORIZED" | "TICKETS" | "CRM" | "PUBLISHED_CONTENT" | "COLLABORATIVE_CONTENT" | "QUESTION_ANSWER" | "MESSAGING" | "CODE_REPOSITORY" | "CHANGE_MANAGEMENT" | "PEOPLE" | "EMAIL" | "SSO" | "ATS" | "KNOWLEDGE_HUB" | "EXTERNAL_SHORTCUT" | "ENTITY" | "CALENDAR" | "AGENTS" | Unrecognized +"UNCATEGORIZED" | "TICKETS" | "CRM" | "PUBLISHED_CONTENT" | "COLLABORATIVE_CONTENT" | "QUESTION_ANSWER" | "MESSAGING" | "CODE_REPOSITORY" | "CHANGE_MANAGEMENT" | "PEOPLE" | "EMAIL" | "SSO" | "ATS" | "KNOWLEDGE_HUB" | "EXTERNAL_SHORTCUT" | "ENTITY" | "CALENDAR" | "AGENTS" | "AI_CONVERSATION" | "AI_ARTIFACT" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/components/doccategory.md b/docs/models/components/doccategory.md index b97d4db6d..f221829e8 100644 --- a/docs/models/components/doccategory.md +++ b/docs/models/components/doccategory.md @@ -15,5 +15,5 @@ let value: DocCategory = "COLLABORATIVE_CONTENT"; ## Values ```typescript -"UNCATEGORIZED" | "TICKETS" | "CRM" | "PUBLISHED_CONTENT" | "COLLABORATIVE_CONTENT" | "QUESTION_ANSWER" | "MESSAGING" | "CODE_REPOSITORY" | "CHANGE_MANAGEMENT" | "PEOPLE" | "EMAIL" | "SSO" | "ATS" | "KNOWLEDGE_HUB" | "EXTERNAL_SHORTCUT" | "ENTITY" | "CALENDAR" | "AGENTS" | Unrecognized +"UNCATEGORIZED" | "TICKETS" | "CRM" | "PUBLISHED_CONTENT" | "COLLABORATIVE_CONTENT" | "QUESTION_ANSWER" | "MESSAGING" | "CODE_REPOSITORY" | "CHANGE_MANAGEMENT" | "PEOPLE" | "EMAIL" | "SSO" | "ATS" | "KNOWLEDGE_HUB" | "EXTERNAL_SHORTCUT" | "ENTITY" | "CALENDAR" | "AGENTS" | "AI_CONVERSATION" | "AI_ARTIFACT" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/components/platformdatasourcefilterinfo.md b/docs/models/components/platformdatasourcefilterinfo.md new file mode 100644 index 000000000..f130748a1 --- /dev/null +++ b/docs/models/components/platformdatasourcefilterinfo.md @@ -0,0 +1,27 @@ +# PlatformDatasourceFilterInfo + +## Example Usage + +```typescript +import { PlatformDatasourceFilterInfo } from "@gleanwork/api-client/models/components"; + +let value: PlatformDatasourceFilterInfo = { + datasource: "jira", + filters: [ + { + field: "status", + type: "STRING", + operators: [ + "LTE", + ], + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `datasource` | *string* | :heavy_check_mark: | Datasource identifier usable in `POST /api/search` `datasources`.
| jira | +| `filters` | [components.PlatformFilterFieldInfo](../../models/components/platformfilterfieldinfo.md)[] | :heavy_check_mark: | Common built-in filter fields for this datasource. May be empty. A built-in omitted here can still be valid in `POST /api/search`; see `Filter.field` for the full built-in name list.
| | \ No newline at end of file diff --git a/docs/models/components/platformfilter.md b/docs/models/components/platformfilter.md index 6492968d3..16117c108 100644 --- a/docs/models/components/platformfilter.md +++ b/docs/models/components/platformfilter.md @@ -1,6 +1,6 @@ # PlatformFilter -A single filter criterion. For `EQUALS`, multiple values within a filter are OR'd. For `NOT_EQUALS`, multiple values exclude all listed values. Filters are AND'd with each other and with any inline query operators. +A single filter criterion. For `EQUALS`, multiple values within a filter are OR'd; for `NOT_EQUALS`, listed values are excluded. Separate filters are AND'd with each other and with inline operators in `query`. Repeated same-field `EQUALS` filters are rejected. ## Example Usage @@ -19,8 +19,8 @@ let value: PlatformFilter = { ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `field` | *string* | :heavy_check_mark: | The field to filter on. Accepts built-in filter field names such as `type`, `owner`, `from`, `author`, `channel`, `status`, `assignee`, `reporter`, `component`, `mentions`, and `collection`, plus custom datasource property names.
| type | -| `values` | *string*[] | :heavy_check_mark: | One or more values to match. | [
"spreadsheet",
"presentation"
] | -| `operator` | [components.PlatformFilterOperator](../../models/components/platformfilteroperator.md) | :heavy_minus_sign: | Comparison operator to apply to this filter. Defaults to `EQUALS`. `GT`, `GTE`, `LT`, and `LTE` range operators require exactly one value; express bounded ranges with multiple filters on the same field.
| | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `field` | *string* | :heavy_check_mark: | Filter field name. Built-in names (case-sensitive, lowercase only): `type`, `owner`, `from`, `author`, `channel`, `status`, `assignee`, `reporter`, `component`, `mentions`, and `collection`. Built-ins accept only `EQUALS` and `NOT_EQUALS`. Any other nonblank name is accepted as a custom filter without spelling, existence, or type checks; behavior depends on your connected sources.
| type | +| `values` | *string*[] | :heavy_check_mark: | One or more values to match. Prefer values returned by filter discovery unchanged. For people (`USER`) fields, values may be email addresses or display names.
| [
"spreadsheet",
"presentation"
] | +| `operator` | [components.PlatformFilterOperator](../../models/components/platformfilteroperator.md) | :heavy_minus_sign: | Comparison operator. Defaults to `EQUALS`. Built-in fields support only `EQUALS` and `NOT_EQUALS`. Range operators (`GT`, `GTE`, `LT`, `LTE`) require exactly one value; express ranges with multiple filters on the same field. Custom fields may support different operators depending on the data source.
| | \ No newline at end of file diff --git a/docs/models/components/platformfilterfieldinfo.md b/docs/models/components/platformfilterfieldinfo.md new file mode 100644 index 000000000..d4b873ee5 --- /dev/null +++ b/docs/models/components/platformfilterfieldinfo.md @@ -0,0 +1,22 @@ +# PlatformFilterFieldInfo + +## Example Usage + +```typescript +import { PlatformFilterFieldInfo } from "@gleanwork/api-client/models/components"; + +let value: PlatformFilterFieldInfo = { + field: "status", + type: "STRING", + operators: [], +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `field` | *string* | :heavy_check_mark: | Field name usable in the `filters` array for `POST /api/search`. | status | +| `type` | *string* | :heavy_check_mark: | Open field-type string. Current values are `STRING` for text and keyword fields and `USER` for people fields (`owner`, `from`, `author`, `assignee`, `reporter`, `mentions`). Clients must tolerate unknown values.
| STRING | +| `operators` | [components.PlatformFilterOperator](../../models/components/platformfilteroperator.md)[] | :heavy_check_mark: | Comparison operators supported for this field. Built-in fields expose `EQUALS` and `NOT_EQUALS`.
| | +| `values` | *string*[] | :heavy_minus_sign: | Suggested filter values observed for the supplied `query`. Omitted in catalog-only responses. Present as an array, including `[]`, when `query` is provided. Values are a bounded, non-exhaustive sample in search-provider order and may include duplicates; blank values are omitted. No additional endpoint-specific truncation is applied. Grouping in the search UI is not preserved; each value applies to the field broadly. An empty array does not mean no valid value exists. Availability varies by data source; federated and MCP integrations may return page-derived values or none at all. Reusing a suggested value in `POST /api/search` does not guarantee matching results or identical filter behavior. For `USER` fields, values may be email addresses or display names.
| | \ No newline at end of file diff --git a/docs/models/components/platformfilteroperator.md b/docs/models/components/platformfilteroperator.md index ce944be95..38c3adcaa 100644 --- a/docs/models/components/platformfilteroperator.md +++ b/docs/models/components/platformfilteroperator.md @@ -8,10 +8,12 @@ Supported filter operator. import { PlatformFilterOperator } from "@gleanwork/api-client/models/components"; let value: PlatformFilterOperator = "LT"; + +// Open enum: unrecognized values are captured as Unrecognized ``` ## Values ```typescript -"EQUALS" | "NOT_EQUALS" | "GT" | "GTE" | "LT" | "LTE" +"EQUALS" | "NOT_EQUALS" | "GT" | "GTE" | "LT" | "LTE" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/components/platformresult.md b/docs/models/components/platformresult.md index b6adfbdb2..1d44baa1e 100644 --- a/docs/models/components/platformresult.md +++ b/docs/models/components/platformresult.md @@ -12,7 +12,6 @@ let value: PlatformResult = { "The platform team will focus on API stability and...", ], datasource: "confluence", - datasource_instance: "confluence_acme", document_type: "page", }; ``` @@ -25,7 +24,6 @@ let value: PlatformResult = { | `title` | *string* | :heavy_check_mark: | Result title. | Q2 2026 Platform Roadmap | | `snippets` | *string*[] | :heavy_minus_sign: | Query-relevant plain-text excerpts from the result body. | [
"The platform team will focus on API stability and..."
] | | `datasource` | *string* | :heavy_check_mark: | The datasource this result originates from. | confluence | -| `datasourceInstance` | *string* | :heavy_minus_sign: | The datasource instance this result originates from, if known. | confluence_acme | | `documentType` | *string* | :heavy_minus_sign: | The document type within the datasource. | page | | `creator` | [components.PlatformPersonReference](../../models/components/platformpersonreference.md) | :heavy_minus_sign: | A lightweight reference to a person, used where a payload merely points at someone. | | | `owner` | [components.PlatformPersonReference](../../models/components/platformpersonreference.md) | :heavy_minus_sign: | A lightweight reference to a person, used where a payload merely points at someone. | | diff --git a/docs/models/components/platformsearchfiltersresponse.md b/docs/models/components/platformsearchfiltersresponse.md new file mode 100644 index 000000000..cc6c059e7 --- /dev/null +++ b/docs/models/components/platformsearchfiltersresponse.md @@ -0,0 +1,19 @@ +# PlatformSearchFiltersResponse + +## Example Usage + +```typescript +import { PlatformSearchFiltersResponse } from "@gleanwork/api-client/models/components"; + +let value: PlatformSearchFiltersResponse = { + datasources: [], + request_id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `datasources` | [components.PlatformDatasourceFilterInfo](../../models/components/platformdatasourcefilterinfo.md)[] | :heavy_check_mark: | Datasources visible to the authenticated user. Each `datasource` is an identifier you can pass to `POST /api/search` `datasources`. An empty array means no visible datasources.
| +| `requestId` | *string* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/models/components/platformsearchrequest.md b/docs/models/components/platformsearchrequest.md index 64e6b9aaf..0f34f62e5 100644 --- a/docs/models/components/platformsearchrequest.md +++ b/docs/models/components/platformsearchrequest.md @@ -25,12 +25,11 @@ let value: PlatformSearchRequest = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `query` | *string* | :heavy_check_mark: | The search query string. Supports inline operators such as `from:jane type:document app:confluence`. Inline operators are AND'd with structured `filters`.
| -| `pageSize` | *number* | :heavy_minus_sign: | Number of results to return per page. | -| `cursor` | *string* | :heavy_minus_sign: | Opaque pagination token from a previous response's `next_cursor` field. Omit on the first request.
| -| `datasources` | *string*[] | :heavy_minus_sign: | Restrict results to specific datasources. Requests must not specify both `datasources` and `datasource_instances`.
| -| `datasourceInstances` | *string*[] | :heavy_minus_sign: | Restrict results to specific datasource instances. Values are datasource instance identifiers returned by `GET /api/search/filters`. Requests must not specify both `datasources` and `datasource_instances`.
| -| `filters` | [components.PlatformFilter](../../models/components/platformfilter.md)[] | :heavy_minus_sign: | Structured filters applied to search results. Equality operators OR multiple values within a filter. Multiple filters are AND'd together, including range filters on the same field. Filters are AND'd with any inline operators in `query`. Note that conflicting constraints on the same field (e.g., `type:document` in the query and `type: spreadsheet` in a filter) produce an empty result set.
| -| `timeRange` | [components.PlatformTimeRange](../../models/components/platformtimerange.md) | :heavy_minus_sign: | Filter results to those last updated within this range. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `query` | *string* | :heavy_check_mark: | The search query string. Supports inline operators such as `from:jane type:document app:confluence`. Inline operators are AND'd with structured `filters`.
| +| `pageSize` | *number* | :heavy_minus_sign: | Number of results to return per page. | +| `cursor` | *string* | :heavy_minus_sign: | Opaque pagination token from a previous response's `next_cursor` field. Omit on the first request.
| +| `datasources` | *string*[] | :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.
| +| `filters` | [components.PlatformFilter](../../models/components/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.
| +| `timeRange` | [components.PlatformTimeRange](../../models/components/platformtimerange.md) | :heavy_minus_sign: | Filter results to those last updated within this range. | \ No newline at end of file diff --git a/docs/models/components/platformsearchresponse.md b/docs/models/components/platformsearchresponse.md index 404fa57a3..2f502d60a 100644 --- a/docs/models/components/platformsearchresponse.md +++ b/docs/models/components/platformsearchresponse.md @@ -10,14 +10,16 @@ let value: PlatformSearchResponse = { has_more: true, next_cursor: "", request_id: "", + warnings: [], }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `results` | [components.PlatformResult](../../models/components/platformresult.md)[] | :heavy_check_mark: | Ordered list of search results. | -| `hasMore` | *boolean* | :heavy_check_mark: | Indicates whether additional pages of results are available. | -| `nextCursor` | *string* | :heavy_check_mark: | Opaque token to pass as `cursor` in the next request. | -| `requestId` | *string* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `results` | [components.PlatformResult](../../models/components/platformresult.md)[] | :heavy_check_mark: | Ordered list of ranked document results. People cards, Q&A blocks, and other UI-only result types are not included.
| +| `hasMore` | *boolean* | :heavy_check_mark: | Indicates whether additional pages of results are available. | +| `nextCursor` | *string* | :heavy_check_mark: | Opaque token to pass as `cursor` in the next request. | +| `requestId` | *string* | :heavy_check_mark: | Platform-generated request ID for support correlation. | +| `warnings` | [components.PlatformWarning](../../models/components/platformwarning.md)[] | :heavy_check_mark: | Non-blocking warnings for this response. Required; use `[]` when there are none. Clients must tolerate unknown warning codes. `results_incomplete` means some results may be unavailable for the requested datasource scope while `results`, `has_more`, and `next_cursor` remain present. Warning messages are generic and do not include query text or internal identifiers.
| \ No newline at end of file diff --git a/docs/models/components/platformskillupdaterequest.md b/docs/models/components/platformskillupdaterequest.md new file mode 100644 index 000000000..9d89f5e3a --- /dev/null +++ b/docs/models/components/platformskillupdaterequest.md @@ -0,0 +1,17 @@ +# PlatformSkillUpdateRequest + +## Example Usage + +```typescript +import { PlatformSkillUpdateRequest } from "@gleanwork/api-client/models/components"; + +let value: PlatformSkillUpdateRequest = { + status: "DISABLED", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `status` | [components.PlatformSkillUpdateStatus](../../models/components/platformskillupdatestatus.md) | :heavy_check_mark: | New status for the skill. | \ No newline at end of file diff --git a/docs/models/components/platformskillupdateresponse.md b/docs/models/components/platformskillupdateresponse.md new file mode 100644 index 000000000..7d5b92069 --- /dev/null +++ b/docs/models/components/platformskillupdateresponse.md @@ -0,0 +1,32 @@ +# PlatformSkillUpdateResponse + +## Example Usage + +```typescript +import { PlatformSkillUpdateResponse } from "@gleanwork/api-client/models/components"; + +let value: PlatformSkillUpdateResponse = { + skill: { + id: "", + display_name: "Kian.Klein18", + description: "per whereas indeed than devise oh", + latest_version: 33911, + latest_minor_version: 977646, + status: "ENABLED", + origin: "CUSTOM", + owner: { + name: "", + }, + created_at: new Date("2025-10-31T03:35:54.354Z"), + updated_at: new Date("2025-01-03T15:10:34.800Z"), + }, + request_id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `skill` | [components.PlatformSkill](../../models/components/platformskill.md) | :heavy_check_mark: | N/A | +| `requestId` | *string* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/models/components/platformskillupdatestatus.md b/docs/models/components/platformskillupdatestatus.md new file mode 100644 index 000000000..d40abfe8e --- /dev/null +++ b/docs/models/components/platformskillupdatestatus.md @@ -0,0 +1,17 @@ +# PlatformSkillUpdateStatus + +New status for the skill. + +## Example Usage + +```typescript +import { PlatformSkillUpdateStatus } from "@gleanwork/api-client/models/components"; + +let value: PlatformSkillUpdateStatus = "ENABLED"; +``` + +## Values + +```typescript +"ENABLED" | "DISABLED" +``` \ No newline at end of file diff --git a/docs/models/components/platformskillvalidationresponse.md b/docs/models/components/platformskillvalidationresponse.md index 953912739..0d68c62f8 100644 --- a/docs/models/components/platformskillvalidationresponse.md +++ b/docs/models/components/platformskillvalidationresponse.md @@ -28,5 +28,5 @@ let value: PlatformSkillValidationResponse = { | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | | `metadata` | [components.PlatformSkillValidationMetadata](../../models/components/platformskillvalidationmetadata.md) | :heavy_check_mark: | N/A | | `files` | [components.PlatformSkillValidationFile](../../models/components/platformskillvalidationfile.md)[] | :heavy_check_mark: | Normalized files in the bundle after stripping an optional single root folder. | -| `warnings` | [components.PlatformSkillValidationWarning](../../models/components/platformskillvalidationwarning.md)[] | :heavy_check_mark: | Non-blocking validation warnings. | +| `warnings` | [components.PlatformWarning](../../models/components/platformwarning.md)[] | :heavy_check_mark: | Non-blocking validation warnings. | | `requestId` | *string* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/models/components/platformskillvalidationwarning.md b/docs/models/components/platformskillvalidationwarning.md deleted file mode 100644 index 4bf12c9c6..000000000 --- a/docs/models/components/platformskillvalidationwarning.md +++ /dev/null @@ -1,19 +0,0 @@ -# PlatformSkillValidationWarning - -## Example Usage - -```typescript -import { PlatformSkillValidationWarning } from "@gleanwork/api-client/models/components"; - -let value: PlatformSkillValidationWarning = { - code: "", - message: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *string* | :heavy_check_mark: | Stable warning code. | -| `message` | *string* | :heavy_check_mark: | Human-readable warning message. | \ No newline at end of file diff --git a/docs/models/components/platformwarning.md b/docs/models/components/platformwarning.md new file mode 100644 index 000000000..952b64fc7 --- /dev/null +++ b/docs/models/components/platformwarning.md @@ -0,0 +1,21 @@ +# PlatformWarning + +Non-blocking warning attached to a successful Platform response. + +## Example Usage + +```typescript +import { PlatformWarning } from "@gleanwork/api-client/models/components"; + +let value: PlatformWarning = { + code: "results_incomplete", + message: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `code` | *string* | :heavy_check_mark: | Open snake_case warning code. Clients must tolerate unknown values; the set of codes is not a closed enum.
| results_incomplete | +| `message` | *string* | :heavy_check_mark: | Human-readable warning message. | | \ No newline at end of file diff --git a/docs/models/operations/platformsearchfiltersrequest.md b/docs/models/operations/platformsearchfiltersrequest.md new file mode 100644 index 000000000..55f49edc9 --- /dev/null +++ b/docs/models/operations/platformsearchfiltersrequest.md @@ -0,0 +1,16 @@ +# PlatformSearchFiltersRequest + +## Example Usage + +```typescript +import { PlatformSearchFiltersRequest } from "@gleanwork/api-client/models/operations"; + +let value: PlatformSearchFiltersRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `datasources` | *string*[] | :heavy_minus_sign: | Restrict metadata to one or more datasource identifiers as returned by this endpoint (for example, `jira`). With a nonblank `query`, exactly one datasource is required. Unknown or inaccessible identifiers return `invalid_datasource`.
| +| `query` | *string* | :heavy_minus_sign: | Optional search query that requests suggested filter values for the selected datasource. Must be nonblank when present. Triggers a search for facet values only; does not return documents.
| \ No newline at end of file diff --git a/docs/models/operations/platformsearchfiltersresponse.md b/docs/models/operations/platformsearchfiltersresponse.md new file mode 100644 index 000000000..b632d8d11 --- /dev/null +++ b/docs/models/operations/platformsearchfiltersresponse.md @@ -0,0 +1,26 @@ +# PlatformSearchFiltersResponse + +## Example Usage + +```typescript +import { PlatformSearchFiltersResponse } from "@gleanwork/api-client/models/operations"; + +let value: PlatformSearchFiltersResponse = { + Headers: { + "key": [ + "", + ], + }, + result: { + datasources: [], + request_id: "", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | [components.PlatformSearchFiltersResponse](../../models/components/platformsearchfiltersresponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/platformskillsupdaterequest.md b/docs/models/operations/platformskillsupdaterequest.md new file mode 100644 index 000000000..774077210 --- /dev/null +++ b/docs/models/operations/platformskillsupdaterequest.md @@ -0,0 +1,21 @@ +# PlatformSkillsUpdateRequest + +## Example Usage + +```typescript +import { PlatformSkillsUpdateRequest } from "@gleanwork/api-client/models/operations"; + +let value: PlatformSkillsUpdateRequest = { + skill_id: "", + platformSkillUpdateRequest: { + status: "ENABLED", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `skillId` | *string* | :heavy_check_mark: | Glean skill ID. | +| `platformSkillUpdateRequest` | [components.PlatformSkillUpdateRequest](../../models/components/platformskillupdaterequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md index 233dcbff8..2c29a709d 100644 --- a/docs/sdks/search/README.md +++ b/docs/sdks/search/README.md @@ -5,10 +5,12 @@ ### Available Operations * [query](#query) - Search +* [listFilters](#listfilters) - List search filters ## query -Execute a search query and retrieve ranked results. This is the data retrieval variant of the search API and returns only results and pagination state. +Search your organization's connected content and return ranked document results with cursor pagination. Use `GET /api/search/filters` to discover datasource identifiers and common filter fields. Built-in filter names are validated; other field names are accepted as custom filters and behavior depends on your Glean configuration and connected sources. +Errors: HTTP 422 `unprocessable_query` returns no `results` or `next_cursor`. See `warnings` on the response for non-blocking issues such as partially available results. Not every query issue produces a warning or error. ### Example Usage @@ -119,8 +121,110 @@ import { ### 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 | \*/\* | + +## listFilters + +List datasources and common built-in filter fields visible to the authenticated user. This is a best-effort catalog, not an exhaustive list of every filter search accepts. +Without `query`, returns field metadata only and does not run a search. With a nonblank `query`, provide exactly one `datasources` value to request suggested filter values for that query; no documents are returned and this endpoint does not include warning objects. See `FilterFieldInfo.values` for limitations on suggested values. Rate-limited requests return HTTP 429 with `Retry-After`; temporary backend unavailability returns HTTP 503. + + +### Example Usage + + +```typescript +import { Glean } from "@gleanwork/api-client"; + +const glean = new Glean({ + apiToken: process.env["GLEAN_API_TOKEN"] ?? "", +}); + +async function run() { + const result = await glean.search.listFilters(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { GleanCore } from "@gleanwork/api-client/core.js"; +import { searchListFilters } from "@gleanwork/api-client/funcs/searchListFilters.js"; + +// Use `GleanCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const glean = new GleanCore({ + apiToken: process.env["GLEAN_API_TOKEN"] ?? "", +}); + +async function run() { + const res = await searchListFilters(glean); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("searchListFilters failed:", res.error); + } +} + +run(); +``` + +### React hooks and utilities + +This method can be used in React components through the following hooks and +associated utilities. + +> Check out [this guide][hook-guide] for information about each of the utilities +> below and how to get started using React hooks. + +[hook-guide]: ../../../REACT_QUERY.md + +```tsx +import { + // Query hooks for fetching data. + useSearchListFilters, + useSearchListFiltersSuspense, + + // Utility for prefetching data during server-side rendering and in React + // Server Components that will be immediately available to client components + // using the hooks. + prefetchSearchListFilters, + + // Utilities to invalidate the query cache for this query in response to + // mutations and other user actions. + invalidateSearchListFilters, + invalidateAllSearchListFilters, +} from "@gleanwork/api-client/react-query/searchListFilters.js"; +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `datasources` | *string*[] | :heavy_minus_sign: | Restrict metadata to one or more datasource identifiers as returned by this endpoint (for example, `jira`). With a nonblank `query`, exactly one datasource is required. Unknown or inaccessible identifiers return `invalid_datasource`.
| +| `query` | *string* | :heavy_minus_sign: | Optional search query that requests suggested filter values for the selected datasource. Must be nonblank when present. Triggers a search for facet values only; does not return documents.
| +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.PlatformSearchFiltersResponse](../../models/operations/platformsearchfiltersresponse.md)\>** + +### Errors + | Error Type | Status Code | Content Type | | --------------------------------- | --------------------------------- | --------------------------------- | -| errors.PlatformProblemDetailError | 400, 401, 403, 404, 408, 413, 429 | application/problem+json | +| errors.PlatformProblemDetailError | 400, 401, 403, 404, 408, 429 | application/problem+json | | errors.PlatformProblemDetailError | 500, 503 | application/problem+json | | errors.GleanError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/skills/README.md b/docs/sdks/skills/README.md index 53e832440..e4af1510a 100644 --- a/docs/sdks/skills/README.md +++ b/docs/sdks/skills/README.md @@ -7,6 +7,7 @@ * [create](#create) - Create skill * [list](#list) - List skills * [validate](#validate) - Validate skill bundle +* [update](#update) - Update skill * [retrieve](#retrieve) - Retrieve skill * [retrieveContent](#retrievecontent) - Download skill content * [createVersion](#createversion) - Create skill version @@ -305,6 +306,100 @@ import { | errors.PlatformProblemDetailError | 500, 503 | application/problem+json | | errors.GleanError | 4XX, 5XX | \*/\* | +## update + +Update mutable metadata for a skill. V1 supports enabling or disabling a skill without changing its content. + + +### Example Usage + + +```typescript +import { Glean } from "@gleanwork/api-client"; + +const glean = new Glean({ + apiToken: process.env["GLEAN_API_TOKEN"] ?? "", +}); + +async function run() { + const result = await glean.skills.update({ + status: "DISABLED", + }, ""); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { GleanCore } from "@gleanwork/api-client/core.js"; +import { skillsUpdate } from "@gleanwork/api-client/funcs/skillsUpdate.js"; + +// Use `GleanCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const glean = new GleanCore({ + apiToken: process.env["GLEAN_API_TOKEN"] ?? "", +}); + +async function run() { + const res = await skillsUpdate(glean, { + status: "DISABLED", + }, ""); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("skillsUpdate failed:", res.error); + } +} + +run(); +``` + +### React hooks and utilities + +This method can be used in React components through the following hooks and +associated utilities. + +> Check out [this guide][hook-guide] for information about each of the utilities +> below and how to get started using React hooks. + +[hook-guide]: ../../../REACT_QUERY.md + +```tsx +import { + // Mutation hook for triggering the API call. + useSkillsUpdateMutation +} from "@gleanwork/api-client/react-query/skillsUpdate.js"; +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `skillId` | *string* | :heavy_check_mark: | Glean skill ID. | +| `platformSkillUpdateRequest` | [components.PlatformSkillUpdateRequest](../../models/components/platformskillupdaterequest.md) | :heavy_check_mark: | N/A | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.PlatformSkillUpdateResponse](../../models/components/platformskillupdateresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| errors.PlatformProblemDetailError | 400, 401, 403, 404, 408, 409, 413, 429 | application/problem+json | +| errors.PlatformProblemDetailError | 500, 503 | application/problem+json | +| errors.GleanError | 4XX, 5XX | \*/\* | + ## retrieve Retrieve metadata for a skill available to the authenticated user. diff --git a/examples/package-lock.json b/examples/package-lock.json index 17896732d..401e001e3 100644 --- a/examples/package-lock.json +++ b/examples/package-lock.json @@ -18,7 +18,7 @@ }, "..": { "name": "@gleanwork/api-client", - "version": "0.18.0", + "version": "0.18.1", "dependencies": { "zod": "^3.25.0 || ^4.0.0" }, diff --git a/jsr.json b/jsr.json index 8b5402c97..6252229ac 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@gleanwork/api-client", - "version": "0.18.0", + "version": "0.18.1", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index 016a169a2..8854c02ff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@gleanwork/api-client", - "version": "0.18.0", + "version": "0.18.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@gleanwork/api-client", - "version": "0.18.0", + "version": "0.18.1", "dependencies": { "zod": "^3.25.0 || ^4.0.0" }, diff --git a/package.json b/package.json index 6f0ccb839..1aa7344f7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gleanwork/api-client", - "version": "0.18.0", + "version": "0.18.1", "author": "Speakeasy", "tshy": { "sourceDialects": [ diff --git a/src/__tests__/messages.test.ts b/src/__tests__/messages.test.ts index 41c0b3c93..01382f0c4 100644 --- a/src/__tests__/messages.test.ts +++ b/src/__tests__/messages.test.ts @@ -20,7 +20,7 @@ test("Messages Messages", async () => { idType: "CONVERSATION_ID", id: "", timestampMillis: 558834, - datasource: "GCHAT", + datasource: "SLACKENTGRID", }); expect(result).toBeDefined(); }); diff --git a/src/__tests__/mockserver/internal/handler/generated_handlers.go b/src/__tests__/mockserver/internal/handler/generated_handlers.go index 6d7e94030..0c3bacf90 100644 --- a/src/__tests__/mockserver/internal/handler/generated_handlers.go +++ b/src/__tests__/mockserver/internal/handler/generated_handlers.go @@ -17,6 +17,7 @@ func GeneratedHandlers(ctx context.Context, dir *logging.HTTPFileDirectory, rt * NewGeneratedHandler(ctx, http.MethodDelete, "/rest/api/index/document/{docId}/custom-metadata/{groupName}", pathDeleteRestAPIIndexDocumentDocIDCustomMetadataGroupName(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/api/agents/{agent_id}", pathGetAPIAgentsAgentID(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/api/agents/{agent_id}/schemas", pathGetAPIAgentsAgentIDSchemas(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/api/search/filters", pathGetAPISearchFilters(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/api/skills", pathGetAPISkills(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/api/skills/{skill_id}", pathGetAPISkillsSkillID(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/api/skills/{skill_id}/content", pathGetAPISkillsSkillIDContent(dir, rt)), @@ -36,6 +37,7 @@ func GeneratedHandlers(ctx context.Context, dir *logging.HTTPFileDirectory, rt * NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/people/{person_id}/photo", pathGetRestAPIV1PeoplePersonIDPhoto(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/tool-servers/{serverId}/auth", pathGetRestAPIV1ToolServersServerIDAuth(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/tools/list", pathGetRestAPIV1ToolsList(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPatch, "/api/skills/{skill_id}", pathPatchAPISkillsSkillID(dir, rt)), NewGeneratedHandler(ctx, http.MethodPatch, "/rest/api/v1/configure/datasources/{datasourceId}/instances/{instanceId}", pathPatchRestAPIV1ConfigureDatasourcesDatasourceIDInstancesInstanceID(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/api/agents/search", pathPostAPIAgentsSearch(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/api/agents/{agent_id}/runs", pathPostAPIAgentsAgentIDRuns(dir, rt)), diff --git a/src/__tests__/mockserver/internal/handler/pathgetapisearchfilters.go b/src/__tests__/mockserver/internal/handler/pathgetapisearchfilters.go new file mode 100644 index 000000000..bdc179fdf --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetapisearchfilters.go @@ -0,0 +1,66 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 6661dbd9dd78 + +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 pathGetAPISearchFilters(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-filters[0]": + dir.HandlerFunc("platform-search-filters", testPlatformSearchFiltersPlatformSearchFilters0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPlatformSearchFiltersPlatformSearchFilters0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + var respBody *components.PlatformSearchFiltersResponse = &components.PlatformSearchFiltersResponse{ + Datasources: []components.PlatformDatasourceFilterInfo{}, + 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/src/__tests__/mockserver/internal/handler/pathpatchapiskillsskillid.go b/src/__tests__/mockserver/internal/handler/pathpatchapiskillsskillid.go new file mode 100644 index 000000000..b34f7bb79 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpatchapiskillsskillid.go @@ -0,0 +1,85 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 280e3c3128d3 + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPatchAPISkillsSkillID(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-skills-update[0]": + dir.HandlerFunc("platform-skills-update", testPlatformSkillsUpdatePlatformSkillsUpdate0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPlatformSkillsUpdatePlatformSkillsUpdate0(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.PlatformSkillUpdateResponse = &components.PlatformSkillUpdateResponse{ + Skill: components.PlatformSkill{ + ID: "", + DisplayName: "Afton14", + Description: "taut netsuke duh sonata boastfully elegantly management come", + LatestVersion: 425795, + LatestMinorVersion: 741364, + Status: components.PlatformSkillStatusDisabled, + Origin: components.PlatformSkillOriginCustom, + Owner: components.PlatformPersonReference{ + Name: "", + }, + CreatedAt: types.MustTimeFromString("2024-12-20T01:31:39.364Z"), + UpdatedAt: types.MustTimeFromString("2025-12-04T02:59:37.124Z"), + }, + 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/src/__tests__/mockserver/internal/handler/pathpostapisearch.go b/src/__tests__/mockserver/internal/handler/pathpostapisearch.go index 9baa62914..eec216ead 100644 --- a/src/__tests__/mockserver/internal/handler/pathpostapisearch.go +++ b/src/__tests__/mockserver/internal/handler/pathpostapisearch.go @@ -57,6 +57,7 @@ func testPlatformSearchPlatformSearch0(w http.ResponseWriter, req *http.Request) HasMore: false, NextCursor: types.String(""), RequestID: "", + Warnings: []components.PlatformWarning{}, } respBodyBytes, err := utils.MarshalJSON(respBody, "", true) diff --git a/src/__tests__/mockserver/internal/handler/pathpostapiskillsvalidation.go b/src/__tests__/mockserver/internal/handler/pathpostapiskillsvalidation.go index 20d53bc57..a610cb5bf 100644 --- a/src/__tests__/mockserver/internal/handler/pathpostapiskillsvalidation.go +++ b/src/__tests__/mockserver/internal/handler/pathpostapiskillsvalidation.go @@ -57,7 +57,7 @@ func testPlatformSkillsValidatePlatformSkillsValidate0(w http.ResponseWriter, re Description: "overburden actual impact", }, Files: []components.PlatformSkillValidationFile{}, - Warnings: []components.PlatformSkillValidationWarning{}, + Warnings: []components.PlatformWarning{}, RequestID: "", } respBodyBytes, err := utils.MarshalJSON(respBody, "", true) diff --git a/src/__tests__/mockserver/internal/handler/pathpostrestapiv1getchat.go b/src/__tests__/mockserver/internal/handler/pathpostrestapiv1getchat.go index e2243868c..a7e16d16b 100644 --- a/src/__tests__/mockserver/internal/handler/pathpostrestapiv1getchat.go +++ b/src/__tests__/mockserver/internal/handler/pathpostrestapiv1getchat.go @@ -629,8 +629,8 @@ func testGetchatGetchat0(w http.ResponseWriter, req *http.Request) { Roles: []components.UserRoleSpecification{}, SourceDocumentSpec: types.Pointer(components.CreateDocumentSpecUnionDocumentSpec3( components.DocumentSpec3{ - UgcType: components.DocumentSpecUgcType1Shortcuts, - ContentID: 602763, + UgcType: components.DocumentSpecUgcType1Announcements, + ContentID: 848009, }, )), SourceType: components.AnswerSourceTypeAssistant.ToPointer(), diff --git a/src/__tests__/mockserver/internal/sdk/models/components/customdatasourceconfig.go b/src/__tests__/mockserver/internal/sdk/models/components/customdatasourceconfig.go index d878d105b..9b400d062 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/customdatasourceconfig.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/customdatasourceconfig.go @@ -31,6 +31,8 @@ const ( DatasourceCategoryEntity DatasourceCategory = "ENTITY" DatasourceCategoryCalendar DatasourceCategory = "CALENDAR" DatasourceCategoryAgents DatasourceCategory = "AGENTS" + DatasourceCategoryAiConversation DatasourceCategory = "AI_CONVERSATION" + DatasourceCategoryAiArtifact DatasourceCategory = "AI_ARTIFACT" ) func (e DatasourceCategory) ToPointer() *DatasourceCategory { @@ -77,6 +79,10 @@ func (e *DatasourceCategory) UnmarshalJSON(data []byte) error { case "CALENDAR": fallthrough case "AGENTS": + fallthrough + case "AI_CONVERSATION": + fallthrough + case "AI_ARTIFACT": *e = DatasourceCategory(v) return nil default: diff --git a/src/__tests__/mockserver/internal/sdk/models/components/objectdefinition.go b/src/__tests__/mockserver/internal/sdk/models/components/objectdefinition.go index 92608363c..515895049 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/objectdefinition.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/objectdefinition.go @@ -30,6 +30,8 @@ const ( DocCategoryEntity DocCategory = "ENTITY" DocCategoryCalendar DocCategory = "CALENDAR" DocCategoryAgents DocCategory = "AGENTS" + DocCategoryAiConversation DocCategory = "AI_CONVERSATION" + DocCategoryAiArtifact DocCategory = "AI_ARTIFACT" ) func (e DocCategory) ToPointer() *DocCategory { @@ -76,6 +78,10 @@ func (e *DocCategory) UnmarshalJSON(data []byte) error { case "CALENDAR": fallthrough case "AGENTS": + fallthrough + case "AI_CONVERSATION": + fallthrough + case "AI_ARTIFACT": *e = DocCategory(v) return nil default: diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformdatasourcefilterinfo.go b/src/__tests__/mockserver/internal/sdk/models/components/platformdatasourcefilterinfo.go new file mode 100644 index 000000000..73410740e --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformdatasourcefilterinfo.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: c443191c9b7d + +package components + +type PlatformDatasourceFilterInfo struct { + // Datasource identifier usable in `POST /api/search` `datasources`. + // + Datasource string `json:"datasource"` + // Common built-in filter fields for this datasource. May be empty. A built-in omitted here can still be valid in `POST /api/search`; see `Filter.field` for the full built-in name list. + // + Filters []PlatformFilterFieldInfo `json:"filters"` +} + +func (o *PlatformDatasourceFilterInfo) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} + +func (o *PlatformDatasourceFilterInfo) GetFilters() []PlatformFilterFieldInfo { + if o == nil { + return []PlatformFilterFieldInfo{} + } + return o.Filters +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformfilter.go b/src/__tests__/mockserver/internal/sdk/models/components/platformfilter.go index 7e8a8259e..4d35a0f79 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/platformfilter.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformfilter.go @@ -3,14 +3,15 @@ package components -// PlatformFilter - A single filter criterion. For `EQUALS`, multiple values within a filter are OR'd. For `NOT_EQUALS`, multiple values exclude all listed values. Filters are AND'd with each other and with any inline query operators. +// PlatformFilter - A single filter criterion. For `EQUALS`, multiple values within a filter are OR'd; for `NOT_EQUALS`, listed values are excluded. Separate filters are AND'd with each other and with inline operators in `query`. Repeated same-field `EQUALS` filters are rejected. type PlatformFilter struct { - // The field to filter on. Accepts built-in filter field names such as `type`, `owner`, `from`, `author`, `channel`, `status`, `assignee`, `reporter`, `component`, `mentions`, and `collection`, plus custom datasource property names. + // Filter field name. Built-in names (case-sensitive, lowercase only): `type`, `owner`, `from`, `author`, `channel`, `status`, `assignee`, `reporter`, `component`, `mentions`, and `collection`. Built-ins accept only `EQUALS` and `NOT_EQUALS`. Any other nonblank name is accepted as a custom filter without spelling, existence, or type checks; behavior depends on your connected sources. // Field string `json:"field"` - // One or more values to match. + // One or more values to match. Prefer values returned by filter discovery unchanged. For people (`USER`) fields, values may be email addresses or display names. + // Values []string `json:"values"` - // Comparison operator to apply to this filter. Defaults to `EQUALS`. `GT`, `GTE`, `LT`, and `LTE` range operators require exactly one value; express bounded ranges with multiple filters on the same field. + // Comparison operator. Defaults to `EQUALS`. Built-in fields support only `EQUALS` and `NOT_EQUALS`. Range operators (`GT`, `GTE`, `LT`, `LTE`) require exactly one value; express ranges with multiple filters on the same field. Custom fields may support different operators depending on the data source. // Operator *PlatformFilterOperator `json:"operator,omitempty"` } diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformfilterfieldinfo.go b/src/__tests__/mockserver/internal/sdk/models/components/platformfilterfieldinfo.go new file mode 100644 index 000000000..666d21225 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformfilterfieldinfo.go @@ -0,0 +1,46 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 25a345f68b1d + +package components + +type PlatformFilterFieldInfo struct { + // Field name usable in the `filters` array for `POST /api/search`. + Field string `json:"field"` + // Open field-type string. Current values are `STRING` for text and keyword fields and `USER` for people fields (`owner`, `from`, `author`, `assignee`, `reporter`, `mentions`). Clients must tolerate unknown values. + // + Type string `json:"type"` + // Comparison operators supported for this field. Built-in fields expose `EQUALS` and `NOT_EQUALS`. + // + Operators []PlatformFilterOperator `json:"operators"` + // Suggested filter values observed for the supplied `query`. Omitted in catalog-only responses. Present as an array, including `[]`, when `query` is provided. Values are a bounded, non-exhaustive sample in search-provider order and may include duplicates; blank values are omitted. No additional endpoint-specific truncation is applied. Grouping in the search UI is not preserved; each value applies to the field broadly. An empty array does not mean no valid value exists. Availability varies by data source; federated and MCP integrations may return page-derived values or none at all. Reusing a suggested value in `POST /api/search` does not guarantee matching results or identical filter behavior. For `USER` fields, values may be email addresses or display names. + // + Values []string `json:"values,omitempty"` +} + +func (o *PlatformFilterFieldInfo) GetField() string { + if o == nil { + return "" + } + return o.Field +} + +func (o *PlatformFilterFieldInfo) GetType() string { + if o == nil { + return "" + } + return o.Type +} + +func (o *PlatformFilterFieldInfo) GetOperators() []PlatformFilterOperator { + if o == nil { + return []PlatformFilterOperator{} + } + return o.Operators +} + +func (o *PlatformFilterFieldInfo) GetValues() []string { + if o == nil { + return nil + } + return o.Values +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformresult.go b/src/__tests__/mockserver/internal/sdk/models/components/platformresult.go index 891cc5f53..5c1a2ba33 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/platformresult.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformresult.go @@ -18,8 +18,6 @@ type PlatformResult struct { Snippets []string `json:"snippets,omitempty"` // The datasource this result originates from. Datasource string `json:"datasource"` - // The datasource instance this result originates from, if known. - DatasourceInstance optionalnullable.OptionalNullable[string] `json:"datasource_instance,omitempty"` // 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. @@ -71,13 +69,6 @@ func (o *PlatformResult) GetDatasource() string { return o.Datasource } -func (o *PlatformResult) GetDatasourceInstance() optionalnullable.OptionalNullable[string] { - if o == nil { - return nil - } - return o.DatasourceInstance -} - func (o *PlatformResult) GetDocumentType() optionalnullable.OptionalNullable[string] { if o == nil { return nil diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformsearchfiltersresponse.go b/src/__tests__/mockserver/internal/sdk/models/components/platformsearchfiltersresponse.go new file mode 100644 index 000000000..6df27c854 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformsearchfiltersresponse.go @@ -0,0 +1,26 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: f7cfacf23cce + +package components + +type PlatformSearchFiltersResponse struct { + // Datasources visible to the authenticated user. Each `datasource` is an identifier you can pass to `POST /api/search` `datasources`. An empty array means no visible datasources. + // + Datasources []PlatformDatasourceFilterInfo `json:"datasources"` + // Platform-generated request ID for support correlation. + RequestID string `json:"request_id"` +} + +func (o *PlatformSearchFiltersResponse) GetDatasources() []PlatformDatasourceFilterInfo { + if o == nil { + return []PlatformDatasourceFilterInfo{} + } + return o.Datasources +} + +func (o *PlatformSearchFiltersResponse) GetRequestID() string { + if o == nil { + return "" + } + return o.RequestID +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformsearchrequest.go b/src/__tests__/mockserver/internal/sdk/models/components/platformsearchrequest.go index 4b25d70d1..4dfa9fb24 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/platformsearchrequest.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformsearchrequest.go @@ -17,13 +17,10 @@ type PlatformSearchRequest struct { // Opaque pagination token from a previous response's `next_cursor` field. Omit on the first request. // Cursor optionalnullable.OptionalNullable[string] `json:"cursor,omitempty"` - // Restrict results to specific datasources. Requests must not specify both `datasources` and `datasource_instances`. + // 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. // Datasources []string `json:"datasources,omitempty"` - // Restrict results to specific datasource instances. Values are datasource instance identifiers returned by `GET /api/search/filters`. Requests must not specify both `datasources` and `datasource_instances`. - // - DatasourceInstances []string `json:"datasource_instances,omitempty"` - // Structured filters applied to search results. Equality operators OR multiple values within a filter. Multiple filters are AND'd together, including range filters on the same field. Filters are AND'd with any inline operators in `query`. Note that conflicting constraints on the same field (e.g., `type:document` in the query and `type: spreadsheet` in a filter) produce an empty result set. + // 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. @@ -69,13 +66,6 @@ func (o *PlatformSearchRequest) GetDatasources() []string { return o.Datasources } -func (o *PlatformSearchRequest) GetDatasourceInstances() []string { - if o == nil { - return nil - } - return o.DatasourceInstances -} - func (o *PlatformSearchRequest) GetFilters() []PlatformFilter { if o == nil { return nil diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformsearchresponse.go b/src/__tests__/mockserver/internal/sdk/models/components/platformsearchresponse.go index 95bffd73a..c488256d2 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/platformsearchresponse.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformsearchresponse.go @@ -4,7 +4,8 @@ package components type PlatformSearchResponse struct { - // Ordered list of search results. + // Ordered list of ranked document results. People cards, Q&A blocks, and other UI-only result types are not included. + // Results []PlatformResult `json:"results"` // Indicates whether additional pages of results are available. HasMore bool `json:"has_more"` @@ -12,6 +13,9 @@ type PlatformSearchResponse struct { NextCursor *string `json:"next_cursor"` // Platform-generated request ID for support correlation. RequestID string `json:"request_id"` + // Non-blocking warnings for this response. Required; use `[]` when there are none. Clients must tolerate unknown warning codes. `results_incomplete` means some results may be unavailable for the requested datasource scope while `results`, `has_more`, and `next_cursor` remain present. Warning messages are generic and do not include query text or internal identifiers. + // + Warnings []PlatformWarning `json:"warnings"` } func (o *PlatformSearchResponse) GetResults() []PlatformResult { @@ -41,3 +45,10 @@ func (o *PlatformSearchResponse) GetRequestID() string { } return o.RequestID } + +func (o *PlatformSearchResponse) GetWarnings() []PlatformWarning { + if o == nil { + return []PlatformWarning{} + } + return o.Warnings +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformskillupdaterequest.go b/src/__tests__/mockserver/internal/sdk/models/components/platformskillupdaterequest.go new file mode 100644 index 000000000..726954ccd --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformskillupdaterequest.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 73d62c51ad85 + +package components + +type PlatformSkillUpdateRequest struct { + // New status for the skill. + Status PlatformSkillUpdateStatus `json:"status"` +} + +func (o *PlatformSkillUpdateRequest) GetStatus() PlatformSkillUpdateStatus { + if o == nil { + return PlatformSkillUpdateStatus("") + } + return o.Status +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformskillupdateresponse.go b/src/__tests__/mockserver/internal/sdk/models/components/platformskillupdateresponse.go new file mode 100644 index 000000000..2ec354193 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformskillupdateresponse.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: a660e493e930 + +package components + +type PlatformSkillUpdateResponse struct { + Skill PlatformSkill `json:"skill"` + // Platform-generated request ID for support correlation. + RequestID string `json:"request_id"` +} + +func (o *PlatformSkillUpdateResponse) GetSkill() PlatformSkill { + if o == nil { + return PlatformSkill{} + } + return o.Skill +} + +func (o *PlatformSkillUpdateResponse) GetRequestID() string { + if o == nil { + return "" + } + return o.RequestID +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformskillupdatestatus.go b/src/__tests__/mockserver/internal/sdk/models/components/platformskillupdatestatus.go new file mode 100644 index 000000000..e1592a974 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformskillupdatestatus.go @@ -0,0 +1,36 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 9400da1298da + +package components + +import ( + "encoding/json" + "fmt" +) + +// PlatformSkillUpdateStatus - New status for the skill. +type PlatformSkillUpdateStatus string + +const ( + PlatformSkillUpdateStatusEnabled PlatformSkillUpdateStatus = "ENABLED" + PlatformSkillUpdateStatusDisabled PlatformSkillUpdateStatus = "DISABLED" +) + +func (e PlatformSkillUpdateStatus) ToPointer() *PlatformSkillUpdateStatus { + return &e +} +func (e *PlatformSkillUpdateStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ENABLED": + fallthrough + case "DISABLED": + *e = PlatformSkillUpdateStatus(v) + return nil + default: + return fmt.Errorf("invalid value for PlatformSkillUpdateStatus: %v", v) + } +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformskillvalidationresponse.go b/src/__tests__/mockserver/internal/sdk/models/components/platformskillvalidationresponse.go index 86d8b6841..0729b9f54 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/platformskillvalidationresponse.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformskillvalidationresponse.go @@ -8,7 +8,7 @@ type PlatformSkillValidationResponse struct { // Normalized files in the bundle after stripping an optional single root folder. Files []PlatformSkillValidationFile `json:"files"` // Non-blocking validation warnings. - Warnings []PlatformSkillValidationWarning `json:"warnings"` + Warnings []PlatformWarning `json:"warnings"` // Platform-generated request ID for support correlation. RequestID string `json:"request_id"` } @@ -27,9 +27,9 @@ func (o *PlatformSkillValidationResponse) GetFiles() []PlatformSkillValidationFi return o.Files } -func (o *PlatformSkillValidationResponse) GetWarnings() []PlatformSkillValidationWarning { +func (o *PlatformSkillValidationResponse) GetWarnings() []PlatformWarning { if o == nil { - return []PlatformSkillValidationWarning{} + return []PlatformWarning{} } return o.Warnings } diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformskillvalidationwarning.go b/src/__tests__/mockserver/internal/sdk/models/components/platformskillvalidationwarning.go deleted file mode 100644 index 76745cb0d..000000000 --- a/src/__tests__/mockserver/internal/sdk/models/components/platformskillvalidationwarning.go +++ /dev/null @@ -1,25 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. -// @generated-id: 03b68047dab7 - -package components - -type PlatformSkillValidationWarning struct { - // Stable warning code. - Code string `json:"code"` - // Human-readable warning message. - Message string `json:"message"` -} - -func (o *PlatformSkillValidationWarning) GetCode() string { - if o == nil { - return "" - } - return o.Code -} - -func (o *PlatformSkillValidationWarning) GetMessage() string { - if o == nil { - return "" - } - return o.Message -} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformwarning.go b/src/__tests__/mockserver/internal/sdk/models/components/platformwarning.go new file mode 100644 index 000000000..41086e7e6 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformwarning.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 47e6f65a8f0e + +package components + +// PlatformWarning - Non-blocking warning attached to a successful Platform response. +type PlatformWarning struct { + // Open snake_case warning code. Clients must tolerate unknown values; the set of codes is not a closed enum. + // + Code string `json:"code"` + // Human-readable warning message. + Message string `json:"message"` +} + +func (o *PlatformWarning) GetCode() string { + if o == nil { + return "" + } + return o.Code +} + +func (o *PlatformWarning) GetMessage() string { + if o == nil { + return "" + } + return o.Message +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/platformsearch.go b/src/__tests__/mockserver/internal/sdk/models/operations/platformsearch.go index 20b4d8b2e..ed8ec6f66 100644 --- a/src/__tests__/mockserver/internal/sdk/models/operations/platformsearch.go +++ b/src/__tests__/mockserver/internal/sdk/models/operations/platformsearch.go @@ -9,7 +9,7 @@ import ( type PlatformSearchResponse struct { HTTPMeta components.HTTPMetadata `json:"-"` - // Successful search. + // Successful response. PlatformSearchResponse *components.PlatformSearchResponse } diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/platformsearchfilters.go b/src/__tests__/mockserver/internal/sdk/models/operations/platformsearchfilters.go new file mode 100644 index 000000000..9f3bc5283 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/platformsearchfilters.go @@ -0,0 +1,59 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 7a1841a46be9 + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PlatformSearchFiltersRequest struct { + // Restrict metadata to one or more datasource identifiers as returned by this endpoint (for example, `jira`). With a nonblank `query`, exactly one datasource is required. Unknown or inaccessible identifiers return `invalid_datasource`. + // + Datasources []string `queryParam:"style=form,explode=true,name=datasources"` + // Optional search query that requests suggested filter values for the selected datasource. Must be nonblank when present. Triggers a search for facet values only; does not return documents. + // + Query *string `queryParam:"style=form,explode=true,name=query"` +} + +func (o *PlatformSearchFiltersRequest) GetDatasources() []string { + if o == nil { + return nil + } + return o.Datasources +} + +func (o *PlatformSearchFiltersRequest) GetQuery() *string { + if o == nil { + return nil + } + return o.Query +} + +type PlatformSearchFiltersResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response. + PlatformSearchFiltersResponse *components.PlatformSearchFiltersResponse + Headers map[string][]string +} + +func (o *PlatformSearchFiltersResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PlatformSearchFiltersResponse) GetPlatformSearchFiltersResponse() *components.PlatformSearchFiltersResponse { + if o == nil { + return nil + } + return o.PlatformSearchFiltersResponse +} + +func (o *PlatformSearchFiltersResponse) GetHeaders() map[string][]string { + if o == nil { + return map[string][]string{} + } + return o.Headers +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/platformskillsupdate.go b/src/__tests__/mockserver/internal/sdk/models/operations/platformskillsupdate.go new file mode 100644 index 000000000..d88ab8e80 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/platformskillsupdate.go @@ -0,0 +1,48 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 97d92031e4a1 + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PlatformSkillsUpdateRequest struct { + // Glean skill ID. + SkillID string `pathParam:"style=simple,explode=false,name=skill_id"` + Body components.PlatformSkillUpdateRequest `request:"mediaType=application/json"` +} + +func (o *PlatformSkillsUpdateRequest) GetSkillID() string { + if o == nil { + return "" + } + return o.SkillID +} + +func (o *PlatformSkillsUpdateRequest) GetBody() components.PlatformSkillUpdateRequest { + if o == nil { + return components.PlatformSkillUpdateRequest{} + } + return o.Body +} + +type PlatformSkillsUpdateResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response. + PlatformSkillUpdateResponse *components.PlatformSkillUpdateResponse +} + +func (o *PlatformSkillsUpdateResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PlatformSkillsUpdateResponse) GetPlatformSkillUpdateResponse() *components.PlatformSkillUpdateResponse { + if o == nil { + return nil + } + return o.PlatformSkillUpdateResponse +} diff --git a/src/__tests__/search.test.ts b/src/__tests__/search.test.ts index e36f1fde9..7e6a25ad2 100644 --- a/src/__tests__/search.test.ts +++ b/src/__tests__/search.test.ts @@ -2078,3 +2078,16 @@ test("Search Platform Search", async () => { }); expect(result).toBeDefined(); }); + +test("Search Platform Search Filters", async () => { + const testHttpClient = createTestHTTPClient("platform-search-filters"); + + const glean = new Glean({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: testHttpClient, + apiToken: process.env["GLEAN_API_TOKEN"] ?? "value", + }); + + const result = await glean.search.listFilters(); + expect(result).toBeDefined(); +}); diff --git a/src/__tests__/skills.test.ts b/src/__tests__/skills.test.ts index 21c6d6a4c..685b5a52c 100644 --- a/src/__tests__/skills.test.ts +++ b/src/__tests__/skills.test.ts @@ -141,3 +141,18 @@ test("Skills Platform Skills Get Version Content", async () => { const result = await glean.skills.retrieveVersionContent("", 117760); expect(result).toBeDefined(); }); + +test("Skills Platform Skills Update", async () => { + const testHttpClient = createTestHTTPClient("platform-skills-update"); + + const glean = new Glean({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: testHttpClient, + apiToken: process.env["GLEAN_API_TOKEN"] ?? "value", + }); + + const result = await glean.skills.update({ + status: "DISABLED", + }, ""); + expect(result).toBeDefined(); +}); diff --git a/src/__tests__/summarize.test.ts b/src/__tests__/summarize.test.ts index 59161d47c..e042ecbcb 100644 --- a/src/__tests__/summarize.test.ts +++ b/src/__tests__/summarize.test.ts @@ -19,11 +19,12 @@ test("Summarize Summarize", async () => { const result = await glean.client.documents.summarize({ documentSpecs: [ { - ugcType: "COLLECTIONS", - contentId: 252303, + ugcType: "SHORTCUTS", + ugcId: "", }, { - url: "https://shocked-casket.name/", + ugcType: "SHORTCUTS", + ugcId: "", }, ], }); diff --git a/src/funcs/searchListFilters.ts b/src/funcs/searchListFilters.ts new file mode 100644 index 000000000..1a35bac3b --- /dev/null +++ b/src/funcs/searchListFilters.ts @@ -0,0 +1,197 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 16efa68fb063 + */ + +import { GleanCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { GleanBaseError } from "../models/errors/gleanbaseerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List search filters + * + * @remarks + * List datasources and common built-in filter fields visible to the authenticated user. This is a best-effort catalog, not an exhaustive list of every filter search accepts. + * Without `query`, returns field metadata only and does not run a search. With a nonblank `query`, provide exactly one `datasources` value to request suggested filter values for that query; no documents are returned and this endpoint does not include warning objects. See `FilterFieldInfo.values` for limitations on suggested values. Rate-limited requests return HTTP 429 with `Retry-After`; temporary backend unavailability returns HTTP 503. + */ +export function searchListFilters( + client: GleanCore, + datasources?: Array | undefined, + query?: string | undefined, + options?: RequestOptions, +): APIPromise< + Result< + operations.PlatformSearchFiltersResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + datasources, + query, + options, + )); +} + +async function $do( + client: GleanCore, + datasources?: Array | undefined, + query?: string | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + operations.PlatformSearchFiltersResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const input: operations.PlatformSearchFiltersRequest = { + datasources: datasources, + query: query, + }; + + const parsed = safeParse( + input, + (value) => + operations.PlatformSearchFiltersRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/api/search/filters")(); + + const query$ = encodeFormQuery({ + "datasources": payload.datasources, + "query": payload.query, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiToken); + const securityInput = secConfig == null ? {} : { apiToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "platform-search-filters", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query$, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.PlatformSearchFiltersResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.PlatformSearchFiltersResponse$inboundSchema, { + hdrs: true, + key: "Result", + }), + M.jsonErr( + [400, 401, 403, 404, 408, 429], + errors.PlatformProblemDetailError$inboundSchema, + { ctype: "application/problem+json" }, + ), + M.jsonErr([500, 503], errors.PlatformProblemDetailError$inboundSchema, { + ctype: "application/problem+json", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/searchQuery.ts b/src/funcs/searchQuery.ts index ad23061a8..3468f4154 100644 --- a/src/funcs/searchQuery.ts +++ b/src/funcs/searchQuery.ts @@ -31,7 +31,8 @@ import { Result } from "../types/fp.js"; * Search * * @remarks - * Execute a search query and retrieve ranked results. This is the data retrieval variant of the search API and returns only results and pagination state. + * Search your organization's connected content and return ranked document results with cursor pagination. Use `GET /api/search/filters` to discover datasource identifiers and common filter fields. Built-in filter names are validated; other field names are accepted as custom filters and behavior depends on your Glean configuration and connected sources. + * Errors: HTTP 422 `unprocessable_query` returns no `results` or `next_cursor`. See `warnings` on the response for non-blocking issues such as partially available results. Not every query issue produces a warning or error. */ export function searchQuery( client: GleanCore, @@ -161,7 +162,7 @@ async function $do( >( M.json(200, components.PlatformSearchResponse$inboundSchema), M.jsonErr( - [400, 401, 403, 404, 408, 413, 429], + [400, 401, 403, 404, 408, 413, 422, 429], errors.PlatformProblemDetailError$inboundSchema, { ctype: "application/problem+json" }, ), diff --git a/src/funcs/skillsUpdate.ts b/src/funcs/skillsUpdate.ts new file mode 100644 index 000000000..63da83107 --- /dev/null +++ b/src/funcs/skillsUpdate.ts @@ -0,0 +1,197 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 4f45a2e98be7 + */ + +import { GleanCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { GleanBaseError } from "../models/errors/gleanbaseerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update skill + * + * @remarks + * Update mutable metadata for a skill. V1 supports enabling or disabling a skill without changing its content. + */ +export function skillsUpdate( + client: GleanCore, + platformSkillUpdateRequest: components.PlatformSkillUpdateRequest, + skillId: string, + options?: RequestOptions, +): APIPromise< + Result< + components.PlatformSkillUpdateResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + platformSkillUpdateRequest, + skillId, + options, + )); +} + +async function $do( + client: GleanCore, + platformSkillUpdateRequest: components.PlatformSkillUpdateRequest, + skillId: string, + options?: RequestOptions, +): Promise< + [ + Result< + components.PlatformSkillUpdateResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const input: operations.PlatformSkillsUpdateRequest = { + platformSkillUpdateRequest: platformSkillUpdateRequest, + skill_id: skillId, + }; + + const parsed = safeParse( + input, + (value) => + operations.PlatformSkillsUpdateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.PlatformSkillUpdateRequest, { + explode: true, + }); + + const pathParams = { + skill_id: encodeSimple("skill_id", payload.skill_id, { + explode: false, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/api/skills/{skill_id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiToken); + const securityInput = secConfig == null ? {} : { apiToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "platform-skills-update", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + components.PlatformSkillUpdateResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.PlatformSkillUpdateResponse$inboundSchema), + M.jsonErr( + [400, 401, 403, 404, 408, 409, 413, 429], + errors.PlatformProblemDetailError$inboundSchema, + { ctype: "application/problem+json" }, + ), + M.jsonErr([500, 503], errors.PlatformProblemDetailError$inboundSchema, { + ctype: "application/problem+json", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/lib/config.ts b/src/lib/config.ts index a6cb92349..f8b56c59c 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -73,8 +73,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "0.9.0", - sdkVersion: "0.18.0", + sdkVersion: "0.18.1", genVersion: "2.918.4", userAgent: - "speakeasy-sdk/typescript 0.18.0 2.918.4 0.9.0 @gleanwork/api-client", + "speakeasy-sdk/typescript 0.18.1 2.918.4 0.9.0 @gleanwork/api-client", } as const; diff --git a/src/models/components/customdatasourceconfig.ts b/src/models/components/customdatasourceconfig.ts index 230c1f82c..bc2ff7d6b 100644 --- a/src/models/components/customdatasourceconfig.ts +++ b/src/models/components/customdatasourceconfig.ts @@ -50,6 +50,8 @@ export const DatasourceCategory = { Entity: "ENTITY", Calendar: "CALENDAR", Agents: "AGENTS", + AiConversation: "AI_CONVERSATION", + AiArtifact: "AI_ARTIFACT", } as const; /** * The type of this datasource. It is an important signal for relevance and must be specified and cannot be UNCATEGORIZED. Please refer to [this](https://developers.glean.com/docs/indexing_api_datasource_category/) for more details. diff --git a/src/models/components/index.ts b/src/models/components/index.ts index 00ee413ce..aa507f977 100644 --- a/src/models/components/index.ts +++ b/src/models/components/index.ts @@ -356,7 +356,9 @@ export * from "./platformagentschemasresponse.js"; export * from "./platformagentssearchrequest.js"; export * from "./platformagentssearchresponse.js"; export * from "./platformcontenttype.js"; +export * from "./platformdatasourcefilterinfo.js"; export * from "./platformfilter.js"; +export * from "./platformfilterfieldinfo.js"; export * from "./platformfilteroperator.js"; export * from "./platformmessage.js"; export * from "./platformmessagerole.js"; @@ -365,6 +367,7 @@ export * from "./platformpersonreference.js"; export * from "./platformproblemdetailcode.js"; export * from "./platformproblemdetailerror.js"; export * from "./platformresult.js"; +export * from "./platformsearchfiltersresponse.js"; export * from "./platformsearchrequest.js"; export * from "./platformsearchresponse.js"; export * from "./platformskill.js"; @@ -376,17 +379,20 @@ export * from "./platformskillslistresponse.js"; export * from "./platformskillsourceprovenance.js"; export * from "./platformskillstatus.js"; export * from "./platformskillsyncstatus.js"; +export * from "./platformskillupdaterequest.js"; +export * from "./platformskillupdateresponse.js"; +export * from "./platformskillupdatestatus.js"; export * from "./platformskillvalidationfile.js"; export * from "./platformskillvalidationmetadata.js"; export * from "./platformskillvalidationrequest.js"; export * from "./platformskillvalidationresponse.js"; -export * from "./platformskillvalidationwarning.js"; export * from "./platformskillversion.js"; export * from "./platformskillversioncreaterequest.js"; export * from "./platformskillversioncreateresponse.js"; export * from "./platformskillversiongetresponse.js"; export * from "./platformskillversionslistresponse.js"; export * from "./platformtimerange.js"; +export * from "./platformwarning.js"; export * from "./possiblevalue.js"; export * from "./processalldocumentsrequest.js"; export * from "./processallmembershipsrequest.js"; diff --git a/src/models/components/objectdefinition.ts b/src/models/components/objectdefinition.ts index fbd7c8471..cd27415d7 100644 --- a/src/models/components/objectdefinition.ts +++ b/src/models/components/objectdefinition.ts @@ -44,6 +44,8 @@ export const DocCategory = { Entity: "ENTITY", Calendar: "CALENDAR", Agents: "AGENTS", + AiConversation: "AI_CONVERSATION", + AiArtifact: "AI_ARTIFACT", } as const; /** * The document category of this object type. diff --git a/src/models/components/platformdatasourcefilterinfo.ts b/src/models/components/platformdatasourcefilterinfo.ts new file mode 100644 index 000000000..407689f01 --- /dev/null +++ b/src/models/components/platformdatasourcefilterinfo.ts @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: f7d5af2a32f8 + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + PlatformFilterFieldInfo, + PlatformFilterFieldInfo$inboundSchema, +} from "./platformfilterfieldinfo.js"; + +export type PlatformDatasourceFilterInfo = { + /** + * Datasource identifier usable in `POST /api/search` `datasources`. + * + * @remarks + */ + datasource: string; + /** + * Common built-in filter fields for this datasource. May be empty. A built-in omitted here can still be valid in `POST /api/search`; see `Filter.field` for the full built-in name list. + * + * @remarks + */ + filters: Array; +}; + +/** @internal */ +export const PlatformDatasourceFilterInfo$inboundSchema: z.ZodType< + PlatformDatasourceFilterInfo, + z.ZodTypeDef, + unknown +> = z.object({ + datasource: z.string(), + filters: z.array(PlatformFilterFieldInfo$inboundSchema), +}); + +export function platformDatasourceFilterInfoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformDatasourceFilterInfo$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformDatasourceFilterInfo' from JSON`, + ); +} diff --git a/src/models/components/platformfilter.ts b/src/models/components/platformfilter.ts index 55f896e8a..230326722 100644 --- a/src/models/components/platformfilter.ts +++ b/src/models/components/platformfilter.ts @@ -10,23 +10,25 @@ import { } from "./platformfilteroperator.js"; /** - * A single filter criterion. For `EQUALS`, multiple values within a filter are OR'd. For `NOT_EQUALS`, multiple values exclude all listed values. Filters are AND'd with each other and with any inline query operators. + * A single filter criterion. For `EQUALS`, multiple values within a filter are OR'd; for `NOT_EQUALS`, listed values are excluded. Separate filters are AND'd with each other and with inline operators in `query`. Repeated same-field `EQUALS` filters are rejected. * * @remarks */ export type PlatformFilter = { /** - * The field to filter on. Accepts built-in filter field names such as `type`, `owner`, `from`, `author`, `channel`, `status`, `assignee`, `reporter`, `component`, `mentions`, and `collection`, plus custom datasource property names. + * Filter field name. Built-in names (case-sensitive, lowercase only): `type`, `owner`, `from`, `author`, `channel`, `status`, `assignee`, `reporter`, `component`, `mentions`, and `collection`. Built-ins accept only `EQUALS` and `NOT_EQUALS`. Any other nonblank name is accepted as a custom filter without spelling, existence, or type checks; behavior depends on your connected sources. * * @remarks */ field: string; /** - * One or more values to match. + * One or more values to match. Prefer values returned by filter discovery unchanged. For people (`USER`) fields, values may be email addresses or display names. + * + * @remarks */ values: Array; /** - * Comparison operator to apply to this filter. Defaults to `EQUALS`. `GT`, `GTE`, `LT`, and `LTE` range operators require exactly one value; express bounded ranges with multiple filters on the same field. + * Comparison operator. Defaults to `EQUALS`. Built-in fields support only `EQUALS` and `NOT_EQUALS`. Range operators (`GT`, `GTE`, `LT`, `LTE`) require exactly one value; express ranges with multiple filters on the same field. Custom fields may support different operators depending on the data source. * * @remarks */ diff --git a/src/models/components/platformfilterfieldinfo.ts b/src/models/components/platformfilterfieldinfo.ts new file mode 100644 index 000000000..3f104fe98 --- /dev/null +++ b/src/models/components/platformfilterfieldinfo.ts @@ -0,0 +1,60 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 9d7ef9794894 + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + PlatformFilterOperator, + PlatformFilterOperator$inboundSchema, +} from "./platformfilteroperator.js"; + +export type PlatformFilterFieldInfo = { + /** + * Field name usable in the `filters` array for `POST /api/search`. + */ + field: string; + /** + * Open field-type string. Current values are `STRING` for text and keyword fields and `USER` for people fields (`owner`, `from`, `author`, `assignee`, `reporter`, `mentions`). Clients must tolerate unknown values. + * + * @remarks + */ + type: string; + /** + * Comparison operators supported for this field. Built-in fields expose `EQUALS` and `NOT_EQUALS`. + * + * @remarks + */ + operators: Array; + /** + * Suggested filter values observed for the supplied `query`. Omitted in catalog-only responses. Present as an array, including `[]`, when `query` is provided. Values are a bounded, non-exhaustive sample in search-provider order and may include duplicates; blank values are omitted. No additional endpoint-specific truncation is applied. Grouping in the search UI is not preserved; each value applies to the field broadly. An empty array does not mean no valid value exists. Availability varies by data source; federated and MCP integrations may return page-derived values or none at all. Reusing a suggested value in `POST /api/search` does not guarantee matching results or identical filter behavior. For `USER` fields, values may be email addresses or display names. + * + * @remarks + */ + values?: Array | undefined; +}; + +/** @internal */ +export const PlatformFilterFieldInfo$inboundSchema: z.ZodType< + PlatformFilterFieldInfo, + z.ZodTypeDef, + unknown +> = z.object({ + field: z.string(), + type: z.string(), + operators: z.array(PlatformFilterOperator$inboundSchema), + values: z.array(z.string()).optional(), +}); + +export function platformFilterFieldInfoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformFilterFieldInfo$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformFilterFieldInfo' from JSON`, + ); +} diff --git a/src/models/components/platformfilteroperator.ts b/src/models/components/platformfilteroperator.ts index 747dc8207..bc7725a95 100644 --- a/src/models/components/platformfilteroperator.ts +++ b/src/models/components/platformfilteroperator.ts @@ -4,7 +4,8 @@ */ import * as z from "zod/v3"; -import { ClosedEnum } from "../../types/enums.js"; +import * as openEnums from "../../types/enums.js"; +import { OpenEnum } from "../../types/enums.js"; /** * Supported filter operator. @@ -20,9 +21,17 @@ export const PlatformFilterOperator = { /** * Supported filter operator. */ -export type PlatformFilterOperator = ClosedEnum; +export type PlatformFilterOperator = OpenEnum; /** @internal */ -export const PlatformFilterOperator$outboundSchema: z.ZodNativeEnum< - typeof PlatformFilterOperator -> = z.nativeEnum(PlatformFilterOperator); +export const PlatformFilterOperator$inboundSchema: z.ZodType< + PlatformFilterOperator, + z.ZodTypeDef, + unknown +> = openEnums.inboundSchema(PlatformFilterOperator); +/** @internal */ +export const PlatformFilterOperator$outboundSchema: z.ZodType< + string, + z.ZodTypeDef, + PlatformFilterOperator +> = openEnums.outboundSchema(PlatformFilterOperator); diff --git a/src/models/components/platformresult.ts b/src/models/components/platformresult.ts index 35599c820..f0fe4c0c0 100644 --- a/src/models/components/platformresult.ts +++ b/src/models/components/platformresult.ts @@ -29,10 +29,6 @@ export type PlatformResult = { * The datasource this result originates from. */ datasource: string; - /** - * The datasource instance this result originates from, if known. - */ - datasource_instance?: string | null | undefined; /** * The document type within the datasource. */ @@ -65,7 +61,6 @@ export const PlatformResult$inboundSchema: z.ZodType< title: z.string(), snippets: z.array(z.string()).optional(), datasource: z.string(), - datasource_instance: z.nullable(z.string()).optional(), document_type: z.nullable(z.string()).optional(), creator: PlatformPersonReference$inboundSchema.optional(), owner: PlatformPersonReference$inboundSchema.optional(), diff --git a/src/models/components/platformsearchfiltersresponse.ts b/src/models/components/platformsearchfiltersresponse.ts new file mode 100644 index 000000000..bec5ee0a7 --- /dev/null +++ b/src/models/components/platformsearchfiltersresponse.ts @@ -0,0 +1,46 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 47e0d72542f6 + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + PlatformDatasourceFilterInfo, + PlatformDatasourceFilterInfo$inboundSchema, +} from "./platformdatasourcefilterinfo.js"; + +export type PlatformSearchFiltersResponse = { + /** + * Datasources visible to the authenticated user. Each `datasource` is an identifier you can pass to `POST /api/search` `datasources`. An empty array means no visible datasources. + * + * @remarks + */ + datasources: Array; + /** + * Platform-generated request ID for support correlation. + */ + request_id: string; +}; + +/** @internal */ +export const PlatformSearchFiltersResponse$inboundSchema: z.ZodType< + PlatformSearchFiltersResponse, + z.ZodTypeDef, + unknown +> = z.object({ + datasources: z.array(PlatformDatasourceFilterInfo$inboundSchema), + request_id: z.string(), +}); + +export function platformSearchFiltersResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformSearchFiltersResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformSearchFiltersResponse' from JSON`, + ); +} diff --git a/src/models/components/platformsearchrequest.ts b/src/models/components/platformsearchrequest.ts index 8fe02b7e8..89296931f 100644 --- a/src/models/components/platformsearchrequest.ts +++ b/src/models/components/platformsearchrequest.ts @@ -33,19 +33,13 @@ export type PlatformSearchRequest = { */ cursor?: string | null | undefined; /** - * Restrict results to specific datasources. Requests must not specify both `datasources` and `datasource_instances`. + * 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. * * @remarks */ datasources?: Array | undefined; /** - * Restrict results to specific datasource instances. Values are datasource instance identifiers returned by `GET /api/search/filters`. Requests must not specify both `datasources` and `datasource_instances`. - * - * @remarks - */ - datasource_instances?: Array | undefined; - /** - * Structured filters applied to search results. Equality operators OR multiple values within a filter. Multiple filters are AND'd together, including range filters on the same field. Filters are AND'd with any inline operators in `query`. Note that conflicting constraints on the same field (e.g., `type:document` in the query and `type: spreadsheet` in a filter) produce an empty result set. + * 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. * * @remarks */ @@ -62,7 +56,6 @@ export type PlatformSearchRequest$Outbound = { page_size: number; cursor?: string | null | undefined; datasources?: Array | undefined; - datasource_instances?: Array | undefined; filters?: Array | undefined; time_range?: PlatformTimeRange$Outbound | undefined; }; @@ -77,7 +70,6 @@ export const PlatformSearchRequest$outboundSchema: z.ZodType< page_size: z.number().int().default(10), cursor: z.nullable(z.string()).optional(), datasources: z.array(z.string()).optional(), - datasource_instances: z.array(z.string()).optional(), filters: z.array(PlatformFilter$outboundSchema).optional(), time_range: PlatformTimeRange$outboundSchema.optional(), }); diff --git a/src/models/components/platformsearchresponse.ts b/src/models/components/platformsearchresponse.ts index e26c0612c..3257e2129 100644 --- a/src/models/components/platformsearchresponse.ts +++ b/src/models/components/platformsearchresponse.ts @@ -11,10 +11,16 @@ import { PlatformResult, PlatformResult$inboundSchema, } from "./platformresult.js"; +import { + PlatformWarning, + PlatformWarning$inboundSchema, +} from "./platformwarning.js"; export type PlatformSearchResponse = { /** - * Ordered list of search results. + * Ordered list of ranked document results. People cards, Q&A blocks, and other UI-only result types are not included. + * + * @remarks */ results: Array; /** @@ -29,6 +35,12 @@ export type PlatformSearchResponse = { * Platform-generated request ID for support correlation. */ request_id: string; + /** + * Non-blocking warnings for this response. Required; use `[]` when there are none. Clients must tolerate unknown warning codes. `results_incomplete` means some results may be unavailable for the requested datasource scope while `results`, `has_more`, and `next_cursor` remain present. Warning messages are generic and do not include query text or internal identifiers. + * + * @remarks + */ + warnings: Array; }; /** @internal */ @@ -41,6 +53,7 @@ export const PlatformSearchResponse$inboundSchema: z.ZodType< has_more: z.boolean(), next_cursor: z.nullable(z.string()), request_id: z.string(), + warnings: z.array(PlatformWarning$inboundSchema), }); export function platformSearchResponseFromJSON( diff --git a/src/models/components/platformskillupdaterequest.ts b/src/models/components/platformskillupdaterequest.ts new file mode 100644 index 000000000..50a17e80e --- /dev/null +++ b/src/models/components/platformskillupdaterequest.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 3df8f4155bd1 + */ + +import * as z from "zod/v3"; +import { + PlatformSkillUpdateStatus, + PlatformSkillUpdateStatus$outboundSchema, +} from "./platformskillupdatestatus.js"; + +export type PlatformSkillUpdateRequest = { + /** + * New status for the skill. + */ + status: PlatformSkillUpdateStatus; +}; + +/** @internal */ +export type PlatformSkillUpdateRequest$Outbound = { + status: string; +}; + +/** @internal */ +export const PlatformSkillUpdateRequest$outboundSchema: z.ZodType< + PlatformSkillUpdateRequest$Outbound, + z.ZodTypeDef, + PlatformSkillUpdateRequest +> = z.object({ + status: PlatformSkillUpdateStatus$outboundSchema, +}); + +export function platformSkillUpdateRequestToJSON( + platformSkillUpdateRequest: PlatformSkillUpdateRequest, +): string { + return JSON.stringify( + PlatformSkillUpdateRequest$outboundSchema.parse(platformSkillUpdateRequest), + ); +} diff --git a/src/models/components/platformskillupdateresponse.ts b/src/models/components/platformskillupdateresponse.ts new file mode 100644 index 000000000..0e52cc58f --- /dev/null +++ b/src/models/components/platformskillupdateresponse.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 2548b5414735 + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { PlatformSkill, PlatformSkill$inboundSchema } from "./platformskill.js"; + +export type PlatformSkillUpdateResponse = { + skill: PlatformSkill; + /** + * Platform-generated request ID for support correlation. + */ + request_id: string; +}; + +/** @internal */ +export const PlatformSkillUpdateResponse$inboundSchema: z.ZodType< + PlatformSkillUpdateResponse, + z.ZodTypeDef, + unknown +> = z.object({ + skill: PlatformSkill$inboundSchema, + request_id: z.string(), +}); + +export function platformSkillUpdateResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformSkillUpdateResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformSkillUpdateResponse' from JSON`, + ); +} diff --git a/src/models/components/platformskillupdatestatus.ts b/src/models/components/platformskillupdatestatus.ts new file mode 100644 index 000000000..f5ae8962f --- /dev/null +++ b/src/models/components/platformskillupdatestatus.ts @@ -0,0 +1,26 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 5f8d04c5a43c + */ + +import * as z from "zod/v3"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * New status for the skill. + */ +export const PlatformSkillUpdateStatus = { + Enabled: "ENABLED", + Disabled: "DISABLED", +} as const; +/** + * New status for the skill. + */ +export type PlatformSkillUpdateStatus = ClosedEnum< + typeof PlatformSkillUpdateStatus +>; + +/** @internal */ +export const PlatformSkillUpdateStatus$outboundSchema: z.ZodNativeEnum< + typeof PlatformSkillUpdateStatus +> = z.nativeEnum(PlatformSkillUpdateStatus); diff --git a/src/models/components/platformskillvalidationresponse.ts b/src/models/components/platformskillvalidationresponse.ts index 037388bd4..d72fe6545 100644 --- a/src/models/components/platformskillvalidationresponse.ts +++ b/src/models/components/platformskillvalidationresponse.ts @@ -16,9 +16,9 @@ import { PlatformSkillValidationMetadata$inboundSchema, } from "./platformskillvalidationmetadata.js"; import { - PlatformSkillValidationWarning, - PlatformSkillValidationWarning$inboundSchema, -} from "./platformskillvalidationwarning.js"; + PlatformWarning, + PlatformWarning$inboundSchema, +} from "./platformwarning.js"; export type PlatformSkillValidationResponse = { metadata: PlatformSkillValidationMetadata; @@ -29,7 +29,7 @@ export type PlatformSkillValidationResponse = { /** * Non-blocking validation warnings. */ - warnings: Array; + warnings: Array; /** * Platform-generated request ID for support correlation. */ @@ -44,7 +44,7 @@ export const PlatformSkillValidationResponse$inboundSchema: z.ZodType< > = z.object({ metadata: PlatformSkillValidationMetadata$inboundSchema, files: z.array(PlatformSkillValidationFile$inboundSchema), - warnings: z.array(PlatformSkillValidationWarning$inboundSchema), + warnings: z.array(PlatformWarning$inboundSchema), request_id: z.string(), }); diff --git a/src/models/components/platformskillvalidationwarning.ts b/src/models/components/platformwarning.ts similarity index 50% rename from src/models/components/platformskillvalidationwarning.ts rename to src/models/components/platformwarning.ts index 73238ea01..8dce2cc25 100644 --- a/src/models/components/platformskillvalidationwarning.ts +++ b/src/models/components/platformwarning.ts @@ -1,6 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: 9f6d3a564161 + * @generated-id: 172530a57f1e */ import * as z from "zod/v3"; @@ -8,9 +8,14 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -export type PlatformSkillValidationWarning = { +/** + * Non-blocking warning attached to a successful Platform response. + */ +export type PlatformWarning = { /** - * Stable warning code. + * Open snake_case warning code. Clients must tolerate unknown values; the set of codes is not a closed enum. + * + * @remarks */ code: string; /** @@ -20,8 +25,8 @@ export type PlatformSkillValidationWarning = { }; /** @internal */ -export const PlatformSkillValidationWarning$inboundSchema: z.ZodType< - PlatformSkillValidationWarning, +export const PlatformWarning$inboundSchema: z.ZodType< + PlatformWarning, z.ZodTypeDef, unknown > = z.object({ @@ -29,12 +34,12 @@ export const PlatformSkillValidationWarning$inboundSchema: z.ZodType< message: z.string(), }); -export function platformSkillValidationWarningFromJSON( +export function platformWarningFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => PlatformSkillValidationWarning$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PlatformSkillValidationWarning' from JSON`, + (x) => PlatformWarning$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformWarning' from JSON`, ); } diff --git a/src/models/operations/index.ts b/src/models/operations/index.ts index 270171c35..e183c22f1 100644 --- a/src/models/operations/index.ts +++ b/src/models/operations/index.ts @@ -75,6 +75,7 @@ export * from "./pin.js"; export * from "./platformagentscreaterun.js"; export * from "./platformagentsget.js"; export * from "./platformagentsgetschemas.js"; +export * from "./platformsearchfilters.js"; export * from "./platformskillscreateversion.js"; export * from "./platformskillsget.js"; export * from "./platformskillsgetcontent.js"; @@ -82,6 +83,7 @@ export * from "./platformskillsgetversion.js"; export * from "./platformskillsgetversioncontent.js"; export * from "./platformskillslist.js"; export * from "./platformskillslistversions.js"; +export * from "./platformskillsupdate.js"; export * from "./postapiindexv1debugdatasourcedocument.js"; export * from "./postapiindexv1debugdatasourcedocumentevents.js"; export * from "./postapiindexv1debugdatasourcedocuments.js"; diff --git a/src/models/operations/platformsearchfilters.ts b/src/models/operations/platformsearchfilters.ts new file mode 100644 index 000000000..df73d13d6 --- /dev/null +++ b/src/models/operations/platformsearchfilters.ts @@ -0,0 +1,81 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 40fe427dde80 + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type PlatformSearchFiltersRequest = { + /** + * Restrict metadata to one or more datasource identifiers as returned by this endpoint (for example, `jira`). With a nonblank `query`, exactly one datasource is required. Unknown or inaccessible identifiers return `invalid_datasource`. + * + * @remarks + */ + datasources?: Array | undefined; + /** + * Optional search query that requests suggested filter values for the selected datasource. Must be nonblank when present. Triggers a search for facet values only; does not return documents. + * + * @remarks + */ + query?: string | undefined; +}; + +export type PlatformSearchFiltersResponse = { + Headers: { [k: string]: Array }; + result: components.PlatformSearchFiltersResponse; +}; + +/** @internal */ +export type PlatformSearchFiltersRequest$Outbound = { + datasources?: Array | undefined; + query?: string | undefined; +}; + +/** @internal */ +export const PlatformSearchFiltersRequest$outboundSchema: z.ZodType< + PlatformSearchFiltersRequest$Outbound, + z.ZodTypeDef, + PlatformSearchFiltersRequest +> = z.object({ + datasources: z.array(z.string()).optional(), + query: z.string().optional(), +}); + +export function platformSearchFiltersRequestToJSON( + platformSearchFiltersRequest: PlatformSearchFiltersRequest, +): string { + return JSON.stringify( + PlatformSearchFiltersRequest$outboundSchema.parse( + platformSearchFiltersRequest, + ), + ); +} + +/** @internal */ +export const PlatformSearchFiltersResponse$inboundSchema: z.ZodType< + PlatformSearchFiltersResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Headers: z.record(z.array(z.string())).default({}), + Result: components.PlatformSearchFiltersResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); + +export function platformSearchFiltersResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformSearchFiltersResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformSearchFiltersResponse' from JSON`, + ); +} diff --git a/src/models/operations/platformskillsupdate.ts b/src/models/operations/platformskillsupdate.ts new file mode 100644 index 000000000..92786fd55 --- /dev/null +++ b/src/models/operations/platformskillsupdate.ts @@ -0,0 +1,47 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: ece660fa7848 + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import * as components from "../components/index.js"; + +export type PlatformSkillsUpdateRequest = { + /** + * Glean skill ID. + */ + skill_id: string; + platformSkillUpdateRequest: components.PlatformSkillUpdateRequest; +}; + +/** @internal */ +export type PlatformSkillsUpdateRequest$Outbound = { + skill_id: string; + PlatformSkillUpdateRequest: components.PlatformSkillUpdateRequest$Outbound; +}; + +/** @internal */ +export const PlatformSkillsUpdateRequest$outboundSchema: z.ZodType< + PlatformSkillsUpdateRequest$Outbound, + z.ZodTypeDef, + PlatformSkillsUpdateRequest +> = z.object({ + skill_id: z.string(), + platformSkillUpdateRequest: + components.PlatformSkillUpdateRequest$outboundSchema, +}).transform((v) => { + return remap$(v, { + platformSkillUpdateRequest: "PlatformSkillUpdateRequest", + }); +}); + +export function platformSkillsUpdateRequestToJSON( + platformSkillsUpdateRequest: PlatformSkillsUpdateRequest, +): string { + return JSON.stringify( + PlatformSkillsUpdateRequest$outboundSchema.parse( + platformSkillsUpdateRequest, + ), + ); +} diff --git a/src/react-query/index.ts b/src/react-query/index.ts index a4a0c405f..672c6e2d1 100644 --- a/src/react-query/index.ts +++ b/src/react-query/index.ts @@ -143,6 +143,7 @@ export * from "./indexingPermissionsProcessMemberships.js"; export * from "./indexingPermissionsUpdatePermissions.js"; export * from "./indexingShortcutsBulkIndex.js"; export * from "./indexingShortcutsUpload.js"; +export * from "./searchListFilters.js"; export * from "./searchQuery.js"; export * from "./skillsCreate.js"; export * from "./skillsCreateVersion.js"; @@ -152,4 +153,5 @@ export * from "./skillsRetrieve.js"; export * from "./skillsRetrieveContent.js"; export * from "./skillsRetrieveVersion.js"; export * from "./skillsRetrieveVersionContent.js"; +export * from "./skillsUpdate.js"; export * from "./skillsValidate.js"; diff --git a/src/react-query/searchListFilters.core.ts b/src/react-query/searchListFilters.core.ts new file mode 100644 index 000000000..c828118fa --- /dev/null +++ b/src/react-query/searchListFilters.core.ts @@ -0,0 +1,81 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: c09038b64f46 + */ + +import { + QueryClient, + QueryFunctionContext, + QueryKey, +} from "@tanstack/react-query"; +import { GleanCore } from "../core.js"; +import { searchListFilters } from "../funcs/searchListFilters.js"; +import { combineSignals } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; +export type SearchListFiltersQueryData = + operations.PlatformSearchFiltersResponse; + +export function prefetchSearchListFilters( + queryClient: QueryClient, + client$: GleanCore, + datasources?: Array | undefined, + query?: string | undefined, + options?: RequestOptions, +): Promise { + return queryClient.prefetchQuery({ + ...buildSearchListFiltersQuery( + client$, + datasources, + query, + options, + ), + }); +} + +export function buildSearchListFiltersQuery( + client$: GleanCore, + datasources?: Array | undefined, + query?: string | undefined, + options?: RequestOptions, +): { + queryKey: QueryKey; + queryFn: ( + context: QueryFunctionContext, + ) => Promise; +} { + return { + queryKey: queryKeySearchListFilters({ datasources, query }), + queryFn: async function searchListFiltersQueryFn( + ctx, + ): Promise { + const sig = combineSignals( + ctx.signal, + options?.signal, + options?.fetchOptions?.signal, + ); + const mergedOptions = { + ...options?.fetchOptions, + ...options, + signal: sig, + }; + + return unwrapAsync(searchListFilters( + client$, + datasources, + query, + mergedOptions, + )); + }, + }; +} + +export function queryKeySearchListFilters( + parameters: { + datasources?: Array | undefined; + query?: string | undefined; + }, +): QueryKey { + return ["@gleanwork/api-client", "search", "listFilters", parameters]; +} diff --git a/src/react-query/searchListFilters.ts b/src/react-query/searchListFilters.ts new file mode 100644 index 000000000..ab0ebdc87 --- /dev/null +++ b/src/react-query/searchListFilters.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: fb6d3135bc3a + */ + +import { + InvalidateQueryFilters, + QueryClient, + useQuery, + UseQueryResult, + useSuspenseQuery, + UseSuspenseQueryResult, +} from "@tanstack/react-query"; +import { GleanBaseError } from "../models/errors/gleanbaseerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { useGleanContext } from "./_context.js"; +import { + QueryHookOptions, + SuspenseQueryHookOptions, + TupleToPrefixes, +} from "./_types.js"; +import { + buildSearchListFiltersQuery, + prefetchSearchListFilters, + queryKeySearchListFilters, + SearchListFiltersQueryData, +} from "./searchListFilters.core.js"; +export { + buildSearchListFiltersQuery, + prefetchSearchListFilters, + queryKeySearchListFilters, + type SearchListFiltersQueryData, +}; + +export type SearchListFiltersQueryError = + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError; + +/** + * List search filters + * + * @remarks + * List datasources and common built-in filter fields visible to the authenticated user. This is a best-effort catalog, not an exhaustive list of every filter search accepts. + * Without `query`, returns field metadata only and does not run a search. With a nonblank `query`, provide exactly one `datasources` value to request suggested filter values for that query; no documents are returned and this endpoint does not include warning objects. See `FilterFieldInfo.values` for limitations on suggested values. Rate-limited requests return HTTP 429 with `Retry-After`; temporary backend unavailability returns HTTP 503. + */ +export function useSearchListFilters( + datasources?: Array | undefined, + query?: string | undefined, + options?: QueryHookOptions< + SearchListFiltersQueryData, + SearchListFiltersQueryError + >, +): UseQueryResult { + const client = useGleanContext(); + return useQuery({ + ...buildSearchListFiltersQuery( + client, + datasources, + query, + options, + ), + ...options, + }); +} + +/** + * List search filters + * + * @remarks + * List datasources and common built-in filter fields visible to the authenticated user. This is a best-effort catalog, not an exhaustive list of every filter search accepts. + * Without `query`, returns field metadata only and does not run a search. With a nonblank `query`, provide exactly one `datasources` value to request suggested filter values for that query; no documents are returned and this endpoint does not include warning objects. See `FilterFieldInfo.values` for limitations on suggested values. Rate-limited requests return HTTP 429 with `Retry-After`; temporary backend unavailability returns HTTP 503. + */ +export function useSearchListFiltersSuspense( + datasources?: Array | undefined, + query?: string | undefined, + options?: SuspenseQueryHookOptions< + SearchListFiltersQueryData, + SearchListFiltersQueryError + >, +): UseSuspenseQueryResult< + SearchListFiltersQueryData, + SearchListFiltersQueryError +> { + const client = useGleanContext(); + return useSuspenseQuery({ + ...buildSearchListFiltersQuery( + client, + datasources, + query, + options, + ), + ...options, + }); +} + +export function setSearchListFiltersData( + client: QueryClient, + queryKeyBase: [ + parameters: { + datasources?: Array | undefined; + query?: string | undefined; + }, + ], + data: SearchListFiltersQueryData, +): SearchListFiltersQueryData | undefined { + const key = queryKeySearchListFilters(...queryKeyBase); + + return client.setQueryData(key, data); +} + +export function invalidateSearchListFilters( + client: QueryClient, + queryKeyBase: TupleToPrefixes< + [parameters: { + datasources?: Array | undefined; + query?: string | undefined; + }] + >, + filters?: Omit, +): Promise { + return client.invalidateQueries({ + ...filters, + queryKey: [ + "@gleanwork/api-client", + "search", + "listFilters", + ...queryKeyBase, + ], + }); +} + +export function invalidateAllSearchListFilters( + client: QueryClient, + filters?: Omit, +): Promise { + return client.invalidateQueries({ + ...filters, + queryKey: ["@gleanwork/api-client", "search", "listFilters"], + }); +} diff --git a/src/react-query/searchQuery.ts b/src/react-query/searchQuery.ts index bc4f7e63f..b09d842c9 100644 --- a/src/react-query/searchQuery.ts +++ b/src/react-query/searchQuery.ts @@ -50,7 +50,8 @@ export type SearchQueryMutationError = * Search * * @remarks - * Execute a search query and retrieve ranked results. This is the data retrieval variant of the search API and returns only results and pagination state. + * Search your organization's connected content and return ranked document results with cursor pagination. Use `GET /api/search/filters` to discover datasource identifiers and common filter fields. Built-in filter names are validated; other field names are accepted as custom filters and behavior depends on your Glean configuration and connected sources. + * Errors: HTTP 422 `unprocessable_query` returns no `results` or `next_cursor`. See `warnings` on the response for non-blocking issues such as partially available results. Not every query issue produces a warning or error. */ export function useSearchQueryMutation( options?: MutationHookOptions< diff --git a/src/react-query/skillsUpdate.ts b/src/react-query/skillsUpdate.ts new file mode 100644 index 000000000..b0ba56fad --- /dev/null +++ b/src/react-query/skillsUpdate.ts @@ -0,0 +1,114 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e62e124a1043 + */ + +import { + MutationKey, + useMutation, + UseMutationResult, +} from "@tanstack/react-query"; +import { GleanCore } from "../core.js"; +import { skillsUpdate } from "../funcs/skillsUpdate.js"; +import { combineSignals } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; +import { GleanBaseError } from "../models/errors/gleanbaseerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { unwrapAsync } from "../types/fp.js"; +import { useGleanContext } from "./_context.js"; +import { MutationHookOptions } from "./_types.js"; + +export type SkillsUpdateMutationVariables = { + platformSkillUpdateRequest: components.PlatformSkillUpdateRequest; + skillId: string; + options?: RequestOptions; +}; + +export type SkillsUpdateMutationData = components.PlatformSkillUpdateResponse; + +export type SkillsUpdateMutationError = + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError; + +/** + * Update skill + * + * @remarks + * Update mutable metadata for a skill. V1 supports enabling or disabling a skill without changing its content. + */ +export function useSkillsUpdateMutation( + options?: MutationHookOptions< + SkillsUpdateMutationData, + SkillsUpdateMutationError, + SkillsUpdateMutationVariables + >, +): UseMutationResult< + SkillsUpdateMutationData, + SkillsUpdateMutationError, + SkillsUpdateMutationVariables +> { + const client = useGleanContext(); + return useMutation({ + ...buildSkillsUpdateMutation(client, options), + ...options, + }); +} + +export function mutationKeySkillsUpdate(): MutationKey { + return ["@gleanwork/api-client", "skills", "update"]; +} + +export function buildSkillsUpdateMutation( + client$: GleanCore, + hookOptions?: RequestOptions, +): { + mutationKey: MutationKey; + mutationFn: ( + variables: SkillsUpdateMutationVariables, + ) => Promise; +} { + return { + mutationKey: mutationKeySkillsUpdate(), + mutationFn: function skillsUpdateMutationFn({ + platformSkillUpdateRequest, + skillId, + options, + }): Promise { + const mergedOptions = { + ...hookOptions, + ...options, + fetchOptions: { + ...hookOptions?.fetchOptions, + ...options?.fetchOptions, + signal: combineSignals( + hookOptions?.fetchOptions?.signal, + options?.fetchOptions?.signal, + ), + }, + }; + return unwrapAsync(skillsUpdate( + client$, + platformSkillUpdateRequest, + skillId, + mergedOptions, + )); + }, + }; +} diff --git a/src/sdk/search.ts b/src/sdk/search.ts index d8b2b8c62..a4ecf2ede 100644 --- a/src/sdk/search.ts +++ b/src/sdk/search.ts @@ -3,9 +3,11 @@ * @generated-id: b88871d87236 */ +import { searchListFilters } from "../funcs/searchListFilters.js"; import { searchQuery } from "../funcs/searchQuery.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; +import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Search extends ClientSDK { @@ -13,7 +15,8 @@ export class Search extends ClientSDK { * Search * * @remarks - * Execute a search query and retrieve ranked results. This is the data retrieval variant of the search API and returns only results and pagination state. + * Search your organization's connected content and return ranked document results with cursor pagination. Use `GET /api/search/filters` to discover datasource identifiers and common filter fields. Built-in filter names are validated; other field names are accepted as custom filters and behavior depends on your Glean configuration and connected sources. + * Errors: HTTP 422 `unprocessable_query` returns no `results` or `next_cursor`. See `warnings` on the response for non-blocking issues such as partially available results. Not every query issue produces a warning or error. */ async query( request: components.PlatformSearchRequest, @@ -25,4 +28,24 @@ export class Search extends ClientSDK { options, )); } + + /** + * List search filters + * + * @remarks + * List datasources and common built-in filter fields visible to the authenticated user. This is a best-effort catalog, not an exhaustive list of every filter search accepts. + * Without `query`, returns field metadata only and does not run a search. With a nonblank `query`, provide exactly one `datasources` value to request suggested filter values for that query; no documents are returned and this endpoint does not include warning objects. See `FilterFieldInfo.values` for limitations on suggested values. Rate-limited requests return HTTP 429 with `Retry-After`; temporary backend unavailability returns HTTP 503. + */ + async listFilters( + datasources?: Array | undefined, + query?: string | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(searchListFilters( + this, + datasources, + query, + options, + )); + } } diff --git a/src/sdk/skills.ts b/src/sdk/skills.ts index 9155b6911..895076db0 100644 --- a/src/sdk/skills.ts +++ b/src/sdk/skills.ts @@ -11,6 +11,7 @@ import { skillsRetrieve } from "../funcs/skillsRetrieve.js"; import { skillsRetrieveContent } from "../funcs/skillsRetrieveContent.js"; import { skillsRetrieveVersion } from "../funcs/skillsRetrieveVersion.js"; import { skillsRetrieveVersionContent } from "../funcs/skillsRetrieveVersionContent.js"; +import { skillsUpdate } from "../funcs/skillsUpdate.js"; import { skillsValidate } from "../funcs/skillsValidate.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; @@ -71,6 +72,25 @@ export class Skills extends ClientSDK { )); } + /** + * Update skill + * + * @remarks + * Update mutable metadata for a skill. V1 supports enabling or disabling a skill without changing its content. + */ + async update( + platformSkillUpdateRequest: components.PlatformSkillUpdateRequest, + skillId: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(skillsUpdate( + this, + platformSkillUpdateRequest, + skillId, + options, + )); + } + /** * Retrieve skill * From 963bef6d58b0312f552265993211d201699c2c10 Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Fri, 24 Jul 2026 02:23:35 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow