diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index c34ed015..6bd928c6 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: a20695749796cddfd0cc7c0e4a12a7ab + docChecksum: 939d2f12fecf92a82326fb98be3b67dc docVersion: 0.9.0 - speakeasyVersion: 1.770.0 - generationVersion: 2.893.0 - releaseVersion: 0.13.0 - configChecksum: fbdf6564dabfc66d8d43921f9aab9d41 + speakeasyVersion: 1.786.1 + generationVersion: 2.913.3 + releaseVersion: 0.14.0 + configChecksum: 60e53eb0ca10fee04991259a07040203 repoURL: https://github.com/gleanwork/api-client-python.git installationURL: https://github.com/gleanwork/api-client-python.git published: true persistentEdits: - generation_id: 987864f6-cd1e-4c05-a16b-4739643415d0 - pristine_commit_hash: 06cc8c7f7c551cc2f82ad39dd38c63fe2ca63e29 - pristine_tree_hash: 9cd8d96d15f384f677b54671075391a45cdd533f + generation_id: 9933f82c-5a95-4053-b905-51fcefb8e1ca + pristine_commit_hash: 03dd0100e03d2977a06c836f90098444a3e154b2 + pristine_tree_hash: 64c3383b81aea902a02053b68ab16ccdf905ae3b features: python: acceptHeaders: 3.0.0 @@ -21,7 +21,7 @@ features: additionalProperties: 1.0.1 configurableModuleName: 0.2.0 constsAndDefaults: 1.0.7 - core: 6.0.24 + core: 6.0.32 defaultEnabledRetries: 0.2.0 deprecations: 3.0.2 devContainers: 3.0.0 @@ -36,17 +36,17 @@ features: globalSecurityFlattening: 1.0.0 globalServerURLs: 3.2.1 groups: 3.0.1 - methodArguments: 1.1.0 + methodArguments: 1.1.1 methodServerURLs: 3.1.2 mockServer: 0.1.4 multipartFileContentType: 1.0.0 nameOverrides: 3.0.3 responseFormat: 1.1.0 - retries: 3.0.5 - sdkHooks: 1.2.1 - tests: 1.19.9 - unions: 3.1.5 - uploadStreams: 1.0.2 + retries: 3.0.7 + sdkHooks: 1.3.0 + tests: 1.19.10 + unions: 3.1.7 + uploadStreams: 1.0.3 trackedFiles: .devcontainer/README.md: id: b170c0f184ac @@ -222,8 +222,8 @@ trackedFiles: pristine_git_object: 69acef4de938067397980887e41d16ff3df23529 docs/models/allowlistoptions.md: id: ba4d408f7c0f - last_write_checksum: sha1:552aedb8f14b744735e387cac111e935991b6330 - pristine_git_object: e986d96670dfd60f104d4690368bd5f08153a4fa + last_write_checksum: sha1:bfb1bfdc89ff18c7b2a1f4674afaee48ebd536ae + pristine_git_object: e1c6f3876247ed4fa2fdce53f576ad5945b2f670 docs/models/announcement.md: id: b48819ef2145 last_write_checksum: sha1:6abbccb48016fff478e8edf48b8a51621d850a54 @@ -612,6 +612,10 @@ trackedFiles: id: fdce0b0bc491 last_write_checksum: sha1:6ba12c90efff718bdd939e773d0426df695090d4 pristine_git_object: dd22b66754081ff30b9d76cfc937603c6d80d965 + docs/models/createagentrequest.md: + id: 9484bab389c1 + last_write_checksum: sha1:2d1e18eb538b82a4e4448cf66696872d8f138b9c + pristine_git_object: 6d556c537edb110ad9d80ee992b5f12a3974713e docs/models/createannouncementrequest.md: id: a37b0e57dfe9 last_write_checksum: sha1:5da6f2bd206ac915200248706e91c0601a4c7d79 @@ -672,6 +676,10 @@ trackedFiles: id: 82707fc9efe5 last_write_checksum: sha1:320bddb9b5ab5dec88760d844b2d585aea2d87f8 pristine_git_object: f3315390350a0db0d3eded212d626abc52c0c834 + docs/models/createworkflowrequest.md: + id: dd9173517846 + last_write_checksum: sha1:0c65e19e884a9444d65dbe54e93073f7d2f7d88f + pristine_git_object: e955a419d336ed9e949e8cab1f341aac83901665 docs/models/currentactiveusers.md: id: 8c45d84c2408 last_write_checksum: sha1:74a4477b894de8d1caca58492504b472a82a94c2 @@ -994,8 +1002,8 @@ trackedFiles: pristine_git_object: e29b2f5fe2b191a8ad8f3e225b6accc748b81e2f docs/models/dlpconfig.md: id: bee569951c5c - last_write_checksum: sha1:a7cafb975a5bca6458a7c4a50e1f98d3d29e1a18 - pristine_git_object: eec4bb2823477745162b6a604d6ed6547bdfcdbd + last_write_checksum: sha1:de8dbe6b705782751b1470f8fca7807df1370387 + pristine_git_object: e99c7c037122ad1b1ba8b3f491460746db994d11 docs/models/dlpexportfindingsrequest.md: id: 846a7d063614 last_write_checksum: sha1:9ca5aec938795a317d000ea1f234a9c64d85be47 @@ -1342,8 +1350,8 @@ trackedFiles: pristine_git_object: a851a7f13eb25d515fa9b9244c5dfdc98fa14e2c docs/models/feedrequestcategory.md: id: 31a02f3064c7 - last_write_checksum: sha1:864d482f0e5991b6e68d380cf56b9e831c473503 - pristine_git_object: a4e28a088012c3ad5150dacc7d9c827b22682aa9 + last_write_checksum: sha1:f97a0f71e53f30efa4515d2f7bc5c0b0b818d1de + pristine_git_object: 07efe28314960724b332c8eb760a770002e1db3a docs/models/feedrequestoptions.md: id: 58eb26b19e77 last_write_checksum: sha1:fd2ab08736cef8156169b0cfee8c52e7aed1accf @@ -1358,20 +1366,20 @@ trackedFiles: pristine_git_object: 7f3ded753911005508191be31592746cef1c2781 docs/models/feedresult.md: id: 4b67dc1cea64 - last_write_checksum: sha1:88483849cc6d4bcfe685cf25a593e9ab50d47c26 - pristine_git_object: 6318b0206b7d4027b036e78c709ed4eb259ccedb + last_write_checksum: sha1:6781234248531681b38a1394afc7a62438440758 + pristine_git_object: f14153ca4fc73e08d620714d4ed5ef2c0bad05c5 docs/models/feedresultcategory.md: id: a5f77f38d0a7 - last_write_checksum: sha1:97990b6481189431a706847e927154583ee09270 - pristine_git_object: 5d0a0beb0c0210a48a7125715620b446c1fdde46 + last_write_checksum: sha1:f4b4c8bf745f9b4f121422a6326c1e4cf1d41a3a + pristine_git_object: 37520b3361d5534017b26e0381c7af8c2c931430 docs/models/fieldscope.md: id: e6b52bcb22a6 last_write_checksum: sha1:13a1492ce39d2f89a01d626996a345a1339a1873 pristine_git_object: 3c3c097ac04d2e75a6cff47985e6688cf027d236 docs/models/file.md: id: 4ad31355bd1c - last_write_checksum: sha1:ade4d3c908c664a07a3c333cc24bc1bfb43ab88b - pristine_git_object: 37cc418f9e5189c18f312c42060fd702e2963765 + last_write_checksum: sha1:3e65f2007c5f8611f830db1406f2bf41a998064b + pristine_git_object: b8713ed6e335b8aa2d39d77a5d56819ee7be12a7 docs/models/followupaction.md: id: 5c7a87d7ed17 last_write_checksum: sha1:c554d9907c2a862ba7d07855bdcbfad06f7631ce @@ -1650,8 +1658,8 @@ trackedFiles: pristine_git_object: c1d48433bcb643f3403e312a32ebbd2a91909f60 docs/models/grouptype.md: id: ca781cf2b1c3 - last_write_checksum: sha1:413a748c346eac3513abddae0d69276e14e52d0a - pristine_git_object: 4e38962c518a55b094e86abba5886f06b4e84c40 + last_write_checksum: sha1:fdc6ccb650825171da890bdf4938250236299c22 + pristine_git_object: 289506119440d77a6f1e1616f6167c856e3a2f90 docs/models/hidebuiltinfacet.md: id: 338b17567126 last_write_checksum: sha1:6fe74dd1957d4050706a4bbce1c1c413fafe12e9 @@ -1778,8 +1786,8 @@ trackedFiles: pristine_git_object: 4203309096512cab077b45bc77906df389c01421 docs/models/justificationtype.md: id: 8286affacee4 - last_write_checksum: sha1:471d436013bd93750dd63edbe0f8ddaa799d2fca - pristine_git_object: adf5b69bdf3cd8c90a108b8fcca2b79a38acddc1 + last_write_checksum: sha1:73ae0d9428ef3185ad19cab8c4834cf5c952dba6 + pristine_git_object: 442119bc4f619c2fe80c6004e4a02d5c81207e2b docs/models/knowledgetype.md: id: 1e0c90679228 last_write_checksum: sha1:0030a7539b9362bbb59e0bbd36580676058b3540 @@ -2100,6 +2108,10 @@ trackedFiles: id: 52df3106f8dd last_write_checksum: sha1:64309a6e996c663f2f34cea4390bab0b5909764e pristine_git_object: a24b8b95237035cda5ff134a9c0cc3bb601e06d7 + docs/models/placementreason.md: + id: e3d1cdfcf2b5 + last_write_checksum: sha1:f4720f3ce89ed29c92e2bd0aa15169ccc428bafd + pristine_git_object: 515cd010b7035e35f410e715d18da9c175d18e89 docs/models/possiblevalue.md: id: 630387aebbc5 last_write_checksum: sha1:490f03fc39621ae0f816bb16d2922e1a8042cdb1 @@ -2838,8 +2850,8 @@ trackedFiles: pristine_git_object: 61dd41f0319201cc105e29174ab1cc0018cecbce docs/sdks/agents/README.md: id: 5965d8232fd8 - last_write_checksum: sha1:f78cc3314d4fdb3c52fcf5b49e01706bc2832bde - pristine_git_object: b929a12d5df1c8a99533448d6c5e6d60f4e17fc0 + last_write_checksum: sha1:48c7b15dfcda891f9a1a2e5ad4bd6eac6f1ca056 + pristine_git_object: 00789fbf58096090a54c254a0f112588042626cb docs/sdks/announcements/README.md: id: 3d2e130a217c last_write_checksum: sha1:ecfa655bb27dee6890656542cfafda0aa6ed1ab9 @@ -2990,8 +3002,8 @@ trackedFiles: pristine_git_object: 79e388be87446ab6a4064b372bad0e8376d0cb5e pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:a3a7799c7cc183344491cfa36f7a0b3c7aba85ff - pristine_git_object: f34dd6a5342bf6af6b1000135c5f479020c0c39b + last_write_checksum: sha1:efdc32478817512b528f8b11d32db9d78763bc54 + pristine_git_object: be2c723b48708ddcddafb34c2ec28a06e5d57905 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:c2c83f71dea61eb50c9e05da83b16d18b4da8794 @@ -3014,100 +3026,100 @@ trackedFiles: pristine_git_object: 198de6078dd08c0ed6216d6582a8f45c4e547404 src/glean/api_client/_hooks/types.py: id: d927c12282ca - last_write_checksum: sha1:dc3d5c4202e6b51da6d06c1f817a5eb443247900 - pristine_git_object: 58c4d70ac1797b86ff5c4237cafbc344c42d8f64 + last_write_checksum: sha1:979e2e0e80f1eb2f893bfeb3711bcc2ae0cb7948 + pristine_git_object: 55f23c1feabfedeb7e8cd5bea8b910f0ae0b77d9 src/glean/api_client/_version.py: id: 0ce22b26136b - last_write_checksum: sha1:ea55ade5532c483da10f1cfec9b6ceccde7522d6 - pristine_git_object: 8d9da6a0d3001f2f5448cc7fb89443c4d02ba5ad + last_write_checksum: sha1:087799bcef8f585de1092bf8648f7ece62e4d81e + pristine_git_object: 4ef4e9f56746a5e9a5f430fa3240d6c3fb08dc83 src/glean/api_client/agents.py: id: b925701a9217 - last_write_checksum: sha1:c90940a6d28847540858c932148d29ef50cac7ec - pristine_git_object: 99f5f6604807830add51abbd79fa0fc82572a11c + last_write_checksum: sha1:a7382154f0a1f14b79ad8677b51f38b4de34bba8 + pristine_git_object: cfd615e4ac871193f44940dc9de437b698d00be3 src/glean/api_client/announcements.py: id: 452f3d593912 - last_write_checksum: sha1:0767c840c29bba9e3c95bbbd714df374f2907b00 - pristine_git_object: 33123a0a80e55c210fcfb07e47dc9c7cac7e15d9 + last_write_checksum: sha1:4b9f4ff97fb9754b5da3a36c1cc8edb02318ed7a + pristine_git_object: a17983afc087d2cac7fffdc3d1fd1110f5392c71 src/glean/api_client/answers.py: id: 184a18f8be7e - last_write_checksum: sha1:b839b0e5abf3b11790a98fe100f84f5a3b3254e9 - pristine_git_object: 0757b71f8300ccbd72db4c292ffdf03b03f93231 + last_write_checksum: sha1:00537bf7bc477465a9ef695fa26bfb4600154b21 + pristine_git_object: 5824d6a30b98361faaba6ae11740c23d98b9084e src/glean/api_client/authentication.py: id: 84ebb3cfd339 - last_write_checksum: sha1:9274054daf1c09ba374849588b20349b079088ea - pristine_git_object: 092f1fb0bfa6b46ccfee4a70a22ee48b74278773 + last_write_checksum: sha1:c32181cd970a63cbdf8589f65a8fa0d352714f5f + pristine_git_object: 66854e5c9dbd68af6084ac06b842f86eb54bbd00 src/glean/api_client/basesdk.py: id: a9eeecf7fa49 last_write_checksum: sha1:fb3d2fafa4944b79b38e8ba30e92e0d42079688c pristine_git_object: bf7b1b3b25ce6530403b0dd9f60599d236c780ce src/glean/api_client/chat_sdk.py: id: f2f30e13ca42 - last_write_checksum: sha1:aba2731380e3d68d792cc2f4fd42b21f5bb76a4f - pristine_git_object: 11e082d61440f5d917e177ba8c578126a3ba1a5b + last_write_checksum: sha1:fa88967f959eb08a5e6131a577d28c9b0cb2826f + pristine_git_object: b40d3a255c6c7b68b19b2fd780ed9a7c01a39655 src/glean/api_client/client.py: id: c0c188098f10 last_write_checksum: sha1:86fca49d07766b3c5e387256a0a308044632ee77 pristine_git_object: 122be2b984e54e47078c9b37e5722f1aa78b6e28 src/glean/api_client/client_activity.py: id: 8227dd95d034 - last_write_checksum: sha1:7c9fa340b6f5fde6a298fe96f5631cf0b65c7cf0 - pristine_git_object: 0fc1ce18d5ce25d5a371abf17dc974932bb603a8 + last_write_checksum: sha1:36b369a3a1175902a326f27e6679ffaefb4979ec + pristine_git_object: 42aa2ffce8105a293a0a02353f41f083136fdc5f src/glean/api_client/client_agents.py: id: 61b53ccd2b3b - last_write_checksum: sha1:6d12ed745ef6012f59c318195e84c3099e96b081 - pristine_git_object: 6e1ff0f49e8924942f90c22977e38af3d6fb865d + last_write_checksum: sha1:1323363d313d33718def1b1e24917f486cedc1c9 + pristine_git_object: 5f25ddecd021376dcf57a018185eca1faf33d98a src/glean/api_client/client_authentication.py: id: 0b237b7c1b11 - last_write_checksum: sha1:534efe91d637ae41aa5791b672b2ef91a3fbb81b - pristine_git_object: b2e67417be8b3c4927603fb275831447988e9de6 + last_write_checksum: sha1:ba849a26bea87ee2097e58833a81d755891114a7 + pristine_git_object: 27679b5b2f69a540c371bf6aaaa2c095ab703779 src/glean/api_client/client_chat.py: id: 42cbb9b5acf3 - last_write_checksum: sha1:75b70a975b72b0a748a33fbea4c2e951c89265ca - pristine_git_object: f1e89630d067883690a6fe35687b58a8d2db627e + last_write_checksum: sha1:56e8989d8052154a151277d3aed762705d270ab6 + pristine_git_object: d504d06363bd65167eb12e4d2ac66cf97739117b src/glean/api_client/client_documents.py: id: dac599de515c - last_write_checksum: sha1:7a41dae11c9e0c58be6e2e8fe07be6f78d8f24bb - pristine_git_object: c270bf21a93e6b5f3befa10e8975635f18ae2fe9 + last_write_checksum: sha1:67a32fc2e80bf0ce181037aed0edbd66cc75e074 + pristine_git_object: d93ffbbf0b761e7a84e54f152f2a528f61e792a8 src/glean/api_client/client_entities.py: id: 5a17ae87ac6c - last_write_checksum: sha1:ca58f63deb474cbf31b3da3229e5cc6842631c21 - pristine_git_object: 67fbc0db4c5234d05613f9f37fcf7c382316ecc1 + last_write_checksum: sha1:8321ae00a63b608df29cd5a73d545f4725941c9a + pristine_git_object: 819e58a2654a4f9dad345dcebc9d1ad7d104d319 src/glean/api_client/client_governance.py: id: 106860f10ce0 last_write_checksum: sha1:ebe769873505002b9f00342174c7fd2508af52b6 pristine_git_object: 6011411d2ab08645047358a30c0a87aec61555bc src/glean/api_client/client_shortcuts.py: id: 5ef5dacbcba9 - last_write_checksum: sha1:6bfa420d42f76ed01b60f93abf77ef404d8fa631 - pristine_git_object: a4db274d2b324b9b24a9aa2e5673b229f44d45f1 + last_write_checksum: sha1:94f35f0be652742f2f6d6912df01e133ec1247e2 + pristine_git_object: 4241e6176c34be8bc4b51a7ac8719866777c2920 src/glean/api_client/client_tools.py: id: df600583b558 - last_write_checksum: sha1:5309a9ee24043c49e41c757f575c3d2af899dca3 - pristine_git_object: 14d9f68cc6a74ea72988f7d041dfeb4bffa61921 + last_write_checksum: sha1:14da983c729685966b1854148fa3e0b034dabf1f + pristine_git_object: 143bb03729a126e0cd628a32aaf3e93d0bca9b95 src/glean/api_client/client_verification.py: id: 211199afa506 - last_write_checksum: sha1:468067c52776c584837bccef6db419ea5b339d79 - pristine_git_object: 69a3abb71a49fc4cbdb64523f90877d308d1f886 + last_write_checksum: sha1:c0b76b8f9f6bd3051c0396b0dc080f5ed41fd890 + pristine_git_object: 706d849954ab96c0c5e733d935165dd97299c77b src/glean/api_client/collections.py: id: df34f0fd10dd - last_write_checksum: sha1:f974525cf6b9db9f6be2085224b34653adb9894a - pristine_git_object: f93e472ce543b8e4e46e53c013c680b4f0f031ed + last_write_checksum: sha1:0415b7acc409d8777dc5d545bf0f77a795b30f7e + pristine_git_object: ddc1b4d7efd33893ab808f43ba94381225550d95 src/glean/api_client/custommetadata.py: id: d5621a2ad56e - last_write_checksum: sha1:f50c4d35b769079359d852c2f31bcf7237422e38 - pristine_git_object: da51ad9d6751b4fc689538f37db09201189ccb6d + last_write_checksum: sha1:ea635be1586ca604b7a93b42573212318ee37542 + pristine_git_object: 1e933c1c94bc93d31cd2dd343984abf821287d7d src/glean/api_client/data.py: id: 21cf13413429 last_write_checksum: sha1:f03b31e07a912efca080d9298fbb45e16590702c pristine_git_object: 756e122c3e258805290344aa6d978b351bcbfbf5 src/glean/api_client/datasources.py: id: 22aad0060f38 - last_write_checksum: sha1:a0b330a447ad966cada161f386964063e9fbf129 - pristine_git_object: e4eba5ec25fc89a9dc39f071cd304ae81c82b503 + last_write_checksum: sha1:8da37cf91ce0d7f3868e5053c2486cf242acb4f6 + pristine_git_object: eb6593e336958b28b02b47165ab970ba5ad414d5 src/glean/api_client/entities.py: id: 38ebbab2f8a0 - last_write_checksum: sha1:bb60eaffdd06d905103dda28c4cf0d6265ca0a42 - pristine_git_object: 6f3f666e5284eb947398edaa84f17b53e1782fc7 + last_write_checksum: sha1:63222ae61584458ecde514054fdf1f1daaffc610 + pristine_git_object: dbf83344af4627c1dc89f2bb47f9d16961005a1a src/glean/api_client/errors/__init__.py: id: 88bbd5450191 last_write_checksum: sha1:d5663156287bccab87e321f0a3b9b1ae802adaa9 @@ -3146,8 +3158,8 @@ trackedFiles: pristine_git_object: 3e029c12197bb87be06e01323afbc495968a6eaa src/glean/api_client/governance.py: id: e30db8f06e58 - last_write_checksum: sha1:0104a09486062677211230ce8fe2c3dab32a1da1 - pristine_git_object: fd67e05d451590fe3337ad8c8728141035d62294 + last_write_checksum: sha1:7ecff241705dbef3556dca3e783c68aad8de5550 + pristine_git_object: c8e2256e46864adda67f2b56e0c919aaee57b663 src/glean/api_client/governance_documents.py: id: e5ab033181fd last_write_checksum: sha1:761beada29ea72f570c55e6377706671d3b8fcbd @@ -3162,40 +3174,40 @@ trackedFiles: pristine_git_object: e4cc2c5282fc5c96a34819cab6309b69b709c432 src/glean/api_client/indexing_authentication.py: id: ab6b40ef5aa5 - last_write_checksum: sha1:bac27b292440f3bba94ba23f8932220f7f26adb2 - pristine_git_object: 2195782fb2a27120bae3d0f3e2d3458d1cf80658 + last_write_checksum: sha1:f403cee1b7ee788c80c2783c610bada57402ba02 + pristine_git_object: 98f3a192728363595124514b94bc66b85d331921 src/glean/api_client/indexing_datasource.py: id: 97727f0727c1 - last_write_checksum: sha1:e0e70e97cfb18e4cb928c3ba7bc4c05a77d93a17 - pristine_git_object: 0bb158571a104fc4434c1e37680aeb6b7c361e38 + last_write_checksum: sha1:7aa6de1171deba576fffa1be6a70714a59bd2d4b + pristine_git_object: 988896285fa0a79fcf9f2f328eaf7debf5726ee5 src/glean/api_client/indexing_datasources.py: id: 9520e2db8686 - last_write_checksum: sha1:3ac36de64f6216aae0dd69f046bb235dc8bbb8b4 - pristine_git_object: b8b091e823c403c72782ec71db1015aaa6e1cfd9 + last_write_checksum: sha1:57b43785d5f21022acb563df002cc3294d27a54d + pristine_git_object: 7438ab955cb052b205dc8415af7731cbaa5edd08 src/glean/api_client/indexing_documents.py: id: b5c2b64ee1fa - last_write_checksum: sha1:488660c9bc6160d20012c5e5ab7904c56c276b34 - pristine_git_object: 9817af75d822b6cc1e9eab2ba736819507b0a887 + last_write_checksum: sha1:937d9b20cd7285b05eb717e330a2abcb597e2c78 + pristine_git_object: 8677ab51b27fb7c291a12d1bfb72cb3aa8ab4eb6 src/glean/api_client/indexing_permissions.py: id: 86fd3f14396c - last_write_checksum: sha1:3e0cb356c1ecc74b3c4fe356b81a3f9e71abe602 - pristine_git_object: c41d5c914dde853dc5403675c3fe0a6108c8db21 + last_write_checksum: sha1:1562435993344c7a69c49e3beb36634486f2f2c7 + pristine_git_object: e6e349af8dca36d171e650485b92289ee3a4ea9e src/glean/api_client/indexing_shortcuts.py: id: e833440cda56 - last_write_checksum: sha1:0dda65c83c173524f8ab4574b8c2b17c3ec884f1 - pristine_git_object: bdfdec85c7d5d5b2cd2cbd09fe5578a78b83c6aa + last_write_checksum: sha1:05a2de1bd85b224f50c4e10d6c0274db34b6ecd2 + pristine_git_object: 14298512f59dc12234f0c593783d0689755b1974 src/glean/api_client/insights.py: id: 4c5708d15234 - last_write_checksum: sha1:28398156138e38f0cb8d185bacd54b5aa2cc3ce2 - pristine_git_object: 388b8a37421a1f9acc18012aa8f65b8b94051134 + last_write_checksum: sha1:d6baa83e91d32add368b49abcf395408962a8d18 + pristine_git_object: e178944fb4b06aab8e7a5edcaefaf6996fa4c2ad src/glean/api_client/messages.py: id: 3751db64257b - last_write_checksum: sha1:f6c67c8ec112c9dbebb9e053c0e05868bbde14fa - pristine_git_object: fd580d9a1b7770b488fc424b5f8735d8b9bf681e + last_write_checksum: sha1:a74562295b385e4b5e4026cd95b382432db3dafb + pristine_git_object: 77016bfff6209866592fd8b42f2f3527f900992b src/glean/api_client/models/__init__.py: id: d5f6ea5efcbe - last_write_checksum: sha1:5d16cf04d5ea346a12e547e4bfb5ec60f2a656a9 - pristine_git_object: 101111712c9ec0750a3b5599790b4acbf5c9b0e7 + last_write_checksum: sha1:879cdb855fcd2f4219941ba570a69e46f127216e + pristine_git_object: 6292b5752f5b13f8c222147c83c259909213de12 src/glean/api_client/models/actionauthtype.py: id: c7402f35092d last_write_checksum: sha1:7aaa5d1c11b105d0d7265e2a83cb005aafa89645 @@ -3306,8 +3318,8 @@ trackedFiles: pristine_git_object: 13ed679e9400d9033694cfe6c511fb29cbb6932c src/glean/api_client/models/allowlistoptions.py: id: 956eeade455c - last_write_checksum: sha1:a561950c840b4f1e53361dd3bea159fc618f659b - pristine_git_object: 123b345c647c7b305de2915ba7534f9c550eadc5 + last_write_checksum: sha1:60e440360bb3afc80ac0c66ffb03640979ce6426 + pristine_git_object: 0059b3cd1a9aab08d223c9c720fe273155308c08 src/glean/api_client/models/announcement.py: id: acb78a04f33a last_write_checksum: sha1:1ba73ff9151920215ac9c19081b549ab7b32188f @@ -3616,6 +3628,10 @@ trackedFiles: id: 2ff7e2d8021d last_write_checksum: sha1:5203cc6e6506bd574e163b2b18d879c4b19c8a99 pristine_git_object: 83d1aa3b243827c0f27678d94a209aac0a4417b3 + src/glean/api_client/models/createagentop.py: + id: bca1b44cf62a + last_write_checksum: sha1:bc9b540e390ca872fe40d0188311660a039a3881 + pristine_git_object: 4ed4192dbb6da328182b40d002360698706b872e src/glean/api_client/models/createannouncementop.py: id: bf2cd073d77d last_write_checksum: sha1:a636cc5aa94d72878446b69b6ca0e3e91482de2c @@ -3664,6 +3680,10 @@ trackedFiles: id: 65fdd9436d15 last_write_checksum: sha1:285ec74a6e451aa0a6698d663cf501dbd0a24bd6 pristine_git_object: 7fd2e6eb90ed6027e2647312ca3550abc0292b74 + src/glean/api_client/models/createworkflowrequest.py: + id: d084964549e1 + last_write_checksum: sha1:8575c9df02747f481fa8723f4a985c0bded046a3 + pristine_git_object: 206d00f37547917505f9c5a54aaffe7dc6aaf224 src/glean/api_client/models/currentactiveusers.py: id: 0a092cf79074 last_write_checksum: sha1:989717f16473a1c661194af34f9940eb00a26e01 @@ -3946,8 +3966,8 @@ trackedFiles: pristine_git_object: 3e0031b797c3153b0f85b2d219b553fb6f259cf1 src/glean/api_client/models/dlpconfig.py: id: 5012b123f4c3 - last_write_checksum: sha1:ece6188f60c80ab57d3cf8b84c78dcfc2b9420d7 - pristine_git_object: f68bba2b791930a7eff5708502c833d255211f18 + last_write_checksum: sha1:8c4fba40b04eec26d2576f2814037bf55e130918 + pristine_git_object: 5b5700539aee6854e0d421192dc28507d7b04553 src/glean/api_client/models/dlpexportfindingsrequest.py: id: 8776242985ea last_write_checksum: sha1:12a9bc4ffea8f15dbedc67be21158106a56d6ea1 @@ -4206,16 +4226,16 @@ trackedFiles: pristine_git_object: 44041cb376d89949c815ea1e7813505940605855 src/glean/api_client/models/feedentry.py: id: 023eb6c10ae1 - last_write_checksum: sha1:93e85da47116a61d8c9db59ad3bacb954060fce3 - pristine_git_object: eb60f1bdba8b60701958ac591d618e7a0ba5bbc9 + last_write_checksum: sha1:cc44921011cbe99a84d8289ec39e405ed472047b + pristine_git_object: e0057c6b658bcac2f6f779483cb326229796eca7 src/glean/api_client/models/feedop.py: id: b8067ac0a127 last_write_checksum: sha1:c58cb0a3a01925eb14d84176c5c6e9d8f4d84cf1 pristine_git_object: f39626285f84630e5a9233736d652914b759d44b src/glean/api_client/models/feedrequest.py: id: 33496b6a5bab - last_write_checksum: sha1:5c9e71cf8fa61ba2664083654567dfa83035110f - pristine_git_object: 22ab9c4e3a119478466611c6d1b62847f312a20f + last_write_checksum: sha1:368afa62c551563db21d80e3cdd38c9f55343647 + pristine_git_object: d6641777bbf3547507855855b8e07dfa2b7db527 src/glean/api_client/models/feedrequestoptions.py: id: b99003fbf522 last_write_checksum: sha1:d5ffee29242075cbe6d2dd5ec916b0c3d40acf54 @@ -4226,8 +4246,8 @@ trackedFiles: pristine_git_object: 683438c837601f483526ec18756fadc7222edb24 src/glean/api_client/models/feedresult.py: id: ae187332b37a - last_write_checksum: sha1:c9d4daf7c06053ce4a52c93acedc8dba5e144f52 - pristine_git_object: c3ee3e987de032926291cf44340b32b3d3678a52 + last_write_checksum: sha1:2d3c16767cd27cc94ddbe67744c75968676923c3 + pristine_git_object: 1f1f66a2cd86cb9db66cf02c45162e80cc5b716b src/glean/api_client/models/followupaction.py: id: e2de5c4c8524 last_write_checksum: sha1:49e1a826449081fecfcd828c940604db949a8533 @@ -4474,8 +4494,8 @@ trackedFiles: pristine_git_object: f1b4a7e932c2605014da90f15aca4546c4f0a68d src/glean/api_client/models/grouptype.py: id: 64925e34480c - last_write_checksum: sha1:c8119cbb1f44d407b78c99228be80c65cdcdbcf9 - pristine_git_object: c94336ed992ffa187193a41ac0a1b2e072d25338 + last_write_checksum: sha1:8b69c4bf7a96fe5ea89e05741eab3b542061b207 + pristine_git_object: 88a980fb7f1e533c63641e3d9c445d233f751fcd src/glean/api_client/models/hotword.py: id: 0a4b0a179e14 last_write_checksum: sha1:8852104f422c25d298bbc9d2975e820ef744a5a2 @@ -5286,8 +5306,8 @@ trackedFiles: pristine_git_object: 4aafc91088fbdc1fe88f61ea577e131b6bbea769 src/glean/api_client/models/uploadchatfilesrequest.py: id: c648ec79e147 - last_write_checksum: sha1:30d482b8435697b94c62f72ae38a235ea9e1f2e6 - pristine_git_object: 8e8d01c07cc98fb2347ea8e94b0ecc3d1a10ee0b + last_write_checksum: sha1:801b0ae17d628285d5ed6aa4692a58f457a15c84 + pristine_git_object: 1a4665d1033518469a94a1ad73000324aa95df97 src/glean/api_client/models/uploadchatfilesresponse.py: id: 73c5f35b8280 last_write_checksum: sha1:8876a4b054e7099e4ab7be02969b945f19618a92 @@ -5382,24 +5402,24 @@ trackedFiles: pristine_git_object: 85e816dc7cea2c95b4e067d756e428be2696d0a4 src/glean/api_client/people.py: id: e32c03723ded - last_write_checksum: sha1:5e61d51a667fef9cab9fc6f597a17fcff6df1f79 - pristine_git_object: 8f853d2a543d89ce7553b9e67dd3cf6bfc64c2b7 + last_write_checksum: sha1:b82a2331deefc96d298fe6c377a220986fe15dd3 + pristine_git_object: 5e0a722f4e8a9e75246072acb8ca5786bdf8634b src/glean/api_client/pins.py: id: 4a37ead65f8a - last_write_checksum: sha1:064a62119d9345a93c5b14a465e70e88df97e591 - pristine_git_object: 0127c0074ca0c944349830ab3806d893f1c4ba4e + last_write_checksum: sha1:127d0abf8b7631fa2cd9ed20e4f3a8c93f082e77 + pristine_git_object: fbba9b16426c4243075554b6824f7ba2de3ef8f5 src/glean/api_client/policies.py: id: 680f941e0620 - last_write_checksum: sha1:b2509e090e4e63b42c01a0592bcdf857122b7c02 - pristine_git_object: 91b7c01d3b49ac3b7aa396e316c81a3d1134e48f + last_write_checksum: sha1:3b748f12e450aef5ead84d0e84fe17126a1b9f4c + pristine_git_object: ce81e8efb14de8a142c9e93ab30bbf21f4454287 src/glean/api_client/py.typed: id: 85a37d5088f9 last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 src/glean/api_client/reports.py: id: 5e6fdf55dd93 - last_write_checksum: sha1:92b1240cbb407520682cfad15978ffbacfdb7e4d - pristine_git_object: 1a11b2534c1e9dd6dfcebefd5058cb2a2c0a9413 + last_write_checksum: sha1:c3208e2ea3a1455340f15e4c6563cd0e3c4990cf + pristine_git_object: 3a4c3e6eee14c25616dbc8cbec206d9a74070d80 src/glean/api_client/sdk.py: id: e2de37b3ce92 last_write_checksum: sha1:c65cc4e430c4ae9413a32c5feabd21b4bd54bc78 @@ -5410,24 +5430,24 @@ trackedFiles: pristine_git_object: 22e0a4eab0ef8e54dcfd986084d01c14a56f47a6 src/glean/api_client/search.py: id: a3b404a8b402 - last_write_checksum: sha1:69ed4e3adb9f484f5b83d601aa6c7cce686b2055 - pristine_git_object: 2274683221d56688636689111335be70ddf62a99 + last_write_checksum: sha1:74ed1a856099831956bf54882af433fd5a3efb43 + pristine_git_object: b48e621203e5be34d8b08de1eddbda5f6f1055aa src/glean/api_client/tools.py: id: 3ea40147c1cc - last_write_checksum: sha1:c9b1636b2cde77d5a505ce01225171a4305e36d9 - pristine_git_object: 42b0a0c4dad22b0fabd8714732ee2baeaa5b2120 + last_write_checksum: sha1:8087146ca0ec7a234cb61e4b2c93dc5aee37bc22 + pristine_git_object: 9ac9f2a06dd4f6c72545f646e91f1a8a6580c168 src/glean/api_client/troubleshooting.py: id: 39ea2644e031 - last_write_checksum: sha1:1d5af9d5cd6ccca46c2107190757f7d9e45ccb5d - pristine_git_object: 5f427234201abf2b8eaa43a518b6370ad67b7710 + last_write_checksum: sha1:c5742accacc43b0ed900fa4f157c132f94434754 + pristine_git_object: a713f2abb347828b7b0e8b992e37cab3f00fb4f6 src/glean/api_client/types/__init__.py: id: f63c790831ee last_write_checksum: sha1:f9ad14217f832e74f594285960125add50324be9 pristine_git_object: faa268137bc01c9d08cfadc4797017db48747a96 src/glean/api_client/types/base64fileinput.py: id: 83c3e0b80185 - last_write_checksum: sha1:4780e893d3853b5a6e28d9a6ca3ee102ce0f502d - pristine_git_object: 25fc53989ed497649363f983219fc58705c8bf87 + last_write_checksum: sha1:1522687ae3398374c35710cad993a6e82b5ab99d + pristine_git_object: 862566fe2b1db830276b390e136e65090e5963d2 src/glean/api_client/types/basemodel.py: id: 436a12e02484 last_write_checksum: sha1:10d84aedeb9d35edfdadf2c3020caa1d24d8b584 @@ -5454,12 +5474,12 @@ trackedFiles: pristine_git_object: 3324e1bc2668c54c4d5f5a1a845675319757a828 src/glean/api_client/utils/eventstreaming.py: id: fdc3230ebb0e - last_write_checksum: sha1:620d78a8b4e3b854e08d136e02e40a01a786bd70 - pristine_git_object: 3bdcd6d3d4fc772cb7f5fca8685dcdc8c85e13e8 + last_write_checksum: sha1:7d1dc68f8b48486ab646653aa05cc38752e1f912 + pristine_git_object: a8d4fe5cc88d3c7337339e1b36a61bbf7ca8c4eb src/glean/api_client/utils/forms.py: id: 00f73e14b0f0 - last_write_checksum: sha1:0ca31459b99f761fcc6d0557a0a38daac4ad50f4 - pristine_git_object: 1e550bd5c2c35d977ddc10f49d77c23cb12c158d + last_write_checksum: sha1:dcf527960992b8baef3b21937c7e6c4e652630c0 + pristine_git_object: 193f264960f3014c81d41543b9023c14c44c12e6 src/glean/api_client/utils/headers.py: id: 1510f7a21a4e last_write_checksum: sha1:7c6df233ee006332b566a8afa9ce9a245941d935 @@ -5482,16 +5502,16 @@ trackedFiles: pristine_git_object: 591415af8e64baa410627b507d2740afb5387d13 src/glean/api_client/utils/retries.py: id: 36d4cce6fbf6 - last_write_checksum: sha1:471372f5c5d1dd5583239c9cf3c75f1b636e5d87 - pristine_git_object: af07d4e941007af4213c5ec9047ef8a2fca04e5e + last_write_checksum: sha1:3585b891142f30a597fbf7a2f0340700babef8e4 + pristine_git_object: ca7b59efebbbd9545744d0207ef42725c4cc5143 src/glean/api_client/utils/security.py: id: 5c4255995c2c last_write_checksum: sha1:355ba142fd72ec019e46b9aadb1da7172c17a312 pristine_git_object: 4a272f16c2af33f6364bd9aec9cdc33b91f228d2 src/glean/api_client/utils/serializers.py: id: c499367f56e9 - last_write_checksum: sha1:61009f2e4ef6613a1a5af813fe020373dae5a492 - pristine_git_object: d2149f8b909cb96628db140ac3cddb1b1e981367 + last_write_checksum: sha1:7485f1425b0661fd84836186570df90207eec6af + pristine_git_object: 1031ed930bad5ece220cf7416a56c29f40f0588b src/glean/api_client/utils/unmarshal_json_response.py: id: 10872f2f336a last_write_checksum: sha1:8bea26e2247cd1c5b8dc60c70725ad0aed487c6d @@ -5506,8 +5526,8 @@ trackedFiles: pristine_git_object: dae01a44384ac3bc13ae07453a053bf6c898ebe3 src/glean/api_client/visibilityoverrides.py: id: 85e53a1c5de5 - last_write_checksum: sha1:2476bd662c4f99ea96f9f9199e9c0c5402ef2274 - pristine_git_object: ecbc256b43054dcabb7346c9adcd309320f10a93 + last_write_checksum: sha1:633cf3b5b0f1f2e4359d271a3a678a229e95f20a + pristine_git_object: 7c608e8c2ed1a4a62d01b601d1c0a435e5c710f9 tests/__init__.py: id: 8e911f6351f3 last_write_checksum: sha1:cffdfca8e87b9acc39f414eddf64d233ba5fe450 @@ -5570,8 +5590,8 @@ trackedFiles: pristine_git_object: 929558ef2e1165f7e09da6d0a64f016c90971655 tests/mockserver/internal/handler/generated_handlers.go: id: 61ac4f7cce9e - last_write_checksum: sha1:1efa96a429f9879c5cdb7bd064661b396b568d31 - pristine_git_object: 6400b090e0a8e321f6348ef79d2b14fb83571f7b + last_write_checksum: sha1:c68c837c6af8f55eb8172dbc62ba472d5dde04a8 + pristine_git_object: a8a0a7558361f126dcbf7f995c52b33e660daa37 tests/mockserver/internal/handler/pathdeleterestapiindexcustommetadataschemagroupname.go: id: 979e4583765b last_write_checksum: sha1:b1d4edb259d907c7a88b634bf16f0cf152321693 @@ -5752,6 +5772,10 @@ trackedFiles: id: 3c3d5555c20b last_write_checksum: sha1:8ef1b12ee725ee32fb6a0a1e0e812594df97e06f pristine_git_object: 26fdfdd7e2d2fdffa6ecc736b7a70d6eb1aa5327 + tests/mockserver/internal/handler/pathpostrestapiv1agents.go: + id: b5d188f39094 + last_write_checksum: sha1:b625a3bbaf0748388febcf87d2b92782167c2c63 + pristine_git_object: 6c1367d61758e68e6cb415247e7473355d17c03a tests/mockserver/internal/handler/pathpostrestapiv1autocomplete.go: id: 9830ef01b25b last_write_checksum: sha1:094d64ddc73a91d38e64e3be18690ebb9d4ef3d3 @@ -5850,8 +5874,8 @@ trackedFiles: pristine_git_object: abb763ddc8504b28c0cb6fdf8d25237d46e21bab tests/mockserver/internal/handler/pathpostrestapiv1getchat.go: id: a0ec7bafa599 - last_write_checksum: sha1:2267292ba8173cf8df70ddbc6ac02ff3439cb879 - pristine_git_object: 8740195860b6c08e036caae19aab8e7374350960 + last_write_checksum: sha1:b48e2313407814ee4f8ed181b8e5299a84960c44 + pristine_git_object: 96d4127e0455272a9842e2d1954e5fcefa3278cc tests/mockserver/internal/handler/pathpostrestapiv1getchatapplication.go: id: 7d101c69d4bc last_write_checksum: sha1:7b81898137fdb3a89b4dcfa318b9b5b92e8860c0 @@ -6102,8 +6126,8 @@ trackedFiles: pristine_git_object: edfaaac094589522ad1ad4094131887b43780c92 tests/mockserver/internal/sdk/models/components/allowlistoptions.go: id: 5dd666458357 - last_write_checksum: sha1:db278a11846646ca8794392f2846087d1fba114f - pristine_git_object: cf238c9e67d94abd0f7de713e0922be55618dc75 + last_write_checksum: sha1:dfd379408d88c7eb8de7c86d2c58e084faaa45bc + pristine_git_object: 05ea9fc7fd13d94c67f49984a1a73648a807689b tests/mockserver/internal/sdk/models/components/announcement.go: id: 657490dccd71 last_write_checksum: sha1:038cda5de3f5d66db97e95c8a838f3c1a14bf265 @@ -6428,6 +6452,10 @@ trackedFiles: id: c5f526844132 last_write_checksum: sha1:aa8fbfc7682edb55f79cd9e241d9795d4c8579ea pristine_git_object: df363e8a9dfca1f872da7b286ab2cf7505b2c127 + tests/mockserver/internal/sdk/models/components/createworkflowrequest.go: + id: 92b0c1ccd3f0 + last_write_checksum: sha1:8febb494a066873172f0229af2880901e5f44ef5 + pristine_git_object: 277dd8b7d18f4aa926904cdf892e3475e6e998a6 tests/mockserver/internal/sdk/models/components/currentactiveusers.go: id: 220e7dbe04c9 last_write_checksum: sha1:4c876d24b835be3c5975308c132a4599bc11a71a @@ -6666,8 +6694,8 @@ trackedFiles: pristine_git_object: a0e605281d1c6bfa56c6ee88f2dfceff7b144e93 tests/mockserver/internal/sdk/models/components/dlpconfig.go: id: dd310c689385 - last_write_checksum: sha1:d7f7202ea98f70853dbe57afbbf046a63a59f8d0 - pristine_git_object: 04c23aebfc11d653007748a5653bfe742e2fe962 + last_write_checksum: sha1:62e4f2e5e4a611f7b3eae8479f5bb3d97831b9cc + pristine_git_object: 23a965fc8709811e91e4f40756137761239f6af7 tests/mockserver/internal/sdk/models/components/dlpexportfindingsrequest.go: id: 5edd4787e726 last_write_checksum: sha1:a6fa9927945d74ba513e8299c8102f5f4545c2ab @@ -6890,12 +6918,12 @@ trackedFiles: pristine_git_object: 04cc3a93272ac70933b0485bee31b335e05ab623 tests/mockserver/internal/sdk/models/components/feedentry.go: id: d25fd66fcf7a - last_write_checksum: sha1:802c3c827ceab5ea012ccb4cfdfb41c059a57533 - pristine_git_object: 1274083a6813ebf47b3f6bf587e397bf12b904ff + last_write_checksum: sha1:9100c7409b5249d0e85ae2cedab9800b0da020d0 + pristine_git_object: 36234aa7db5e3c4da48d59cf7bfbb9e4639afda9 tests/mockserver/internal/sdk/models/components/feedrequest.go: id: b06bc4cef0cf - last_write_checksum: sha1:e3e5205728c55eb2beef947db9c45670f2ef73af - pristine_git_object: 7c94e4641e1f167be444e87014e6f9de15b649f2 + last_write_checksum: sha1:2994c91d016176d20fdb2d47d073cb98d66ac056 + pristine_git_object: 28d6dbf022acdb0c38e137948212965d528bbfd3 tests/mockserver/internal/sdk/models/components/feedrequestoptions.go: id: fd9245fe1bf2 last_write_checksum: sha1:fa30b7fd6ee3e45896d7bbe36e33e7c0cb9000ba @@ -6906,8 +6934,8 @@ trackedFiles: pristine_git_object: 54f9d1a8997983156c84e69f888c59a80d06c2b1 tests/mockserver/internal/sdk/models/components/feedresult.go: id: 47411573e67a - last_write_checksum: sha1:dec3c7bf47204e5399fe5b1863ac96134a1a43ec - pristine_git_object: ddd4f095be90f403aac41127aa170c46c75cebd3 + last_write_checksum: sha1:adf5068767d5a4cbc8f3d4daeff4903bc556405b + pristine_git_object: ec49941ce4c605b8de48dda8e303a3ab067a393b tests/mockserver/internal/sdk/models/components/followupaction.go: id: 38179fec19b1 last_write_checksum: sha1:32a31f7af77a58ce6f3284e8550d01fcf0d3bddd @@ -7066,8 +7094,8 @@ trackedFiles: pristine_git_object: ecd7ddb6777546fb2061ed8d7fe99372430d28e3 tests/mockserver/internal/sdk/models/components/grouptype.go: id: 5537ed02d061 - last_write_checksum: sha1:0346c3bd888fdcfa6bdf470f76f7778f32b240dd - pristine_git_object: 3f25f70bef8fa2da5226a5ab4ab60295240ab984 + last_write_checksum: sha1:ac5c2401137f44b275f47896925b258c730d5a6c + pristine_git_object: be69cc6acc4dd739fa09cc6a3117fcd8ab91b269 tests/mockserver/internal/sdk/models/components/hotword.go: id: 541b48d27f83 last_write_checksum: sha1:7aaa2279ba4032458f14d65c2dbd3def0078920d @@ -7892,6 +7920,10 @@ trackedFiles: id: 89e5236173f5 last_write_checksum: sha1:4ea8a844fedb81791dbff6fd5b45031943c118ed pristine_git_object: 55046755b604159689bf327aa7174a0e080a970e + tests/mockserver/internal/sdk/models/operations/createagent.go: + id: 4338e91202b4 + last_write_checksum: sha1:80daff65223d9d23afb599cb4af805f35c29919b + pristine_git_object: 255e835e82fba8bf4023a2f99c5c2d1af40dd2cf tests/mockserver/internal/sdk/models/operations/createandstreamrun.go: id: e9a974b86a39 last_write_checksum: sha1:ff0bc51a66cdb65f5d36415c82e92377fd0d2cff @@ -8478,8 +8510,8 @@ trackedFiles: pristine_git_object: db4221c9f5953adc8f8219979060f1248ae5c342 tests/test_agents.py: id: 2eb70a860f3a - last_write_checksum: sha1:0c2472116b756d6985f893ff62edb5505e2a260d - pristine_git_object: 1d18b7662e493260672cbaabfcbc8461355ffeba + last_write_checksum: sha1:18a474b39a964820ec42a6d5552ab7961871d286 + pristine_git_object: 46852ff43f1fdbc1c65619cccb7a22f51509104b tests/test_announcements.py: id: 720cc07fca06 last_write_checksum: sha1:1d0dcab6446633bc6809bc67e14b6cc1755aa319 @@ -8598,8 +8630,8 @@ trackedFiles: pristine_git_object: df2944ebda36db652b2770dd1c23be83df90fc99 tests/test_summarize.py: id: a255d8a6f627 - last_write_checksum: sha1:884caf9e9ba6ac6d6577682c45419d3fd6312dd9 - pristine_git_object: df71d57de672c7e6967ba36b3671d957ef075d55 + last_write_checksum: sha1:8f1ca2be59f1c913c8b60bc931be12743f5456dc + pristine_git_object: 5401883ff0180af3a47608b1d8984f520e6d240d tests/test_tools.py: id: 70889bdf7321 last_write_checksum: sha1:293cea8c046c30086e5d57cb48aa59ab8da308f1 @@ -9520,6 +9552,13 @@ examples: application/json: {"status": "MISSING"} "400": application/json: {} + createAgent: + speakeasy-default-create-agent: + requestBody: + application/json: {} + responses: + "200": + application/json: {"workflow": {"author": {"name": "George Clooney", "obfuscatedId": "abc123"}, "lastDraftSavedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "lastUpdatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}}} examplesVersion: 1.0.2 generatedTests: activity: "2025-04-28T22:05:12+01:00" @@ -9681,7 +9720,8 @@ generatedTests: delete_/rest/api/index/custom-metadata/schema/{groupName}: "2026-06-05T03:54:47Z" getDatasourceCredentialStatus: "2026-06-05T03:54:47Z" rotateDatasourceCredentials: "2026-06-05T03:54:47Z" -releaseNotes: "## Python SDK Changes:\n* `glean.client.collections.add_items()`: `response` **Changed** (Breaking ⚠️)\n* `glean.chat.get_chat_file()`: **Added**\n* `glean.agents.edit_agent()`: **Added**\n* `glean.entities.get_person_photo()`: **Added**\n* `glean.tools.get_action_pack_auth_status()`: **Added**\n* `glean.tools.authorize_action_pack()`: **Added**\n* `glean.indexing.custom_metadata.upsert()`: **Added**\n* `glean.indexing.custom_metadata.delete()`: **Added**\n* `glean.indexing.custom_metadata.get_schema()`: **Added**\n* `glean.indexing.custom_metadata.upsert_schema()`: **Added**\n* `glean.indexing.custom_metadata.delete_schema()`: **Added**\n* `glean.troubleshooting.post_/api/index/v1/debug/{datasource}/document/events()`: **Added**\n* `glean.datasources.get_datasource_credential_status()`: **Added**\n* `glean.datasources.rotate_datasource_credentials()`: **Added**\n* `glean.client.activity.feedback()`: \n * `request.feedback1.category` **Changed**\n* `glean.client.announcements.create()`: \n * `request.body.structured_list[].document.metadata.author.related_documents[].results[].structured_results[].answer` **Changed**\n * `response` **Changed**\n* `glean.client.announcements.update()`: \n * `request.body.structured_list[].document.metadata.author.related_documents[].results[].structured_results[].answer` **Changed**\n * `response` **Changed**\n* `glean.client.answers.create()`: \n * `request.data.added_roles[].person.related_documents[]` **Changed**\n * `response` **Changed**\n* `glean.client.answers.update()`: \n * `request.added_roles[].person.related_documents[]` **Changed**\n * `response` **Changed**\n* `glean.client.answers.retrieve()`: `response.answer_result.answer` **Changed**\n* `glean.client.answers.list()`: `response.answer_results[].answer` **Changed**\n* `glean.client.chat.create()`: \n * `request.messages[].citations[].source_document.metadata.author.related_documents[].results[].structured_results[].answer` **Changed**\n * `response.messages[].citations[].source_document.metadata.author.related_documents[].results[].structured_results[].answer` **Changed**\n* `glean.client.chat.retrieve()`: `response.chat_result.chat.created_by.related_documents[]` **Changed**\n* `glean.client.chat.list()`: `response.chat_results[].chat.created_by.related_documents[]` **Changed**\n* `glean.client.chat.create_stream()`: \n * `request.messages[].citations[].source_document.metadata.author.related_documents[].results[].structured_results[].answer` **Changed**\n* `glean.client.collections.create()`: \n * `request.added_roles[].person.related_documents[]` **Changed**\n * `response.union(class (0))` **Changed**\n * `error_code.enum(corrupt_item)` **Added**\n* `glean.client.collections.delete()`: `error_code.enum(corrupt_item)` **Added**\n* `glean.client.collections.delete_item()`: `response.collection` **Changed**\n* `glean.client.collections.update()`: \n * `request.added_roles[].person.related_documents[]` **Changed**\n * `response` **Changed**\n * `error_code.enum(corrupt_item)` **Added**\n* `glean.client.collections.update_item()`: `response.collection` **Changed**\n* `glean.client.collections.retrieve()`: `response` **Changed**\n* `glean.client.collections.list()`: `response.collections[]` **Changed**\n* `glean.client.documents.retrieve()`: `response.documents.Map.union(Document).metadata.author.related_documents[].results[].structured_results[].answer` **Changed**\n* `glean.client.documents.retrieve_by_facets()`: `response.documents[].metadata.author.related_documents[].results[].structured_results[].answer` **Changed**\n* `glean.client.insights.retrieve()`: \n * `request` **Changed**\n * `response` **Changed**\n* `glean.client.messages.retrieve()`: `response.search_response.results[].structured_results[]` **Changed**\n* `glean.client.pins.update()`: `response.attribution.related_documents[]` **Changed**\n* `glean.client.pins.retrieve()`: `response.pin.attribution.related_documents[]` **Changed**\n* `glean.client.pins.list()`: `response.pins[].attribution.related_documents[]` **Changed**\n* `glean.client.pins.create()`: `response.attribution.related_documents[]` **Changed**\n* `glean.client.search.query_as_admin()`: \n * `request.source_document.metadata.author.related_documents[].results[].structured_results[].answer` **Changed**\n * `response.results[].structured_results[]` **Changed**\n* `glean.client.search.autocomplete()`: `response.results[].document.metadata.author.related_documents[].results[].structured_results[].answer` **Changed**\n* `glean.client.search.retrieve_feed()`: \n * `request.categories[]` **Changed**\n * `response.results[]` **Changed**\n* `glean.client.search.recommendations()`: \n * `request.source_document.metadata.author.related_documents[].results[].structured_results[].answer` **Changed**\n * `response.results[].structured_results[]` **Changed**\n* `glean.client.search.query()`: \n * `request.source_document.metadata.author.related_documents[].results[].structured_results[].answer` **Changed**\n * `response.results[].structured_results[]` **Changed**\n* `glean.client.entities.list()`: `response.results[].related_documents[]` **Changed**\n* `glean.client.entities.read_people()`: `response.results[].related_documents[]` **Changed**\n* `glean.client.shortcuts.create()`: \n * `request.data.added_roles[].person.related_documents[]` **Changed**\n * `response.shortcut.added_roles[].person.related_documents[]` **Changed**\n* `glean.client.shortcuts.retrieve()`: `response.shortcut.added_roles[].person.related_documents[]` **Changed**\n* `glean.client.shortcuts.list()`: `response.shortcuts[].added_roles[].person.related_documents[]` **Changed**\n* `glean.client.shortcuts.update()`: \n * `request.added_roles[].person.related_documents[]` **Changed**\n * `response.shortcut.added_roles[].person.related_documents[]` **Changed**\n* `glean.client.verification.add_reminder()`: `response.metadata.last_verifier.related_documents[]` **Changed**\n* `glean.client.verification.list()`: `response.documents[].metadata.last_verifier.related_documents[]` **Changed**\n* `glean.client.verification.verify()`: `response.metadata.last_verifier.related_documents[]` **Changed**\n" + createAgent: "2026-06-28T03:56:59Z" +releaseNotes: "## Python SDK Changes:\n* `glean.client.chat.create()`: \n * `request.messages[].citations[].source_document.metadata.author.related_documents[].results[].structured_results[].custom_entity.roles[].group.type.enum(collection_audience)` **Added**\n * `response` **Changed** (Breaking ⚠️)\n* `glean.client.pins.update()`: `response.attribution.related_documents[].query_suggestion.ranges[].document.metadata.collections[].added_roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.announcements.update()`: \n * `request.body.structured_list[].document.metadata.author.related_documents[].results[].structured_results[].custom_entity.roles[].group.type.enum(collection_audience)` **Added**\n * `response.body.structured_list[].document.metadata.author.related_documents[].results[].structured_results[].custom_entity.roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.answers.create()`: \n * `request.data.added_roles[].group.type.enum(collection_audience)` **Added**\n * `response.added_roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.answers.update()`: \n * `request.added_roles[].group.type.enum(collection_audience)` **Added**\n * `response.added_roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.answers.retrieve()`: `response.answer_result.answer.added_roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.answers.list()`: `response.answer_results[].answer.added_roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.announcements.create()`: \n * `request.body.structured_list[].document.metadata.author.related_documents[].results[].structured_results[].custom_entity.roles[].group.type.enum(collection_audience)` **Added**\n * `response.body.structured_list[].document.metadata.author.related_documents[].results[].structured_results[].custom_entity.roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.chat.retrieve()`: `response.chat_result.chat.created_by.related_documents[].query_suggestion.ranges[].document.metadata.collections[].added_roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.chat.list()`: `response.chat_results[].chat.created_by.related_documents[].query_suggestion.ranges[].document.metadata.collections[].added_roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.chat.create_stream()`: \n * `request.messages[].citations[].source_document.metadata.author.related_documents[].results[].structured_results[].custom_entity.roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.collections.add_items()`: `response.collection.added_roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.collections.create()`: \n * `request.added_roles[].group.type.enum(collection_audience)` **Added**\n * `response.union(class (0)).collection.added_roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.collections.delete_item()`: `response.collection.added_roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.collections.update()`: \n * `request.added_roles[].group.type.enum(collection_audience)` **Added**\n * `response.added_roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.collections.update_item()`: `response.collection.added_roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.collections.retrieve()`: `response.collection.added_roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.collections.list()`: `response.collections[].added_roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.documents.retrieve()`: `response.documents.Map.union(Document).metadata.author.related_documents[].results[].structured_results[].custom_entity.roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.documents.retrieve_by_facets()`: `response.documents[].metadata.author.related_documents[].results[].structured_results[].custom_entity.roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.insights.retrieve()`: `response.glean_assist.activity_insights[].user.related_documents[].query_suggestion.ranges[].document.metadata.collections[].added_roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.pins.retrieve()`: `response.pin.attribution.related_documents[].query_suggestion.ranges[].document.metadata.collections[].added_roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.messages.retrieve()`: `response.search_response.results[].structured_results[].document.metadata.collections[].added_roles[].group.type.enum(collection_audience)` **Added**\n* `glean.agents.create_agent()`: **Added**\n* `glean.client.pins.list()`: `response.pins[].attribution.related_documents[].query_suggestion.ranges[].document.metadata.collections[].added_roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.pins.create()`: `response.attribution.related_documents[].query_suggestion.ranges[].document.metadata.collections[].added_roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.search.query_as_admin()`: \n * `request.source_document.metadata.author.related_documents[].results[].structured_results[].custom_entity.roles[].group.type.enum(collection_audience)` **Added**\n * `response.results[].structured_results[].document.metadata.collections[].added_roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.search.autocomplete()`: `response.results[].document.metadata.author.related_documents[].results[].structured_results[].custom_entity.roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.search.retrieve_feed()`: \n * `request.categories[].enum(card_stack_promo)` **Added**\n * `response.results[]` **Changed**\n* `glean.client.search.recommendations()`: \n * `request.source_document.metadata.author.related_documents[].results[].structured_results[].custom_entity.roles[].group.type.enum(collection_audience)` **Added**\n * `response.results[].structured_results[].document.metadata.collections[].added_roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.search.query()`: \n * `request.source_document.metadata.author.related_documents[].results[].structured_results[].custom_entity.roles[].group.type.enum(collection_audience)` **Added**\n * `response.results[].structured_results[].document.metadata.collections[].added_roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.entities.list()`: `response.results[].related_documents[].query_suggestion.ranges[].document.metadata.collections[].added_roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.entities.read_people()`: `response.results[].related_documents[].query_suggestion.ranges[].document.metadata.collections[].added_roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.shortcuts.create()`: \n * `request.data.added_roles[].group.type.enum(collection_audience)` **Added**\n * `response.shortcut.added_roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.shortcuts.retrieve()`: `response.shortcut.added_roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.shortcuts.list()`: `response.shortcuts[].added_roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.shortcuts.update()`: \n * `request.added_roles[].group.type.enum(collection_audience)` **Added**\n * `response.shortcut.added_roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.verification.add_reminder()`: `response.metadata.last_verifier.related_documents[].query_suggestion.ranges[].document.metadata.collections[].added_roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.verification.list()`: `response.documents[].metadata.last_verifier.related_documents[].query_suggestion.ranges[].document.metadata.collections[].added_roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.verification.verify()`: `response.metadata.last_verifier.related_documents[].query_suggestion.ranges[].document.metadata.collections[].added_roles[].group.type.enum(collection_audience)` **Added**\n* `glean.client.governance.data.policies.retrieve()`: `response.report.config.allowlist_options.regexes` **Added**\n* `glean.client.governance.data.policies.update()`: \n * `request.config.allowlist_options.regexes` **Added**\n* `glean.client.governance.data.policies.list()`: `response.reports[].config.allowlist_options.regexes` **Added**\n* `glean.client.governance.data.policies.create()`: \n * `request.config.allowlist_options.regexes` **Added**\n * `response.report.config.allowlist_options.regexes` **Added**\n* `glean.client.governance.data.reports.create()`: \n * `request.config.allowlist_options.regexes` **Added**\n" generatedFiles: - .devcontainer/README.md - .devcontainer/devcontainer.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 8423ecdd..29861fe3 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -34,7 +34,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: true python: - version: 0.13.0 + version: 0.14.0 additionalDependencies: dev: {} main: {} @@ -54,6 +54,10 @@ python: enableCustomCodeRegions: false enumFormat: enum envVarPrefix: GLEAN + errorSchemaValidation: true + eventStreamClassNames: + async: EventStreamAsync + sync: EventStream fixFlags: asyncPaginationSep2025: false conflictResistantModelImportsFeb2026: false @@ -73,6 +77,7 @@ python: webhooks: "" inferUnionDiscriminators: true inputModelSuffix: input + inputTypedDictSuffix: TypedDict legacyPyright: true license: "" maxMethodParams: 999 @@ -90,6 +95,7 @@ python: pytestTimeout: 0 rawResponseHelpers: false responseFormat: flat + responseSchemaValidation: true sseFlatResponse: false templateVersion: v2 useAsyncHooks: false diff --git a/.speakeasy/glean-merged-spec.yaml b/.speakeasy/glean-merged-spec.yaml index bd780d7e..feaa39be 100644 --- a/.speakeasy/glean-merged-spec.yaml +++ b/.speakeasy/glean-merged-spec.yaml @@ -2,7 +2,7 @@ openapi: 3.0.0 info: version: 0.9.0 title: Glean API - x-source-commit-sha: deacbe1e0fd0b5074c1b1445f05b4a5df529f487 + x-source-commit-sha: 52a3263df71e58b10c98865e6b4a6f9a29f293db description: | # Introduction In addition to the data sources that Glean has built-in support for, Glean also provides a REST API that enables customers to put arbitrary content in the search index. This is useful, for example, for doing permissions-aware search over content in internal tools that reside on-prem as well as for searching over applications that Glean does not currently support first class. In addition these APIs allow the customer to push organization data (people info, organization structure etc) into Glean. @@ -22,7 +22,7 @@ info: These API clients provide type-safe, idiomatic interfaces for working with Glean IndexingAPIs in your language of choice. x-logo: url: https://app.glean.com/images/glean-text2.svg - x-open-api-commit-sha: 7de1c5956c93a8bdd7b4a2c6a4c6fd98b0c4df70 + x-open-api-commit-sha: d3cdeccde1b5f13944a9e3958f651e8f61c667d6 x-speakeasy-name: 'Glean API' servers: - url: https://{instance}-be.glean.com @@ -569,6 +569,23 @@ paths: startIndex: 0 endIndex: 12 type: CITATION + "202": + description: | + Request accepted but not yet processed. Returned when another + in-flight request is already running for the same chat session; + the body's `queuedRequestId` identifies the deferred run and + output will be persisted to the chat session referenced by + `chatId`. + content: + application/json: + schema: + $ref: "#/components/schemas/ChatResponse" + examples: + queuedExample: + value: + chatId: abc123 + queuedRequestId: qr-xyz + isSavedToChatHistory: true "400": description: Invalid request "401": @@ -893,6 +910,40 @@ paths: description: Internal server error. security: - APIToken: [] + /rest/api/v1/agents: + post: + tags: + - Agents + summary: Create an agent + description: Create an agent. + operationId: createAgent + x-visibility: Preview + parameters: + - $ref: "#/components/parameters/locale" + - $ref: "#/components/parameters/timezoneOffset" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/CreateWorkflowRequest" + responses: + "200": + description: Success + content: + application/json: + schema: + $ref: "#/components/schemas/CreateWorkflowResponse" + "400": + description: Bad request + "401": + description: Not Authorized + "403": + description: Forbidden + "500": + description: Internal server error + security: + - APIToken: [] /rest/api/v1/agents/{agent_id}: get: tags: @@ -1090,7 +1141,7 @@ paths: text/event-stream: schema: type: string - description: The server will send a stream of events in server-sent events (SSE) format. + description: The server will send a stream of events in server-sent events (SSE) format. If execution fails after the stream has started, the stream may terminate with an error message in a normal `message` event. example: | id: 1 event: message @@ -4658,6 +4709,8 @@ components: APIToken: scheme: bearer type: http + 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: ActivityEventParams: properties: @@ -6002,6 +6055,8 @@ components: GroupType: type: string description: The type of user group + x-enumDescriptions: + COLLECTION_AUDIENCE: Refers to any viewers of the Collection. enum: - DEPARTMENT - ALL @@ -6011,6 +6066,9 @@ components: - LOCATION - REGION - EXTERNAL_GROUP + - COLLECTION_AUDIENCE + x-speakeasy-enum-descriptions: + COLLECTION_AUDIENCE: Refers to any viewers of the Collection. Group: required: - type @@ -8973,6 +9031,80 @@ components: items: type: string description: IDs of files to delete. + WorkflowDraftableProperties: + properties: + name: + type: string + description: The name of the workflow. + WorkflowMutableProperties: + type: object + allOf: + - $ref: "#/components/schemas/WorkflowDraftableProperties" + - type: object + CreateWorkflowRequest: + allOf: + - $ref: "#/components/schemas/WorkflowMutableProperties" + - type: object + properties: + transient: + type: boolean + description: Used to create a transient workflow. + parentWorkflowId: + type: string + description: id of the parent workflow for transient workflows + WorkflowMetadata: + allOf: + - type: object + properties: + author: + $ref: "#/components/schemas/Person" + createTimestamp: + type: integer + description: Server Unix timestamp of the creation time. + lastUpdateTimestamp: + type: integer + description: Server Unix timestamp of the last update time. + lastDraftSavedAt: + type: integer + description: Server Unix timestamp of the last time the draft was saved. + lastDraftSavedBy: + description: The person who last saved the draft. + $ref: "#/components/schemas/Person" + lastDraftGitAuthorId: + type: string + description: ID of the VCS user (e.g. GitHub username) who last saved the draft. Set only by the draft save path via the external Git integration API. + lastUpdatedBy: + $ref: "#/components/schemas/Person" + AttributionProperties: {} + Workflow: + allOf: + - $ref: "#/components/schemas/PermissionedObject" + - $ref: "#/components/schemas/WorkflowMutableProperties" + - $ref: "#/components/schemas/WorkflowMetadata" + - $ref: "#/components/schemas/AttributionProperties" + - type: object + properties: + id: + type: string + description: The ID of the workflow. + verified: + type: boolean + readOnly: true + description: When present, indicates this workflow is admin-verified. Set via the dedicated admin settings endpoint, not by regular edits. + showOrganizationAsAuthor: + type: boolean + readOnly: true + description: When true, displays organization name instead of author name in agent card. Set via the dedicated admin settings endpoint, not by regular edits. + WorkflowResult: + type: object + required: + - workflow + properties: + workflow: + $ref: "#/components/schemas/Workflow" + CreateWorkflowResponse: + allOf: + - $ref: "#/components/schemas/WorkflowResult" Agent: title: Agent type: object @@ -9025,16 +9157,6 @@ components: message: type: string description: Client-facing error message describing what went wrong - WorkflowDraftableProperties: - properties: - name: - type: string - description: The name of the workflow. - WorkflowMutableProperties: - type: object - allOf: - - $ref: "#/components/schemas/WorkflowDraftableProperties" - - type: object EditWorkflowRequest: allOf: - $ref: "#/components/schemas/WorkflowMutableProperties" @@ -10985,6 +11107,7 @@ components: - MID_DAY_CATCH_UP - QUERY_SUGGESTION - COWORK_CUJ_PROMO + - CARD_STACK_PROMO - WEEKLY_MEETINGS - FOLLOW_UP - MILESTONE_TIMELINE_CHECK @@ -11293,7 +11416,6 @@ components: description: A list of removed user roles for the Workflow. items: $ref: "#/components/schemas/UserRoleSpecification" - AttributionProperties: {} PromptTemplate: allOf: - $ref: "#/components/schemas/PromptTemplateMutableProperties" @@ -11369,55 +11491,6 @@ components: runCount: $ref: "#/components/schemas/CountInfo" description: This tracks how many times this prompt template was run. If user runs a prompt template after modifying the original one, it still counts as a run for the original template. - WorkflowMetadata: - allOf: - - type: object - properties: - author: - $ref: "#/components/schemas/Person" - createTimestamp: - type: integer - description: Server Unix timestamp of the creation time. - lastUpdateTimestamp: - type: integer - description: Server Unix timestamp of the last update time. - lastDraftSavedAt: - type: integer - description: Server Unix timestamp of the last time the draft was saved. - lastDraftSavedBy: - description: The person who last saved the draft. - $ref: "#/components/schemas/Person" - lastDraftGitAuthorId: - type: string - description: ID of the VCS user (e.g. GitHub username) who last saved the draft. Set only by the draft save path via the external Git integration API. - lastUpdatedBy: - $ref: "#/components/schemas/Person" - Workflow: - allOf: - - $ref: "#/components/schemas/PermissionedObject" - - $ref: "#/components/schemas/WorkflowMutableProperties" - - $ref: "#/components/schemas/WorkflowMetadata" - - $ref: "#/components/schemas/AttributionProperties" - - type: object - properties: - id: - type: string - description: The ID of the workflow. - verified: - type: boolean - readOnly: true - description: When present, indicates this workflow is admin-verified. Set via the dedicated admin settings endpoint, not by regular edits. - showOrganizationAsAuthor: - type: boolean - readOnly: true - description: When true, displays organization name instead of author name in agent card. Set via the dedicated admin settings endpoint, not by regular edits. - WorkflowResult: - type: object - required: - - workflow - properties: - workflow: - $ref: "#/components/schemas/Workflow" UserActivity: properties: actor: @@ -11514,6 +11587,7 @@ components: - MID_DAY_CATCH_UP - QUERY_SUGGESTION - COWORK_CUJ_PROMO + - CARD_STACK_PROMO - WEEKLY_MEETINGS - FOLLOW_UP - MILESTONE_TIMELINE_CHECK @@ -11602,6 +11676,7 @@ components: - MID_DAY_CATCH_UP - QUERY_SUGGESTION - COWORK_CUJ_PROMO + - CARD_STACK_PROMO - WEEKLY_MEETINGS - FOLLOW_UP - MILESTONE_TIMELINE_CHECK @@ -11622,6 +11697,12 @@ components: rank: type: integer description: Rank of the result. Rank is suggested by server. Client side rank may differ. + placementReason: + type: string + enum: + - ORGANIC + - PROMO + description: Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. FeedResponse: required: - serverTimestamp @@ -14272,7 +14353,12 @@ components: items: type: string description: list of words and phrases to consider as whitelisted content - description: Terms that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term in the allow-list, it will not be counted as a violation. + regexes: + type: array + items: + type: string + description: list of regular expressions whose matches are considered whitelisted content + description: Terms and regexes that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term, or matches a regex, in the allow-list, it will not be counted as a violation. DlpConfig: properties: version: diff --git a/.speakeasy/tests.arazzo.yaml b/.speakeasy/tests.arazzo.yaml index 48029e67..4f92272d 100644 --- a/.speakeasy/tests.arazzo.yaml +++ b/.speakeasy/tests.arazzo.yaml @@ -158705,3 +158705,19 @@ workflows: type: simple x-speakeasy-test-group: Datasources x-speakeasy-test-rebuild: true + - workflowId: createAgent + steps: + - stepId: test + operationId: createAgent + requestBody: + contentType: application/json + payload: {} + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"workflow":{"author":{"name":"George Clooney","obfuscatedId":"abc123"},"lastDraftSavedBy":{"name":"George Clooney","obfuscatedId":"abc123"},"lastUpdatedBy":{"name":"George Clooney","obfuscatedId":"abc123"}}} + type: simple + x-speakeasy-test-group: Agents + x-speakeasy-test-rebuild: true diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 92827bbf..05dc9671 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.770.0 +speakeasyVersion: 1.786.1 sources: Glean API: sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:500649ecd919cc2dcfeb6c54fe552ddcf8628a42b2f67a2ef0f206ad8561a56c - sourceBlobDigest: sha256:cb8902f4548ad637f07f6be9b7ef3f0d5fda8fe6f6540c7eea338bf4dde98413 + sourceRevisionDigest: sha256:979b3f1b9f64bbb58a59297a1984e17b9a8e6c7eed1d56fc712f5ffc3376c23d + sourceBlobDigest: sha256:d0cf8a3fb62165cb2a1797291d7213dbfab4e80a9d8435d2ac732046c9effb28 tags: - latest Glean Client API: @@ -16,10 +16,10 @@ targets: glean: source: Glean API sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:500649ecd919cc2dcfeb6c54fe552ddcf8628a42b2f67a2ef0f206ad8561a56c - sourceBlobDigest: sha256:cb8902f4548ad637f07f6be9b7ef3f0d5fda8fe6f6540c7eea338bf4dde98413 + sourceRevisionDigest: sha256:979b3f1b9f64bbb58a59297a1984e17b9a8e6c7eed1d56fc712f5ffc3376c23d + sourceBlobDigest: sha256:d0cf8a3fb62165cb2a1797291d7213dbfab4e80a9d8435d2ac732046c9effb28 codeSamplesNamespace: glean-api-specs-python-code-samples - codeSamplesRevisionDigest: sha256:cc23275cb351da5ef6256061aed3868dab2d09e7764658ea22e4958928b42d8c + codeSamplesRevisionDigest: sha256:60aa38a0f093349fa189ac4f535bcdf0b2bc99464ffb48ebf83b4318400ff5de workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 203405ee..f5a59cba 100644 --- a/README.md +++ b/README.md @@ -339,6 +339,7 @@ For more information on obtaining the appropriate token type, please contact you ### [Agents](docs/sdks/agents/README.md) +* [create_agent](docs/sdks/agents/README.md#create_agent) - Create an agent * [edit_agent](docs/sdks/agents/README.md#edit_agent) - Edit an agent ### [Authentication](docs/sdks/authentication/README.md) diff --git a/RELEASES.md b/RELEASES.md index 87ea457d..c22a474f 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -748,4 +748,14 @@ Based on: ### Generated - [python v0.13.0] . ### Releases -- [PyPI v0.13.0] https://pypi.org/project/glean-api-client/0.13.0 - . \ No newline at end of file +- [PyPI v0.13.0] https://pypi.org/project/glean-api-client/0.13.0 - . + +## 2026-06-28 03:56:07 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.786.1 (2.913.3) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.14.0] . +### Releases +- [PyPI v0.14.0] https://pypi.org/project/glean-api-client/0.14.0 - . \ No newline at end of file diff --git a/docs/models/allowlistoptions.md b/docs/models/allowlistoptions.md index e986d966..e1c6f387 100644 --- a/docs/models/allowlistoptions.md +++ b/docs/models/allowlistoptions.md @@ -1,10 +1,11 @@ # AllowlistOptions -Terms that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term in the allow-list, it will not be counted as a violation. +Terms and regexes that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term, or matches a regex, in the allow-list, it will not be counted as a violation. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `terms` | List[*str*] | :heavy_minus_sign: | list of words and phrases to consider as whitelisted content | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `terms` | List[*str*] | :heavy_minus_sign: | list of words and phrases to consider as whitelisted content | +| `regexes` | List[*str*] | :heavy_minus_sign: | list of regular expressions whose matches are considered whitelisted content | \ No newline at end of file diff --git a/docs/models/createagentrequest.md b/docs/models/createagentrequest.md new file mode 100644 index 00000000..6d556c53 --- /dev/null +++ b/docs/models/createagentrequest.md @@ -0,0 +1,10 @@ +# CreateAgentRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `locale` | *Optional[str]* | :heavy_minus_sign: | The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the `Accept-Language` will be used. If not present or not supported, defaults to the closest match or `en`. | +| `timezone_offset` | *Optional[int]* | :heavy_minus_sign: | The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. | +| `create_workflow_request` | [models.CreateWorkflowRequest](../models/createworkflowrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/createworkflowrequest.md b/docs/models/createworkflowrequest.md new file mode 100644 index 00000000..e955a419 --- /dev/null +++ b/docs/models/createworkflowrequest.md @@ -0,0 +1,10 @@ +# CreateWorkflowRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| `name` | *Optional[str]* | :heavy_minus_sign: | The name of the workflow. | +| `transient` | *Optional[bool]* | :heavy_minus_sign: | Used to create a transient workflow. | +| `parent_workflow_id` | *Optional[str]* | :heavy_minus_sign: | id of the parent workflow for transient workflows | \ No newline at end of file diff --git a/docs/models/dlpconfig.md b/docs/models/dlpconfig.md index eec4bb28..e99c7c03 100644 --- a/docs/models/dlpconfig.md +++ b/docs/models/dlpconfig.md @@ -5,18 +5,18 @@ Detailed configuration of what documents and sensitive content will be scanned. ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `version` | *Optional[int]* | :heavy_minus_sign: | Synonymous with report/policy id. | -| ~~`sensitive_info_types`~~ | List[[models.SensitiveInfoType](../models/sensitiveinfotype.md)] | :heavy_minus_sign: | : warning: ** DEPRECATED **: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use sensitiveContentOptions instead.

