diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index cbd7ac0d..5d073359 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: 54f7dfc4aca8fe3e40228edef8b95670 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: 99718a2b-47c1-4b4b-8f42-30b3498e3af2 + pristine_commit_hash: d5c1040682367082ca0302feeb71af1d880e3b83 + pristine_tree_hash: 61eee58668408309df5966b2cc6ae29c58c3c996 features: python: acceptHeaders: 3.0.0 @@ -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:aea1a56bce978b6a78ab7d3f0606149e14064ff9 + pristine_git_object: 489702e35fa27f9fb9203b4bd56938f06eb25bbd docs/models/platformfilter.md: id: 4e97760ae8b9 last_write_checksum: sha1:d78122b73a8014e7103935402b9167728bcaec34 pristine_git_object: b3e8b651de43912c7092a7cb624cda0b3f9ea48a + docs/models/platformfilterfieldinfo.md: + id: 9a7fa851c702 + last_write_checksum: sha1:e2444f37fe76dcdbc1e9c7e2c308e6725e507da7 + pristine_git_object: 1321d7fe962eeba6b8145a37f50a383b6a517ac6 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,24 @@ 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:d05e00466398132afa4aa431babbdf683163d05f + pristine_git_object: e4f0321705f7b30e716f12a9ce050fe92b43b8b9 + docs/models/platformsearchfiltersresponse.md: + id: 9ea2f0a45c78 + last_write_checksum: sha1:8950e9f4725c54ec8903b03ca204b5f9f64d1616 + pristine_git_object: f3a96b73a67307e4491a3114911645d0ba90105a docs/models/platformsearchrequest.md: id: 9f3be4029289 - last_write_checksum: sha1:5a163a68ccc04dd0a7f8fb8e75c41e39eceef100 - pristine_git_object: 30ff66c03c2b88bb2ec72e7a7f4dfa135d21d8f6 + last_write_checksum: sha1:2af0f22d9c973805b139fc1505f04073415e02e1 + pristine_git_object: f4c327c38593acc871031e1587bc8b4208842e4f docs/models/platformsearchresponse.md: id: b20c8f7128fc - last_write_checksum: sha1:958639d5fa5b446156df39fd5f69b6c57265f13a - pristine_git_object: 219a923e48c2a8cb9333d211f51a87df045a8002 + last_write_checksum: sha1:bb5114f8343926b48f180c2de52ad7e5cbbf6dd5 + pristine_git_object: 6a100787e67496d3181c7524618f56b93bbfdb4d docs/models/platformskill.md: id: 83c575f92901 last_write_checksum: sha1:6b749a33dc64251968dac815aec5189373449b3e @@ -2329,10 +2345,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 +2383,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 +2413,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 +3299,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:57d8336758cc5324cd3f3bc5b30e280dceef6a6a + pristine_git_object: 59fa26b411d409f8f9ccd682c8fd0056f88ead62 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 +3327,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 +3355,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 +3523,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:fc0025c843b6e6bbc79f5cc4ef5c05ad4c478953 + pristine_git_object: a6f64b978927f10ff8de72dd6ee4bd444402d36c src/glean/api_client/models/actionauthtype.py: id: c7402f35092d last_write_checksum: sha1:7aaa5d1c11b105d0d7265e2a83cb005aafa89645 @@ -5145,6 +5177,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:af714f1d174d54c98cfbcfd2913d80cae6b59ad8 + pristine_git_object: 2ad634cd278645ef64f65d2e636c276790525dd8 src/glean/api_client/models/platform_skills_create_versionop.py: id: c107217b99a3 last_write_checksum: sha1:03372f5d66b5644281f59d46b1e34f414ba75da9 @@ -5173,6 +5209,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 +5261,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:377cf72c9fcdacd733aab6369a41200d94660b69 + pristine_git_object: a21b7f857dcfa091aae7a502962c4d73c4fe7654 src/glean/api_client/models/platformfilter.py: id: e0719ea40cc5 - last_write_checksum: sha1:cdedb8731ce215c98444464e4e852b60e519e669 - pristine_git_object: 40c1e357d26b23063b2d1d71062c5c67eb12a330 + last_write_checksum: sha1:0864f611ae7f170a01c010ff4431d7e3a87121cf + pristine_git_object: ac5a824b4f5d80bb273bea014118bfabbaf596b2 + src/glean/api_client/models/platformfilterfieldinfo.py: + id: 5be6062efbd8 + last_write_checksum: sha1:3795e4c07d2864d755bf15cc8ee1f98c16341e46 + pristine_git_object: b46daad80b040148d7684930a0cad1bc64e540fe 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 +5303,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:2b4516e25f9858f66e465371cb368bb4c0eb3df0 + pristine_git_object: 7b10c9944da7a808fbd02fbcdcb46dc7a575215f src/glean/api_client/models/platformsearchrequest.py: id: f2376466383f - last_write_checksum: sha1:30d48da0462fead00d34a7ad3cb5687b4fbeb8ba - pristine_git_object: 8f37fa7d2d319a465a977c83718f6e7e10fab908 + last_write_checksum: sha1:5a9e5e567bca93f141a0a1711432e2437d6e9676 + pristine_git_object: 12ada2bbe64c334801a6d8b4f3fc7084ff6734a7 src/glean/api_client/models/platformsearchresponse.py: id: 7ee9ec06e00c - last_write_checksum: sha1:9ed8c951be31629e50f797c8e4bd59a1ef494eef - pristine_git_object: d98c78d622564a3fc35ed6d5d543866f64f76704 + last_write_checksum: sha1:7dac735f1c11195636c863ff81673072df9c18c7 + pristine_git_object: e75bdbeb101184f7f7e8f244a84458d3e72b2874 src/glean/api_client/models/platformskill.py: id: 10e1f311015c last_write_checksum: sha1:c0225f37738625dbb6cab763be77cf5e40beafeb @@ -5301,6 +5353,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 +5379,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 +5405,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 +6035,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:58676ee9c197a84f3ef09ebbc027ba68bde813aa + pristine_git_object: c3097e6551b159b66c0a8262a124fcbeef2e0b52 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 +6195,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 +6213,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 +6293,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 +6411,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 +6423,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 @@ -6407,8 +6479,8 @@ trackedFiles: pristine_git_object: ab9263d43404e8e6f07af222a3e785aca2fbf35f tests/mockserver/internal/handler/pathpostrestapiv1createcollection.go: id: 3fb93a419933 - last_write_checksum: sha1:14b4a1d98dd55ce2b487ae1aaab4a7dece08df25 - pristine_git_object: 371b90231fcd7bd77fd6d9566156605af1712d9a + last_write_checksum: sha1:f9f4c718408bddadbdf826194f07970bb111e57e + pristine_git_object: 5c99a0ada5302c8f64c0e5da5683fa8bd9e9975d tests/mockserver/internal/handler/pathpostrestapiv1createshortcut.go: id: 8d9d3abb0c34 last_write_checksum: sha1:dcdf684a85e20db1aee571db9a54a3ee259d71d5 @@ -8053,10 +8125,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:2532c115f27eeeb046202c83303d11d4a0df0750 + pristine_git_object: cf6cc5e821d772b1f60ba651f76292004bb0f0b1 tests/mockserver/internal/sdk/models/components/platformfilter.go: id: 1762bf95c464 last_write_checksum: sha1:4dc71d2576cddd00f93dfda6c2f584f9bff9ebcb pristine_git_object: b8a9ea1a0663c345fd2a4bc04f3343c17409b868 + tests/mockserver/internal/sdk/models/components/platformfilterfieldinfo.go: + id: c22bd1d66163 + last_write_checksum: sha1:c5d604a999d1450db7f1b365acf241dcbd6960c6 + pristine_git_object: 6aee376c8bc1f64e5f139ae659eff23658e10648 tests/mockserver/internal/sdk/models/components/platformfilteroperator.go: id: 7daac12f5ae7 last_write_checksum: sha1:49fd1240cf9eb9d2259465f79e0c481d711ec37d @@ -8087,16 +8167,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:de231e482b2eb97e943bc6ca44bad7f943abe90d + pristine_git_object: c8fa11b03944b8899034a7ccf1958c6eb489ad5b tests/mockserver/internal/sdk/models/components/platformsearchrequest.go: id: 4da7625f1c35 - last_write_checksum: sha1:33a8686e5aa62e2e090685ba89dae0bd0d4af5b9 - pristine_git_object: 108bab415b41d89047fba91239b362d2abba960d + last_write_checksum: sha1:554c4f3b011945a720eb6be549766baecd808cae + pristine_git_object: 932cfb57f8cc26f4a2d36774dff1d528f8e72be2 tests/mockserver/internal/sdk/models/components/platformsearchresponse.go: id: a58f32052764 - last_write_checksum: sha1:6db9bd73c6fd7cc1c8bf28c2b1ee96cc77d7236a - pristine_git_object: e8243de2c4e8582ed42736e75e4aa715a6a376bc + last_write_checksum: sha1:d3623cebb47e84f3fc648fa0c9f3d9e6ab3f229a + pristine_git_object: d04d15126a0002b3dfbb9671a4965a182a0fc0fc tests/mockserver/internal/sdk/models/components/platformskill.go: id: a97a51039ff5 last_write_checksum: sha1:8871b58924c180a5565b43c91b58ed79212739bb @@ -8133,6 +8217,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 +8243,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 +8269,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 +9123,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:50e756517196d130abc423ee16a81671bb527436 + pristine_git_object: 7d96a5f2e341c16d5c8149a98c5b94543114c7ea + tests/mockserver/internal/sdk/models/operations/platformsearchfilters.go: + id: 3f6c4119e4bd + last_write_checksum: sha1:e4aef5e3aee3b5e1a4d581636a10b15ca1b0cc4b + pristine_git_object: 174de222af68e65db108c2097fecf0ad6d8d6e28 tests/mockserver/internal/sdk/models/operations/platformskillscreate.go: id: cd743025fd37 last_write_checksum: sha1:af1e6384914f9cd0cc653f0492e99ec648168391 @@ -9061,6 +9161,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 +9599,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:5db8087e85104ab50b362638150fa1f6686a3c30 + pristine_git_object: c0fd29dab7d365ef9d78c0c291b925e6b9fd7298 tests/test_people.py: id: 37c243940039 last_write_checksum: sha1:7c7268ffeebe48d81ed25e9b1cfc3a395abf5c1f @@ -9515,16 +9619,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:8880f40a7c62cc87c1eed2b5180893c13ea021b3 + pristine_git_object: 8763da581da72f8aefe52080dd2fd95c5cbf3aa3 tests/test_tools.py: id: 70889bdf7321 last_write_checksum: sha1:d26d83639f731281bb518886f10571c7b0dbf935 @@ -10510,7 +10614,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 +10759,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 +10961,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-23T02:48:42Z" + platform-search-filters: "2026-07-23T02:48:42Z" +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" 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..640cd518 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: 50e024e0d2d6b1f03e6d3f009b350cea72b5a124 + x-open-api-commit-sha: 45dad74cd7b0911aea77005c814332d158cc2d8b 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. + 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. Structured filters accept exact public built-ins and free-form custom fields. + Successful responses always include a non-nullable `warnings` array (`[]` when empty). When results are incomplete for the requested datasource scope, the response remains HTTP 200 with `results`, `has_more`, and `next_cursor` preserved and a `results_incomplete` warning. Query outcomes that cannot be honored return HTTP 422 `unprocessable_query` and suppress results and cursor; invalid inline operators may include a nested `/query` `invalid_filter` issue. Backend work and audit logging may already have occurred before such a 422 replaces a result-bearing response. Structural and representability failures remain HTTP 400. Rate limits return HTTP 429 with `Retry-After`. Temporary backend unavailability returns HTTP 503. operationId: platform-search x-visibility: Public x-glean-experimental: @@ -754,7 +812,8 @@ paths: $ref: "#/components/schemas/PlatformSearchRequest" responses: "200": - description: Successful search. + description: | + Successful search. Always includes `warnings` (`[]` when empty). A `results_incomplete` warning may be present while results and cursor remain available. content: application/json: schema: @@ -771,6 +830,8 @@ paths: $ref: "#/components/responses/PlatformRequestTimeout" "413": $ref: "#/components/responses/PlatformRequestTooLarge" + "422": + $ref: "#/components/responses/PlatformUnprocessableEntity" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": @@ -781,6 +842,66 @@ paths: x-speakeasy-name-override: query security: - APIToken: [] + /api/search/filters: + get: + tags: + - Search + summary: List search filters + description: | + Discover caller-visible datasources and common built-in filter fields that can be used with Platform Search. This is a best-effort common catalog, not an authoritative inventory of every field search may accept. + Without `query`, the response returns datasource rows and field metadata without executing search. With a nonblank `query`, exactly one `datasources` value is required and the response may include bounded, non-exhaustive facet values for matching public fields. + 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 canonical normalized datasource identifiers. With a nonblank `query`, exactly one datasource is required. + required: false + schema: + type: array + minItems: 1 + items: + type: string + minLength: 1 + - in: query + name: query + description: | + Optional search query used to request bounded facet values for the selected datasource. When present it must be nonblank. + required: false + schema: + type: string + minLength: 1 + responses: + "200": + description: Search filter metadata. + 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 +5761,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 +6344,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 +6363,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 +6378,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,6 +6505,7 @@ components: - LTE PlatformFilter: type: object + additionalProperties: false required: - field - values @@ -6361,6 +6514,7 @@ components: 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. example: type @@ -6369,6 +6523,7 @@ components: minItems: 1 items: type: string + minLength: 1 description: One or more values to match. example: - spreadsheet @@ -6380,6 +6535,7 @@ components: 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. PlatformTimeRange: type: object + additionalProperties: false description: Filter results to those last updated within this range. properties: start: @@ -6408,6 +6564,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 +6580,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 canonical normalized datasource identifiers. 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. 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. Exact public built-ins receive the public operator contract; other nonblank fields pass through as possible custom fields. time_range: $ref: "#/components/schemas/PlatformTimeRange" PlatformResult: type: object + additionalProperties: false required: - url - title @@ -6451,31 +6606,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,11 +6649,13 @@ 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 @@ -6514,6 +6671,81 @@ 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. Always present; empty means `[]`. Clients must tolerate unknown warning codes. Current code `results_incomplete` means some results may be unavailable for the requested datasource scope; results, `has_more`, and `next_cursor` remain present. + 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` and `USER`. Clients must tolerate unknown values. + example: STRING + operators: + type: array + minItems: 1 + description: Supported comparison operators for this field. + items: + $ref: "#/components/schemas/PlatformFilterOperator" + values: + type: array + description: | + Bounded, non-exhaustive facet values for this field. Omitted in catalog-only responses. Present as an array, including `[]`, when query-backed discovery executes. An empty array does not imply that no valid value exists. + items: + type: string + minLength: 1 + PlatformDatasourceFilterInfo: + type: object + additionalProperties: false + required: + - datasource + - filters + properties: + datasource: + type: string + minLength: 1 + description: | + Stable canonical normalized 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. Absence of a public built-in here does not make that field invalid in `POST /api/search`. + items: + $ref: "#/components/schemas/PlatformFilterFieldInfo" + PlatformSearchFiltersResponse: + type: object + additionalProperties: false + required: + - datasources + - request_id + properties: + datasources: + type: array + description: | + Datasource metadata visible to the authenticated caller. Each `datasource` value is a canonical normalized identifier usable in `POST /api/search` `datasources`. Empty 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: @@ -17028,6 +17260,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..3c38bcdb 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:df6306b043b76e11f23431dbc07238aac8e66e93a7c2f20e000bb7037ec927a5 + sourceBlobDigest: sha256:5efbac3bf592f2137ede8f72269ba1eaba22fb0ac9b25efa0a5f278efab33a13 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:df6306b043b76e11f23431dbc07238aac8e66e93a7c2f20e000bb7037ec927a5 + sourceBlobDigest: sha256:5efbac3bf592f2137ede8f72269ba1eaba22fb0ac9b25efa0a5f278efab33a13 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..9f3b2394 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-23 02:47:54 +### 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/platformdatasourcefilterinfo.md b/docs/models/platformdatasourcefilterinfo.md new file mode 100644 index 00000000..489702e3 --- /dev/null +++ b/docs/models/platformdatasourcefilterinfo.md @@ -0,0 +1,9 @@ +# PlatformDatasourceFilterInfo + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `datasource` | *str* | :heavy_check_mark: | Stable canonical normalized 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. Absence of a public built-in here does not make that field invalid in `POST /api/search`.
| | \ No newline at end of file diff --git a/docs/models/platformfilterfieldinfo.md b/docs/models/platformfilterfieldinfo.md new file mode 100644 index 00000000..1321d7fe --- /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` and `USER`. Clients must tolerate unknown values.
| STRING | +| `operators` | List[[models.PlatformFilterOperator](../models/platformfilteroperator.md)] | :heavy_check_mark: | Supported comparison operators for this field. | | +| `values` | List[*str*] | :heavy_minus_sign: | Bounded, non-exhaustive facet values for this field. Omitted in catalog-only responses. Present as an array, including `[]`, when query-backed discovery executes. An empty array does not imply that no valid value exists.
| | \ 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..e4f03217 --- /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 canonical normalized datasource identifiers. With a nonblank `query`, exactly one datasource is required.
| +| `query` | *Optional[str]* | :heavy_minus_sign: | Optional search query used to request bounded facet values for the selected datasource. When present it must be nonblank.
| \ No newline at end of file diff --git a/docs/models/platformsearchfiltersresponse.md b/docs/models/platformsearchfiltersresponse.md new file mode 100644 index 00000000..f3a96b73 --- /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: | Datasource metadata visible to the authenticated caller. Each `datasource` value is a canonical normalized identifier usable in `POST /api/search` `datasources`. Empty 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/platformsearchrequest.md b/docs/models/platformsearchrequest.md index 30ff66c0..f4c327c3 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 canonical normalized datasource identifiers.
| +| `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. Exact public built-ins receive the public operator contract; other nonblank fields pass through as possible custom fields.
| +| `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..6a100787 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 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. | +| `warnings` | List[[models.PlatformWarning](../models/platformwarning.md)] | :heavy_check_mark: | Non-blocking warnings for this response. Always present; empty means `[]`. Clients must tolerate unknown warning codes. Current code `results_incomplete` means some results may be unavailable for the requested datasource scope; results, `has_more`, and `next_cursor` remain present.
| \ 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..59fa26b4 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. +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. Structured filters accept exact public built-ins and free-form custom fields. +Successful responses always include a non-nullable `warnings` array (`[]` when empty). When results are incomplete for the requested datasource scope, the response remains HTTP 200 with `results`, `has_more`, and `next_cursor` preserved and a `results_incomplete` warning. Query outcomes that cannot be honored return HTTP 422 `unprocessable_query` and suppress results and cursor; invalid inline operators may include a nested `/query` `invalid_filter` issue. Backend work and audit logging may already have occurred before such a 422 replaces a result-bearing response. Structural and representability failures remain HTTP 400. Rate limits return HTTP 429 with `Retry-After`. Temporary backend unavailability returns HTTP 503. ### 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 canonical normalized datasource identifiers.
| +| `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. Exact public built-ins receive the public operator contract; other nonblank fields pass through as possible custom fields.
| +| `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 + +Discover caller-visible datasources and common built-in filter fields that can be used with Platform Search. This is a best-effort common catalog, not an authoritative inventory of every field search may accept. +Without `query`, the response returns datasource rows and field metadata without executing search. With a nonblank `query`, exactly one `datasources` value is required and the response may include bounded, non-exhaustive facet values for matching public fields. + + +### 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 canonical normalized datasource identifiers. With a nonblank `query`, exactly one datasource is required.
| +| `query` | *Optional[str]* | :heavy_minus_sign: | Optional search query used to request bounded facet values for the selected datasource. When present it must be nonblank.
| +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.PlatformSearchFiltersResponse](../../models/platformsearchfiltersresponse.md)** + +### Errors + | Error Type | Status Code | Content Type | | --------------------------------- | --------------------------------- | --------------------------------- | -| errors.PlatformProblemDetailError | 400, 401, 403, 404, 408, 413, 429 | application/problem+json | +| errors.PlatformProblemDetailError | 400, 401, 403, 404, 408, 429 | application/problem+json | | errors.PlatformProblemDetailError | 500, 503 | application/problem+json | | errors.GleanError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/skills/README.md b/docs/sdks/skills/README.md index 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..a6f64b97 100644 --- a/src/glean/api_client/models/__init__.py +++ b/src/glean/api_client/models/__init__.py @@ -1231,6 +1231,10 @@ PlatformAgentsGetRequest, PlatformAgentsGetRequestTypedDict, ) + from .platform_search_filtersop import ( + PlatformSearchFiltersRequest, + PlatformSearchFiltersRequestTypedDict, + ) from .platform_skills_create_versionop import ( PlatformSkillsCreateVersionRequest, PlatformSkillsCreateVersionRequestTypedDict, @@ -1263,6 +1267,10 @@ PlatformSkillsListRequest, PlatformSkillsListRequestTypedDict, ) + from .platform_skills_updateop import ( + PlatformSkillsUpdateRequest, + PlatformSkillsUpdateRequestTypedDict, + ) from .platformactionsummary import ( PlatformActionSummary, PlatformActionSummaryTypedDict, @@ -1299,7 +1307,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 +1333,10 @@ PlatformProblemDetailErrorTypedDict, ) from .platformresult import PlatformResult, PlatformResultTypedDict + from .platformsearchfiltersresponse import ( + PlatformSearchFiltersResponse, + PlatformSearchFiltersResponseTypedDict, + ) from .platformsearchrequest import ( PlatformSearchRequest, PlatformSearchRequestTypedDict, @@ -1351,6 +1371,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 +1398,6 @@ PlatformSkillValidationResponse, PlatformSkillValidationResponseTypedDict, ) - from .platformskillvalidationwarning import ( - PlatformSkillValidationWarning, - PlatformSkillValidationWarningTypedDict, - ) from .platformskillversion import ( PlatformSkillVersion, PlatformSkillVersionTypedDict, @@ -1396,6 +1421,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 +2785,11 @@ "PlatformAgentsSearchResponse", "PlatformAgentsSearchResponseTypedDict", "PlatformContentType", + "PlatformDatasourceFilterInfo", + "PlatformDatasourceFilterInfoTypedDict", "PlatformFilter", + "PlatformFilterFieldInfo", + "PlatformFilterFieldInfoTypedDict", "PlatformFilterOperator", "PlatformFilterTypedDict", "PlatformMessage", @@ -2774,6 +2804,10 @@ "PlatformProblemDetailErrorTypedDict", "PlatformResult", "PlatformResultTypedDict", + "PlatformSearchFiltersRequest", + "PlatformSearchFiltersRequestTypedDict", + "PlatformSearchFiltersResponse", + "PlatformSearchFiltersResponseTypedDict", "PlatformSearchRequest", "PlatformSearchRequestTypedDict", "PlatformSearchResponse", @@ -2793,6 +2827,11 @@ "PlatformSkillStatus", "PlatformSkillSyncStatus", "PlatformSkillTypedDict", + "PlatformSkillUpdateRequest", + "PlatformSkillUpdateRequestTypedDict", + "PlatformSkillUpdateResponse", + "PlatformSkillUpdateResponseTypedDict", + "PlatformSkillUpdateStatus", "PlatformSkillValidationFile", "PlatformSkillValidationFileTypedDict", "PlatformSkillValidationMetadata", @@ -2803,8 +2842,6 @@ "PlatformSkillValidationRequestTypedDict", "PlatformSkillValidationResponse", "PlatformSkillValidationResponseTypedDict", - "PlatformSkillValidationWarning", - "PlatformSkillValidationWarningTypedDict", "PlatformSkillVersion", "PlatformSkillVersionCreateRequest", "PlatformSkillVersionCreateRequestFile", @@ -2837,8 +2874,12 @@ "PlatformSkillsListResponseTypedDict", "PlatformSkillsListVersionsRequest", "PlatformSkillsListVersionsRequestTypedDict", + "PlatformSkillsUpdateRequest", + "PlatformSkillsUpdateRequestTypedDict", "PlatformTimeRange", "PlatformTimeRangeTypedDict", + "PlatformWarning", + "PlatformWarningTypedDict", "PossibleValue", "PossibleValueTypedDict", "PostAPIIndexV1DebugDatasourceDocumentEventsRequest", @@ -4061,6 +4102,8 @@ "PlatformAgentsGetSchemasRequestTypedDict": ".platform_agents_get_schemasop", "PlatformAgentsGetRequest": ".platform_agents_getop", "PlatformAgentsGetRequestTypedDict": ".platform_agents_getop", + "PlatformSearchFiltersRequest": ".platform_search_filtersop", + "PlatformSearchFiltersRequestTypedDict": ".platform_search_filtersop", "PlatformSkillsCreateVersionRequest": ".platform_skills_create_versionop", "PlatformSkillsCreateVersionRequestTypedDict": ".platform_skills_create_versionop", "PlatformSkillsGetContentRequest": ".platform_skills_get_contentop", @@ -4079,6 +4122,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 +4146,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 +4165,8 @@ "PlatformProblemDetailErrorTypedDict": ".platformproblemdetailerror", "PlatformResult": ".platformresult", "PlatformResultTypedDict": ".platformresult", + "PlatformSearchFiltersResponse": ".platformsearchfiltersresponse", + "PlatformSearchFiltersResponseTypedDict": ".platformsearchfiltersresponse", "PlatformSearchRequest": ".platformsearchrequest", "PlatformSearchRequestTypedDict": ".platformsearchrequest", "PlatformSearchResponse": ".platformsearchresponse", @@ -4137,6 +4188,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 +4203,6 @@ "PlatformSkillValidationRequestTypedDict": ".platformskillvalidationrequest", "PlatformSkillValidationResponse": ".platformskillvalidationresponse", "PlatformSkillValidationResponseTypedDict": ".platformskillvalidationresponse", - "PlatformSkillValidationWarning": ".platformskillvalidationwarning", - "PlatformSkillValidationWarningTypedDict": ".platformskillvalidationwarning", "PlatformSkillVersion": ".platformskillversion", "PlatformSkillVersionTypedDict": ".platformskillversion", "PlatformSkillVersionCreateRequest": ".platformskillversioncreaterequest", @@ -4163,6 +4217,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/platform_search_filtersop.py b/src/glean/api_client/models/platform_search_filtersop.py new file mode 100644 index 00000000..2ad634cd --- /dev/null +++ b/src/glean/api_client/models/platform_search_filtersop.py @@ -0,0 +1,53 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +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 List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class PlatformSearchFiltersRequestTypedDict(TypedDict): + datasources: NotRequired[List[str]] + r"""Restrict metadata to one or more canonical normalized datasource identifiers. With a nonblank `query`, exactly one datasource is required. + + """ + query: NotRequired[str] + r"""Optional search query used to request bounded facet values for the selected datasource. When present it must be nonblank. + + """ + + +class PlatformSearchFiltersRequest(BaseModel): + datasources: Annotated[ + Optional[List[str]], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Restrict metadata to one or more canonical normalized datasource identifiers. With a nonblank `query`, exactly one datasource is required. + + """ + + query: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Optional search query used to request bounded facet values for the selected datasource. When present it must be nonblank. + + """ + + @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 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..a21b7f85 --- /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"""Stable canonical normalized datasource identifier usable in `POST /api/search` `datasources`. + + """ + filters: List[PlatformFilterFieldInfoTypedDict] + r"""Common built-in filter fields for this datasource. May be empty. Absence of a public built-in here does not make that field invalid in `POST /api/search`. + + """ + + +class PlatformDatasourceFilterInfo(BaseModel): + datasource: str + r"""Stable canonical normalized datasource identifier usable in `POST /api/search` `datasources`. + + """ + + filters: List[PlatformFilterFieldInfo] + r"""Common built-in filter fields for this datasource. May be empty. Absence of a public built-in here does not make that field invalid in `POST /api/search`. + + """ diff --git a/src/glean/api_client/models/platformfilter.py b/src/glean/api_client/models/platformfilter.py index 40c1e357..ac5a824b 100644 --- a/src/glean/api_client/models/platformfilter.py +++ b/src/glean/api_client/models/platformfilter.py @@ -2,8 +2,9 @@ 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 @@ -39,6 +40,15 @@ class PlatformFilter(BaseModel): """ + @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..b46daad8 --- /dev/null +++ b/src/glean/api_client/models/platformfilterfieldinfo.py @@ -0,0 +1,57 @@ +"""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` and `USER`. Clients must tolerate unknown values. + + """ + operators: List[PlatformFilterOperator] + r"""Supported comparison operators for this field.""" + values: NotRequired[List[str]] + r"""Bounded, non-exhaustive facet values for this field. Omitted in catalog-only responses. Present as an array, including `[]`, when query-backed discovery executes. An empty array does not imply that no valid value exists. + + """ + + +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` and `USER`. Clients must tolerate unknown values. + + """ + + operators: List[PlatformFilterOperator] + r"""Supported comparison operators for this field.""" + + values: Optional[List[str]] = None + r"""Bounded, non-exhaustive facet values for this field. Omitted in catalog-only responses. Present as an array, including `[]`, when query-backed discovery executes. An empty array does not imply that no valid value exists. + + """ + + @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..7b10c994 --- /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"""Datasource metadata visible to the authenticated caller. Each `datasource` value is a canonical normalized identifier usable in `POST /api/search` `datasources`. Empty means no visible datasources. + + """ + request_id: str + r"""Platform-generated request ID for support correlation.""" + + +class PlatformSearchFiltersResponse(BaseModel): + datasources: List[PlatformDatasourceFilterInfo] + r"""Datasource metadata visible to the authenticated caller. Each `datasource` value is a canonical normalized identifier usable in `POST /api/search` `datasources`. Empty 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..12ada2bb 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 canonical normalized datasource identifiers. """ 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. 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. Exact public built-ins receive the public operator contract; other nonblank fields pass through as possible custom fields. """ 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 canonical normalized datasource identifiers. """ 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. 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. Exact public built-ins receive the public operator contract; other nonblank fields pass through as possible custom fields. """ @@ -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..e75bdbeb 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 @@ -17,6 +18,10 @@ class PlatformSearchResponseTypedDict(TypedDict): 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. Always present; empty means `[]`. Clients must tolerate unknown warning codes. Current code `results_incomplete` means some results may be unavailable for the requested datasource scope; results, `has_more`, and `next_cursor` remain present. + + """ class PlatformSearchResponse(BaseModel): @@ -32,6 +37,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. Always present; empty means `[]`. Clients must tolerate unknown warning codes. Current code `results_incomplete` means some results may be unavailable for the requested datasource scope; results, `has_more`, and `next_cursor` remain present. + + """ + @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..c3097e65 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. + 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. Structured filters accept exact public built-ins and free-form custom fields. + Successful responses always include a non-nullable `warnings` array (`[]` when empty). When results are incomplete for the requested datasource scope, the response remains HTTP 200 with `results`, `has_more`, and `next_cursor` preserved and a `results_incomplete` warning. Query outcomes that cannot be honored return HTTP 422 `unprocessable_query` and suppress results and cursor; invalid inline operators may include a nested `/query` `invalid_filter` issue. Backend work and audit logging may already have occurred before such a 422 replaces a result-bearing response. Structural and representability failures remain HTTP 400. Rate limits return HTTP 429 with `Retry-After`. Temporary backend unavailability returns HTTP 503. :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 canonical normalized datasource identifiers. - :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. 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. Exact public built-ins receive the public operator contract; other nonblank fields pass through as possible custom fields. :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. + 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. Structured filters accept exact public built-ins and free-form custom fields. + Successful responses always include a non-nullable `warnings` array (`[]` when empty). When results are incomplete for the requested datasource scope, the response remains HTTP 200 with `results`, `has_more`, and `next_cursor` preserved and a `results_incomplete` warning. Query outcomes that cannot be honored return HTTP 422 `unprocessable_query` and suppress results and cursor; invalid inline operators may include a nested `/query` `invalid_filter` issue. Backend work and audit logging may already have occurred before such a 422 replaces a result-bearing response. Structural and representability failures remain HTTP 400. Rate limits return HTTP 429 with `Retry-After`. Temporary backend unavailability returns HTTP 503. :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 canonical normalized datasource identifiers. - :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. 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. Exact public built-ins receive the public operator contract; other nonblank fields pass through as possible custom fields. :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,239 @@ 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.PlatformSearchFiltersResponse: + r"""List search filters + + Discover caller-visible datasources and common built-in filter fields that can be used with Platform Search. This is a best-effort common catalog, not an authoritative inventory of every field search may accept. + Without `query`, the response returns datasource rows and field metadata without executing search. With a nonblank `query`, exactly one `datasources` value is required and the response may include bounded, non-exhaustive facet values for matching public fields. + + + :param datasources: Restrict metadata to one or more canonical normalized datasource identifiers. With a nonblank `query`, exactly one datasource is required. + + :param query: Optional search query used to request bounded facet values for the selected datasource. When present it must be nonblank. + + :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 unmarshal_json_response( + models.PlatformSearchFiltersResponse, http_res + ) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "408", "429"], + "application/problem+json", + ): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, ["500", "503"], "application/problem+json"): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) + + async def list_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.PlatformSearchFiltersResponse: + r"""List search filters + + Discover caller-visible datasources and common built-in filter fields that can be used with Platform Search. This is a best-effort common catalog, not an authoritative inventory of every field search may accept. + Without `query`, the response returns datasource rows and field metadata without executing search. With a nonblank `query`, exactly one `datasources` value is required and the response may include bounded, non-exhaustive facet values for matching public fields. + + + :param datasources: Restrict metadata to one or more canonical normalized datasource identifiers. With a nonblank `query`, exactly one datasource is required. + + :param query: Optional search query used to request bounded facet values for the selected datasource. When present it must be nonblank. + + :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 unmarshal_json_response( + models.PlatformSearchFiltersResponse, http_res + ) + 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/handler/pathpostrestapiv1createcollection.go b/tests/mockserver/internal/handler/pathpostrestapiv1createcollection.go index 371b9023..5c99a0ad 100644 --- a/tests/mockserver/internal/handler/pathpostrestapiv1createcollection.go +++ b/tests/mockserver/internal/handler/pathpostrestapiv1createcollection.go @@ -56,14 +56,14 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ operations.ResponseBody2{ Collection: &components.Collection{ Name: "", - Description: "whole busily jive hawk gee basic minus hence", + Description: "motionless whenever paintwork import over cuckoo", AddedRoles: []components.UserRoleSpecification{ components.UserRoleSpecification{ Person: &components.Person{ Name: "George Clooney", ObfuscatedID: "abc123", }, - Role: components.UserRoleAnswerModerator, + Role: components.UserRoleOwner, }, }, RemovedRoles: []components.UserRoleSpecification{ @@ -90,7 +90,7 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ }, }, }, - ID: 158969, + ID: 363711, Creator: &components.Person{ Name: "George Clooney", ObfuscatedID: "abc123", @@ -101,7 +101,7 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ }, Items: []components.CollectionItem{ components.CollectionItem{ - CollectionID: 110375, + CollectionID: 570197, CreatedBy: &components.Person{ Name: "George Clooney", ObfuscatedID: "abc123", @@ -266,13 +266,13 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ Name: "George Clooney", ObfuscatedID: "abc123", }, - Role: components.UserRoleEditor, + Role: components.UserRoleAnswerModerator, }, }, }, Collection: &components.Collection{ Name: "", - Description: "wedge colorfully orientate rally", + Description: "athwart skateboard newsstand farm bourgeoisie ah how elliptical aha well-to-do", AudienceFilters: []components.FacetFilter{ components.FacetFilter{ FieldName: types.String("type"), @@ -288,7 +288,7 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ }, }, }, - ID: 131797, + ID: 643990, Creator: &components.Person{ Name: "George Clooney", ObfuscatedID: "abc123", @@ -300,7 +300,7 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ Children: []components.Collection{ components.Collection{ Name: "", - Description: "outside yippee sidetrack mature regularly mouser inject worth", + Description: "woot purse salty even as advanced", AudienceFilters: []components.FacetFilter{ components.FacetFilter{ FieldName: types.String("type"), @@ -316,7 +316,7 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ }, }, }, - ID: 149448, + ID: 359978, Creator: &components.Person{ Name: "George Clooney", ObfuscatedID: "abc123", @@ -328,7 +328,7 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ }, }, }, - ItemType: components.CollectionItemItemTypeCollection, + ItemType: components.CollectionItemItemTypeURL, }, }, }, 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..cf6cc5e8 --- /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 { + // Stable canonical normalized datasource identifier usable in `POST /api/search` `datasources`. + // + Datasource string `json:"datasource"` + // Common built-in filter fields for this datasource. May be empty. Absence of a public built-in here does not make that field invalid in `POST /api/search`. + // + 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/platformfilterfieldinfo.go b/tests/mockserver/internal/sdk/models/components/platformfilterfieldinfo.go new file mode 100644 index 00000000..6aee376c --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformfilterfieldinfo.go @@ -0,0 +1,44 @@ +// 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` and `USER`. Clients must tolerate unknown values. + // + Type string `json:"type"` + // Supported comparison operators for this field. + Operators []PlatformFilterOperator `json:"operators"` + // Bounded, non-exhaustive facet values for this field. Omitted in catalog-only responses. Present as an array, including `[]`, when query-backed discovery executes. An empty array does not imply that no valid value exists. + // + 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..c8fa11b0 --- /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 { + // Datasource metadata visible to the authenticated caller. Each `datasource` value is a canonical normalized identifier usable in `POST /api/search` `datasources`. Empty 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..932cfb57 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 canonical normalized datasource identifiers. // 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. 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. Exact public built-ins receive the public operator contract; other nonblank fields pass through as possible custom fields. // 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..d04d1512 100644 --- a/tests/mockserver/internal/sdk/models/components/platformsearchresponse.go +++ b/tests/mockserver/internal/sdk/models/components/platformsearchresponse.go @@ -11,6 +11,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. Always present; empty means `[]`. Clients must tolerate unknown warning codes. Current code `results_incomplete` means some results may be unavailable for the requested datasource scope; results, `has_more`, and `next_cursor` remain present. + // + Warnings []PlatformWarning `json:"warnings"` } func (o *PlatformSearchResponse) GetResults() []PlatformResult { @@ -40,3 +43,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..7d96a5f2 100644 --- a/tests/mockserver/internal/sdk/models/operations/platformsearch.go +++ b/tests/mockserver/internal/sdk/models/operations/platformsearch.go @@ -8,7 +8,8 @@ import ( type PlatformSearchResponse struct { HTTPMeta components.HTTPMetadata `json:"-"` - // Successful search. + // Successful search. Always includes `warnings` (`[]` when empty). A `results_incomplete` warning may be present while results and cursor remain available. + // 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..174de222 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/platformsearchfilters.go @@ -0,0 +1,50 @@ +// 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 canonical normalized datasource identifiers. With a nonblank `query`, exactly one datasource is required. + // + Datasources []string `queryParam:"style=form,explode=true,name=datasources"` + // Optional search query used to request bounded facet values for the selected datasource. When present it must be nonblank. + // + 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:"-"` + // Search filter metadata. + PlatformSearchFiltersResponse *components.PlatformSearchFiltersResponse +} + +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 +} 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..c0fd29da 100644 --- a/tests/test_messages.py +++ b/tests/test_messages.py @@ -18,7 +18,7 @@ def test_messages_messages(): res = glean.client.messages.retrieve( id_type=models.IDType.CONVERSATION_ID, id="", - datasource=models.Datasource.SLACKENTGRID, + datasource=models.Datasource.SLACK, timestamp_millis=558834, ) assert res is not None diff --git a/tests/test_search.py b/tests/test_search.py index 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..8763da58 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, + "ugc_type": models.DocumentSpecUgcType1.COLLECTIONS, + "content_id": 993975, }, { - "ugc_type": models.DocumentSpecUgcType1.ANNOUNCEMENTS, - "content_id": 150932, + "id": "", }, ] )