diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index cbd7ac0d..798df627 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 3e3290ca-0ee8-4981-b1bc-14536048fa63 management: - docChecksum: 586f40e432b9bb469fad89ebabfbc480 + docChecksum: b1de8635637b0e83c112aebcd85be7da docVersion: 0.9.0 speakeasyVersion: 1.790.3 generationVersion: 2.918.4 - releaseVersion: 0.15.4 - configChecksum: 0f7f272cfbc1986b8c5a32550c674049 + releaseVersion: 0.15.5 + configChecksum: 2d7eb6b1e296b48ffc7d66cf6e6b21cd repoURL: https://github.com/gleanwork/api-client-python.git installationURL: https://github.com/gleanwork/api-client-python.git published: true persistentEdits: - generation_id: f115e84c-5118-4c26-a87b-9d23d8f7c5d0 - pristine_commit_hash: 570840404722046c131de65886065b4f1a47b4a6 - pristine_tree_hash: 0bcc83861a2d536b8c3b107a001e5201fabac01a + generation_id: bbf0cc8e-f3f8-4932-ae4b-f62f2351ad58 + pristine_commit_hash: 3265810e95ca94e0593bf43a38f72f9314f358c7 + pristine_tree_hash: 7a4e041d27dbf6b9b0594641cff747371f93c955 features: python: acceptHeaders: 3.0.0 @@ -807,8 +807,8 @@ trackedFiles: pristine_git_object: 8445ecad49bc3bbd7b064649b72e824713db1ae7 docs/models/datasourcecategory.md: id: 0480a1f35070 - last_write_checksum: sha1:015d56c41be98ea2c521890e16153d81d293e77a - pristine_git_object: eccdbdeb57567caebb4ae64d7f8a263ed38a989a + last_write_checksum: sha1:221e5a4f881063f398b9881d36d622747d3ede52 + pristine_git_object: c7a5d3c3182c0a7820f14cd6395fc9a7690aa4fb docs/models/datasourceconfigurationresponse.md: id: 7c6f38290f96 last_write_checksum: sha1:10c0068be581150ab5915785029e610bdf472ab5 @@ -1083,8 +1083,8 @@ trackedFiles: pristine_git_object: 52a18a1148721667dfc7a24e9858cfba774d5c78 docs/models/doccategory.md: id: 821ad62d2df6 - last_write_checksum: sha1:dde799e6eb1d7b4b1515d636c07939219b3cfa0f - pristine_git_object: 3560e89449148b672eebef4ff2dbd84ca47d7b25 + last_write_checksum: sha1:1ec7a9915ac0698a53f2f01edb122cb6e14b76ef + pristine_git_object: 0e883592d7c11977a24a16657452e4a11b53c2a1 docs/models/document.md: id: cd1d2a444370 last_write_checksum: sha1:3c58b1bee296890b3ad00d72b32647ab4ae67bd4 @@ -2213,14 +2213,22 @@ trackedFiles: id: a9175ad4799d last_write_checksum: sha1:abb012a639cead86824ed11e596bda3632e2fddb pristine_git_object: 1b46526d54ef25a1d018d2cfd3bbafde48fba72a + docs/models/platformdatasourcefilterinfo.md: + id: 61ae1a6d6454 + last_write_checksum: sha1:41734266d612f710490590c79d1104b15e165291 + pristine_git_object: 8119fc5d60b5afc43b6fa6c91205061bbd9a9b3b docs/models/platformfilter.md: id: 4e97760ae8b9 - last_write_checksum: sha1:d78122b73a8014e7103935402b9167728bcaec34 - pristine_git_object: b3e8b651de43912c7092a7cb624cda0b3f9ea48a + last_write_checksum: sha1:c331962f750f8e583ea3f50d70027a2a23225ad3 + pristine_git_object: b13127363cc92f9425c6af95318b53ce2e398c41 + docs/models/platformfilterfieldinfo.md: + id: 9a7fa851c702 + last_write_checksum: sha1:e3712cf98275e049b47ab544eb8e8c2a28c05c5b + pristine_git_object: 8908111829612f9a67a7da3c9f18dc524d785ca8 docs/models/platformfilteroperator.md: id: 459d8f60cd58 - last_write_checksum: sha1:909a73760255616436ed2c71e3aeb5895e03dd68 - pristine_git_object: f814671e353534b461511918a4b553733635b691 + last_write_checksum: sha1:98575b0dfa32c14f341fc95490c0e2c5cace9fe8 + pristine_git_object: d97b6753e2056405bec741b206680b230891c331 docs/models/platformmessage.md: id: ea30c4fdad14 last_write_checksum: sha1:890468283cb6b47c68edf4b7b241dec096699d95 @@ -2247,16 +2255,28 @@ trackedFiles: pristine_git_object: 169944d5c3ce0c14a23f82a9c5ac30efdec24533 docs/models/platformresult.md: id: 0fe3fed8d508 - last_write_checksum: sha1:3a4ba99a8923e7504e9f1606eca7a2ab7277e746 - pristine_git_object: e9b2cd6a291372feb2023cc2896f9aad75c400a6 + last_write_checksum: sha1:00c06fea69f19c8deedd7c27aa8fa735d1b04612 + pristine_git_object: 330039872116266288ec6bb54841328449f04759 + docs/models/platformsearchfiltersrequest.md: + id: 8bbc53cc30ee + last_write_checksum: sha1:e72c60e81d9b005abde6716e7036d8937aad2615 + pristine_git_object: 001723a502745d7ff5f80201dd8b432453e56ee3 + docs/models/platformsearchfiltersresponse.md: + id: 9ea2f0a45c78 + last_write_checksum: sha1:6a9d79d2ce163618620bc33f94b7409290195a66 + pristine_git_object: ee35d03324d6180936e9f0851d7516c641255b29 + docs/models/platformsearchfiltersresponseresponse.md: + id: 6296f0269b3a + last_write_checksum: sha1:fa863a1edcde689e9ce84e803c024f0db6ed4ff4 + pristine_git_object: dc35339f57048b4a4f944d31159cae21f09d4f32 docs/models/platformsearchrequest.md: id: 9f3be4029289 - last_write_checksum: sha1:5a163a68ccc04dd0a7f8fb8e75c41e39eceef100 - pristine_git_object: 30ff66c03c2b88bb2ec72e7a7f4dfa135d21d8f6 + last_write_checksum: sha1:b690be7d344311de3865bb4e19c32de3c2e1e470 + pristine_git_object: 1972bc5104d040207fa34c6e87b6346b707c9c2f docs/models/platformsearchresponse.md: id: b20c8f7128fc - last_write_checksum: sha1:958639d5fa5b446156df39fd5f69b6c57265f13a - pristine_git_object: 219a923e48c2a8cb9333d211f51a87df045a8002 + last_write_checksum: sha1:2a830bd20b46e9d3079e7445a39122c9a2457320 + pristine_git_object: 74045b8a6ae5e046bacdfb861ababddb3d770f5c docs/models/platformskill.md: id: 83c575f92901 last_write_checksum: sha1:6b749a33dc64251968dac815aec5189373449b3e @@ -2329,10 +2349,26 @@ trackedFiles: id: 33c93e7414d6 last_write_checksum: sha1:7012661e93710994b8dc2a827b82bdb7da8bbb5f pristine_git_object: 566f1092589cad8787c57dd7042e2f2c71ea49b4 + docs/models/platformskillsupdaterequest.md: + id: f8592c4371a6 + last_write_checksum: sha1:32c122889d11396f07aef39f80135d7c15880d70 + pristine_git_object: 3ea30e833501442e500b5572098b632d97d0f7ab docs/models/platformskillsyncstatus.md: id: c12e6da882a8 last_write_checksum: sha1:ddca3bc0c472815cbf35240dc3ce2f17c6fc87e2 pristine_git_object: 36b3ddd907f7ed42f42bfb7983afdb9f4dfb2b42 + docs/models/platformskillupdaterequest.md: + id: 6203e2a98d33 + last_write_checksum: sha1:593dd3b031c30c8fae572763aae685c552f22f03 + pristine_git_object: 1d94bb0a434f77403b9f6c4109e6beb9c71fa6a4 + docs/models/platformskillupdateresponse.md: + id: de4f570e9a3d + last_write_checksum: sha1:da13ed5450b210d4064056c72a712b270e6fe718 + pristine_git_object: ae42e1d6a8e34603f2e157126f6eb8e733f6c3ff + docs/models/platformskillupdatestatus.md: + id: bbf036925440 + last_write_checksum: sha1:21c6edca9d3ba5ae257ae975d4fe66dfd707f6f6 + pristine_git_object: 898c434f2864d96532b529d80076e2b5cb20d68a docs/models/platformskillvalidationfile.md: id: ec82528a1836 last_write_checksum: sha1:f4f4f45aeabf5eb63cf40ce57edc939fe13a8d17 @@ -2351,12 +2387,8 @@ trackedFiles: pristine_git_object: 6802ab6379b6bd6cca97269c82fd78e88d29973a docs/models/platformskillvalidationresponse.md: id: 0c84081113d2 - last_write_checksum: sha1:24738d3981badb8640a6d34cc45c19ae7262aa87 - pristine_git_object: e1b24bc3160837a6f0dbed3b0f0bc6b843c51c22 - docs/models/platformskillvalidationwarning.md: - id: 7bf3eccb6607 - last_write_checksum: sha1:8cf24326d5c8bd98dd20bb1ef79141536a7511d8 - pristine_git_object: 128a3f9f17c6636717f4293ce9e0b08b74665b4d + last_write_checksum: sha1:5c2e270d4d9137ac55be2caeb0a2fb16de8bce23 + pristine_git_object: 9f8ab67f1fb03205ea3c9ef3ddc0002fe2622a1f docs/models/platformskillversion.md: id: b42042487614 last_write_checksum: sha1:e137b5b43e787f547287317e56776c0375a21c5d @@ -2385,6 +2417,10 @@ trackedFiles: id: c37b2e815a8d last_write_checksum: sha1:31db2f83dba4ccb6d0a5e7b80edbeff356529101 pristine_git_object: ff19123b19a2dd81301974a38d793afff935e9aa + docs/models/platformwarning.md: + id: 458ffec7aa61 + last_write_checksum: sha1:b70d5a767413fd7559601eb8e1e9728ad8b15773 + pristine_git_object: f0a2b5fa43037837c25040988cf8135560a30bb1 docs/models/possiblevalue.md: id: 630387aebbc5 last_write_checksum: sha1:490f03fc39621ae0f816bb16d2922e1a8042cdb1 @@ -3267,12 +3303,12 @@ trackedFiles: pristine_git_object: 5dd26e03b79389a3e71e90f9a3ce29b7fa384dd9 docs/sdks/search/README.md: id: 5c534716244c - last_write_checksum: sha1:4d8def390ef8fa9ed86c89d16d54283263f18849 - pristine_git_object: 04d61f7683d46497cb5eb0c511aa5c31f524a95d + last_write_checksum: sha1:4e2148cb7fce20b3afd277cd417a1711eb4299c9 + pristine_git_object: e8db7383c463ca50b1521dbe4ce637697dba67de docs/sdks/skills/README.md: id: 3a14a5c90791 - last_write_checksum: sha1:3cb350a1e984cde5decdeb8ede7517e879d5859d - pristine_git_object: 600669451fee894dc9ed8e129fb68d6aaa0b4c5e + last_write_checksum: sha1:547e30c0bf5d7e91663c28f0d67e279f8a15a5f9 + pristine_git_object: 1dbca57b6fe723c272b9c22f5e96de2cbc823882 docs/sdks/tools/README.md: id: 044286549bac last_write_checksum: sha1:a4916d6065377693c59cfbe6ff5072e83f204965 @@ -3295,8 +3331,8 @@ trackedFiles: pristine_git_object: 79e388be87446ab6a4064b372bad0e8376d0cb5e pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:b617fe03b7f525d4c97e00541628a66356f87480 - pristine_git_object: 932a174501a63a80b6e36b4a4f632bfabf71ab6e + last_write_checksum: sha1:9c2b7ba7389ced3c8053a72c448e7469e100b356 + pristine_git_object: 117283a08d360c54cbcf8ad95bfd2636e2a05f7c scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:c2c83f71dea61eb50c9e05da83b16d18b4da8794 @@ -3323,8 +3359,8 @@ trackedFiles: pristine_git_object: 55f23c1feabfedeb7e8cd5bea8b910f0ae0b77d9 src/glean/api_client/_version.py: id: 0ce22b26136b - last_write_checksum: sha1:47ebac8e1284fcf058927aabaf133ae74192f2cc - pristine_git_object: 97481002c2cb88d9f0c3e363f7008bd1d15c041a + last_write_checksum: sha1:48fb0cd4ab2cb2aeef0ff9c013358e4ece12c525 + pristine_git_object: 693c1890cdde81b3cd8ca83e5558ef74524e454f src/glean/api_client/agents.py: id: b925701a9217 last_write_checksum: sha1:d80196ac5b252a938055308b99efa4830a763ea6 @@ -3491,8 +3527,8 @@ trackedFiles: pristine_git_object: 77016bfff6209866592fd8b42f2f3527f900992b src/glean/api_client/models/__init__.py: id: d5f6ea5efcbe - last_write_checksum: sha1:6af0f67725b1b578fb9ef172e24132d5f0545721 - pristine_git_object: 029adafef7bdd43fd2244cfe2d899ff71ae63f47 + last_write_checksum: sha1:e960e058752403c88c6604ee54a3dce7e662cf88 + pristine_git_object: 788e786ceb0963086c68161b0913d560db3a0355 src/glean/api_client/models/actionauthtype.py: id: c7402f35092d last_write_checksum: sha1:7aaa5d1c11b105d0d7265e2a83cb005aafa89645 @@ -3995,8 +4031,8 @@ trackedFiles: pristine_git_object: 1236b65335edafb09cc59136ce8049c614a1a289 src/glean/api_client/models/customdatasourceconfig.py: id: fb9b6a1441c1 - last_write_checksum: sha1:61fd17497a8f0eb3a2eeccd8eec68a2a30cc548a - pristine_git_object: 635c888a5958270b094a87b594bc345964b09f20 + last_write_checksum: sha1:61cefdb4a183e04e426c1166056354a466c6380d + pristine_git_object: 0b728d6fc411a1f8d83643b518af6e5502ee51d0 src/glean/api_client/models/customdatavalue.py: id: 956eba94ae1a last_write_checksum: sha1:76c80857d8b125cc75d3da0da1d2f489dc9847e4 @@ -5047,8 +5083,8 @@ trackedFiles: pristine_git_object: d68228bc28c443824b2b73ff1c899053769a56b9 src/glean/api_client/models/objectdefinition.py: id: 96d425234754 - last_write_checksum: sha1:bbf4d288df6ccc0bed076dbbc0f6a0ee6dba9d3f - pristine_git_object: f9c359d3f7be386a2e9b6a7d9af5fed1613c4c1a + last_write_checksum: sha1:b63817fa6c300a10905043a49f23466ff583ff98 + pristine_git_object: 65f80f05226193a90eda813741acac28ba772f90 src/glean/api_client/models/objectpermissions.py: id: 6a2561118579 last_write_checksum: sha1:e3d51c6afdf467afe6559222130ac627a2331625 @@ -5145,6 +5181,10 @@ trackedFiles: id: 606568a4c8fc last_write_checksum: sha1:58370e345df87a242670e2cfdb26800caa6a00ce pristine_git_object: 880c65c1e74dd49543d650516f29141c6cdd486d + src/glean/api_client/models/platform_search_filtersop.py: + id: 3876ec8f6e5b + last_write_checksum: sha1:0551a1836339a7b0f5dea4cf8946e001384d3146 + pristine_git_object: 2120898eda5b77bff898692d2bff7c90a74513ae src/glean/api_client/models/platform_skills_create_versionop.py: id: c107217b99a3 last_write_checksum: sha1:03372f5d66b5644281f59d46b1e34f414ba75da9 @@ -5173,6 +5213,10 @@ trackedFiles: id: 2172706b6858 last_write_checksum: sha1:7e9d92bd23b8072d38fc787c08d2c1d11afee1dd pristine_git_object: 3f77419309047da04a558921ae77b447bf465d40 + src/glean/api_client/models/platform_skills_updateop.py: + id: 48967688f399 + last_write_checksum: sha1:f68e7c13d27210e6b53530e94b24408540d4314c + pristine_git_object: 42e0aca116a2efe4c5677df642857a6d87ea33b8 src/glean/api_client/models/platformactionsummary.py: id: 00069b22d246 last_write_checksum: sha1:f714e076c3e0c86ded17dd732ba304dfc7d5526e @@ -5221,14 +5265,22 @@ trackedFiles: id: 87e6bc168e08 last_write_checksum: sha1:97548628abf68b0b2727ba126ce363000e8d2882 pristine_git_object: c327d0ce5243c8fce910468c09d681a8d254ae1a + src/glean/api_client/models/platformdatasourcefilterinfo.py: + id: 30d2d116afc7 + last_write_checksum: sha1:fe1bb6ad44d39ce794c56869d659333ac4fe5ade + pristine_git_object: cd2ba67fa39dab5eb8b2490daa3872fcff56719e src/glean/api_client/models/platformfilter.py: id: e0719ea40cc5 - last_write_checksum: sha1:cdedb8731ce215c98444464e4e852b60e519e669 - pristine_git_object: 40c1e357d26b23063b2d1d71062c5c67eb12a330 + last_write_checksum: sha1:a56bda496c9eb473d9aaa08426e077e2694216d9 + pristine_git_object: 2243c5535a3e7a8a76c0e7845a496dea1d97ad81 + src/glean/api_client/models/platformfilterfieldinfo.py: + id: 5be6062efbd8 + last_write_checksum: sha1:ad8f52a53b9839f63ac0f4eabc4e3cffcd6a5790 + pristine_git_object: 755b03c792d7ef713fb86ef6d119e19c8b27f116 src/glean/api_client/models/platformfilteroperator.py: id: f7d7bf136596 - last_write_checksum: sha1:843173c8116781c6b5eba46db3896f3cd55126ce - pristine_git_object: 1ac40ef8de6ff847c54ade940beb6ea97704999c + last_write_checksum: sha1:542dab71eb37501311f1457ef804f2486cc12d69 + pristine_git_object: f0185fb9ecc077306220bae51217c1eb86018aec src/glean/api_client/models/platformmessage.py: id: 5124dae40c5d last_write_checksum: sha1:e86beb4e210ed500ab72011ef90bb97b909a39e8 @@ -5255,16 +5307,20 @@ trackedFiles: pristine_git_object: 336efdc33bfb762c3b0ddfc706b8d089da3cc23f src/glean/api_client/models/platformresult.py: id: 65de4ed5c1b3 - last_write_checksum: sha1:d4635567744c3c488806d4a1ba5235d2d9e6ca40 - pristine_git_object: 08c36e88c8f88d7b63173530501d35326bd32de1 + last_write_checksum: sha1:b4b820992eaa454f9ac072e152204c6289e2a314 + pristine_git_object: 167efcae3bc5bd648b92288a284109f367803d2d + src/glean/api_client/models/platformsearchfiltersresponse.py: + id: 743edd99f7aa + last_write_checksum: sha1:9c6e81390c3f1665bc2d26c2e3c5face283f759d + pristine_git_object: 1d8aa68908c3e182cbc926542d39bfc45d585be3 src/glean/api_client/models/platformsearchrequest.py: id: f2376466383f - last_write_checksum: sha1:30d48da0462fead00d34a7ad3cb5687b4fbeb8ba - pristine_git_object: 8f37fa7d2d319a465a977c83718f6e7e10fab908 + last_write_checksum: sha1:0255eb2414fa128be1d2369af61a6f9b9aa0fa53 + pristine_git_object: 8a3cd9bc7053b60f71b536f9f8e3593355bf5579 src/glean/api_client/models/platformsearchresponse.py: id: 7ee9ec06e00c - last_write_checksum: sha1:9ed8c951be31629e50f797c8e4bd59a1ef494eef - pristine_git_object: d98c78d622564a3fc35ed6d5d543866f64f76704 + last_write_checksum: sha1:ffcd075eb5fc0308760c1ac2065ad4915cc94642 + pristine_git_object: ff13d204ece88b150c32fb69c65e266c7756b1af src/glean/api_client/models/platformskill.py: id: 10e1f311015c last_write_checksum: sha1:c0225f37738625dbb6cab763be77cf5e40beafeb @@ -5301,6 +5357,18 @@ trackedFiles: id: 4603ae41cbb9 last_write_checksum: sha1:911e9731ed66a257df85158125499d212a37f995 pristine_git_object: 13fb6bcf5a11934ae1c8e1cd100715fd8aaaedf6 + src/glean/api_client/models/platformskillupdaterequest.py: + id: 02dbc059a73d + last_write_checksum: sha1:84dd229a9a3f9cf61b6be86a544bece3187b5c22 + pristine_git_object: 0d87a591d2b5c92c347c166731dced9c89da0330 + src/glean/api_client/models/platformskillupdateresponse.py: + id: 4a7d3fa0c78f + last_write_checksum: sha1:ea15b9e50758327fe3bb81eeae59c81f226dcc6f + pristine_git_object: b508a52fe52301ac4c371126c3ea8f09d411b6a8 + src/glean/api_client/models/platformskillupdatestatus.py: + id: a1d6763af4bf + last_write_checksum: sha1:3655d3529f2bad31a7424a908deaa69afc46782b + pristine_git_object: ede7b308d849e5253a989fd75bd3485b16bed70e src/glean/api_client/models/platformskillvalidationfile.py: id: 840ce4c25e59 last_write_checksum: sha1:a179e1a787bba71733234145ad88e9dd3350cd5a @@ -5315,12 +5383,8 @@ trackedFiles: pristine_git_object: d0a3a2b4d53d722ee63fde843f4e83b695f0ba62 src/glean/api_client/models/platformskillvalidationresponse.py: id: 9ce3b88a9cc1 - last_write_checksum: sha1:efe29e74dba840e7eca2d0219face8eaaab14793 - pristine_git_object: 70624e36ac8b7651e9873d3e5273fad7c8caf11e - src/glean/api_client/models/platformskillvalidationwarning.py: - id: f5af64c67dfd - last_write_checksum: sha1:b90b0e91caa4d9d375d4f602f245a717bdae2870 - pristine_git_object: dfd939ef42d4c30171ae289be5b78192d36980a3 + last_write_checksum: sha1:40595cbd0cb6e9e4ea8621266432b8a99967e865 + pristine_git_object: 76af15759b1cf333367ba3f25496adae56ab0fdc src/glean/api_client/models/platformskillversion.py: id: a9b3f54c0ef8 last_write_checksum: sha1:507ac67246f4d360aef9c77bc6eed79d11d82e9a @@ -5345,6 +5409,10 @@ trackedFiles: id: bf2b03e84949 last_write_checksum: sha1:645217a3827cd2a7455b88277f1ba2dcd4a5daf1 pristine_git_object: 0a5acb2a9110e33b96db4e36aa09c1bf36ab1cbf + src/glean/api_client/models/platformwarning.py: + id: b99ca6ee1c74 + last_write_checksum: sha1:4e82a608e924c72338481e61b2e51fec9e447605 + pristine_git_object: 3f5ea79c0debd518f17935277fe3e3bd3e6870b1 src/glean/api_client/models/possiblevalue.py: id: 6046129b9c7d last_write_checksum: sha1:4495a1288f312de877f9bcaa547f35178119ca59 @@ -5971,12 +6039,12 @@ trackedFiles: pristine_git_object: 22e0a4eab0ef8e54dcfd986084d01c14a56f47a6 src/glean/api_client/search.py: id: a3b404a8b402 - last_write_checksum: sha1:d89f2b24da1d3355e321bf802841bc17cdde30a4 - pristine_git_object: 571fc8909a3c8be6c852a995894ac61c9d743a6f + last_write_checksum: sha1:a46e1a0aca2fcf75971fdb1f6eb3b72529394c25 + pristine_git_object: 91ea57d2012c5dda71fb1a4b5d420173d7c357b5 src/glean/api_client/skills.py: id: 79f3c37e1b5a - last_write_checksum: sha1:48b915741fc9f81623772efe099a5a83c70c9ccc - pristine_git_object: 094194c4dfde7aa5a6a4895635f568b6b045c404 + last_write_checksum: sha1:0dab0e09c97067b370df8af95915eca39e30cf7a + pristine_git_object: 3246eab4b990c28aab7522666327b57205c953a6 src/glean/api_client/tools.py: id: 3ea40147c1cc last_write_checksum: sha1:9c353defdddf1c89f58a4b7d7cb8b22e4cb0be1d @@ -6131,8 +6199,8 @@ trackedFiles: pristine_git_object: 929558ef2e1165f7e09da6d0a64f016c90971655 tests/mockserver/internal/handler/generated_handlers.go: id: 61ac4f7cce9e - last_write_checksum: sha1:b5ecf7362e796b0cd3a2a23be481325a311469df - pristine_git_object: f24dcff889d5e223019b522e6bc725bf20c21bea + last_write_checksum: sha1:62e91b23671ab6e7bad0f2bbf70c2bbab8817e9c + pristine_git_object: ff3dc8846756a1b9d0b744b66b04e9b49006e405 tests/mockserver/internal/handler/pathdeleterestapiindexcustommetadataschemagroupname.go: id: 979e4583765b last_write_checksum: sha1:b1d4edb259d907c7a88b634bf16f0cf152321693 @@ -6149,6 +6217,10 @@ trackedFiles: id: a3a921765081 last_write_checksum: sha1:41dfbc3d70153e24cc2a898336d7d2a9c6e3d3df pristine_git_object: a9212f1d5de9d8b40e73ea4b410feb26921c35cb + tests/mockserver/internal/handler/pathgetapisearchfilters.go: + id: 2a805587fc23 + last_write_checksum: sha1:9579545a91c3b5e5a204ede2f630f1e0e738b872 + pristine_git_object: 61dfb292ca694340fd9796a891113cfb07aa8a32 tests/mockserver/internal/handler/pathgetapiskills.go: id: a1697453079c last_write_checksum: sha1:1608120c2f9ce748fdd2d373e576b6a0758092c1 @@ -6225,6 +6297,10 @@ trackedFiles: id: 1598fa297cf6 last_write_checksum: sha1:8b0d26cd221009e78396ed0c573e78c0ac719e36 pristine_git_object: 163466cb44aa1a16439b3bd65ab52f00aeeff427 + tests/mockserver/internal/handler/pathpatchapiskillsskillid.go: + id: e09721a8879b + last_write_checksum: sha1:90c425f15814afd0ac42817b7ad6a056b6efc278 + pristine_git_object: 2b4d9db548fd58503a768732db17aca59d354d25 tests/mockserver/internal/handler/pathpatchrestapiv1configuredatasourcesdatasourceidinstancesinstanceid.go: id: 24dd79d2c474 last_write_checksum: sha1:14d3e93a3f37b61145188a9e6544398fcfc200e4 @@ -6339,8 +6415,8 @@ trackedFiles: pristine_git_object: 9bb5d5769dfb3a4e78676950e8a2706f119bfc5c tests/mockserver/internal/handler/pathpostapisearch.go: id: 53e6a34b5b4b - last_write_checksum: sha1:503df322e00b6cb1cb9cc80d7aa30d63c96df86f - pristine_git_object: 1575aab3ac4539db059de358acc56ecc7f90ff07 + last_write_checksum: sha1:5c878b42ee0ffe08f9ad98c3e1f1c9c20ce4d21a + pristine_git_object: 1e3fe6a9bed655ba32d7c59fe577f41beac69da8 tests/mockserver/internal/handler/pathpostapiskills.go: id: 8ed490cc6d95 last_write_checksum: sha1:5749c3cbb8d3cc90c75ead5cd6547775e97d1ef4 @@ -6351,8 +6427,8 @@ trackedFiles: pristine_git_object: 1f3d1fde1c6e5db9a85a116b88255e61a451fab4 tests/mockserver/internal/handler/pathpostapiskillsvalidation.go: id: eaa6c1478b34 - last_write_checksum: sha1:af5dfe71ae16b04fb1b676f82b0c0ba99016103d - pristine_git_object: 0fee34fc2b49e9120fcb4bdd12158e350b392dd3 + last_write_checksum: sha1:cc8f959924866fdf5febe729b5d5819ff7e53173 + pristine_git_object: 2048ae91e6f81a6ecb4bb9281ef60ce287330724 tests/mockserver/internal/handler/pathpostrestapiindexsubmissionsdatasourceinstancetype.go: id: 1a5daf7874ce last_write_checksum: sha1:b5b37f0b5a7b4d9a4c69ab523e831f1702301118 @@ -7087,8 +7163,8 @@ trackedFiles: pristine_git_object: c1398b9642555e881ef73a4fa8fe66d01ee9e8d1 tests/mockserver/internal/sdk/models/components/customdatasourceconfig.go: id: 67f505cc5524 - last_write_checksum: sha1:5cb7123d955c9782fec8f8c70570d77a0712d08d - pristine_git_object: 070e9e3590a58bb245c0569f512f2298abbbcf3b + last_write_checksum: sha1:4885800f11a0bed0b0d97459193fe50aed95cdb2 + pristine_git_object: 4316d060b299a480cc59608a812458defd2b0229 tests/mockserver/internal/sdk/models/components/customdatavalue.go: id: 37ac657fead8 last_write_checksum: sha1:e2d63d9372dd1858f8d3524ca247d0f5a0e5db3a @@ -7927,8 +8003,8 @@ trackedFiles: pristine_git_object: 6d8bb0637e98328c014db61a92fcb9f65f378d1c tests/mockserver/internal/sdk/models/components/objectdefinition.go: id: b31a249b0ab6 - last_write_checksum: sha1:bb870ed291515df1134057b714064b863884817f - pristine_git_object: 9a9c55c638ac132d7ebe9f06b13a49c80be29fd0 + last_write_checksum: sha1:4fb46c6216a0cfcc06a2eba090a8a54565eab685 + pristine_git_object: 32a3df40aae636faa61ffef31c606bc1e5e44ed6 tests/mockserver/internal/sdk/models/components/objectpermissions.go: id: ccc6831e9a89 last_write_checksum: sha1:a182302021d92910af1f940b60a5fd78f0288bac @@ -8053,10 +8129,18 @@ trackedFiles: id: d1a02baa3621 last_write_checksum: sha1:b552f26421544664b54a4423c8335c90b09480c6 pristine_git_object: e96a7c7850d7a0c456dd61d706232dd7c06cd0db + tests/mockserver/internal/sdk/models/components/platformdatasourcefilterinfo.go: + id: a1eb3b7148bf + last_write_checksum: sha1:094bff06100193f57b6766f2f42139c2e5bcd8b8 + pristine_git_object: e577fb7f7b9c911e698ec560181abbe596be0416 tests/mockserver/internal/sdk/models/components/platformfilter.go: id: 1762bf95c464 - last_write_checksum: sha1:4dc71d2576cddd00f93dfda6c2f584f9bff9ebcb - pristine_git_object: b8a9ea1a0663c345fd2a4bc04f3343c17409b868 + last_write_checksum: sha1:9a4357e8b4ccf75dd97072960321efb36dcf13a1 + pristine_git_object: c1ab5360ebdb5dda06e190b31faaca26b4d054f7 + tests/mockserver/internal/sdk/models/components/platformfilterfieldinfo.go: + id: c22bd1d66163 + last_write_checksum: sha1:be6276937481e3ff27ea4339a888496edbc85fc9 + pristine_git_object: 5b3272e0dd3464f9ee2f480dac80127bcdd499c4 tests/mockserver/internal/sdk/models/components/platformfilteroperator.go: id: 7daac12f5ae7 last_write_checksum: sha1:49fd1240cf9eb9d2259465f79e0c481d711ec37d @@ -8087,16 +8171,20 @@ trackedFiles: pristine_git_object: 058f5e62bda5173fed3b24fff078d7540a1378f7 tests/mockserver/internal/sdk/models/components/platformresult.go: id: dd777258615b - last_write_checksum: sha1:d3e76064cc9fa1c7431e3ecb6bb07b47b08a08c7 - pristine_git_object: 441ea968bfe1ee6d8c9eecac245f9ad48621f02c + last_write_checksum: sha1:4343640607d8d0421164c0dc16daf5718d65e848 + pristine_git_object: f09289f87429f1cb7b7aced37ac349ebbd88e746 + tests/mockserver/internal/sdk/models/components/platformsearchfiltersresponse.go: + id: c6e01fb5cff1 + last_write_checksum: sha1:94caa146dcfafb521d396d19e5358da8c598faab + pristine_git_object: 51409a03c73a593fdad3d7b479a4e0c95d3b91a3 tests/mockserver/internal/sdk/models/components/platformsearchrequest.go: id: 4da7625f1c35 - last_write_checksum: sha1:33a8686e5aa62e2e090685ba89dae0bd0d4af5b9 - pristine_git_object: 108bab415b41d89047fba91239b362d2abba960d + last_write_checksum: sha1:1ca1f5c466206edca83b513db2e1179229e2f8cb + pristine_git_object: 83c3c79dedae573f3ee3185856fd12360918ce9b tests/mockserver/internal/sdk/models/components/platformsearchresponse.go: id: a58f32052764 - last_write_checksum: sha1:6db9bd73c6fd7cc1c8bf28c2b1ee96cc77d7236a - pristine_git_object: e8243de2c4e8582ed42736e75e4aa715a6a376bc + last_write_checksum: sha1:c2aea70c85fe71f160f527055a91f378caf3e6f9 + pristine_git_object: 3eed4668d26f9212f864b7e486d75dbbf920b68d tests/mockserver/internal/sdk/models/components/platformskill.go: id: a97a51039ff5 last_write_checksum: sha1:8871b58924c180a5565b43c91b58ed79212739bb @@ -8133,6 +8221,18 @@ trackedFiles: id: a172da0d9d4d last_write_checksum: sha1:66e29681184c77fbbff593cc30e33023a3b39c81 pristine_git_object: 0582664c1c7451d505bc18ea138e299db160c5a6 + tests/mockserver/internal/sdk/models/components/platformskillupdaterequest.go: + id: 77853bf3d285 + last_write_checksum: sha1:b327107396570bb07844005756dcbcc502c99030 + pristine_git_object: 16b5b62569411c6e73675a6e4322a5ad993994d6 + tests/mockserver/internal/sdk/models/components/platformskillupdateresponse.go: + id: 505fbacea4bd + last_write_checksum: sha1:2ef06dfd496e4209ccbdcf6bf246a31b97c23e46 + pristine_git_object: 99256154b7dc79f111888a4dff8e90127090bd1f + tests/mockserver/internal/sdk/models/components/platformskillupdatestatus.go: + id: "511258017192" + last_write_checksum: sha1:b430910b34dda5f1fa8b12d36ad9d40681664464 + pristine_git_object: d40a5b9ff289b22e47722564782e863c1ad983db tests/mockserver/internal/sdk/models/components/platformskillvalidationfile.go: id: 4c3718b26406 last_write_checksum: sha1:fda63f0276f5a36dca1e5b81fdc3e7b1e7766034 @@ -8147,12 +8247,8 @@ trackedFiles: pristine_git_object: 2f644ff648b531896643d65ebdc1122058f87527 tests/mockserver/internal/sdk/models/components/platformskillvalidationresponse.go: id: a886263018af - last_write_checksum: sha1:bd007dfb6d327b66b84f82206a4d92408db1aa55 - pristine_git_object: 55c51a4089110bf60bf88afcc4bce7c41704a11c - tests/mockserver/internal/sdk/models/components/platformskillvalidationwarning.go: - id: 43a47d51c9dc - last_write_checksum: sha1:d89836327a8138f2649f2610322c391088b71491 - pristine_git_object: 10a5ba75853164b246fbc7f2b7b41ac42ba05f4b + last_write_checksum: sha1:2dfde216c6f86cb10dc8514d7bdcdefa86eb404d + pristine_git_object: f8bd1eaedf0df29c529f9e641ea5fe59eb1479cf tests/mockserver/internal/sdk/models/components/platformskillversion.go: id: a742ffff90ef last_write_checksum: sha1:9d8ca19699faae865387810ce6eb941be4596cc3 @@ -8177,6 +8273,10 @@ trackedFiles: id: cf2540151ce1 last_write_checksum: sha1:3a0ec2ca473681b89ff97606f648fc15fcdae38e pristine_git_object: b88a152d5940b3e49fb73807c476607374d9d01e + tests/mockserver/internal/sdk/models/components/platformwarning.go: + id: bf3a0578fb90 + last_write_checksum: sha1:4f58e985f8592a928bb3d605f1a8538a5e611d2a + pristine_git_object: c96ef7a9b39cb05eac61f11511b5066c860cb411 tests/mockserver/internal/sdk/models/components/possiblevalue.go: id: bf71542de5f4 last_write_checksum: sha1:5c25db519b896499621e67c6245893d26afa30e4 @@ -9027,8 +9127,12 @@ trackedFiles: pristine_git_object: cdbc9f550e7d2339b0946fe4783a3b79a851f39d tests/mockserver/internal/sdk/models/operations/platformsearch.go: id: d990791ac101 - last_write_checksum: sha1:995d47533ef63c7518c50398593671059d6ccc07 - pristine_git_object: 16b6e86fe62e1e0ec43293439e9fba7995a72a80 + last_write_checksum: sha1:9da9b49850375b74bf6296fcec336ba9ad1e1eea + pristine_git_object: 381c8530dfb959419e47dee10c46cfdd5846f611 + tests/mockserver/internal/sdk/models/operations/platformsearchfilters.go: + id: 3f6c4119e4bd + last_write_checksum: sha1:e0836460229365773a66a5b310ba886d5fbdf202 + pristine_git_object: 8e578bcdd052389777bf51d0140176d523d4a976 tests/mockserver/internal/sdk/models/operations/platformskillscreate.go: id: cd743025fd37 last_write_checksum: sha1:af1e6384914f9cd0cc653f0492e99ec648168391 @@ -9061,6 +9165,10 @@ trackedFiles: id: ef57d1f31c39 last_write_checksum: sha1:60e17abc357b220cb752d85a411402a118b6fde7 pristine_git_object: 3853971fc3d394241809e862a204df0821c4e368 + tests/mockserver/internal/sdk/models/operations/platformskillsupdate.go: + id: a42134c7c823 + last_write_checksum: sha1:f570a0ea531945ee8ae803f4d8c582f7e9c86a79 + pristine_git_object: ec45cac3446e6c7ceef4a3e2d96da621bfcc1cc8 tests/mockserver/internal/sdk/models/operations/platformskillsvalidate.go: id: c98dd1ece70f last_write_checksum: sha1:2449140437acabcd61691b30b730c1edcec089f5 @@ -9495,8 +9603,8 @@ trackedFiles: pristine_git_object: 6cc8aeec3c52329d389081db0a27f10f53f214b9 tests/test_messages.py: id: be23089b1f8b - last_write_checksum: sha1:a91c985cd1d11560059dc448b10e0c7b75ed60e5 - pristine_git_object: dfdc18641f0d6c38d84b4603ad2da71f75f2e13c + last_write_checksum: sha1:b7415512608102fa07b1990a350a7da66946fe46 + pristine_git_object: 636f01d348f30db3ee81985044634511b615af16 tests/test_people.py: id: 37c243940039 last_write_checksum: sha1:7c7268ffeebe48d81ed25e9b1cfc3a395abf5c1f @@ -9515,16 +9623,16 @@ trackedFiles: pristine_git_object: 3fa82f944c8693f534f71d96c489225c3f65cb5d tests/test_search.py: id: dd86606b335f - last_write_checksum: sha1:b7c2a96a3d765d1498f9fe08dffc59cc4c8822ac - pristine_git_object: 3925a6e0f49d8e0b1b35ec08c38283a5643ed307 + last_write_checksum: sha1:aa49beadf59d0c27cd6d0d568968a21d3be76fc0 + pristine_git_object: 0761637adb8f1f7b236fcb7d04d9e3fecccc2b52 tests/test_skills.py: id: ac5db26bd6b1 - last_write_checksum: sha1:a9b45f5b6ff56bf6f3335435d5f757738192e1b5 - pristine_git_object: de32443a28cf8437b0df7879831978412172574f + last_write_checksum: sha1:7bab21e1437090731b26a6ea0641f61ddb4c409d + pristine_git_object: 7a281c7d17b3a65cc68e1d075f9e54eb4251c833 tests/test_summarize.py: id: a255d8a6f627 - last_write_checksum: sha1:37185416149f9acbd3383f6c279692aa31e2344a - pristine_git_object: 449a89669c90568cbef8fb81ea72eb5e5034bd39 + last_write_checksum: sha1:e73571e213636c1cc80230aff2db516efae5e6a3 + pristine_git_object: de410ac80fc43308c1eacf014fe16c530dea0f6d tests/test_tools.py: id: 70889bdf7321 last_write_checksum: sha1:d26d83639f731281bb518886f10571c7b0dbf935 @@ -10510,7 +10618,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": @@ -10655,6 +10763,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-04-28T22:05:12+01:00" @@ -10834,7 +10965,9 @@ generatedTests: platform-skills-get-version: "2026-07-21T08:59:49Z" platform-skills-get-version-content: "2026-07-21T08:59:49Z" post_/rest/api/index/submissions/{datasourceInstance}/{type}: "2026-07-21T08:59:49Z" -releaseNotes: "## Python 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.retrieve_content()`: **Added**\n* `glean.skills.create_version()`: **Added**\n* `glean.skills.list_versions()`: **Added**\n* `glean.skills.retrieve_version()`: **Added**\n* `glean.skills.retrieve_version_content()`: **Added**\n* `glean.indexing.datasources.submit()`: **Added**\n* `glean.client.chat.create()`: \n * `request.messages[].fragments[].action.metadata.action_type_source` **Added**\n * `response.messages[].fragments[].action.metadata.action_type_source` **Added**\n* `glean.client.chat.retrieve()`: `response.chat_result.chat.messages[].fragments[].action.metadata.action_type_source` **Added**\n* `glean.client.chat.create_stream()`: \n * `request.messages[].fragments[].action.metadata.action_type_source` **Added**\n* `glean.client.agents.create()`: `response.workflow.webhook_url` **Added**\n* `glean.client.search.retrieve_feed()`: `response.results[].primary_entry.workflow.workflow.webhook_url` **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:44:21Z" + platform-search-filters: "2026-07-24T02:44:21Z" +releaseNotes: "## Python SDK Changes:\n* `glean.search.query()`: \n * `request.datasource_instances` **Removed** (Breaking ⚠️)\n * `response` **Changed** (Breaking ⚠️)\n * `error.status[422]` **Added**\n* `glean.skills.update()`: **Added**\n* `glean.search.list_filters()`: **Added**\n* `glean.indexing.datasources.add()`: `request` **Changed**\n* `glean.indexing.datasources.retrieve_config()`: `response` **Changed**\n" generatedFiles: - .devcontainer/README.md - .devcontainer/devcontainer.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index b00f8adc..e610108f 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -34,7 +34,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: true python: - version: 0.15.4 + version: 0.15.5 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/glean-merged-spec.yaml b/.speakeasy/glean-merged-spec.yaml index 9b00266d..74254cec 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 1d05c2de..21cea03d 100644 --- a/.speakeasy/tests.arazzo.yaml +++ b/.speakeasy/tests.arazzo.yaml @@ -158821,7 +158821,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 @@ -159048,3 +159048,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 466397aa..b4e81c36 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: @@ -16,10 +16,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-python-code-samples - codeSamplesRevisionDigest: sha256:943570f36dd3410a28a56036049c09ace110d13bee2075f5f335acc143463cee + codeSamplesRevisionDigest: sha256:b9e1184456158f8d972e347c42c92ad56650ab74c2f7cfd7936e75a64660b673 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index b63a8978..c810b7b1 100644 --- a/README.md +++ b/README.md @@ -549,12 +549,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 +* [list_filters](docs/sdks/search/README.md#list_filters) - 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 * [retrieve_content](docs/sdks/skills/README.md#retrieve_content) - Download skill content * [create_version](docs/sdks/skills/README.md#create_version) - Create skill version diff --git a/RELEASES.md b/RELEASES.md index 67386a1f..a346fc02 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -808,4 +808,14 @@ Based on: ### Generated - [python v0.15.4] . ### Releases -- [PyPI v0.15.4] https://pypi.org/project/glean-api-client/0.15.4 - . \ No newline at end of file +- [PyPI v0.15.4] https://pypi.org/project/glean-api-client/0.15.4 - . + +## 2026-07-24 02:43:26 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.790.3 (2.918.4) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.15.5] . +### Releases +- [PyPI v0.15.5] https://pypi.org/project/glean-api-client/0.15.5 - . \ No newline at end of file diff --git a/docs/models/datasourcecategory.md b/docs/models/datasourcecategory.md index eccdbdeb..c7a5d3c3 100644 --- a/docs/models/datasourcecategory.md +++ b/docs/models/datasourcecategory.md @@ -34,4 +34,6 @@ value = DatasourceCategory.UNCATEGORIZED | `EXTERNAL_SHORTCUT` | EXTERNAL_SHORTCUT | | `ENTITY` | ENTITY | | `CALENDAR` | CALENDAR | -| `AGENTS` | AGENTS | \ No newline at end of file +| `AGENTS` | AGENTS | +| `AI_CONVERSATION` | AI_CONVERSATION | +| `AI_ARTIFACT` | AI_ARTIFACT | \ No newline at end of file diff --git a/docs/models/doccategory.md b/docs/models/doccategory.md index 3560e894..0e883592 100644 --- a/docs/models/doccategory.md +++ b/docs/models/doccategory.md @@ -34,4 +34,6 @@ value = DocCategory.UNCATEGORIZED | `EXTERNAL_SHORTCUT` | EXTERNAL_SHORTCUT | | `ENTITY` | ENTITY | | `CALENDAR` | CALENDAR | -| `AGENTS` | AGENTS | \ No newline at end of file +| `AGENTS` | AGENTS | +| `AI_CONVERSATION` | AI_CONVERSATION | +| `AI_ARTIFACT` | AI_ARTIFACT | \ No newline at end of file diff --git a/docs/models/platformdatasourcefilterinfo.md b/docs/models/platformdatasourcefilterinfo.md new file mode 100644 index 00000000..8119fc5d --- /dev/null +++ b/docs/models/platformdatasourcefilterinfo.md @@ -0,0 +1,9 @@ +# PlatformDatasourceFilterInfo + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `datasource` | *str* | :heavy_check_mark: | Datasource identifier usable in `POST /api/search` `datasources`.
| jira | +| `filters` | List[[models.PlatformFilterFieldInfo](../models/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/platformfilter.md b/docs/models/platformfilter.md index b3e8b651..b1312736 100644 --- a/docs/models/platformfilter.md +++ b/docs/models/platformfilter.md @@ -1,13 +1,13 @@ # 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. ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `field` | *str* | :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` | List[*str*] | :heavy_check_mark: | One or more values to match. | [
"spreadsheet",
"presentation"
] | -| `operator` | [Optional[models.PlatformFilterOperator]](../models/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` | *str* | :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` | List[*str*] | :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` | [Optional[models.PlatformFilterOperator]](../models/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/platformfilterfieldinfo.md b/docs/models/platformfilterfieldinfo.md new file mode 100644 index 00000000..89081118 --- /dev/null +++ b/docs/models/platformfilterfieldinfo.md @@ -0,0 +1,11 @@ +# PlatformFilterFieldInfo + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `field` | *str* | :heavy_check_mark: | Field name usable in the `filters` array for `POST /api/search`. | status | +| `type` | *str* | :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` | List[[models.PlatformFilterOperator](../models/platformfilteroperator.md)] | :heavy_check_mark: | Comparison operators supported for this field. Built-in fields expose `EQUALS` and `NOT_EQUALS`.
| | +| `values` | List[*str*] | :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/platformfilteroperator.md b/docs/models/platformfilteroperator.md index f814671e..d97b6753 100644 --- a/docs/models/platformfilteroperator.md +++ b/docs/models/platformfilteroperator.md @@ -8,6 +8,8 @@ Supported filter operator. from glean.api_client.models import PlatformFilterOperator value = PlatformFilterOperator.EQUALS + +# Open enum: unrecognized values are captured as UnrecognizedStr ``` diff --git a/docs/models/platformresult.md b/docs/models/platformresult.md index e9b2cd6a..33003987 100644 --- a/docs/models/platformresult.md +++ b/docs/models/platformresult.md @@ -9,7 +9,6 @@ | `title` | *str* | :heavy_check_mark: | Result title. | Q2 2026 Platform Roadmap | | `snippets` | List[*str*] | :heavy_minus_sign: | Query-relevant plain-text excerpts from the result body. | [
"The platform team will focus on API stability and..."
] | | `datasource` | *str* | :heavy_check_mark: | The datasource this result originates from. | confluence | -| `datasource_instance` | *OptionalNullable[str]* | :heavy_minus_sign: | The datasource instance this result originates from, if known. | confluence_acme | | `document_type` | *OptionalNullable[str]* | :heavy_minus_sign: | The document type within the datasource. | page | | `creator` | [Optional[models.PlatformPersonReference]](../models/platformpersonreference.md) | :heavy_minus_sign: | A lightweight reference to a person, used where a payload merely points at someone. | | | `owner` | [Optional[models.PlatformPersonReference]](../models/platformpersonreference.md) | :heavy_minus_sign: | A lightweight reference to a person, used where a payload merely points at someone. | | diff --git a/docs/models/platformsearchfiltersrequest.md b/docs/models/platformsearchfiltersrequest.md new file mode 100644 index 00000000..001723a5 --- /dev/null +++ b/docs/models/platformsearchfiltersrequest.md @@ -0,0 +1,9 @@ +# PlatformSearchFiltersRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `datasources` | List[*str*] | :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` | *Optional[str]* | :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/platformsearchfiltersresponse.md b/docs/models/platformsearchfiltersresponse.md new file mode 100644 index 00000000..ee35d033 --- /dev/null +++ b/docs/models/platformsearchfiltersresponse.md @@ -0,0 +1,9 @@ +# PlatformSearchFiltersResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `datasources` | List[[models.PlatformDatasourceFilterInfo](../models/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.
| +| `request_id` | *str* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/models/platformsearchfiltersresponseresponse.md b/docs/models/platformsearchfiltersresponseresponse.md new file mode 100644 index 00000000..dc35339f --- /dev/null +++ b/docs/models/platformsearchfiltersresponseresponse.md @@ -0,0 +1,9 @@ +# PlatformSearchFiltersResponseResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `headers` | Dict[str, List[*str*]] | :heavy_check_mark: | N/A | +| `result` | [models.PlatformSearchFiltersResponse](../models/platformsearchfiltersresponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/platformsearchrequest.md b/docs/models/platformsearchrequest.md index 30ff66c0..1972bc51 100644 --- a/docs/models/platformsearchrequest.md +++ b/docs/models/platformsearchrequest.md @@ -3,12 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `query` | *str* | :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`.
| -| `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of results to return per page. | -| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Opaque pagination token from a previous response's `next_cursor` field. Omit on the first request.
| -| `datasources` | List[*str*] | :heavy_minus_sign: | Restrict results to specific datasources. Requests must not specify both `datasources` and `datasource_instances`.
| -| `datasource_instances` | List[*str*] | :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` | List[[models.PlatformFilter](../models/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.
| -| `time_range` | [Optional[models.PlatformTimeRange]](../models/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` | *str* | :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`.
| +| `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of results to return per page. | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Opaque pagination token from a previous response's `next_cursor` field. Omit on the first request.
| +| `datasources` | List[*str*] | :heavy_minus_sign: | Restrict results to specific datasource identifiers returned by `GET /api/search/filters`. Scopes by datasource type and may include results from multiple instances of that type.
| +| `filters` | List[[models.PlatformFilter](../models/platformfilter.md)] | :heavy_minus_sign: | Structured filters applied to search results. Multiple values within a filter with `EQUALS` are OR'd; separate filters are AND'd. Conflicting constraints on the same field (for example, `type:document` in `query` and `type:spreadsheet` in a filter) return an empty result set. See `Filter.field` for built-in field names and operators. Other nonblank field names are accepted as custom filters without validation; behavior depends on your connected sources.
| +| `time_range` | [Optional[models.PlatformTimeRange]](../models/platformtimerange.md) | :heavy_minus_sign: | Filter results to those last updated within this range. | \ No newline at end of file diff --git a/docs/models/platformsearchresponse.md b/docs/models/platformsearchresponse.md index 219a923e..74045b8a 100644 --- a/docs/models/platformsearchresponse.md +++ b/docs/models/platformsearchresponse.md @@ -3,9 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `results` | List[[models.PlatformResult](../models/platformresult.md)] | :heavy_check_mark: | Ordered list of search results. | -| `has_more` | *bool* | :heavy_check_mark: | Indicates whether additional pages of results are available. | -| `next_cursor` | *Nullable[str]* | :heavy_check_mark: | Opaque token to pass as `cursor` in the next request. | -| `request_id` | *str* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `results` | List[[models.PlatformResult](../models/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.
| +| `has_more` | *bool* | :heavy_check_mark: | Indicates whether additional pages of results are available. | +| `next_cursor` | *Nullable[str]* | :heavy_check_mark: | Opaque token to pass as `cursor` in the next request. | +| `request_id` | *str* | :heavy_check_mark: | Platform-generated request ID for support correlation. | +| `warnings` | List[[models.PlatformWarning](../models/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/platformskillsupdaterequest.md b/docs/models/platformskillsupdaterequest.md new file mode 100644 index 00000000..3ea30e83 --- /dev/null +++ b/docs/models/platformskillsupdaterequest.md @@ -0,0 +1,9 @@ +# PlatformSkillsUpdateRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `skill_id` | *str* | :heavy_check_mark: | Glean skill ID. | +| `platform_skill_update_request` | [models.PlatformSkillUpdateRequest](../models/platformskillupdaterequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/platformskillupdaterequest.md b/docs/models/platformskillupdaterequest.md new file mode 100644 index 00000000..1d94bb0a --- /dev/null +++ b/docs/models/platformskillupdaterequest.md @@ -0,0 +1,8 @@ +# PlatformSkillUpdateRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `status` | [models.PlatformSkillUpdateStatus](../models/platformskillupdatestatus.md) | :heavy_check_mark: | New status for the skill. | \ No newline at end of file diff --git a/docs/models/platformskillupdateresponse.md b/docs/models/platformskillupdateresponse.md new file mode 100644 index 00000000..ae42e1d6 --- /dev/null +++ b/docs/models/platformskillupdateresponse.md @@ -0,0 +1,9 @@ +# PlatformSkillUpdateResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `skill` | [models.PlatformSkill](../models/platformskill.md) | :heavy_check_mark: | N/A | +| `request_id` | *str* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/models/platformskillupdatestatus.md b/docs/models/platformskillupdatestatus.md new file mode 100644 index 00000000..898c434f --- /dev/null +++ b/docs/models/platformskillupdatestatus.md @@ -0,0 +1,19 @@ +# PlatformSkillUpdateStatus + +New status for the skill. + +## Example Usage + +```python +from glean.api_client.models import PlatformSkillUpdateStatus + +value = PlatformSkillUpdateStatus.ENABLED +``` + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `ENABLED` | ENABLED | +| `DISABLED` | DISABLED | \ No newline at end of file diff --git a/docs/models/platformskillvalidationresponse.md b/docs/models/platformskillvalidationresponse.md index e1b24bc3..9f8ab67f 100644 --- a/docs/models/platformskillvalidationresponse.md +++ b/docs/models/platformskillvalidationresponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `metadata` | [models.PlatformSkillValidationMetadata](../models/platformskillvalidationmetadata.md) | :heavy_check_mark: | N/A | -| `files` | List[[models.PlatformSkillValidationFile](../models/platformskillvalidationfile.md)] | :heavy_check_mark: | Normalized files in the bundle after stripping an optional single root folder. | -| `warnings` | List[[models.PlatformSkillValidationWarning](../models/platformskillvalidationwarning.md)] | :heavy_check_mark: | Non-blocking validation warnings. | -| `request_id` | *str* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `metadata` | [models.PlatformSkillValidationMetadata](../models/platformskillvalidationmetadata.md) | :heavy_check_mark: | N/A | +| `files` | List[[models.PlatformSkillValidationFile](../models/platformskillvalidationfile.md)] | :heavy_check_mark: | Normalized files in the bundle after stripping an optional single root folder. | +| `warnings` | List[[models.PlatformWarning](../models/platformwarning.md)] | :heavy_check_mark: | Non-blocking validation warnings. | +| `request_id` | *str* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/models/platformskillvalidationwarning.md b/docs/models/platformskillvalidationwarning.md deleted file mode 100644 index 128a3f9f..00000000 --- a/docs/models/platformskillvalidationwarning.md +++ /dev/null @@ -1,9 +0,0 @@ -# PlatformSkillValidationWarning - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *str* | :heavy_check_mark: | Stable warning code. | -| `message` | *str* | :heavy_check_mark: | Human-readable warning message. | \ No newline at end of file diff --git a/docs/models/platformwarning.md b/docs/models/platformwarning.md new file mode 100644 index 00000000..f0a2b5fa --- /dev/null +++ b/docs/models/platformwarning.md @@ -0,0 +1,11 @@ +# PlatformWarning + +Non-blocking warning attached to a successful Platform response. + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `code` | *str* | :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` | *str* | :heavy_check_mark: | Human-readable warning message. | | \ No newline at end of file diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md index 04d61f76..e8db7383 100644 --- a/docs/sdks/search/README.md +++ b/docs/sdks/search/README.md @@ -5,10 +5,12 @@ ### Available Operations * [query](#query) - Search +* [list_filters](#list_filters) - 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 @@ -43,16 +45,15 @@ with Glean( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `query` | *str* | :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`.
| -| `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of results to return per page. | -| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Opaque pagination token from a previous response's `next_cursor` field. Omit on the first request.
| -| `datasources` | List[*str*] | :heavy_minus_sign: | Restrict results to specific datasources. Requests must not specify both `datasources` and `datasource_instances`.
| -| `datasource_instances` | List[*str*] | :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` | List[[models.PlatformFilter](../../models/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.
| -| `time_range` | [Optional[models.PlatformTimeRange]](../../models/platformtimerange.md) | :heavy_minus_sign: | Filter results to those last updated within this range. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `query` | *str* | :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`.
| +| `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of results to return per page. | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Opaque pagination token from a previous response's `next_cursor` field. Omit on the first request.
| +| `datasources` | List[*str*] | :heavy_minus_sign: | Restrict results to specific datasource identifiers returned by `GET /api/search/filters`. Scopes by datasource type and may include results from multiple instances of that type.
| +| `filters` | List[[models.PlatformFilter](../../models/platformfilter.md)] | :heavy_minus_sign: | Structured filters applied to search results. Multiple values within a filter with `EQUALS` are OR'd; separate filters are AND'd. Conflicting constraints on the same field (for example, `type:document` in `query` and `type:spreadsheet` in a filter) return an empty result set. See `Filter.field` for built-in field names and operators. Other nonblank field names are accepted as custom filters without validation; behavior depends on your connected sources.
| +| `time_range` | [Optional[models.PlatformTimeRange]](../../models/platformtimerange.md) | :heavy_minus_sign: | Filter results to those last updated within this range. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -60,8 +61,53 @@ with Glean( ### 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 | \*/\* | + +## list_filters + +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 + + +```python +from glean.api_client import Glean +import os + + +with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), +) as glean: + + res = glean.search.list_filters() + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `datasources` | List[*str*] | :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` | *Optional[str]* | :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.
| +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.PlatformSearchFiltersResponseResponse](../../models/platformsearchfiltersresponseresponse.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 60066945..1dbca57b 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 * [retrieve_content](#retrieve_content) - Download skill content * [create_version](#create_version) - Create skill version @@ -150,6 +151,50 @@ with Glean( | 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 + + +```python +from glean.api_client import Glean, models +import os + + +with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), +) as glean: + + res = glean.skills.update(skill_id="", status=models.PlatformSkillUpdateStatus.DISABLED) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `skill_id` | *str* | :heavy_check_mark: | Glean skill ID. | +| `status` | [models.PlatformSkillUpdateStatus](../../models/platformskillupdatestatus.md) | :heavy_check_mark: | New status for the skill. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.PlatformSkillUpdateResponse](../../models/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/pyproject.toml b/pyproject.toml index 932a1745..117283a0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "glean-api-client" -version = "0.15.4" +version = "0.15.5" description = "Python Client SDK Generated by Speakeasy." authors = [{ name = "Glean Technologies, Inc." },] readme = "README-PYPI.md" diff --git a/src/glean/api_client/_version.py b/src/glean/api_client/_version.py index 97481002..693c1890 100644 --- a/src/glean/api_client/_version.py +++ b/src/glean/api_client/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "glean-api-client" -__version__: str = "0.15.4" +__version__: str = "0.15.5" __openapi_doc_version__: str = "0.9.0" __gen_version__: str = "2.918.4" -__user_agent__: str = "speakeasy-sdk/python 0.15.4 2.918.4 0.9.0 glean-api-client" +__user_agent__: str = "speakeasy-sdk/python 0.15.5 2.918.4 0.9.0 glean-api-client" try: if __package__ is not None: diff --git a/src/glean/api_client/models/__init__.py b/src/glean/api_client/models/__init__.py index 029adafe..788e786c 100644 --- a/src/glean/api_client/models/__init__.py +++ b/src/glean/api_client/models/__init__.py @@ -1231,6 +1231,12 @@ PlatformAgentsGetRequest, PlatformAgentsGetRequestTypedDict, ) + from .platform_search_filtersop import ( + PlatformSearchFiltersRequest, + PlatformSearchFiltersRequestTypedDict, + PlatformSearchFiltersResponseResponse, + PlatformSearchFiltersResponseResponseTypedDict, + ) from .platform_skills_create_versionop import ( PlatformSkillsCreateVersionRequest, PlatformSkillsCreateVersionRequestTypedDict, @@ -1263,6 +1269,10 @@ PlatformSkillsListRequest, PlatformSkillsListRequestTypedDict, ) + from .platform_skills_updateop import ( + PlatformSkillsUpdateRequest, + PlatformSkillsUpdateRequestTypedDict, + ) from .platformactionsummary import ( PlatformActionSummary, PlatformActionSummaryTypedDict, @@ -1299,7 +1309,15 @@ PlatformAgentsSearchResponseTypedDict, ) from .platformcontenttype import PlatformContentType + from .platformdatasourcefilterinfo import ( + PlatformDatasourceFilterInfo, + PlatformDatasourceFilterInfoTypedDict, + ) from .platformfilter import PlatformFilter, PlatformFilterTypedDict + from .platformfilterfieldinfo import ( + PlatformFilterFieldInfo, + PlatformFilterFieldInfoTypedDict, + ) from .platformfilteroperator import PlatformFilterOperator from .platformmessage import PlatformMessage, PlatformMessageTypedDict from .platformmessagerole import PlatformMessageRole @@ -1317,6 +1335,10 @@ PlatformProblemDetailErrorTypedDict, ) from .platformresult import PlatformResult, PlatformResultTypedDict + from .platformsearchfiltersresponse import ( + PlatformSearchFiltersResponse, + PlatformSearchFiltersResponseTypedDict, + ) from .platformsearchrequest import ( PlatformSearchRequest, PlatformSearchRequestTypedDict, @@ -1351,6 +1373,15 @@ ) from .platformskillstatus import PlatformSkillStatus from .platformskillsyncstatus import PlatformSkillSyncStatus + from .platformskillupdaterequest import ( + PlatformSkillUpdateRequest, + PlatformSkillUpdateRequestTypedDict, + ) + from .platformskillupdateresponse import ( + PlatformSkillUpdateResponse, + PlatformSkillUpdateResponseTypedDict, + ) + from .platformskillupdatestatus import PlatformSkillUpdateStatus from .platformskillvalidationfile import ( PlatformSkillValidationFile, PlatformSkillValidationFileTypedDict, @@ -1369,10 +1400,6 @@ PlatformSkillValidationResponse, PlatformSkillValidationResponseTypedDict, ) - from .platformskillvalidationwarning import ( - PlatformSkillValidationWarning, - PlatformSkillValidationWarningTypedDict, - ) from .platformskillversion import ( PlatformSkillVersion, PlatformSkillVersionTypedDict, @@ -1396,6 +1423,7 @@ PlatformSkillVersionsListResponseTypedDict, ) from .platformtimerange import PlatformTimeRange, PlatformTimeRangeTypedDict + from .platformwarning import PlatformWarning, PlatformWarningTypedDict from .possiblevalue import PossibleValue, PossibleValueTypedDict from .post_api_index_v1_debug_datasource_document_eventsop import ( PostAPIIndexV1DebugDatasourceDocumentEventsRequest, @@ -2759,7 +2787,11 @@ "PlatformAgentsSearchResponse", "PlatformAgentsSearchResponseTypedDict", "PlatformContentType", + "PlatformDatasourceFilterInfo", + "PlatformDatasourceFilterInfoTypedDict", "PlatformFilter", + "PlatformFilterFieldInfo", + "PlatformFilterFieldInfoTypedDict", "PlatformFilterOperator", "PlatformFilterTypedDict", "PlatformMessage", @@ -2774,6 +2806,12 @@ "PlatformProblemDetailErrorTypedDict", "PlatformResult", "PlatformResultTypedDict", + "PlatformSearchFiltersRequest", + "PlatformSearchFiltersRequestTypedDict", + "PlatformSearchFiltersResponse", + "PlatformSearchFiltersResponseResponse", + "PlatformSearchFiltersResponseResponseTypedDict", + "PlatformSearchFiltersResponseTypedDict", "PlatformSearchRequest", "PlatformSearchRequestTypedDict", "PlatformSearchResponse", @@ -2793,6 +2831,11 @@ "PlatformSkillStatus", "PlatformSkillSyncStatus", "PlatformSkillTypedDict", + "PlatformSkillUpdateRequest", + "PlatformSkillUpdateRequestTypedDict", + "PlatformSkillUpdateResponse", + "PlatformSkillUpdateResponseTypedDict", + "PlatformSkillUpdateStatus", "PlatformSkillValidationFile", "PlatformSkillValidationFileTypedDict", "PlatformSkillValidationMetadata", @@ -2803,8 +2846,6 @@ "PlatformSkillValidationRequestTypedDict", "PlatformSkillValidationResponse", "PlatformSkillValidationResponseTypedDict", - "PlatformSkillValidationWarning", - "PlatformSkillValidationWarningTypedDict", "PlatformSkillVersion", "PlatformSkillVersionCreateRequest", "PlatformSkillVersionCreateRequestFile", @@ -2837,8 +2878,12 @@ "PlatformSkillsListResponseTypedDict", "PlatformSkillsListVersionsRequest", "PlatformSkillsListVersionsRequestTypedDict", + "PlatformSkillsUpdateRequest", + "PlatformSkillsUpdateRequestTypedDict", "PlatformTimeRange", "PlatformTimeRangeTypedDict", + "PlatformWarning", + "PlatformWarningTypedDict", "PossibleValue", "PossibleValueTypedDict", "PostAPIIndexV1DebugDatasourceDocumentEventsRequest", @@ -4061,6 +4106,10 @@ "PlatformAgentsGetSchemasRequestTypedDict": ".platform_agents_get_schemasop", "PlatformAgentsGetRequest": ".platform_agents_getop", "PlatformAgentsGetRequestTypedDict": ".platform_agents_getop", + "PlatformSearchFiltersRequest": ".platform_search_filtersop", + "PlatformSearchFiltersRequestTypedDict": ".platform_search_filtersop", + "PlatformSearchFiltersResponseResponse": ".platform_search_filtersop", + "PlatformSearchFiltersResponseResponseTypedDict": ".platform_search_filtersop", "PlatformSkillsCreateVersionRequest": ".platform_skills_create_versionop", "PlatformSkillsCreateVersionRequestTypedDict": ".platform_skills_create_versionop", "PlatformSkillsGetContentRequest": ".platform_skills_get_contentop", @@ -4079,6 +4128,8 @@ "PlatformSkillsListVersionsRequestTypedDict": ".platform_skills_list_versionsop", "PlatformSkillsListRequest": ".platform_skills_listop", "PlatformSkillsListRequestTypedDict": ".platform_skills_listop", + "PlatformSkillsUpdateRequest": ".platform_skills_updateop", + "PlatformSkillsUpdateRequestTypedDict": ".platform_skills_updateop", "PlatformActionSummary": ".platformactionsummary", "PlatformActionSummaryTypedDict": ".platformactionsummary", "PlatformAgent": ".platformagent", @@ -4101,8 +4152,12 @@ "PlatformAgentsSearchResponse": ".platformagentssearchresponse", "PlatformAgentsSearchResponseTypedDict": ".platformagentssearchresponse", "PlatformContentType": ".platformcontenttype", + "PlatformDatasourceFilterInfo": ".platformdatasourcefilterinfo", + "PlatformDatasourceFilterInfoTypedDict": ".platformdatasourcefilterinfo", "PlatformFilter": ".platformfilter", "PlatformFilterTypedDict": ".platformfilter", + "PlatformFilterFieldInfo": ".platformfilterfieldinfo", + "PlatformFilterFieldInfoTypedDict": ".platformfilterfieldinfo", "PlatformFilterOperator": ".platformfilteroperator", "PlatformMessage": ".platformmessage", "PlatformMessageTypedDict": ".platformmessage", @@ -4116,6 +4171,8 @@ "PlatformProblemDetailErrorTypedDict": ".platformproblemdetailerror", "PlatformResult": ".platformresult", "PlatformResultTypedDict": ".platformresult", + "PlatformSearchFiltersResponse": ".platformsearchfiltersresponse", + "PlatformSearchFiltersResponseTypedDict": ".platformsearchfiltersresponse", "PlatformSearchRequest": ".platformsearchrequest", "PlatformSearchRequestTypedDict": ".platformsearchrequest", "PlatformSearchResponse": ".platformsearchresponse", @@ -4137,6 +4194,11 @@ "PlatformSkillSourceProvenanceTypedDict": ".platformskillsourceprovenance", "PlatformSkillStatus": ".platformskillstatus", "PlatformSkillSyncStatus": ".platformskillsyncstatus", + "PlatformSkillUpdateRequest": ".platformskillupdaterequest", + "PlatformSkillUpdateRequestTypedDict": ".platformskillupdaterequest", + "PlatformSkillUpdateResponse": ".platformskillupdateresponse", + "PlatformSkillUpdateResponseTypedDict": ".platformskillupdateresponse", + "PlatformSkillUpdateStatus": ".platformskillupdatestatus", "PlatformSkillValidationFile": ".platformskillvalidationfile", "PlatformSkillValidationFileTypedDict": ".platformskillvalidationfile", "PlatformSkillValidationMetadata": ".platformskillvalidationmetadata", @@ -4147,8 +4209,6 @@ "PlatformSkillValidationRequestTypedDict": ".platformskillvalidationrequest", "PlatformSkillValidationResponse": ".platformskillvalidationresponse", "PlatformSkillValidationResponseTypedDict": ".platformskillvalidationresponse", - "PlatformSkillValidationWarning": ".platformskillvalidationwarning", - "PlatformSkillValidationWarningTypedDict": ".platformskillvalidationwarning", "PlatformSkillVersion": ".platformskillversion", "PlatformSkillVersionTypedDict": ".platformskillversion", "PlatformSkillVersionCreateRequest": ".platformskillversioncreaterequest", @@ -4163,6 +4223,8 @@ "PlatformSkillVersionsListResponseTypedDict": ".platformskillversionslistresponse", "PlatformTimeRange": ".platformtimerange", "PlatformTimeRangeTypedDict": ".platformtimerange", + "PlatformWarning": ".platformwarning", + "PlatformWarningTypedDict": ".platformwarning", "PossibleValue": ".possiblevalue", "PossibleValueTypedDict": ".possiblevalue", "PostAPIIndexV1DebugDatasourceDocumentEventsRequest": ".post_api_index_v1_debug_datasource_document_eventsop", diff --git a/src/glean/api_client/models/customdatasourceconfig.py b/src/glean/api_client/models/customdatasourceconfig.py index 635c888a..0b728d6f 100644 --- a/src/glean/api_client/models/customdatasourceconfig.py +++ b/src/glean/api_client/models/customdatasourceconfig.py @@ -37,6 +37,8 @@ class DatasourceCategory(str, Enum, metaclass=utils.OpenEnumMeta): ENTITY = "ENTITY" CALENDAR = "CALENDAR" AGENTS = "AGENTS" + AI_CONVERSATION = "AI_CONVERSATION" + AI_ARTIFACT = "AI_ARTIFACT" class HideBuiltInFacet(str, Enum, metaclass=utils.OpenEnumMeta): diff --git a/src/glean/api_client/models/objectdefinition.py b/src/glean/api_client/models/objectdefinition.py index f9c359d3..65f80f05 100644 --- a/src/glean/api_client/models/objectdefinition.py +++ b/src/glean/api_client/models/objectdefinition.py @@ -33,6 +33,8 @@ class DocCategory(str, Enum, metaclass=utils.OpenEnumMeta): ENTITY = "ENTITY" CALENDAR = "CALENDAR" AGENTS = "AGENTS" + AI_CONVERSATION = "AI_CONVERSATION" + AI_ARTIFACT = "AI_ARTIFACT" class ObjectDefinitionTypedDict(TypedDict): diff --git a/src/glean/api_client/models/platform_search_filtersop.py b/src/glean/api_client/models/platform_search_filtersop.py new file mode 100644 index 00000000..2120898e --- /dev/null +++ b/src/glean/api_client/models/platform_search_filtersop.py @@ -0,0 +1,68 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformsearchfiltersresponse import ( + PlatformSearchFiltersResponse, + PlatformSearchFiltersResponseTypedDict, +) +from glean.api_client.types import BaseModel, UNSET_SENTINEL +from glean.api_client.utils import FieldMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing import Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class PlatformSearchFiltersRequestTypedDict(TypedDict): + datasources: NotRequired[List[str]] + r"""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: NotRequired[str] + r"""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. + + """ + + +class PlatformSearchFiltersRequest(BaseModel): + datasources: Annotated[ + Optional[List[str]], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""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: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""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. + + """ + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["datasources", "query"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +class PlatformSearchFiltersResponseResponseTypedDict(TypedDict): + headers: Dict[str, List[str]] + result: PlatformSearchFiltersResponseTypedDict + + +class PlatformSearchFiltersResponseResponse(BaseModel): + headers: Dict[str, List[str]] + + result: PlatformSearchFiltersResponse diff --git a/src/glean/api_client/models/platform_skills_updateop.py b/src/glean/api_client/models/platform_skills_updateop.py new file mode 100644 index 00000000..42e0aca1 --- /dev/null +++ b/src/glean/api_client/models/platform_skills_updateop.py @@ -0,0 +1,28 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformskillupdaterequest import ( + PlatformSkillUpdateRequest, + PlatformSkillUpdateRequestTypedDict, +) +from glean.api_client.types import BaseModel +from glean.api_client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class PlatformSkillsUpdateRequestTypedDict(TypedDict): + skill_id: str + r"""Glean skill ID.""" + platform_skill_update_request: PlatformSkillUpdateRequestTypedDict + + +class PlatformSkillsUpdateRequest(BaseModel): + skill_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""Glean skill ID.""" + + platform_skill_update_request: Annotated[ + PlatformSkillUpdateRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/glean/api_client/models/platformdatasourcefilterinfo.py b/src/glean/api_client/models/platformdatasourcefilterinfo.py new file mode 100644 index 00000000..cd2ba67f --- /dev/null +++ b/src/glean/api_client/models/platformdatasourcefilterinfo.py @@ -0,0 +1,33 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformfilterfieldinfo import ( + PlatformFilterFieldInfo, + PlatformFilterFieldInfoTypedDict, +) +from glean.api_client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class PlatformDatasourceFilterInfoTypedDict(TypedDict): + datasource: str + r"""Datasource identifier usable in `POST /api/search` `datasources`. + + """ + filters: List[PlatformFilterFieldInfoTypedDict] + r"""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. + + """ + + +class PlatformDatasourceFilterInfo(BaseModel): + datasource: str + r"""Datasource identifier usable in `POST /api/search` `datasources`. + + """ + + filters: List[PlatformFilterFieldInfo] + r"""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. + + """ diff --git a/src/glean/api_client/models/platformfilter.py b/src/glean/api_client/models/platformfilter.py index 40c1e357..2243c553 100644 --- a/src/glean/api_client/models/platformfilter.py +++ b/src/glean/api_client/models/platformfilter.py @@ -2,43 +2,57 @@ from __future__ import annotations from .platformfilteroperator import PlatformFilterOperator +from glean.api_client import models from glean.api_client.types import BaseModel, UNSET_SENTINEL -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import List, Optional from typing_extensions import NotRequired, TypedDict class PlatformFilterTypedDict(TypedDict): - r"""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.""" + r"""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.""" field: str - r"""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. + r"""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. """ values: List[str] - r"""One or more values to match.""" + r"""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. + + """ operator: NotRequired[PlatformFilterOperator] - r"""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. + r"""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. """ class PlatformFilter(BaseModel): - r"""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.""" + r"""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.""" field: str - r"""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. + r"""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. """ values: List[str] - r"""One or more values to match.""" + r"""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. + + """ operator: Optional[PlatformFilterOperator] = None - r"""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. + r"""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. """ + @field_serializer("operator") + def serialize_operator(self, value): + if isinstance(value, str): + try: + return models.PlatformFilterOperator(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["operator"]) diff --git a/src/glean/api_client/models/platformfilterfieldinfo.py b/src/glean/api_client/models/platformfilterfieldinfo.py new file mode 100644 index 00000000..755b03c7 --- /dev/null +++ b/src/glean/api_client/models/platformfilterfieldinfo.py @@ -0,0 +1,61 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformfilteroperator import PlatformFilterOperator +from glean.api_client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class PlatformFilterFieldInfoTypedDict(TypedDict): + field: str + r"""Field name usable in the `filters` array for `POST /api/search`.""" + type: str + r"""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. + + """ + operators: List[PlatformFilterOperator] + r"""Comparison operators supported for this field. Built-in fields expose `EQUALS` and `NOT_EQUALS`. + + """ + values: NotRequired[List[str]] + r"""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. + + """ + + +class PlatformFilterFieldInfo(BaseModel): + field: str + r"""Field name usable in the `filters` array for `POST /api/search`.""" + + type: str + r"""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. + + """ + + operators: List[PlatformFilterOperator] + r"""Comparison operators supported for this field. Built-in fields expose `EQUALS` and `NOT_EQUALS`. + + """ + + values: Optional[List[str]] = None + r"""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. + + """ + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["values"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/glean/api_client/models/platformfilteroperator.py b/src/glean/api_client/models/platformfilteroperator.py index 1ac40ef8..f0185fb9 100644 --- a/src/glean/api_client/models/platformfilteroperator.py +++ b/src/glean/api_client/models/platformfilteroperator.py @@ -2,9 +2,10 @@ from __future__ import annotations from enum import Enum +from glean.api_client import utils -class PlatformFilterOperator(str, Enum): +class PlatformFilterOperator(str, Enum, metaclass=utils.OpenEnumMeta): r"""Supported filter operator.""" EQUALS = "EQUALS" diff --git a/src/glean/api_client/models/platformresult.py b/src/glean/api_client/models/platformresult.py index 08c36e88..167efcae 100644 --- a/src/glean/api_client/models/platformresult.py +++ b/src/glean/api_client/models/platformresult.py @@ -27,8 +27,6 @@ class PlatformResultTypedDict(TypedDict): r"""The datasource this result originates from.""" snippets: NotRequired[List[str]] r"""Query-relevant plain-text excerpts from the result body.""" - datasource_instance: NotRequired[Nullable[str]] - r"""The datasource instance this result originates from, if known.""" document_type: NotRequired[Nullable[str]] r"""The document type within the datasource.""" creator: NotRequired[PlatformPersonReferenceTypedDict] @@ -54,9 +52,6 @@ class PlatformResult(BaseModel): snippets: Optional[List[str]] = None r"""Query-relevant plain-text excerpts from the result body.""" - datasource_instance: OptionalNullable[str] = UNSET - r"""The datasource instance this result originates from, if known.""" - document_type: OptionalNullable[str] = UNSET r"""The document type within the datasource.""" @@ -77,7 +72,6 @@ def serialize_model(self, handler): optional_fields = set( [ "snippets", - "datasource_instance", "document_type", "creator", "owner", @@ -85,9 +79,7 @@ def serialize_model(self, handler): "created_at", ] ) - nullable_fields = set( - ["datasource_instance", "document_type", "updated_at", "created_at"] - ) + nullable_fields = set(["document_type", "updated_at", "created_at"]) serialized = handler(self) m = {} diff --git a/src/glean/api_client/models/platformsearchfiltersresponse.py b/src/glean/api_client/models/platformsearchfiltersresponse.py new file mode 100644 index 00000000..1d8aa689 --- /dev/null +++ b/src/glean/api_client/models/platformsearchfiltersresponse.py @@ -0,0 +1,29 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformdatasourcefilterinfo import ( + PlatformDatasourceFilterInfo, + PlatformDatasourceFilterInfoTypedDict, +) +from glean.api_client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class PlatformSearchFiltersResponseTypedDict(TypedDict): + datasources: List[PlatformDatasourceFilterInfoTypedDict] + r"""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. + + """ + request_id: str + r"""Platform-generated request ID for support correlation.""" + + +class PlatformSearchFiltersResponse(BaseModel): + datasources: List[PlatformDatasourceFilterInfo] + r"""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. + + """ + + request_id: str + r"""Platform-generated request ID for support correlation.""" diff --git a/src/glean/api_client/models/platformsearchrequest.py b/src/glean/api_client/models/platformsearchrequest.py index 8f37fa7d..8a3cd9bc 100644 --- a/src/glean/api_client/models/platformsearchrequest.py +++ b/src/glean/api_client/models/platformsearchrequest.py @@ -27,15 +27,11 @@ class PlatformSearchRequestTypedDict(TypedDict): """ datasources: NotRequired[List[str]] - r"""Restrict results to specific datasources. Requests must not specify both `datasources` and `datasource_instances`. - - """ - datasource_instances: NotRequired[List[str]] - r"""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`. + r"""Restrict results to specific datasource identifiers returned by `GET /api/search/filters`. Scopes by datasource type and may include results from multiple instances of that type. """ filters: NotRequired[List[PlatformFilterTypedDict]] - r"""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. + r"""Structured filters applied to search results. Multiple values within a filter with `EQUALS` are OR'd; separate filters are AND'd. Conflicting constraints on the same field (for example, `type:document` in `query` and `type:spreadsheet` in a filter) return an empty result set. See `Filter.field` for built-in field names and operators. Other nonblank field names are accepted as custom filters without validation; behavior depends on your connected sources. """ time_range: NotRequired[PlatformTimeRangeTypedDict] @@ -57,17 +53,12 @@ class PlatformSearchRequest(BaseModel): """ datasources: Optional[List[str]] = None - r"""Restrict results to specific datasources. Requests must not specify both `datasources` and `datasource_instances`. - - """ - - datasource_instances: Optional[List[str]] = None - r"""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`. + r"""Restrict results to specific datasource identifiers returned by `GET /api/search/filters`. Scopes by datasource type and may include results from multiple instances of that type. """ filters: Optional[List[PlatformFilter]] = None - r"""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. + r"""Structured filters applied to search results. Multiple values within a filter with `EQUALS` are OR'd; separate filters are AND'd. Conflicting constraints on the same field (for example, `type:document` in `query` and `type:spreadsheet` in a filter) return an empty result set. See `Filter.field` for built-in field names and operators. Other nonblank field names are accepted as custom filters without validation; behavior depends on your connected sources. """ @@ -77,14 +68,7 @@ class PlatformSearchRequest(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( - [ - "page_size", - "cursor", - "datasources", - "datasource_instances", - "filters", - "time_range", - ] + ["page_size", "cursor", "datasources", "filters", "time_range"] ) nullable_fields = set(["cursor"]) serialized = handler(self) diff --git a/src/glean/api_client/models/platformsearchresponse.py b/src/glean/api_client/models/platformsearchresponse.py index d98c78d6..ff13d204 100644 --- a/src/glean/api_client/models/platformsearchresponse.py +++ b/src/glean/api_client/models/platformsearchresponse.py @@ -2,6 +2,7 @@ from __future__ import annotations from .platformresult import PlatformResult, PlatformResultTypedDict +from .platformwarning import PlatformWarning, PlatformWarningTypedDict from glean.api_client.types import BaseModel, Nullable, UNSET_SENTINEL from pydantic import model_serializer from typing import List @@ -10,18 +11,26 @@ class PlatformSearchResponseTypedDict(TypedDict): results: List[PlatformResultTypedDict] - r"""Ordered list of search results.""" + r"""Ordered list of ranked document results. People cards, Q&A blocks, and other UI-only result types are not included. + + """ has_more: bool r"""Indicates whether additional pages of results are available.""" next_cursor: Nullable[str] r"""Opaque token to pass as `cursor` in the next request.""" request_id: str r"""Platform-generated request ID for support correlation.""" + warnings: List[PlatformWarningTypedDict] + r"""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. + + """ class PlatformSearchResponse(BaseModel): results: List[PlatformResult] - r"""Ordered list of search results.""" + r"""Ordered list of ranked document results. People cards, Q&A blocks, and other UI-only result types are not included. + + """ has_more: bool r"""Indicates whether additional pages of results are available.""" @@ -32,6 +41,11 @@ class PlatformSearchResponse(BaseModel): request_id: str r"""Platform-generated request ID for support correlation.""" + warnings: List[PlatformWarning] + r"""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. + + """ + @model_serializer(mode="wrap") def serialize_model(self, handler): serialized = handler(self) diff --git a/src/glean/api_client/models/platformskillupdaterequest.py b/src/glean/api_client/models/platformskillupdaterequest.py new file mode 100644 index 00000000..0d87a591 --- /dev/null +++ b/src/glean/api_client/models/platformskillupdaterequest.py @@ -0,0 +1,16 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformskillupdatestatus import PlatformSkillUpdateStatus +from glean.api_client.types import BaseModel +from typing_extensions import TypedDict + + +class PlatformSkillUpdateRequestTypedDict(TypedDict): + status: PlatformSkillUpdateStatus + r"""New status for the skill.""" + + +class PlatformSkillUpdateRequest(BaseModel): + status: PlatformSkillUpdateStatus + r"""New status for the skill.""" diff --git a/src/glean/api_client/models/platformskillupdateresponse.py b/src/glean/api_client/models/platformskillupdateresponse.py new file mode 100644 index 00000000..b508a52f --- /dev/null +++ b/src/glean/api_client/models/platformskillupdateresponse.py @@ -0,0 +1,19 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformskill import PlatformSkill, PlatformSkillTypedDict +from glean.api_client.types import BaseModel +from typing_extensions import TypedDict + + +class PlatformSkillUpdateResponseTypedDict(TypedDict): + skill: PlatformSkillTypedDict + request_id: str + r"""Platform-generated request ID for support correlation.""" + + +class PlatformSkillUpdateResponse(BaseModel): + skill: PlatformSkill + + request_id: str + r"""Platform-generated request ID for support correlation.""" diff --git a/src/glean/api_client/models/platformskillupdatestatus.py b/src/glean/api_client/models/platformskillupdatestatus.py new file mode 100644 index 00000000..ede7b308 --- /dev/null +++ b/src/glean/api_client/models/platformskillupdatestatus.py @@ -0,0 +1,11 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum + + +class PlatformSkillUpdateStatus(str, Enum): + r"""New status for the skill.""" + + ENABLED = "ENABLED" + DISABLED = "DISABLED" diff --git a/src/glean/api_client/models/platformskillvalidationresponse.py b/src/glean/api_client/models/platformskillvalidationresponse.py index 70624e36..76af1575 100644 --- a/src/glean/api_client/models/platformskillvalidationresponse.py +++ b/src/glean/api_client/models/platformskillvalidationresponse.py @@ -9,10 +9,7 @@ PlatformSkillValidationMetadata, PlatformSkillValidationMetadataTypedDict, ) -from .platformskillvalidationwarning import ( - PlatformSkillValidationWarning, - PlatformSkillValidationWarningTypedDict, -) +from .platformwarning import PlatformWarning, PlatformWarningTypedDict from glean.api_client.types import BaseModel from typing import List from typing_extensions import TypedDict @@ -22,7 +19,7 @@ class PlatformSkillValidationResponseTypedDict(TypedDict): metadata: PlatformSkillValidationMetadataTypedDict files: List[PlatformSkillValidationFileTypedDict] r"""Normalized files in the bundle after stripping an optional single root folder.""" - warnings: List[PlatformSkillValidationWarningTypedDict] + warnings: List[PlatformWarningTypedDict] r"""Non-blocking validation warnings.""" request_id: str r"""Platform-generated request ID for support correlation.""" @@ -34,7 +31,7 @@ class PlatformSkillValidationResponse(BaseModel): files: List[PlatformSkillValidationFile] r"""Normalized files in the bundle after stripping an optional single root folder.""" - warnings: List[PlatformSkillValidationWarning] + warnings: List[PlatformWarning] r"""Non-blocking validation warnings.""" request_id: str diff --git a/src/glean/api_client/models/platformskillvalidationwarning.py b/src/glean/api_client/models/platformskillvalidationwarning.py deleted file mode 100644 index dfd939ef..00000000 --- a/src/glean/api_client/models/platformskillvalidationwarning.py +++ /dev/null @@ -1,20 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from glean.api_client.types import BaseModel -from typing_extensions import TypedDict - - -class PlatformSkillValidationWarningTypedDict(TypedDict): - code: str - r"""Stable warning code.""" - message: str - r"""Human-readable warning message.""" - - -class PlatformSkillValidationWarning(BaseModel): - code: str - r"""Stable warning code.""" - - message: str - r"""Human-readable warning message.""" diff --git a/src/glean/api_client/models/platformwarning.py b/src/glean/api_client/models/platformwarning.py new file mode 100644 index 00000000..3f5ea79c --- /dev/null +++ b/src/glean/api_client/models/platformwarning.py @@ -0,0 +1,28 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from glean.api_client.types import BaseModel +from typing_extensions import TypedDict + + +class PlatformWarningTypedDict(TypedDict): + r"""Non-blocking warning attached to a successful Platform response.""" + + code: str + r"""Open snake_case warning code. Clients must tolerate unknown values; the set of codes is not a closed enum. + + """ + message: str + r"""Human-readable warning message.""" + + +class PlatformWarning(BaseModel): + r"""Non-blocking warning attached to a successful Platform response.""" + + code: str + r"""Open snake_case warning code. Clients must tolerate unknown values; the set of codes is not a closed enum. + + """ + + message: str + r"""Human-readable warning message.""" diff --git a/src/glean/api_client/search.py b/src/glean/api_client/search.py index 571fc890..91ea57d2 100644 --- a/src/glean/api_client/search.py +++ b/src/glean/api_client/search.py @@ -17,7 +17,6 @@ def query( page_size: Optional[int] = 10, cursor: OptionalNullable[str] = UNSET, datasources: Optional[Iterable[str]] = None, - datasource_instances: Optional[Iterable[str]] = None, filters: Optional[ Union[ Iterable[models.PlatformFilter], @@ -34,7 +33,8 @@ def query( ) -> models.PlatformSearchResponse: r"""Search - 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. :param query: The search query string. Supports inline operators such as `from:jane type:document app:confluence`. Inline operators are AND'd with structured `filters`. @@ -42,11 +42,9 @@ def query( :param page_size: Number of results to return per page. :param cursor: Opaque pagination token from a previous response's `next_cursor` field. Omit on the first request. - :param datasources: Restrict results to specific datasources. Requests must not specify both `datasources` and `datasource_instances`. + :param datasources: Restrict results to specific datasource identifiers returned by `GET /api/search/filters`. Scopes by datasource type and may include results from multiple instances of that type. - :param datasource_instances: 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`. - - :param filters: 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. + :param filters: Structured filters applied to search results. Multiple values within a filter with `EQUALS` are OR'd; separate filters are AND'd. Conflicting constraints on the same field (for example, `type:document` in `query` and `type:spreadsheet` in a filter) return an empty result set. See `Filter.field` for built-in field names and operators. Other nonblank field names are accepted as custom filters without validation; behavior depends on your connected sources. :param time_range: Filter results to those last updated within this range. :param retries: Override the default retry configuration for this method @@ -69,9 +67,6 @@ def query( page_size=page_size, cursor=cursor, datasources=utils.unmarshal(datasources, Optional[List[str]]), - datasource_instances=utils.unmarshal( - datasource_instances, Optional[List[str]] - ), filters=utils.get_pydantic_model( filters, Optional[List[models.PlatformFilter]] ), @@ -137,7 +132,7 @@ def query( return unmarshal_json_response(models.PlatformSearchResponse, http_res) if utils.match_response( http_res, - ["400", "401", "403", "404", "408", "413", "429"], + ["400", "401", "403", "404", "408", "413", "422", "429"], "application/problem+json", ): response_data = unmarshal_json_response( @@ -165,7 +160,6 @@ async def query_async( page_size: Optional[int] = 10, cursor: OptionalNullable[str] = UNSET, datasources: Optional[Iterable[str]] = None, - datasource_instances: Optional[Iterable[str]] = None, filters: Optional[ Union[ Iterable[models.PlatformFilter], @@ -182,7 +176,8 @@ async def query_async( ) -> models.PlatformSearchResponse: r"""Search - 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. :param query: The search query string. Supports inline operators such as `from:jane type:document app:confluence`. Inline operators are AND'd with structured `filters`. @@ -190,11 +185,9 @@ async def query_async( :param page_size: Number of results to return per page. :param cursor: Opaque pagination token from a previous response's `next_cursor` field. Omit on the first request. - :param datasources: Restrict results to specific datasources. Requests must not specify both `datasources` and `datasource_instances`. + :param datasources: Restrict results to specific datasource identifiers returned by `GET /api/search/filters`. Scopes by datasource type and may include results from multiple instances of that type. - :param datasource_instances: 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`. - - :param filters: 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. + :param filters: Structured filters applied to search results. Multiple values within a filter with `EQUALS` are OR'd; separate filters are AND'd. Conflicting constraints on the same field (for example, `type:document` in `query` and `type:spreadsheet` in a filter) return an empty result set. See `Filter.field` for built-in field names and operators. Other nonblank field names are accepted as custom filters without validation; behavior depends on your connected sources. :param time_range: Filter results to those last updated within this range. :param retries: Override the default retry configuration for this method @@ -217,9 +210,6 @@ async def query_async( page_size=page_size, cursor=cursor, datasources=utils.unmarshal(datasources, Optional[List[str]]), - datasource_instances=utils.unmarshal( - datasource_instances, Optional[List[str]] - ), filters=utils.get_pydantic_model( filters, Optional[List[models.PlatformFilter]] ), @@ -285,7 +275,245 @@ async def query_async( return unmarshal_json_response(models.PlatformSearchResponse, http_res) if utils.match_response( http_res, - ["400", "401", "403", "404", "408", "413", "429"], + ["400", "401", "403", "404", "408", "413", "422", "429"], + "application/problem+json", + ): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, ["500", "503"], "application/problem+json"): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) + + def list_filters( + self, + *, + datasources: Optional[Iterable[str]] = None, + query: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PlatformSearchFiltersResponseResponse: + r"""List search filters + + 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. + + + :param datasources: 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`. + + :param query: 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. + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PlatformSearchFiltersRequest( + datasources=utils.unmarshal(datasources, Optional[List[str]]), + query=query, + ) + + req = self._build_request( + method="GET", + path="/api/search/filters", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="platform-search-filters", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Search"], + extensions={ + "x-glean-experimental": { + "id": "0b585621-13fb-4544-bf20-5e1c99452735", + "introduced": "2026-05-12", + }, + "x-visibility": "Public", + }, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.PlatformSearchFiltersResponseResponse( + result=unmarshal_json_response( + models.PlatformSearchFiltersResponse, http_res + ), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "408", "429"], + "application/problem+json", + ): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, ["500", "503"], "application/problem+json"): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) + + async def list_filters_async( + self, + *, + datasources: Optional[Iterable[str]] = None, + query: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PlatformSearchFiltersResponseResponse: + r"""List search filters + + 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. + + + :param datasources: 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`. + + :param query: 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. + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PlatformSearchFiltersRequest( + datasources=utils.unmarshal(datasources, Optional[List[str]]), + query=query, + ) + + req = self._build_request_async( + method="GET", + path="/api/search/filters", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="platform-search-filters", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Search"], + extensions={ + "x-glean-experimental": { + "id": "0b585621-13fb-4544-bf20-5e1c99452735", + "introduced": "2026-05-12", + }, + "x-visibility": "Public", + }, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.PlatformSearchFiltersResponseResponse( + result=unmarshal_json_response( + models.PlatformSearchFiltersResponse, http_res + ), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "408", "429"], "application/problem+json", ): response_data = unmarshal_json_response( diff --git a/src/glean/api_client/skills.py b/src/glean/api_client/skills.py index 094194c4..3246eab4 100644 --- a/src/glean/api_client/skills.py +++ b/src/glean/api_client/skills.py @@ -704,6 +704,246 @@ async def validate_async( raise errors.GleanError("Unexpected response received", http_res) + def update( + self, + *, + skill_id: str, + status: models.PlatformSkillUpdateStatus, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PlatformSkillUpdateResponse: + r"""Update skill + + Update mutable metadata for a skill. V1 supports enabling or disabling a skill without changing its content. + + + :param skill_id: Glean skill ID. + :param status: New status for the skill. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PlatformSkillsUpdateRequest( + skill_id=skill_id, + platform_skill_update_request=models.PlatformSkillUpdateRequest( + status=status, + ), + ) + + req = self._build_request( + method="PATCH", + path="/api/skills/{skill_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.platform_skill_update_request, + False, + False, + "json", + models.PlatformSkillUpdateRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="platform-skills-update", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Skills"], + extensions={ + "x-glean-experimental": { + "id": "262e1f6b-6c2d-4d6d-943b-fc251d2fb38b", + "introduced": "2026-07-20", + }, + "x-visibility": "Public", + }, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.PlatformSkillUpdateResponse, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "408", "409", "413", "429"], + "application/problem+json", + ): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, ["500", "503"], "application/problem+json"): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) + + async def update_async( + self, + *, + skill_id: str, + status: models.PlatformSkillUpdateStatus, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PlatformSkillUpdateResponse: + r"""Update skill + + Update mutable metadata for a skill. V1 supports enabling or disabling a skill without changing its content. + + + :param skill_id: Glean skill ID. + :param status: New status for the skill. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PlatformSkillsUpdateRequest( + skill_id=skill_id, + platform_skill_update_request=models.PlatformSkillUpdateRequest( + status=status, + ), + ) + + req = self._build_request_async( + method="PATCH", + path="/api/skills/{skill_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.platform_skill_update_request, + False, + False, + "json", + models.PlatformSkillUpdateRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="platform-skills-update", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Skills"], + extensions={ + "x-glean-experimental": { + "id": "262e1f6b-6c2d-4d6d-943b-fc251d2fb38b", + "introduced": "2026-07-20", + }, + "x-visibility": "Public", + }, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.PlatformSkillUpdateResponse, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "408", "409", "413", "429"], + "application/problem+json", + ): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, ["500", "503"], "application/problem+json"): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) + def retrieve( self, *, diff --git a/tests/mockserver/internal/handler/generated_handlers.go b/tests/mockserver/internal/handler/generated_handlers.go index f24dcff8..ff3dc884 100644 --- a/tests/mockserver/internal/handler/generated_handlers.go +++ b/tests/mockserver/internal/handler/generated_handlers.go @@ -16,6 +16,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)), @@ -35,6 +36,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/tests/mockserver/internal/handler/pathgetapisearchfilters.go b/tests/mockserver/internal/handler/pathgetapisearchfilters.go new file mode 100644 index 00000000..61dfb292 --- /dev/null +++ b/tests/mockserver/internal/handler/pathgetapisearchfilters.go @@ -0,0 +1,65 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func 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/tests/mockserver/internal/handler/pathpatchapiskillsskillid.go b/tests/mockserver/internal/handler/pathpatchapiskillsskillid.go new file mode 100644 index 00000000..2b4d9db5 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpatchapiskillsskillid.go @@ -0,0 +1,84 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/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/tests/mockserver/internal/handler/pathpostapisearch.go b/tests/mockserver/internal/handler/pathpostapisearch.go index 1575aab3..1e3fe6a9 100644 --- a/tests/mockserver/internal/handler/pathpostapisearch.go +++ b/tests/mockserver/internal/handler/pathpostapisearch.go @@ -56,6 +56,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/tests/mockserver/internal/handler/pathpostapiskillsvalidation.go b/tests/mockserver/internal/handler/pathpostapiskillsvalidation.go index 0fee34fc..2048ae91 100644 --- a/tests/mockserver/internal/handler/pathpostapiskillsvalidation.go +++ b/tests/mockserver/internal/handler/pathpostapiskillsvalidation.go @@ -56,7 +56,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/tests/mockserver/internal/sdk/models/components/customdatasourceconfig.go b/tests/mockserver/internal/sdk/models/components/customdatasourceconfig.go index 070e9e35..4316d060 100644 --- a/tests/mockserver/internal/sdk/models/components/customdatasourceconfig.go +++ b/tests/mockserver/internal/sdk/models/components/customdatasourceconfig.go @@ -30,6 +30,8 @@ const ( DatasourceCategoryEntity DatasourceCategory = "ENTITY" DatasourceCategoryCalendar DatasourceCategory = "CALENDAR" DatasourceCategoryAgents DatasourceCategory = "AGENTS" + DatasourceCategoryAiConversation DatasourceCategory = "AI_CONVERSATION" + DatasourceCategoryAiArtifact DatasourceCategory = "AI_ARTIFACT" ) func (e DatasourceCategory) ToPointer() *DatasourceCategory { @@ -76,6 +78,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/tests/mockserver/internal/sdk/models/components/objectdefinition.go b/tests/mockserver/internal/sdk/models/components/objectdefinition.go index 9a9c55c6..32a3df40 100644 --- a/tests/mockserver/internal/sdk/models/components/objectdefinition.go +++ b/tests/mockserver/internal/sdk/models/components/objectdefinition.go @@ -29,6 +29,8 @@ const ( DocCategoryEntity DocCategory = "ENTITY" DocCategoryCalendar DocCategory = "CALENDAR" DocCategoryAgents DocCategory = "AGENTS" + DocCategoryAiConversation DocCategory = "AI_CONVERSATION" + DocCategoryAiArtifact DocCategory = "AI_ARTIFACT" ) func (e DocCategory) ToPointer() *DocCategory { @@ -75,6 +77,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/tests/mockserver/internal/sdk/models/components/platformdatasourcefilterinfo.go b/tests/mockserver/internal/sdk/models/components/platformdatasourcefilterinfo.go new file mode 100644 index 00000000..e577fb7f --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformdatasourcefilterinfo.go @@ -0,0 +1,26 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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/tests/mockserver/internal/sdk/models/components/platformfilter.go b/tests/mockserver/internal/sdk/models/components/platformfilter.go index b8a9ea1a..c1ab5360 100644 --- a/tests/mockserver/internal/sdk/models/components/platformfilter.go +++ b/tests/mockserver/internal/sdk/models/components/platformfilter.go @@ -2,14 +2,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/tests/mockserver/internal/sdk/models/components/platformfilterfieldinfo.go b/tests/mockserver/internal/sdk/models/components/platformfilterfieldinfo.go new file mode 100644 index 00000000..5b3272e0 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformfilterfieldinfo.go @@ -0,0 +1,45 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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/tests/mockserver/internal/sdk/models/components/platformresult.go b/tests/mockserver/internal/sdk/models/components/platformresult.go index 441ea968..f09289f8 100644 --- a/tests/mockserver/internal/sdk/models/components/platformresult.go +++ b/tests/mockserver/internal/sdk/models/components/platformresult.go @@ -17,8 +17,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. @@ -70,13 +68,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/tests/mockserver/internal/sdk/models/components/platformsearchfiltersresponse.go b/tests/mockserver/internal/sdk/models/components/platformsearchfiltersresponse.go new file mode 100644 index 00000000..51409a03 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformsearchfiltersresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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/tests/mockserver/internal/sdk/models/components/platformsearchrequest.go b/tests/mockserver/internal/sdk/models/components/platformsearchrequest.go index 108bab41..83c3c79d 100644 --- a/tests/mockserver/internal/sdk/models/components/platformsearchrequest.go +++ b/tests/mockserver/internal/sdk/models/components/platformsearchrequest.go @@ -16,13 +16,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. @@ -68,13 +65,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/tests/mockserver/internal/sdk/models/components/platformsearchresponse.go b/tests/mockserver/internal/sdk/models/components/platformsearchresponse.go index e8243de2..3eed4668 100644 --- a/tests/mockserver/internal/sdk/models/components/platformsearchresponse.go +++ b/tests/mockserver/internal/sdk/models/components/platformsearchresponse.go @@ -3,7 +3,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"` @@ -11,6 +12,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 { @@ -40,3 +44,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/tests/mockserver/internal/sdk/models/components/platformskillupdaterequest.go b/tests/mockserver/internal/sdk/models/components/platformskillupdaterequest.go new file mode 100644 index 00000000..16b5b625 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformskillupdaterequest.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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/tests/mockserver/internal/sdk/models/components/platformskillupdateresponse.go b/tests/mockserver/internal/sdk/models/components/platformskillupdateresponse.go new file mode 100644 index 00000000..99256154 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformskillupdateresponse.go @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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/tests/mockserver/internal/sdk/models/components/platformskillupdatestatus.go b/tests/mockserver/internal/sdk/models/components/platformskillupdatestatus.go new file mode 100644 index 00000000..d40a5b9f --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformskillupdatestatus.go @@ -0,0 +1,35 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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/tests/mockserver/internal/sdk/models/components/platformskillvalidationresponse.go b/tests/mockserver/internal/sdk/models/components/platformskillvalidationresponse.go index 55c51a40..f8bd1eae 100644 --- a/tests/mockserver/internal/sdk/models/components/platformskillvalidationresponse.go +++ b/tests/mockserver/internal/sdk/models/components/platformskillvalidationresponse.go @@ -7,7 +7,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"` } @@ -26,9 +26,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/tests/mockserver/internal/sdk/models/components/platformskillvalidationwarning.go b/tests/mockserver/internal/sdk/models/components/platformskillvalidationwarning.go deleted file mode 100644 index 10a5ba75..00000000 --- a/tests/mockserver/internal/sdk/models/components/platformskillvalidationwarning.go +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -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/tests/mockserver/internal/sdk/models/components/platformwarning.go b/tests/mockserver/internal/sdk/models/components/platformwarning.go new file mode 100644 index 00000000..c96ef7a9 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformwarning.go @@ -0,0 +1,26 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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/tests/mockserver/internal/sdk/models/operations/platformsearch.go b/tests/mockserver/internal/sdk/models/operations/platformsearch.go index 16b6e86f..381c8530 100644 --- a/tests/mockserver/internal/sdk/models/operations/platformsearch.go +++ b/tests/mockserver/internal/sdk/models/operations/platformsearch.go @@ -8,7 +8,7 @@ import ( type PlatformSearchResponse struct { HTTPMeta components.HTTPMetadata `json:"-"` - // Successful search. + // Successful response. PlatformSearchResponse *components.PlatformSearchResponse } diff --git a/tests/mockserver/internal/sdk/models/operations/platformsearchfilters.go b/tests/mockserver/internal/sdk/models/operations/platformsearchfilters.go new file mode 100644 index 00000000..8e578bcd --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/platformsearchfilters.go @@ -0,0 +1,58 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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/tests/mockserver/internal/sdk/models/operations/platformskillsupdate.go b/tests/mockserver/internal/sdk/models/operations/platformskillsupdate.go new file mode 100644 index 00000000..ec45cac3 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/platformskillsupdate.go @@ -0,0 +1,47 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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/tests/test_messages.py b/tests/test_messages.py index dfdc1864..636f01d3 100644 --- a/tests/test_messages.py +++ b/tests/test_messages.py @@ -18,7 +18,7 @@ def test_messages_messages(): res = glean.client.messages.retrieve( id_type=models.IDType.CONVERSATION_ID, id="", - datasource=models.Datasource.SLACKENTGRID, + datasource=models.Datasource.GCHAT, timestamp_millis=558834, ) assert res is not None diff --git a/tests/test_search.py b/tests/test_search.py index 3925a6e0..0761637a 100644 --- a/tests/test_search.py +++ b/tests/test_search.py @@ -2234,3 +2234,17 @@ def test_search_platform_search(): ], ) assert res is not None + + +def test_search_platform_search_filters(): + test_http_client = create_test_http_client("platform-search-filters") + + with Glean( + server_url=os.getenv("TEST_SERVER_URL", "http://localhost:18080"), + client=test_http_client, + api_token=os.getenv("GLEAN_API_TOKEN", "value"), + ) as glean: + assert glean is not None + + res = glean.search.list_filters() + assert res is not None diff --git a/tests/test_skills.py b/tests/test_skills.py index de32443a..7a281c7d 100644 --- a/tests/test_skills.py +++ b/tests/test_skills.py @@ -1,6 +1,6 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -from glean.api_client import Glean +from glean.api_client import Glean, models import os from tests.test_client import create_test_http_client @@ -145,3 +145,19 @@ def test_skills_platform_skills_get_version_content(): res = glean.skills.retrieve_version_content(skill_id="", version=117760) assert res is not None + + +def test_skills_platform_skills_update(): + test_http_client = create_test_http_client("platform-skills-update") + + with Glean( + server_url=os.getenv("TEST_SERVER_URL", "http://localhost:18080"), + client=test_http_client, + api_token=os.getenv("GLEAN_API_TOKEN", "value"), + ) as glean: + assert glean is not None + + res = glean.skills.update( + skill_id="", status=models.PlatformSkillUpdateStatus.DISABLED + ) + assert res is not None diff --git a/tests/test_summarize.py b/tests/test_summarize.py index 449a8966..de410ac8 100644 --- a/tests/test_summarize.py +++ b/tests/test_summarize.py @@ -18,12 +18,11 @@ def test_summarize_summarize(): res = glean.client.documents.summarize( document_specs=[ { - "ugc_type": models.DocumentSpecUgcType1.ANNOUNCEMENTS, - "content_id": 150932, + "url": "https://deficient-majority.net", }, { - "ugc_type": models.DocumentSpecUgcType1.ANNOUNCEMENTS, - "content_id": 150932, + "ugc_type": models.DocumentSpecUgcType2.SHORTCUTS, + "ugc_id": "", }, ] )