DEPRECATED - use `sensitiveContentOptions` instead. | -| `input_options` | [Optional[models.InputOptions]](../models/inputoptions.md) | :heavy_minus_sign: | Controls which data-sources and what time-range to include in scans. | -| ~~`external_sharing_options`~~ | [Optional[models.ExternalSharingOptions]](../models/externalsharingoptions.md) | :heavy_minus_sign: | : warning: ** DEPRECATED **: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use broadSharingOptions instead. | -| `broad_sharing_options` | [Optional[models.SharingOptions]](../models/sharingoptions.md) | :heavy_minus_sign: | Controls how "shared" a document must be to get picked for scans. | -| `sensitive_content_options` | [Optional[models.SensitiveContentOptions]](../models/sensitivecontentoptions.md) | :heavy_minus_sign: | Options for defining sensitive content within scanned documents. | -| `report_name` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `frequency` | *Optional[str]* | :heavy_minus_sign: | Interval between scans. | -| `created_by` | [Optional[models.DlpPerson]](../models/dlpperson.md) | :heavy_minus_sign: | Details about the person who created this report/policy. | -| `created_at` | *Optional[str]* | :heavy_minus_sign: | Timestamp at which this configuration was created. | -| `redact_quote` | *Optional[bool]* | :heavy_minus_sign: | redact quote in findings of the report | -| `auto_hide_docs` | *Optional[bool]* | :heavy_minus_sign: | auto hide documents with findings in the report | -| `allowlist_options` | [Optional[models.AllowlistOptions]](../models/allowlistoptions.md) | :heavy_minus_sign: | Terms that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term in the allow-list, it will not be counted as a violation. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `version` | *Optional[int]* | :heavy_minus_sign: | Synonymous with report/policy id. | +| ~~`sensitive_info_types`~~ | List[[models.SensitiveInfoType](../models/sensitiveinfotype.md)] | :heavy_minus_sign: | : warning: ** DEPRECATED **: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use sensitiveContentOptions instead.

DEPRECATED - use `sensitiveContentOptions` instead. | +| `input_options` | [Optional[models.InputOptions]](../models/inputoptions.md) | :heavy_minus_sign: | Controls which data-sources and what time-range to include in scans. | +| ~~`external_sharing_options`~~ | [Optional[models.ExternalSharingOptions]](../models/externalsharingoptions.md) | :heavy_minus_sign: | : warning: ** DEPRECATED **: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use broadSharingOptions instead. | +| `broad_sharing_options` | [Optional[models.SharingOptions]](../models/sharingoptions.md) | :heavy_minus_sign: | Controls how "shared" a document must be to get picked for scans. | +| `sensitive_content_options` | [Optional[models.SensitiveContentOptions]](../models/sensitivecontentoptions.md) | :heavy_minus_sign: | Options for defining sensitive content within scanned documents. | +| `report_name` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `frequency` | *Optional[str]* | :heavy_minus_sign: | Interval between scans. | +| `created_by` | [Optional[models.DlpPerson]](../models/dlpperson.md) | :heavy_minus_sign: | Details about the person who created this report/policy. | +| `created_at` | *Optional[str]* | :heavy_minus_sign: | Timestamp at which this configuration was created. | +| `redact_quote` | *Optional[bool]* | :heavy_minus_sign: | redact quote in findings of the report | +| `auto_hide_docs` | *Optional[bool]* | :heavy_minus_sign: | auto hide documents with findings in the report | +| `allowlist_options` | [Optional[models.AllowlistOptions]](../models/allowlistoptions.md) | :heavy_minus_sign: | Terms and regexes that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term, or matches a regex, in the allow-list, it will not be counted as a violation. | \ No newline at end of file diff --git a/docs/models/feedrequestcategory.md b/docs/models/feedrequestcategory.md index a4e28a08..07efe283 100644 --- a/docs/models/feedrequestcategory.md +++ b/docs/models/feedrequestcategory.md @@ -45,6 +45,7 @@ value = FeedRequestCategory.DOCUMENT_SUGGESTION | `MID_DAY_CATCH_UP` | MID_DAY_CATCH_UP | | `QUERY_SUGGESTION` | QUERY_SUGGESTION | | `COWORK_CUJ_PROMO` | COWORK_CUJ_PROMO | +| `CARD_STACK_PROMO` | CARD_STACK_PROMO | | `WEEKLY_MEETINGS` | WEEKLY_MEETINGS | | `FOLLOW_UP` | FOLLOW_UP | | `MILESTONE_TIMELINE_CHECK` | MILESTONE_TIMELINE_CHECK | diff --git a/docs/models/feedresult.md b/docs/models/feedresult.md index 6318b020..f14153ca 100644 --- a/docs/models/feedresult.md +++ b/docs/models/feedresult.md @@ -3,9 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `category` | [models.FeedResultCategory](../models/feedresultcategory.md) | :heavy_check_mark: | Category of the result, one of the requested categories in incoming request. | -| `primary_entry` | [models.FeedEntry](../models/feedentry.md) | :heavy_check_mark: | N/A | -| `secondary_entries` | List[[models.FeedEntry](../models/feedentry.md)] | :heavy_minus_sign: | Secondary entries for the result e.g. suggested docs for the calendar, carousel. | -| `rank` | *Optional[int]* | :heavy_minus_sign: | Rank of the result. Rank is suggested by server. Client side rank may differ. | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `category` | [models.FeedResultCategory](../models/feedresultcategory.md) | :heavy_check_mark: | Category of the result, one of the requested categories in incoming request. | +| `primary_entry` | [models.FeedEntry](../models/feedentry.md) | :heavy_check_mark: | N/A | +| `secondary_entries` | List[[models.FeedEntry](../models/feedentry.md)] | :heavy_minus_sign: | Secondary entries for the result e.g. suggested docs for the calendar, carousel. | +| `rank` | *Optional[int]* | :heavy_minus_sign: | Rank of the result. Rank is suggested by server. Client side rank may differ. | +| `placement_reason` | [Optional[models.PlacementReason]](../models/placementreason.md) | :heavy_minus_sign: | Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. | \ No newline at end of file diff --git a/docs/models/feedresultcategory.md b/docs/models/feedresultcategory.md index 5d0a0beb..37520b33 100644 --- a/docs/models/feedresultcategory.md +++ b/docs/models/feedresultcategory.md @@ -49,6 +49,7 @@ value = FeedResultCategory.DOCUMENT_SUGGESTION | `MID_DAY_CATCH_UP` | MID_DAY_CATCH_UP | | `QUERY_SUGGESTION` | QUERY_SUGGESTION | | `COWORK_CUJ_PROMO` | COWORK_CUJ_PROMO | +| `CARD_STACK_PROMO` | CARD_STACK_PROMO | | `WEEKLY_MEETINGS` | WEEKLY_MEETINGS | | `FOLLOW_UP` | FOLLOW_UP | | `MILESTONE_TIMELINE_CHECK` | MILESTONE_TIMELINE_CHECK | diff --git a/docs/models/file.md b/docs/models/file.md index 37cc418f..b8713ed6 100644 --- a/docs/models/file.md +++ b/docs/models/file.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| `file_name` | *str* | :heavy_check_mark: | N/A | -| `content` | *Union[bytes, IO[bytes], io.BufferedReader]* | :heavy_check_mark: | N/A | -| `content_type` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `file_name` | *str* | :heavy_check_mark: | N/A | +| `content` | *Union[bytes, IO[bytes], io.IOBase]* | :heavy_check_mark: | N/A | +| `content_type` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/grouptype.md b/docs/models/grouptype.md index 4e38962c..28950611 100644 --- a/docs/models/grouptype.md +++ b/docs/models/grouptype.md @@ -15,13 +15,14 @@ value = GroupType.DEPARTMENT ## Values -| Name | Value | -| ---------------- | ---------------- | -| `DEPARTMENT` | DEPARTMENT | -| `ALL` | ALL | -| `TEAM` | TEAM | -| `JOB_TITLE` | JOB_TITLE | -| `ROLE_TYPE` | ROLE_TYPE | -| `LOCATION` | LOCATION | -| `REGION` | REGION | -| `EXTERNAL_GROUP` | EXTERNAL_GROUP | \ No newline at end of file +| Name | Value | +| --------------------- | --------------------- | +| `DEPARTMENT` | DEPARTMENT | +| `ALL` | ALL | +| `TEAM` | TEAM | +| `JOB_TITLE` | JOB_TITLE | +| `ROLE_TYPE` | ROLE_TYPE | +| `LOCATION` | LOCATION | +| `REGION` | REGION | +| `EXTERNAL_GROUP` | EXTERNAL_GROUP | +| `COLLECTION_AUDIENCE` | COLLECTION_AUDIENCE | \ No newline at end of file diff --git a/docs/models/justificationtype.md b/docs/models/justificationtype.md index adf5b69b..442119bc 100644 --- a/docs/models/justificationtype.md +++ b/docs/models/justificationtype.md @@ -62,6 +62,7 @@ value = JustificationType.FREQUENTLY_ACCESSED | `MID_DAY_CATCH_UP` | MID_DAY_CATCH_UP | | `QUERY_SUGGESTION` | QUERY_SUGGESTION | | `COWORK_CUJ_PROMO` | COWORK_CUJ_PROMO | +| `CARD_STACK_PROMO` | CARD_STACK_PROMO | | `WEEKLY_MEETINGS` | WEEKLY_MEETINGS | | `FOLLOW_UP` | FOLLOW_UP | | `MILESTONE_TIMELINE_CHECK` | MILESTONE_TIMELINE_CHECK | diff --git a/docs/models/placementreason.md b/docs/models/placementreason.md new file mode 100644 index 00000000..515cd010 --- /dev/null +++ b/docs/models/placementreason.md @@ -0,0 +1,21 @@ +# PlacementReason + +Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. + +## Example Usage + +```python +from glean.api_client.models import PlacementReason + +value = PlacementReason.ORGANIC + +# Open enum: unrecognized values are captured as UnrecognizedStr +``` + + +## Values + +| Name | Value | +| --------- | --------- | +| `ORGANIC` | ORGANIC | +| `PROMO` | PROMO | \ No newline at end of file diff --git a/docs/sdks/agents/README.md b/docs/sdks/agents/README.md index b929a12d..00789fbf 100644 --- a/docs/sdks/agents/README.md +++ b/docs/sdks/agents/README.md @@ -4,8 +4,53 @@ ### Available Operations +* [create_agent](#create_agent) - Create an agent * [edit_agent](#edit_agent) - Edit an agent +## create_agent + +Create an agent. + +### Example Usage + + +```python +from glean.api_client import Glean +import os + + +with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), +) as glean: + + res = glean.agents.create_agent() + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `locale` | *Optional[str]* | :heavy_minus_sign: | The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the `Accept-Language` will be used. If not present or not supported, defaults to the closest match or `en`. | +| `timezone_offset` | *Optional[int]* | :heavy_minus_sign: | The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. | +| `name` | *Optional[str]* | :heavy_minus_sign: | The name of the workflow. | +| `transient` | *Optional[bool]* | :heavy_minus_sign: | Used to create a transient workflow. | +| `parent_workflow_id` | *Optional[str]* | :heavy_minus_sign: | id of the parent workflow for transient workflows | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.WorkflowResult](../../models/workflowresult.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------- | ----------------- | ----------------- | +| errors.GleanError | 4XX, 5XX | \*/\* | + ## edit_agent Creates a draft or publishes an [agent](https://developers.glean.com/agents/agents-api). Use `isDraft=true` to save a draft, or `isDraft=false` (or omit) to publish immediately. Only draft and publish modes are supported. diff --git a/poetry.lock b/poetry.lock index 4a68e0e6..3bc0aa0d 100644 --- a/poetry.lock +++ b/poetry.lock @@ -734,4 +734,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.1" python-versions = ">=3.10" -content-hash = "57ed5a9ea3e3be454cd27a35140011ae4c60c9c494f6d4f7f4fdfed5500b1352" +content-hash = "7957d409be705d06bf23e0bf7eec3bc69e2c6721fee7fd3e64286968df49a12a" diff --git a/pyproject.toml b/pyproject.toml index f34dd6a5..be2c723b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "glean-api-client" -version = "0.13.0" +version = "0.14.0" description = "Python Client SDK Generated by Speakeasy." authors = [{ name = "Glean Technologies, Inc." },] readme = "README-PYPI.md" @@ -9,7 +9,7 @@ requires-python = ">=3.10" dependencies = [ "httpcore >=1.0.9", "httpx >=0.28.1", - "pydantic >=2.11.2", + "pydantic >=2.11.2,<2.13", ] [tool.poetry] diff --git a/src/glean/api_client/_hooks/types.py b/src/glean/api_client/_hooks/types.py index 58c4d70a..55f23c1f 100644 --- a/src/glean/api_client/_hooks/types.py +++ b/src/glean/api_client/_hooks/types.py @@ -4,7 +4,7 @@ from glean.api_client.httpclient import HttpClient from glean.api_client.sdkconfiguration import SDKConfiguration import httpx -from typing import Any, Callable, List, Optional, Tuple, Union +from typing import Any, Callable, Dict, List, Optional, Tuple, Union class HookContext: @@ -13,6 +13,8 @@ class HookContext: operation_id: str oauth2_scopes: Optional[List[str]] = None security_source: Optional[Union[Any, Callable[[], Any]]] = None + tags: Optional[List[str]] = None + extensions: Optional[Dict[str, Any]] = None def __init__( self, @@ -21,12 +23,16 @@ def __init__( operation_id: str, oauth2_scopes: Optional[List[str]], security_source: Optional[Union[Any, Callable[[], Any]]], + tags: Optional[List[str]], + extensions: Optional[Dict[str, Any]], ): self.config = config self.base_url = base_url self.operation_id = operation_id self.oauth2_scopes = oauth2_scopes self.security_source = security_source + self.tags = tags + self.extensions = extensions class BeforeRequestContext(HookContext): @@ -37,6 +43,8 @@ def __init__(self, hook_ctx: HookContext): hook_ctx.operation_id, hook_ctx.oauth2_scopes, hook_ctx.security_source, + hook_ctx.tags, + hook_ctx.extensions, ) @@ -48,6 +56,8 @@ def __init__(self, hook_ctx: HookContext): hook_ctx.operation_id, hook_ctx.oauth2_scopes, hook_ctx.security_source, + hook_ctx.tags, + hook_ctx.extensions, ) @@ -59,6 +69,8 @@ def __init__(self, hook_ctx: HookContext): hook_ctx.operation_id, hook_ctx.oauth2_scopes, hook_ctx.security_source, + hook_ctx.tags, + hook_ctx.extensions, ) diff --git a/src/glean/api_client/_version.py b/src/glean/api_client/_version.py index 8d9da6a0..4ef4e9f5 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.13.0" +__version__: str = "0.14.0" __openapi_doc_version__: str = "0.9.0" -__gen_version__: str = "2.893.0" -__user_agent__: str = "speakeasy-sdk/python 0.13.0 2.893.0 0.9.0 glean-api-client" +__gen_version__: str = "2.913.3" +__user_agent__: str = "speakeasy-sdk/python 0.14.0 2.913.3 0.9.0 glean-api-client" try: if __package__ is not None: diff --git a/src/glean/api_client/agents.py b/src/glean/api_client/agents.py index 99f5f660..cfd615e4 100644 --- a/src/glean/api_client/agents.py +++ b/src/glean/api_client/agents.py @@ -10,6 +10,220 @@ class Agents(BaseSDK): + def create_agent( + self, + *, + locale: Optional[str] = None, + timezone_offset: Optional[int] = None, + name: Optional[str] = None, + transient: Optional[bool] = None, + parent_workflow_id: 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.WorkflowResult: + r"""Create an agent + + Create an agent. + + :param locale: The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the `Accept-Language` will be used. If not present or not supported, defaults to the closest match or `en`. + :param timezone_offset: The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. + :param name: The name of the workflow. + :param transient: Used to create a transient workflow. + :param parent_workflow_id: id of the parent workflow for transient workflows + :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.CreateAgentRequest( + locale=locale, + timezone_offset=timezone_offset, + create_workflow_request=models.CreateWorkflowRequest( + name=name, + transient=transient, + parent_workflow_id=parent_workflow_id, + ), + ) + + req = self._build_request( + method="POST", + path="/rest/api/v1/agents", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.create_workflow_request, + False, + False, + "json", + models.CreateWorkflowRequest, + ), + 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="createAgent", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Agents"], + extensions={"x-visibility": "Preview"}, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WorkflowResult, http_res) + if utils.match_response(http_res, ["400", "401", "403", "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, ["500", "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 create_agent_async( + self, + *, + locale: Optional[str] = None, + timezone_offset: Optional[int] = None, + name: Optional[str] = None, + transient: Optional[bool] = None, + parent_workflow_id: 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.WorkflowResult: + r"""Create an agent + + Create an agent. + + :param locale: The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the `Accept-Language` will be used. If not present or not supported, defaults to the closest match or `en`. + :param timezone_offset: The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. + :param name: The name of the workflow. + :param transient: Used to create a transient workflow. + :param parent_workflow_id: id of the parent workflow for transient workflows + :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.CreateAgentRequest( + locale=locale, + timezone_offset=timezone_offset, + create_workflow_request=models.CreateWorkflowRequest( + name=name, + transient=transient, + parent_workflow_id=parent_workflow_id, + ), + ) + + req = self._build_request_async( + method="POST", + path="/rest/api/v1/agents", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.create_workflow_request, + False, + False, + "json", + models.CreateWorkflowRequest, + ), + 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="createAgent", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Agents"], + extensions={"x-visibility": "Preview"}, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WorkflowResult, http_res) + if utils.match_response(http_res, ["400", "401", "403", "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, ["500", "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 edit_agent( self, *, @@ -98,6 +312,8 @@ def edit_agent( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Agents"], + extensions={"x-visibility": "Preview"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -207,6 +423,8 @@ async def edit_agent_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Agents"], + extensions={"x-visibility": "Preview"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/announcements.py b/src/glean/api_client/announcements.py index 33123a0a..a17983af 100644 --- a/src/glean/api_client/announcements.py +++ b/src/glean/api_client/announcements.py @@ -7,7 +7,7 @@ from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response -from typing import List, Mapping, Optional, Union +from typing import Iterable, List, Mapping, Optional, Union class Announcements(BaseSDK): @@ -25,7 +25,7 @@ def create( thumbnail: Optional[Union[models.Thumbnail, models.ThumbnailTypedDict]] = None, banner: Optional[Union[models.Thumbnail, models.ThumbnailTypedDict]] = None, audience_filters: Optional[ - Union[List[models.FacetFilter], List[models.FacetFilterTypedDict]] + Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] ] = None, source_document_id: Optional[str] = None, hide_attribution: Optional[bool] = None, @@ -137,6 +137,11 @@ def create( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Announcements"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -168,7 +173,7 @@ async def create_async( thumbnail: Optional[Union[models.Thumbnail, models.ThumbnailTypedDict]] = None, banner: Optional[Union[models.Thumbnail, models.ThumbnailTypedDict]] = None, audience_filters: Optional[ - Union[List[models.FacetFilter], List[models.FacetFilterTypedDict]] + Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] ] = None, source_document_id: Optional[str] = None, hide_attribution: Optional[bool] = None, @@ -280,6 +285,11 @@ async def create_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Announcements"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -376,6 +386,11 @@ def delete( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Announcements"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -472,6 +487,11 @@ async def delete_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Announcements"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -504,7 +524,7 @@ def update( thumbnail: Optional[Union[models.Thumbnail, models.ThumbnailTypedDict]] = None, banner: Optional[Union[models.Thumbnail, models.ThumbnailTypedDict]] = None, audience_filters: Optional[ - Union[List[models.FacetFilter], List[models.FacetFilterTypedDict]] + Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] ] = None, source_document_id: Optional[str] = None, hide_attribution: Optional[bool] = None, @@ -618,6 +638,11 @@ def update( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Announcements"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -650,7 +675,7 @@ async def update_async( thumbnail: Optional[Union[models.Thumbnail, models.ThumbnailTypedDict]] = None, banner: Optional[Union[models.Thumbnail, models.ThumbnailTypedDict]] = None, audience_filters: Optional[ - Union[List[models.FacetFilter], List[models.FacetFilterTypedDict]] + Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] ] = None, source_document_id: Optional[str] = None, hide_attribution: Optional[bool] = None, @@ -764,6 +789,11 @@ async def update_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Announcements"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/answers.py b/src/glean/api_client/answers.py index 0757b71f..5824d6a3 100644 --- a/src/glean/api_client/answers.py +++ b/src/glean/api_client/answers.py @@ -6,7 +6,7 @@ from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response -from typing import List, Mapping, Optional, Union +from typing import Iterable, List, Mapping, Optional, Union from typing_extensions import deprecated @@ -90,6 +90,11 @@ def create( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Answers"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -186,6 +191,11 @@ async def create_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Answers"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -285,6 +295,11 @@ def delete( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Answers"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -384,6 +399,11 @@ async def delete_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Answers"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -408,36 +428,36 @@ def update( locale: Optional[str] = None, doc_id: Optional[str] = None, question: Optional[str] = None, - question_variations: Optional[List[str]] = None, + question_variations: Optional[Iterable[str]] = None, body_text: Optional[str] = None, board_id: Optional[int] = None, audience_filters: Optional[ - Union[List[models.FacetFilter], List[models.FacetFilterTypedDict]] + Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] ] = None, added_roles: Optional[ Union[ - List[models.UserRoleSpecification], - List[models.UserRoleSpecificationTypedDict], + Iterable[models.UserRoleSpecification], + Iterable[models.UserRoleSpecificationTypedDict], ] ] = None, removed_roles: Optional[ Union[ - List[models.UserRoleSpecification], - List[models.UserRoleSpecificationTypedDict], + Iterable[models.UserRoleSpecification], + Iterable[models.UserRoleSpecificationTypedDict], ] ] = None, roles: Optional[ Union[ - List[models.UserRoleSpecification], - List[models.UserRoleSpecificationTypedDict], + Iterable[models.UserRoleSpecification], + Iterable[models.UserRoleSpecificationTypedDict], ] ] = None, source_document_spec: Optional[ Union[models.DocumentSpecUnion, models.DocumentSpecUnionTypedDict] ] = None, source_type: Optional[models.EditAnswerRequestSourceType] = None, - added_collections: Optional[List[int]] = None, - removed_collections: Optional[List[int]] = None, + added_collections: Optional[Iterable[int]] = None, + removed_collections: Optional[Iterable[int]] = None, combined_answer_text: Optional[ Union[ models.StructuredTextMutableProperties, @@ -490,7 +510,9 @@ def update( id=id, doc_id=doc_id, question=question, - question_variations=question_variations, + question_variations=utils.unmarshal( + question_variations, Optional[List[str]] + ), body_text=body_text, board_id=board_id, audience_filters=utils.get_pydantic_model( @@ -509,8 +531,12 @@ def update( source_document_spec, Optional[models.DocumentSpecUnion] ), source_type=source_type, - added_collections=added_collections, - removed_collections=removed_collections, + added_collections=utils.unmarshal( + added_collections, Optional[List[int]] + ), + removed_collections=utils.unmarshal( + removed_collections, Optional[List[int]] + ), combined_answer_text=utils.get_pydantic_model( combined_answer_text, Optional[models.StructuredTextMutableProperties], @@ -559,6 +585,11 @@ def update( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Answers"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -583,36 +614,36 @@ async def update_async( locale: Optional[str] = None, doc_id: Optional[str] = None, question: Optional[str] = None, - question_variations: Optional[List[str]] = None, + question_variations: Optional[Iterable[str]] = None, body_text: Optional[str] = None, board_id: Optional[int] = None, audience_filters: Optional[ - Union[List[models.FacetFilter], List[models.FacetFilterTypedDict]] + Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] ] = None, added_roles: Optional[ Union[ - List[models.UserRoleSpecification], - List[models.UserRoleSpecificationTypedDict], + Iterable[models.UserRoleSpecification], + Iterable[models.UserRoleSpecificationTypedDict], ] ] = None, removed_roles: Optional[ Union[ - List[models.UserRoleSpecification], - List[models.UserRoleSpecificationTypedDict], + Iterable[models.UserRoleSpecification], + Iterable[models.UserRoleSpecificationTypedDict], ] ] = None, roles: Optional[ Union[ - List[models.UserRoleSpecification], - List[models.UserRoleSpecificationTypedDict], + Iterable[models.UserRoleSpecification], + Iterable[models.UserRoleSpecificationTypedDict], ] ] = None, source_document_spec: Optional[ Union[models.DocumentSpecUnion, models.DocumentSpecUnionTypedDict] ] = None, source_type: Optional[models.EditAnswerRequestSourceType] = None, - added_collections: Optional[List[int]] = None, - removed_collections: Optional[List[int]] = None, + added_collections: Optional[Iterable[int]] = None, + removed_collections: Optional[Iterable[int]] = None, combined_answer_text: Optional[ Union[ models.StructuredTextMutableProperties, @@ -665,7 +696,9 @@ async def update_async( id=id, doc_id=doc_id, question=question, - question_variations=question_variations, + question_variations=utils.unmarshal( + question_variations, Optional[List[str]] + ), body_text=body_text, board_id=board_id, audience_filters=utils.get_pydantic_model( @@ -684,8 +717,12 @@ async def update_async( source_document_spec, Optional[models.DocumentSpecUnion] ), source_type=source_type, - added_collections=added_collections, - removed_collections=removed_collections, + added_collections=utils.unmarshal( + added_collections, Optional[List[int]] + ), + removed_collections=utils.unmarshal( + removed_collections, Optional[List[int]] + ), combined_answer_text=utils.get_pydantic_model( combined_answer_text, Optional[models.StructuredTextMutableProperties], @@ -734,6 +771,11 @@ async def update_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Answers"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -833,6 +875,11 @@ def retrieve( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Answers"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -932,6 +979,11 @@ async def retrieve_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Answers"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1031,6 +1083,17 @@ def list( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Answers"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-glean-deprecated": { + "id": "4c0923bd-64c7-45b9-99a5-b36f2705e618", + "introduced": "2026-01-21", + "message": "Answer boards have been removed and this endpoint no longer serves a purpose", + "removal": "2026-10-15", + }, + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1130,6 +1193,17 @@ async def list_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Answers"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-glean-deprecated": { + "id": "4c0923bd-64c7-45b9-99a5-b36f2705e618", + "introduced": "2026-01-21", + "message": "Answer boards have been removed and this endpoint no longer serves a purpose", + "removal": "2026-10-15", + }, + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/authentication.py b/src/glean/api_client/authentication.py index 092f1fb0..66854e5c 100644 --- a/src/glean/api_client/authentication.py +++ b/src/glean/api_client/authentication.py @@ -79,6 +79,8 @@ def checkdatasourceauth( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Authentication"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -163,6 +165,8 @@ async def checkdatasourceauth_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Authentication"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/chat_sdk.py b/src/glean/api_client/chat_sdk.py index 11e082d6..b40d3a25 100644 --- a/src/glean/api_client/chat_sdk.py +++ b/src/glean/api_client/chat_sdk.py @@ -82,6 +82,8 @@ def get_chat_file( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Chat"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -173,6 +175,8 @@ async def get_chat_file_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Chat"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/client_activity.py b/src/glean/api_client/client_activity.py index 0fc1ce18..42aa2ffc 100644 --- a/src/glean/api_client/client_activity.py +++ b/src/glean/api_client/client_activity.py @@ -5,14 +5,16 @@ from glean.api_client._hooks import HookContext from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env -from typing import List, Mapping, Optional, Union +from typing import Iterable, List, Mapping, Optional, Union class ClientActivity(BaseSDK): def report( self, *, - events: Union[List[models.ActivityEvent], List[models.ActivityEventTypedDict]], + events: Union[ + Iterable[models.ActivityEvent], Iterable[models.ActivityEventTypedDict] + ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -79,6 +81,11 @@ def report( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Activity"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -99,7 +106,9 @@ def report( async def report_async( self, *, - events: Union[List[models.ActivityEvent], List[models.ActivityEventTypedDict]], + events: Union[ + Iterable[models.ActivityEvent], Iterable[models.ActivityEventTypedDict] + ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -166,6 +175,11 @@ async def report_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Activity"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -260,6 +274,11 @@ def feedback( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Activity"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -354,6 +373,11 @@ async def feedback_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Activity"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/client_agents.py b/src/glean/api_client/client_agents.py index 6e1ff0f4..5f25ddec 100644 --- a/src/glean/api_client/client_agents.py +++ b/src/glean/api_client/client_agents.py @@ -6,7 +6,7 @@ from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response -from typing import Any, Dict, List, Mapping, Optional, Union +from typing import Any, Dict, Iterable, List, Mapping, Optional, Union class ClientAgents(BaseSDK): @@ -83,6 +83,8 @@ def retrieve( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Agents"], + extensions={"x-visibility": "Preview"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -177,6 +179,8 @@ async def retrieve_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Agents"], + extensions={"x-visibility": "Preview"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -271,6 +275,8 @@ def retrieve_schemas( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Agents"], + extensions={"x-visibility": "Preview"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -365,6 +371,8 @@ async def retrieve_schemas_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Agents"], + extensions={"x-visibility": "Preview"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -456,6 +464,8 @@ def list( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Agents"], + extensions={"x-visibility": "Preview"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -547,6 +557,8 @@ async def list_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Agents"], + extensions={"x-visibility": "Preview"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -572,11 +584,11 @@ def run_stream( self, *, agent_id: str, - input: Optional[Dict[str, Any]] = None, + input: Optional[Mapping[str, Any]] = None, messages: Optional[ - Union[List[models.Message], List[models.MessageTypedDict]] + Union[Iterable[models.Message], Iterable[models.MessageTypedDict]] ] = None, - metadata: Optional[Dict[str, Any]] = None, + metadata: Optional[Mapping[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -607,9 +619,9 @@ def run_stream( request = models.AgentRunCreate( agent_id=agent_id, - input=input, + input=utils.unmarshal(input, Optional[Dict[str, Any]]), messages=utils.get_pydantic_model(messages, Optional[List[models.Message]]), - metadata=metadata, + metadata=utils.unmarshal(metadata, Optional[Dict[str, Any]]), ) req = self._build_request( @@ -649,6 +661,8 @@ def run_stream( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Agents"], + extensions={"x-visibility": "Preview"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -674,11 +688,11 @@ async def run_stream_async( self, *, agent_id: str, - input: Optional[Dict[str, Any]] = None, + input: Optional[Mapping[str, Any]] = None, messages: Optional[ - Union[List[models.Message], List[models.MessageTypedDict]] + Union[Iterable[models.Message], Iterable[models.MessageTypedDict]] ] = None, - metadata: Optional[Dict[str, Any]] = None, + metadata: Optional[Mapping[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -709,9 +723,9 @@ async def run_stream_async( request = models.AgentRunCreate( agent_id=agent_id, - input=input, + input=utils.unmarshal(input, Optional[Dict[str, Any]]), messages=utils.get_pydantic_model(messages, Optional[List[models.Message]]), - metadata=metadata, + metadata=utils.unmarshal(metadata, Optional[Dict[str, Any]]), ) req = self._build_request_async( @@ -751,6 +765,8 @@ async def run_stream_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Agents"], + extensions={"x-visibility": "Preview"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -776,11 +792,11 @@ def run( self, *, agent_id: str, - input: Optional[Dict[str, Any]] = None, + input: Optional[Mapping[str, Any]] = None, messages: Optional[ - Union[List[models.Message], List[models.MessageTypedDict]] + Union[Iterable[models.Message], Iterable[models.MessageTypedDict]] ] = None, - metadata: Optional[Dict[str, Any]] = None, + metadata: Optional[Mapping[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -811,9 +827,9 @@ def run( request = models.AgentRunCreate( agent_id=agent_id, - input=input, + input=utils.unmarshal(input, Optional[Dict[str, Any]]), messages=utils.get_pydantic_model(messages, Optional[List[models.Message]]), - metadata=metadata, + metadata=utils.unmarshal(metadata, Optional[Dict[str, Any]]), ) req = self._build_request( @@ -853,6 +869,8 @@ def run( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Agents"], + extensions={"x-visibility": "Preview"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -876,11 +894,11 @@ async def run_async( self, *, agent_id: str, - input: Optional[Dict[str, Any]] = None, + input: Optional[Mapping[str, Any]] = None, messages: Optional[ - Union[List[models.Message], List[models.MessageTypedDict]] + Union[Iterable[models.Message], Iterable[models.MessageTypedDict]] ] = None, - metadata: Optional[Dict[str, Any]] = None, + metadata: Optional[Mapping[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -911,9 +929,9 @@ async def run_async( request = models.AgentRunCreate( agent_id=agent_id, - input=input, + input=utils.unmarshal(input, Optional[Dict[str, Any]]), messages=utils.get_pydantic_model(messages, Optional[List[models.Message]]), - metadata=metadata, + metadata=utils.unmarshal(metadata, Optional[Dict[str, Any]]), ) req = self._build_request_async( @@ -953,6 +971,8 @@ async def run_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Agents"], + extensions={"x-visibility": "Preview"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/client_authentication.py b/src/glean/api_client/client_authentication.py index b2e67417..27679b5b 100644 --- a/src/glean/api_client/client_authentication.py +++ b/src/glean/api_client/client_authentication.py @@ -75,6 +75,8 @@ def create_token( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Authentication"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -157,6 +159,8 @@ async def create_token_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Authentication"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/client_chat.py b/src/glean/api_client/client_chat.py index f1e89630..d504d063 100644 --- a/src/glean/api_client/client_chat.py +++ b/src/glean/api_client/client_chat.py @@ -6,14 +6,16 @@ from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response -from typing import List, Mapping, Optional, Union +from typing import Iterable, List, Mapping, Optional, Union class ClientChat(BaseSDK): def create( self, *, - messages: Union[List[models.ChatMessage], List[models.ChatMessageTypedDict]], + messages: Union[ + Iterable[models.ChatMessage], Iterable[models.ChatMessageTypedDict] + ], locale: Optional[str] = None, timezone_offset: Optional[int] = None, session_info: Optional[ @@ -134,13 +136,18 @@ def create( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Chat"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) - if utils.match_response(http_res, "200", "application/json"): + if utils.match_response(http_res, ["200", "202"], "application/json"): return unmarshal_json_response(models.ChatResponse, http_res) if utils.match_response(http_res, ["400", "401", "408", "429", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) @@ -154,7 +161,9 @@ def create( async def create_async( self, *, - messages: Union[List[models.ChatMessage], List[models.ChatMessageTypedDict]], + messages: Union[ + Iterable[models.ChatMessage], Iterable[models.ChatMessageTypedDict] + ], locale: Optional[str] = None, timezone_offset: Optional[int] = None, session_info: Optional[ @@ -275,13 +284,18 @@ async def create_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Chat"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) - if utils.match_response(http_res, "200", "application/json"): + if utils.match_response(http_res, ["200", "202"], "application/json"): return unmarshal_json_response(models.ChatResponse, http_res) if utils.match_response(http_res, ["400", "401", "408", "429", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) @@ -362,6 +376,11 @@ def delete_all( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Chat"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -449,6 +468,11 @@ async def delete_all_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Chat"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -469,7 +493,7 @@ async def delete_all_async( def delete( self, *, - ids: List[str], + ids: Iterable[str], locale: Optional[str] = None, timezone_offset: Optional[int] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -503,7 +527,7 @@ def delete( locale=locale, timezone_offset=timezone_offset, delete_chats_request=models.DeleteChatsRequest( - ids=ids, + ids=utils.unmarshal(ids, List[str]), ), ) @@ -548,6 +572,11 @@ def delete( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Chat"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -568,7 +597,7 @@ def delete( async def delete_async( self, *, - ids: List[str], + ids: Iterable[str], locale: Optional[str] = None, timezone_offset: Optional[int] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -602,7 +631,7 @@ async def delete_async( locale=locale, timezone_offset=timezone_offset, delete_chats_request=models.DeleteChatsRequest( - ids=ids, + ids=utils.unmarshal(ids, List[str]), ), ) @@ -647,6 +676,11 @@ async def delete_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Chat"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -742,6 +776,11 @@ def retrieve( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Chat"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -837,6 +876,11 @@ async def retrieve_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Chat"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -924,6 +968,11 @@ def list( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Chat"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1011,6 +1060,11 @@ async def list_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Chat"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1110,6 +1164,11 @@ def retrieve_application( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Chat"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Preview", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1209,6 +1268,11 @@ async def retrieve_application_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Chat"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Preview", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1229,7 +1293,7 @@ async def retrieve_application_async( def upload_files( self, *, - files: Union[List[models.File], List[models.FileTypedDict]], + files: Union[Iterable[models.File], Iterable[models.FileTypedDict]], locale: Optional[str] = None, timezone_offset: Optional[int] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1308,6 +1372,8 @@ def upload_files( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Chat"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1328,7 +1394,7 @@ def upload_files( async def upload_files_async( self, *, - files: Union[List[models.File], List[models.FileTypedDict]], + files: Union[Iterable[models.File], Iterable[models.FileTypedDict]], locale: Optional[str] = None, timezone_offset: Optional[int] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1407,6 +1473,8 @@ async def upload_files_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Chat"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1427,7 +1495,7 @@ async def upload_files_async( def retrieve_files( self, *, - file_ids: List[str], + file_ids: Iterable[str], locale: Optional[str] = None, timezone_offset: Optional[int] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1461,7 +1529,7 @@ def retrieve_files( locale=locale, timezone_offset=timezone_offset, get_chat_files_request=models.GetChatFilesRequest( - file_ids=file_ids, + file_ids=utils.unmarshal(file_ids, List[str]), ), ) @@ -1506,6 +1574,8 @@ def retrieve_files( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Chat"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1526,7 +1596,7 @@ def retrieve_files( async def retrieve_files_async( self, *, - file_ids: List[str], + file_ids: Iterable[str], locale: Optional[str] = None, timezone_offset: Optional[int] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1560,7 +1630,7 @@ async def retrieve_files_async( locale=locale, timezone_offset=timezone_offset, get_chat_files_request=models.GetChatFilesRequest( - file_ids=file_ids, + file_ids=utils.unmarshal(file_ids, List[str]), ), ) @@ -1605,6 +1675,8 @@ async def retrieve_files_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Chat"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1625,7 +1697,7 @@ async def retrieve_files_async( def delete_files( self, *, - file_ids: List[str], + file_ids: Iterable[str], locale: Optional[str] = None, timezone_offset: Optional[int] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1659,7 +1731,7 @@ def delete_files( locale=locale, timezone_offset=timezone_offset, delete_chat_files_request=models.DeleteChatFilesRequest( - file_ids=file_ids, + file_ids=utils.unmarshal(file_ids, List[str]), ), ) @@ -1704,6 +1776,8 @@ def delete_files( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Chat"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1724,7 +1798,7 @@ def delete_files( async def delete_files_async( self, *, - file_ids: List[str], + file_ids: Iterable[str], locale: Optional[str] = None, timezone_offset: Optional[int] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1758,7 +1832,7 @@ async def delete_files_async( locale=locale, timezone_offset=timezone_offset, delete_chat_files_request=models.DeleteChatFilesRequest( - file_ids=file_ids, + file_ids=utils.unmarshal(file_ids, List[str]), ), ) @@ -1803,6 +1877,8 @@ async def delete_files_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Chat"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1823,7 +1899,9 @@ async def delete_files_async( def create_stream( self, *, - messages: Union[List[models.ChatMessage], List[models.ChatMessageTypedDict]], + messages: Union[ + Iterable[models.ChatMessage], Iterable[models.ChatMessageTypedDict] + ], timezone_offset: Optional[int] = None, session_info: Optional[ Union[models.SessionInfo, models.SessionInfoTypedDict] @@ -1941,6 +2019,11 @@ def create_stream( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Chat"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1961,7 +2044,9 @@ def create_stream( async def create_stream_async( self, *, - messages: Union[List[models.ChatMessage], List[models.ChatMessageTypedDict]], + messages: Union[ + Iterable[models.ChatMessage], Iterable[models.ChatMessageTypedDict] + ], timezone_offset: Optional[int] = None, session_info: Optional[ Union[models.SessionInfo, models.SessionInfoTypedDict] @@ -2079,6 +2164,11 @@ async def create_stream_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Chat"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/client_documents.py b/src/glean/api_client/client_documents.py index c270bf21..d93ffbbf 100644 --- a/src/glean/api_client/client_documents.py +++ b/src/glean/api_client/client_documents.py @@ -7,7 +7,7 @@ from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response -from typing import List, Mapping, Optional, Union +from typing import Iterable, List, Mapping, Optional, Union class ClientDocuments(BaseSDK): @@ -90,6 +90,11 @@ def retrieve_permissions( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Documents"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Preview", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -186,6 +191,11 @@ async def retrieve_permissions_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Documents"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Preview", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -284,6 +294,11 @@ def retrieve( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Documents"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -382,6 +397,11 @@ async def retrieve_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Documents"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -486,6 +506,11 @@ def retrieve_by_facets( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Documents"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Preview", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -592,6 +617,11 @@ async def retrieve_by_facets_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Documents"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Preview", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -615,7 +645,8 @@ def summarize( self, *, document_specs: Union[ - List[models.DocumentSpecUnion], List[models.DocumentSpecUnionTypedDict] + Iterable[models.DocumentSpecUnion], + Iterable[models.DocumentSpecUnionTypedDict], ], locale: Optional[str] = None, timestamp: Optional[datetime] = None, @@ -702,6 +733,11 @@ def summarize( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Summarize"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -723,7 +759,8 @@ async def summarize_async( self, *, document_specs: Union[ - List[models.DocumentSpecUnion], List[models.DocumentSpecUnionTypedDict] + Iterable[models.DocumentSpecUnion], + Iterable[models.DocumentSpecUnionTypedDict], ], locale: Optional[str] = None, timestamp: Optional[datetime] = None, @@ -810,6 +847,11 @@ async def summarize_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Summarize"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/client_entities.py b/src/glean/api_client/client_entities.py index 67fbc0db..819e58a2 100644 --- a/src/glean/api_client/client_entities.py +++ b/src/glean/api_client/client_entities.py @@ -6,7 +6,7 @@ from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response -from typing import List, Mapping, Optional, Union +from typing import Iterable, List, Mapping, Optional, Union class ClientEntities(BaseSDK): @@ -15,17 +15,19 @@ def list( *, locale: Optional[str] = None, filter_: Optional[ - Union[List[models.FacetFilter], List[models.FacetFilterTypedDict]] + Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] ] = None, sort: Optional[ - Union[List[models.SortOptions], List[models.SortOptionsTypedDict]] + Union[Iterable[models.SortOptions], Iterable[models.SortOptionsTypedDict]] ] = None, entity_type: Optional[ models.ListEntitiesRequestEntityType ] = models.ListEntitiesRequestEntityType.PEOPLE, datasource: Optional[str] = None, query: Optional[str] = None, - include_fields: Optional[List[models.ListEntitiesRequestIncludeField]] = None, + include_fields: Optional[ + Iterable[models.ListEntitiesRequestIncludeField] + ] = None, page_size: Optional[int] = None, cursor: Optional[str] = None, source: Optional[str] = None, @@ -75,7 +77,10 @@ def list( entity_type=entity_type, datasource=datasource, query=query, - include_fields=include_fields, + include_fields=utils.unmarshal( + include_fields, + Optional[List[models.ListEntitiesRequestIncludeField]], + ), page_size=page_size, cursor=cursor, source=source, @@ -124,6 +129,11 @@ def list( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Entities"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -146,17 +156,19 @@ async def list_async( *, locale: Optional[str] = None, filter_: Optional[ - Union[List[models.FacetFilter], List[models.FacetFilterTypedDict]] + Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] ] = None, sort: Optional[ - Union[List[models.SortOptions], List[models.SortOptionsTypedDict]] + Union[Iterable[models.SortOptions], Iterable[models.SortOptionsTypedDict]] ] = None, entity_type: Optional[ models.ListEntitiesRequestEntityType ] = models.ListEntitiesRequestEntityType.PEOPLE, datasource: Optional[str] = None, query: Optional[str] = None, - include_fields: Optional[List[models.ListEntitiesRequestIncludeField]] = None, + include_fields: Optional[ + Iterable[models.ListEntitiesRequestIncludeField] + ] = None, page_size: Optional[int] = None, cursor: Optional[str] = None, source: Optional[str] = None, @@ -206,7 +218,10 @@ async def list_async( entity_type=entity_type, datasource=datasource, query=query, - include_fields=include_fields, + include_fields=utils.unmarshal( + include_fields, + Optional[List[models.ListEntitiesRequestIncludeField]], + ), page_size=page_size, cursor=cursor, source=source, @@ -255,6 +270,11 @@ async def list_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Entities"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -277,10 +297,10 @@ def read_people( *, locale: Optional[str] = None, timezone_offset: Optional[int] = None, - obfuscated_ids: Optional[List[str]] = None, - email_ids: Optional[List[str]] = None, - include_fields: Optional[List[models.PeopleRequestIncludeField]] = None, - include_types: Optional[List[models.IncludeType]] = None, + obfuscated_ids: Optional[Iterable[str]] = None, + email_ids: Optional[Iterable[str]] = None, + include_fields: Optional[Iterable[models.PeopleRequestIncludeField]] = None, + include_types: Optional[Iterable[models.IncludeType]] = None, source: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -317,10 +337,14 @@ def read_people( locale=locale, people_request=models.PeopleRequest( timezone_offset=timezone_offset, - obfuscated_ids=obfuscated_ids, - email_ids=email_ids, - include_fields=include_fields, - include_types=include_types, + obfuscated_ids=utils.unmarshal(obfuscated_ids, Optional[List[str]]), + email_ids=utils.unmarshal(email_ids, Optional[List[str]]), + include_fields=utils.unmarshal( + include_fields, Optional[List[models.PeopleRequestIncludeField]] + ), + include_types=utils.unmarshal( + include_types, Optional[List[models.IncludeType]] + ), source=source, ), ) @@ -362,6 +386,11 @@ def read_people( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Entities"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -384,10 +413,10 @@ async def read_people_async( *, locale: Optional[str] = None, timezone_offset: Optional[int] = None, - obfuscated_ids: Optional[List[str]] = None, - email_ids: Optional[List[str]] = None, - include_fields: Optional[List[models.PeopleRequestIncludeField]] = None, - include_types: Optional[List[models.IncludeType]] = None, + obfuscated_ids: Optional[Iterable[str]] = None, + email_ids: Optional[Iterable[str]] = None, + include_fields: Optional[Iterable[models.PeopleRequestIncludeField]] = None, + include_types: Optional[Iterable[models.IncludeType]] = None, source: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -424,10 +453,14 @@ async def read_people_async( locale=locale, people_request=models.PeopleRequest( timezone_offset=timezone_offset, - obfuscated_ids=obfuscated_ids, - email_ids=email_ids, - include_fields=include_fields, - include_types=include_types, + obfuscated_ids=utils.unmarshal(obfuscated_ids, Optional[List[str]]), + email_ids=utils.unmarshal(email_ids, Optional[List[str]]), + include_fields=utils.unmarshal( + include_fields, Optional[List[models.PeopleRequestIncludeField]] + ), + include_types=utils.unmarshal( + include_types, Optional[List[models.IncludeType]] + ), source=source, ), ) @@ -469,6 +502,11 @@ async def read_people_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Entities"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/client_shortcuts.py b/src/glean/api_client/client_shortcuts.py index a4db274d..4241e617 100644 --- a/src/glean/api_client/client_shortcuts.py +++ b/src/glean/api_client/client_shortcuts.py @@ -6,7 +6,7 @@ from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response -from typing import List, Mapping, Optional, Union +from typing import Iterable, List, Mapping, Optional, Union class ClientShortcuts(BaseSDK): @@ -91,6 +91,11 @@ def create( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Shortcuts"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -189,6 +194,11 @@ async def create_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Shortcuts"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -285,6 +295,11 @@ def delete( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Shortcuts"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -381,6 +396,11 @@ async def delete_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Shortcuts"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -479,6 +499,11 @@ def retrieve( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Shortcuts"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -577,6 +602,11 @@ async def retrieve_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Shortcuts"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -600,11 +630,11 @@ def list( page_size: int, locale: Optional[str] = None, include_fields: Optional[ - List[models.ListShortcutsPaginatedRequestIncludeField] + Iterable[models.ListShortcutsPaginatedRequestIncludeField] ] = None, cursor: Optional[str] = None, filters: Optional[ - Union[List[models.FacetFilter], List[models.FacetFilterTypedDict]] + Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] ] = None, sort: Optional[Union[models.SortOptions, models.SortOptionsTypedDict]] = None, query: Optional[str] = None, @@ -642,7 +672,10 @@ def list( request = models.ListshortcutsRequest( locale=locale, list_shortcuts_paginated_request=models.ListShortcutsPaginatedRequest( - include_fields=include_fields, + include_fields=utils.unmarshal( + include_fields, + Optional[List[models.ListShortcutsPaginatedRequestIncludeField]], + ), page_size=page_size, cursor=cursor, filters=utils.get_pydantic_model( @@ -694,6 +727,11 @@ def list( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Shortcuts"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -719,11 +757,11 @@ async def list_async( page_size: int, locale: Optional[str] = None, include_fields: Optional[ - List[models.ListShortcutsPaginatedRequestIncludeField] + Iterable[models.ListShortcutsPaginatedRequestIncludeField] ] = None, cursor: Optional[str] = None, filters: Optional[ - Union[List[models.FacetFilter], List[models.FacetFilterTypedDict]] + Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] ] = None, sort: Optional[Union[models.SortOptions, models.SortOptionsTypedDict]] = None, query: Optional[str] = None, @@ -761,7 +799,10 @@ async def list_async( request = models.ListshortcutsRequest( locale=locale, list_shortcuts_paginated_request=models.ListShortcutsPaginatedRequest( - include_fields=include_fields, + include_fields=utils.unmarshal( + include_fields, + Optional[List[models.ListShortcutsPaginatedRequestIncludeField]], + ), page_size=page_size, cursor=cursor, filters=utils.get_pydantic_model( @@ -813,6 +854,11 @@ async def list_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Shortcuts"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -845,14 +891,14 @@ def update( url_template: Optional[str] = None, added_roles: Optional[ Union[ - List[models.UserRoleSpecification], - List[models.UserRoleSpecificationTypedDict], + Iterable[models.UserRoleSpecification], + Iterable[models.UserRoleSpecificationTypedDict], ] ] = None, removed_roles: Optional[ Union[ - List[models.UserRoleSpecification], - List[models.UserRoleSpecificationTypedDict], + Iterable[models.UserRoleSpecification], + Iterable[models.UserRoleSpecificationTypedDict], ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -949,6 +995,11 @@ def update( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Shortcuts"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -979,14 +1030,14 @@ async def update_async( url_template: Optional[str] = None, added_roles: Optional[ Union[ - List[models.UserRoleSpecification], - List[models.UserRoleSpecificationTypedDict], + Iterable[models.UserRoleSpecification], + Iterable[models.UserRoleSpecificationTypedDict], ] ] = None, removed_roles: Optional[ Union[ - List[models.UserRoleSpecification], - List[models.UserRoleSpecificationTypedDict], + Iterable[models.UserRoleSpecification], + Iterable[models.UserRoleSpecificationTypedDict], ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1083,6 +1134,11 @@ async def update_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Shortcuts"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/client_tools.py b/src/glean/api_client/client_tools.py index 14d9f68c..143bb037 100644 --- a/src/glean/api_client/client_tools.py +++ b/src/glean/api_client/client_tools.py @@ -6,14 +6,14 @@ from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response -from typing import Dict, List, Mapping, Optional, Union +from typing import Dict, Iterable, List, Mapping, Optional, Union class ClientTools(BaseSDK): def list( self, *, - tool_names: Optional[List[str]] = None, + tool_names: Optional[Iterable[str]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -40,7 +40,7 @@ def list( base_url = self._get_url(base_url, url_variables) request = models.GetRestAPIV1ToolsListRequest( - tool_names=tool_names, + tool_names=utils.unmarshal(tool_names, Optional[List[str]]), ) req = self._build_request( @@ -77,6 +77,8 @@ def list( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Tools", "Tools"], + extensions={"x-visibility": "Preview"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -97,7 +99,7 @@ def list( async def list_async( self, *, - tool_names: Optional[List[str]] = None, + tool_names: Optional[Iterable[str]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -124,7 +126,7 @@ async def list_async( base_url = self._get_url(base_url, url_variables) request = models.GetRestAPIV1ToolsListRequest( - tool_names=tool_names, + tool_names=utils.unmarshal(tool_names, Optional[List[str]]), ) req = self._build_request_async( @@ -161,6 +163,8 @@ async def list_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Tools", "Tools"], + extensions={"x-visibility": "Preview"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -183,8 +187,8 @@ def run( *, name: str, parameters: Union[ - Dict[str, models.ToolsCallParameter], - Dict[str, models.ToolsCallParameterTypedDict], + Mapping[str, models.ToolsCallParameter], + Mapping[str, models.ToolsCallParameterTypedDict], ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -256,6 +260,8 @@ def run( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Tools", "Tools"], + extensions={"x-visibility": "Preview"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -278,8 +284,8 @@ async def run_async( *, name: str, parameters: Union[ - Dict[str, models.ToolsCallParameter], - Dict[str, models.ToolsCallParameterTypedDict], + Mapping[str, models.ToolsCallParameter], + Mapping[str, models.ToolsCallParameterTypedDict], ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -351,6 +357,8 @@ async def run_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Tools", "Tools"], + extensions={"x-visibility": "Preview"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/client_verification.py b/src/glean/api_client/client_verification.py index 69a3abb7..706d8499 100644 --- a/src/glean/api_client/client_verification.py +++ b/src/glean/api_client/client_verification.py @@ -94,6 +94,11 @@ def add_reminder( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Verification"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -195,6 +200,11 @@ async def add_reminder_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Verification"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -282,6 +292,11 @@ def list( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Verification"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -369,6 +384,11 @@ async def list_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Verification"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -464,6 +484,11 @@ def verify( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Verification"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -559,6 +584,11 @@ async def verify_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Verification"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/collections.py b/src/glean/api_client/collections.py index f93e472c..ddc1b4d7 100644 --- a/src/glean/api_client/collections.py +++ b/src/glean/api_client/collections.py @@ -6,7 +6,7 @@ from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response -from typing import Any, List, Mapping, Optional, Union +from typing import Any, Iterable, List, Mapping, Optional, Union class Collections(BaseSDK): @@ -17,8 +17,8 @@ def add_items( locale: Optional[str] = None, added_collection_item_descriptors: Optional[ Union[ - List[models.CollectionItemDescriptor], - List[models.CollectionItemDescriptorTypedDict], + Iterable[models.CollectionItemDescriptor], + Iterable[models.CollectionItemDescriptorTypedDict], ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -100,6 +100,11 @@ def add_items( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Collections"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -124,8 +129,8 @@ async def add_items_async( locale: Optional[str] = None, added_collection_item_descriptors: Optional[ Union[ - List[models.CollectionItemDescriptor], - List[models.CollectionItemDescriptorTypedDict], + Iterable[models.CollectionItemDescriptor], + Iterable[models.CollectionItemDescriptorTypedDict], ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -207,6 +212,11 @@ async def add_items_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Collections"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -232,18 +242,18 @@ def create( description: Optional[str] = None, added_roles: Optional[ Union[ - List[models.UserRoleSpecification], - List[models.UserRoleSpecificationTypedDict], + Iterable[models.UserRoleSpecification], + Iterable[models.UserRoleSpecificationTypedDict], ] ] = None, removed_roles: Optional[ Union[ - List[models.UserRoleSpecification], - List[models.UserRoleSpecificationTypedDict], + Iterable[models.UserRoleSpecification], + Iterable[models.UserRoleSpecificationTypedDict], ] ] = None, audience_filters: Optional[ - Union[List[models.FacetFilter], List[models.FacetFilterTypedDict]] + Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] ] = None, icon: Optional[str] = None, admin_locked: Optional[bool] = None, @@ -353,6 +363,11 @@ def create( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Collections"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -384,18 +399,18 @@ async def create_async( description: Optional[str] = None, added_roles: Optional[ Union[ - List[models.UserRoleSpecification], - List[models.UserRoleSpecificationTypedDict], + Iterable[models.UserRoleSpecification], + Iterable[models.UserRoleSpecificationTypedDict], ] ] = None, removed_roles: Optional[ Union[ - List[models.UserRoleSpecification], - List[models.UserRoleSpecificationTypedDict], + Iterable[models.UserRoleSpecification], + Iterable[models.UserRoleSpecificationTypedDict], ] ] = None, audience_filters: Optional[ - Union[List[models.FacetFilter], List[models.FacetFilterTypedDict]] + Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] ] = None, icon: Optional[str] = None, admin_locked: Optional[bool] = None, @@ -505,6 +520,11 @@ async def create_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Collections"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -531,7 +551,7 @@ async def create_async( def delete( self, *, - ids: List[int], + ids: Iterable[int], locale: Optional[str] = None, allowed_datasource: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -564,7 +584,7 @@ def delete( request = models.DeletecollectionRequestRequest( locale=locale, delete_collection_request=models.DeleteCollectionRequest( - ids=ids, + ids=utils.unmarshal(ids, List[int]), allowed_datasource=allowed_datasource, ), ) @@ -610,6 +630,11 @@ def delete( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Collections"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -636,7 +661,7 @@ def delete( async def delete_async( self, *, - ids: List[int], + ids: Iterable[int], locale: Optional[str] = None, allowed_datasource: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -669,7 +694,7 @@ async def delete_async( request = models.DeletecollectionRequestRequest( locale=locale, delete_collection_request=models.DeleteCollectionRequest( - ids=ids, + ids=utils.unmarshal(ids, List[int]), allowed_datasource=allowed_datasource, ), ) @@ -715,6 +740,11 @@ async def delete_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Collections"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -823,6 +853,11 @@ def delete_item( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Collections"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -927,6 +962,11 @@ async def delete_item_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Collections"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -955,18 +995,18 @@ def update( description: Optional[str] = None, added_roles: Optional[ Union[ - List[models.UserRoleSpecification], - List[models.UserRoleSpecificationTypedDict], + Iterable[models.UserRoleSpecification], + Iterable[models.UserRoleSpecificationTypedDict], ] ] = None, removed_roles: Optional[ Union[ - List[models.UserRoleSpecification], - List[models.UserRoleSpecificationTypedDict], + Iterable[models.UserRoleSpecification], + Iterable[models.UserRoleSpecificationTypedDict], ] ] = None, audience_filters: Optional[ - Union[List[models.FacetFilter], List[models.FacetFilterTypedDict]] + Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] ] = None, icon: Optional[str] = None, admin_locked: Optional[bool] = None, @@ -1075,6 +1115,11 @@ def update( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Collections"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1107,18 +1152,18 @@ async def update_async( description: Optional[str] = None, added_roles: Optional[ Union[ - List[models.UserRoleSpecification], - List[models.UserRoleSpecificationTypedDict], + Iterable[models.UserRoleSpecification], + Iterable[models.UserRoleSpecificationTypedDict], ] ] = None, removed_roles: Optional[ Union[ - List[models.UserRoleSpecification], - List[models.UserRoleSpecificationTypedDict], + Iterable[models.UserRoleSpecification], + Iterable[models.UserRoleSpecificationTypedDict], ] ] = None, audience_filters: Optional[ - Union[List[models.FacetFilter], List[models.FacetFilterTypedDict]] + Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] ] = None, icon: Optional[str] = None, admin_locked: Optional[bool] = None, @@ -1227,6 +1272,11 @@ async def update_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Collections"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1341,6 +1391,11 @@ def update_item( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Collections"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1449,6 +1504,11 @@ async def update_item_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Collections"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1554,6 +1614,11 @@ def retrieve( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Collections"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Preview", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1659,6 +1724,11 @@ async def retrieve_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Collections"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Preview", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1762,6 +1832,11 @@ def list( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Collections"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1865,6 +1940,11 @@ async def list_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Collections"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/custommetadata.py b/src/glean/api_client/custommetadata.py index da51ad9d..1e933c1c 100644 --- a/src/glean/api_client/custommetadata.py +++ b/src/glean/api_client/custommetadata.py @@ -6,7 +6,7 @@ from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response -from typing import Any, List, Mapping, Optional, Union +from typing import Any, Iterable, List, Mapping, Optional, Union class CustomMetadata(BaseSDK): @@ -16,7 +16,7 @@ def upsert( doc_id: str, group_name: str, custom_metadata: Union[ - List[models.CustomProperty], List[models.CustomPropertyTypedDict] + Iterable[models.CustomProperty], Iterable[models.CustomPropertyTypedDict] ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -101,6 +101,8 @@ def upsert( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Custom Metadata"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -137,7 +139,7 @@ async def upsert_async( doc_id: str, group_name: str, custom_metadata: Union[ - List[models.CustomProperty], List[models.CustomPropertyTypedDict] + Iterable[models.CustomProperty], Iterable[models.CustomPropertyTypedDict] ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -222,6 +224,8 @@ async def upsert_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Custom Metadata"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -327,6 +331,8 @@ def delete( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Custom Metadata"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -432,6 +438,8 @@ async def delete_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Custom Metadata"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -536,6 +544,8 @@ def get_schema( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Custom Metadata"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -638,6 +648,8 @@ async def get_schema_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Custom Metadata"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -671,8 +683,8 @@ def upsert_schema( *, group_name: str, metadata_keys: Union[ - List[models.CustomMetadataPropertyDefinition], - List[models.CustomMetadataPropertyDefinitionTypedDict], + Iterable[models.CustomMetadataPropertyDefinition], + Iterable[models.CustomMetadataPropertyDefinitionTypedDict], ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -757,6 +769,8 @@ def upsert_schema( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Custom Metadata"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -792,8 +806,8 @@ async def upsert_schema_async( *, group_name: str, metadata_keys: Union[ - List[models.CustomMetadataPropertyDefinition], - List[models.CustomMetadataPropertyDefinitionTypedDict], + Iterable[models.CustomMetadataPropertyDefinition], + Iterable[models.CustomMetadataPropertyDefinitionTypedDict], ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -878,6 +892,8 @@ async def upsert_schema_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Custom Metadata"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -980,6 +996,8 @@ def delete_schema( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Custom Metadata"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1082,6 +1100,8 @@ async def delete_schema_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Custom Metadata"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/datasources.py b/src/glean/api_client/datasources.py index e4eba5ec..eb6593e3 100644 --- a/src/glean/api_client/datasources.py +++ b/src/glean/api_client/datasources.py @@ -83,6 +83,8 @@ def get_datasource_instance_configuration( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Datasources"], + extensions={"x-visibility": "Preview"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -177,6 +179,8 @@ async def get_datasource_instance_configuration_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Datasources"], + extensions={"x-visibility": "Preview"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -288,6 +292,8 @@ def update_datasource_instance_configuration( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Datasources"], + extensions={"x-visibility": "Preview"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -399,6 +405,8 @@ async def update_datasource_instance_configuration_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Datasources"], + extensions={"x-visibility": "Preview"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -490,6 +498,8 @@ def get_datasource_credential_status( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Datasources"], + extensions={"x-visibility": "Preview"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -581,6 +591,8 @@ async def get_datasource_credential_status_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Datasources"], + extensions={"x-visibility": "Preview"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -690,6 +702,8 @@ def rotate_datasource_credentials( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Datasources"], + extensions={"x-visibility": "Preview"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -799,6 +813,8 @@ async def rotate_datasource_credentials_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Datasources"], + extensions={"x-visibility": "Preview"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/entities.py b/src/glean/api_client/entities.py index 6f3f666e..dbf83344 100644 --- a/src/glean/api_client/entities.py +++ b/src/glean/api_client/entities.py @@ -91,6 +91,8 @@ def get_person_photo( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Entities"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -192,6 +194,8 @@ async def get_person_photo_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Entities"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/governance.py b/src/glean/api_client/governance.py index fd67e05d..c8e2256e 100644 --- a/src/glean/api_client/governance.py +++ b/src/glean/api_client/governance.py @@ -6,7 +6,7 @@ from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response -from typing import List, Mapping, Optional, Union +from typing import Iterable, List, Mapping, Optional, Union class Governance(BaseSDK): @@ -22,7 +22,7 @@ def createfindingsexport( ] = None, file_name: Optional[str] = None, field_scope: Optional[models.FieldScope] = None, - fields_to_exclude: Optional[List[str]] = None, + fields_to_exclude: Optional[Iterable[str]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -63,7 +63,7 @@ def createfindingsexport( ), file_name=file_name, field_scope=field_scope, - fields_to_exclude=fields_to_exclude, + fields_to_exclude=utils.unmarshal(fields_to_exclude, Optional[List[str]]), ) req = self._build_request( @@ -103,6 +103,8 @@ def createfindingsexport( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Governance"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -132,7 +134,7 @@ async def createfindingsexport_async( ] = None, file_name: Optional[str] = None, field_scope: Optional[models.FieldScope] = None, - fields_to_exclude: Optional[List[str]] = None, + fields_to_exclude: Optional[Iterable[str]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -173,7 +175,7 @@ async def createfindingsexport_async( ), file_name=file_name, field_scope=field_scope, - fields_to_exclude=fields_to_exclude, + fields_to_exclude=utils.unmarshal(fields_to_exclude, Optional[List[str]]), ) req = self._build_request_async( @@ -213,6 +215,8 @@ async def createfindingsexport_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Governance"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -290,6 +294,8 @@ def listfindingsexports( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Governance"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -369,6 +375,8 @@ async def listfindingsexports_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Governance"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -455,6 +463,8 @@ def downloadfindingsexport( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Governance"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -539,6 +549,8 @@ async def downloadfindingsexport_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Governance"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -623,6 +635,8 @@ def deletefindingsexport( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Governance"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -707,6 +721,8 @@ async def deletefindingsexport_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Governance"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/indexing_authentication.py b/src/glean/api_client/indexing_authentication.py index 2195782f..98f3a192 100644 --- a/src/glean/api_client/indexing_authentication.py +++ b/src/glean/api_client/indexing_authentication.py @@ -70,6 +70,8 @@ def rotate_token( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Authentication"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -147,6 +149,8 @@ async def rotate_token_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Authentication"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/indexing_datasource.py b/src/glean/api_client/indexing_datasource.py index 0bb15857..98889628 100644 --- a/src/glean/api_client/indexing_datasource.py +++ b/src/glean/api_client/indexing_datasource.py @@ -80,6 +80,8 @@ def status( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Troubleshooting"], + extensions={"x-beta": True}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -169,6 +171,8 @@ async def status_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Troubleshooting"], + extensions={"x-beta": True}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/indexing_datasources.py b/src/glean/api_client/indexing_datasources.py index b8b091e8..7438ab95 100644 --- a/src/glean/api_client/indexing_datasources.py +++ b/src/glean/api_client/indexing_datasources.py @@ -6,7 +6,7 @@ from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response -from typing import List, Mapping, Optional, Union +from typing import Iterable, List, Mapping, Optional, Union class IndexingDatasources(BaseSDK): @@ -21,32 +21,35 @@ def add( url_regex: Optional[str] = None, icon_url: Optional[str] = None, object_definitions: Optional[ - Union[List[models.ObjectDefinition], List[models.ObjectDefinitionTypedDict]] + Union[ + Iterable[models.ObjectDefinition], + Iterable[models.ObjectDefinitionTypedDict], + ] ] = None, suggestion_text: Optional[str] = None, home_url: Optional[str] = None, - crawler_seed_urls: Optional[List[str]] = None, + crawler_seed_urls: Optional[Iterable[str]] = None, icon_dark_url: Optional[str] = None, - hide_built_in_facets: Optional[List[models.HideBuiltInFacet]] = None, + hide_built_in_facets: Optional[Iterable[models.HideBuiltInFacet]] = None, canonicalizing_url_regex: Optional[ Union[ - List[models.CanonicalizingRegexType], - List[models.CanonicalizingRegexTypeTypedDict], + Iterable[models.CanonicalizingRegexType], + Iterable[models.CanonicalizingRegexTypeTypedDict], ] ] = None, canonicalizing_title_regex: Optional[ Union[ - List[models.CanonicalizingRegexType], - List[models.CanonicalizingRegexTypeTypedDict], + Iterable[models.CanonicalizingRegexType], + Iterable[models.CanonicalizingRegexTypeTypedDict], ] ] = None, redlist_title_regex: Optional[str] = None, connector_type: Optional[models.CustomDatasourceConfigConnectorType] = None, quicklinks: Optional[ - Union[List[models.Quicklink], List[models.QuicklinkTypedDict]] + Union[Iterable[models.Quicklink], Iterable[models.QuicklinkTypedDict]] ] = None, render_config_preset: Optional[str] = None, - aliases: Optional[List[str]] = None, + aliases: Optional[Iterable[str]] = None, is_on_prem: Optional[bool] = None, trust_url_regex_for_view_activity: Optional[bool] = True, include_utm_source: Optional[bool] = None, @@ -118,9 +121,11 @@ def add( ), suggestion_text=suggestion_text, home_url=home_url, - crawler_seed_urls=crawler_seed_urls, + crawler_seed_urls=utils.unmarshal(crawler_seed_urls, Optional[List[str]]), icon_dark_url=icon_dark_url, - hide_built_in_facets=hide_built_in_facets, + hide_built_in_facets=utils.unmarshal( + hide_built_in_facets, Optional[List[models.HideBuiltInFacet]] + ), canonicalizing_url_regex=utils.get_pydantic_model( canonicalizing_url_regex, Optional[List[models.CanonicalizingRegexType]] ), @@ -134,7 +139,7 @@ def add( quicklinks, Optional[List[models.Quicklink]] ), render_config_preset=render_config_preset, - aliases=aliases, + aliases=utils.unmarshal(aliases, Optional[List[str]]), is_on_prem=is_on_prem, trust_url_regex_for_view_activity=trust_url_regex_for_view_activity, include_utm_source=include_utm_source, @@ -183,6 +188,8 @@ def add( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Datasources"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -211,32 +218,35 @@ async def add_async( url_regex: Optional[str] = None, icon_url: Optional[str] = None, object_definitions: Optional[ - Union[List[models.ObjectDefinition], List[models.ObjectDefinitionTypedDict]] + Union[ + Iterable[models.ObjectDefinition], + Iterable[models.ObjectDefinitionTypedDict], + ] ] = None, suggestion_text: Optional[str] = None, home_url: Optional[str] = None, - crawler_seed_urls: Optional[List[str]] = None, + crawler_seed_urls: Optional[Iterable[str]] = None, icon_dark_url: Optional[str] = None, - hide_built_in_facets: Optional[List[models.HideBuiltInFacet]] = None, + hide_built_in_facets: Optional[Iterable[models.HideBuiltInFacet]] = None, canonicalizing_url_regex: Optional[ Union[ - List[models.CanonicalizingRegexType], - List[models.CanonicalizingRegexTypeTypedDict], + Iterable[models.CanonicalizingRegexType], + Iterable[models.CanonicalizingRegexTypeTypedDict], ] ] = None, canonicalizing_title_regex: Optional[ Union[ - List[models.CanonicalizingRegexType], - List[models.CanonicalizingRegexTypeTypedDict], + Iterable[models.CanonicalizingRegexType], + Iterable[models.CanonicalizingRegexTypeTypedDict], ] ] = None, redlist_title_regex: Optional[str] = None, connector_type: Optional[models.CustomDatasourceConfigConnectorType] = None, quicklinks: Optional[ - Union[List[models.Quicklink], List[models.QuicklinkTypedDict]] + Union[Iterable[models.Quicklink], Iterable[models.QuicklinkTypedDict]] ] = None, render_config_preset: Optional[str] = None, - aliases: Optional[List[str]] = None, + aliases: Optional[Iterable[str]] = None, is_on_prem: Optional[bool] = None, trust_url_regex_for_view_activity: Optional[bool] = True, include_utm_source: Optional[bool] = None, @@ -308,9 +318,11 @@ async def add_async( ), suggestion_text=suggestion_text, home_url=home_url, - crawler_seed_urls=crawler_seed_urls, + crawler_seed_urls=utils.unmarshal(crawler_seed_urls, Optional[List[str]]), icon_dark_url=icon_dark_url, - hide_built_in_facets=hide_built_in_facets, + hide_built_in_facets=utils.unmarshal( + hide_built_in_facets, Optional[List[models.HideBuiltInFacet]] + ), canonicalizing_url_regex=utils.get_pydantic_model( canonicalizing_url_regex, Optional[List[models.CanonicalizingRegexType]] ), @@ -324,7 +336,7 @@ async def add_async( quicklinks, Optional[List[models.Quicklink]] ), render_config_preset=render_config_preset, - aliases=aliases, + aliases=utils.unmarshal(aliases, Optional[List[str]]), is_on_prem=is_on_prem, trust_url_regex_for_view_activity=trust_url_regex_for_view_activity, include_utm_source=include_utm_source, @@ -373,6 +385,8 @@ async def add_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Datasources"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -460,6 +474,8 @@ def retrieve_config( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Datasources"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -547,6 +563,8 @@ async def retrieve_config_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Datasources"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/indexing_documents.py b/src/glean/api_client/indexing_documents.py index 9817af75..8677ab51 100644 --- a/src/glean/api_client/indexing_documents.py +++ b/src/glean/api_client/indexing_documents.py @@ -6,7 +6,7 @@ from glean.api_client.types import BaseModel, OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response -from typing import List, Mapping, Optional, Union, cast +from typing import Iterable, List, Mapping, Optional, Union, cast from typing_extensions import deprecated @@ -84,6 +84,8 @@ def add_or_update( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Documents"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -174,6 +176,8 @@ async def add_or_update_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Documents"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -196,7 +200,8 @@ def index( *, datasource: str, documents: Union[ - List[models.DocumentDefinition], List[models.DocumentDefinitionTypedDict] + Iterable[models.DocumentDefinition], + Iterable[models.DocumentDefinitionTypedDict], ], upload_id: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -271,6 +276,8 @@ def index( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Documents"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -293,7 +300,8 @@ async def index_async( *, datasource: str, documents: Union[ - List[models.DocumentDefinition], List[models.DocumentDefinitionTypedDict] + Iterable[models.DocumentDefinition], + Iterable[models.DocumentDefinitionTypedDict], ], upload_id: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -368,6 +376,8 @@ async def index_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Documents"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -391,7 +401,8 @@ def bulk_index( upload_id: str, datasource: str, documents: Union[ - List[models.DocumentDefinition], List[models.DocumentDefinitionTypedDict] + Iterable[models.DocumentDefinition], + Iterable[models.DocumentDefinitionTypedDict], ], is_first_page: Optional[bool] = None, is_last_page: Optional[bool] = None, @@ -477,6 +488,8 @@ def bulk_index( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Documents"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -500,7 +513,8 @@ async def bulk_index_async( upload_id: str, datasource: str, documents: Union[ - List[models.DocumentDefinition], List[models.DocumentDefinitionTypedDict] + Iterable[models.DocumentDefinition], + Iterable[models.DocumentDefinitionTypedDict], ], is_first_page: Optional[bool] = None, is_last_page: Optional[bool] = None, @@ -586,6 +600,8 @@ async def bulk_index_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Documents"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -695,6 +711,8 @@ def process_all( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Documents"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -804,6 +822,8 @@ async def process_all_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Documents"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -900,6 +920,8 @@ def delete( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Documents"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -996,6 +1018,8 @@ async def delete_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Documents"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1098,6 +1122,8 @@ def debug( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Troubleshooting"], + extensions={"x-beta": True}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1200,6 +1226,8 @@ async def debug_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Troubleshooting"], + extensions={"x-beta": True}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1222,8 +1250,8 @@ def debug_many( *, datasource: str, debug_documents: Union[ - List[models.DebugDocumentRequest], - List[models.DebugDocumentRequestTypedDict], + Iterable[models.DebugDocumentRequest], + Iterable[models.DebugDocumentRequestTypedDict], ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -1304,6 +1332,8 @@ def debug_many( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Troubleshooting"], + extensions={"x-beta": True}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1326,8 +1356,8 @@ async def debug_many_async( *, datasource: str, debug_documents: Union[ - List[models.DebugDocumentRequest], - List[models.DebugDocumentRequestTypedDict], + Iterable[models.DebugDocumentRequest], + Iterable[models.DebugDocumentRequestTypedDict], ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -1408,6 +1438,8 @@ async def debug_many_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Troubleshooting"], + extensions={"x-beta": True}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1507,6 +1539,8 @@ def check_access( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Troubleshooting"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1606,6 +1640,8 @@ async def check_access_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Troubleshooting"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1705,6 +1741,15 @@ def status( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Troubleshooting"], + extensions={ + "x-glean-deprecated": { + "id": "7eec0433-78fd-49f9-a34f-cca83640ec24", + "introduced": "2026-02-03", + "message": "Endpoint is deprecated", + "removal": "2026-10-15", + } + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1804,6 +1849,15 @@ async def status_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Troubleshooting"], + extensions={ + "x-glean-deprecated": { + "id": "7eec0433-78fd-49f9-a34f-cca83640ec24", + "introduced": "2026-02-03", + "message": "Endpoint is deprecated", + "removal": "2026-10-15", + } + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1897,6 +1951,15 @@ def count( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Troubleshooting"], + extensions={ + "x-glean-deprecated": { + "id": "c164089c-9412-4724-acf6-caf3b0d2a527", + "introduced": "2026-02-03", + "message": "Endpoint is deprecated", + "removal": "2026-10-15", + } + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1990,6 +2053,15 @@ async def count_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Troubleshooting"], + extensions={ + "x-glean-deprecated": { + "id": "c164089c-9412-4724-acf6-caf3b0d2a527", + "introduced": "2026-02-03", + "message": "Endpoint is deprecated", + "removal": "2026-10-15", + } + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/indexing_permissions.py b/src/glean/api_client/indexing_permissions.py index c41d5c91..e6e349af 100644 --- a/src/glean/api_client/indexing_permissions.py +++ b/src/glean/api_client/indexing_permissions.py @@ -5,7 +5,7 @@ from glean.api_client._hooks import HookContext from glean.api_client.types import BaseModel, OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env -from typing import List, Mapping, Optional, Union, cast +from typing import Iterable, List, Mapping, Optional, Union, cast class IndexingPermissions(BaseSDK): @@ -97,6 +97,8 @@ def update_permissions( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Documents"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -202,6 +204,8 @@ async def update_permissions_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Documents"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -297,6 +301,8 @@ def index_user( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Permissions"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -392,6 +398,8 @@ async def index_user_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Permissions"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -415,8 +423,8 @@ def bulk_index_users( upload_id: str, datasource: str, users: Union[ - List[models.DatasourceUserDefinition], - List[models.DatasourceUserDefinitionTypedDict], + Iterable[models.DatasourceUserDefinition], + Iterable[models.DatasourceUserDefinitionTypedDict], ], is_first_page: Optional[bool] = None, is_last_page: Optional[bool] = None, @@ -504,6 +512,8 @@ def bulk_index_users( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Permissions"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -527,8 +537,8 @@ async def bulk_index_users_async( upload_id: str, datasource: str, users: Union[ - List[models.DatasourceUserDefinition], - List[models.DatasourceUserDefinitionTypedDict], + Iterable[models.DatasourceUserDefinition], + Iterable[models.DatasourceUserDefinitionTypedDict], ], is_first_page: Optional[bool] = None, is_last_page: Optional[bool] = None, @@ -616,6 +626,8 @@ async def bulk_index_users_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Permissions"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -711,6 +723,8 @@ def index_group( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Permissions"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -806,6 +820,8 @@ async def index_group_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Permissions"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -829,8 +845,8 @@ def bulk_index_groups( upload_id: str, datasource: str, groups: Union[ - List[models.DatasourceGroupDefinition], - List[models.DatasourceGroupDefinitionTypedDict], + Iterable[models.DatasourceGroupDefinition], + Iterable[models.DatasourceGroupDefinitionTypedDict], ], is_first_page: Optional[bool] = None, is_last_page: Optional[bool] = None, @@ -918,6 +934,8 @@ def bulk_index_groups( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Permissions"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -941,8 +959,8 @@ async def bulk_index_groups_async( upload_id: str, datasource: str, groups: Union[ - List[models.DatasourceGroupDefinition], - List[models.DatasourceGroupDefinitionTypedDict], + Iterable[models.DatasourceGroupDefinition], + Iterable[models.DatasourceGroupDefinitionTypedDict], ], is_first_page: Optional[bool] = None, is_last_page: Optional[bool] = None, @@ -1030,6 +1048,8 @@ async def bulk_index_groups_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Permissions"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1128,6 +1148,8 @@ def index_membership( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Permissions"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1226,6 +1248,8 @@ async def index_membership_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Permissions"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1249,8 +1273,8 @@ def bulk_index_memberships( upload_id: str, datasource: str, memberships: Union[ - List[models.DatasourceBulkMembershipDefinition], - List[models.DatasourceBulkMembershipDefinitionTypedDict], + Iterable[models.DatasourceBulkMembershipDefinition], + Iterable[models.DatasourceBulkMembershipDefinitionTypedDict], ], is_first_page: Optional[bool] = None, is_last_page: Optional[bool] = None, @@ -1336,6 +1360,8 @@ def bulk_index_memberships( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Permissions"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1359,8 +1385,8 @@ async def bulk_index_memberships_async( upload_id: str, datasource: str, memberships: Union[ - List[models.DatasourceBulkMembershipDefinition], - List[models.DatasourceBulkMembershipDefinitionTypedDict], + Iterable[models.DatasourceBulkMembershipDefinition], + Iterable[models.DatasourceBulkMembershipDefinitionTypedDict], ], is_first_page: Optional[bool] = None, is_last_page: Optional[bool] = None, @@ -1446,6 +1472,8 @@ async def bulk_index_memberships_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Permissions"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1545,6 +1573,8 @@ def process_memberships( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Permissions"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1644,6 +1674,8 @@ async def process_memberships_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Permissions"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1739,6 +1771,8 @@ def delete_user( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Permissions"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1834,6 +1868,8 @@ async def delete_user_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Permissions"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1929,6 +1965,8 @@ def delete_group( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Permissions"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -2024,6 +2062,8 @@ async def delete_group_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Permissions"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -2122,6 +2162,8 @@ def delete_membership( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Permissions"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -2220,6 +2262,8 @@ async def delete_membership_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Permissions"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -2241,7 +2285,7 @@ def authorize_beta_users( self, *, datasource: str, - emails: List[str], + emails: Iterable[str], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -2270,7 +2314,7 @@ def authorize_beta_users( request = models.GreenlistUsersRequest( datasource=datasource, - emails=emails, + emails=utils.unmarshal(emails, List[str]), ) req = self._build_request( @@ -2310,6 +2354,8 @@ def authorize_beta_users( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Permissions"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -2331,7 +2377,7 @@ async def authorize_beta_users_async( self, *, datasource: str, - emails: List[str], + emails: Iterable[str], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -2360,7 +2406,7 @@ async def authorize_beta_users_async( request = models.GreenlistUsersRequest( datasource=datasource, - emails=emails, + emails=utils.unmarshal(emails, List[str]), ) req = self._build_request_async( @@ -2400,6 +2446,8 @@ async def authorize_beta_users_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Permissions"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/indexing_shortcuts.py b/src/glean/api_client/indexing_shortcuts.py index bdfdec85..14298512 100644 --- a/src/glean/api_client/indexing_shortcuts.py +++ b/src/glean/api_client/indexing_shortcuts.py @@ -5,7 +5,7 @@ from glean.api_client._hooks import HookContext from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env -from typing import List, Mapping, Optional, Union +from typing import Iterable, List, Mapping, Optional, Union class IndexingShortcuts(BaseSDK): @@ -14,7 +14,8 @@ def bulk_index( *, upload_id: str, shortcuts: Union[ - List[models.ExternalShortcut], List[models.ExternalShortcutTypedDict] + Iterable[models.ExternalShortcut], + Iterable[models.ExternalShortcutTypedDict], ], is_first_page: Optional[bool] = None, is_last_page: Optional[bool] = None, @@ -95,6 +96,8 @@ def bulk_index( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Shortcuts"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -117,7 +120,8 @@ async def bulk_index_async( *, upload_id: str, shortcuts: Union[ - List[models.ExternalShortcut], List[models.ExternalShortcutTypedDict] + Iterable[models.ExternalShortcut], + Iterable[models.ExternalShortcutTypedDict], ], is_first_page: Optional[bool] = None, is_last_page: Optional[bool] = None, @@ -198,6 +202,8 @@ async def bulk_index_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Shortcuts"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -220,7 +226,8 @@ def upload( *, upload_id: str, shortcuts: Union[ - List[models.IndexingShortcut], List[models.IndexingShortcutTypedDict] + Iterable[models.IndexingShortcut], + Iterable[models.IndexingShortcutTypedDict], ], is_first_page: Optional[bool] = None, is_last_page: Optional[bool] = None, @@ -301,6 +308,8 @@ def upload( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Shortcuts"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -323,7 +332,8 @@ async def upload_async( *, upload_id: str, shortcuts: Union[ - List[models.IndexingShortcut], List[models.IndexingShortcutTypedDict] + Iterable[models.IndexingShortcut], + Iterable[models.IndexingShortcutTypedDict], ], is_first_page: Optional[bool] = None, is_last_page: Optional[bool] = None, @@ -404,6 +414,8 @@ async def upload_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Shortcuts"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/insights.py b/src/glean/api_client/insights.py index 388b8a37..e178944f 100644 --- a/src/glean/api_client/insights.py +++ b/src/glean/api_client/insights.py @@ -130,6 +130,11 @@ def retrieve( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Insights"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -267,6 +272,11 @@ async def retrieve_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Insights"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/messages.py b/src/glean/api_client/messages.py index fd580d9a..77016bff 100644 --- a/src/glean/api_client/messages.py +++ b/src/glean/api_client/messages.py @@ -106,6 +106,11 @@ def retrieve( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Messages"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Preview", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -219,6 +224,11 @@ async def retrieve_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Messages"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Preview", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/models/__init__.py b/src/glean/api_client/models/__init__.py index 10111171..6292b575 100644 --- a/src/glean/api_client/models/__init__.py +++ b/src/glean/api_client/models/__init__.py @@ -342,6 +342,7 @@ from .contentdefinition import ContentDefinition, ContentDefinitionTypedDict from .contenttype import ContentType from .countinfo import CountInfo, CountInfoTypedDict + from .createagentop import CreateAgentRequest, CreateAgentRequestTypedDict from .createannouncementop import ( CreateannouncementRequestRequest, CreateannouncementRequestRequestTypedDict, @@ -395,6 +396,10 @@ CreateShortcutResponse, CreateShortcutResponseTypedDict, ) + from .createworkflowrequest import ( + CreateWorkflowRequest, + CreateWorkflowRequestTypedDict, + ) from .currentactiveusers import CurrentActiveUsers, CurrentActiveUsersTypedDict from .customdatasourceconfig import ( CustomDatasourceConfig, @@ -790,7 +795,12 @@ FeedRequestOptionsTypedDict, ) from .feedresponse import FeedResponse, FeedResponseTypedDict - from .feedresult import FeedResult, FeedResultCategory, FeedResultTypedDict + from .feedresult import ( + FeedResult, + FeedResultCategory, + FeedResultTypedDict, + PlacementReason, + ) from .followupaction import FollowupAction, FollowupActionTypedDict from .generatedattachment import GeneratedAttachment, GeneratedAttachmentTypedDict from .generatedattachmentcontent import ( @@ -1799,6 +1809,8 @@ "ContentType", "CountInfo", "CountInfoTypedDict", + "CreateAgentRequest", + "CreateAgentRequestTypedDict", "CreateAnnouncementRequest", "CreateAnnouncementRequestChannel", "CreateAnnouncementRequestPostType", @@ -1817,6 +1829,8 @@ "CreateShortcutRequestTypedDict", "CreateShortcutResponse", "CreateShortcutResponseTypedDict", + "CreateWorkflowRequest", + "CreateWorkflowRequestTypedDict", "CreateannouncementRequestRequest", "CreateannouncementRequestRequestTypedDict", "CreateanswerRequestRequest", @@ -2479,6 +2493,7 @@ "PinRequestRequest", "PinRequestRequestTypedDict", "PinRequestTypedDict", + "PlacementReason", "PossibleValue", "PossibleValueTypedDict", "PostAPIIndexV1DebugDatasourceDocumentEventsRequest", @@ -3019,6 +3034,8 @@ "ContentType": ".contenttype", "CountInfo": ".countinfo", "CountInfoTypedDict": ".countinfo", + "CreateAgentRequest": ".createagentop", + "CreateAgentRequestTypedDict": ".createagentop", "CreateannouncementRequestRequest": ".createannouncementop", "CreateannouncementRequestRequestTypedDict": ".createannouncementop", "CreateAnnouncementRequest": ".createannouncementrequest", @@ -3051,6 +3068,8 @@ "CreateShortcutRequestTypedDict": ".createshortcutrequest", "CreateShortcutResponse": ".createshortcutresponse", "CreateShortcutResponseTypedDict": ".createshortcutresponse", + "CreateWorkflowRequest": ".createworkflowrequest", + "CreateWorkflowRequestTypedDict": ".createworkflowrequest", "CurrentActiveUsers": ".currentactiveusers", "CurrentActiveUsersTypedDict": ".currentactiveusers", "CustomDatasourceConfig": ".customdatasourceconfig", @@ -3354,6 +3373,7 @@ "FeedResult": ".feedresult", "FeedResultCategory": ".feedresult", "FeedResultTypedDict": ".feedresult", + "PlacementReason": ".feedresult", "FollowupAction": ".followupaction", "FollowupActionTypedDict": ".followupaction", "GeneratedAttachment": ".generatedattachment", diff --git a/src/glean/api_client/models/allowlistoptions.py b/src/glean/api_client/models/allowlistoptions.py index 123b345c..0059b3cd 100644 --- a/src/glean/api_client/models/allowlistoptions.py +++ b/src/glean/api_client/models/allowlistoptions.py @@ -8,21 +8,26 @@ class AllowlistOptionsTypedDict(TypedDict): - r"""Terms that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term in the allow-list, it will not be counted as a violation.""" + r"""Terms and regexes that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term, or matches a regex, in the allow-list, it will not be counted as a violation.""" terms: NotRequired[List[str]] r"""list of words and phrases to consider as whitelisted content""" + regexes: NotRequired[List[str]] + r"""list of regular expressions whose matches are considered whitelisted content""" class AllowlistOptions(BaseModel): - r"""Terms that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term in the allow-list, it will not be counted as a violation.""" + r"""Terms and regexes that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term, or matches a regex, in the allow-list, it will not be counted as a violation.""" terms: Optional[List[str]] = None r"""list of words and phrases to consider as whitelisted content""" + regexes: Optional[List[str]] = None + r"""list of regular expressions whose matches are considered whitelisted content""" + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["terms"]) + optional_fields = set(["terms", "regexes"]) serialized = handler(self) m = {} diff --git a/src/glean/api_client/models/createagentop.py b/src/glean/api_client/models/createagentop.py new file mode 100644 index 00000000..4ed4192d --- /dev/null +++ b/src/glean/api_client/models/createagentop.py @@ -0,0 +1,54 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .createworkflowrequest import CreateWorkflowRequest, CreateWorkflowRequestTypedDict +from glean.api_client.types import BaseModel, UNSET_SENTINEL +from glean.api_client.utils import FieldMetadata, QueryParamMetadata, RequestMetadata +import pydantic +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CreateAgentRequestTypedDict(TypedDict): + create_workflow_request: CreateWorkflowRequestTypedDict + locale: NotRequired[str] + r"""The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the `Accept-Language` will be used. If not present or not supported, defaults to the closest match or `en`.""" + timezone_offset: NotRequired[int] + r"""The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC.""" + + +class CreateAgentRequest(BaseModel): + create_workflow_request: Annotated[ + CreateWorkflowRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + locale: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the `Accept-Language` will be used. If not present or not supported, defaults to the closest match or `en`.""" + + timezone_offset: Annotated[ + Optional[int], + pydantic.Field(alias="timezoneOffset"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["locale", "timezoneOffset"]) + 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/createworkflowrequest.py b/src/glean/api_client/models/createworkflowrequest.py new file mode 100644 index 00000000..206d00f3 --- /dev/null +++ b/src/glean/api_client/models/createworkflowrequest.py @@ -0,0 +1,52 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from glean.api_client.types import BaseModel, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CreateWorkflowRequestTypedDict(TypedDict): + name: NotRequired[str] + r"""The name of the workflow.""" + transient: NotRequired[bool] + r"""Used to create a transient workflow.""" + parent_workflow_id: NotRequired[str] + r"""id of the parent workflow for transient workflows""" + + +class CreateWorkflowRequest(BaseModel): + name: Optional[str] = None + r"""The name of the workflow.""" + + transient: Optional[bool] = None + r"""Used to create a transient workflow.""" + + parent_workflow_id: Annotated[ + Optional[str], pydantic.Field(alias="parentWorkflowId") + ] = None + r"""id of the parent workflow for transient workflows""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["name", "transient", "parentWorkflowId"]) + 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 + + +try: + CreateWorkflowRequest.model_rebuild() +except NameError: + pass diff --git a/src/glean/api_client/models/dlpconfig.py b/src/glean/api_client/models/dlpconfig.py index f68bba2b..5b570053 100644 --- a/src/glean/api_client/models/dlpconfig.py +++ b/src/glean/api_client/models/dlpconfig.py @@ -47,7 +47,7 @@ class DlpConfigTypedDict(TypedDict): auto_hide_docs: NotRequired[bool] r"""auto hide documents with findings in the report""" allowlist_options: NotRequired[AllowlistOptionsTypedDict] - r"""Terms that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term in the allow-list, it will not be counted as a violation.""" + r"""Terms and regexes that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term, or matches a regex, in the allow-list, it will not be counted as a violation.""" class DlpConfig(BaseModel): @@ -111,7 +111,7 @@ class DlpConfig(BaseModel): allowlist_options: Annotated[ Optional[AllowlistOptions], pydantic.Field(alias="allowlistOptions") ] = None - r"""Terms that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term in the allow-list, it will not be counted as a violation.""" + r"""Terms and regexes that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term, or matches a regex, in the allow-list, it will not be counted as a violation.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/glean/api_client/models/feedentry.py b/src/glean/api_client/models/feedentry.py index eb60f1bd..e0057c6b 100644 --- a/src/glean/api_client/models/feedentry.py +++ b/src/glean/api_client/models/feedentry.py @@ -115,6 +115,7 @@ class JustificationType(str, Enum, metaclass=utils.OpenEnumMeta): MID_DAY_CATCH_UP = "MID_DAY_CATCH_UP" QUERY_SUGGESTION = "QUERY_SUGGESTION" COWORK_CUJ_PROMO = "COWORK_CUJ_PROMO" + CARD_STACK_PROMO = "CARD_STACK_PROMO" WEEKLY_MEETINGS = "WEEKLY_MEETINGS" FOLLOW_UP = "FOLLOW_UP" MILESTONE_TIMELINE_CHECK = "MILESTONE_TIMELINE_CHECK" diff --git a/src/glean/api_client/models/feedrequest.py b/src/glean/api_client/models/feedrequest.py index 22ab9c4e..d6641777 100644 --- a/src/glean/api_client/models/feedrequest.py +++ b/src/glean/api_client/models/feedrequest.py @@ -44,6 +44,7 @@ class FeedRequestCategory(str, Enum): MID_DAY_CATCH_UP = "MID_DAY_CATCH_UP" QUERY_SUGGESTION = "QUERY_SUGGESTION" COWORK_CUJ_PROMO = "COWORK_CUJ_PROMO" + CARD_STACK_PROMO = "CARD_STACK_PROMO" WEEKLY_MEETINGS = "WEEKLY_MEETINGS" FOLLOW_UP = "FOLLOW_UP" MILESTONE_TIMELINE_CHECK = "MILESTONE_TIMELINE_CHECK" diff --git a/src/glean/api_client/models/feedresult.py b/src/glean/api_client/models/feedresult.py index c3ee3e98..1f1f66a2 100644 --- a/src/glean/api_client/models/feedresult.py +++ b/src/glean/api_client/models/feedresult.py @@ -46,6 +46,7 @@ class FeedResultCategory(str, Enum, metaclass=utils.OpenEnumMeta): MID_DAY_CATCH_UP = "MID_DAY_CATCH_UP" QUERY_SUGGESTION = "QUERY_SUGGESTION" COWORK_CUJ_PROMO = "COWORK_CUJ_PROMO" + CARD_STACK_PROMO = "CARD_STACK_PROMO" WEEKLY_MEETINGS = "WEEKLY_MEETINGS" FOLLOW_UP = "FOLLOW_UP" MILESTONE_TIMELINE_CHECK = "MILESTONE_TIMELINE_CHECK" @@ -57,6 +58,13 @@ class FeedResultCategory(str, Enum, metaclass=utils.OpenEnumMeta): OOO_CATCH_UP = "OOO_CATCH_UP" +class PlacementReason(str, Enum, metaclass=utils.OpenEnumMeta): + r"""Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework.""" + + ORGANIC = "ORGANIC" + PROMO = "PROMO" + + class FeedResultTypedDict(TypedDict): category: FeedResultCategory r"""Category of the result, one of the requested categories in incoming request.""" @@ -65,6 +73,8 @@ class FeedResultTypedDict(TypedDict): r"""Secondary entries for the result e.g. suggested docs for the calendar, carousel.""" rank: NotRequired[int] r"""Rank of the result. Rank is suggested by server. Client side rank may differ.""" + placement_reason: NotRequired[PlacementReason] + r"""Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework.""" class FeedResult(BaseModel): @@ -81,6 +91,11 @@ class FeedResult(BaseModel): rank: Optional[int] = None r"""Rank of the result. Rank is suggested by server. Client side rank may differ.""" + placement_reason: Annotated[ + Optional[PlacementReason], pydantic.Field(alias="placementReason") + ] = None + r"""Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework.""" + @field_serializer("category") def serialize_category(self, value): if isinstance(value, str): @@ -90,9 +105,18 @@ def serialize_category(self, value): return value return value + @field_serializer("placement_reason") + def serialize_placement_reason(self, value): + if isinstance(value, str): + try: + return models.PlacementReason(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["secondaryEntries", "rank"]) + optional_fields = set(["secondaryEntries", "rank", "placementReason"]) serialized = handler(self) m = {} diff --git a/src/glean/api_client/models/grouptype.py b/src/glean/api_client/models/grouptype.py index c94336ed..88a980fb 100644 --- a/src/glean/api_client/models/grouptype.py +++ b/src/glean/api_client/models/grouptype.py @@ -16,3 +16,5 @@ class GroupType(str, Enum, metaclass=utils.OpenEnumMeta): LOCATION = "LOCATION" REGION = "REGION" EXTERNAL_GROUP = "EXTERNAL_GROUP" + # Refers to any viewers of the Collection. + COLLECTION_AUDIENCE = "COLLECTION_AUDIENCE" diff --git a/src/glean/api_client/models/uploadchatfilesrequest.py b/src/glean/api_client/models/uploadchatfilesrequest.py index 8e8d01c0..1a4665d1 100644 --- a/src/glean/api_client/models/uploadchatfilesrequest.py +++ b/src/glean/api_client/models/uploadchatfilesrequest.py @@ -12,7 +12,7 @@ class FileTypedDict(TypedDict): file_name: str - content: Union[bytes, IO[bytes], io.BufferedReader] + content: Union[bytes, IO[bytes], io.IOBase] content_type: NotRequired[str] @@ -22,7 +22,7 @@ class File(BaseModel): ] content: Annotated[ - Union[bytes, IO[bytes], io.BufferedReader], + Union[bytes, IO[bytes], io.IOBase], pydantic.Field(alias=""), FieldMetadata(multipart=MultipartFormMetadata(content=True)), ] diff --git a/src/glean/api_client/people.py b/src/glean/api_client/people.py index 8f853d2a..5e0a722f 100644 --- a/src/glean/api_client/people.py +++ b/src/glean/api_client/people.py @@ -6,7 +6,7 @@ from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response -from typing import List, Mapping, Optional, Union +from typing import Iterable, List, Mapping, Optional, Union from typing_extensions import deprecated @@ -93,6 +93,8 @@ def debug( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Troubleshooting"], + extensions={"x-beta": True}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -192,6 +194,8 @@ async def debug_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Troubleshooting"], + extensions={"x-beta": True}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -285,6 +289,15 @@ def count( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Troubleshooting"], + extensions={ + "x-glean-deprecated": { + "id": "4f5df873-385e-4539-8183-cb764b0f06b9", + "introduced": "2026-02-03", + "message": "Endpoint is deprecated", + "removal": "2026-10-15", + } + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -378,6 +391,15 @@ async def count_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Troubleshooting"], + extensions={ + "x-glean-deprecated": { + "id": "4f5df873-385e-4539-8183-cb764b0f06b9", + "introduced": "2026-02-03", + "message": "Endpoint is deprecated", + "removal": "2026-10-15", + } + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -470,6 +492,8 @@ def index( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["People"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -562,6 +586,8 @@ async def index_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["People"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -587,8 +613,8 @@ def bulk_index( *, upload_id: str, employees: Union[ - List[models.EmployeeInfoDefinition], - List[models.EmployeeInfoDefinitionTypedDict], + Iterable[models.EmployeeInfoDefinition], + Iterable[models.EmployeeInfoDefinitionTypedDict], ], is_first_page: Optional[bool] = None, is_last_page: Optional[bool] = None, @@ -672,6 +698,15 @@ def bulk_index( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["People"], + extensions={ + "x-glean-deprecated": { + "id": "ce596f49-55c4-465e-bf3c-5a3a33906e1f", + "introduced": "2026-02-03", + "message": "Endpoint is deprecated", + "removal": "2026-10-15", + } + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -697,8 +732,8 @@ async def bulk_index_async( *, upload_id: str, employees: Union[ - List[models.EmployeeInfoDefinition], - List[models.EmployeeInfoDefinitionTypedDict], + Iterable[models.EmployeeInfoDefinition], + Iterable[models.EmployeeInfoDefinitionTypedDict], ], is_first_page: Optional[bool] = None, is_last_page: Optional[bool] = None, @@ -782,6 +817,15 @@ async def bulk_index_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["People"], + extensions={ + "x-glean-deprecated": { + "id": "ce596f49-55c4-465e-bf3c-5a3a33906e1f", + "introduced": "2026-02-03", + "message": "Endpoint is deprecated", + "removal": "2026-10-15", + } + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -860,6 +904,8 @@ def process_all_employees_and_teams( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["People"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -938,6 +984,8 @@ async def process_all_employees_and_teams_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["People"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1028,6 +1076,8 @@ def delete( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["People"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1118,6 +1168,8 @@ async def delete_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["People"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1208,6 +1260,8 @@ def index_team( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["People"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1298,6 +1352,8 @@ async def index_team_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["People"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1385,6 +1441,8 @@ def delete_team( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["People"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1472,6 +1530,8 @@ async def delete_team_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["People"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1494,7 +1554,8 @@ def bulk_index_teams( *, upload_id: str, teams: Union[ - List[models.TeamInfoDefinition], List[models.TeamInfoDefinitionTypedDict] + Iterable[models.TeamInfoDefinition], + Iterable[models.TeamInfoDefinitionTypedDict], ], is_first_page: Optional[bool] = None, is_last_page: Optional[bool] = None, @@ -1573,6 +1634,8 @@ def bulk_index_teams( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["People"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1595,7 +1658,8 @@ async def bulk_index_teams_async( *, upload_id: str, teams: Union[ - List[models.TeamInfoDefinition], List[models.TeamInfoDefinitionTypedDict] + Iterable[models.TeamInfoDefinition], + Iterable[models.TeamInfoDefinitionTypedDict], ], is_first_page: Optional[bool] = None, is_last_page: Optional[bool] = None, @@ -1674,6 +1738,8 @@ async def bulk_index_teams_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["People"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/pins.py b/src/glean/api_client/pins.py index 0127c007..fbba9b16 100644 --- a/src/glean/api_client/pins.py +++ b/src/glean/api_client/pins.py @@ -6,7 +6,7 @@ from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response -from typing import List, Mapping, Optional, Union +from typing import Iterable, List, Mapping, Optional, Union class Pins(BaseSDK): @@ -14,9 +14,9 @@ def update( self, *, locale: Optional[str] = None, - queries: Optional[List[str]] = None, + queries: Optional[Iterable[str]] = None, audience_filters: Optional[ - Union[List[models.FacetFilter], List[models.FacetFilterTypedDict]] + Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] ] = None, id: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -50,7 +50,7 @@ def update( request = models.EditpinRequestRequest( locale=locale, edit_pin_request=models.EditPinRequest( - queries=queries, + queries=utils.unmarshal(queries, Optional[List[str]]), audience_filters=utils.get_pydantic_model( audience_filters, Optional[List[models.FacetFilter]] ), @@ -95,6 +95,11 @@ def update( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Pins"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -116,9 +121,9 @@ async def update_async( self, *, locale: Optional[str] = None, - queries: Optional[List[str]] = None, + queries: Optional[Iterable[str]] = None, audience_filters: Optional[ - Union[List[models.FacetFilter], List[models.FacetFilterTypedDict]] + Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] ] = None, id: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -152,7 +157,7 @@ async def update_async( request = models.EditpinRequestRequest( locale=locale, edit_pin_request=models.EditPinRequest( - queries=queries, + queries=utils.unmarshal(queries, Optional[List[str]]), audience_filters=utils.get_pydantic_model( audience_filters, Optional[List[models.FacetFilter]] ), @@ -197,6 +202,11 @@ async def update_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Pins"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -289,6 +299,11 @@ def retrieve( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Pins"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -381,6 +396,11 @@ async def retrieve_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Pins"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -475,6 +495,11 @@ def list( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Pins"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -569,6 +594,11 @@ async def list_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Pins"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -590,9 +620,9 @@ def create( self, *, locale: Optional[str] = None, - queries: Optional[List[str]] = None, + queries: Optional[Iterable[str]] = None, audience_filters: Optional[ - Union[List[models.FacetFilter], List[models.FacetFilterTypedDict]] + Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] ] = None, document_id: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -626,7 +656,7 @@ def create( request = models.PinRequestRequest( locale=locale, pin_request=models.PinRequest( - queries=queries, + queries=utils.unmarshal(queries, Optional[List[str]]), audience_filters=utils.get_pydantic_model( audience_filters, Optional[List[models.FacetFilter]] ), @@ -671,6 +701,11 @@ def create( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Pins"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -692,9 +727,9 @@ async def create_async( self, *, locale: Optional[str] = None, - queries: Optional[List[str]] = None, + queries: Optional[Iterable[str]] = None, audience_filters: Optional[ - Union[List[models.FacetFilter], List[models.FacetFilterTypedDict]] + Union[Iterable[models.FacetFilter], Iterable[models.FacetFilterTypedDict]] ] = None, document_id: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -728,7 +763,7 @@ async def create_async( request = models.PinRequestRequest( locale=locale, pin_request=models.PinRequest( - queries=queries, + queries=utils.unmarshal(queries, Optional[List[str]]), audience_filters=utils.get_pydantic_model( audience_filters, Optional[List[models.FacetFilter]] ), @@ -773,6 +808,11 @@ async def create_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Pins"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -865,6 +905,11 @@ def remove( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Pins"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -957,6 +1002,11 @@ async def remove_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Pins"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/policies.py b/src/glean/api_client/policies.py index 91b7c01d..ce81e8ef 100644 --- a/src/glean/api_client/policies.py +++ b/src/glean/api_client/policies.py @@ -80,6 +80,8 @@ def retrieve( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Governance"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -167,6 +169,8 @@ async def retrieve_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Governance"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -275,6 +279,8 @@ def update( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Governance"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -383,6 +389,8 @@ async def update_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Governance"], + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -470,6 +478,8 @@ def list( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Governance"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -557,6 +567,8 @@ async def list_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Governance"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -653,6 +665,8 @@ def create( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Governance"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -749,6 +763,8 @@ async def create_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Governance"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -833,6 +849,8 @@ def download( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Governance"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -917,6 +935,8 @@ async def download_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Governance"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/reports.py b/src/glean/api_client/reports.py index 1a11b253..3a4c3e6e 100644 --- a/src/glean/api_client/reports.py +++ b/src/glean/api_client/reports.py @@ -83,6 +83,8 @@ def create( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Governance"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -173,6 +175,8 @@ async def create_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Governance"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -257,6 +261,8 @@ def download( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Governance"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -341,6 +347,8 @@ async def download_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Governance"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -425,6 +433,8 @@ def status( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Governance"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -509,6 +519,8 @@ async def status_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Governance"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/search.py b/src/glean/api_client/search.py index 22746832..b48e6212 100644 --- a/src/glean/api_client/search.py +++ b/src/glean/api_client/search.py @@ -7,7 +7,7 @@ from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response -from typing import Any, List, Mapping, Optional, Union +from typing import Any, Iterable, List, Mapping, Optional, Union class Search(BaseSDK): @@ -27,7 +27,7 @@ def query_as_admin( page_size: Optional[int] = None, max_snippet_size: Optional[int] = None, cursor: Optional[str] = None, - result_tab_ids: Optional[List[str]] = None, + result_tab_ids: Optional[Iterable[str]] = None, input_details: Optional[ Union[ models.SearchRequestInputDetails, @@ -92,7 +92,7 @@ def query_as_admin( max_snippet_size=max_snippet_size, query=query, cursor=cursor, - result_tab_ids=result_tab_ids, + result_tab_ids=utils.unmarshal(result_tab_ids, Optional[List[str]]), input_details=utils.get_pydantic_model( input_details, Optional[models.SearchRequestInputDetails] ), @@ -141,6 +141,11 @@ def query_as_admin( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Search"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Preview", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -178,7 +183,7 @@ async def query_as_admin_async( page_size: Optional[int] = None, max_snippet_size: Optional[int] = None, cursor: Optional[str] = None, - result_tab_ids: Optional[List[str]] = None, + result_tab_ids: Optional[Iterable[str]] = None, input_details: Optional[ Union[ models.SearchRequestInputDetails, @@ -243,7 +248,7 @@ async def query_as_admin_async( max_snippet_size=max_snippet_size, query=query, cursor=cursor, - result_tab_ids=result_tab_ids, + result_tab_ids=utils.unmarshal(result_tab_ids, Optional[List[str]]), input_details=utils.get_pydantic_model( input_details, Optional[models.SearchRequestInputDetails] ), @@ -292,6 +297,11 @@ async def query_as_admin_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Search"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Preview", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -322,12 +332,12 @@ def autocomplete( Union[models.SessionInfo, models.SessionInfoTypedDict] ] = None, query: Optional[str] = None, - datasources_filter: Optional[List[str]] = None, + datasources_filter: Optional[Iterable[str]] = None, datasource: Optional[str] = None, - result_types: Optional[List[models.AutocompleteRequestResultType]] = None, + result_types: Optional[Iterable[models.AutocompleteRequestResultType]] = None, result_size: Optional[int] = None, auth_tokens: Optional[ - Union[List[models.AuthToken], List[models.AuthTokenTypedDict]] + Union[Iterable[models.AuthToken], Iterable[models.AuthTokenTypedDict]] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -371,9 +381,13 @@ def autocomplete( session_info, Optional[models.SessionInfo] ), query=query, - datasources_filter=datasources_filter, + datasources_filter=utils.unmarshal( + datasources_filter, Optional[List[str]] + ), datasource=datasource, - result_types=result_types, + result_types=utils.unmarshal( + result_types, Optional[List[models.AutocompleteRequestResultType]] + ), result_size=result_size, auth_tokens=utils.get_pydantic_model( auth_tokens, Optional[List[models.AuthToken]] @@ -422,6 +436,11 @@ def autocomplete( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Search"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -448,12 +467,12 @@ async def autocomplete_async( Union[models.SessionInfo, models.SessionInfoTypedDict] ] = None, query: Optional[str] = None, - datasources_filter: Optional[List[str]] = None, + datasources_filter: Optional[Iterable[str]] = None, datasource: Optional[str] = None, - result_types: Optional[List[models.AutocompleteRequestResultType]] = None, + result_types: Optional[Iterable[models.AutocompleteRequestResultType]] = None, result_size: Optional[int] = None, auth_tokens: Optional[ - Union[List[models.AuthToken], List[models.AuthTokenTypedDict]] + Union[Iterable[models.AuthToken], Iterable[models.AuthTokenTypedDict]] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -497,9 +516,13 @@ async def autocomplete_async( session_info, Optional[models.SessionInfo] ), query=query, - datasources_filter=datasources_filter, + datasources_filter=utils.unmarshal( + datasources_filter, Optional[List[str]] + ), datasource=datasource, - result_types=result_types, + result_types=utils.unmarshal( + result_types, Optional[List[models.AutocompleteRequestResultType]] + ), result_size=result_size, auth_tokens=utils.get_pydantic_model( auth_tokens, Optional[List[models.AuthToken]] @@ -548,6 +571,11 @@ async def autocomplete_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Search"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -569,7 +597,7 @@ def retrieve_feed( self, *, locale: Optional[str] = None, - categories: Optional[List[models.FeedRequestCategory]] = None, + categories: Optional[Iterable[models.FeedRequestCategory]] = None, request_options: Optional[ Union[models.FeedRequestOptions, models.FeedRequestOptionsTypedDict] ] = None, @@ -609,7 +637,9 @@ def retrieve_feed( request = models.FeedRequestRequest( locale=locale, feed_request=models.FeedRequest( - categories=categories, + categories=utils.unmarshal( + categories, Optional[List[models.FeedRequestCategory]] + ), request_options=utils.get_pydantic_model( request_options, Optional[models.FeedRequestOptions] ), @@ -657,6 +687,11 @@ def retrieve_feed( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Search"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -678,7 +713,7 @@ async def retrieve_feed_async( self, *, locale: Optional[str] = None, - categories: Optional[List[models.FeedRequestCategory]] = None, + categories: Optional[Iterable[models.FeedRequestCategory]] = None, request_options: Optional[ Union[models.FeedRequestOptions, models.FeedRequestOptionsTypedDict] ] = None, @@ -718,7 +753,9 @@ async def retrieve_feed_async( request = models.FeedRequestRequest( locale=locale, feed_request=models.FeedRequest( - categories=categories, + categories=utils.unmarshal( + categories, Optional[List[models.FeedRequestCategory]] + ), request_options=utils.get_pydantic_model( request_options, Optional[models.FeedRequestOptions] ), @@ -766,6 +803,11 @@ async def retrieve_feed_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Search"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -902,6 +944,11 @@ def recommendations( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Search"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Preview", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1040,6 +1087,11 @@ async def recommendations_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Search"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Preview", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1075,7 +1127,7 @@ def query( page_size: Optional[int] = None, max_snippet_size: Optional[int] = None, cursor: Optional[str] = None, - result_tab_ids: Optional[List[str]] = None, + result_tab_ids: Optional[Iterable[str]] = None, input_details: Optional[ Union[ models.SearchRequestInputDetails, @@ -1140,7 +1192,7 @@ def query( max_snippet_size=max_snippet_size, query=query, cursor=cursor, - result_tab_ids=result_tab_ids, + result_tab_ids=utils.unmarshal(result_tab_ids, Optional[List[str]]), input_details=utils.get_pydantic_model( input_details, Optional[models.SearchRequestInputDetails] ), @@ -1189,6 +1241,11 @@ def query( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Search"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1226,7 +1283,7 @@ async def query_async( page_size: Optional[int] = None, max_snippet_size: Optional[int] = None, cursor: Optional[str] = None, - result_tab_ids: Optional[List[str]] = None, + result_tab_ids: Optional[Iterable[str]] = None, input_details: Optional[ Union[ models.SearchRequestInputDetails, @@ -1291,7 +1348,7 @@ async def query_async( max_snippet_size=max_snippet_size, query=query, cursor=cursor, - result_tab_ids=result_tab_ids, + result_tab_ids=utils.unmarshal(result_tab_ids, Optional[List[str]]), input_details=utils.get_pydantic_model( input_details, Optional[models.SearchRequestInputDetails] ), @@ -1340,6 +1397,11 @@ async def query_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Search"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-visibility": "Public", + }, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/tools.py b/src/glean/api_client/tools.py index 42b0a0c4..9ac9f2a0 100644 --- a/src/glean/api_client/tools.py +++ b/src/glean/api_client/tools.py @@ -80,6 +80,8 @@ def get_action_pack_auth_status( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Tools"], + extensions={"x-visibility": "Preview"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -169,6 +171,8 @@ async def get_action_pack_auth_status_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Tools"], + extensions={"x-visibility": "Preview"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -276,6 +280,8 @@ def authorize_action_pack( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Tools"], + extensions={"x-visibility": "Preview"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -383,6 +389,8 @@ async def authorize_action_pack_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Tools"], + extensions={"x-visibility": "Preview"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/troubleshooting.py b/src/glean/api_client/troubleshooting.py index 5f427234..a713f2ab 100644 --- a/src/glean/api_client/troubleshooting.py +++ b/src/glean/api_client/troubleshooting.py @@ -99,6 +99,8 @@ def post_api_index_v1_debug_datasource_document_events( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Troubleshooting"], + extensions={"x-beta": True}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -207,6 +209,8 @@ async def post_api_index_v1_debug_datasource_document_events_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Troubleshooting"], + extensions={"x-beta": True}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/glean/api_client/types/base64fileinput.py b/src/glean/api_client/types/base64fileinput.py index 25fc5398..862566fe 100644 --- a/src/glean/api_client/types/base64fileinput.py +++ b/src/glean/api_client/types/base64fileinput.py @@ -23,7 +23,11 @@ def encode_base64_file_input(value: Any) -> Any: with open(value, "rb") as fh: binary = fh.read() else: + # Restore position after reading: pydantic may validate the same stream more than once. + position = value.tell() if value.seekable() else None binary = value.read() + if position is not None: + value.seek(position) if isinstance(binary, str): binary = binary.encode() if not isinstance(binary, (bytes, bytearray)): diff --git a/src/glean/api_client/utils/eventstreaming.py b/src/glean/api_client/utils/eventstreaming.py index 3bdcd6d3..a8d4fe5c 100644 --- a/src/glean/api_client/utils/eventstreaming.py +++ b/src/glean/api_client/utils/eventstreaming.py @@ -7,6 +7,7 @@ Any, Callable, Generic, + List, TypeVar, Optional, Generator, @@ -53,6 +54,9 @@ def __enter__(self): return self def __exit__(self, exc_type, exc_val, exc_tb): + self.close() + + def close(self): self._closed = True self.response.close() @@ -92,6 +96,9 @@ async def __aenter__(self): return self async def __aexit__(self, exc_type, exc_val, exc_tb): + await self.close() + + async def close(self): self._closed = True await self.response.aclose() @@ -114,6 +121,7 @@ class ServerEvent: b"\n\r", b"\n\n", ] +MAX_BOUNDARY_LEN = max(len(b) for b in MESSAGE_BOUNDARIES) UTF8_BOM = b"\xef\xbb\xbf" @@ -124,52 +132,56 @@ async def stream_events_async( sentinel: Optional[str] = None, data_required: bool = True, ) -> AsyncGenerator[T, None]: - buffer = bytearray() - position = 0 - event_id: Optional[str] = None - async for chunk in response.aiter_bytes(): - if len(buffer) == 0 and chunk.startswith(UTF8_BOM): - chunk = chunk[len(UTF8_BOM) :] - buffer += chunk - for i in range(position, len(buffer)): - char = buffer[i : i + 1] - seq: Optional[bytes] = None - if char in [b"\r", b"\n"]: - for boundary in MESSAGE_BOUNDARIES: - seq = _peek_sequence(i, buffer, boundary) - if seq is not None: - break - if seq is None: - continue - - block = buffer[position:i] - position = i + len(seq) - event, discard, event_id = _parse_event( - raw=block, - decoder=decoder, - sentinel=sentinel, - event_id=event_id, - data_required=data_required, - ) - if event is not None: - yield event - if discard: - await response.aclose() - return - - if position > 0: - buffer = buffer[position:] - position = 0 - - event, discard, _ = _parse_event( - raw=buffer, - decoder=decoder, - sentinel=sentinel, - event_id=event_id, - data_required=data_required, - ) - if event is not None: - yield event + try: + buffer = bytearray() + position = 0 + event_id: Optional[str] = None + async for chunk in response.aiter_bytes(): + if len(buffer) == 0 and chunk.startswith(UTF8_BOM): + chunk = chunk[len(UTF8_BOM) :] + old_len = len(buffer) + buffer += chunk + search_start = max(position, old_len - MAX_BOUNDARY_LEN + 1) + for i in range(search_start, len(buffer)): + char = buffer[i : i + 1] + seq: Optional[bytes] = None + if char in [b"\r", b"\n"]: + for boundary in MESSAGE_BOUNDARIES: + seq = _peek_sequence(i, buffer, boundary) + if seq is not None: + break + if seq is None: + continue + + block = buffer[position:i] + position = i + len(seq) + event, discard, event_id = _parse_event( + raw=block, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, + ) + if event is not None: + yield event + if discard: + return + + if position > 0: + buffer = buffer[position:] + position = 0 + + event, discard, _ = _parse_event( + raw=buffer, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, + ) + if event is not None: + yield event + finally: + await response.aclose() def stream_events( @@ -178,52 +190,56 @@ def stream_events( sentinel: Optional[str] = None, data_required: bool = True, ) -> Generator[T, None, None]: - buffer = bytearray() - position = 0 - event_id: Optional[str] = None - for chunk in response.iter_bytes(): - if len(buffer) == 0 and chunk.startswith(UTF8_BOM): - chunk = chunk[len(UTF8_BOM) :] - buffer += chunk - for i in range(position, len(buffer)): - char = buffer[i : i + 1] - seq: Optional[bytes] = None - if char in [b"\r", b"\n"]: - for boundary in MESSAGE_BOUNDARIES: - seq = _peek_sequence(i, buffer, boundary) - if seq is not None: - break - if seq is None: - continue - - block = buffer[position:i] - position = i + len(seq) - event, discard, event_id = _parse_event( - raw=block, - decoder=decoder, - sentinel=sentinel, - event_id=event_id, - data_required=data_required, - ) - if event is not None: - yield event - if discard: - response.close() - return - - if position > 0: - buffer = buffer[position:] - position = 0 - - event, discard, _ = _parse_event( - raw=buffer, - decoder=decoder, - sentinel=sentinel, - event_id=event_id, - data_required=data_required, - ) - if event is not None: - yield event + try: + buffer = bytearray() + position = 0 + event_id: Optional[str] = None + for chunk in response.iter_bytes(): + if len(buffer) == 0 and chunk.startswith(UTF8_BOM): + chunk = chunk[len(UTF8_BOM) :] + old_len = len(buffer) + buffer += chunk + search_start = max(position, old_len - MAX_BOUNDARY_LEN + 1) + for i in range(search_start, len(buffer)): + char = buffer[i : i + 1] + seq: Optional[bytes] = None + if char in [b"\r", b"\n"]: + for boundary in MESSAGE_BOUNDARIES: + seq = _peek_sequence(i, buffer, boundary) + if seq is not None: + break + if seq is None: + continue + + block = buffer[position:i] + position = i + len(seq) + event, discard, event_id = _parse_event( + raw=block, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, + ) + if event is not None: + yield event + if discard: + return + + if position > 0: + buffer = buffer[position:] + position = 0 + + event, discard, _ = _parse_event( + raw=buffer, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, + ) + if event is not None: + yield event + finally: + response.close() def _parse_event( @@ -238,7 +254,7 @@ def _parse_event( lines = re.split(r"\r?\n|\r", block) publish = False event = ServerEvent() - data = "" + data_parts: List[str] = [] for line in lines: if not line: continue @@ -259,7 +275,7 @@ def _parse_event( event.event = value publish = True elif field == "data": - data += value + "\n" + data_parts.append(value) publish = True elif field == "id": publish = True @@ -271,16 +287,17 @@ def _parse_event( publish = True event.id = event_id + has_data = bool(data_parts) + data = "\n".join(data_parts) - if sentinel and data == f"{sentinel}\n": + if sentinel and has_data and data == sentinel: return None, True, event_id # Skip data-less events when data is required - if not data and publish and data_required: + if not has_data and publish and data_required: return None, False, event_id - if data: - data = data[:-1] + if has_data: try: event.data = json.loads(data) except json.JSONDecodeError: @@ -291,7 +308,7 @@ def _parse_event( out_dict = { k: v for k, v in asdict(event).items() - if v is not None or (k == "data" and data) + if v is not None or (k == "data" and has_data) } out = decoder(json.dumps(out_dict)) diff --git a/src/glean/api_client/utils/forms.py b/src/glean/api_client/utils/forms.py index 1e550bd5..193f2649 100644 --- a/src/glean/api_client/utils/forms.py +++ b/src/glean/api_client/utils/forms.py @@ -1,5 +1,6 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +import io from typing import ( Any, Dict, @@ -103,6 +104,10 @@ def _extract_file_properties(file_obj: Any) -> Tuple[str, Any, Any]: if file_metadata.content: content = getattr(file_obj, file_field_name, None) + if isinstance(content, io.TextIOBase): + content = content.read().encode( + getattr(content, "encoding", None) or "utf-8" + ) elif file_field_name == "content_type": content_type = getattr(file_obj, file_field_name, None) else: diff --git a/src/glean/api_client/utils/retries.py b/src/glean/api_client/utils/retries.py index af07d4e9..ca7b59ef 100644 --- a/src/glean/api_client/utils/retries.py +++ b/src/glean/api_client/utils/retries.py @@ -11,10 +11,13 @@ class BackoffStrategy: + """Exponential backoff strategy configuration.""" + initial_interval: int max_interval: int exponent: float max_elapsed_time: int + jitter_ms: Optional[int] def __init__( self, @@ -22,24 +25,63 @@ def __init__( max_interval: int, exponent: float, max_elapsed_time: int, + jitter_ms: Optional[int] = None, ): + """Initialize a backoff strategy. + + Args: + initial_interval: Initial retry interval in milliseconds. + max_interval: Maximum retry interval in milliseconds. + exponent: Base of the exponential backoff; the interval grows as + ``initial_interval * exponent ** retries``. + max_elapsed_time: Maximum total elapsed time in milliseconds. + jitter_ms: Additive jitter bound in milliseconds. When set, adds a random + value in ``[0, jitter_ms]`` to each computed backoff interval (default + ``+[0, 1s]``). + + Note: + When a response carries a ``Retry-After`` or ``retry-after-ms`` header, + that delay is used as-is and the sleep-shaping parameters + (``initial_interval``, ``max_interval``, ``exponent``, ``jitter_ms``) are + ignored for that attempt. + """ + if jitter_ms is not None and jitter_ms < 0: + raise ValueError("jitter_ms must be >= 0") self.initial_interval = initial_interval self.max_interval = max_interval self.exponent = exponent self.max_elapsed_time = max_elapsed_time + self.jitter_ms = jitter_ms class RetryConfig: + """Runtime retry configuration.""" + strategy: str backoff: BackoffStrategy retry_connection_errors: bool + status_codes_override: Optional[List[str]] def __init__( - self, strategy: str, backoff: BackoffStrategy, retry_connection_errors: bool + self, + strategy: str, + backoff: BackoffStrategy, + retry_connection_errors: bool, + status_codes_override: Optional[List[str]] = None, ): + """Initialize a retry configuration. + + Args: + strategy: Retry strategy: ``"none"`` or ``"backoff"``. + backoff: Backoff parameters. + retry_connection_errors: Whether to also retry transport-level connection errors. + status_codes_override: Retryable HTTP status codes that take precedence over the + per-operation defaults when non-empty. + """ self.strategy = strategy self.backoff = backoff self.retry_connection_errors = retry_connection_errors + self.status_codes_override = status_codes_override class Retries: @@ -48,7 +90,7 @@ class Retries: def __init__(self, config: RetryConfig, status_codes: List[str]): self.config = config - self.status_codes = status_codes + self.status_codes = config.status_codes_override or status_codes class TemporaryError(Exception): @@ -93,12 +135,28 @@ def _parse_retry_after_header(response: httpx.Response) -> Optional[int]: return None +def _parse_retry_after_ms_header(response: httpx.Response) -> Optional[int]: + retry_after_ms_header = response.headers.get("retry-after-ms") + if not retry_after_ms_header: + return None + + try: + milliseconds = float(retry_after_ms_header) + if milliseconds >= 0: + return round(milliseconds) + except (OverflowError, ValueError): + pass + + return None + + def _get_sleep_interval( exception: Exception, initial_interval: int, max_interval: int, exponent: float, retries: int, + jitter_ms: Optional[int] = None, ) -> float: """Get sleep interval for retry with exponential backoff. @@ -108,6 +166,7 @@ def _get_sleep_interval( max_interval: Maximum retry interval in milliseconds. exponent: Base for exponential backoff calculation. retries: Current retry attempt count. + jitter_ms: Additive jitter bound in ms; see ``BackoffStrategy.jitter_ms``. Returns: Sleep interval in seconds. @@ -119,7 +178,11 @@ def _get_sleep_interval( ): return exception.retry_after / 1000 - sleep = (initial_interval / 1000) * exponent**retries + random.uniform(0, 1) + sleep = (initial_interval / 1000) * exponent**retries + if jitter_ms is not None: + sleep += random.uniform(0, jitter_ms / 1000) + else: + sleep += random.uniform(0, 1) return min(sleep, max_interval / 1000) @@ -162,6 +225,7 @@ def do_request() -> httpx.Response: retries.config.backoff.max_interval, retries.config.backoff.exponent, retries.config.backoff.max_elapsed_time, + retries.config.backoff.jitter_ms, ) return func() @@ -206,6 +270,7 @@ async def do_request() -> httpx.Response: retries.config.backoff.max_interval, retries.config.backoff.exponent, retries.config.backoff.max_elapsed_time, + retries.config.backoff.jitter_ms, ) return await func() @@ -217,6 +282,7 @@ def retry_with_backoff( max_interval=60000, exponent=1.5, max_elapsed_time=3600000, + jitter_ms=None, ): start = round(time.time() * 1000) retries = 0 @@ -234,8 +300,17 @@ def retry_with_backoff( raise + if isinstance(exception, TemporaryError): + retry_after_ms = _parse_retry_after_ms_header(exception.response) + if retry_after_ms is not None: + exception.retry_after = retry_after_ms sleep = _get_sleep_interval( - exception, initial_interval, max_interval, exponent, retries + exception, + initial_interval, + max_interval, + exponent, + retries, + jitter_ms=jitter_ms, ) time.sleep(sleep) retries += 1 @@ -247,6 +322,7 @@ async def retry_with_backoff_async( max_interval=60000, exponent=1.5, max_elapsed_time=3600000, + jitter_ms=None, ): start = round(time.time() * 1000) retries = 0 @@ -264,8 +340,17 @@ async def retry_with_backoff_async( raise + if isinstance(exception, TemporaryError): + retry_after_ms = _parse_retry_after_ms_header(exception.response) + if retry_after_ms is not None: + exception.retry_after = retry_after_ms sleep = _get_sleep_interval( - exception, initial_interval, max_interval, exponent, retries + exception, + initial_interval, + max_interval, + exponent, + retries, + jitter_ms=jitter_ms, ) await asyncio.sleep(sleep) retries += 1 diff --git a/src/glean/api_client/utils/serializers.py b/src/glean/api_client/utils/serializers.py index d2149f8b..1031ed93 100644 --- a/src/glean/api_client/utils/serializers.py +++ b/src/glean/api_client/utils/serializers.py @@ -4,7 +4,7 @@ import functools import json import typing -from typing import Any, Dict, List, Tuple, Union, get_args +from typing import Any, Dict, Iterable, List, Mapping, Tuple, Union, get_args import typing_extensions from typing_extensions import get_origin @@ -113,10 +113,12 @@ def validate(c): def unmarshal_json(raw, typ: Any) -> Any: - return unmarshal(from_json(raw), typ) + return unmarshal(from_json(raw), typ, coerce_iterables=False) -def unmarshal(val, typ: Any) -> Any: +def unmarshal(val, typ: Any, coerce_iterables: bool = True) -> Any: + if coerce_iterables: + val = _coerce_iterables_for_type(val, typ) unmarshaller = create_model( "Unmarshaller", body=(typ, ...), @@ -193,9 +195,88 @@ def get_pydantic_model(data: Any, typ: Any) -> Any: if not _contains_pydantic_model(data): return unmarshal(data, typ) + return _coerce_iterables_for_type(data, typ) + + +def _coerce_iterables_for_type(data: Any, typ: Any) -> Any: + if data is None or isinstance(data, (BaseModel, Unset)): + return data + + typ = _resolve_type_alias(typ) + origin = get_origin(typ) + + if _is_annotated_type(origin): + args = get_args(typ) + return _coerce_iterables_for_type(data, args[0]) if args else data + + if is_union(origin): + for arg in (arg for arg in get_args(typ) if arg is not type(None)): + coerced = _coerce_iterables_for_type(data, arg) + if coerced is not data: + return coerced + return data + + if _is_list_type(typ): + item_type = get_args(typ)[0] if get_args(typ) else Any + if isinstance(data, (str, bytes, bytearray, Mapping)): + return data + if isinstance(data, Iterable): + return [_coerce_iterables_for_type(item, item_type) for item in data] + return data + + if _is_mapping_type(typ): + value_type = get_args(typ)[1] if len(get_args(typ)) > 1 else Any + if isinstance(data, Mapping): + return { + key: _coerce_iterables_for_type(value, value_type) + for key, value in data.items() + } + return data + + if _is_pydantic_model_type(typ) and isinstance(data, Mapping): + coerced = None + for field_name, field in typ.model_fields.items(): + field_type = field.annotation + for key in (field_name, field.alias): + if key is not None and key in data: + value = data[key] if coerced is None else coerced[key] + coerced_value = _coerce_iterables_for_type(value, field_type) + if coerced_value is not value: + if coerced is None: + coerced = dict(data) + coerced[key] = coerced_value + return coerced if coerced is not None else data + return data +def _resolve_type_alias(typ: Any) -> Any: + return getattr(typ, "__value__", typ) + + +def _is_annotated_type(origin: Any) -> bool: + return any( + origin is typing_obj + for typing_obj in _get_typing_objects_by_name_of("Annotated") + ) + + +def _is_list_type(typ: Any) -> bool: + typ = _resolve_type_alias(typ) + return typ is list or get_origin(typ) is list + + +def _is_mapping_type(typ: Any) -> bool: + typ = _resolve_type_alias(typ) + origin = get_origin(typ) + mapping_origin = get_origin(Mapping[Any, Any]) + return typ in (dict, Dict, Mapping) or origin in (dict, Mapping, mapping_origin) + + +def _is_pydantic_model_type(typ: Any) -> bool: + return isinstance(typ, type) and issubclass(typ, BaseModel) + + def _contains_pydantic_model(data: Any) -> bool: if isinstance(data, BaseModel): return True diff --git a/src/glean/api_client/visibilityoverrides.py b/src/glean/api_client/visibilityoverrides.py index ecbc256b..7c608e8c 100644 --- a/src/glean/api_client/visibilityoverrides.py +++ b/src/glean/api_client/visibilityoverrides.py @@ -6,14 +6,14 @@ from glean.api_client.types import OptionalNullable, UNSET from glean.api_client.utils import get_security_from_env from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response -from typing import List, Mapping, Optional, Union +from typing import Iterable, List, Mapping, Optional, Union class Visibilityoverrides(BaseSDK): def list( self, *, - doc_ids: Optional[List[str]] = None, + doc_ids: Optional[Iterable[str]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -40,7 +40,7 @@ def list( base_url = self._get_url(base_url, url_variables) request = models.GetdocvisibilityRequest( - doc_ids=doc_ids, + doc_ids=utils.unmarshal(doc_ids, Optional[List[str]]), ) req = self._build_request( @@ -77,6 +77,8 @@ def list( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Governance"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -99,7 +101,7 @@ def list( async def list_async( self, *, - doc_ids: Optional[List[str]] = None, + doc_ids: Optional[Iterable[str]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -126,7 +128,7 @@ async def list_async( base_url = self._get_url(base_url, url_variables) request = models.GetdocvisibilityRequest( - doc_ids=doc_ids, + doc_ids=utils.unmarshal(doc_ids, Optional[List[str]]), ) req = self._build_request_async( @@ -163,6 +165,8 @@ async def list_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Governance"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -187,8 +191,8 @@ def create( *, visibility_overrides: Optional[ Union[ - List[models.DocumentVisibilityOverride], - List[models.DocumentVisibilityOverrideTypedDict], + Iterable[models.DocumentVisibilityOverride], + Iterable[models.DocumentVisibilityOverrideTypedDict], ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -263,6 +267,8 @@ def create( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Governance"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -287,8 +293,8 @@ async def create_async( *, visibility_overrides: Optional[ Union[ - List[models.DocumentVisibilityOverride], - List[models.DocumentVisibilityOverrideTypedDict], + Iterable[models.DocumentVisibilityOverride], + Iterable[models.DocumentVisibilityOverrideTypedDict], ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -363,6 +369,8 @@ async def create_async( security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), + tags=["Governance"], + extensions={"x-visibility": "Public"}, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/tests/mockserver/internal/handler/generated_handlers.go b/tests/mockserver/internal/handler/generated_handlers.go index 6400b090..a8a0a755 100644 --- a/tests/mockserver/internal/handler/generated_handlers.go +++ b/tests/mockserver/internal/handler/generated_handlers.go @@ -57,6 +57,7 @@ func GeneratedHandlers(ctx context.Context, dir *logging.HTTPFileDirectory, rt * NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/addcollectionitems", pathPostRestAPIV1Addcollectionitems(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/addverificationreminder", pathPostRestAPIV1Addverificationreminder(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/adminsearch", pathPostRestAPIV1Adminsearch(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/agents", pathPostRestAPIV1Agents(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/autocomplete", pathPostRestAPIV1Autocomplete(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/chat", pathPostRestAPIV1Chat(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/checkdatasourceauth", pathPostRestAPIV1Checkdatasourceauth(dir, rt)), diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1agents.go b/tests/mockserver/internal/handler/pathpostrestapiv1agents.go new file mode 100644 index 00000000..6c1367d6 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1agents.go @@ -0,0 +1,82 @@ +// 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 pathPostRestAPIV1Agents(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 "createAgent[0]": + dir.HandlerFunc("createAgent", testCreateAgentCreateAgent0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testCreateAgentCreateAgent0(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.WorkflowResult = &components.WorkflowResult{ + Workflow: components.Workflow{ + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + LastDraftSavedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + LastUpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1getchat.go b/tests/mockserver/internal/handler/pathpostrestapiv1getchat.go index 87401958..96d4127e 100644 --- a/tests/mockserver/internal/handler/pathpostrestapiv1getchat.go +++ b/tests/mockserver/internal/handler/pathpostrestapiv1getchat.go @@ -628,8 +628,8 @@ func testGetchatGetchat0(w http.ResponseWriter, req *http.Request) { Roles: []components.UserRoleSpecification{}, SourceDocumentSpec: types.Pointer(components.CreateDocumentSpecUnionDocumentSpec3( components.DocumentSpec3{ - UgcType: components.DocumentSpecUgcType1Shortcuts, - ContentID: 602763, + UgcType: components.DocumentSpecUgcType1Announcements, + ContentID: 848009, }, )), SourceType: components.AnswerSourceTypeAssistant.ToPointer(), diff --git a/tests/mockserver/internal/sdk/models/components/allowlistoptions.go b/tests/mockserver/internal/sdk/models/components/allowlistoptions.go index cf238c9e..05ea9fc7 100644 --- a/tests/mockserver/internal/sdk/models/components/allowlistoptions.go +++ b/tests/mockserver/internal/sdk/models/components/allowlistoptions.go @@ -2,10 +2,12 @@ package components -// AllowlistOptions - Terms that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term in the allow-list, it will not be counted as a violation. +// AllowlistOptions - Terms and regexes that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term, or matches a regex, in the allow-list, it will not be counted as a violation. type AllowlistOptions struct { // list of words and phrases to consider as whitelisted content Terms []string `json:"terms,omitempty"` + // list of regular expressions whose matches are considered whitelisted content + Regexes []string `json:"regexes,omitempty"` } func (o *AllowlistOptions) GetTerms() []string { @@ -14,3 +16,10 @@ func (o *AllowlistOptions) GetTerms() []string { } return o.Terms } + +func (o *AllowlistOptions) GetRegexes() []string { + if o == nil { + return nil + } + return o.Regexes +} diff --git a/tests/mockserver/internal/sdk/models/components/createworkflowrequest.go b/tests/mockserver/internal/sdk/models/components/createworkflowrequest.go new file mode 100644 index 00000000..277dd8b7 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/createworkflowrequest.go @@ -0,0 +1,33 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type CreateWorkflowRequest struct { + // The name of the workflow. + Name *string `json:"name,omitempty"` + // Used to create a transient workflow. + Transient *bool `json:"transient,omitempty"` + // id of the parent workflow for transient workflows + ParentWorkflowID *string `json:"parentWorkflowId,omitempty"` +} + +func (o *CreateWorkflowRequest) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *CreateWorkflowRequest) GetTransient() *bool { + if o == nil { + return nil + } + return o.Transient +} + +func (o *CreateWorkflowRequest) GetParentWorkflowID() *string { + if o == nil { + return nil + } + return o.ParentWorkflowID +} diff --git a/tests/mockserver/internal/sdk/models/components/dlpconfig.go b/tests/mockserver/internal/sdk/models/components/dlpconfig.go index 04c23aeb..23a965fc 100644 --- a/tests/mockserver/internal/sdk/models/components/dlpconfig.go +++ b/tests/mockserver/internal/sdk/models/components/dlpconfig.go @@ -29,7 +29,7 @@ type DlpConfig struct { RedactQuote *bool `json:"redactQuote,omitempty"` // auto hide documents with findings in the report AutoHideDocs *bool `json:"autoHideDocs,omitempty"` - // Terms that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term in the allow-list, it will not be counted as a violation. + // Terms and regexes that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term, or matches a regex, in the allow-list, it will not be counted as a violation. AllowlistOptions *AllowlistOptions `json:"allowlistOptions,omitempty"` } diff --git a/tests/mockserver/internal/sdk/models/components/feedentry.go b/tests/mockserver/internal/sdk/models/components/feedentry.go index 1274083a..36234aa7 100644 --- a/tests/mockserver/internal/sdk/models/components/feedentry.go +++ b/tests/mockserver/internal/sdk/models/components/feedentry.go @@ -101,6 +101,7 @@ const ( JustificationTypeMidDayCatchUp JustificationType = "MID_DAY_CATCH_UP" JustificationTypeQuerySuggestion JustificationType = "QUERY_SUGGESTION" JustificationTypeCoworkCujPromo JustificationType = "COWORK_CUJ_PROMO" + JustificationTypeCardStackPromo JustificationType = "CARD_STACK_PROMO" JustificationTypeWeeklyMeetings JustificationType = "WEEKLY_MEETINGS" JustificationTypeFollowUp JustificationType = "FOLLOW_UP" JustificationTypeMilestoneTimelineCheck JustificationType = "MILESTONE_TIMELINE_CHECK" @@ -211,6 +212,8 @@ func (e *JustificationType) UnmarshalJSON(data []byte) error { fallthrough case "COWORK_CUJ_PROMO": fallthrough + case "CARD_STACK_PROMO": + fallthrough case "WEEKLY_MEETINGS": fallthrough case "FOLLOW_UP": diff --git a/tests/mockserver/internal/sdk/models/components/feedrequest.go b/tests/mockserver/internal/sdk/models/components/feedrequest.go index 7c94e464..28d6dbf0 100644 --- a/tests/mockserver/internal/sdk/models/components/feedrequest.go +++ b/tests/mockserver/internal/sdk/models/components/feedrequest.go @@ -42,6 +42,7 @@ const ( FeedRequestCategoryMidDayCatchUp FeedRequestCategory = "MID_DAY_CATCH_UP" FeedRequestCategoryQuerySuggestion FeedRequestCategory = "QUERY_SUGGESTION" FeedRequestCategoryCoworkCujPromo FeedRequestCategory = "COWORK_CUJ_PROMO" + FeedRequestCategoryCardStackPromo FeedRequestCategory = "CARD_STACK_PROMO" FeedRequestCategoryWeeklyMeetings FeedRequestCategory = "WEEKLY_MEETINGS" FeedRequestCategoryFollowUp FeedRequestCategory = "FOLLOW_UP" FeedRequestCategoryMilestoneTimelineCheck FeedRequestCategory = "MILESTONE_TIMELINE_CHECK" @@ -126,6 +127,8 @@ func (e *FeedRequestCategory) UnmarshalJSON(data []byte) error { fallthrough case "COWORK_CUJ_PROMO": fallthrough + case "CARD_STACK_PROMO": + fallthrough case "WEEKLY_MEETINGS": fallthrough case "FOLLOW_UP": diff --git a/tests/mockserver/internal/sdk/models/components/feedresult.go b/tests/mockserver/internal/sdk/models/components/feedresult.go index ddd4f095..ec49941c 100644 --- a/tests/mockserver/internal/sdk/models/components/feedresult.go +++ b/tests/mockserver/internal/sdk/models/components/feedresult.go @@ -43,6 +43,7 @@ const ( FeedResultCategoryMidDayCatchUp FeedResultCategory = "MID_DAY_CATCH_UP" FeedResultCategoryQuerySuggestion FeedResultCategory = "QUERY_SUGGESTION" FeedResultCategoryCoworkCujPromo FeedResultCategory = "COWORK_CUJ_PROMO" + FeedResultCategoryCardStackPromo FeedResultCategory = "CARD_STACK_PROMO" FeedResultCategoryWeeklyMeetings FeedResultCategory = "WEEKLY_MEETINGS" FeedResultCategoryFollowUp FeedResultCategory = "FOLLOW_UP" FeedResultCategoryMilestoneTimelineCheck FeedResultCategory = "MILESTONE_TIMELINE_CHECK" @@ -127,6 +128,8 @@ func (e *FeedResultCategory) UnmarshalJSON(data []byte) error { fallthrough case "COWORK_CUJ_PROMO": fallthrough + case "CARD_STACK_PROMO": + fallthrough case "WEEKLY_MEETINGS": fallthrough case "FOLLOW_UP": @@ -151,6 +154,33 @@ func (e *FeedResultCategory) UnmarshalJSON(data []byte) error { } } +// PlacementReason - Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. +type PlacementReason string + +const ( + PlacementReasonOrganic PlacementReason = "ORGANIC" + PlacementReasonPromo PlacementReason = "PROMO" +) + +func (e PlacementReason) ToPointer() *PlacementReason { + return &e +} +func (e *PlacementReason) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ORGANIC": + fallthrough + case "PROMO": + *e = PlacementReason(v) + return nil + default: + return fmt.Errorf("invalid value for PlacementReason: %v", v) + } +} + type FeedResult struct { // Category of the result, one of the requested categories in incoming request. Category FeedResultCategory `json:"category"` @@ -159,6 +189,8 @@ type FeedResult struct { SecondaryEntries []FeedEntry `json:"secondaryEntries,omitempty"` // Rank of the result. Rank is suggested by server. Client side rank may differ. Rank *int64 `json:"rank,omitempty"` + // Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. + PlacementReason *PlacementReason `json:"placementReason,omitempty"` } func (o *FeedResult) GetCategory() FeedResultCategory { @@ -188,3 +220,10 @@ func (o *FeedResult) GetRank() *int64 { } return o.Rank } + +func (o *FeedResult) GetPlacementReason() *PlacementReason { + if o == nil { + return nil + } + return o.PlacementReason +} diff --git a/tests/mockserver/internal/sdk/models/components/grouptype.go b/tests/mockserver/internal/sdk/models/components/grouptype.go index 3f25f70b..be69cc6a 100644 --- a/tests/mockserver/internal/sdk/models/components/grouptype.go +++ b/tests/mockserver/internal/sdk/models/components/grouptype.go @@ -11,14 +11,15 @@ import ( type GroupType string const ( - GroupTypeDepartment GroupType = "DEPARTMENT" - GroupTypeAll GroupType = "ALL" - GroupTypeTeam GroupType = "TEAM" - GroupTypeJobTitle GroupType = "JOB_TITLE" - GroupTypeRoleType GroupType = "ROLE_TYPE" - GroupTypeLocation GroupType = "LOCATION" - GroupTypeRegion GroupType = "REGION" - GroupTypeExternalGroup GroupType = "EXTERNAL_GROUP" + GroupTypeDepartment GroupType = "DEPARTMENT" + GroupTypeAll GroupType = "ALL" + GroupTypeTeam GroupType = "TEAM" + GroupTypeJobTitle GroupType = "JOB_TITLE" + GroupTypeRoleType GroupType = "ROLE_TYPE" + GroupTypeLocation GroupType = "LOCATION" + GroupTypeRegion GroupType = "REGION" + GroupTypeExternalGroup GroupType = "EXTERNAL_GROUP" + GroupTypeCollectionAudience GroupType = "COLLECTION_AUDIENCE" ) func (e GroupType) ToPointer() *GroupType { @@ -45,6 +46,8 @@ func (e *GroupType) UnmarshalJSON(data []byte) error { case "REGION": fallthrough case "EXTERNAL_GROUP": + fallthrough + case "COLLECTION_AUDIENCE": *e = GroupType(v) return nil default: diff --git a/tests/mockserver/internal/sdk/models/operations/createagent.go b/tests/mockserver/internal/sdk/models/operations/createagent.go new file mode 100644 index 00000000..255e835e --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/createagent.go @@ -0,0 +1,56 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type CreateAgentRequest struct { + // The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the `Accept-Language` will be used. If not present or not supported, defaults to the closest match or `en`. + Locale *string `queryParam:"style=form,explode=true,name=locale"` + // The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. + TimezoneOffset *int64 `queryParam:"style=form,explode=true,name=timezoneOffset"` + Body components.CreateWorkflowRequest `request:"mediaType=application/json"` +} + +func (o *CreateAgentRequest) GetLocale() *string { + if o == nil { + return nil + } + return o.Locale +} + +func (o *CreateAgentRequest) GetTimezoneOffset() *int64 { + if o == nil { + return nil + } + return o.TimezoneOffset +} + +func (o *CreateAgentRequest) GetBody() components.CreateWorkflowRequest { + if o == nil { + return components.CreateWorkflowRequest{} + } + return o.Body +} + +type CreateAgentResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Success + WorkflowResult *components.WorkflowResult +} + +func (o *CreateAgentResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *CreateAgentResponse) GetWorkflowResult() *components.WorkflowResult { + if o == nil { + return nil + } + return o.WorkflowResult +} diff --git a/tests/test_agents.py b/tests/test_agents.py index 1d18b766..46852ff4 100644 --- a/tests/test_agents.py +++ b/tests/test_agents.py @@ -74,3 +74,17 @@ def test_agents_create_and_stream_run(): ) def test_agents_create_and_wait_run(): pass + + +def test_agents_create_agent(): + test_http_client = create_test_http_client("createAgent") + + 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.agents.create_agent() + assert res is not None diff --git a/tests/test_summarize.py b/tests/test_summarize.py index df71d57d..5401883f 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.DocumentSpecUgcType2.ANNOUNCEMENTS, - "ugc_id": "", + "id": "", }, { "ugc_type": models.DocumentSpecUgcType1.COLLECTIONS, - "content_id": 885812, + "content_id": 583083, }, ] )